2017-08-01 5 views
0

この質問(How to split the Main title of a plot in 2 or more lines?)に加えて、第2のメインタイトル行に別のフォントサイズを割り当てようとしました。 cex.main=1はメインタイトル全体のみを変更します。プロットの第2メインタイトル行のフォントサイズを変更する方法

だから私は

は誰いくつかのヒントを持っています...それは仕事ができるどのように何かを見つけることができますか?

事前に感謝します。

私のコード:第二メインタイトルと増加フォントサイズを追加する

plot(1, main=paste("X:",1," ","Y:", 2," ","\nZ:",3)) # the “Z: 3” should get a smaller font size 

答えて

1

代替plot()title()を使用することです。 title()では、「第2のタイトル」の位置とフォントタイプを追加して操作することもできます。

ので、コードは次のようになります。

plot(1, main = paste("X:",1," ","Y:", 2," ")) 
    # In order to change font size use cex.main and in order to manipulate 
    # the position of second title use line() 
    title(main = ("Z: 3"), line = 0.5, cex.main = 0.8) 

と出力(Zのフォント:3の方が小さい) enter image description here

関連する問題