@@ -924,6 +924,13 @@ def _addplot_columns(panid,panels,ydata,apdict,xdates,config):
924924 width = apdict ['width' ] if apdict ['width' ] is not None else 1.6 * config ['_width_config' ]['line_width' ]
925925 alpha = apdict ['alpha' ]
926926 ax .plot (xdates ,ydata ,linestyle = ls ,color = color ,linewidth = width ,alpha = alpha )
927+ elif aptype == 'step' :
928+ stepwhere = apdict ['stepwhere' ]
929+ ls = apdict ['linestyle' ]
930+ color = apdict ['color' ]
931+ width = apdict ['width' ] if apdict ['width' ] is not None else 1.6 * config ['_width_config' ]['line_width' ]
932+ alpha = apdict ['alpha' ]
933+ ax .step (xdates ,ydata ,where = stepwhere ,linestyle = ls ,color = color ,linewidth = width ,alpha = alpha )
927934 else :
928935 raise ValueError ('addplot type "' + str (aptype )+ '" NOT yet supported.' )
929936
@@ -1010,7 +1017,8 @@ def _auto_secondary_y( panels, panid, ylo, yhi ):
10101017def _valid_addplot_kwargs ():
10111018
10121019 valid_linestyles = ('-' ,'solid' ,'--' ,'dashed' ,'-.' ,'dashdot' ,'.' ,'dotted' ,None ,' ' ,'' )
1013- valid_types = ('line' ,'scatter' ,'bar' , 'ohlc' , 'candle' )
1020+ valid_types = ('line' ,'scatter' ,'bar' , 'ohlc' , 'candle' ,'step' )
1021+ valid_stepwheres = ('pre' ,'post' ,'mid' )
10141022
10151023 vkwargs = {
10161024 'scatter' : { 'Default' : False ,
@@ -1070,6 +1078,9 @@ def _valid_addplot_kwargs():
10701078
10711079 'yscale' : { 'Default' : None ,
10721080 'Validator' : lambda value : _yscale_validator (value ) },
1081+
1082+ 'stepwhere' : { 'Default' : 'pre' ,
1083+ 'Validator' : lambda value : value in valid_stepwheres },
10731084 }
10741085
10751086 _validate_vkwargs_dict (vkwargs )
0 commit comments