100
100
import numpy as np
101
101
from matplotlib import pyplot as plt
102
102
103
- plot_dir_resolve_method
103
+ plot_path_resolution_method
104
104
The method to use for resolving file names that come after the
105
105
``plot::`` directive. Two options are available: ``relative`` and
106
- ``absolute ``. Defaults to ``absolute `` but the default value will
107
- change to ``relative`` in future versions. The ``absolute `` method
108
- is deprecated and might be removed in future. See the ``plot_basedir``
106
+ ``old ``. Defaults to ``old `` but the default value will
107
+ change to ``relative`` in future versions. The ``old `` method
108
+ is deprecated and will be removed in future. See the ``plot_basedir``
109
109
for explanation of methods.
110
110
111
111
plot_basedir
112
112
Base directory, to which ``plot::`` file names are relative.
113
113
Defaults to the source directory.
114
114
115
- If ``plot_dir_resolve_method `` is ``relative``, relative file names are
116
- found relative to the directory of the file containing the directive.
117
- Absolute file names (paths starting with ``/``) are found relative to
118
- ``plot_basedir``.
115
+ If ``plot_path_resolution_method `` is ``relative``, relative file names
116
+ are found relative to the directory of the file containing the
117
+ directive. Absolute file names (paths starting with ``/``) are found
118
+ relative to ``plot_basedir``.
119
119
120
- If ``plot_dir_resolve_method `` is ``absolute ``, all files are found
121
- relative to ``plot_basedir`` whether the paths start with ``/`` or not.
122
- This method is deprecated and may be removed in future.
120
+ If ``plot_path_resolution_method `` is ``old ``, relative paths are found
121
+ relative to ``plot_basedir`` and absolute paths point to files in the
122
+ host system. This method is deprecated and will be removed in future.
123
123
124
124
plot_formats
125
125
File formats to generate. List of tuples or strings::
@@ -687,7 +687,7 @@ def run(arguments, content, options, state_machine, state, lineno):
687
687
if len (arguments ):
688
688
689
689
# if the new method is selected for resolving paths
690
- if config .plot_dir_resolve_method .lower () == 'relative' :
690
+ if config .plot_path_resolution_method .lower () == 'relative' :
691
691
692
692
if arguments [0 ].startswith ('/' ):
693
693
arguments [0 ] = arguments [0 ][1 :]
@@ -703,7 +703,7 @@ def run(arguments, content, options, state_machine, state, lineno):
703
703
'3.2' , message = 'You are using an old method '
704
704
'to resolve filenames of the ``.. ::plot`` directive. Please '
705
705
'switch to the new method by specifying '
706
- '``plot_dir_resolve_method =\' relative\' `` in your conf.py '
706
+ '``plot_path_resolution_method =\' relative\' `` in your conf.py '
707
707
'and fix the filenames accordingly. Please see '
708
708
'matplotlib/doc/api/next_api_changes/2018-10-09-plot-directive.rst '
709
709
'for more information. The old method will be removed in '
0 commit comments