R 绘制大数图形
我正在使用 R,并且有一个数据值范围为 600-225,000 的数组。我可以很好地绘制它,但是刻度线的标签覆盖了轴的标签。
现在的代码是:
g_range=range(0,list)
plot(list, axes=FALSE, ylab="Total")
axis(2, at=15000*0:g_range[2])
我只想看到值和标签
I am using R and have an array with data values ranging from 600-225,000. I can plot it just fine, but the labels for the tick marks cover up the label for the axis.
Right now the code is:
g_range=range(0,list)
plot(list, axes=FALSE, ylab="Total")
axis(2, at=15000*0:g_range[2])
I just want to be able to see the values and the label
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了给您更多空间,请将 y 轴轴标签旋转 90 度,并将 y 轴描述移出一两行:
To give you more room, rotate the y-axis axis-labels 90 degrees and move the y-axis description out a line or two:
当我有很多值时,我喜欢使用 ggplot2,因为它很容易设置点的不透明度。例如,这使得您需要 20 个重叠点才能获得黑点。非常整洁。 ggplot2 还具有用于设置轴标签的合理默认值,因此您不必太担心它。
I like to use
ggplot2
when I have a lot of values because it's easy to set the opacity of your dots. For example, this makes it so that you need 20 overlapping points to get a black spot. It's pretty neat.ggplot2
also has sensible defaults for setting axis labels, so you shouldn't have to worry about it too much.