Does anyone know how to rotate the Y axis labels in the function twoord.plot in R? Also, how about resizing the font of the Y axis labels?
有没有人知道如何在函数二中旋转Y轴标签。在R情节吗?还有,调整Y轴标签的字体大小如何?
1 个解决方案
#1
0
Under par: I just picked a random plot that comes with twoord.plot package.
在par模式下:我只是选择了一个随机的情节。策划方案。
x <- rnorm(100,100,10)
First you need to rotate the Y axis:
首先你需要旋转Y轴:
par(las = 1) # rotates the y axis values for every plot you make from now on unless otherwise specified
Next, plot your graph without a Y axis:
接下来,画出没有Y轴的图形:
plotH(x,x,yaxt = 'n') # no Y axis
Then, you need to add the Y axis
然后,你需要加上Y轴。
axis(2,cex.axis = 0.5) # where 2 specifies the Y axis and 0.5 is half (0.5) of the font size as before.
#1
0
Under par: I just picked a random plot that comes with twoord.plot package.
在par模式下:我只是选择了一个随机的情节。策划方案。
x <- rnorm(100,100,10)
First you need to rotate the Y axis:
首先你需要旋转Y轴:
par(las = 1) # rotates the y axis values for every plot you make from now on unless otherwise specified
Next, plot your graph without a Y axis:
接下来,画出没有Y轴的图形:
plotH(x,x,yaxt = 'n') # no Y axis
Then, you need to add the Y axis
然后,你需要加上Y轴。
axis(2,cex.axis = 0.5) # where 2 specifies the Y axis and 0.5 is half (0.5) of the font size as before.