How can i change my axis on a plot to be fix numbers with 3 decimal places? Right now my x axis or y axis are 6.21321e6 but i want it to be fix like 42141321.323

X = [ XW1, XPKP1, XKKP1, XSLK, XKKP2, XPKP2,XW3];
Y = [YW1,YPKP1, YKKP1, YSLK, YKKP2, YPKP2,YW3];
app.UIAxes.Visible ='on';
plot(app.UIAxes,Y,X,'*-');
app.SzkicButton.Enable= 'off';

 Risposta accettata

app.UIAxes.XAxis.TickLabelFormat = '%.3f';
app.UIAxes.YAxis.TickLabelFormat = '%.3f';

4 Commenti

I still have 2,54324 *10^6 and i want it to be the whole number without *10^6
X = [ XW1, XPKP1, XKKP1, XSLK, XKKP2, XPKP2,XW3];
Y = [YW1,YPKP1, YKKP1, YSLK, YKKP2, YPKP2,YW3];
app.UIAxes.Visible ='on';
plot(app.UIAxes,Y,X,'*-');
app.UIAxes.XAxis.TickLabelFormat = '%.5f m';
app.UIAxes.YAxis.TickLabelFormat = '%.5f m';
app.SzkicButton.Enable= 'off';
% code
end
Try
app.UIAxes.XAxis.Exponent = 0;
app.UIAxes.YAxis.Exponent = 0;

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Develop Apps Using App Designer in Centro assistenza e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by