draw / vector / key



Hi,

I draw 2 lists of vectors using draw package :
http://riotorto.users.sourceforge.net/gnuplot/vectors/index.html

I want to give one key ( in legend ) to all vectors from one list and 
another key for second list.
How can I do it ?

TIA

Adam

-----------

below  is my code

---------


kill(all);
remvalue(all);



/* compute vectors at the given points  vector ([x,y], [dx,dy])
   vector([x,y], [dx,dy]) plots vector [dx,dy] with origin in [x,y].
*/

/*------------- functions definitions ---------*/

/* function */
f(z):=z^4+m*z;



GiveListOfCriticalPoints(fun):=
block(
   [d,s],
   /* derivative */
   d:diff(fun,z,1),
   /* critical points z: d=0 */
   s:solve(d=0,z),
   /* remove "z="  from list s */
   s:map('rhs,s),
   /* convert to form x+y*%i */
   s:map('rectform,s),
   s:map('float,s),
   return(s)
)$



/* f(z) is used as a global function
    I do not know how to put it as a argument */

GiveOrbit(z0,OrbitLength):=
block(
  [z,Orbit],
  z:z0,
  Orbit:[[realpart(z),imagpart(z)]],
  for i:1 thru OrbitLength step 1 do
         ( z:expand(f(z)),
           Orbit:endcons([realpart(z),imagpart(z)],Orbit)),

  return(Orbit)

)$

/* find fixed points  returns a list */
GiveFixedPoints():= block
(
   [s],
   s:solve(f(z)=z),
   /* remove "z="  from list s */
   s:map('rhs,s),
   s:map('rectform,s),
   s:map('float,s),
   return(s)
)$

GiveAVector(m):=block(
  [x,y,dx,dy],
  x:0,
  y:0,
  dx:realpart(m),
  dy:imagpart(m),
  vector([dx,dy],[-dx,-dy])
)$

compile(all);

/* ------------  */
fs:string(f(z));
p:3;
q:4;
m:rectform(exp(2*%pi*%i*p/q));
iLength:1000;
s:GiveListOfCriticalPoints(f(z));
multiplicities;
length(s);


Orbits:[];
for i:1 thru length(s) step 1 do
(
  Orbit:GiveOrbit(s[i],iLength),
  Orbits:append(Orbit,Orbits)
);

va:solve(z^12=1/(912*%i+12*84));
va:map(rhs,va);
va:map(rectform,va);
va:map('float,va);
va:map(GiveAVector,va);


/*-----------------------------------------------------------------------*/
load(draw); /* ( interface to gnuplot ) by Mario Rodriguez Riotorto 
http://www.telefonica.net/web2/biomates */
/* http://riotorto.users.sourceforge.net/gnuplot/ps/index.html */

draw2d(
     title = concat("All  critical orbits for discrete map f(z)=",fs ," 
  where m=e^{2*pi*i*3/4}= -i "),
     terminal  = png,
     user_preamble = "set angles degrees; set xtics 0.62996052494744; 
set mxtics 0.5; set size square", /* 360/12-30 */
     file_name = 
concat("~/maxima/parabolic/critical_orbits/z4plusmz/3over4/arv/",string(iLength),"b7"),
     pic_width  = 1000,    /* Since Maxima 5.23, pic_width and 
pic_height are deprecated. */
     pic_height = 1000,    /* See option dimensions. To get the same 
effect, write dimensions=[800,600] */
     yrange = [-0.75,0.75],
     xrange = [-0.75,0.75],
     xlabel     = "z.re ",
     ylabel     = "z.im",


     key = "attracting vectors",
     head_both   = false,
     head_length = 0.000001,
     line_width  = 0.63,
     color       = yellow,
     head_angle  = 1,
     head_type = nofilled,
     line_type = solid,
     key= "",
     va,


     point_type    = filled_circle,
     points_joined = false,
     point_size    = 0.7,

     key=" critical orbit ",
     color             =red,
     points(Orbits),

     point_size    = 1.2,
     key= "critical points",
     color           = blue,
     points(map(realpart,s),map(imagpart,s)),

     key= "fixed parabolic point",
     color           = black,
     points([[0,0]])

  );