如何在基礎 R 圖中旋轉文字?
要在基礎 R 圖中編寫文字,首先我們應該使用 type="n" 建立一個空白圖表,如果我們只想繪製文字,則應該藉助於 text 函式引入文字。現在,如果我們想旋轉文字值,則可以使用 srt 引數。例如,如果我們要將文字旋轉 45 度,則可以使用 srt = -45。
示例 1
> plot(1:10,type="n") > text(x=5,y=5,"Text inside plot")
輸出

示例 2
> plot(1:10,type="n") > text(x=5,y=5,"Text inside plot",srt=-20)
輸出

示例 3
> plot(1:10,type="n") > text(x=5,y=5,"Text inside plot",srt=-45)
輸出

廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP