@@ -311,19 +311,28 @@ of precedence:
311
311
backend : WXAgg # use wxpython with antigrain (agg) rendering
312
312
313
313
#. Setting the :envvar: `MPLBACKEND ` environment
314
- variable, either globally or for a single script::
314
+ variable, either for your current shell or for a single script::
315
315
316
316
> export MPLBACKEND="module://my_backend"
317
317
> python simple_plot.py
318
318
319
+ > MPLBACKEND="module://my_backend" python simple_plot.py
320
+
321
+ Setting this environment variable will override the ``backend `` parameter
322
+ in *any * ``matplotlibrc ``, even if there is a ``matplotlibrc `` in your
323
+ current working directory. Therefore setting :envvar: `MPLBACKEND `
324
+ globally, e.g. in your ``.bashrc `` or ``.profile ``, is discouraged as it
325
+ might lead to counter-intuitive behavior.
326
+
319
327
#. To set the backend for a single script, you can alternatively use the `-d `
320
328
command line argument::
321
329
322
330
> python script.py -dbackend
323
331
324
332
This might conflict with scripts which parse
325
333
command line arguments (see issue
326
- `#1986 <https://github.com/matplotlib/matplotlib/issues/1986 >`_).
334
+ `#1986 <https://github.com/matplotlib/matplotlib/issues/1986 >`_), so you
335
+ should use :envvar: `MPLBACKEND ` instead.
327
336
328
337
#. If your script depends on a specific backend you can use the
329
338
:func: `~matplotlib.use ` function::
0 commit comments