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

InsetMaps not properly shown with ipympl backend #214

Closed
raphaelquast opened this issue Dec 19, 2023 · 3 comments
Closed

InsetMaps not properly shown with ipympl backend #214

raphaelquast opened this issue Dec 19, 2023 · 3 comments
Labels
bug Something isn't working fixed in next version issue is already fixed and will be solved in the next release!

Comments

@raphaelquast
Copy link
Owner

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

Originally posted by @banesullivan in #62 (comment)

@raphaelquast raphaelquast added the bug Something isn't working label Dec 19, 2023
@raphaelquast raphaelquast added this to the EOmaps v7.4 milestone Dec 19, 2023
raphaelquast added a commit that referenced this issue Dec 19, 2023
…alse`

(this addresses problems with inset-maps reported in #214)
@raphaelquast
Copy link
Owner Author

@banesullivan Thanks again for reporting! This will be fixed in the next release!

@raphaelquast raphaelquast added the fixed in next version issue is already fixed and will be solved in the next release! label Dec 19, 2023
@raphaelquast raphaelquast linked a pull request Dec 19, 2023 that will close this issue
@banesullivan
Copy link
Contributor

Thanks for promptly addressing! I gave up on using ipympl after that... maybe I should try more?

raphaelquast added a commit that referenced this issue Dec 20, 2023
…alse`

(this addresses problems with inset-maps reported in #214)
@raphaelquast raphaelquast removed this from the EOmaps v7.4 milestone Dec 20, 2023
@raphaelquast raphaelquast removed a link to a pull request Dec 20, 2023
@raphaelquast
Copy link
Owner Author

@banesullivan Since I consider this a major issue, I decided to release a new bugfix-release for v7.3.

If you update to EOmaps v7.3.3, InsetMaps should work again as expected with ipympl!

... and to respond to your question "...maybe I should try more?"
Yes, I would definitely encourage you to give ipympl another chance!
Aside of the pending issues concerning glitches with very fast figure updates, all functionalities should work just fine and you get
a nice interactive map inside your Jupyter notebook!

If you also integrate the qt event-loop, you can even use the companion-widget with interactive ipympl maps!

%matplotlib widget
%gui qt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version issue is already fixed and will be solved in the next release!
Projects
None yet
Development

No branches or pull requests

2 participants