Specifying the y_ticks of my graphic by hand

Oliver Demetz olli at oliverdemetz.de
Mon Sep 1 13:09:46 CEST 2008


Hi,
have a graphic window like

    plot2d( linspace(0,2,5),linspace(0,3,5));

ok, now I would like to specify the ticks of the axis by hand:

    a=gca()

gives me

    a.y_ticks.locations = [0;0.5;1;1.5;2;2.5;3]
    a.y_ticks.labels = ["0.0";"0.5";"1.0";"1.5";"2.0";"2.5";"3.0"]

but if I would like to use these ticks:

    a.y_ticks.locations = [0;1;2;3]
    a.y_ticks.labels = ["a";"first";"test";"test"]

but it fails with a not really understandable error message.
I think the problem is that the *number* of ticks is different. 
Therefore, scilab refuses to change the vectors.

Please help!

Thanks in advance,
Oliver



More information about the users mailing list