Thread Closed

Changing x-axis in Mathematica

 
Share Thread Thread Tools
Oct1-10, 11:33 PM   #1
 

Changing x-axis in Mathematica


Hi guys
I am trying to plot a function with respect to T, but I want to rescale my axis.
For example my range right now shows 0, 10, 20, 30. But I want it to show 0, 1, 2, 3 and so that I can then put an x-axis label of T/10.
Can anyone help?
 
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> Hong Kong launches first electric taxis
>> Morocco to harness the wind in energy hunt
>> Galaxy's Ring of Fire
Oct2-10, 03:34 AM   #2
 
Recognitions:
Homework Helper Homework Help
Try with:

Plot[function, {x, 0, 3}, AxesLabel -> {T/10, y-label}]
 
Oct2-10, 03:41 AM   #3
 
Here's a function that has zeros at x=10 and x=20.
Code:
f[x_]:=(x-10)(x-20)
and it's normal plot
Code:
Plot[f[x],{x,0,30},AxesLabel->{x,f}]
Here's two different ways to change the x-axis units to x/10:
Code:
Plot[f[10x],{x,0,3},AxesLabel->{x/10,f}]
Code:
Plot[f[x],{x,0,30},Ticks->{Table[{i,i/10.},{i,0,30,5}],Automatic},AxesLabel->{x/10,f}]
 
Oct2-10, 10:30 AM   #4
 

Changing x-axis in Mathematica


Thanks so much!
I like that last option Simon_Tylor, it keeps the function the same. Up until now the only thing I could think of was changing the x inside the function like you did in your first example..
 
Oct3-10, 04:45 AM   #5
 
Not a problem olietc!
 
Thread Closed
Thread Tools


Similar Threads for: Changing x-axis in Mathematica
Thread Forum Replies
gear basics - changing axis of rotation Mechanical Engineering 14
changing the y axis range in a TH1F in root Programming & Comp Sci 1
Changing evaluation of an axis on a triple integral General Math 1
Is the Earth's Axis Changing or is that just an illusion? Earth 16
Changing axis of a rotating wheel Introductory Physics Homework 0