El dom, 28-01-2007 a las 08:19 -0500, sen1 at math.msu.edu escribi?:
> Hello,
> I frequently have to generate many curves to plot. Up to 10 or 20,
> for instance.
>
> It would be convenient to generate them as lists, but then, I don't
> know how to plot them.
>
> For instance, suppose I have a function c(i) which returns a 2d data list
> for each i.
>
> I can plot it with
>
> graph2d(c(1),c(2),c(3)),
>
> Similarly, with the new
>
> gpdraw2d(points(c(1)), points(c(2)), points(c(3))) (or something like
> that)
Sheldon,
You can build your 2d scene in a list and pass it as arguments to
gpdraw2d by means of 'apply'. An example:
c(n):= makelist([k/10, (k/10)^n],k,0,10)$
my2dscene:
flatten(append([points_joined=true,point_size=0],
makelist([line_type = i,points(c(i))],i,1,4)))$
apply(gpdraw2d,my2dscene)$
In fact,
gpdraw2d(points(c(1)), points(c(2)), points(c(3))) $
also works, but with the default settings.
hth
Mario
--
Mario Rodriguez Riotorto
www.biomates.net