Skip to content

Commit

Permalink
[vis] Plotly: use plot size
Browse files Browse the repository at this point in the history
  • Loading branch information
holl- committed May 17, 2024
1 parent b1ca7d7 commit 52baf2e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions phi/vis/_dash/_plotly_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def create_figure(self,
subplot.yaxis.update(title=bounds.vector.item_names[1], range=_get_range(bounds, 1))
subplot.zaxis.update(title=bounds.vector.item_names[2], range=_get_range(bounds, 2))
fig._phi_size = size
fig.update_layout(width=size[0] * 70, height=size[1] * 70) # 70 approximately matches matplotlib but it's not consistent
return fig, {pos: (pos[0]+1, pos[1]+1) for pos in subplots.keys()}

def animate(self, fig, frames: int, plot_frame_function: Callable, interval: float, repeat: bool):
Expand Down

0 comments on commit 52baf2e

Please sign in to comment.