2
$\begingroup$

I'm generating a figure using contourplot for my paper. The code is like this:

ContourPlot[(x*y)/(240*10^-6+0.01x*((y-240*10^-6))), {x, 0, 50}, {y, 7/10^10, 4.5/
  10^6}, ScalingFunctions -> {"Log", "Log", None}, Contours -> 100, 
 ContourStyle -> 
  Directive[GrayLevel[0], Opacity[0], AbsoluteThickness[0.005]], 
 ColorFunctionScaling -> True, 
 ColorFunction -> ColorData[{"ThermometerColors", {0, 1}}], 
 PlotLegends -> Automatic]

enter image description here

The contour it generated seems to have a strange upper limit due to the log scale of the figure. Because if I plot it with both X and Y axis being normal scale, it seems to be OK in terms of the upper limit. Normal scale plot:

ContourPlot[(x*y)/(
 240*10^-6 + ((y - 240*10^-6)*0.01*x)), {x, 0, 50}, {y, 7/10^10, 4.5/
  10^6}, ScalingFunctions -> {None, None}, Contours -> 100, 
 ContourStyle -> 
  Directive[GrayLevel[0], Opacity[0], AbsoluteThickness[0.005]], 
 ColorFunctionScaling -> True, 
 ColorFunction -> ColorData[{"ThermometerColors", {0, 1}}], 
 PlotLegends -> Automatic]

enter image description here

You can see if I use log scale the upper limit is about 0.018. But in the normal scale, the upper limit is 1.7.

What could be the problem? I'd like to use the Log scale for spreading up the values, can anyone help me to solve this issue to make the Z value for log scale figures also go to about 1.7?

Thank you so much!

$\endgroup$

1 Answer 1

4
$\begingroup$

Add the option PlotRange -> All:

ContourPlot[(x*y)/(240*10^-6 + 0.01 x*((y - 240*10^-6))), 
   {x, 0, 50}, {y, 7/10^10, 4.5/10^6}, 
 ScalingFunctions -> {"Log", "Log", None}, Contours -> 100, 
 ContourStyle -> Directive[GrayLevel[0], Opacity[0], AbsoluteThickness[0.005]], 
 ColorFunction -> "ThermometerColors", 
 PlotLegends -> Automatic, 
 PlotRange -> All]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.