> On Oct 26, 2020, at 10:02 AM, Therneau, Terry M., Ph.D. via R-help 
> <r-help@r-project.org> wrote:
> 
> In one of my plot functions it is convenient to use clipping to restrict the 
> range of some 
> output.
> But at the end of the function I'd like to turn it off, i.e., so that a 
> subsequent use of 
> legend(), text() or whatever is not affected.
> I don't quite see how to do this -- it seems that the only way to turn off 
> clip is with a 
> new plot.


Terry,

At the end of the example on ?clip, there is:

  do.call("clip", as.list(usr))  # reset to plot region

where 'usr' is the value of:

  usr <- par("usr")

called after the very first plot is generated.

The indication is that by using the final line of code in the example, the 
clipping region is reset to the plot region, probably also based upon any 
change to par("xpd") that may be relevant in your use case.

Does that help?

Regards,

Marc Schwartz

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
  • [R] temporary clipping Therneau, Terry M., Ph.D. via R-help
    • Re: [R] temporary clipping Marc Schwartz via R-help

Reply via email to