Thanks for your answer, it seems complicated :). I think it would have
been much easier if there is a way to specify the plot variables in
plots.

On Apr 22, 2:58 am, Mike Hansen <[email protected]> wrote:
> On Thu, Apr 22, 2010 at 2:46 AM, pallab <[email protected]> wrote:
> > How to specify variables in a plot. Say I want something  like,
>
> > At=S*x
> > S=4
> > plot(At,0,2)
>
> Note that when you assign "S=4" it doesn't change the value of S in At.

Why not??, what is the logic behind it!!
>
>
>
> > Question is that how to instruct Sage that I want to plot against 'x'.
> > In Mathematica this is conveniently done by
>
> > Plot[At,{x,0,2}]
>
> You can do this by
>
> sage: var('S, x')
> (S, x)
> sage: At = S*x; At
> S*x
> sage: At.subs(S=4)
> 4*x
> sage: plot(At.subs(S=4), (x,0,2))
>
> --Mike
>
> --
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to 
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/sage-support
> URL:http://www.sagemath.org

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to