How to draw a line or add a text outside of the plot area in R?

前端 未结 1 1841
醉话见心
醉话见心 2021-01-31 20:08

Thank you for reading. I find that I am unable to draw lines/points or add text outside of the plot area. If I draw a line from inside the plot (within the axis) area to the are

相关标签:
1条回答
  • 2021-01-31 20:34

    The xpd parameter controls where you can draw. Check the current value with par()$xpd and then try setting par(xpd=NA).

    From the par help:

     ‘xpd’ A logical value or ‘NA’.  If ‘FALSE’, all plotting is
          clipped to the plot region, if ‘TRUE’, all plotting is
          clipped to the figure region, and if ‘NA’, all plotting is
          clipped to the device region. See also ‘clip’.
    
    0 讨论(0)
提交回复
热议问题