[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-mail] Drawing two curves at once?
From: |
Bill Page |
Subject: |
Re: [Axiom-mail] Drawing two curves at once? |
Date: |
Thu, 29 May 2008 23:05:38 -0400 |
Alasdair,
You could try something like this:
draws(s,p,t) == (_
vp:TwoDimensionalViewport:=viewport2D(); _
for i in 1..#s repeat putGraph(vp,getGraph(draw(s.i,p,t),1),i::PI); _
makeViewport2D(vp) _
)
draws([sin(x),x-x^3/6],x=-2*%pi..2*%pi,[])
draws([sin(x)^2, cos x], x=-3..3, title=="Example 2")
Regards,
Bill Page.
On Thu, May 29, 2008 at 8:29 PM, Alasdair McAndrew wrote:
> Is there an easier way, in Axiom, of drawing two curves on the same set
> of axes than with the getGraph, putGraph and makeViewport2D commands?
> It would be nice (for me!) simply to be able to enter, say
>
> draw([sin(x),x-x^3/6],x=-2*%pi..2*%pi)
>
> and have the graphs of both functions in the list drawn on the same axes.
> But Axiom doesn't seem to support this syntax.
>
> Thanks,
> Alasdair
>