3
$\begingroup$

Consider some function f[x,y]. I need to plot region of values f[x,y]>=1, with normal scaling for y and with log log scaling for x. I.e., something like LogLogPlot[f[x,y],{x,x1,x2}] for fixed y. However, I don't know the command for RegionPlot[f[x,y]>=1,{x,x1,x2},{y,y1,y2}] allowing me to plot x in log log scale.

Can anyone help me please?

Precisely, I need to plot the region

ldecay[mN_, U_] = 0.625/(U*mN^6);
f[mN_,U_]=3.6*10^9*U*(Exp[-100*Sqrt[2]/(ldecay[mN, U])] - 
   Exp[-(100*Sqrt[2] + 45)/(ldecay[mN, U])])

for $10^{-9} < U < 10^{-1}$ and $1<mN<20$, with $mN$ axis being in log log scale.

$\endgroup$
3
$\begingroup$

manually work in terms of the log:

RegionPlot[f[mN, 10^logu] >= 1, {logu, -9, -1}, {mN, 1, 20}, 
    FrameTicks -> {{Automatic, None}, 
                   {{#, N[10^#]} & /@ Range[-9, -1],  None}},
    PlotPoints -> 100]

enter image description here

Edit. LogLog plot:

RegionPlot[
 f[10^lmN, 10^logu] >= 1, {logu, -9, -1}, {lmN, 0, Log[10, 20]}, 
 PlotPoints -> 100, FrameLabel -> {"Log10 u", "Log10 mN" }]

enter image description here

$\endgroup$
  • $\begingroup$ Thank you! But this is not exactly what I need. The problem is that instead of U on x axis I'm dealing with log U variable. This is crucial when I need to interpret the values of U (say, for "simple" U = 5 I need to find "complicated" log U 0.69 on x axis). This problem is absent when considering LogLogPlot. $\endgroup$ – John Taylor Mar 19 '18 at 16:11
  • $\begingroup$ just remove the FrameTicks option, you will get -9,-8,..-1 for the x axis ( "log u" ) $\endgroup$ – george2079 Mar 19 '18 at 16:45
  • $\begingroup$ Thank you very much! Could you please also tell me why when plotting with axes {mN, 1, 20}, {logu, -9, -1} instead of {logu, -9, -1}, {mN, 1, 20} the values on mN axis aren't displayed? $\endgroup$ – John Taylor Mar 19 '18 at 17:11
  • $\begingroup$ If you are manually specifying FrameTicks its easy to get it wrong and end up with no ticks. Usually leave the FrameTicks option out until you get the plot the way you want, then add that if needed. $\endgroup$ – george2079 Mar 19 '18 at 20:22

Your Answer

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

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