Show More
@@ -43,8 +43,12 b' ipython_promptout:' | |||||
43 | ipython_mplbackend: |
|
43 | ipython_mplbackend: | |
44 | The string which specifies if the embedded Sphinx shell should import |
|
44 | The string which specifies if the embedded Sphinx shell should import | |
45 | Matplotlib and set the backend. The value specifies a backend that is |
|
45 | Matplotlib and set the backend. The value specifies a backend that is | |
46 |
passed to `matplotlib.use()` |
|
46 | passed to `matplotlib.use()` before any lines in `ipython_execlines` are | |
47 | specified in conf.py at all, then the default value of 'agg' is used. |
|
47 | executed. If specified in conf.py as `None` or not specified in conf.py at | |
|
48 | all, then no call to `matplotlib.use()` is made. Then, matplotlib is loaded | |||
|
49 | only if specified in `ipython_execlines` or if the @savefig pseudo | |||
|
50 | decorator is used. In the latter case, matplotlib is imported and its | |||
|
51 | default backend is used. | |||
48 | ipython_execlines: |
|
52 | ipython_execlines: | |
49 | A list of strings to be exec'd for the embedded Sphinx shell. Typical |
|
53 | A list of strings to be exec'd for the embedded Sphinx shell. Typical | |
50 | usage is to make certain packages always available. Set this to an empty |
|
54 | usage is to make certain packages always available. Set this to an empty | |
@@ -696,8 +700,7 b' class IPythonDirective(Directive):' | |||||
696 | promptout, mplbackend, exec_lines) = self.get_config_options() |
|
700 | promptout, mplbackend, exec_lines) = self.get_config_options() | |
697 |
|
701 | |||
698 | if self.shell is None: |
|
702 | if self.shell is None: | |
699 |
|
703 | if mplbackend: | ||
700 | if mplbackend and mplbackend is not 'none': |
|
|||
701 | import matplotlib |
|
704 | import matplotlib | |
702 | # Repeated calls to use() will not hurt us since `mplbackend` |
|
705 | # Repeated calls to use() will not hurt us since `mplbackend` | |
703 | # is the same each time. |
|
706 | # is the same each time. |
General Comments 0
You need to be logged in to leave comments.
Login now