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

Creating colorbars on not yet visible layers results in axes size changes and requires re-draw of all cached layers! #245

Open
raphaelquast opened this issue May 23, 2024 · 0 comments · May be fixed by #246
Labels
bug Something isn't working fixed in next version issue is already fixed and will be solved in the next release! temporary fix available There is a workaround available until a proper fix is released
Milestone

Comments

@raphaelquast
Copy link
Owner

Describe the bug
Cached layers must be re-drawn if a new colorbar is added that results in a change of the axes-sizes.

To Reproduce

from eomaps import Maps
m = Maps()
m.add_feature.preset.ocean()
m.f.canvas.draw()   # to draw and cache the layer

m2 = m.new_layer("not yet visible layer")
m2.set_data([1,2,3], [1,2,3], [1,2,3])
m2.plot_map(set_extent=False)
m2.add_colorbar()

Possible workaround:

Trigger an explicit re-draw after adding the colorbar

m.redraw()
@raphaelquast raphaelquast added bug Something isn't working temporary fix available There is a workaround available until a proper fix is released labels May 23, 2024
@raphaelquast raphaelquast added this to the v8.2.2 milestone May 23, 2024
@raphaelquast raphaelquast linked a pull request Jun 4, 2024 that will close this issue
@raphaelquast raphaelquast added the fixed in next version issue is already fixed and will be solved in the next release! label Jun 4, 2024
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! temporary fix available There is a workaround available until a proper fix is released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant