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

vmax and ticks #38

Closed
w-yuxuan opened this issue Nov 7, 2023 · 2 comments
Closed

vmax and ticks #38

w-yuxuan opened this issue Nov 7, 2023 · 2 comments

Comments

@w-yuxuan
Copy link

w-yuxuan commented Nov 7, 2023

Dear Dr. Tsirkin,
Thank you for building the amazing bandup package!

When the vmax is less than 1, I noticed that the color bar doesn't show the upper range like attached. Is there a setting for it to show fraction like 0.4? I tried adding: --cb_label --round_cb 2 --disable_auto_round_vmin_and_vmax

Can I make the code display the greek letter gamma? I notice the issue only when I have discontinuities like U,K.
I tried // Gamma too. Thank you so much!
0k-4 0to4

@stepan-tsirkin
Copy link
Member

Dear @w-yuxuan

First of all, BandUP was developed by @paulovcmedeiros , I just collaborated. Unfortunately, Paulo does not actively maintain the project anymore. Later, I developed a similar tool (but fully in python) banduppy : https://github.com/band-unfolding/banduppy/tree/master/banduppy Could you try that, and say if it works for you? I am able to provide a better support for banduppy.

About v-ticks in colorbar, looks like it is hard-coded to be integers:

cb_yticks = np.arange(int(image.norm.vmin), int(image.norm.vmax) + 1, 1)
cb_ytick_labels = [round(item,abs(args.round_cb)) for item in cb_yticks]

So, you will need to modify line 735 to your taste, smth like

cb_yticks = np.linspace(image.norm.vmin, image.norm.vmax + 1, 5) 

Regarding Greek letters, there should not be a problem with matplotlib : https://matplotlib.org/stable/users/explain/text/mathtext.html Did you try to give it as "$\Gamma$"

Please, tell me if this works.

Note: banduppy also has a plotting routine, but much simpler (less options, but easier to understand and modify)

https://github.com/band-unfolding/banduppy/blob/160a60257201c708a6f68809ba13c2a8dd64c34e/banduppy/unfolding_path.py#L165-L222

@w-yuxuan
Copy link
Author

thank you so so much for pointing me to the specific line!! Unfortunately it didn't work but "!G " worked. The vmax ticks line worked very well and this is what I ended up to make it even better: cb_yticks = np.linspace(image.norm.vmin, image.norm.vmax, 5, endpoint=True).
Thanks for your quick support again!!

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