Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plotly scattergl renders points inaccurately on M1/M2 chip #8169

Closed
3 of 4 tasks
miso-hungry opened this issue Feb 16, 2024 · 1 comment · Fixed by #8191
Closed
3 of 4 tasks

plotly scattergl renders points inaccurately on M1/M2 chip #8169

miso-hungry opened this issue Feb 16, 2024 · 1 comment · Fixed by #8191
Labels
feature:st.plotly_chart priority:P3 status:confirmed Bug has been confirmed by the Streamlit team type:bug Something isn't working upstream

Comments

@miso-hungry
Copy link

miso-hungry commented Feb 16, 2024

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

A known issue for webgl rendering on macs (plotly/plotly.js#6820) has been fixed in the recent plotly.js 2.28.0 release, which was ported to python in the plotly.py 5.19.0 release (plotly/plotly.py#4476).

I've verified that the rendering is now fixed in a vanilla jupyter notebook, but still persists in the same plotly chart rendered from streamlit. In both screenshots, the top plot uses webgl rendering, while the bottom plot uses svg. They are expected to be identical.

Jupyter:
image

Streamlit:
image

The streamlit plot still exhibits the same pre-patch plotly behavior where points "disappear" when zooming in (it should be centered but is stuck to the left side)
image

Reproducible Code Example

Open in Streamlit Cloud

import streamlit as st

import plotly.express as pltx
import plotly.graph_objects as go

x = [16777217 + x for x in range(20)]
y = x

fig = pltx.scatter(x=x, y=y, render_mode='webgl')
st.plotly_chart(fig)

fig = pltx.scatter(x=x, y=y, render_mode='svg')
st.plotly_chart(fig)

Steps To Reproduce

Run the example via streamlit run (and jupyter server using fig.show() instead)

Expected Behavior

Plots are rendered identically with no zoom issues.

Current Behavior

webgl plots are rendered incorrectly

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.26.0
  • Python version: 3.11.4
  • Operating System: macOS Sonoma 14.3
  • Browser: Chrome
  • Plotly.py version: 5.19.0

Additional Information

No response

@miso-hungry miso-hungry added status:needs-triage Has not been triaged by the Streamlit team type:bug Something isn't working labels Feb 16, 2024
Copy link

If this issue affects you, please react with a 👍 (thumbs up emoji) to the initial post.

Your feedback helps us prioritize which bugs to investigate and address first.

Visits

@miso-hungry miso-hungry changed the title scattergl renders points inaccurately on M1/M2 chip plotly scattergl renders points inaccurately on M1/M2 chip Feb 16, 2024
@willhuang1997 willhuang1997 added status:confirmed Bug has been confirmed by the Streamlit team priority:P3 and removed status:needs-triage Has not been triaged by the Streamlit team labels Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:st.plotly_chart priority:P3 status:confirmed Bug has been confirmed by the Streamlit team type:bug Something isn't working upstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants