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

lbLabelStrings #26

Open
zhuguodong98 opened this issue Nov 17, 2019 · 2 comments
Open

lbLabelStrings #26

zhuguodong98 opened this issue Nov 17, 2019 · 2 comments

Comments

@zhuguodong98
Copy link

zhuguodong98 commented Nov 17, 2019

Hello!!!
when I used 'Ngl.contour_map', the lbLabelStrings was useless.
Such as :
cnres.cnExplicitLabelBarLabelsOn = True
cnres.lbLabelStrings = ['0','0.1','0.2','0.3','0.4','0.5','0.6','0.7','0.8','0.9','1.0']
But didn't work.

@stavrosdafis
Copy link

Have you found a solution? I am also struggling to overcome this.

res.cnExplicitLabelBarLabelsOn = True
res.lbLabelStrings = ["Low","Moderate","High","Very \n High","Extreme"]

@stavrosdafis
Copy link

Ok, I found the solution. First, the plot must be generated and then change the strings. Weird..

res2 = Ngl.Resources()
res2.lbLabelStrings = ["Low","Moderate","High","Very \n High","Extreme"]
Ngl.set_values(plot.contour,res2)

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