# How to change plot unit or scale the number of axis?

I want to use ms instead of s as the unit of x-axis. But frameticks seems not to work here as it cannot change the value of x-axis.

How to replace the number of x-axis 0.0001 with 1 or 0.1? Or just scale the x-axis?

• Both of the answers below is working. Could I click accept to them both? Thank you guys. – Chad Meng Mar 26 '15 at 2:25
• However, I noticed that if we add "Frame -> True" in the program, they cannot work again. Do you have any idea to solve this? – Chad Meng Mar 26 '15 at 2:34

Here is a way to do what you are asking.

Before

Plot[Sin[200 Pi t], {t, 0., .01}]


After

Plot[Sin[200 Pi t], {t, 0., .01},
Ticks -> {{#, 1000 #} & /@ FindDivisions[{0., .01}, 5] // N, Automatic}]


### Update

This update is in response to the comment made by drabus.

It's annoying but frame ticks must be specified somewhat differently from axis ticks. So if you are framing the plot, do it this way:

Plot[Sin[200 Pi t], {t, 0., .01},
Frame -> True,
FrameTicks ->
{Automatic, {{#, 1000 #} & /@ FindDivisions[{0., .01}, 5] // N, Automatic}}]


framed

• However, I noticed that if we add "Frame -> True" in the program, they cannot work again. Do you have any idea to solve this? – Chad Meng Mar 26 '15 at 2:34
• Thanks very much. It is solved. – Chad Meng Mar 26 '15 at 2:41
• If you add a frame, then you need to control ticks with the FrameTicks option and drop the Ticks option. – m_goldberg Mar 26 '15 at 2:44
• I noticed the ticks below x-axis are intergers but with a dot behind may lead mistake to readers. Can anybody remove the dots? – Chad Meng Mar 26 '15 at 14:40
• @m_goldberg I got it right. It has to be like this: Frame -> True, FrameTicks -> {{Automatic, None}, {{#, 1000 #} & /@ FindDivisions[{0., .01}, 5] // N, None}} – drabus Jan 18 '18 at 10:13
Plot[x^2, {x, .0001, .0005},
Ticks -> {Table[{i, ToString[10000 i]}, {i, .0001, .0005, .0001}],
Automatic}
]

• Thanks for you, too. Your answer help me a lot when I just want the frameticks downside the frame instead of ticks appear on both upside and downside. – Chad Meng Mar 26 '15 at 2:52
• I noticed the ticks below x-axis are intergers but with a dot behind may lead mistakes to readers. Do you know how to remove the dots? – Chad Meng Mar 26 '15 at 15:09
• @Chad Meng Sure: Ticks -> {Table[{i, Round[10000 i]}, {i, .0001, .0005, .0001}] – David G. Stork Mar 26 '15 at 15:37
• Thanks a lot with your kindness. – Chad Meng Mar 26 '15 at 15:38