[scilab-Users] 2d plot
Serge Steer
Serge.Steer at inria.fr
Fri Aug 19 09:23:07 CEST 2011
Le 18/08/2011 14:32, scilabuser a écrit :
> Hi,
>
> I am trying to plot a set of data points (2D or 3D feature points),
> where each points is marked by a different number (typically the index
> of the vector) .
>
> More precisely, I am used to call plot2d this way:* *
> *
> *
> *-->scf() ; plot2d(attrib_point(1,:), attrib_points(2,:) , style = -1) ;*
> *
> *
> Which gives a plot where all points are marked by a '+' .
> Now instead of the '+', I would like to have each point to be
> marked differently, ie by '1', '2', '3',... , ie their index in
> the attrib_point(1,:) vector .
>
> Any solution ?
> Thanks in advance .
>
> Caroline
>
> ------------------------------------------------------------------------
> View this message in context: 2d plot
> <http://mailinglists.scilab.org/2d-plot-tp3264708p3264708.html>
> Sent from the Scilab users - Mailing Lists Archives mailing list
> archive
> <http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html>
> at Nabble.com.You can use cstring for that
You can use xstring for that:
2D example
x=1:10;y=x^1.5;
clf;plot(x,y,'+')
for k=1:10,xstring(x(k),y(k),string(k)),end
or more efficient if there are many points
drawlater();for k=1:10,xstring(x(k),y(k),string(k)),end;drawnow()
3D example, a little more complex due to 3d functions limitations
x=1:10;y=x^1.5;z=x^2;
clf;param3d(x,y,z)
//replace lines by points
e.mark_mode="on";e.mark_style=2;e.line_mode="off"
//xstring do not yet handle the 3D coordinates
drawlater();for
k=1:10,xstring(x(k),y(k),string(k)),e=gce();e.data(3)=z(k);end;drawnow()
Serge Steer
INRIA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110819/f83d60e2/attachment.htm>
More information about the users
mailing list