Bug introduced in 9.0 or earlier and persisting through 11.0.1 or later
Consider this ContourPlot
ContourPlot[.05 - .005 (x^2 + y^2), {x, -12, 12}, {y, -12, 12},
PlotRange -> {-2, 2},
Contours -> 20,
PlotLegends -> Automatic]
Clearly the color bar is wrong, assigning the region with the highest value to have the same color as the lowest value.
This problem goes away if you set the PlotRange-> All
option, or if you set PlotRange-> {-2,x}
where x
is any number lower than 0.31 (e.g. 0.309999).
What is causing this behavior? Is it a bug?
dataSlice3Adj
we can't really try to reproduce the plot. What happens when you replacePlotRange -> {-2, 2}
withPlotRange -> All
and replacePlotLegends -> BarLegend[Automatic, All]
withPlotLegends -> Automatic
? $\endgroup$AdjustOriginX
,CenterY
, andNormalizeValues
. Basically, if we can get it so we can reproduce the problem you are having, we can see why it's doing that. But if we can't, then it's pretty hard to help $\endgroup$0.05 - 0.005 (x^2 + y^2)
as the function to be plotted. $\endgroup$