TransWikia.com

Strange limitation of Z value of contour plot

Mathematica Asked on June 7, 2021

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!

One Answer

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

Correct answer by kglr on June 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP