-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
[FR] symmetric contour levels, the ability to ignore the actual values. #4807
Comments
Setting |
Indeed! Thanks, but I didn't mean to use this issue tracker as if it were a help forum! But, this indicates that there is another bug. Let's use this modified example: using Plots
#plotly() # GR doesn't support open ended contour levels
xs=-5:1:5
ys=-5:1:5
var = [ x^2 + y^2 - 15.0 for x in xs, y in ys]
#p = contourf(xs, ys, var; color=:redsblues, levels=-20:10:20)
p = contourf(xs, ys, var; color=:redsblues, clims=(-20,20) )
display(p) With GR,
I think I reported issue 1 as a separate bug. Should I report issue 2 as well? With Plotly,
So, I guess that GR should be modified to behave exactly like Plotly in this regard? |
I'd say that is pretty much the same as #4805, no? |
I don't think so. #4805 is just a "nice features to have". It's not a bug. But issue 2 above is a bug. The following plot indicates that all the values are within the range -20 < z < 20: using Plots
xs=-5:1:5
ys=-5:1:5
var = [ x^2 + y^2 - 15.0 for x in xs, y in ys]
p = contourf(xs, ys, var; color=:redsblues, clims=(-20,20) )
display(p) The fact is the variable includes values larger than 20. If you compare the plot and the colarbar, you'll see that the color for 15 < z < 20 is used to plot z > 20. I would say this colorbar is incorrect. For this reason, this plot cannot be used in a scientific paper. |
So, I've just created a new issue: #4813 |
I often need to plot positive and negative values with reddish and bluish colors because the signs are important; also I need to respect the magnitude (I mean, for example, "3" and "-3" should have red and blue colors with the "same" "strength". There are well designed color palettes like
redsblues
suitable for this task, except that thecontour()
function doesn't allow the user to specify symmetric contour levels:Here I want the contour levels to be
[-40, -30, . . ., 0, . . . , 30, 40]
but the contour function overrides my wish and adjusts the contour levels to the actual value range of the variable, which is -15 < z < 35.The text was updated successfully, but these errors were encountered: