-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
Using Plotly.py version 4.8.2, Jupyterlab version 2.1.5, Chrome Version 84.0.4147.105 or Firefox version 79.0, on Ubuntu 20.04.
When I zoom with my mouse within a subplots, the other subplots do not follow.
Here's the original subplot:

And when I mouse zoom on the middle plot:

And the axis zoom do not propagate to other subplots too.
Here's my code cleaned:
np.random.seed(1)
image_3D = np.random.randn(9,9,9)
def get_heatmap(array_2d, cmap):
return go.Heatmap(z=array_2d, colorscale=cmap)
def display_images(image_3D, slice_index, title, color_map = "oryel"):
"""
"""
_layout_options = dict(title=title, title_x=0.5, autosize=True)
_subplot_options = dict(rows=1,
cols=3,
subplot_titles=("1", "2", "3"),
shared_xaxes=True,
shared_yaxes=True)
image_1= np.take(image_3D, slice_index, 0)
image_2 = np.take(image_3D, slice_index, 2)
image_3 = np.take(image_3D, slice_index, 1)
fig = make_subplots(**_subplot_options)
fig.add_trace(get_heatmap(image_1, color_map), row = 1, col = 1)
fig.add_trace(get_heatmap(image_2, color_map), row = 1, col = 2)
fig.add_trace(get_heatmap(image_3, color_map), row = 1, col = 3)
fig.update_layout(_layout_options)
fig.show()
display_images(image_3D, 6, "random cube")
Metadata
Metadata
Assignees
Labels
No labels