在Hexbin图中更改轴标签的大小 [英] Changing size of axis labels in hexbin plot

查看:135
本文介绍了在Hexbin图中更改轴标签的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在绘制十六进制数据时是否可以更改轴标签的字体大小?

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")

推荐答案

您可以隐藏标签,并使用网格命令分别添加标签.可能需要经过反复试验才能将它们准确定位在所需位置:

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))

这篇关于在Hexbin图中更改轴标签的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆