Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Trac #33213: replace SAGE_TMP in R interface doctests.
Browse files Browse the repository at this point in the history
  • Loading branch information
orlitzky authored and mkoeppe committed Feb 19, 2022
1 parent af39498 commit f96b7f9
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/sage/interfaces/r.py
Expand Up @@ -1257,12 +1257,17 @@ def plot(self, *args, **kwds):
EXAMPLES:
This example saves a plot to the standard R output, usually
a filename like ``Rplot001.png`` - from the command line, in
the current directory, and in the cell directory in the notebook::
sage: d=r.setwd('"%s"'%SAGE_TMP) # for doctesting only; ignore if you are trying this # optional - rpy2
sage: r.plot("1:10") # optional -- rgraphics # optional - rpy2
This example saves a plot to the standard R output, usually a
filename like ``Rplot001.png`` - from the command line, in the
current directory, and in the cell directory in the
notebook. We use a temporary directory in this example while
doctesting this example, but you should use something
persistent in your own code::
sage: from tempfile import TemporaryDirectory
sage: with TemporaryDirectory() as d: # optional - rpy2, rgraphics
....: _ = r.setwd(d)
....: r.plot("1:10")
null device
1
Expand Down

0 comments on commit f96b7f9

Please sign in to comment.