How to Rescale the Horizontal Axis in Mathematica?

  • Context: Mathematica 
  • Thread starter Thread starter Anna Kaladze
  • Start date Start date
  • Tags Tags
    Axis Mathematica
Click For Summary
SUMMARY

The discussion focuses on rescaling the horizontal axis in Mathematica plots. The user, Anna, seeks to adjust the x-axis values from a range of 0 to 10 to a new range of 25 to 35 without altering the function's output. The solution involves using the command Plot[f[x-25],{x,25,35}] to achieve the desired effect, effectively shifting the x-values while maintaining the function's integrity.

PREREQUISITES
  • Familiarity with Mathematica syntax and functions
  • Understanding of plotting functions in Mathematica
  • Basic knowledge of function transformations
  • Experience with axis manipulation in graphical representations
NEXT STEPS
  • Explore advanced plotting techniques in Mathematica
  • Learn about function transformations in Mathematica
  • Investigate the use of Ticks option for custom axis labeling
  • Study the implications of shifting functions on graph interpretation
USEFUL FOR

Mathematica users, data analysts, and educators looking to enhance their graphing skills and understand axis manipulation techniques in mathematical visualizations.

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.
 
Physics news 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
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · 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