John H Palmieri wrote:
> On Mar 23, 3:31 pm, John H Palmieri <jhpalmier...@gmail.com> wrote:
>   
>> On Mar 23, 3:10 pm, Jose Guzman <n...@neurohost.org> wrote:
>>
>>
>>
>>
>>
>>     
>>> Dear Sage users and developers,
>>>       
>>> I am using Sage version 3.4 running on Linux/Debian. I am still not very
>>> familiar with Sage though. I tried to plot the following equation:
>>>       
>>> sage: var('t'); # symbolic variable
>>> sage: var('g'); # symbolic variable
>>> sage:  f(t) = g*(t**2-1)/(2*(t-1)) # try to simplify this function later...
>>>       
>>> Obviously the function is not defined at t=1. Returns (0/0)
>>>       
>>> sage: f(1).subs(g=9.81) # returns Division by 0
>>>       
>>> The problem comes when I try to plot the whole function f(t). By default
>>> the plot is between -1 and +1.
>>>       
>>> sage: fig = plot(f.subs(g=9.81))
>>>       
>
> This is why you are getting a plot between -1 and 1: the plot command
> expects xmin and xmax arguments, and if you don't specify any, it uses
> xmin=-1 and xmax=1.  From this point on, fig goes from -1 to 1, and
> specifying different end points in show (for example) doesn't affect
> the actual plot in fig.
>
> By the way, if you type
>
>    sage: plot(f.subs(g=9.81), 0, 10)
>
> then the plot will be displayed -- you don't need to save the plot and
> then 'show' it.
>
> >
>   
Once again thank you very much. As i wrote, I am not very familiar with 
Sage and that's why I got so many mistakes (by the way it is very 
difficult to find information even with the help command). The plot tip 
is fantastic! I will use it from now on.

All the best

Jose.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to