plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

range is only working on the x Axis

Open mdopy opened this issue 4 years ago • 0 comments

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()

newplot (51)

mdopy avatar Jan 07 '22 17:01 mdopy