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

fast figure-updates in jupyter-notebooks can cause glitches #62

Open
raphaelquast opened this issue Mar 25, 2022 · 2 comments
Open

fast figure-updates in jupyter-notebooks can cause glitches #62

raphaelquast opened this issue Mar 25, 2022 · 2 comments
Labels
external issue Issue is caused by issues in one of eomaps dependencies

Comments

@raphaelquast
Copy link
Owner

Sometimes images are not updated fast enough so that artefacts of animated artists remain after blitting...

@raphaelquast raphaelquast added the external issue Issue is caused by issues in one of eomaps dependencies label Mar 25, 2022
@banesullivan
Copy link
Contributor

I've been having some fun with EOmaps and was trying to use the ipympl MPL backend and see this for an example from the docs. I'm curious if the difference I'm seeing here is due to this?

from eomaps import Maps
m = Maps(Maps.CRS.PlateCarree(central_longitude=-60))
m.add_feature.preset.ocean()

m_i = m.new_inset_map(xy=(5, 45), radius=10,
                      plot_position=(.3, .5), plot_size=.7,
                      boundary=dict(ec="r", lw=4),
                      indicate_extent=dict(fc=(1,0,0,.5),
                                           ec="r", lw=1)
                      )
m_i.add_indicator_line(m, c="r")

m_i.add_feature.preset.coastline()
m_i.add_feature.preset.countries()
m_i.add_feature.preset.ocean()
m_i.add_feature.cultural.urban_areas(fc="r", scale=10)
m_i.add_feature.physical.rivers_europe(ec="b", lw=0.25,
                                       fc="none", scale=10)
m_i.add_feature.physical.lakes_europe(fc="b", scale=10)
ipympl inline
Screenshot 2023-12-17 at 11 54 39 AM download

@raphaelquast
Copy link
Owner Author

@banesullivan Woha, this should not happen... It is in fact a issue in EOmaps itself and not related to blitting problems in ipympl. (I'll track it in #214) ...Thanks for reporting!

The problem with blitting really only concerns very fast screen updates (e.g. callbacks that draw on mouse-movement).
There seems to be a race-condition somewhere in the backend that causes a mixup in the order of received
diff-images... and this in turn causes plot-artefacts from previous diff-images to remain on screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external issue Issue is caused by issues in one of eomaps dependencies
Projects
None yet
Development

No branches or pull requests

2 participants