<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Le 18/08/2011 14:32, scilabuser a écrit :
<blockquote
 cite="mid:CAD88u8Wmu4MsGRUe32FqfmB1c=Mdv84ZQ_n2UnF+5DPOq8dO8w@mail.gmail.com"
 type="cite">
  <div dir="ltr">
  <div>Hi, </div>
  <div><br>
  </div>
  <div>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) . </div>
  <div> </div>
  <div>More precisely, I am used to call plot2d  this way:<b> </b></div>
  <div><b><br>
  </b></div>
  <div><b>-->scf() ; plot2d(attrib_point(1,:), attrib_points(2,:) ,
style = -1) ;</b></div>
  <div><b><br>
  </b></div>
Which gives a plot where all points are marked by a '+' . 
  <div>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 . </div>
  <div><br>
  </div>
  <div>Any solution ? </div>
  <div>Thanks in advance .</div>
  <div><br>
  </div>
  <div>Caroline</div>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </div>
  <br>
  <hr width="300" align="left">View this message in context: <a
 moz-do-not-send="true"
 href="http://mailinglists.scilab.org/2d-plot-tp3264708p3264708.html">2d
plot</a><br>
Sent from the <a moz-do-not-send="true"
 href="http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html">Scilab
users - Mailing Lists Archives mailing list archive</a> at Nabble.com.You
can use cstring for that<br>
</blockquote>
You can use xstring for that:<br>
<br>
2D example<br>
<br>
x=1:10;y=x^1.5;<br>
clf;plot(x,y,'+')<br>
for k=1:10,xstring(x(k),y(k),string(k)),end<br>
<br>
or more efficient if there are many points<br>
drawlater();for k=1:10,xstring(x(k),y(k),string(k)),end;drawnow()<br>
<br>
3D example, a little more complex due to 3d functions limitations<br>
<br>
x=1:10;y=x^1.5;z=x^2;<br>
clf;param3d(x,y,z)<br>
//replace lines by points<br>
e.mark_mode="on";e.mark_style=2;e.line_mode="off"<br>
//xstring do not yet handle the 3D coordinates<br>
drawlater();for
k=1:10,xstring(x(k),y(k),string(k)),e=gce();e.data(3)=z(k);end;drawnow()<br>
<br>
<br>
Serge Steer<br>
INRIA<br>
</body>
</html>