How to Rescale the Horizontal Axis in Mathematica?

  • Context: Mathematica 
  • Thread starter Thread starter Anna Kaladze
  • Start date Start date
  • Tags Tags
    Axis Mathematica
Anna Kaladze
Messages
34
Reaction score
0
Hi All,

I have some simple Mathematica commands:

f[x_]=x^2+3*x-1

Plot[f[x],{x,0,10}]

Now, I need to "rescale" the horizontal axis of the resulting graph, so that number 25 is added to its value (i.e., the horizontal axis would take the starting value 25 (in place of 0) and 35 (in place of 10), and everything in between similarly. I do not want the position/value of the f[x] itself change. How do I achieve that?

Thanks a lot.

Anna.
 
on Phys.org
I am guessing a little bit here about what you want.

Try this
f[x_]:=x^2+3*x-1;Plot[f[x],{x,-5,5}]

Then try this
Plot[f[x],{x,-5,5},Ticks->{{{-4,21},{-2,23},{2,27},{4,29}},Automatic}]

and see if that is what you are asking for
 
Try:
Plot[f[x-25],{x,25,35}]
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K