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

change color bar length #88

Open
GangLiTarheel opened this issue Sep 13, 2024 · 3 comments
Open

change color bar length #88

GangLiTarheel opened this issue Sep 13, 2024 · 3 comments

Comments

@GangLiTarheel
Copy link

Hi,

Very nice package! I am trying to change one of my color bars. Make it range larger than the default. Is this some feature the package already has? I could not find this in the template.
image

An ideal result would look like this:
https://proplot.readthedocs.io/en/latest/colorbars_legends.html

While some annotations just need the fixed length as the package's default, some color bars might use the whole/half y/x axis.

Best,
Gang

@DingWB
Copy link
Owner

DingWB commented Sep 18, 2024

Hi @GangLiTarheel ,

Usually, there are many legends to plot, including main heatmap cmap legend and other annotation legends. The length of cmap legend was hard-coded to be 15 mm:

15 * mm2inch * ax.figure.dpi / ax.figure.get_window_extent().height

What you proposed is a good point. However, I don't know how to implement the whole axis colorbar without affecting the current layout. For example, when there are many legends to plot, if we plot one of the legends spanning the whole axis, then how about the other legends? Please let me know if you have a good idea.

@GangLiTarheel
Copy link
Author

Hi @DingWB ,

Thank you for your responses! I think ideally, it will be nice to have two separate columns of annotations. For example, main heatmap annotation span the whole axis for one column; and the column annotation for a separate column or on the bottom of figure.

Besides, it might be good to put 15 as a parameter for user to control.

Best,
Gang

@DingWB
Copy link
Owner

DingWB commented Sep 19, 2024

Thank you. I will think about it and collect some ideas from other users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants