[sage-support] Re: Sage's running too slowly

2012-09-02 Thread ObsessiveMathsFreak
If you're using the notebook interface, consider using chrome instead of firefox, as the latter is a massive memory hog when it comes to sage. I find that sage + notebook typically needs a good 2GB of memory in order to run smoothly. On Friday, August 31, 2012 9:20:14 PM UTC+1, Guilherme Boavia

[sage-support] Order of printed variables

2012-09-02 Thread ObsessiveMathsFreak
If I run the following code sage: var('x epsilon ') sage: y=x+epsilon sage: print y the output is epsilon + x I would like the output to be x + epsilon In short I want to change the ordering of variables in printed results. Is this possible? In particular, I would like x to have higher prio

[sage-support] Re: Support for Arrows in Plots

2012-07-19 Thread ObsessiveMathsFreak
Upgrading to sage 5.1 did indeed fix the arrow issue. A note on this: In 5.1 the default size for images is significantly larger, but this is controllable through figsize. As it turns out, matplotlib does not support arrows in axes. I cannot fathom why, but it just doesn't unless you rip out th

[sage-support] Support for Arrows in Plots

2012-07-14 Thread ObsessiveMathsFreak
The current support for arrows in sage plots currently isn't very satisfactory. Arrows have odd behaviour, and "fat" heads with no obvious styling options. The following code arrow2d((0, 0), (2, 3), color="red")+point((2,3)) Generates an arrow, but the head does not reach the required point, an

[sage-support] Re: Latex tick labels in plot

2012-06-01 Thread ObsessiveMathsFreak
== I hope this is useful On Friday, June 1, 2012 4:22:13 PM UTC+1, ObsessiveMathsFreak wrote: > > While the "ticks=" option in plot can be used to place custom tick marks > on plot axes, how would you go about putting custom labels on each tick > mar

[sage-support] Re: Latex tick labels in plot

2012-06-01 Thread ObsessiveMathsFreak
On Friday, June 1, 2012 4:22:13 PM UTC+1, ObsessiveMathsFreak wrote: > > While the "ticks=" option in plot can be used to place custom tick marks > on plot axes, how would you go about putting custom labels on each tick > mark, preferably latex ones,. e.g. $x_0$, $x_1$, e

Re: [sage-support] Re: Latex tick labels in plot

2012-06-01 Thread ObsessiveMathsFreak
(P0+PX_LABELS+PY_LABELS) I think that such functionality should eventually be part of plot by default. On Friday, June 1, 2012 7:50:19 PM UTC+1, Michael Orlitzky wrote: > > On 06/01/12 13:26, ObsessiveMathsFreak wrote: > > > > The pro

[sage-support] Re: Latex tick labels in plot

2012-06-01 Thread ObsessiveMathsFreak
On Friday, June 1, 2012 4:48:51 PM UTC+1, kcrisman wrote: > > > > On Friday, June 1, 2012 11:22:13 AM UTC-4, ObsessiveMathsFreak wrote: >> >> While the "ticks=" option in plot can be used to place custom tick marks >> on plot axes, how would you go

[sage-support] Polynomials with Irrational coefficients

2012-02-19 Thread ObsessiveMathsFreak
Sage doesn't seem to like these f(x,y)=pi*x^10*y+3*x B=f(x,y).polynomial(SR) print B.coefficients() Traceback (click to the left of this block for traceback) ... TypeError What's going wrong here? Is there any way to get Sage to give back [pi,3] -- To post to this group, send email to sage-sup

[sage-support] Re: Add new/custom integral code to sage

2012-02-19 Thread ObsessiveMathsFreak
Is there really no way of doing this? On Feb 8, 10:38 pm, ObsessiveMathsFreak wrote: > I have a certain integration result which Sage is currently unaware of. I > need a way to make sage aware of it in some fashion, via substitution or > anything else. > > For example, sage c

[sage-support] Re: Coefficients of multivariate polynomials along with degrees

2012-02-19 Thread ObsessiveMathsFreak
mortals to work with polynomials without having to declare polynomials rings over integers. ) On Feb 19, 12:12 pm, ObsessiveMathsFreak wrote: > Is there any way to get this code to deal with non integer > coefficients. Specifically, can it return coefficients that are > symbolic. > >

[sage-support] Re: Coefficients of multivariate polynomials along with degrees

2012-02-19 Thread ObsessiveMathsFreak
have this code consider 'a' not as a variable but as a constant? On Feb 9, 10:36 pm, ObsessiveMathsFreak wrote: > Are you certain that these two functions return elements in the same > order? > > On Feb 8, 11:40 pm, Mike Hansen wrote: > > > > > &

[sage-support] Re: Coefficients of multivariate polynomials along with degrees

2012-02-09 Thread ObsessiveMathsFreak
Are you certain that these two functions return elements in the same order? On Feb 8, 11:40 pm, Mike Hansen wrote: > On Wed, Feb 8, 2012 at 3:29 PM, ObsessiveMathsFreak > > wrote: > > Is there no way of getting sage to give back the degree's of the > > corresponding m

[sage-support] Coefficients of multivariate polynomials along with degrees

2012-02-08 Thread ObsessiveMathsFreak
Currently the code for obtaining the coefficients of a multivariate polynomials returns only a list of coefficients without returning the degrees as well. For example f(x,y)=10*x^2*y+3*x B=f(x,y).polynomial(SR) print B.coefficients() [10, 3] f(x,y)=10*x^100*y+3*x B=f(x,y).polynomial(SR) print B.

[sage-support] Add new/custom integral code to sage

2012-02-08 Thread ObsessiveMathsFreak
I have a certain integration result which Sage is currently unaware of. I need a way to make sage aware of it in some fashion, via substitution or anything else. For example, sage currently cannot perform the following integral sage: var(' k t') sage: integrate(sqrt(1-k^2*sin(t)^2),t,0,pi/2) in

[sage-support] Multiple multicoloured plots in a single line

2011-11-28 Thread ObsessiveMathsFreak
Currently, the following does not work for multiple functions sage: plot([r,r^2],(r,0,3),color=['red','blue']) Traceback (click to the left of this block for traceback) ... ValueError: color list or tuple '['red', 'blue']' must have 3 entries, one for each RGB, HSV, HLS, or HSL channel And tryin

[sage-support] Re: Problem with integrals and assumptions

2011-11-28 Thread ObsessiveMathsFreak
> If anything, we've probably been too cavalier with our use of Maxima's > fine-grained simplification and other routines at times; it seems > dangerous to go the other way. > > At the same time, we have > > sage: integrate(x^n,x,algorithm='sympy') > x^(n + 1)/(n + 1) OK, this is a lot more usab

[sage-support] Problem with integrals and assumptions

2011-11-26 Thread ObsessiveMathsFreak
My specific problem is that it would have been a lot faster for me to just evaluate this integral by hand, as at least I would have the answer by now. I don't really know what to say at this point except that sage could be a lot easier to use right now than it currently is. I bring up this example

[sage-support] Re: Expand complex exponential using eulers formula

2011-06-29 Thread ObsessiveMathsFreak
This is pretty infuriating. sage: forget() sage: assume(theta,'real') sage: exp(I*theta).real() e^(-imag_part(theta))*cos(real_part(theta)) -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.

[sage-support] Expand complex exponential using eulers formula

2011-06-29 Thread ObsessiveMathsFreak
I have complex formulas involving several occurances of complex exponentials. e.g. e^(2*I*theta), e^(3*I*theta) I would like to find the real part of the expression (there are several variables), but when I do so, the expression becomes unwieldy with a lot of terms like sin(-2*real_part(theta)) sh

[sage-support] Plotting Electric Field Lines

2011-06-25 Thread ObsessiveMathsFreak
I'm currently looking to draw graphs of electric field lines for arrangments of several charges. Is there a standard way of doing this in sage? The equipotential lines can be draw straightforwardly using countor_plot, but how can the electric field lines--which are orthogonal trajectories of the e

[sage-support] Action of a Group

2011-06-18 Thread ObsessiveMathsFreak
I want to use sage to investigate the action of a group on a particular "set" which is being permuted. Specifically I want to look at the orbits of particular objects under the action of the group. The group I'm looking at is the symmetry group of the square: G=DihedralGroup(4) I want to apply t

[sage-support] Re: efficient way to convert str to rational

2011-05-10 Thread ObsessiveMathsFreak
I think you should definitely get rid of the try/except statements. The conversion is either going to work, or it is not, so you really don't need them and they're probably slowing everything down a LOT. If the database is very large, you might want to consider converting outside of sage, with a c

[sage-support] Re: Notebook data & cache

2011-05-10 Thread ObsessiveMathsFreak
This is actually a huge problem for me as I need to transfer sage notebooks between different computers. Some individual sws files I have are upwards of 60MB each! I have often found that the best way to deal with this is to go into the "Edit" section--at the top of the worksheet--and then copy an

[sage-support] Re: Plot in Sage

2011-05-10 Thread ObsessiveMathsFreak
You can also get fancy with the "region" option to obtain cut away plots of the surfaces. implicit_plot3d(x^2 + 2*y^2 + 2*z^2 == 1,(x,-1,1),(y,-1,1), (z,-1,1),color='red',region=lambda x,y,z: x<0 or y<0 ) On May 10, 10:12 am, ancienthart wrote: > var('x,y,z') > A = implicit_plot3d(x^2 + y^2 + z^

[sage-support] Implicit_plot3d and coordinate transforms

2011-05-07 Thread ObsessiveMathsFreak
I was wondering whether it was possible to use coordinate transforms in implicit_plot3d in the same was as for plot3d? For example, the following produces a sphere sage: u, v, w = var('u v w') sage: spherical=(w*cos(u)*sin(v),w*sin(u)*sin(v),w*cos(v)) sage: plot3d(2,(u,-pi,pi),(v,0,pi),transforma

[sage-support] Re: Plotting Functions of 3 variables

2011-05-07 Thread ObsessiveMathsFreak
documentation on sage integration is just too > > scant. > > > I will just have to make do with implicit_plot3d and the like. I was > > wondering if there is any way of integrating an implicit_plot3d plot > > and a "slice" image plot of the function together as

[sage-support] Re: Plotting Functions of 3 variables

2011-05-06 Thread ObsessiveMathsFreak
slice" image plot of the function together as in this Mayavi example http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/mlab.html#visualizing-volumetric-scalar-data On May 7, 12:28 am, ObsessiveMathsFreak wrote: > Well, I finally managed to install these packages, bu

[sage-support] Re: Plotting Functions of 3 variables

2011-05-06 Thread ObsessiveMathsFreak
he others give various different errors. For instance, I'm > > encountering the "allow-hosts" error seen in this thread > > >http://groups.google.com/group/sage-support/browse_thread/thread/b634... > > > But I don't even know if it was resolved in that threa

[sage-support] Re: Plotting Functions of 3 variables

2011-05-05 Thread ObsessiveMathsFreak
ow if it was resolved in that thread or not. IS there a way of getting any of these packages installed? Should I update my sage installation to a newer version(currently 4.6.2)? On May 5, 8:24 pm, kcrisman wrote: > On May 5, 1:43 pm, ObsessiveMathsFreak > wrote: > > > Thanks but, th

[sage-support] Re: Plotting Functions of 3 variables

2011-05-05 Thread ObsessiveMathsFreak
te: > > > > > > > > > On May 5, 12:25 pm, ObsessiveMathsFreak > > > wrote: > > > I currently have a function of three variables w=f(x,y,z), which I > > > would like to plot in 3D if possible (e.g. via coloured plots) > > > > Does sage

[sage-support] Plotting Functions of 3 variables

2011-05-05 Thread ObsessiveMathsFreak
I currently have a function of three variables w=f(x,y,z), which I would like to plot in 3D if possible (e.g. via coloured plots) Does sage currently have support for plotting such functions? plot_vector_field3d has support for plotting vector fields of three variables, but there does not seem to

[sage-support] Re: OpenGL, WebGL and Sage

2011-05-04 Thread ObsessiveMathsFreak
On May 4, 6:02 am, Felix Lawrence wrote: > Given that Sage doesn't do its computations in the browser, I think > that OpenCL/CUDA would be more useful than WebGL for calculations. > However, WebGL visualisation for 3D plots would be really, really cool. More than just "cool", it's practically a n

[sage-support] Re: Plotting 3d graphs side by side

2011-04-17 Thread ObsessiveMathsFreak
? On Apr 17, 11:44 pm, ObsessiveMathsFreak wrote: > Thanks, but I have to say that I don't find any of these solutions > particularly endearing. > > Is there no way of coercing this behaviour out of the normal Sage > plot3d functions? I'm not keen on having to learn yet an

[sage-support] Re: Plotting 3d graphs side by side

2011-04-17 Thread ObsessiveMathsFreak
7, 7:45 am, achrzesz wrote: > http://ask.sagemath.org/question/335/multiple-3d-plots-in-one-panel-g... > > On 17 Kwi, 02:46, ObsessiveMathsFreak > wrote: > > > > > > > > > Currently in sage 3D I can graph 3D plots in the same output, but not > > side by side

[sage-support] Plotting 3d graphs side by side

2011-04-16 Thread ObsessiveMathsFreak
Currently in sage 3D I can graph 3D plots in the same output, but not side by side. p1=plot3d(lambda x, y: x^2 + y^2, (-2,2), (-2,2)) p2=plot3d(lambda x, y: x^2 - y^2, (-2,2), (-2,2)) (p1).show(viewer="tachyon") (p2).show(viewer="tachyon") With 2d plots, this can be done using graphics array, but

[sage-support] Re: Removing installed spkgs

2011-04-16 Thread ObsessiveMathsFreak
On Apr 16, 4:33 am, kcrisman wrote: > In this case, you can reinstall the sagenb spkg, I think.  Let us know > if that works.  The Jmol upgrade is still experimental, though > definitely wending its way toward completion... > > On Apr 15, 9:51 pm, ObsessiveMathsFreak > &g

[sage-support] Re: Graphs in Sage: vertex labels?

2011-04-16 Thread ObsessiveMathsFreak
On Apr 16, 9:52 pm, nkulmati wrote: > Hello All, > > I have a simple script: > > > G = graphs.RandomNGP(20, 0.05) > > centralities = G.centrality_closeness() > > I can not figure out how to plot the graph G so that no only the > labels (1,2,3) are shown but also the corresponding centralities fro

[sage-support] Removing installed spkgs

2011-04-15 Thread ObsessiveMathsFreak
How can installed optional spkgs be removed from the current sage installation. I have installed an jmol upgrade package which has failed to work and now I'd like to revert to whatever the previous version was. Is this possible? -- To post to this group, send email to sage-support@googlegroups.co

[sage-support] Re: Using scipy special functions

2011-04-13 Thread ObsessiveMathsFreak
On Apr 12, 8:52 pm, ObsessiveMathsFreak wrote: > On Apr 12, 3:51 am, kcrisman wrote: > > > > > Or simply legendre_P, legendre_Q > > > > Unfortunately, these functions do not support non integer values of n, > > > i.e. they don't support generalis

[sage-support] Re: Using scipy special functions

2011-04-12 Thread ObsessiveMathsFreak
On Apr 12, 3:51 am, kcrisman wrote: > > > Or simply legendre_P, legendre_Q > > > Unfortunately, these functions do not support non integer values of n, > > i.e. they don't support generalised legendre functions, which is what > > I need. > > Are gen_legendre_P and gen_legendre_Q okay?  These are a

[sage-support] Curved Edges in Graphs

2011-04-11 Thread ObsessiveMathsFreak
I'm using the graph theory modules and I have a need to draw curved edges in certain graphs. For example, to draw the complete graph K_4 as a planar graph, it's sometimes useful to draw a curved edge looping around the main figure than to redraw the whole figure as a triangular graph. Currently, t

[sage-support] Re: Using scipy special functions

2011-04-10 Thread ObsessiveMathsFreak
The mpmath import seems to work, but I am unable to plot the resulting functions. I get an error about too many values to unpack. from mpmath import * plot(lambda x: legenp(1,0,x),(x,-1,1)) Traceback (click to the left of this block for traceback) ... ValueError: too many values to unpack On Ap

[sage-support] Re: Saving/Showing large animation consumes vast resources

2011-04-10 Thread ObsessiveMathsFreak
On Apr 10, 4:46 pm, John H Palmieri wrote: > On Sunday, April 10, 2011 6:36:08 AM UTC-7, Marshall Hampton wrote: > > > Finally, what I do currently is to use ffmpeg.  Because of patent and > > license issues I think this cannot be part of the standard Sage, but > > it does a great job and is very

[sage-support] Re: Using scipy special functions

2011-04-10 Thread ObsessiveMathsFreak
Ugghh It looks like scipy wasn't quite what I was looking for. All I really need is a way of evaluating generalised legendre functions of the first and second kind. I've actually found a package in sympy that does this http://docs.sympy.org/dev/modules/mpmath/functions/orthogonal.html#mpmath.l

[sage-support] Using scipy special functions

2011-04-10 Thread ObsessiveMathsFreak
I'm completely unable to get the scipy special functions module to work. In addition, it seems to cause chaos on my system once imported sage: import scipy sage: from scipy.special import * sage: scipy.special.lpn(1,1) --- Va

[sage-support] Re: Plotting Python functions of two variables

2011-04-10 Thread ObsessiveMathsFreak
riday, April 8, 2011 11:03:14 AM UTC-7, ObsessiveMathsFreak wrote: > > >     I have a python type function taking two variables is defined in such > >     a say that accidental evaluation is a possibility. Here is a > >     simplified version > > >     def h(x,n): > &

[sage-support] Re: Plotting Python functions of two variables

2011-04-08 Thread ObsessiveMathsFreak
51:03 PM UTC-7, ObsessiveMathsFreak wrote: > > > That worked, thank you. But I don't understand why the standard > > notation has so many problems. What exactly is going wrong? > > I think this is what's going on: if you start with this: > > > > def h(x,n):

[sage-support] Re: Plotting Python functions of two variables

2011-04-08 Thread ObsessiveMathsFreak
That worked, thank you. But I don't understand why the standard notation has so many problems. What exactly is going wrong? On Apr 8, 8:00 pm, John H Palmieri wrote: > On Friday, April 8, 2011 11:03:14 AM UTC-7, ObsessiveMathsFreak wrote: > > > I have a python type function tak

[sage-support] Plotting Python functions of two variables

2011-04-08 Thread ObsessiveMathsFreak
I have a python type function taking two variables is defined in such a say that accidental evaluation is a possibility. Here is a simplified version def h(x,n): if x>2: return n-x else: return n*x-2 How can functions like this be plotted over x for a constant

[sage-support] Re: Graphics Array and latex legends

2011-04-08 Thread ObsessiveMathsFreak
,(p1,p1))) G.show(figsize=[8,8]) Traceback (click to the left of this block for traceback) ... KeyError: 'pop(): dictionary is empty' On Apr 8, 5:54 pm, ObsessiveMathsFreak wrote: > I'm encountering a problem with graphics_array and latex use in plots. > The following comm

[sage-support] Graphics Array and latex legends

2011-04-08 Thread ObsessiveMathsFreak
I'm encountering a problem with graphics_array and latex use in plots. The following command works fine p1=plot(x^2, (x, -pi, pi), color='blue') G=graphics_array(((p1,p1),(p1,p1))) G.show(figsize=[8,8]) But if latex code is added to the plot legend it produced and error p1=plot(x^2, (x, -pi, pi)

[sage-support] Saving/Loading Worksheets across multiple computers

2011-04-04 Thread ObsessiveMathsFreak
I'm currently using sage across multiple computers but I'm having a problem in saving and transferring worksheets between computers. Specifically, my problem is that when a worksheet is saved and then loaded, the load creates and entirely new worksheet with the same name instead of simply overridi

[sage-support] Saving/Showing large animation consumes vast resources

2011-04-01 Thread ObsessiveMathsFreak
I was having a problem with sage when trying to animate large images with many frames. Essentially, when the image was either being shown or saved to a gif file, the Imagemagick convert process would consumes gigabytes of memory, go out to swap, and the whole system would grind to a halt. I manage

[sage-support] Re: Arithmetic Progession syntax

2011-04-01 Thread ObsessiveMathsFreak
13 pm, Mike Hansen wrote: > On Fri, Apr 1, 2011 at 8:08 PM, ObsessiveMathsFreak > > > > wrote: > >> sage: [0,0.2,..,1] > >> [0.000, 0.200, 0.400, > >> 0.600, 0.800, 1.00] > > >

[sage-support] Re: Arithmetic Progession syntax

2011-04-01 Thread ObsessiveMathsFreak
> sage: [0,0.2,..,1] > [0.000, 0.200, 0.400, > 0.600, 0.800, 1.00] May sage installation appears to be having trouble with this syntax OK Here sage: [0.0,0.2,..,0.9] [0.000, 0.200, 0.400, 0

[sage-support] Sequences and Series

2011-03-30 Thread ObsessiveMathsFreak
I'm just wondering if there is a canonical (i.e. convienient(i.e. lazy)) way to define simple sequences and series in sage. In particular, is there a standard way to define recursive series? Suppose for example that You wanted to define the series a_n=1/n^2. Is there a way to do this without writi

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread ObsessiveMathsFreak
Perfect. That was exactly what I needed. On Mar 28, 4:11 pm, achrzesz wrote: > If you mean complete elliptic integrals of the second kind then: > > sage: from scipy.special  import ellipe > sage: time pts=[ellipe(1.0/(1.0+0.01*k)) for k in range(1,101)] > CPU times: user 0.01 s, sys: 0.00 s, tota

[sage-support] Re: Elliptic Integral Code Very Slow

2011-03-28 Thread ObsessiveMathsFreak
> sage: %time pts=maxima('makelist(elliptic_ec(0.01*k),k,0,100)') > sage: pts0=map(n,pts) I'm not clear on what's happening here. I take it that the first call is bypassing overheads associated with multiple maxima calls. The second command does not work for me however. In any case, my current pr

[sage-support] Elliptic Integral Code Very Slow

2011-03-28 Thread ObsessiveMathsFreak
The standard code to compute elliptic integrals in sage appears to be _very_ slow numerically. To compute the complete elliptic integral on 100 points in the unit interval takes about 16 seconds for me. sage: %time pts=[ elliptic_ec(m) for m in srange(0,1,0.01,include_endpoint=True)] CPU times: us

[sage-support] Re: Arithmetic Progession syntax

2011-03-28 Thread ObsessiveMathsFreak
Mar 28, 2011 at 7:28 AM, ObsessiveMathsFreak > > wrote: > > This is a simple question, but I can't find anything in the > > documentation about it. > > > I would like to declare a simple arithmetic sequence in sage. I use > > this a lot for discrete plots, et

[sage-support] Arithmetic Progession syntax

2011-03-28 Thread ObsessiveMathsFreak
This is a simple question, but I can't find anything in the documentation about it. I would like to declare a simple arithmetic sequence in sage. I use this a lot for discrete plots, etc. In octave, syntax such as [0:0.1:1] returns the sequence 0.0 0.2 0.4 0.6 0.8 1.0 Is there such a sho