1
$\begingroup$

How can I do a region plot with its mesh function in Log scale?

For example,

xlabel = "B";
ylabel = "A";

test = 
  RegionPlot[A > B, {B, 10^-5, 0.1}, {A, 0.001, 0.1}, 
    Axes -> False, 
    Frame -> True, 
    FrameLabel -> {xlabel, ylabel}, 
    FrameStyle -> 
      Directive[Thickness[0.004], Bold, FontFamily -> "Times New Roman", Black, 12], 
    BoundaryStyle -> Directive[Brown, Thick, Dashed], 
    PlotStyle -> Transparent, 
    Mesh -> 20, 
    MeshStyle -> Directive[Brown, Dotted, Thickness[0.007]]];

Show[
  test /. 
    GraphicsComplex[c_, prims___] :> 
      GraphicsComplex[{Log @ #, Log @ #2} & @@@ c, prims],
  FrameTicks -> 
    {{Charting`ScaledTicks[{Log, Exp}], Charting`ScaledFrameTicks[{Log, Exp}]}, 
     {Charting`ScaledTicks[{Log, Exp}], Charting`ScaledFrameTicks[{Log, Exp}]}}, 
  PlotRange -> All, 
  ImageSize -> 300]

gives region plot in Log scale, but the mesh functions are modified too from the original one,

RegionPlot[A > B, {B, 10^-5, 0.1}, {A, 0.001, 0.1}, 
  Axes -> False, 
  Frame -> True, 
  FrameLabel -> {xlabel, ylabel}, 
  FrameStyle -> 
    Directive[Thickness[0.004], Bold, FontFamily -> "Times New Roman", Black, 12], 
    BoundaryStyle -> Directive[Brown, Thick, Dashed], 
  PlotStyle -> Transparent, 
  Mesh -> 20, 
  MeshStyle -> Directive[Brown, Dotted, Thickness[0.007]]]
$\endgroup$
0
$\begingroup$

Use MeshFunction with logarithmic arguments.

$\endgroup$
  • $\begingroup$ it is working now.. thanks $\endgroup$ – tdj Dec 30 '18 at 13:01

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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