问题
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