[Scilab-users] labels for 2 y-axes in plot

Samuel Gougeon sgougeon at free.fr
Thu Mar 2 23:19:53 CET 2017


Le 02/03/2017 à 22:44, Erhy a écrit :
> I'm a step forward.
> Only the colors of the labels and of the X-axis should to be adapted.

You get the handle of the parent axes. If it is the current axes, just do:
ax = gca();
Then the property for the X label is:
ax.x_label.font_foreground = color("red");
https://help.scilab.org/docs/6.0.0/en_US/axes_properties.html
https://help.scilab.org/docs/6.0.0/en_US/color.html

What do you mean by "the X-axis" ?
If you try to change the color *only of *-- say -- the x ticks, leaving 
y ticks unchanged, this is not possible, unless overlaying a fake 
identical axes or axis and playing with both.

If you try to have colored labels only for the x axis: same answer. This 
can also be performed by setting by hand colored LaTeXed labels. But in 
this case (manual setting), labels and related ticks will become fixed : 
they will no longer be recalculated while resizing the figure (unless 
implementing a dedicated gcf().resizefcn=".." callback (see help 
figure_properties)).

HTH
Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170302/1c0c6839/attachment.htm>


More information about the users mailing list