R中的旋转轴标签 [英] rotating axis labels in R

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

问题描述

在R中,如何使(条形图)的y轴标签平行于X轴而不是平行于Y轴?

In R, how do I make a (bar)plot's y axis labels parallel to the X axis instead of parallel to the Y axis?

推荐答案

不确定这是否是您的意思,但是请尝试设置las=1.这是一个示例:

Not sure if this is what you mean, but try setting las=1. Here's an example:

require(grDevices)
tN <- table(Ni <- stats::rpois(100, lambda=5))
r <- barplot(tN, col=rainbow(20), las=1)

代表轴标签的样式. (0 =平行,1 =全部水平,2 =全部垂直于轴,3 =全部垂直)

That represents the style of axis labels. (0=parallel, 1=all horizontal, 2=all perpendicular to axis, 3=all vertical)

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

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