[scilab-Users] Customizing an Axis ...

Ginters Bušs ginters.buss at gmail.com
Thu Apr 21 11:12:35 CEST 2011


>
>  Hi,
>>
>> How does one change the matrix size of the x axis locations and the x axis
>> labels from inside a script?  I see how to do it by using the graphics
>> axes
>> editor which allows one to Insert new points.  For example, when I plot a
>> figure,
>> scilab chooses the ticks and subticks automatically.   Let's say the
>> resulting
>>  matrix is 6 by 1 -- I'd like to change it to 13 by 1
>> and specify new locations and labels to go with them but do it inside the
>> script....
>>
> The positions and labels must be changed in a once through
> the a.x_ticks tlist, in the following way (example):
> clf, plot2d()
> a = gca();
> a.x_ticks = tlist(["ticks" "locations"
> "labels"],(0:6)',["A";"B";"C";"D";"E";"F";"G"])
> // The first vector of strings  ["ticks" "locations" "labels"] is
> compulsory.
>
> Regards
> Samuel
>
>  While experimenting with

a = gca();
a.x_ticks = tlist(["ticks" "locations"
"labels"],(0:6)',["A";"B";"C";"D";"E";"F";"G"])

to make it shorter, I naively deleted locations (0:6)' like this:

a = gca();
a.x_ticks = tlist(["ticks" "locations"
"labels"],["A";"B";"C";"D";"E";"F";"G"])

and Scilab stopped responding.

Gin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110421/8d652637/attachment.htm>


More information about the users mailing list