2016-07-23 2 views
0

私はRのプロットに合うようにしようとしている、と私はx軸ラベルを回転させるためにいくつかの闘争を持って回転、私はすでに、このコマンドを試してみました:は軸とイタリック書き込み

ラベル= lablist、SRT = 45、 pos = 1、xpd = TRUE

しかし、それはラベルを知らないと言って動作しません。さらに、イタリックでラベル名を取得する方法もわかりません。

誰にも何か提案がありますか?ありがとう:)

+0

あなたは 'ggplot2'を使用しますか?それは簡単にそれを行うことができます... – Nate

+1

あなたの例を再現可能にしてください。それは私たち、特にあなたが持つ問題について考えるのに役立ちます。あなたは、あなたのデータセットからチャンクからデータやチップをシミュレートすることができます(詳細はこちら[hints here](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example))。これらすべての質問は、おそらく以前に答えられていることに注意してください(Rは145000質問があります)。たとえば、次のようになります。http://stackoverflow.com/questions/8975797/how-do-you-make-just-the-x-lab-ラベルイタリック体でもなくてもラボラボでも同様に –

+0

これは簡単なバープロットコマンドです – user6628798

答えて

0

?parから:

'srt' The string rotation in degrees. See the comment about 
    'crt'. Only supported by 'text'. 

(ないあなたが何をしたい。)'las''font'を続ける:

'las' numeric in {0,1,2,3}; the style of axis labels. 
     0: always parallel to the axis [_default_], 
     1: always horizontal, 
     2: always perpendicular to the axis, 
     3: always vertical. 
'font' An integer which specifies which font to use for text. If 
     possible, device drivers arrange so that 1 corresponds to 
     plain text (the default), 2 to bold face, 3 to italic and 4 
     to bold italic. 

これらはあなたを与えることができます:

barplot(setNames(100 * 1:3, nm=c("abc","def","ghi")), las=2, font=3) 

enter image description here

それとも:

barplot(setNames(100 * 1:3, nm=c("abc","def","ghi")), las=1, font=3) 

enter image description here

関連する問題