当前位置:网站首页>R语言ggplot2可视化: 将图例标题(legend title)对齐到ggplot2中图例框的中间(默认左对齐、align legend title to middle of legend)
R语言ggplot2可视化: 将图例标题(legend title)对齐到ggplot2中图例框的中间(默认左对齐、align legend title to middle of legend)
2022-07-26 09:34:00 【Data+Science+Insight】
R语言ggplot2可视化: 将图例标题(legend title)对齐到ggplot2中图例框的中间(默认左对齐、align the legend title to the middle of legend box in ggplot2)
#仿真数据
# example data from http://www.cookbook-r.com/Graphs/Legends_(ggplot2)/
df1 <- data.frame(
sex = factor(c("Female","Female","Male","Male")),
time = factor(c("Lunch","Dinner","Lunch","Dinner"), levels=c("Lunch","Dinner")),
total_bill = c(13.53, 16.81, 16.24, 17.42)
)
df1

#将图例标题(legend title)对齐到ggplot2中图例框的中间(无效的案例)
# example data from http://www.cookbook-r.com/Graphs/Leg边栏推荐
猜你喜欢
随机推荐
uni-app学习总结
选择器的使用
Network flow learning notes
暑假第四周
matlab simulink实现模糊pid对中央空调时延温度控制系统控制
2020-12-29
2020-12-29
Qt随手笔记(二)Edit控件及float,QString转化、
附加到进程之后,断点显示“当前不会命中断点 还没有为该文档加载任何符号”
Jmeter配置元件之CSV数据文件设置
Implementation of fragment lazy loading after multi-layer nesting
高斯消元求解异或线性方程组
el-table实现增加/删除行,某参数跟着变
m进制数str转n进制数
官方颁发的SSL证书与自签名证书结合实现网站双向认证
MySql5.7.25源码安装记录
小白搞一波深拷贝 浅拷贝
antd TreeSelect获取父节点的值
E. Two Small Strings
大二上第二周学习笔记
![[MySQL] understand the important architecture of MySQL (I)](/img/89/5fb595b0112fac987626857b76f9a4.png)








