File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ def use(style):
7272
7373 Parameters
7474 ----------
75- style : str, dict, or list
75+ style : str, dict, list or Path object
7676 A style specification. Valid options are:
7777
7878 +------+-------------------------------------------------------------+
@@ -85,12 +85,17 @@ def use(style):
8585 | list | A list of style specifiers (str or dict) applied from first |
8686 | | to last in the list. |
8787 +------+-------------------------------------------------------------+
88+ | Path | A Path object which is a path to a style file. |
89+ +------+-------------------------------------------------------------+
8890 """
8991 style_alias = {'mpl20' : 'default' ,
9092 'mpl15' : 'classic' }
9193 if isinstance (style , str ) or hasattr (style , 'keys' ):
9294 # If name is a single str or dict, make it a single element list.
9395 styles = [style ]
96+ elif isinstance (style , Path ):
97+ # If the style is pathlib.Path object make a single element list of string
98+ styles = [str (style )]
9499 else :
95100 styles = style
96101
You can’t perform that action at this time.
0 commit comments