1

I want to plot a RegionPlot in LogLinear scale. If I try with a simple linear scale,

pl = RegionPlot[T < (15.4)^(1/n)*0.001, {T, 0.001, 1000}, {n, 0, 4}, 
Ticks -> {ScientificForm[#], Automatic}, AxesLabel -> {T, n},
Method -> "ScalingFunctions" -> {Automatic, Automatic}]

I obtain this plot (which seems to be ok)

enter image description here

If I try to switch the x-axis to a Log10 scale in this way:

pl = RegionPlot[T < (15.4)^(1/n)*0.001, {T, 0.001, 1000}, {n, 0, 4}, 
Ticks -> {ScientificForm[#], Automatic}, AxesLabel -> {T, n},
Method -> "ScalingFunctions" -> {"Log10", Automatic}]

I obtain the ugly picture

enter image description here

which is definitely not what I want.

If I try to use the suggestion provided in RegionPlot with LogScale using

loglinearRegionPlot[rplot_] := Module[{pts, pgon},
pts = Cases[Normal@rplot, Line[a__] :> a, Infinity];
pgon = {EdgeForm[],
    Directive[RGBColor[0.368417, 0.506779, 0.709798],
     AbsoluteThickness[1.6], Opacity[0.3]],
    Cases[Normal@rplot, Polygon[_], Infinity]};
  ListLogLinearPlot[pts,
   Joined -> True, Frame -> True,
   PlotRange -> All, AspectRatio -> 1,
   Axes -> False, PlotStyle -> ColorData[1][1], 
   Epilog -> (pgon /. {x_?NumericQ, y_?NumericQ} :> {Log@x, y})]]

pl = loglinearRegionPlot@
RegionPlot[T < (15.4)^(1/n)*0.001, {T, 0.001, 1000}, {n, 0, 4},
Ticks -> {ScientificForm[#], Automatic},
AxesLabel -> {T, n}]

I obtain

enter image description here

which is pretty close to what I want, but it doesn't show a nice hyperbole, but those sharpy and polygonal lines and a rectangular shape between 0.01 and 0.1...

What can I do? Thank you!

Lele
  • 428
  • 2
  • 10

1 Answers1

2

It seems that ScalingFunctions are not supported by RegionPlot. So, one idea is to include the transformation in your inequality (that is, replace T with 10^T) and plot from Log10[.001] to Log10[1000]. This will produce the desired shape, but the ticks will be wrong. So, you will need to provide the correct ticks as well:

RegionPlot[
    10^T < (15.4)^(1/n) 0.001,
    {T, -3, 3}, 
    {n, 0, 3},
    AxesLabel -> {T,n},
    FrameTicks->{
        Automatic,
        {Charting`ScaledTicks["Log10"],Charting`ScaledFrameTicks[{Log10,10^#&}]}
    },
    PlotRange->All
]

enter image description here

Carl Woll
  • 130,679
  • 6
  • 243
  • 355