0
$\begingroup$

I'm plotting reflectivity, transmission and absorption data as a function of wavelength and angle on a ContourPlot. I want all the plots to be between 0 and 1 for comparison. However, some of the plot have data < 1 in all regions, and so the data will only plot between the lowest and the highest value.

I'm plotting the data using:

ContourPlot[Evaluate[{Absp}, {A0, 0.0, 90.0}, {lam, 300, 2000}], 
 PlotLabel -> "", 
 FrameLabel -> {"Angle (\[Degree])", "Wavelength (nm)"}, 
 ContourStyle -> Opacity[0.04], ColorFunction -> "TemperatureMap", 
 Frame -> {True, True, True, True}, 
 PlotRange -> {{10, 80}, {900, 2000}, {0, 1}}, 
 PlotRangePadding -> None, Contours -> 150, ContourLabels -> None, 
 PlotLegends -> Automatic, MaxRecursion -> 3]

As you can see, I've attempted to set the PLotRange for the z data to {0,1}, but the data persists in plotting between the lowest and highest values. (See attached image)

How can I force this to be plotted between 0 and 1?

enter image description here

$\endgroup$
  • 2
    $\begingroup$ 1. What is Absp? 2. Try ColorFunctionScaling -> False, since you said that it's guaranteed your heights are within $[0,1]$. $\endgroup$ – J. M. will be back soon Mar 29 '18 at 14:25
  • $\begingroup$ Try to use Scale[] $\endgroup$ – OkkesDulgerci Mar 29 '18 at 14:25
  • $\begingroup$ PlotRange does not scale the respective variables in their corresponding ranges; it simply uses the specified ranges when displaying the plot; since using ScalingFunctions doesn't seem to amount to much (or I couldn't make it work) perhaps you should consider Rescale-ing your data before plotting them $\endgroup$ – user42582 Mar 30 '18 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.