File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ locations, in the following order:
56561. :file: `matplotlibrc ` in the current working directory, usually used for
5757 specific customizations that you do not want to apply elsewhere.
5858
59- 2. :file: `$MATPLOTLIBRC/matplotlibrc `.
59+ 2. :file: `$MATPLOTLIBRC ` if it is a file, else :file: ` $MATPLOTLIBRC /matplotlibrc `.
6060
61613. It next looks in a user-specific place, depending on your platform:
6262
Original file line number Diff line number Diff line change @@ -755,6 +755,8 @@ def matplotlib_fname():
755755
756756 - `$PWD/matplotlibrc`
757757
758+ - `$MATPLOTLIBRC` if it is a file
759+
758760 - `$MATPLOTLIBRC/matplotlibrc`
759761
760762 - `$MPLCONFIGDIR/matplotlibrc`
@@ -787,6 +789,8 @@ def matplotlib_fname():
787789 if 'MATPLOTLIBRC' in os .environ :
788790 path = os .environ ['MATPLOTLIBRC' ]
789791 if os .path .exists (path ):
792+ if os .path .isfile (path ):
793+ return path
790794 fname = os .path .join (path , 'matplotlibrc' )
791795 if os .path .exists (fname ):
792796 return fname
You can’t perform that action at this time.
0 commit comments