Hello Federico,
Le 20/08/2020 à 18:18, Federico Miyara a écrit :
Dear all,
When plotting some data the axes present ticks labelled with numbers.
However, the digits of the different numbers on the same axis may
differ, for instance 0.8, 0.9, 1, 1.1. It would be better if the
default presentation were 0.8, 0.9, 1.0, 1.1. Is there a way to set
this as a default?
Yes:
--> gca().ticks_format(1) = "%.1f";
Because of the bug 14790 <http://bugzilla.scilab.org/14790>, new ticks
labels are not rendered. But there is a work-around:
--> a = gca(); a.x_ticks.labels(1) = a.x_ticks.labels(1);
forces displaying new ticks labels.
As an expected side effect, this automatically sets a.auto_ticks(1) =
"off", but labels are well formatted.
Example:
x = 0:0.1:2;
plot(x,sin(5*x))
a = gca(); a.ticks_format(1) = "%.1f";
a.x_ticks.labels(1) = a.x_ticks.labels(1); HTH Samuel
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users