[sage-support] On best way to use plot() with functions...

2009-04-03 Thread Chris Seberino
def g(x): return numerical_integral(sin(t),0,x)[0] For the function g, this works: sage: plot(g,x,2,4) but not this sage:plot(g(x), x, 2, 4) If I'm not mistaken, the first form of plot above works with ALL functions right? So is there any reason to ever bother with second form just beca

[sage-support] Re: Plotting from linux console mode?

2009-04-03 Thread William Stein
2009/4/3 Alasdair : > > Thanks - in which file in the sage tree is this variable set? You might have been asking how to set it yourself. In linux (well, bash) do e.g., export SAGE_BROWSER="firefox" -- William --~--~-~--~~~---~--~~ To post to this group, sen

[sage-support] Re: Plotting from linux console mode?

2009-04-03 Thread William Stein
2009/4/3 Alasdair : > > Thanks - in which file in the sage tree is this variable set? > > -Alasdair In misc/viewer.py sage: search_src('SAGE_BROWSER') misc/viewer.py:if os.environ.has_key('SAGE_BROWSER'): misc/viewer.py:BROWSER = os.environ['SAGE_BROWSER'] server/notebook/notebook_o

[sage-support] Re: help expressing formula

2009-04-03 Thread William Stein
2009/4/3 Brian : > > Indeed, thanks William.  I'm not understanding the problem though, as > range works with "ordinary" variables: > > x=5 > [t for t in range(1,x)] Here x "is" (or rather -- points to) the constant integer 5. It's not a symbolic variable. If you do x = var('x') then x is a

[sage-support] Re: jmol problem

2009-04-03 Thread William Stein
2009/4/3 Timothy Clemans : > > I get the same. This historically has been a problem with the public > notebook(s). I 100% disagree. This has *not* historically been a problem with the public notebooks. I have used them millions of times with numerous browsers from many places to draw 3d plots u

[sage-support] Re: jmol problem

2009-04-03 Thread Timothy Clemans
I get the same. This historically has been a problem with the public notebook(s). On Sat, Apr 4, 2009 at 1:04 AM, Brian wrote: > > When I go to this public worksheet, jmol renders as a black screen: > http://sagenb.org/home/pub/422/ > > Here is the output of the Java Console. > > Java Plug-in 1.

[sage-support] Re: Problem in re-login to notebook using Mac

2009-04-03 Thread Timothy Clemans
There's a bug in the error.html template. I'm guessing the error message would be about cookies not enable, see http://trac.sagemath.org/sage_trac/ticket/4429 for the report on that bug. As far as the error message not displaying that's fixed at http://trac.sagemath.org/sage_trac/ticket/4135 On S

[sage-support] jmol problem

2009-04-03 Thread Brian
When I go to this public worksheet, jmol renders as a black screen: http://sagenb.org/home/pub/422/ Here is the output of the Java Console. Java Plug-in 1.6.0_12 Using JRE version 1.6.0_12 Java HotSpot(TM) Client VM User home directory = E:\Documents and Settings\brian --

[sage-support] Re: error publishing worksheet at sagenb.org

2009-04-03 Thread William Stein
2009/4/3 Timothy Clemans : > > Thanks for reporting a bug. We are aware of the issue which involves > address='' being set. I created a trac ticket about this earlier today: http://trac.sagemath.org/sage_trac/ticket/5675 -- William --~--~-~--~~~---~--~~ To pos

[sage-support] Re: Problem in re-login to notebook using Mac

2009-04-03 Thread Crab
My answers to kcrisman are yes (Error|Sage Notebook), yes(using Safari) and I don't know (I haven't tried firefox on Mac, used Firefox for SAGE in Linux with no problems). Okay I will open a ticket when I figured out how to do so. On Apr 3, 9:38 am, kcrisman wrote: > On Apr 3, 12:04 pm, pong w

[sage-support] Re: help expressing formula

2009-04-03 Thread Brian
Indeed, thanks William. I'm not understanding the problem though, as range works with "ordinary" variables: x=5 [t for t in range(1,x)] Anyway, I changed the units function to not use a list comprehension, and instead use this formula: http://i.investopedia.com/inv/tutorials/site/advancedbond/y

[sage-support] Re: Plotting from linux console mode?

2009-04-03 Thread Alasdair
Thanks - in which file in the sage tree is this variable set? -Alasdair On Apr 4, 2:00 pm, William Stein wrote: > On Fri, Apr 3, 2009 at 7:43 PM, Alasdair wrote: > > > If I run a plot command from the linux console, the plot is created, > > and displayed as an image in gqview (on my system).  

[sage-support] Re: Plotting from linux console mode?

2009-04-03 Thread William Stein
On Fri, Apr 3, 2009 at 7:43 PM, Alasdair wrote: > > If I run a plot command from the linux console, the plot is created, > and displayed as an image in gqview (on my system).  Where does Sage > look for the application to display its plots?  I'd like to change > this, if possible, from gqview to

[sage-support] Re: help expressing formula

2009-04-03 Thread William Stein
On Fri, Apr 3, 2009 at 7:45 PM, Brian wrote: > > Thank you Timothy.  Here is the correct (I believe) code for that > equation. > > def units(C, n, F, r): >    return sum([C / (1 + r) ^ t for t in range(1, n+1)]) + F / (1 + r) > ^ n > > def price(C, n, F, r): >    return 100 * (units(C, n, F, r) /

[sage-support] Re: help expressing formula

2009-04-03 Thread Brian
Thank you Timothy. Here is the correct (I believe) code for that equation. def units(C, n, F, r): return sum([C / (1 + r) ^ t for t in range(1, n+1)]) + F / (1 + r) ^ n def price(C, n, F, r): return 100 * (units(C, n, F, r) / F) Here, units expresses the equation I linked to, and price

[sage-support] Plotting from linux console mode?

2009-04-03 Thread Alasdair
If I run a plot command from the linux console, the plot is created, and displayed as an image in gqview (on my system). Where does Sage look for the application to display its plots? I'd like to change this, if possible, from gqview to ImageMagick's display. Thanks, Alasdair --~--~-~--

[sage-support] Re: help expressing formula

2009-04-03 Thread Timothy Clemans
I'm not 100% sure but I think it would look something like def maturity_formula(C, P, r): return sum([C / (1 + r) ^ t + F / (1 + r) ^ n for t in range(1, n+1)]) On Fri, Apr 3, 2009 at 8:54 PM, Brian wrote: > > I was hoping to get help with using SAGE to plot this equation: > http://www.stre

[sage-support] help expressing formula

2009-04-03 Thread Brian
I was hoping to get help with using SAGE to plot this equation: http://www.streetauthority.com/images/education/ytm.gif This is the yield to maturity formula, expressing that a bond's price is the sum of the present values of its future cash flows. P = price of the bond n = number of periods C =

[sage-support] Re: error publishing worksheet at sagenb.org

2009-04-03 Thread Timothy Clemans
Thanks for reporting a bug. We are aware of the issue which involves address='' being set. On Fri, Apr 3, 2009 at 8:20 PM, Brian wrote: > > When I publish a worksheet, I get a busted URL: > > Worksheet is publicly viewable at http://:8000/home/pub/421 > Published on April 03, 2009 05:19 PM > > B

[sage-support] error publishing worksheet at sagenb.org

2009-04-03 Thread Brian
When I publish a worksheet, I get a busted URL: Worksheet is publicly viewable at http://:8000/home/pub/421 Published on April 03, 2009 05:19 PM Brian --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this

[sage-support] Re: how to read bitmap image files(.bmp) in sage

2009-04-03 Thread sageuser
Thanks for all the quick responses! This is exactly what I was looking for. --~--~-~--~~~---~--~~ 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 opt

[sage-support] Re: Problem in re-login to notebook using Mac

2009-04-03 Thread Jose Guzman
kcrisman wrote: > > On Apr 3, 12:04 pm, pong wrote: > >> I have just installed SAGE-3.4 on a Macbook (OS X 10.5.6), everything >> seems fine except when I log out from a sage notebook session and try >> relogin from the same page then I get an error. I'm pretty sure that >> the password is cor

[sage-support] Re: Problem in re-login to notebook using Mac

2009-04-03 Thread kcrisman
On Apr 3, 12:04 pm, pong wrote: > I have just installed SAGE-3.4 on a Macbook (OS X 10.5.6), everything > seems fine except when I log out from a sage notebook session and try > relogin from the same page then I get an error. I'm pretty sure that > the password is correct cos I've just created

[sage-support] Problem in re-login to notebook using Mac

2009-04-03 Thread pong
I have just installed SAGE-3.4 on a Macbook (OS X 10.5.6), everything seems fine except when I log out from a sage notebook session and try relogin from the same page then I get an error. I'm pretty sure that the password is correct cos I've just created it the first time I ran notebook(). I even

[sage-support] Re: sage

2009-04-03 Thread William Stein
On Fri, Apr 3, 2009 at 7:17 AM, Jason Grout wrote: > > Dan Drake wrote: >> On Fri, 03 Apr 2009 at 01:58AM -0700, John Cremona wrote: >>> I think I do understand what Armand is asking.  Let's see: >>> >>> Say I have been using Magma for half an hour.  I typed lots of stuff, >>> including typos etc

[sage-support] Re: sage

2009-04-03 Thread Jason Grout
Dan Drake wrote: > On Fri, 03 Apr 2009 at 01:58AM -0700, John Cremona wrote: >> I think I do understand what Armand is asking. Let's see: >> >> Say I have been using Magma for half an hour. I typed lots of stuff, >> including typos etc, and a whole lot of output has scrolled past. Now >> I want

[sage-support] Re: sage

2009-04-03 Thread Dan Drake
On Fri, 03 Apr 2009 at 01:58AM -0700, John Cremona wrote: > I think I do understand what Armand is asking. Let's see: > > Say I have been using Magma for half an hour. I typed lots of stuff, > including typos etc, and a whole lot of output has scrolled past. Now > I want to keep all the command

[sage-support] Re: sage

2009-04-03 Thread Craig Citro
> Now I think that Armand wants an equivalent to %S.  Presumably the > commands typed in will all be in a history file somewhere. > Yep, the commands do get stored in a history file -- it's ~/.sage/ipython/history-sage from your home directory. Also, from the command line, you can do %history to

[sage-support] Re: sage

2009-04-03 Thread David Joyner
On Fri, Apr 3, 2009 at 5:17 AM, wrote: > > Dear John, > > On Apr 3, 10:58 am, John Cremona wrote: >> I think I do understand what Armand is asking.  Let's see: > ... >> Now I think that Armand wants an equivalent to %S.  Presumably the >> commands typed in will all be in a history file somewher

[sage-support] Re: sage

2009-04-03 Thread simon . king
Dear John, On Apr 3, 10:58 am, John Cremona wrote: > I think I do understand what Armand is asking. Let's see: ... > Now I think that Armand wants an equivalent to %S. Presumably the > commands typed in will all be in a history file somewhere. Wouldn't using the notebook solve the problem? Or

[sage-support] Re: sage

2009-04-03 Thread John Cremona
I think I do understand what Armand is asking. Let's see: Say I have been using Magma for half an hour. I typed lots of stuff, including typos etc, and a whole lot of output has scrolled past. Now I want to keep all the commands that I typed, put them in a file, sanitize them, ans use them lat