Skip to content

Timeline slider causes width flickering/glitching #4003

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

Open
miguel-atenea opened this issue Dec 28, 2022 · 4 comments
Open

Timeline slider causes width flickering/glitching #4003

miguel-atenea opened this issue Dec 28, 2022 · 4 comments
Labels
bug something broken P3 backlog performance something is slow

Comments

@miguel-atenea
Copy link

Hello there!

Basically I’m using a px.density_mapbox for plotting animated coordinates over a map, and using a slider which allows users to “time-travel” over the coordinates. When I hit the play button it seems to work relatively fine, but when I update the slider manually the mapbox’s width starts filckering/glitching around, by this I mean it’s width changes randomly as shown in this video 2

I’ve expericenced this behaviour using plotly with streamlit as well as with jupyter-notebook (both notebook_connected and browser rendering modes)

Does anyone know what could be the cause for this? Thanks!

Code:

    fig = px.density_mapbox(coords_df,
                            title=f"Some Nice title",
                            lat="lat",
                            lon="lon",                                                        
                            animation_frame="hour_minute",
                            animation_group="service_id",                            
                            radius=10,                            
                            )
    fig.show()
@heathhenley
Copy link

I had the same problem - I see a lot of "Too many auto-margin redraws" in the browser console, so it might be related to plotly/plotly.js#2704

The way I "fixed" it for now was to stop showing the colorbar and to stick automargin=False on every element that it would let me. It still happens a bit with the slider be it's a lot better, I think I'm going to just grab the color bar and pull it into the page separately as another image (mine doesn't need to change). Hacky, but it's better 🤷‍♂️

Here's what I'm trying to do: https://heathhenley.github.io/RhodyCarCounter/heatmap
and here's the script: https://github.com/heathhenley/RhodyCarCounter/blob/main/scripts-utils-one-offs/plot_some_data.py#L36

If you slide the slider around a bit you can get it to flicker still, but because it's below the map I think it's not as jarring as the colorbar flickering. Maybe someone with more experience can tell what I've missed to stop the slider from automargin'ing everytime it's updated?

@gvwilson
Copy link
Contributor

Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson

@elliotwutingfeng
Copy link

The flickering issue is still present as of plotly.py version 5.23.0

@gvwilson gvwilson reopened this Aug 8, 2024
@gvwilson gvwilson added bug something broken P3 backlog performance something is slow labels Aug 8, 2024
@elliotwutingfeng
Copy link

elliotwutingfeng commented Aug 30, 2024

The new maplibre backend is still affected by the flickering issue as of 5.24.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog performance something is slow
Projects
None yet
Development

No branches or pull requests

4 participants