簡體   English   中英

如何在R中的twoord.plot中旋轉Y軸標簽?

[英]How to rotate Y axis labels in twoord.plot in R?

有誰知道如何在R中的twoord.plot函數中旋轉Y軸標簽? 另外,如何調整Y軸標簽的字體大小?

在同等條件下:我只是選擇了twoord.plot包隨附的隨機圖。

 x <- rnorm(100,100,10)

首先,您需要旋轉Y軸:

 par(las = 1) # rotates the y axis values for every plot you make from now on unless otherwise specified

接下來,繪制沒有Y軸的圖形:

 plotH(x,x,yaxt = 'n') # no 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.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM