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

Adding colorbars with "inherit_position=False" does not work as expected #244

Closed
raphaelquast opened this issue May 23, 2024 · 0 comments · Fixed by #246
Closed

Adding colorbars with "inherit_position=False" does not work as expected #244

raphaelquast opened this issue May 23, 2024 · 0 comments · 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!

Comments

@raphaelquast
Copy link
Owner

Describe the bug

Using m.add_colorbar(inherit_position=False) only works if a colorbar already exists on the associated layer.

To Reproduce

m = Maps()
m.set_data([1,2,3], [1,2,3], [1,2,3])
m.plot_map()
m2.add_colorbar()

m2 = m.new_layer("my_layer", inherit_data=True)
m2.plot_map()
m2.add_colorbar(inherit_position=False)   # this does NOT create an independent colorbar!

Possible workaround:

m2.add_colorbar(inherit_position=False).remove()
m2.add_colorbar(inherit_position=False)
@raphaelquast raphaelquast added the bug Something isn't working label May 23, 2024
@raphaelquast raphaelquast added this to the v8.2.2 milestone May 23, 2024
@raphaelquast raphaelquast added the fixed in next version issue is already fixed and will be solved in the next release! label Jun 4, 2024
@raphaelquast raphaelquast linked a pull request Jun 4, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant