Skip to content

Commit

Permalink
Change default heatmap width
Browse files Browse the repository at this point in the history
  • Loading branch information
polakowo committed Feb 22, 2021
1 parent 4152f22 commit 6c555ac
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 2 deletions.
Binary file modified docs/img/heatmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/sr_heatmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/sr_heatmap_slider.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/sr_overlay_with_heatmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/local_extrema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion vectorbt/generic/accessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ def overlay_with_heatmap(self, other, trace_kwargs=None, heatmap_kwargs=None,
if fig is None:
fig = make_subplots(specs=[[{"secondary_y": True}]])
if 'width' in layout:
fig.update_layout(width=layout['width'] + 150)
fig.update_layout(width=layout['width'] + 100)
fig.update_layout(**layout_kwargs)

other.vbt.ts_heatmap(**heatmap_kwargs, add_trace_kwargs=add_trace_kwargs, fig=fig)
Expand Down
2 changes: 1 addition & 1 deletion vectorbt/generic/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ def __init__(self, data=None, x_labels=None, y_labels=None,trace_kwargs=None,
[0, 1],
[0.3 * max_width, max_width]
))
width = min(width + 150, max_width) # account for colorbar
width = min(width + 100, max_width) # account for colorbar
height = math.ceil(renormalize(
y_len / (x_len + y_len),
[0, 1],
Expand Down

0 comments on commit 6c555ac

Please sign in to comment.