Mathematica: How to change units od axis

In summary, to change the units of the axis in Mathematica, you can use the "PlotRange" option with the desired units. You can also use the "UnitConvert" function to convert to custom units and label the axis with the "FrameLabel" option. Additionally, the "FrameTicks" option allows you to change the units for just one axis. If you want to change the units after plotting, you can use the "Show" function to modify the plot without recreating it.
  • #1
brunoxy1
2
0
Hello,

I would like to know, how can I change units showed in axis. I would like to change those relative units (20000, 40000...) to μm. The conversional relation is 50 = 1μm, so instead 20000, 40000 i would like to have 400μm, 800μm. I enclose picture where it should be more clear what I am trying to achieve.

Thank you very much for your help
 

Attachments

  • impression mark.jpg
    impression mark.jpg
    23.3 KB · Views: 548
Physics news on Phys.org
  • #2
You can set thick manually:
e.g.

Code:
Plot3D[Sin[(x y)/10], {x, 0, 100 Pi}, {y, 0, 100 Pi}, 
Ticks -> {{{0, "o"}, {100, "1m"}, {200, "2m"}, {300, "3m"}}, 
       {0, 100 Pi/2, 100 Pi}, {{-1, "A"}, {0, "B"}, {1, "C"}}}]
 
  • #3
I did that, I found out yesterday:)
 

1. How do I change the units of the axis in Mathematica?

To change the units of the axis in Mathematica, you can use the "PlotRange" option with the desired units. For example, "PlotRange -> {0, 10, 1} will set the axis to range from 0 to 10 with an increment of 1.

2. Can I change the units of the axis to a custom unit?

Yes, you can change the units of the axis to a custom unit by using the "UnitConvert" function. This function allows you to convert from one unit to another, giving you the flexibility to use any unit you prefer.

3. How do I label the axis with the new units?

To label the axis with the new units, you can use the "FrameLabel" option. This will add labels to the x and y axis, which you can customize to include the desired units.

4. Can I change the units for only one axis in Mathematica?

Yes, you can change the units for only one axis in Mathematica by using the "FrameTicks" option. This option allows you to specify the units for each axis individually.

5. What if I want to change the units of the axis after I have already plotted my data?

If you want to change the units of the axis after you have already plotted your data, you can use the "Show" function. This function allows you to modify any aspect of the plot, including the units of the axis, without having to recreate the entire plot.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
399
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
5K
  • Classical Physics
Replies
7
Views
779
  • Computing and Technology
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
737
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
  • Electromagnetism
Replies
5
Views
954
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • Introductory Physics Homework Help
Replies
14
Views
1K
Back
Top