Skip to content

Commit a5a6b6e

Browse files
committed
allow base mpl style to be a list
1 parent fe985a0 commit a5a6b6e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/mplfinance/_styles.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ def _apply_mpfstyle(style):
2020

2121
plt.style.use('default')
2222

23+
if isinstance(style['base_mpl_style'], list):
24+
plt.style.use(list(map(style['base_mpl_style'], _get_mpfstyle)))
25+
2326
if style['base_mpl_style'] is not None:
2427
plt.style.use(style['base_mpl_style'])
2528

@@ -66,7 +69,7 @@ def _valid_make_mpf_style_kwargs():
6669

6770
'base_mpl_style': { 'Default' : None,
6871
'Description' : 'matplotlib style to use as base of new mplfinance style',
69-
'Validator' : lambda value: isinstance(value,str) }, # and is in plt.style.available
72+
'Validator' : lambda value: isinstance(value,(str,list))}, # and is in plt.style.available
7073

7174
'marketcolors' : { 'Default' : None,
7275
'Description' : 'market colors object, from `mpf.make_market_colors()`',

0 commit comments

Comments
 (0)