[sage-support] Re: Plotting the solution returned by desolve

2022-11-15 Thread Emmanuel Charpentier
Try this : sage: var("x, t") ## t will be used later (x, t) sage: y=function("y") ## Note : no default argument sage: sol=desolve(diff(y(x),x)==(x*y(x)^2 - cos(x)*sin(x) )/(y(x)*(1 - x^2)) ,y(x), ics=[0, 2]) ; sol ## Note : specify y argument 1/2*(x^2 - 1)*y(x)^2 + 1/2*cos(x)^2 == (-3/2) sage:

[sage-support] Re: Plotting heat maps of scalar fields in SAGE

2022-11-14 Thread Gaurish Telang
Thanks so much! On Wednesday, October 19, 2022 at 7:59:36 PM UTC+5:30 Emmanuel Charpentier wrote: > That can be done in Sage in a variety of ways . Here’s one : > > var("x, y") > L = 3# Plotted function > f =lambda x,y:cos(x)-2*y# Coloring# Colormap > cm=colormaps["RdBu"]# We have to scale the

[sage-support] Re: Plotting heat maps of scalar fields in SAGE

2022-10-19 Thread Emmanuel Charpentier
That can be done in Sage in a variety of ways . Here’s one : var("x, y") L = 3# Plotted function f =lambda x,y:cos(x)-2*y# Coloring# Colormap cm=colormaps["RdBu"]# We have to scale the colormap :# Range of values : possible shortcut via some analytical obviousnesses :# cmin = f(-3, 3).n()# cma

[sage-support] Re: plotting tangent vectors to a curve

2022-04-14 Thread kcrisman
On Thursday, April 14, 2022 at 9:54:16 AM UTC-4 egourg...@gmail.com wrote: > Le mercredi 13 avril 2022 à 19:18:48 UTC+2, kcrisman a écrit : > >> Eric, if I opened a ticket, would you be willing to add a couple examples >> of this to the plot documentation? > > > Yes of course. > > I wasn't

[sage-support] Re: plotting tangent vectors to a curve

2022-04-14 Thread Eric Gourgoulhon
Le mercredi 13 avril 2022 à 19:18:48 UTC+2, kcrisman a écrit : > Eric, if I opened a ticket, would you be willing to add a couple examples > of this to the plot documentation? Yes of course. I wasn't aware of this > but it would be a great addition. (Is there a 3d version as well for

[sage-support] Re: plotting tangent vectors to a curve

2022-04-13 Thread kcrisman
Eric, if I opened a ticket, would you be willing to add a couple examples of this to the plot documentation? I wasn't aware of this but it would be a great addition. (Is there a 3d version as well for space curves?) On Wednesday, April 13, 2022 at 9:12:43 AM UTC-4 egourg...@gmail.com wrote: >

[sage-support] Re: plotting tangent vectors to a curve

2022-04-13 Thread Eric Gourgoulhon
Hi, Le vendredi 8 avril 2022 à 22:13:51 UTC+2, fqgo...@colby.edu a écrit : > There is an easy way to plot vector fields in Sage. Is there an easy way > to plot a curve and (some of) its tangent vectors? > You can achieve this via the method tangent_vector_field() of curves, see the second pl

Re: [sage-support] Re: Plotting algebraic curves

2020-03-05 Thread Fernando Gouvea
Yes, and I should have thought of that! Fernando On 3/5/2020 12:13 PM, Dima Pasechnik wrote: In fact, substituting x and y directly into the equation of the curve to plot, and clearing denominators, produces something pretty good,IMHO: implicit_plot(v^2*3*sqrt(1-u^2-v^2)-u^3*9+u*(1-u^2-v^2),(u

Re: [sage-support] Re: Plotting algebraic curves

2020-03-05 Thread Dima Pasechnik
More conceptually, one can use, with care, Sage's substitution facilities: sage: var('u v x y t'); sage: f=y^2-x^3+x sage: fs=(f.subs(x=u*3*t^(-1/2),y=v*3*t^(-1/2))*t^(3/2)).expand() # only works with extra variable t sage: implicit_plot(fs.subs(t=1-u^2-v^2),(u,-1,1),(v,-1,1)) On Thu, Mar 5, 2020

Re: [sage-support] Re: Plotting algebraic curves

2020-03-05 Thread Dima Pasechnik
In fact, substituting x and y directly into the equation of the curve to plot, and clearing denominators, produces something pretty good,IMHO: implicit_plot(v^2*3*sqrt(1-u^2-v^2)-u^3*9+u*(1-u^2-v^2),(u,-1,1),(v,-1,1)) On Thu, Mar 5, 2020 at 4:51 PM Dima Pasechnik wrote: > > On Thu, Mar 5, 2020

Re: [sage-support] Re: Plotting algebraic curves

2020-03-05 Thread Dima Pasechnik
On Thu, Mar 5, 2020 at 2:32 PM Fernando Gouvea wrote: > > This works, in the sense that there's no error. One does get a bunch of > extraneous points near the boundary of the disk. It's as if plot_points were > trying to connect the point at (0,1) and the point at (0,-1) along the > circle, eve

Re: [sage-support] Re: Plotting algebraic curves

2020-03-05 Thread Fernando Gouvea
This works, in the sense that there's no error. One does get a bunch of extraneous points near the boundary of the disk. It's as if plot_points were trying to connect the point at (0,1) and the point at (0,-1) along the circle, even though f_uv is 1 on the circle. Strangely, they occur only on

Re: [sage-support] Re: Plotting algebraic curves

2020-03-05 Thread Dima Pasechnik
The easiest way is to use Python functions rather than symbolic ones; define a function that is 1 outside the unit disk, and implicitly plot it. sage: def f_uv(u,v): : if u^2+v^2>=1: : return 1 : else: : x=u*sqrt(9/(1-u^2-v^2)) : y=v*sqrt(9/(1-u^

Re: [sage-support] Re: Plotting algebraic curves

2020-03-03 Thread Dima Pasechnik
On Wed, Mar 4, 2020 at 12:20 AM Fernando Gouvea wrote: > > But no, it doesn't work, since it gives a rectangular plot instead of one in > polar coordinates. But maybe we are closer. I looked at the labels on the axes, and they do match the ranges of r and phi, so I don't udnerstand how it's poss

Re: [sage-support] Re: Plotting algebraic curves

2020-03-03 Thread Fernando Gouvea
But no, it doesn't work, since it gives a rectangular plot instead of one in polar coordinates. But maybe we are closer. I still think implicit_plot should be smarter about values that do not make sense. Fernando On 3/3/2020 6:26 PM, Dima Pasechnik wrote: even better: sage: var('x y u v r

Re: [sage-support] Re: Plotting algebraic curves

2020-03-03 Thread Fernando Gouvea
Nice idea. Thanks. Fernando On Tue, Mar 3, 2020 at 6:27 PM Dima Pasechnik wrote: > even better: > > sage: var('x y u v r phi') > : u=r*cos(phi) > : v=r*sin(phi) > : x=u*sqrt(9/(1-r^2)) > : y=v*sqrt(9/(1-r^2)) > : implicit_plot(y^2-x^3+x==0,(r,0,999/1000),(phi,-pi,pi)) > > On

Re: [sage-support] Re: Plotting algebraic curves

2020-03-03 Thread Dima Pasechnik
even better: sage: var('x y u v r phi') : u=r*cos(phi) : v=r*sin(phi) : x=u*sqrt(9/(1-r^2)) : y=v*sqrt(9/(1-r^2)) : implicit_plot(y^2-x^3+x==0,(r,0,999/1000),(phi,-pi,pi)) On Tue, Mar 3, 2020 at 10:28 PM Dima Pasechnik wrote: > > On Tue, Mar 3, 2020 at 10:10 PM Fernando Gouve

Re: [sage-support] Re: Plotting algebraic curves

2020-03-03 Thread Dima Pasechnik
On Tue, Mar 3, 2020 at 10:10 PM Fernando Gouvea wrote: > > The whole point of this is to show the behavior of the curve near infinity, > so changing the limits is not an option. just paste together a number of rectangles where (u,v) stay inside the unit circle. (yes, this would need writing a lo

Re: [sage-support] Re: Plotting algebraic curves

2020-03-03 Thread Augustin Lefèvre
A caveat is that at the boundary, the mapping you describe becomes non differentiable (the determinant of the differential blows up to infinity), so it's going to be painful for implicit_plot to work. That being said, the following tweak runs ok but it's not ex

Re: [sage-support] Re: Plotting algebraic curves

2020-03-03 Thread Fernando Gouvea
The whole point of this is to show the behavior of the curve near infinity, so changing the limits is not an option. Fernando On 3/3/2020 4:15 PM, Dima Pasechnik wrote: On Tue, Mar 3, 2020 at 8:20 PM Fernando Gouvea wrote: Here's what I ended up trying, with r=3: var('x y u v') x=u*sqrt(9/(

Re: [sage-support] Re: Plotting algebraic curves

2020-03-03 Thread Dima Pasechnik
On Tue, Mar 3, 2020 at 9:15 PM Dima Pasechnik wrote: > > On Tue, Mar 3, 2020 at 8:20 PM Fernando Gouvea wrote: > > > > Here's what I ended up trying, with r=3: > > > > var('x y u v') > > x=u*sqrt(9/(1-u^2-v^2)) > > y=v*sqrt(9/(1-u^2-v^2)) > > implicit_plot(y^2-x^3+x==0,(u,-1,1),(v,-1,1)) > > > >

Re: [sage-support] Re: Plotting algebraic curves

2020-03-03 Thread Dima Pasechnik
On Tue, Mar 3, 2020 at 8:20 PM Fernando Gouvea wrote: > > Here's what I ended up trying, with r=3: > > var('x y u v') > x=u*sqrt(9/(1-u^2-v^2)) > y=v*sqrt(9/(1-u^2-v^2)) > implicit_plot(y^2-x^3+x==0,(u,-1,1),(v,-1,1)) > > That gives an error: > > /opt/sagemath-8.9/local/lib/python2.7/site-packages

[sage-support] Re: Plotting algebraic curves

2020-03-03 Thread Fernando Gouvea
Here's what I ended up trying, with r=3: var('x y u v') x=u*sqrt(9/(1-u^2-v^2)) y=v*sqrt(9/(1-u^2-v^2)) implicit_plot(y^2-x^3+x==0,(u,-1,1),(v,-1,1)) That gives an error: /opt/sagemath-8.9/local/lib/python2.7/site-packages/sage/ext/interpreters/wrapper_rdf.pyx insage.ext.interpreters.wrapper_r

[sage-support] Re: Plotting honeycomb crystal lattice

2019-05-19 Thread Grumby
You can try this to draw the lines between the different points. The difficulty is to select in your array the points that match together. import numpy as np n = 30 array = flatten([[a*vector([float(sqrt(3))/2,0.5]) + b*vector([float(sqrt(3))/2,-0.5]) for a in (0..n)] for b in (0..n)] +

[sage-support] Re: Plotting honeycomb crystal lattice

2019-05-18 Thread Grumby
To draw lines between points P1 and P2 you can use line ([(x1, y1), (x2, y2)]). But to know which point P1 to join to which point P2 you must:Either build your points in a logical way to have a method to join them.Or calculate the distances between all your points (900 points! 900*899/2 dista

[sage-support] Re: Plotting honeycomb crystal lattice

2019-05-18 Thread Grumby
Hello, You have to draw lines between your points. A solution is to use polyhedron. For instance : hexa0 = polytopes.regular_polygon(6) hexa1 = hexa0.translation([float(sqrt(3))/2,1.5]) g = Graphics() i = 0 while i < 6: j = 0 while j < 4: hexa00 = hexa0.translation([i*f

[sage-support] Re: Plotting honeycomb crystal lattice

2019-05-18 Thread Grumby
Le vendredi 17 mai 2019 05:35:54 UTC+2, saad khalid a écrit : > > Hi everyone: > > I'm trying to using Sage's plot functionality to plot the honeycomb > lattice: > > https://sites.google.com/site/makingplots4scipurposes/_/rsrc/1456789513003/gnuplot-samples-of-2d-lattices/honeycomb.png > > Plotti

[sage-support] Re: plotting a surface defined in a domail

2018-03-14 Thread slelievre
Wed 2018-03-14 13:22:44 UTC, Francesco: > I have an other question: the command > plot3d(f, x_range, y_range, viewer="threejs") > doesn't plot the surface but only the edges of a box. How can i install this viewer? What version of Sage are you using? How did you define f? -- You received this

[sage-support] Re: plotting a surface defined in a domail

2018-03-14 Thread Francesco
Il giorno venerdì 9 marzo 2018 12:24:50 UTC+1, Francesco ha scritto: > > How can i plotting a function of two variables defined in a domain > different from a square ? > I need, for example, to plot a f(x,y) where x is between 0 and 1, and y is > between 0 and x ( it is a triangle ) > Can you

[sage-support] Re: plotting a surface defined in a domail

2018-03-11 Thread slelievre
Building on Emmanuel Charpentier's tips, here is an example. sage: x_range = (0, 1) sage: y_range = (0, 1) sage: in_domain = lambda x, y: 0 < y < x < 1 sage: def f(x, y): : if in_domain(x, y): : return x^2 + y^2 : return float('nan')

[sage-support] Re: plotting a surface defined in a domail

2018-03-10 Thread Emmanuel Charpentier
A couple of ideas : - Parametric plot3d, using a convenient transformation of the parameters - implicit_plot3d - list_plot3d Also, it might help to note that in a 3D plot, points returned as float("NA") do not plot ; however, this is *undocumented* and I still do not know how this i

[sage-support] Re: Plotting with R in A Sage Cell

2017-08-21 Thread Thomas Judson
Looks okay to me. Thanks, Tom On Sunday, August 20, 2017 at 7:09:31 PM UTC-5, Andrey Novoseltsev wrote: > > On Sunday, 6 August 2017 22:58:20 UTC-6, Andrey Novoseltsev wrote: >> >> The next problem is that if a linked cell does not create a new plot, >> then the old one will be shown again - si

[sage-support] Re: Plotting with R in A Sage Cell

2017-08-20 Thread Andrey Novoseltsev
On Sunday, 6 August 2017 22:58:20 UTC-6, Andrey Novoseltsev wrote: > > The next problem is that if a linked cell does not create a new plot, then > the old one will be shown again - since the file is still there. > This problem also seems to be solved, please report if you discover any new issue

[sage-support] Re: Plotting with R in A Sage Cell

2017-08-06 Thread Andrey Novoseltsev
Now http://faculty.sfasu.edu/judsontw/math-s304/section-16.html works fine for me - I don't enforce permission on user files except for group readable (otherwise the web server will not be able to serve them) and there is a timestamp added to the name to force browser to load a new version. The

[sage-support] Re: Plotting with R in A Sage Cell

2017-08-06 Thread Andrey Novoseltsev
There is one problem after another... The line I've mentioned earlier https://github.com/sagemath/sagecell/blob/master/js/session.js#L327 saves and shows the default R plots whose names start with Rplot. This causes read only permissions on files via https://github.com/sagemath/sagecell/blob/maste

[sage-support] Re: Plotting with R in A Sage Cell

2017-07-21 Thread Thomas Judson
Yes, I am sure that you have hit on the problem. Let me know what you come up with. On Wednesday, July 19, 2017 at 1:23:00 PM UTC+2, Thomas Judson wrote: > > The following code works in CoCalc > > cases <- c(36, 531, 4233, 8682, 7164, 2229, 600, 164, 57, 722, 1517, 1828, > 1539, 2416, 3148, 346

[sage-support] Re: Plotting with R in A Sage Cell

2017-07-20 Thread Andrey Novoseltsev
On Thursday, 20 July 2017 04:24:50 UTC-6, Thomas Judson wrote: > > I am pretty sure that this is an R problem that occurs because of linked > cells. Look at > http://faculty.sfasu.edu/judsontw/math-s304/section-16.html. The first > plot works fine, but somehow I need to clear the previous grap

[sage-support] Re: Plotting with R in A Sage Cell

2017-07-20 Thread Thomas Judson
I am pretty sure that this is an R problem that occurs because of linked cells. Look at http://faculty.sfasu.edu/judsontw/math-s304/section-16.html. The first plot works fine, but somehow I need to clear the previous graphics when I create a new plot. I have tried dev.off() and graphics.off(

[sage-support] Re: Plotting with R in A Sage Cell

2017-07-19 Thread Andrey Novoseltsev
On Wednesday, 19 July 2017 05:23:00 UTC-6, Thomas Judson wrote: > > The following code works in CoCalc > > cases <- c(36, 531, 4233, 8682, 7164, 2229, 600, 164, 57, 722, 1517, 1828, > 1539, 2416, 3148, 3465, 1440) > deaths <- c(0, 0, 130, 552, 738, 414, 198, 90, 56, 50, 71, 137, 178, 194, > 290,

[sage-support] Re: Plotting complex functions in imaginary and real parts

2017-06-27 Thread Fjordforsk A/S
Thanks Dima! mandag 26. juni 2017 16.30.20 UTC+2 skrev Dima Pasechnik følgende: > > the following works for me: > sage: var('x y'); > : cmsel = [colormaps['gnuplot2'](i) for i in sxrange(0,1,0.02)] > : plot3d(lambda > x,y:((1/(sqrt((2**2)*pi)))*(x+I*y)*exp(-((0.25)*((x+I*y)**2.imag_pa

[sage-support] Re: Plotting complex functions in imaginary and real parts

2017-06-26 Thread Dima Pasechnik
the following works for me: sage: var('x y'); : cmsel = [colormaps['gnuplot2'](i) for i in sxrange(0,1,0.02)] : plot3d(lambda x,y:((1/(sqrt((2**2)*pi)))*(x+I*y)*exp(-((0.25)*((x+I*y)**2.imag_part(),(x,-3*pi,3*pi),(y,0,2),adaptive=True, : color=cmsel) Note that I removed "math." pr

[sage-support] Re: Plotting complex functions in imaginary and real parts

2017-06-26 Thread Fjordforsk A/S
Note, that when brackets are corrected it gives the following result: TypeError Traceback (most recent call last) in () > 1 plot3d(lambda x,y:(Integer(1)/(math.sqrt((Integer(2)**Integer(2))*pi)))*(x+I*y)*exp(-((RealNumber('0.25'))*((x+I*y)**Integer(2.imag_

[sage-support] Re: Plotting just the real line

2017-04-09 Thread mforets
i chime in to +1 for adding a plot attribute to RealSet (as a user, it was among the 1st things i tried when i discovered this class), something like `plot(RealSet(-oo, oo))`. note that matplotlib allows to draw a plain horizontal line: {{{ from matplotlib import pyplot as plt plt.figure() pl

Re: [sage-support] Re: Plotting long functions

2016-12-29 Thread Michael Orlitzky
On 12/29/2016 04:46 AM, Fjordforsk A/S wrote: > Thanks Michael. I am plotting it now, and it is just waiting without giving > a crash. > Is it automatically right to use complex_plot command to plot the imaginary > part of the same plot as given below? > It depends, do you expect your function

Re: [sage-support] Re: Plotting long functions

2016-12-29 Thread Fjordforsk A/S
Thanks Michael. I am plotting it now, and it is just waiting without giving a crash. Is it automatically right to use complex_plot command to plot the imaginary part of the same plot as given below? onsdag 28. desember 2016 16.58.00 UTC+1 skrev Michael Orlitzky følgende: > > On 12/28/2016 10:

[sage-support] Re: Plotting secant functions

2016-12-28 Thread Nils Bruin
On Wednesday, December 28, 2016 at 4:19:55 AM UTC-8, Fjordforsk A/S wrote: > > Hello, I am having trouble plotting this function: > > sage: *plot3d([(-t+x)^(0.5)*(sech[(t-x)^2]^2)] (x,-5,5), (t, -5, 5))* > In python syntax, *sech[(t-x)^2]^2)] *is list indexing, so it will try to convert the argu

Re: [sage-support] Re: Plotting long functions

2016-12-28 Thread Michael Orlitzky
On 12/28/2016 10:33 AM, Fjordforsk A/S wrote: > This is how its supposed to go: > > sage: plot3d(((1 - (3/8 - 3*t^2 - 2*t^4 - 9*x^2 - 10*x^4 - 12*t^2*x^2) + > i*x*(15/4 + 6*t^2 - 4*t^2 - 2*x^2 - 4*x^4 + 8*t^2*x^2))/(1/8*(3/4 + 9*t^2 + > 4*t^2+ 16/3*t^6 + 33*x^2 + 36*x^24 + 16/3*x^6)))*e^(i*x)),

[sage-support] Re: Plotting long functions

2016-12-28 Thread Fjordforsk A/S
This is how its supposed to go: sage: plot3d(((1 - (3/8 - 3*t^2 - 2*t^4 - 9*x^2 - 10*x^4 - 12*t^2*x^2) + i*x*(15/4 + 6*t^2 - 4*t^2 - 2*x^2 - 4*x^4 + 8*t^2*x^2))/(1/8*(3/4 + 9*t^2 + 4*t^2+ 16/3*t^6 + 33*x^2 + 36*x^24 + 16/3*x^6)))*e^(i*x)), (x, -2, 2), (t, -2, 2) However, Sage thinks that 3*t^

Re: [sage-support] Re: Plotting 3D polyhedra does not work

2016-10-31 Thread William Stein
For what it is worth, this works fine in SageMathCloud https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2016-10-31-083851%20polyhedron.sagews which you can easily run locally via Docker: https://github.com/sagemathinc/smc/blob/master/src/dev/docker/READ

[sage-support] Re: Plotting 3D polyhedra does not work

2016-10-31 Thread marechalalex
I use Ubuntu 14.04 and Sage 6.8. If i remember correctly I used a binary to install it. I indeed tried to upgrade my OS, but i went into some troubles doing it (not enough remaining space on my disk). The strange thing is that i asked my colleagues to try with various OS and Sage version (even

[sage-support] Re: Plotting 3D polyhedra does not work

2016-10-31 Thread slelievre
Fri 2016-10-28 17:07:03 UTC+2, marech...@gmail.com: > > Hello, > > I have troubles plotting 3D polyhedra. I don't understand what happens > because I've done it for several years and it is the first time it does not > work. > > Small example : > > # 2*x + y >= 0 ; -x - y + 2 - z >= 0 ; z >= 0

[sage-support] Re: Plotting 3D polyhedra does not work

2016-10-29 Thread Dominique Laurain
> > > Working for me, just now for cell in worksheet sagemath cloud : I can see the solid (blue color) for the first plot P.projection().render_solid_3d Dominique -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group

[sage-support] Re: plotting ln(x) graph on sagemath

2016-09-20 Thread HG
syntax should be show(P) or P but not print P which gives you your result Le samedi 17 septembre 2016 23:13:05 UTC+2, Anoz a écrit : > > I'm trying to plot the graph ln(1+x/1-x) how do I do this on sagemath , I > just need the correct syntax. > -- You received this message because you are su

[sage-support] Re: plotting ln(x) graph on sagemath

2016-09-20 Thread HG
On mine sage 7.3 it does it straight Le samedi 17 septembre 2016 23:13:05 UTC+2, Anoz a écrit : > > I'm trying to plot the graph ln(1+x/1-x) how do I do this on sagemath , I > just need the correct syntax. > -- You received this message because you are subscribed to the Google Groups "sage-sup

[sage-support] Re: plotting ln(x) graph on sagemath

2016-09-20 Thread HG
Maybe fist write %matplotlib inline Sometimes I got the same problem I do it first with python2 kernel and after I do it with sagemath again Le samedi 17 septembre 2016 23:13:05 UTC+2, Anoz a écrit : > > I'm trying to plot the graph ln(1+x/1-x) how do I do this on sagemath , I > just need the co

Re: [sage-support] Re: plotting ln(x) graph on sagemath

2016-09-19 Thread Jori Mäntysalo
On Sun, 18 Sep 2016, jack wrote: Ubuntu16.04.  P=plot(log((1+x)/(1-x)), (x, -1,1)) show(P) gives a lengthy error message which ends with ImportError: cannot import name scimath I installed sage at /home/jack/Tools One clue might be the initial message I get on initiating sage in a terminal.

[sage-support] Re: plotting ln(x) graph on sagemath

2016-09-18 Thread jack
On Saturday, 17 September 2016 17:13:05 UTC-4, Anoz wrote: > > I'm trying to plot the graph ln(1+x/1-x) how do I do this on sagemath , I > just need the correct syntax. > I have just tried this on my newly installed sage7.3 on my new computer with Ubuntu16.04. P=plot(log((1+x)/(1-x)), (x, -1,

[sage-support] Re: Plotting surfaces with holes ?

2015-12-11 Thread Emmanuel Charpentier
I did thought of that. The problem is to determine in advance the right pseudo-value to use in order not to squash the z values of interest and not to obscure the view of the surface(s) of interest (plot3d does not have, alas, xmin, ymin zmin, xmax, ymax, zmax parameters...). Sincerely, -- E

[sage-support] Re: Plotting surfaces with holes ?

2015-12-09 Thread slelievre
2015-12-05 21:03:04 UTC+1, Emmanuel Charpentier: > > Plot2d() gracefully handles plotting a fnction undefined (in real terms) > on part of the plotting domain. For example : > plot(sqrt(x^2-1),(x,-3/2,3.2)) > displays two half-axes of hyperbole, and waons that some points have been > lost. > >

[sage-support] Re: Plotting surfaces with holes ?

2015-12-05 Thread Emmanuel Charpentier
Of course, there is no such thing as plot2d(). Thinko... Please read plot() ... Le samedi 5 décembre 2015 21:03:04 UTC+1, Emmanuel Charpentier a écrit : > > Plot2d() gracefully handles plotting a fnction undefined (in real terms) > on part of the plotting domain. For example : > plot(sqrt(x^2-1),

[sage-support] Re: Plotting a q analogue function as a challenge?

2015-08-17 Thread saad khalid
I see, thank you again! I tried editting bits of your code to see why mine wasn't working. It seems as though the main difference between our code is that you "import *" whereas I was doing "import qgamma." When I run my code with "import *", it works for some reason. Would you happen to know wh

[sage-support] Re: Plotting a q analogue function as a challenge?

2015-08-17 Thread Dominique Laurain
OK .. what you want is : from mpmath import * plot(lambda q: qgamma(mpf(0.5),mpf(q)), (0, .99)) print sqrt(pi) Bonus (my notation Fq is gammaq function and F is gamma function) : from https://en.wikipedia.org/wiki/Q-gamma_function : lim Fq(x) q->1 = F(x) from https://en.wikipedia.org/wiki/G

[sage-support] Re: Plotting a q analogue function as a challenge?

2015-08-16 Thread saad khalid
Just for clarification, how did you know from looking at the line "qgamma(z+ 1,q)" that q was supposed to be the first argument given? Because they put their variable q in second. Just to double check with wolframalpha, I ran it here: http://www.wolframalpha.com/input/?i=plot+QGamma%28z%2C.5%29%

[sage-support] Re: Plotting a q analogue function as a challenge?

2015-08-16 Thread saad khalid
Thank you so much for your help! I'm sorry for the lack of clarity, I will work on that. I really appreciate the help everyone gave, thanks again! -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving

[sage-support] Re: Plotting a q analogue function as a challenge?

2015-08-16 Thread Dominique Laurain
Explaining better what you want, and you get better help... ..now I understand what you are trying to plot (in 2D, for one specific value of q) 1) Restart worksheet 2) Copy in cell from mpmath import * plot(lambda x: qgamma(mpf(x),mpf(0.5)), (0, .99)) 3) Run it => you get your plot Extra :

[sage-support] Re: Plotting a q analogue function as a challenge?

2015-08-15 Thread saad khalid
from mpmath import qgamma plot(lambda x: qgamma(.5,x), (x, 0, .99)) That's my code, I ran it again in an entirely new project, and i'm getting a NoConvergence error. I'm not sure why the error changed between projects, but there it is. -- You received this message because you are subscribed t

[sage-support] Re: Plotting a q analogue function as a challenge?

2015-08-15 Thread saad khalid
I did this code: from mpmath import * plot(qgamma((.5,x), (x, 0, .99))) I'm just trying to get a 2D plot for x =.5, with q going from 0 to .99. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving

[sage-support] Re: Plotting a q analogue function as a challenge?

2015-08-15 Thread Dominique Laurain
Trying in the cloud : 1) Code given http://trac.sagemath.org/ticket/19032 var('q,x') from mpmath import qgamma plot3d(lambda q,x: qgamma(q,x), (q, 0.5, 3), (x, 2, 10)) => working fine, using plot3d 2) Your code given previously var('q,x') from mpmath import qgamma plot3d(lambda x: qgamma(.

[sage-support] Re: plotting derivative of a function object has no attribute _set_extra_kwds

2015-06-08 Thread Dominique Laurain
Hello Chris; Thank you... you understood me :-) Sometimes I want to remind what is written on the main "sage-support"... *Guidelines*: 1. only one question per post | 2. descriptive subject title | 3. also describe the desired result and the context of the problem. *Include*: Platform (CPU

[sage-support] Re: plotting derivative of a function object has no attribute _set_extra_kwds

2015-06-07 Thread Chris Cowden
Hi Dominique, Sorry, I didn't intend to not be nice. In putting together the following example I was able to solve this problem by setting the domain of the variables to 'real'. 1) Here is a full short example: var('h','t','px','py','pz','w','R') P=vector([px,py,pz]) r=vector([R*cos(t*w),

[sage-support] Re: plotting derivative of a function object has no attribute _set_extra_kwds

2015-06-07 Thread Dominique Laurain
Hello Chris, Be nice: 1. post a full short example...delta is not defined 2. worksheet in SAGE cloud ? worksheet of your own computer, sagemath local install ? Dominique -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this

[sage-support] Re: Plotting arrays against each other

2015-04-26 Thread slelievre
Maybe point2d and zip can help? Could you provide an example (maybe the example that triggers the error you quoted)? Samuel 2015-04-27 04:00:26 UTC+2, Brenton: > Hi, I started numerical computing in MATLAB and it is the math software I > am the most familiar with hence why I was wondering if it

[sage-support] Re: Plotting arrays against each other

2015-04-26 Thread Brenton
I am running Sage 6.6 via VirtualBox, if relevant. On Monday, 27 April 2015 12:00:26 UTC+10, Brenton wrote: > > Hi, I started numerical computing in MATLAB and it is the math software I > am the most familiar with hence why I was wondering if it is possible to > plot two column vectors (that ar

[sage-support] Re: Plotting Piece-wise Functions?

2014-07-10 Thread Chris Maness
I got it. I see that I am not supposed to but limits in the plot function. The limits of the piecewise function provide that information. This works: f1=x*e^x; f2=x*e^(-x); f=Piecewise([[(-5,0),f1],[(0,5),f2]]); f.plot() Chris On Thu, Jul 10, 2014 at 8:42 AM, Chris Maness wrote: > I am not c

[sage-support] Re: plotting matrix transformations of unit ball in the p-norm

2014-03-03 Thread P Purkayastha
We used something like this for a class once. You can follow which point is transformed where def vector_plotter(vec_list, points=False, **kwds): pic = Graphics() for c, v in zip(rainbow(len(vec_list), 'rgbtuple'), vec_list): if points: pic += point(v, rgbcolor=c, *

[sage-support] Re: plotting matrix transformations of unit ball in the p-norm

2014-03-03 Thread Jason Grout
On 3/2/14, 9:52, martyall wrote: I would like to plot the "effects" of an 2 by 2 matrix over the reals on the unit sphere in the p-norm. By effects I mean I would like to plot the unit sphere and it's image under a given matrix. In clearest case when p=2 I found the following code from trac #9728

[sage-support] Re: Plotting a trigonometric function with many variables

2014-01-25 Thread Dominique Laurain
You have some ways to draw 2D curves in 3 variables f(x,y,z) 1.parametrize curve with two variables u,v with x = x(u,v); y = y(u,v); z = z(u,v) then f(x,y,z) = F(u,v) this can be done for many curves 2.use N discrete values for z and plot N curves f1(x,y) = f(x,y,z1), ..., fN(x,y) = f(x,y,z

[sage-support] Re: Plotting a trigonometric function with many variables

2014-01-25 Thread Sami
Assume A = time, B = frequency and C = intensity. Doing 2D plot should be possible. Best regards, Sami On Wednesday, 21 October 2009 18:43:54 UTC+3, kcrisman wrote: > > Dear Sami, > > Unfortunately, your request is somewhat vague. In general, it is not > possible to visualize the graph of a f

[sage-support] Re: plotting boxes

2013-09-16 Thread Carl Eberhart
thanks. i'll try it. On Sunday, September 15, 2013 2:20:45 PM UTC-5, Nils Bruin wrote: > > > > On Sunday, September 15, 2013 12:12:39 PM UTC-7, Carl Eberhart wrote: >> >> I would like to restrict a 3d plot to a certain box in space, say (x,0,1) >> (y,0,1),(z,.5,1.5) >> This would be useful in ma

[sage-support] Re: plotting boxes

2013-09-15 Thread Nils Bruin
On Sunday, September 15, 2013 12:12:39 PM UTC-7, Carl Eberhart wrote: > > I would like to restrict a 3d plot to a certain box in space, say (x,0,1) > (y,0,1),(z,.5,1.5) > This would be useful in many situations, say when you want to inspect the > part of a graph of z=f(x,y) > where z is betwe

[sage-support] Re: Plotting (non-compact) polyhedra and (half) infinite rays/lines

2012-09-18 Thread moritz
Thanks for the fast reply! On Tuesday, September 18, 2012 6:24:29 PM UTC+2, Volker Braun wrote: > > There is not enough space on your screen to plot non-compact polyhedra, so > what exactly do you expect as output? well, the same is true for function plotting but f=3*x; plot(f) gives a reasona

[sage-support] Re: Plotting (non-compact) polyhedra and (half) infinite rays/lines

2012-09-18 Thread Volker Braun
There is not enough space on your screen to plot non-compact polyhedra, so what exactly do you expect as output? Right now, the compact part plus (minkowski sum) the interval (origin, ray generator) is drawn. I guess you expect the whole half plane clipped by the plot window? How big should the

Re: [sage-support] Re: plotting functions with onsets

2012-04-27 Thread Jose Guzman
On 27/04/12 21:55, Jason Grout wrote: On 4/27/12 2:38 PM, Jose Guzman wrote: On 27/04/12 20:52, Jason Grout wrote: On 4/27/12 10:15 AM, Jose Guzman wrote: Dear colleagues, I am trying to manipulate an expression that starts at a time = "tonset". Everything works nice until I try to plot. #de

[sage-support] Re: plotting functions with onsets

2012-04-27 Thread Jason Grout
On 4/27/12 2:38 PM, Jose Guzman wrote: On 27/04/12 20:52, Jason Grout wrote: On 4/27/12 10:15 AM, Jose Guzman wrote: Dear colleagues, I am trying to manipulate an expression that starts at a time = "tonset". Everything works nice until I try to plot. #define independent variable sage: t = var

Re: [sage-support] Re: plotting functions with onsets

2012-04-27 Thread Jose Guzman
On 27/04/12 20:52, Jason Grout wrote: On 4/27/12 10:15 AM, Jose Guzman wrote: Dear colleagues, I am trying to manipulate an expression that starts at a time = "tonset". Everything works nice until I try to plot. #define independent variable sage: t = var('t') # define parameters sage: taum, t

[sage-support] Re: plotting functions with onsets

2012-04-27 Thread Jason Grout
On 4/27/12 10:15 AM, Jose Guzman wrote: Dear colleagues, I am trying to manipulate an expression that starts at a time = "tonset". Everything works nice until I try to plot. #define independent variable sage: t = var('t') # define parameters sage: taum, tauh = var('taum, tauh') sage: tonset=va

Re: [sage-support] Re: Plotting untouched linear system

2012-02-23 Thread bthomas
Yes, exactly! Thank you Jason: Th - Original Message - From: Jason Grout To: sage-support@googlegroups.com Sent: Thu, 23 Feb 2012 10:46:44 -0600 Subject: [sage-support] Re: Plotting untouched linear system On 2/23/12 10:30 AM, btho...@nexus.hu wrote: > Hello, > > For clarit

[sage-support] Re: Plotting untouched linear system

2012-02-23 Thread Jason Grout
On 2/23/12 10:30 AM, btho...@nexus.hu wrote: Hello, For clarity reasons, in notebook, im trying to print a system before any symbolic manipulation: A=matrix(3,3,[x0,y0,1,x1,y1,1,x2,y2,1]) unk= vector(3,[a,b,c]) rhs=vector(3,[w0,w1,w2]) I would like to print A*unk=rhs such that the output becom

[sage-support] Re: Plotting weighted graph

2011-12-10 Thread akm
On Dec 9, 5:47 pm, "D. S. McNeil" wrote: > > Hi all, I'm confused why this code results in a graph plotted with the > > (single) edges labeled with the weight between each pair of vertices: > > > M = Matrix([[0,1,-1,5],[1,0,-1/2,-1],[-1,-1/2,0,2],[5,-1,2,0]]) > > G = Graph(M,sparse=True) > > G.plo

[sage-support] Re: Plotting data from a CSV file

2011-10-03 Thread Jason Grout
On 10/3/11 5:21 AM, Vince wrote: Hi all, I've been attempting to plot some data from a CSV file (two columns) in SAGE and I've completely failed. Is there a nice tutorial on line somewhere? If not could anyone perhaps point me to a good starting point (I've been unable to import the data in to S

[sage-support] Re: Plotting Electric Field Lines

2011-06-25 Thread Volker Braun
You can use one of the ODE solvers... -- 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 URL: http://www.s

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

2011-05-07 Thread Jason Grout
On 5/7/11 5:00 PM, ObsessiveMathsFreak wrote: I still can't get this code to work. In lieu of any external solutions, I've tried to hack something together in sage itself, using the standard 3d functionality. Basically it involves drawing a series of implicit plot 3d countours, then cutting into

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

2011-05-07 Thread ObsessiveMathsFreak
that > you are not quite familiar to mayavi, > I'm sending a code I modify to plot an interpolation of Mexico's City (data > points file included) , and some nice pictures I got with mayavi. > > Regards, > Jorge > > > > > > > > > Date: Fri

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

2011-05-06 Thread ObsessiveMathsFreak
Python parafernalia, I have been > > since then working with it inside sage, > > without any problem. > > > Regards > > Jorge > > > > Date: Thu, 5 May 2011 12:40:55 -0700 > > > Subject: [sage-support] Re: Plotting Functions of 3 variables > >

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

2011-05-06 Thread ObsessiveMathsFreak
king with it inside sage, > without any problem. > > Regards > Jorge > > > > > > > > > Date: Thu, 5 May 2011 12:40:55 -0700 > > Subject: [sage-support] Re: Plotting Functions of 3 variables > > From: obsessivemathsfr...@gmail.com > > To: sage

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

2011-05-05 Thread Jorge E . ´Sanchez Sanchez
u, 5 May 2011 12:40:55 -0700 > Subject: [sage-support] Re: Plotting Functions of 3 variables > From: obsessivemathsfr...@gmail.com > To: sage-support@googlegroups.com > > _None_ of those experimental packages work on my system. The first > dependancy, wxPython-2.8.7.1.spkg give

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

2011-05-05 Thread ObsessiveMathsFreak
_None_ of those experimental packages work on my system. The first dependancy, wxPython-2.8.7.1.spkg give the following error (after taking ages compiling) In file included from ../src/gtk/gsockgtk.cpp:21: ../include/wx/gsocket.h:40: error: using typedef-name ‘GSocket’ after ‘class’ /usr/include/g

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

2011-05-05 Thread kcrisman
On May 5, 1:43 pm, ObsessiveMathsFreak wrote: > Thanks but, these methods are not wholly adequate for my purposes. > > I have been investigating the mayavi python package and the examples > given > herehttp://code.enthought.com/projects/mayavi/docs/development/html/mayav... > > Apparently sagem

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

2011-05-05 Thread Kelvin Li
> > > 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) Not sure about color, but `implicit_plot3d` can produce 3D contour plots. http://www.sagemath.org/doc/reference/sage/plot/plot3d/implicit_plot3d.html > >

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

2011-05-05 Thread ObsessiveMathsFreak
Thanks but, these methods are not wholly adequate for my purposes. I have been investigating the mayavi python package and the examples given here http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/mlab_case_studies.html#mlab-case-studies Apparently sagemath has support for ma

  1   2   3   >