0
$\begingroup$

I need to rescale the x-axis of a RegionPlot. I am trying to do the same thing of this question but with RegionPlot.

I had to rescale the y variable since the numbers involved in the functions I work with are very little, $\sim 10^{-7}$, and Mathematica had some problems in finding the maximum and in integrating. Now, In the region Plot I want to restore the correct scale.

So, for example, I have two functions

 f[x_] := 10^(-7) x^2
 g[x_] := 10^(-9) x^2 + 10^(-4)x^3

and I make the calculations using f[x/1000] and g[x/1000]. My functions are a little bit complicated and I use NIntegrate and NMaximize and the values are stored in a List. This is the reason why I don't just rescale the variable in the function. What I do is

RegionPlot[f[x/1000]>g[x/1000],{x,xmin,xmax}]

Now, I want to rescale the x axis of the region plot by a factor of 1000.

$\endgroup$
  • $\begingroup$ Please provide a minimal example involving RegionPlot to work on, not just throw one function which we don't exactly know what do you want to do with. $\endgroup$ – corey979 Dec 3 '16 at 9:31
  • $\begingroup$ You don't need to know what I have to do. The request is simple: how to rescale the x-axis of a regionPlot by an arbitrary factor. I have just provided an example to be more explicit but the function it's not necessary. $\endgroup$ – apt45 Dec 3 '16 at 9:39
  • $\begingroup$ How about you just label your axes in terms of 1000? $\endgroup$ – Feyre Dec 3 '16 at 13:44
  • 2
    $\begingroup$ Possible duplicate of How to change plot unit or scale the number of axis?. Not sure if you are aware, but asking people for help but telling them the problem is simple and they have no need to know what you wany may come across as impolite. $\endgroup$ – Yves Klett Dec 4 '16 at 8:15
1
$\begingroup$

Install the CustomTicks package and use the TickLabelFunction

Needs["CustomTicks`"]
f[x_] := 10^(-7) x^2
g[x_] := 10^(-9) x^2 + 10^(-4) x^3

RegionPlot[f[x/1000] > g[y/1000], {x, 0, 1000}, {y, 0, 100}, 
  FrameTicks -> {{LinTicks[#1, #2, 
  TickLabelFunction -> Function[x, x/1000]] &, 
  Automatic}, {LinTicks[#1, #2, 
  TickLabelFunction -> Function[x, x/1000]] &, Automatic}}]

enter image description here

$\endgroup$

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