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

Comments

Projects
None yet
4 participants
@chaosphere2112
Contributor

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

This comment has been minimized.

Member

doutriaux1 commented May 4, 2016

@chaosphere2112 ia that finished?

@chaosphere2112

This comment has been minimized.

Contributor

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