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 @@ -586,7 +586,8 @@ def get_cachedir():
586
586
@_logged_cached ('matplotlib data path: %s' )
587
587
def get_data_path ():
588
588
"""Return the path to Matplotlib data."""
589
- return str (Path (__file__ ).with_name ("mpl-data" ))
589
+ return str (Path (__file__ ).parent .parent .parent .parent .parent /
590
+ 'share/matplotlib/mpl-data' )
590
591
591
592
592
593
def matplotlib_fname ():
@@ -606,6 +607,7 @@ def matplotlib_fname():
606
607
is not defined)
607
608
- On other platforms,
608
609
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
610
+ - ``/etc/matplotlibrc``
609
611
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
610
612
exist.
611
613
"""
@@ -624,6 +626,7 @@ def gen_candidates():
624
626
yield matplotlibrc
625
627
yield os .path .join (matplotlibrc , 'matplotlibrc' )
626
628
yield os .path .join (get_configdir (), 'matplotlibrc' )
629
+ yield '/etc/matplotlibrc'
627
630
yield os .path .join (get_data_path (), 'matplotlibrc' )
628
631
629
632
for fname in gen_candidates ():
You can’t perform that action at this time.
0 commit comments