diff --git a/backtesting/_plotting.py b/backtesting/_plotting.py index 8e9afadd..fc3a88b1 100644 --- a/backtesting/_plotting.py +++ b/backtesting/_plotting.py @@ -212,8 +212,8 @@ def plot(*, results: pd.Series, new_bokeh_figure = partial( _figure, x_axis_type='linear', - plot_width=plot_width, - plot_height=400, + width=plot_width, + height=400, tools="xpan,xwheel_zoom,box_zoom,undo,redo,reset,save", active_drag='xpan', active_scroll='xwheel_zoom') @@ -269,7 +269,7 @@ def plot(*, results: pd.Series, ('Volume', '@Volume{0,0}')] def new_indicator_figure(**kwargs): - kwargs.setdefault('plot_height', 90) + kwargs.setdefault('height', 90) fig = new_bokeh_figure(x_range=fig_ohlc.x_range, active_scroll='xwheel_zoom', active_drag='xpan', @@ -334,7 +334,7 @@ def _plot_equity_section(is_return=False): source.add(equity, source_key) fig = new_indicator_figure( y_axis_label=yaxis_label, - **({} if plot_drawdown else dict(plot_height=110))) + **({} if plot_drawdown else dict(height=110))) # High-watermark drawdown dents fig.patch('index', 'equity_dd', @@ -697,8 +697,8 @@ def plot_heatmaps(heatmap: pd.Series, agg: Union[Callable, str], ncols: int, y_range=level2, x_axis_label=name1, y_axis_label=name2, - plot_width=plot_width // ncols, - plot_height=plot_width // ncols, + width=plot_width // ncols, + height=plot_width // ncols, tools='box_zoom,reset,save', tooltips=[(name1, '@' + name1), (name2, '@' + name2),