File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -540,7 +540,8 @@ def get_cachedir():
540
540
@_logged_cached ('matplotlib data path: %s' )
541
541
def get_data_path ():
542
542
"""Return the path to Matplotlib data."""
543
- return str (Path (__file__ ).with_name ("mpl-data" ))
543
+ return str (Path (__file__ ).parent .parent .parent .parent .parent /
544
+ 'share/matplotlib/mpl-data' )
544
545
545
546
546
547
def matplotlib_fname ():
@@ -560,6 +561,7 @@ def matplotlib_fname():
560
561
is not defined)
561
562
- On other platforms,
562
563
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
564
+ - ``/etc/matplotlibrc``
563
565
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
564
566
exist.
565
567
"""
@@ -578,6 +580,7 @@ def gen_candidates():
578
580
yield matplotlibrc
579
581
yield os .path .join (matplotlibrc , 'matplotlibrc' )
580
582
yield os .path .join (get_configdir (), 'matplotlibrc' )
583
+ yield '/etc/matplotlibrc'
581
584
yield os .path .join (get_data_path (), 'matplotlibrc' )
582
585
583
586
for fname in gen_candidates ():
You can’t perform that action at this time.
0 commit comments