Skip to content

Commit

Permalink
Merge pull request matplotlib#462 from michalkucharczyk/linestyle-lis…
Browse files Browse the repository at this point in the history
…t-accepted

plot: linestyle list is accepted
  • Loading branch information
DanielGoldfarb authored Dec 1, 2021
2 parents 5a772a8 60609ec commit 10095c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/mplfinance/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 427,8 @@ def _valid_lines_kwargs():
( isinstance(value,(list,tuple)) and
all([mcolors.is_color_like(v) for v in value]) ) },
'linestyle' : { 'Default' : '-',
'Validator' : lambda value: value is None or value in valid_linestyles },
'Validator' : lambda value: value is None or value in valid_linestyles or
all([v in valid_linestyles for v in value]) },
'linewidths': { 'Default' : None,
'Validator' : lambda value: value is None or
isinstance(value,(float,int)) or
Expand Down Expand Up @@ -1124,7 1125,7 @@ def _construct_aline_collections(alines, dtix=None):
'alines' : the same as defined above: sequence of price, or dates, or segments
'colors' : colors for the above alines
'linestyle' : line types for the above alines
'linewidths' : line types for the above alines
'linewidths' : line widths for the above alines
dtix: date index for the x-axis, used for converting the dates when
x-values are 'evenly spaced integers' (as when skipping non-trading days)
Expand Down Expand Up @@ -1174,7 1175,7 @@ def _construct_hline_collections(hlines,minx,maxx):
'hlines' : the same as defined above: sequence of price, or dates, or segments
'colors' : colors for the above hlines
'linestyle' : line types for the above hlines
'linewidths' : line types for the above hlines
'linewidths' : line widths for the above hlines
minx : the minimum value for x for the horizontal line, already converted to `xdates` format
maxx : the maximum value for x for the horizontal line, already converted to `xdates` format
Expand Down Expand Up @@ -1234,7 1235,7 @@ def _construct_vline_collections(vlines,dtix,miny,maxy):
'vlines' : the same as defined above: sequence of dates/datetimes
'colors' : colors for the above vlines
'linestyle' : line types for the above vlines
'linewidths' : line types for the above vlines
'linewidths' : line widths for the above vlines
dtix: date index for the x-axis, used for converting the dates when
x-values are 'evenly spaced integers' (as when skipping non-trading days)
Expand Down Expand Up @@ -1300,7 1301,7 @@ def _construct_tline_collections(tlines, dtix, dates, opens, highs, lows, closes
'tlines' : the same as defined above: sequence of pairs of date[time]s
'colors' : colors for the above tlines
'linestyle' : line types for the above tlines
'linewidths' : line types for the above tlines
'linewidths' : line widths for the above tlines
dtix: date index for the x-axis, used for converting the dates when
x-values are 'evenly spaced integers' (as when skipping non-trading days)
Expand Down
2 changes: 1 addition & 1 deletion src/mplfinance/_version.py
Original file line number Diff line number Diff line change
@@ -1,5 1,5 @@

version_info = (0, 12, 8, 'beta', 2)
version_info = (0, 12, 8, 'beta', 3)

_specifier_ = {'alpha': 'a','beta': 'b','candidate': 'rc','final': ''}

Expand Down

0 comments on commit 10095c6

Please sign in to comment.