增加图例字体大小ggplot2 [英] increase legend font size ggplot2
本文介绍了增加图例字体大小ggplot2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法在 ggplot2
中增加字体大小?我想我需要在主题
legend.key.width = unit(2,line) >功能,但用于调整图例中的按键,而不是字体大小。感谢!
解决方案
您可以使用theme_get()来显示主题的可能选项。
您可以使用以下命令控制图例字体大小:
+ theme(legend.text = element_text(size = X) )
用所需尺寸替换X.
Is there a way to increase the font size in ggplot2
? I think I need to specify something like legend.key.width = unit(2, "line")
in the theme
function, but that is used to adjust the keys in legends, not the font sizes. Thanks!
解决方案
You can use theme_get() to display the possible options for theme. You can control the legend font size using:
+ theme(legend.text=element_text(size=X))
replacing X with the desired size.
这篇关于增加图例字体大小ggplot2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文