Re: Drawing two curves at once?

"Bill Page" <[email protected]>
Newsgroups gmane.comp.mathematics.axiom.user
Message-ID <[email protected]>
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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.