El s?b, 20-04-2013 a las 18:29 +0200, Adam escribi?:
> > Short pieces of code are easier to run and check.
> Right. Sorry.
>
> >
> > The trick here is to write the legend only for the first vector and
> > leave the rest of the vectors without legends. Something like this
> > should work:
>
> Ok. Thx for the answer.
> It gives a good list ( display of list is as expected) but draw does
> not accepts it :
> part: argument must be a non-atomic expression; found "key = \"\""
> -- an error. To debug this try: debugmode(true);
>
> Below are 2 batch files ( shorter) : one which not works and one which
> works.
> Probably smth ( ?part) inside draw makes this error.
>
> ?
>
> Adam
> ======= not working ======
>
> /* riotorto.users.sourceforge.net/gnuplot/vectors/index.html */
> GiveAVector(m):=block(
> [x,y,dx,dy],
> x:0,
> y:0,
> dx:realpart(m),
> dy:imagpart(m),
> vector([dx,dy],[-dx,-dy])
> )$
>
>
>
> /*
> http://math.stackexchange.com/questions/361205/what-is-the-shape-of-parabolic-critical-orbit
> */
> /* attracting vectors
>
>
> one key for all vectpors - not works
>
> part: argument must be a non-atomic expression; found "key = \"\""
> -- an error. To debug this try: debugmode(true);
>
> va is displayed properly
> */
> 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);
> f:first(va);
> r:rest(va,1);
> r:cons(string(key=""),r);
You are transforming expression key="" into a string. Draw doesn't
understand the meaning of this string.
> va:cons(f,r);
>
>
>
>
> draw2d(
> title = concat("All critical orbits for discrete map f(z)=",fs ,"
> where m=e^{2*pi*i*3/4}= -i "),
> terminal = screen,
> 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),"ar"),
> 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",
>
>
> /* vectors */
> head_both = false,
> head_length = 0.000001,
> line_width = 0.63,
>
> head_angle = 1,
> head_type = nofilled,
> line_type = solid,
> key = "attracting vectors",
> color = yellow,
> va
>
> );
>
>
> =========== working =================
> draw2d(
>
>
> /* vectors */
> head_both = false,
> head_length = 0.000001,
> line_width = 0.63,
>
> head_angle = 1,
> head_type = nofilled,
> line_type = solid,
> key = "attracting vectors",
> color = yellow,
> first(va),
> key="",
> rest(va),
> key = "repelling vectors",
> color = gray,
> first(vr),
> key="",
> rest(vr)
>
> );
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
--
Mario