[scilab-Users] Tick marks inside plot
sgougeon at free.fr
sgougeon at free.fr
Fri Mar 2 22:44:28 CET 2012
Hello,
----- Mail original -----
>De: "cascodo" <angel at ing.puc.cl>
>À: users at lists.scilab.org
>Envoyé: Mercredi 29 Février 2012 21:55:30
>Objet: [scilab-Users] Tick marks inside plot
>
>Hello
>
>I am trying to position tick marks inside the plot box. Is this possible?
AFAIK, the only way to do that is to cancel the default axes
and to draw some customized ones with drawaxis(). An example
is given below. Since drawaxis() is bugged in logarithmic mode,
this is only possible for linear axes.
Regards
Samuel
-----------
clf
plot2d()
ax = gca();
ax.axes_visible = ["off" "off" "off"];
db = ax.data_bounds;
// Customized X axis
y = db(1,2);
Loc = ax.x_ticks.locations;
i = find(Loc>=db(1,1) & Loc<=db(2,1));
Lab = ax.x_ticks.labels';
drawaxis(dir="u",tics="v", x=Loc(i), y=y, val=Lab(i), sub_int=2, fontsize=2);
// Customized Y axis
x = db(1,1);
Loc = ax.y_ticks.locations;
i = find(Loc>=db(1,2) & Loc<=db(2,2));
Lab = ax.y_ticks.labels';
drawaxis(dir="r",tics="v", y=Loc(i), x=x, val=Lab(i), sub_int=2, fontsize=2);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20120302/ac6c8972/attachment.htm>
More information about the users
mailing list