@@ -269,7 +269,7 @@ def plot( data, **kwargs ):
269
269
collections = _construct_ohlc_collections (xdates , opens , highs , lows , closes ,
270
270
marketcolors = style ['marketcolors' ] )
271
271
elif ptype == 'renko' :
272
- collections , new_dates , volumes , brick_values = _construct_renko_collections (dates , highs , lows , volumes , config ['renko_params' ], closes ,
272
+ collections , new_dates , volumes , brick_values , brick_size = _construct_renko_collections (dates , highs , lows , volumes , config ['renko_params' ], closes ,
273
273
marketcolors = style ['marketcolors' ] )
274
274
elif ptype == 'pnf' or ptype == 'p&f' or ptype == 'pointnfigure' :
275
275
collections , new_dates , volumes , brick_values = _construct_pointnfig_collections (dates , highs , lows , volumes , config ['pointnfig_params' ], closes ,
@@ -325,8 +325,12 @@ def plot( data, **kwargs ):
325
325
avg_dist_between_points = (xdates [- 1 ] - xdates [0 ]) / float (len (xdates ))
326
326
minx = xdates [0 ] - avg_dist_between_points
327
327
maxx = xdates [- 1 ] + avg_dist_between_points
328
- miny = min ([low for low in lows if low != - 1 ])
329
- maxy = max ([high for high in highs if high != - 1 ])
328
+ if ptype is not 'renko' :
329
+ miny = min ([low for low in lows if low != - 1 ])
330
+ maxy = max ([high for high in highs if high != - 1 ])
331
+ else :
332
+ miny = min ([brick for brick in brick_values ])
333
+ maxy = max ([brick + brick_size for brick in brick_values ])
330
334
corners = (minx , miny ), (maxx , maxy )
331
335
ax1 .update_datalim (corners )
332
336
0 commit comments