|
106 | 106 | be applied before each plot.
|
107 | 107 |
|
108 | 108 | plot_apply_rcparams
|
109 |
| - Apply rcParams before each plot. When context is used, rcParams are |
110 |
| - not applied, and this configuration option overrides this behavior. |
| 109 | + By default, rcParams are applied when `context` option is not used in |
| 110 | + a plot directive. This configuration option overrides this behaviour |
| 111 | + and applies rcParams before each plot. |
111 | 112 |
|
112 | 113 | plot_working_directory
|
113 | 114 | By default, the working directory will be changed to the directory of
|
114 | 115 | the example, so the code can get at its data files, if any. Also its
|
115 |
| - path to sys.path so it can import any helper modules sitting beside it. |
116 |
| - This configuration option can be used to specify a central directory |
117 |
| - where data files for all code are located. |
| 116 | + path will be added to `sys.path` so it can import any helper modules |
| 117 | + sitting beside it. This configuration option can be used to specify |
| 118 | + a central directory (also added to `sys.path`) where data files and |
| 119 | + helper modules for all code are located. |
118 | 120 |
|
119 | 121 | plot_template
|
120 | 122 | Provide a customized template for preparing resturctured text.
|
@@ -463,8 +465,9 @@ def run_code(code, code_path, ns=None, function_name=None):
|
463 | 465 |
|
464 | 466 | pwd = os.getcwd()
|
465 | 467 | old_sys_path = list(sys.path)
|
466 |
| - if setup.config.plot_working_directory: |
| 468 | + if setup.config.plot_working_directory is not None: |
467 | 469 | os.chdir(setup.config.plot_working_directory)
|
| 470 | + sys.path.insert(0, setup.config.plot_working_directory) |
468 | 471 | elif code_path is not None:
|
469 | 472 | dirname = os.path.abspath(os.path.dirname(code_path))
|
470 | 473 | os.chdir(dirname)
|
|
0 commit comments