且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 R 中旋转 twoord.plot 的 X 轴标签

更新时间:2023-11-22 08:38:28

您需要取消通常的标签并使用 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.