[BUG] imshow() animation_frame with binary_string = True
Hi, I think there's something strange going on with:
- imshow()
- animation_frame
- binary_string
From my tests, binary string (BS) causes the animation to glitch out and freeze, sometimes making the slider pop out of place, and the only way to "reset" the bug is to double click the image to auto resize it.
attached: two videos denoting the problem, it's a simple px.imshow(image, animation_frame = 0, binary_string = True)
TLDR - BS images load faster, but "freezes", no freezes when BS = False
https://github.com/plotly/plotly.py/assets/52300841/4dc37d5a-f7d7-476e-8f1c-c37e4d3356c7 https://github.com/plotly/plotly.py/assets/52300841/2b9c5e99-399d-4ea9-80c8-c81bea42c771
Thank you for reporting this bug, @hhdtan Can you please share your code with us so we can replicate this issue locally?
here's a testable code snippet!
import plotly.express as px
from skimage import io
data = io.imread("https://github.com/scikit-image/skimage-tutorials/raw/main/images/cells.tif")
img = data[30:]
fig = px.imshow(img, animation_frame=0, binary_string = True, facet_col_wrap=5)
fig.show()
attached a video denoting the issue with the above code https://github.com/plotly/plotly.py/assets/52300841/c88bd5e0-1ca3-4e33-bc78-bd1d2c553386
edit: found a post in SO denoting the same problem, although comments claim to be unable to reproduce reliably, https://stackoverflow.com/questions/66907098/plotly-express-imshow-slider-crash
I see this issue in your video, but I wasn't able to replicate the glitch on my machine. Windows 11, Firefox, and plotly.js 2.27.0