[sage-support] Re: Plot zeros of complex function
Did you try e.g. complex_plot(x-abs(x), (-1,1), (-1,1)) The plot contains more information than just the region of zeroes. Usually the phase information is quite interesting. I don't think we have a function to just give you the zeroes (which is numerically difficult) On Sunday, June 9, 2013 11:30:07 PM UTC+1, computati...@gmail.com wrote: How do you plot the zeros of a complex function in sage? For instance, I am interested in plotting the zero sets of some complex functions with a continuous family of zeros (i.e. f(z)=z-|z|), in a way that is independent of how complicated the expression for f(z) is. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: Getting __name__ (or similar) of load-ed script?
The load() and attach()ed files should obviously be treated the same (except for the reloading part), and offer a unified interface. Right now that is IMHO a lot of spaghetti code that grew over the years. The fact that even simple patches don't get reviewed (http://trac.sagemath.org/14523) did not make me more eager to delve into this. On Monday, June 10, 2013 12:03:33 AM UTC+1, leif wrote: [I think there was some related thread recently on sage-devel, since tracebacks don't always contain the proper filename either IIRC.] -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] multiple instances of sage -notebook
On Friday, June 7, 2013 12:18:49 PM UTC-5, William wrote: By the way, I'm curious what features are missing from https://cloud.sagemath.com that you might need for it to work for your project? For example, what extra packages would you need, documentation, etc.? Too many bugs (if so, which ones, so I can fix them)? Is the network connection too slow? Not enough disk space? Compute servers are too slow? Well, to start with I would need to know cloud.sagemath.com existed: this wasn't an option last time I had a problem that couldn't be solved at sagenb.org . Last night I rolled out a feature so multiple people can collaborate on worksheets, files, terminals, etc. in the same project (=a Linux account on a VM) simultaneously, which could be useful for collaborative projects. Also, you can download and install your own copy of Sage into a project on cloud.sagemath, and even switch to using that copy of Sage for worksheets. Documentation is definitely key here: when you first log in to cloud.sagemath.org, it just tells you a project is a collection of files and folders. It's not obvious that you'll get a Linux machine from a project. It's also not obvious to me which of the several ways of installing Sage is the proper one for this setting. UAW -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] multiple instances of sage -notebook
Can folks help me troubleshoot the password problem described below? I installed Sage in my personal directory, and set the permissions so that the two other members of my research group can also run my copy of Sage. I ran ./sage -notebook , and created an admin account and a personal account on that version of the notebook. Meanwhile, one of my students logged in, also ran ./sage -notebook , and was prompted to create his own admin account. He did so, but although he was able to see the notebook, the admin password didn't work. He tried resetting the admin password, but still was not able to log in. I was able to load his version of the notebook and test my own admin password, which also didn't work. [...] Any idea what is going wrong with my student's admin password? What trouble-shooting steps should we try? UAW -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] multiple instances of sage -notebook
On Jun 10, 2013 7:16 AM, Ursula Whitcher whitc...@uwec.edu wrote: On Friday, June 7, 2013 12:18:49 PM UTC-5, William wrote: By the way, I'm curious what features are missing from https://cloud.sagemath.com that you might need for it to work for your project? For example, what extra packages would you need, documentation, etc.? Too many bugs (if so, which ones, so I can fix them)? Is the network connection too slow? Not enough disk space? Compute servers are too slow? Well, to start with I would need to know cloud.sagemath.com existed: this wasn't an option last time I had a problem that couldn't be solved at sagenb.org . It's only existed for just over a month. Last night I rolled out a feature so multiple people can collaborate on worksheets, files, terminals, etc. in the same project (=a Linux account on a VM) simultaneously, which could be useful for collaborative projects. Also, you can download and install your own copy of Sage into a project on cloud.sagemath, and even switch to using that copy of Sage for worksheets. Documentation is definitely key here: when you first log in to cloud.sagemath.org, it just tells you a project is a collection of files and folders. It's not obvious that you'll get a Linux machine from a project. It's also not obvious to me which of the several ways of installing Sage is the proper one for this setting. There is no documentation yet though I started writing some yesterday... UAW -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Plot the zeros of a complex function
On Sun, Jun 9, 2013 at 3:25 PM, computational.gr...@gmail.com wrote: Suppose I have a complex function f(z) with a continuous family of zeros (e.g., f(z)=z-|z|) Is there a way to easily plot the set of zeros of f in sage, regardless of how complicated the function f is? You might find complex_plot useful. For example, for f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3)) you'll see a *black line* at the zero set of f(z). In the notebook you mind find an interact like this useful: z = var('z') @interact def _(f = z-abs(z), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) Or just click on http://sagecell.sagemath.org/?q=cdcdd7e5-73b4-4c87-87e2-1be300f86674 -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Re: Plot zeros of complex function
can replace z = a + bj and then solve the system of nonlinear equations Re { z} = 0 and Im {z} = 0 2013/6/10 Volker Braun vbraun.n...@gmail.com Did you try e.g. complex_plot(x-abs(x), (-1,1), (-1,1)) The plot contains more information than just the region of zeroes. Usually the phase information is quite interesting. I don't think we have a function to just give you the zeroes (which is numerically difficult) On Sunday, June 9, 2013 11:30:07 PM UTC+1, computati...@gmail.com wrote: How do you plot the zeros of a complex function in sage? For instance, I am interested in plotting the zero sets of some complex functions with a continuous family of zeros (i.e. f(z)=z-|z|), in a way that is independent of how complicated the expression for f(z) is. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Plot the zeros of a complex function
Thanks, this is exactly what I was looking for! In fact, I had tried out complex_plot but I must have been using a different color function or something, because the roots were much less apparent to me. Not sure why I couldn't figure this out on my own... I suppose I have two follow-up questions now: 1. how can I improve the precision of the zero set (it seems to be drawn in low resolution right now) 2. what is the best way to turn off the other colors (draw non-zeros as white) On Monday, June 10, 2013 10:02:12 AM UTC-5, William wrote: On Sun, Jun 9, 2013 at 3:25 PM, computati...@gmail.com javascript: wrote: Suppose I have a complex function f(z) with a continuous family of zeros (e.g., f(z)=z-|z|) Is there a way to easily plot the set of zeros of f in sage, regardless of how complicated the function f is? You might find complex_plot useful. For example, for f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3)) you'll see a *black line* at the zero set of f(z). In the notebook you mind find an interact like this useful: z = var('z') @interact def _(f = z-abs(z), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) Or just click on http://sagecell.sagemath.org/?q=cdcdd7e5-73b4-4c87-87e2-1be300f86674 -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com javascript:. To post to this group, send email to sage-s...@googlegroups.comjavascript:. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Plot the zeros of a complex function
On Mon, Jun 10, 2013 at 9:09 AM, computational.gr...@gmail.com wrote: Thanks, this is exactly what I was looking for! In fact, I had tried out complex_plot but I must have been using a different color function or something, because the roots were much less apparent to me. Not sure why I couldn't figure this out on my own... I suppose I have two follow-up questions now: 1. how can I improve the precision of the zero set (it seems to be drawn in low resolution right now) Use plot_points: f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3), plot_points=200) 2. what is the best way to turn off the other colors (draw non-zeros as white) I don't know if this is possible or implemented at present. On Monday, June 10, 2013 10:02:12 AM UTC-5, William wrote: On Sun, Jun 9, 2013 at 3:25 PM, computati...@gmail.com wrote: Suppose I have a complex function f(z) with a continuous family of zeros (e.g., f(z)=z-|z|) Is there a way to easily plot the set of zeros of f in sage, regardless of how complicated the function f is? You might find complex_plot useful. For example, for f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3)) you'll see a *black line* at the zero set of f(z). In the notebook you mind find an interact like this useful: z = var('z') @interact def _(f = z-abs(z), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) Or just click on http://sagecell.sagemath.org/?q=cdcdd7e5-73b4-4c87-87e2-1be300f86674 -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com. To post to this group, send email to sage-s...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Plot the zeros of a complex function
Ah, that's unfortunate. Might be a fun summer project to try to implement, if I knew where to start. On another note: I really like the @interact annotation. I'm messing around with it, because I would like to add another parameter to my plot - an integer representing an index in a discrete family of functions. But I keep getting python errors about my expression not being symbolic when I try to include an integer parameter (like n = var('n'), then passing in n=2). Any tips? On Monday, June 10, 2013 11:13:41 AM UTC-5, William wrote: On Mon, Jun 10, 2013 at 9:09 AM, computati...@gmail.com javascript: wrote: Thanks, this is exactly what I was looking for! In fact, I had tried out complex_plot but I must have been using a different color function or something, because the roots were much less apparent to me. Not sure why I couldn't figure this out on my own... I suppose I have two follow-up questions now: 1. how can I improve the precision of the zero set (it seems to be drawn in low resolution right now) Use plot_points: f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3), plot_points=200) 2. what is the best way to turn off the other colors (draw non-zeros as white) I don't know if this is possible or implemented at present. On Monday, June 10, 2013 10:02:12 AM UTC-5, William wrote: On Sun, Jun 9, 2013 at 3:25 PM, computati...@gmail.com wrote: Suppose I have a complex function f(z) with a continuous family of zeros (e.g., f(z)=z-|z|) Is there a way to easily plot the set of zeros of f in sage, regardless of how complicated the function f is? You might find complex_plot useful. For example, for f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3)) you'll see a *black line* at the zero set of f(z). In the notebook you mind find an interact like this useful: z = var('z') @interact def _(f = z-abs(z), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) Or just click on http://sagecell.sagemath.org/?q=cdcdd7e5-73b4-4c87-87e2-1be300f86674 -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com. To post to this group, send email to sage-s...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com javascript:. To post to this group, send email to sage-s...@googlegroups.comjavascript:. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Plot the zeros of a complex function
Okay, so the following works: z = var('z') n = 2 @interact def _(f = ((z+1)^n-abs(z^n+1)), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) But the following doesn't: z = var('z') @interact def _(f = ((z+1)^n-abs(z^n+1)), n = (2..10), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) On Monday, June 10, 2013 11:33:01 AM UTC-5, William wrote: On Mon, Jun 10, 2013 at 9:24 AM, computati...@gmail.com javascript: wrote: Ah, that's unfortunate. Might be a fun summer project to try to implement, if I knew where to start. 1. http://www.sagemath.org/development.html 2. SAGE_ROOT/devel/sage/sage/plot/complex_plot.pyx which I found by doing search_src('complex_plot') On another note: I really like the @interact annotation. I'm messing around with it, because I would like to add another parameter to my plot - an integer representing an index in a discrete family of functions. But I keep getting python errors about my expression not being symbolic when I try to include an integer parameter (like n = var('n'), then passing in n=2). Any tips? Just put n = 2 instead? You have to post code for a more useful answer On Monday, June 10, 2013 11:13:41 AM UTC-5, William wrote: On Mon, Jun 10, 2013 at 9:09 AM, computati...@gmail.com wrote: Thanks, this is exactly what I was looking for! In fact, I had tried out complex_plot but I must have been using a different color function or something, because the roots were much less apparent to me. Not sure why I couldn't figure this out on my own... I suppose I have two follow-up questions now: 1. how can I improve the precision of the zero set (it seems to be drawn in low resolution right now) Use plot_points: f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3), plot_points=200) 2. what is the best way to turn off the other colors (draw non-zeros as white) I don't know if this is possible or implemented at present. On Monday, June 10, 2013 10:02:12 AM UTC-5, William wrote: On Sun, Jun 9, 2013 at 3:25 PM, computati...@gmail.com wrote: Suppose I have a complex function f(z) with a continuous family of zeros (e.g., f(z)=z-|z|) Is there a way to easily plot the set of zeros of f in sage, regardless of how complicated the function f is? You might find complex_plot useful. For example, for f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3)) you'll see a *black line* at the zero set of f(z). In the notebook you mind find an interact like this useful: z = var('z') @interact def _(f = z-abs(z), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) Or just click on http://sagecell.sagemath.org/?q=cdcdd7e5-73b4-4c87-87e2-1be300f86674 -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com. To post to this group, send email to sage-s...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com. To post to this group, send email to sage-s...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com javascript:. To post to this group, send email to sage-s...@googlegroups.comjavascript:. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at
Re: [sage-support] Plot the zeros of a complex function
On Mon, Jun 10, 2013 at 9:24 AM, computational.gr...@gmail.com wrote: Ah, that's unfortunate. Might be a fun summer project to try to implement, if I knew where to start. 1. http://www.sagemath.org/development.html 2. SAGE_ROOT/devel/sage/sage/plot/complex_plot.pyx which I found by doing search_src('complex_plot') On another note: I really like the @interact annotation. I'm messing around with it, because I would like to add another parameter to my plot - an integer representing an index in a discrete family of functions. But I keep getting python errors about my expression not being symbolic when I try to include an integer parameter (like n = var('n'), then passing in n=2). Any tips? Just put n = 2 instead? You have to post code for a more useful answer On Monday, June 10, 2013 11:13:41 AM UTC-5, William wrote: On Mon, Jun 10, 2013 at 9:09 AM, computati...@gmail.com wrote: Thanks, this is exactly what I was looking for! In fact, I had tried out complex_plot but I must have been using a different color function or something, because the roots were much less apparent to me. Not sure why I couldn't figure this out on my own... I suppose I have two follow-up questions now: 1. how can I improve the precision of the zero set (it seems to be drawn in low resolution right now) Use plot_points: f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3), plot_points=200) 2. what is the best way to turn off the other colors (draw non-zeros as white) I don't know if this is possible or implemented at present. On Monday, June 10, 2013 10:02:12 AM UTC-5, William wrote: On Sun, Jun 9, 2013 at 3:25 PM, computati...@gmail.com wrote: Suppose I have a complex function f(z) with a continuous family of zeros (e.g., f(z)=z-|z|) Is there a way to easily plot the set of zeros of f in sage, regardless of how complicated the function f is? You might find complex_plot useful. For example, for f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3)) you'll see a *black line* at the zero set of f(z). In the notebook you mind find an interact like this useful: z = var('z') @interact def _(f = z-abs(z), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) Or just click on http://sagecell.sagemath.org/?q=cdcdd7e5-73b4-4c87-87e2-1be300f86674 -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com. To post to this group, send email to sage-s...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com. To post to this group, send email to sage-s...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Plot the zeros of a complex function
Try this: z,n = var('z,n') @interact def _(f = ((z+1)^n-abs(z^n+1)), n = (2..10), B=(2..10)): f = f.subs(n=n) show(f) show(complex_plot(f, (-B,B), (-B,B))) On Mon, Jun 10, 2013 at 9:42 AM, computational.gr...@gmail.com wrote: Okay, so the following works: z = var('z') n = 2 @interact def _(f = ((z+1)^n-abs(z^n+1)), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) But the following doesn't: z = var('z') @interact def _(f = ((z+1)^n-abs(z^n+1)), n = (2..10), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) On Monday, June 10, 2013 11:33:01 AM UTC-5, William wrote: On Mon, Jun 10, 2013 at 9:24 AM, computati...@gmail.com wrote: Ah, that's unfortunate. Might be a fun summer project to try to implement, if I knew where to start. 1. http://www.sagemath.org/development.html 2. SAGE_ROOT/devel/sage/sage/plot/complex_plot.pyx which I found by doing search_src('complex_plot') On another note: I really like the @interact annotation. I'm messing around with it, because I would like to add another parameter to my plot - an integer representing an index in a discrete family of functions. But I keep getting python errors about my expression not being symbolic when I try to include an integer parameter (like n = var('n'), then passing in n=2). Any tips? Just put n = 2 instead? You have to post code for a more useful answer On Monday, June 10, 2013 11:13:41 AM UTC-5, William wrote: On Mon, Jun 10, 2013 at 9:09 AM, computati...@gmail.com wrote: Thanks, this is exactly what I was looking for! In fact, I had tried out complex_plot but I must have been using a different color function or something, because the roots were much less apparent to me. Not sure why I couldn't figure this out on my own... I suppose I have two follow-up questions now: 1. how can I improve the precision of the zero set (it seems to be drawn in low resolution right now) Use plot_points: f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3), plot_points=200) 2. what is the best way to turn off the other colors (draw non-zeros as white) I don't know if this is possible or implemented at present. On Monday, June 10, 2013 10:02:12 AM UTC-5, William wrote: On Sun, Jun 9, 2013 at 3:25 PM, computati...@gmail.com wrote: Suppose I have a complex function f(z) with a continuous family of zeros (e.g., f(z)=z-|z|) Is there a way to easily plot the set of zeros of f in sage, regardless of how complicated the function f is? You might find complex_plot useful. For example, for f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3)) you'll see a *black line* at the zero set of f(z). In the notebook you mind find an interact like this useful: z = var('z') @interact def _(f = z-abs(z), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) Or just click on http://sagecell.sagemath.org/?q=cdcdd7e5-73b4-4c87-87e2-1be300f86674 -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com. To post to this group, send email to sage-s...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com. To post to this group, send email to sage-s...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com. To post to this group, send email to sage-s...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this
Re: [sage-support] Plot the zeros of a complex function
Looks great, thanks for all the help! I'll see about messing around with complex_plot a bit to support pure zero plots, if it amounts to something I'll get back in touch... On Monday, June 10, 2013 11:55:28 AM UTC-5, William wrote: Try this: z,n = var('z,n') @interact def _(f = ((z+1)^n-abs(z^n+1)), n = (2..10), B=(2..10)): f = f.subs(n=n) show(f) show(complex_plot(f, (-B,B), (-B,B))) On Mon, Jun 10, 2013 at 9:42 AM, computati...@gmail.com javascript: wrote: Okay, so the following works: z = var('z') n = 2 @interact def _(f = ((z+1)^n-abs(z^n+1)), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) But the following doesn't: z = var('z') @interact def _(f = ((z+1)^n-abs(z^n+1)), n = (2..10), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) On Monday, June 10, 2013 11:33:01 AM UTC-5, William wrote: On Mon, Jun 10, 2013 at 9:24 AM, computati...@gmail.com wrote: Ah, that's unfortunate. Might be a fun summer project to try to implement, if I knew where to start. 1. http://www.sagemath.org/development.html 2. SAGE_ROOT/devel/sage/sage/plot/complex_plot.pyx which I found by doing search_src('complex_plot') On another note: I really like the @interact annotation. I'm messing around with it, because I would like to add another parameter to my plot - an integer representing an index in a discrete family of functions. But I keep getting python errors about my expression not being symbolic when I try to include an integer parameter (like n = var('n'), then passing in n=2). Any tips? Just put n = 2 instead? You have to post code for a more useful answer On Monday, June 10, 2013 11:13:41 AM UTC-5, William wrote: On Mon, Jun 10, 2013 at 9:09 AM, computati...@gmail.com wrote: Thanks, this is exactly what I was looking for! In fact, I had tried out complex_plot but I must have been using a different color function or something, because the roots were much less apparent to me. Not sure why I couldn't figure this out on my own... I suppose I have two follow-up questions now: 1. how can I improve the precision of the zero set (it seems to be drawn in low resolution right now) Use plot_points: f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3), plot_points=200) 2. what is the best way to turn off the other colors (draw non-zeros as white) I don't know if this is possible or implemented at present. On Monday, June 10, 2013 10:02:12 AM UTC-5, William wrote: On Sun, Jun 9, 2013 at 3:25 PM, computati...@gmail.com wrote: Suppose I have a complex function f(z) with a continuous family of zeros (e.g., f(z)=z-|z|) Is there a way to easily plot the set of zeros of f in sage, regardless of how complicated the function f is? You might find complex_plot useful. For example, for f(z) = z - abs(z) complex_plot(f, (-3,3), (-3,3)) you'll see a *black line* at the zero set of f(z). In the notebook you mind find an interact like this useful: z = var('z') @interact def _(f = z-abs(z), B=(2..10)): show(complex_plot(f, (-B,B), (-B,B))) Or just click on http://sagecell.sagemath.org/?q=cdcdd7e5-73b4-4c87-87e2-1be300f86674 -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com. To post to this group, send email to sage-s...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com. To post to this group, send email to sage-s...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an
[sage-support] Sage Speed Issues
Hi, I am expanding the Taylor series for an 8-dimensional exponential function and Sage is taking too much time as the the number of terms are increased. I am using Sage in notebook through VirtualBox. If I use Sage through terminal on my own PC, will it faster its execution? Any other suggestion to improve speed? Thanks Assad -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Sage Speed Issues
On Jun 10, 2013 4:56 PM, Asad Akhlaq assad.akh...@gmail.com wrote: Hi, I am expanding the Taylor series for an 8-dimensional exponential function and Sage is taking too much time as the the number of terms are increased. I am using Sage in notebook through VirtualBox. If I use Sage through terminal on my own PC, will it faster its execution? Any other suggestion to improve speed? Please post code. Thanks Assad -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.