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?
Under par: I just picked a random plot that comes with twoord.plot package.
x <- rnorm(100,100,10)
First you need to rotate the Y axis:
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:
plotH(x,x,yaxt = 'n') # no Y axis
Then, you need to add the Y axis
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.