Changing size of axis labels in hexbin plot

拟墨画扇 提交于 2020-01-24 22:58:13

问题


Is there a way to change the font size of axis labels when plotting hexbin data?

library(hexbin)
myData <- hexbin(rnorm(100), rnorm(100)) 
myPlot <- plot(myData, xlab = "Variable 1", ylab = "Variable 2")


回答1:


You can suppress the labels and add them separately with grid commands. It may take some trial and error to position them exactly where you want them:

library(grid)
myPlot <- plot(myData, xlab="", ylab="", lcex=.75)
grid.text("Variable 1", .45, .1, gp=gpar(fontsize=12))
grid.text("Variable 2", .05, .5, rot=90, gp=gpar(fontsize=12))



来源:https://stackoverflow.com/questions/48651010/changing-size-of-axis-labels-in-hexbin-plot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!