usage: %%rfig_save [--help] [--format_name] [-d D] [-c C]
[--fig_type FIG_TYPE]
[filepath]
Will save a RFigure, whose instructions are the code written in the remaining of the cell.
positional arguments:
filepath Path of the file.
optional arguments:
--help, -h show this help message and exit
--format_name, -fn Format the name of the file as Figure_YYYYMMDD_foo
where YYYYMMDD stands for the date. `foo` will be the
file names. If the file name is already under this
format, do notiong.
-d D Dictionary of the locals in the rfigure file. If not
specified, guess from the instructions.
-c C Comments associated to the file
--fig_type FIG_TYPE, -ft FIG_TYPE
extension of the figure, should be in ['eps', 'pdf',
'png']
Examples (in IPython/Jupyter):
In[1]:
> import numpy as np
> a = np.arange(0,10,.1)
> b = np.cos(a)
> comment = "A comment"
> diction = {'a':a,'b':1/a}
In[2]:
> %%rfig_save Test
> # search the variables in the instructions, no comment and save in pdf
> plt.plot(a,b)
In[3]:
> %%rfig_save -c comment Test
> # search the variables in the instructions, with a comment and save in pdf
> plt.plot(a,b)
In[4]:
> %%rfig_save --fig_type png
> # search the variables in the instructions, no comment and save in png
> plt.plot(a,b)
In[5]:
> %%rfig_save -d diction Test
> # specify other variables, no comment, save in pdf
> plt.plot(a,b)
In[5]:
> %%rfig_save --format_name Test
> # search the variables in the instructions, format the filename
> plt.plot(a,b)