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

Fix IndexError: Make cb_label right length #201

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alxthor
Copy link
Contributor

@alxthor alxthor commented Mar 11, 2025

I think cb_label needs to be as long as number of plot panels otherwise one gets list index out of range for cb_label[cb_plt_idx[ii_valid]-1]

Maybe something similar needs to be done with streaml_dat in the line above?
I just tested this for my case:

I noticed the problem when using the hslice template to create a plot with one input path and one reference path. In the template cb_label is set to None, so cb_label would be later set to [None] which is a problem if the second plot panel tries to do_cbar and access the second element of cb_label.

cb_label needs to be as long as number of plot panels otherwise one gets
list index out of range for cb_label[cb_plt_idx[ii_valid]-1]
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

Successfully merging this pull request may close these issues.

1 participant