Search code examples
rgraphicspostscript

How to fix clipped output from R postscript function?


The output from the postscript function is generating clipped output. See the legend on the right side of the figure below, the last legend entry should read SBW-25. I've tried changing the width argument to postscript but this has had no effect. I've also tried manually editting the bounding box in generated postscript but this also has had no effect. enter image description here


Solution

  • Wihtout a reproducible example, it is hard to diagnose, but here are some things to try.

    If you are viewing the postscript in GSView, you probably just need to increase paper size. Click Media -> A0 (or something suitably big).

    If you save to a different format (PDF, PNG, whatever), do you get the same effect?

    If all else fails, try manually changing the legend position with

    p + opts(legend.position = whatever)