当前位置:网站首页>Drawing GIF dynamic graph with R language
Drawing GIF dynamic graph with R language
2022-07-19 23:35:00 【A Qiang Zhen】
gapminder Is the data we need , use gganimate To draw gif Moving graph
install.packages("gapminder")
install.packages("gganimate")
library(gapminder)
library(gganimate)
ggplot(gapminder,aes(gdpPercap,lifeExp,size=pop,colour=continent))+
geom_point(alpha=0.7,show.legend = F)+# Set transparency
scale_x_log10()+# Yes y take lg The logarithmic
scale_size(range=c(2,12))+
facet_wrap(~continent)+# Graphic facet
# This is the part of making animation
transition_time(year)+
labs(title="Year:{frame_time}",x="GDP per capita",y="life expecttancy")+
ease_aes("linear")
anim_save('123.gif')# Save the file
If you have any questions, please reply in the comment area
边栏推荐
猜你喜欢
[soft test] cognition of software designers
QTableWidget 添加复选框,添加按钮
[the road to success] Xiao Yang takes you to brush the list of C language programming training exercises of Niuniu series
追寻童年回忆~三子棋【C语言】
[update at any time] summary record of vivado use problems
Deep analysis of [C language] function (2)
IP第九天笔记
From full connection to convolution
What is MQ? Why use MQ?
如何开发有效的可复用测试用例,又如何使用和管理?
随机推荐
MQ的分类与选型
js map方法/filter函数
[软考]软考教程+历年真题
竞赛·6120.数组能形成多少数对·枚举
Is there a routine to open a securities account? Is the securities account given by qiniu safe?
2022-07-18日报:下一站,Embodied AI
写论文看这一篇就够了
月薪过万,突破“创业失败+外卖小哥”标签,他这样从什么都不懂晋升为测试团队骨干~
高通QC4+发布:充电速度提升15%!2019年推15W无线快充!
四、服务通信原理,代码实现
448.找到所有数组中消失的数字·哈希表
淘宝/天猫关键词搜索最新接口
Postman from introduction to advanced tutorial (ten thousand words)
Is there a big difference in the development and deployment between Seata China made database and information creation environment and conventional CentOS and MySQL?
Small practical experience of touchstart, touchmove, touchend touch events
QTableWidget 添加复选框,添加按钮
一文理解分布式开发中的服务治理
如何开发有效的可复用测试用例,又如何使用和管理?
Numerical stability in neural networks
Educational codeforces round 131 A-D problem solution