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

Boxfill legend incorrect when there are fewer colors than levels #1894

Closed
chaosphere2112 opened this issue Mar 25, 2016 · 2 comments
Closed

Boxfill legend incorrect when there are fewer colors than levels #1894

chaosphere2112 opened this issue Mar 25, 2016 · 2 comments
Assignees
Milestone

Comments

@chaosphere2112
Copy link
Contributor

@chaosphere2112 chaosphere2112 commented Mar 25, 2016

When you plot a boxfill and use the color_1 and color_2 attributes (but leave level_1 and level_2 alone), the legend doubles up for the last level color. Also, the labeling on the legend is excessive (we probably don't need 10+ labels when there are only 4 levels).

import vcs, cdms2
f = cdms2.open(vcs.sample_data + "/clt.nc")
s = f("clt")
x = vcs.init()
box = vcs.createboxfill()
# Set them to the obnoxious end of the colormap so we can see the steps between each color
box.color_1 = 242
box.color_2 = 246
x.plot(s, box)

results in:

out

I've got a PR incoming to fix this.

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented May 4, 2016

@chaosphere2112 ia that finished?

@chaosphere2112
Copy link
Contributor Author

@chaosphere2112 chaosphere2112 commented May 4, 2016

@doutriaux1 I've been waiting for feedback from you and @aashish24 for 2 weeks

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

Successfully merging a pull request may close this issue.

None yet
4 participants