在 R 中旋转 twoord.plot 的 X 轴标签 [英] Rotate X Axis Labels of twoord.plot in R

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

问题描述

我在 plotrixtwoord.plot 函数中使用a> 包,需要将 X 轴刻度标签旋转 45 度.有人知道怎么做吗?

I am using the twoord.plot function in the plotrix package and need to rotate the X Axis tick labels 45 degrees. Anyone know how to do so?

推荐答案

您需要取消通常的标签并使用 text(..., srt=45) 放入您想要的标签.由于默认文本只进入绘图区域,y 参数可能需要为负数,您需要通过将第三个参数降低"到 usr.这都是 R-FAQ 中描述.

You need to suppress the usual labeling and put your desired labeling in with text(..., srt=45). Since by default text only goes in the plot region, the y argument may need to be negative, and you will need to extend the plotting region by "lowering" the third argument to usr. This is all described in the R-FAQ.

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

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