Filter löschen
Filter löschen

how to fix the scale in the output window

7 Ansichten (letzte 30 Tage)
Rohit Thokala
Rohit Thokala am 15 Feb. 2024
Bearbeitet: VBBV am 15 Feb. 2024
I have created a plot in matlab but don't know how to fix the scale on the axes. I want to scale axes in centimeters and attahced picture for reference. Thanks in advance

Akzeptierte Antwort

Aquatris
Aquatris am 15 Feb. 2024
Bearbeitet: Aquatris am 15 Feb. 2024
You need to be more specific for a better answer but here is my attempt:
  • If you just want to see x axis from -0.1 to 0.1 then you can call xlim([-0.1 0.1]) function for instance. similarly yaxis can be ylim([-0.1 0.1])
  • If your data is in micrometer and you want to plot in cm, you should just scale your data to the units and then call the plotting function. For instance instead of plot(x,y) you would call plot(x*1e-4,y*1e-4)
  • If you want your Droplet Diameter colorbar to go from 30 to 70 for instance, then you can call caxis([30 70]), which will remove the difference for points below 30 and points above 70 though.
  4 Kommentare
VBBV
VBBV am 15 Feb. 2024
Bearbeitet: VBBV am 15 Feb. 2024
No, when x and y are in micrometres , you need to multiply with 1e4 which results in 1e-2 m i.e 1 cm, because 1 micron is 1e-6 m
Aquatris
Aquatris am 15 Feb. 2024
Bearbeitet: Aquatris am 15 Feb. 2024
I dont get your point. Using your example, if x has a value of 1 mikrometer, and you want to show it in cm, if you multiply it with 1e4, you end up with 1e4 cm, which seems quite interesting.
Well, OP got his answer so no need to discuss further :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by