Re: [sage-support] Re-using notebook code

2010-08-25 Thread Dan Drake
On Wed, 25 Aug 2010 at 04:27AM -0700, Jamie Hall wrote: > I've written a few code snippets that I re-use from time to time. > Right now I'm copying and pasting from older notebooks into new ones. > Is there a better way to do it? For instance, is it possible to get > one notebook to load content fr

Re: [sage-support] Re: Sage and Texshop: Plotting a slope field

2010-08-25 Thread Dan Drake
On Wed, 25 Aug 2010 at 10:19PM -0500, Jason Grout wrote: > On 8/25/10 9:37 PM, Sony wrote: > >I moved a copy of sagetex.sty file into my working directory and > >miraculously slope field appeared on the LaTeX output. I do not > >understand it, but it works. Thanks. > > > > If you had told us the

Re: [sage-support] Re: Sage and Texshop: Plotting a slope field

2010-08-25 Thread Dan Drake
On Wed, 25 Aug 2010 at 06:36PM -0700, Sony wrote: > I fixed the indentation problem and now the sageblock output is > alined. Thank you very much. However, my main question was how to > get the actual slope field plot on my latex document. \sageplot{p} > produces a box with two question marks in

[sage-support] Re: Sage and Texshop: Plotting a slope field

2010-08-25 Thread Jason Grout
On 8/25/10 9:37 PM, Sony wrote: I moved a copy of sagetex.sty file into my working directory and miraculously slope field appeared on the LaTeX output. I do not understand it, but it works. Thanks. If you had told us the actual error you were getting, my guess is that we could have figured

[sage-support] Re: Sage and Texshop: Plotting a slope field

2010-08-25 Thread Sony
I moved a copy of sagetex.sty file into my working directory and miraculously slope field appeared on the LaTeX output. I do not understand it, but it works. Thanks. On Aug 25, 8:36 pm, Sony wrote: > I fixed the indentation problem and now the sageblock output is > alined.  Thank you very much

[sage-support] Re: Sage and Texshop: Plotting a slope field

2010-08-25 Thread Sony
I fixed the indentation problem and now the sageblock output is alined. Thank you very much. However, my main question was how to get the actual slope field plot on my latex document. \sageplot{p} produces a box with two question marks in it. On Aug 25, 7:34 pm, Dan Drake wrote: > On Wed, 25

Re: [sage-support] Sage and Texshop: Plotting a slope field

2010-08-25 Thread Dan Drake
On Wed, 25 Aug 2010 at 04:43PM -0700, Sony wrote: > Can you plot a slope field in TexShop and generate a latex output? > > For example, using something like: > > \begin{sageblock} > var('y') > p=plot_slope_field(x-y^2,(x,0,5),(y,0,6)) > \end{sageblock} > > \sageplot{p} > > Of course, the above doe

[sage-support] Sage and Texshop: Plotting a slope field

2010-08-25 Thread Sony
Can you plot a slope field in TexShop and generate a latex output? For example, using something like: \begin{sageblock} var('y') p=plot_slope_field(x-y^2,(x,0,5),(y,0,6)) \end{sageblock} \sageplot{p} Of course, the above does not work, hence the question. I appreciate any advise. -- To post

[sage-support] Re: subtraction with dates?

2010-08-25 Thread Jason Grout
On 8/25/10 12:18 PM, Niles wrote: On Aug 25, 7:29 am, "Dr. David Kirkby" wrote: On 08/25/10 09:12 AM, Simon King wrote: Is there really evidence that they *were* aware of a pothole for 9 months?? Yes, it was noted by a routine inspection on the 29th April 2009 and given a defect number 194

[sage-support] Re: Disabling the "sage: " prompt

2010-08-25 Thread John Cremona
Browsing ipythonrc showed me the following possibilities, which I did not know of: sage: /sqrt 9 > sqrt(Integer(9)) 3 sage: /gcd 4 5 > gcd(Integer(4),Integer(5)) 1 sage: /CuspForms 11 > CuspForms(Integer(11)) Cuspidal subspace of dimension 1 of Modular Forms space of dimension 2 for Co

[sage-support] Re: Changing the path of an edge in a graph

2010-08-25 Thread Katie Johnson
Actually, I seem to have patched something together that works (at least for me). If your graph is t, I can get it to print the way I want it to using: curve = Graphics() n=t.num_verts() for i in range(n): curve = curve + disk((i,0),.03,(0,2*pi), color='black') + text(i, (i,-.1), color='bla

[sage-support] Re: subtraction with dates?

2010-08-25 Thread Niles
On Aug 25, 7:29 am, "Dr. David Kirkby" wrote: > On 08/25/10 09:12 AM, Simon King wrote: > > Is there really evidence that they *were* aware of a pothole for 9 > > months?? > > Yes, it was noted by a routine inspection on the 29th April 2009 and given a > defect number 1948944. > > > I guess th

[sage-support] Re: Changing the path of an edge in a graph

2010-08-25 Thread Katie Johnson
I'm sorry it's taken me so long to reply, and thank you for all of the information! I'll plan on trying something with Bezier curves, and if I get anything to work out, I'll definitely repost! However, I'm pretty new to Sage, so don't expect anything remotely soon. :-P Thanks again, Katie On Au

Re: [sage-support] Re: iteration from previous terms

2010-08-25 Thread andrew ewart
aah ur writing this in sage when i want to do this as a part of a file out of sage then complied in sage, also i want to store the final itteration so it can be used further on, so when i tried ur first suggestion it gives me the error yield ak SyntaxError: 'return' with argument inside genera

[sage-support] Re-using notebook code

2010-08-25 Thread Jamie Hall
Hi everyone, I've written a few code snippets that I re-use from time to time. Right now I'm copying and pasting from older notebooks into new ones. Is there a better way to do it? For instance, is it possible to get one notebook to load content from another? Or should I be saving the code in spyx

Re: [sage-support] Re: subtraction with dates?

2010-08-25 Thread Dr. David Kirkby
On 08/25/10 09:12 AM, Simon King wrote: On 25 Aug., 02:07, "Dr. David Kirkby" wrote: ... The silly thing is, they have known about this defect for 9 months, but it was given a low priority. 9 months later it damages our car, and the council denies they were aware the road was dangerous. Is th

[sage-support] Re: subtraction with dates?

2010-08-25 Thread Simon King
On 25 Aug., 02:07, "Dr. David Kirkby" wrote: > ... > The silly thing is, they have known about this defect for 9 months, but it was > given a low priority. 9 months later it damages our car, and the council > denies > they were aware the road was dangerous. Is there really evidence that they *we