How to change the font of the main title in plot()

后端 未结 2 841
甜味超标
甜味超标 2020-12-30 03:35

From this page I have come to understand that:

font.main=4

will give me a italic bold title for my figure. However I want neither but a pla

2条回答
  •  再見小時候
    2020-12-30 04:26

    ?par has

    ‘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.  Also, font 5 is expected to be the symbol
         font, in Adobe symbol encoding.  On some devices font
         families can be selected by ‘family’ to choose different sets
         of 5 fonts.
    

    All of which applies to font.main. Compare:

    > layout(1:2)
    > plot(1:10, font.main = 1, main = "Foo") ## plain font
    > plot(1:10, main = "Foo")                ## default bold font
    > layout(1)
    

    which gives:

    enter image description here

提交回复
热议问题