当前位置:网站首页>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
边栏推荐
- [MySQL] understand the important architecture of MySQL (I)
- 微信小程序学习笔记1
- 调用DLL开启线程的问题
- mysql5.7.25主从复制(单向)
- The difference between thread join and object wait
- 官方颁发的SSL证书与自签名证书结合实现网站双向认证
- Process32First返回false,错误x信息24
- IIS网站配置
- (1) Hand eye calibration of face scanner and manipulator (eye on hand)
- 附加到进程之后,断点显示“当前不会命中断点 还没有为该文档加载任何符号”
猜你喜欢
随机推荐
Process32First返回false,错误x信息24
设置视图动态图片
[Online deadlock analysis] by index_ Deadlock event caused by merge
E. Two Small Strings
QT随手笔记(六)——更新界面、截图、文件对话框
M-ary number STR to n-ary number
Qt随手笔记(三)在vs中使用QtCharts画折线图
面试突击68:为什么 TCP 需要 3 次握手?
After attaching to the process, the breakpoint displays "currently will not hit the breakpoint, and no symbols have been loaded for this document"
微信小程序学习笔记1
Gauss elimination
Exception handling mechanism II
JS one line code to obtain the maximum and minimum values of the array
QT handy notes (II) edit control and float, qstring conversion
Network flow learning notes
PMM(Percona Monitoring and Management )安装记录
Does volatile rely on the MESI protocol to solve the visibility problem? (top)
el-table的formatter属性的用法
How to add a PDB
C# 托管与非托管