plotly.py
plotly.py copied to clipboard
range is only working on the x Axis
When using facets and setting binary_string to False it's not possible to select a range on the y-axis. It works on the x-axis and also when binary_string is set False.
import plotly.express as px
import numpy as np
from skimage import data, filters, img_as_float
img = data.camera()
sigmas = [1, 2, 4]
img_sequence = [filters.gaussian(img, sigma=sigma) for sigma in sigmas]
fig = px.imshow(np.array(img_sequence), facet_col=0, binary_string=False,
labels={'facet_col':'sigma'})
# Set facet titles
for i, sigma in enumerate(sigmas):
fig.layout.annotations[i]['text'] = 'sigma = %d' %sigma
fig.update_layout(
xaxis=dict(
range = [200, 300]
),
yaxis=dict(
range = [200, 300]
),
)
fig.show()
