Re: [sage-support] Re: discard and quit
On 01/25/2012 01:27:11 PM, john_perry_usm wrote: On Wed, Jan 25, 2012 at 10:45 AM, Jason Grout IIRC, if you have been editing a cell, but have not yet evaluated it, or if you have edited a text cell but not yet saved it, then Discard will throw away those changes, and Save will save them. Note that if you evaluate a cell, it is automatically saved first. That's the behavior I'm seeing, it's why I asked that question. My intuition was that Discard and quit should throw away changes even of evaluated cells if I hadn't saved the worksheet yet. Thanks for the clarification! So it's not a bug. What about a feature request? Discarding even evaluated cells since the last save would be _really_ useful to me ('twould have saved my bacon a few times). But is that something infeasible? john perry For what it's worth, I'd like to second this. I find it very painful that there is no way to quit a worksheet without saving changes. -Mike -- 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.sagemath.org
Re: Re : [sage-support] [fedora14] installation failed
On 11/15/2010 10:57:39 AM, Colombel Bruno wrote: Hi, As sage-4.6 doesn't work, i try to install sage-4.4.4 which was working on Fedora13 : Host system uname -a: Linux localhost.localdomain 2.6.35.6-48.fc14.x86_64 #1 SMP Fri Oct 22 15:36:08 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux CC Version gcc -v Utilisation des specs internes. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.5.1/lto-wrapper Target: x86_64-redhat-linux Configuré avec: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Modèle de thread: posix gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC) expr: error while loading shared libraries: libgmp.so.3: cannot enable executable stack as shared object requires: Permission denied friendly I put SELinux in permissive mode (for many reasons), which will fix this. But if you have stringent security concerns this might not work for you. If you don't have the GUI for SELinux management, do: yum install policycoreutils-gui -Mike -- 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.sagemath.org
[sage-support] Version of java used by the Sage command line
After a new Fedora 14 installation, I ended up with the default version of Java they use (IdedTea?) -- This didn't work for Sage/JMOL, either on the command line or in the Notebook. So, I installed the Oracle version. But both versions are now installed. I figured out how to tell Firefox to use the Oracle version, and now JMOL works fine in a notebook. But from the sage command line it's still not working. So, I suspect that the sage command line is still calling the other version of Java. Is there any way I can check what path it's using? -Mike -- 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.sagemath.org
Re: [sage-support] Version of java used by the Sage command line
On 11/12/2010 04:14:29 PM, Mitesh Patel wrote: On 11/12/2010 05:48 PM, Mike Witt wrote: After a new Fedora 14 installation, I ended up with the default version of Java they use (IdedTea?) -- This didn't work for Sage/JMOL, either on the command line or in the Notebook. So, I installed the Oracle version. But both versions are now installed. I figured out how to tell Firefox to use the Oracle version, and now JMOL works fine in a notebook. But from the sage command line it's still not working. So, I suspect that the sage command line is still calling the other version of Java. Is there any way I can check what path it's using? Could you check the symbolic link /etc/alternatives/java? What happens if you make this point to /path/to/oracle/java/bin/java? I believe it's correct: [m...@vector ~]$ /usr/bin/java -version java version 1.6.0_22 Java(TM) SE Runtime Environment (build 1.6.0_22-b04) Java HotSpot(TM) Server VM (build 17.1-b03, mixed mode) However, it was pointing to the IcedTea java when I built Sage. I just wondered if perhaps that got cached somehow. I guess that seems unlikely. Maybe the lack of 3d display from the command line is an unrelated problem? -Mike -- 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.sagemath.org
Re: [sage-support] Version of java used by the Sage command line
On 11/12/2010 05:49:49 PM, Mitesh Patel wrote: On 11/12/2010 06:43 PM, Mike Witt wrote: On 11/12/2010 04:14:29 PM, Mitesh Patel wrote: On 11/12/2010 05:48 PM, Mike Witt wrote: After a new Fedora 14 installation, I ended up with the default version of Java they use (IdedTea?) -- This didn't work for Sage/JMOL, either on the command line or in the Notebook. So, I installed the Oracle version. But both versions are now installed. I figured out how to tell Firefox to use the Oracle version, and now JMOL works fine in a notebook. But from the sage command line it's still not working. So, I suspect that the sage command line is still calling the other version of Java. Is there any way I can check what path it's using? Could you check the symbolic link /etc/alternatives/java? What happens if you make this point to /path/to/oracle/java/bin/java? I believe it's correct: [m...@vector ~]$ /usr/bin/java -version java version 1.6.0_22 Java(TM) SE Runtime Environment (build 1.6.0_22-b04) Java HotSpot(TM) Server VM (build 17.1-b03, mixed mode) However, it was pointing to the IcedTea java when I built Sage. I just wondered if perhaps that got cached somehow. I guess that seems unlikely. Maybe the lack of 3d display from the command line is an unrelated problem? Which Sage version are you using? Making a Jmol plot on the command-line invokes SAGE_LOCAL/bin/jmol Maybe JMOL_HOME is set incorrectly in this script? What happens if you put JMOL_HOME=/explicit/path/to/sage_root/devel/sagenb-main/sagenb/data/jmol near the top? Well, yes, that seems to be it. It took me a bit to figure out what to do, but now that I found the script ... as far as I can tell, JMOL_HOME was getting set to: /sagenb/data/jmol When I reset it, as you suggested, at the top of the script then everything started working (from the command line). So, it does appear that they were two separate problems. Oh, I'm using 4.6. If this is already a known issue, then my apologies. But thanks very much for the solution! -Mike -- 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.sagemath.org
[sage-support] Re: Version of java used by the Sage command line
On Nov 12, 7:08 pm, Mitesh Patel qed...@gmail.com wrote: On 11/12/2010 08:29 PM, Mike Witt wrote: On 11/12/2010 05:49:49 PM, Mitesh Patel wrote: On 11/12/2010 06:43 PM, Mike Witt wrote: On 11/12/2010 04:14:29 PM, Mitesh Patel wrote: On 11/12/2010 05:48 PM, Mike Witt wrote: After a new Fedora 14 installation, I ended up with the default version of Java they use (IdedTea?) -- This didn't work for Sage/JMOL, either on the command line or in the Notebook. So, I installed the Oracle version. But both versions are now installed. I figured out how to tell Firefox to use the Oracle version, and now JMOL works fine in a notebook. But from the sage command line it's still not working. So, I suspect that the sage command line is still calling the other version of Java. Is there any way I can check what path it's using? Could you check the symbolic link /etc/alternatives/java? What happens if you make this point to /path/to/oracle/java/bin/java? I believe it's correct: [m...@vector ~]$ /usr/bin/java -version java version 1.6.0_22 Java(TM) SE Runtime Environment (build 1.6.0_22-b04) Java HotSpot(TM) Server VM (build 17.1-b03, mixed mode) However, it was pointing to the IcedTea java when I built Sage. I just wondered if perhaps that got cached somehow. I guess that seems unlikely. Maybe the lack of 3d display from the command line is an unrelated problem? Which Sage version are you using? Making a Jmol plot on the command-line invokes SAGE_LOCAL/bin/jmol Maybe JMOL_HOME is set incorrectly in this script? What happens if you put JMOL_HOME=/explicit/path/to/sage_root/devel/sagenb-main/sagenb/data/jmol near the top? Well, yes, that seems to be it. It took me a bit to figure out what to do, but now that I found the script ... as far as I can tell, JMOL_HOME was getting set to: /sagenb/data/jmol When I reset it, as you suggested, at the top of the script then everything started working (from the command line). So, it does appear that they were two separate problems. Oh, I'm using 4.6. If this is already a known issue, then my apologies. But thanks very much for the solution! Does anyone else have this problem? FYI, I had built 4.6 on both FC-11 and FC-12 and this phenomenon did not occur on either of those systems. So I bet it's either some quirk of FC-14, or else some thing weird that I somehow did. Also, the same thing happens when I run 4.5.1 on this FC-14 install. So, it's definitely not anything to do with sage 4.6. -Mike -- 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.sagemath.org
Re: [sage-support] Those cookies again...
On 08/22/2010 01:56:18 AM, Dr. David Kirkby wrote: On 08/22/10 03:12 AM, kcrisman wrote: I don't know that we've had as many people complaining about cookies recently. Maybe this has been fixed. Unfortunately, we just upgraded our campus server to 4.3 (the latest VMWare image that we hadn't heard problems about) and apparently it is hexed by the cookie issue (namely, that it wants you to delete Sage cookies before it actually lets you log in). This is particularly vexing because I can't get it to let me log in at all. I can even get rid of all Sage cookies, restart the browser (Safari), go to the notebook server, then delete the one cookie I get there, and STILL it doesn't let me log in. I've seen that problem too. I can't say for sure whether it has been fixed, but I have some comments about this further down. Sysadmin has found possible workaround of deleting history of the browser. This is fine in a lab, but potentially very crippling for those of us who rely on auto-completion of often-visited sites. Sysadmin is also very unlikely to try 4.5.2 VMWare image after recent reports of it not being so hot, though I think those may have been exaggerated - and anyhow he has a lot to do with the start of classes. I expect Sage upgrades will slip further down your system admin's priority list if they are causing him problems. I am really hesitant to use this in class when I can't even make it work on my own computer properly. I don't blame you. I think I now start to understand the arguments about rather having one version that works rather than constant upgrades... Thanks, - kcrisman I think Peter Jeremy summed up the problem quite well when he said this on a trac ticket http://trac.sagemath.org/sage_trac/ticket/6456#comment:67 === From Peter Jeremy === I am very concerned at this release it now, we'll make it work later mentality. In my opinion, (and one I think that is shared by Peter too), Sage needs to devote *far* more time to testing, and a lot less time to adding features, if it's ever to become a viable alternative to the 4 M's. At the most basic level, the notebook does not even produce valid HTML. The login page has errors, which one discovers when one searches with the W3C validator. http://validator.w3.org/check?uri=http%3A%2F%2Fwww.sagenb.org%2Fcharset=%28detect+automatically%29doctype=Inlinegroup=0 I note two of the errors are: == # Error Line 91, Column 31: The for attribute of the label element must refer to a form control. label for=emailUsername/label ✉ # Error Line 96, Column 34: The for attribute of the label element must refer to a form control. label for=passwordPassword/label I wonder if those errors have anything to do with logging in? The only possible way Sage might get less buggy, is for more people with similar views to me, make them known to William. *Perhaps*, if he realises people like you are reluctant to use Sage for classes because of the bug rates, he might do something to address the quality control issues. One of the release mangers for 4.5.3 has said the first release candidate for 4.5.3 will be available on Monday and he hopes to release 4.5.3 on Friday. That's simply insufficient time for testing in my personal personal opinion. I'd like to see regular bug-fix-only releases, where no new features are added, but only code that addresses known bugs is incorporated. Whilst Brooks claims in his book http://en.wikipedia.org/wiki/The_Mythical_Man-Month#The_tendency_towards_irreducible_number_of_errors that === in a suitably complex system there is a certain irreducible number of errors. Any attempt to fix observed errors tends to result in the introduction of other errors === I think Sage is a long way from that point. Sage is certainly suitably complex, but I don't think it's reached the point where attempts to fix bugs will not reduce the total number of bugs. I think with some effort, and a change of attitude, the number of bugs in Sage could be reduced, but this would be at the expense of adding new features. It might even lose some developers, who can't tolerate such a change of attitude. Just my 2 pennies Dave For whatever it's worth I'd like to say that I emphatically agree that more attention to fixing bugs (presumably at the expense of adding features) would make Sage *much* more viable from my point of view. My point of view being as: (1) Not a developer, but simply a user. (2) Not a mathematician, but someone who is (late in the day :-)
Re: [sage-support] Those cookies again...
On 08/22/2010 01:01:17 PM, Dr. David Kirkby wrote: On 08/22/10 04:47 PM, Jeff Post wrote: On Sunday 22 August 2010 08:07, Mike Witt wrote: Having said this, I can't help but wonder what possible motivation there could be, among developers, to do something like a bug fix release? Professionalism? Jeff Mike, Making bug-fix releases is an essential part of professional software development. Jeff is right - it is the professional thing to do. Unfortunately, most Sage developers do not have a background in software engineering, so do not appreciate that. As for motivation, these two links might give you some thoughts. There's some very useful responses on the first link. http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=showixPost=17798 http://www.python.org/dev/peps/pep-0006/ Dave I may not have been thinking too clearly when I wrote that last paragraph. I was, after all, trying to argue *in favor* of bug fixes :-) -Mike -- 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.sagemath.org
[sage-support] Limiting the display range of a 3d plot
Is there any way to limit the display range of a 3d plot, using either jmol or tachyon? (Something similar to xmax and ymax with a 2d plot.) -- 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.sagemath.org
[sage-support] Limiting the display range of a 3d plot
Is there any way to limit the display range of a 3d plot, using either jmol or tachyon? (Something similar to xmax and ymax with a 2d plot.) -- 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.sagemath.org
[sage-support] help defining latex macros
sage: version() 'Sage Version 4.5.1, Release Date: 2010-07-19' I'd like to to define a latex macro, in a worksheet, so that I can use it later to do something like this: html('State = $\\ket{0}$') I found some documentation, but I'm clearly not understanding it: http://www.sagemath.org/doc/reference/sage/misc/latex.html I didn't get as far as trying to define 'ket' -- I'm trying things like the commands below, but apparently this isn't right. I don't understand what the Latex instance is. Can somebody help me out? sage: sage.misc.latex.Latex.add_macro(\\newcommand{\\foo}{bar}) --- TypeError Traceback (most recent call last) /home/mike/ipython console in module() TypeError: unbound method add_macro() must be called with Latex instance as first argument (got str instance instead) sage.misc.latex.Latex.extra_macros() --- TypeError Traceback (most recent call last) /home/mike/ipython console in module() TypeError: unbound method extra_macros() must be called with Latex instance as first argument (got nothing instead) -- 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.sagemath.org
Re: [sage-support] Re: help defining latex macros
On 07/26/2010 01:24:34 PM, John H Palmieri wrote: On Jul 26, 12:59 pm, Mike Witt msg...@gmail.com wrote: sage: version() 'Sage Version 4.5.1, Release Date: 2010-07-19' I'd like to to define a latex macro, in a worksheet, so that I can use it later to do something like this: html('State = $\\ket{0}$') I found some documentation, but I'm clearly not understanding it:http://www.sagemath.org/doc/reference/sage/misc/latex.html I didn't get as far as trying to define 'ket' -- I'm trying things like the commands below, but apparently this isn't right. I don't understand what the Latex instance is. Can somebody help me out? sage: sage.misc.latex.Latex.add_macro(\\newcommand{\\foo}{bar}) Try sage: latex.add_macro(\\newcommand{\\foo}{bar}) (just like in the examples in the documentation). Thanks. I guess I got confused by the imports in the documentation and didn't realize that latex wasn't sage.misc.latex... But (and hopefully this is just another simple misunderstanding) I still don't quite get it. In the worksheet is accepts: latex.add_macro(\\newcommand{\\foo}{bar}) and latex.extra_macros() returns: '\\newcommand{\\foo}{bar}' So, I expected that I could now do: html('$\\foo$') But I just get 'Unknown control dequence '\foo' I'm starting to think that perhaps I'm confused about the relationship of latex and jsMath. Maybe I'm not on the right track at all. What I'm trying to do it to be able to define (what I think of as) a latex macro so that I can use it in a sage worksheet. Not in a %latex cell, but in a regular sage cell. I.e., I want to be able to say: html('$\\foo$') in the middle of my normal sage code in the worksheet. For example, to make this work for a regular web page, I would put the macro definition in someplace like /var/www/html/jsMath/easy/load.js and then on the webpage do: script src=http://localhost/jsMath/easy/load.js;/script -Mike -- 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.sagemath.org
Re: [sage-support] Re: help defining latex macros
On 07/26/2010 04:17:05 PM, John H Palmieri wrote: On Jul 26, 3:45 pm, Mike Witt msg...@gmail.com wrote: On 07/26/2010 01:24:34 PM, John H Palmieri wrote: On Jul 26, 12:59 pm, Mike Witt msg...@gmail.com wrote: sage: version() 'Sage Version 4.5.1, Release Date: 2010-07-19' I'd like to to define a latex macro, in a worksheet, so that I can use it later to do something like this: html('State = $\\ket{0}$') I found some documentation, but I'm clearly not understanding it:http://www.sagemath.org/doc/reference/sage/misc/latex.html I didn't get as far as trying to define 'ket' -- I'm trying things like the commands below, but apparently this isn't right. I don't understand what the Latex instance is. Can somebody help me out? sage: sage.misc.latex.Latex.add_macro(\\newcommand{\\foo}{bar}) Try sage: latex.add_macro(\\newcommand{\\foo}{bar}) (just like in the examples in the documentation). Thanks. I guess I got confused by the imports in the documentation and didn't realize that latex wasn't sage.misc.latex... But (and hopefully this is just another simple misunderstanding) I still don't quite get it. In the worksheet is accepts: latex.add_macro(\\newcommand{\\foo}{bar}) and latex.extra_macros() returns: '\\newcommand{\\foo}{bar}' So, I expected that I could now do: html('$\\foo$') But I just get 'Unknown control dequence '\foo' I'm starting to think that perhaps I'm confused about the relationship of latex and jsMath. Maybe I'm not on the right track at all. What I'm trying to do it to be able to define (what I think of as) a latex macro so that I can use it in a sage worksheet. Not in a %latex cell, but in a regular sage cell. I.e., I want to be able to say: html('$\\foo$') in the middle of my normal sage code in the worksheet. As far as I can tell, the html function doesn't understand any added latex macros. I'm not sure why; I thought that it did. This is clunky, but you can do this: html('$\\newcommand{\foo}{bar} \\foo$') Actually, try jsmath('$\\foo$') or jsmath('hello $\\foo$ goodbye') So maybe you can use jsmath instead of html everywhere. OK, well as far as I can tell, simply using jsmath instead of html does seem to work. I guess the only remaining question (and I don't know if it can be answered or not :-) is whether using jsmath this way is a quirk that happens to work now, but might not work later, or whether this is a more or less normal sage way of doing things that I can reasonably expect to continue to work in future releases. -- 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.sagemath.org
[sage-support] The Milestone field in Trac Tickets
I'm curious about the intent behind the Milestone field in Trac tickets. It appears (at least for tickets I've been interested in) that this field is always set to whatever the next coming release is. Then, after that release is done, the milestone is (automatically?) bumped up to the next expected release number. In other words, as far as I can tell, the milestone field does not actually give any indication of when that particular bug is expected to be worked on. It seems (to me, at least) that it would be more helpful if the milestone was set to unknown, or something like that, if it's not actually expected to be in some particular release. Just a thought. -Mike -- 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.sagemath.org
[sage-support] Ticket #8931
http://trac.sagemath.org/sage_trac/ticket/8931 I'm just curious if anyone can suggest a work-around for this? -Mike -- 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.sagemath.org
Re: [sage-support] Ticket #8931
OK, thanks a lot. That seems to work well. Just a quick follow up question. I feel like there must be a better way to get the result back into Sage variable. Could I be doing something in a better way ... sage: from sympy.abc import x sage: phi = Function(phi) sage: s = symbols('s') sage: my_sol = dsolve(Derivative(phi(x),x,x) + s*phi(x), phi(x)) sage: my_sol C1*sin(x*s**(1/2)) + C2*cos(x*s**(1/2)) sage: type(my_sol) class 'sympy.core.add.Add' sage: ss_sol = sage_eval(str(my_sol), locals={'x':x,'C1':C1,'C2':C2,'s':s}) sage: ss_sol C1*sin(sqrt(s)*x) + C2*cos(sqrt(s)*x) sage: type(ss_sol) type 'sage.symbolic.expression.Expression' On 07/18/2010 03:24:12 PM, David Joyner wrote: sage: from sympy import Function, Derivative, dsolve, symbols sage: from sympy.abc import x sage: f = Function(f) sage: k = symbols('k') sage: dsolve(Derivative(f(x),x,x)-k**2*f(x), f(x)) C1*sin(x*(-k**2)**(1/2)) + C2*cos(x*(-k**2)**(1/2)) On Sun, Jul 18, 2010 at 4:31 PM, Mike Witt msg...@gmail.com wrote: http://trac.sagemath.org/sage_trac/ticket/8931 I'm just curious if anyone can suggest a work-around for this? -Mike -- 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.sagemath.org -- 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.sagemath.org -- 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.sagemath.org
Re: [sage-support] Minus sign not being typeset?
On 06/25/2010 01:19:06 PM, S. Robert James wrote: Hi. When using Sage notebook in typesetting mode, a leading minus sign doesn't seem to appear. sage: expand(h_m) -m^2/(2*n - 1) + m + m/(2*n - 1) # This is correct. Now, let's turn on typesetting: sage: expand(h_m) # Doesn't show the leading minus sign. Here is what the text button shows: htmlspan class=math\newcommand{\Bold}[1]{\mathbf{#1}}\frac{m^{2}} {2 \, n - 1} + m + \frac{m}{2 \, n - 1}/span/html I don't know how to read that, but I don't see a leading minus sign there... Sage Version 4.4.3, Release Date: 2010-06-04 / sagenb.org Firefox 3.6 / Windows 7 Pro Here's another example: sage: version() 'Sage Version 4.4.3, Release Date: 2010-06-04' sage: n=var('n') sage: f = -n/(n-1) + 1 sage: f -n/(n - 1) + 1 sage: latex(f) \frac{n}{n - 1} + 1 -Mike -- 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.sagemath.org
[sage-support] Re: Minus sign not being typeset?
More info: -- | Sage Version 4.3.1, Release Date: 2010-01-20 | | Type notebook() for the GUI, and license() for information.| -- sage: n=var('n') sage: f = -n/(n-1) + 1 sage: f -n/(n - 1) + 1 sage: latex(f) -\frac{n}{{\left(n - 1\right)}} + 1 sage: quit -- | Sage Version 4.3.5, Release Date: 2010-03-28 | | Type notebook() for the GUI, and license() for information.| -- sage: n=var('n') sage: f = -n/(n-1) + 1 sage: f -n/(n - 1) + 1 sage: latex(f) \frac{-n}{{\left(n - 1\right)}} + 1 -Mike -- 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.sagemath.org
Re: [sage-support] Re: Simplification / Latex question
On 06/26/2010 03:26:06 PM, Jason Grout wrote: On 6/24/10 6:15 AM, kcrisman wrote: Right. This crops up in the middle of a more complicated expression. If I could figure out how to break the expression up in the right way, then I guess I could search for parts that are exponential functions, take the log of those, and then simplify the logs. I know how to ultimately find all the pieces of the function with .operands(), but I don't then know any way to put them back together with the proper operators. Maybe there's a way to access the parsed I believe there is, but I can't figure out how to do it without going through fast_callable, which doesn't seem right. This information is in Pynac, but I can't find a method or underscore method that accesses it. This is now http://trac.sagemath.org/sage_trac/ticket/9329 . See http://sagenb.org/home/pub/1760/ for an example of creating an expression tree (in that worksheet, the expression tree is used to make a mathematica expression...) Hey, that's really cool. Thanks! BTW, at this point, after the further Latex discussion, I realize that my original problem was really more related to Ticket #9314 than to the expression itself (at least, that's what I'm currently speculating). But, especially with that example, it's pretty clear to me what to do if I need to parse an expression. I believe that Ticket #9329 was generated in response to my original post, before I understood that there was a Latex issue involved. I believe that Ticket #9329 should be deleted (closed or whatever). -Mike -- 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.sagemath.org
Re: [sage-support] Re: Simplification / Latex question
On 06/26/2010 05:21:21 PM, kcrisman wrote: I believe that Ticket #9329 was generated in response to my original post, before I understood that there was a Latex issue involved. I believe that Ticket #9329 should be deleted (closed or whatever). But part of your question was also to try to simplify more complicated expressions, and it does seem reasonable that we could provide a full nested expression tree for symbolic expressions (rather than having to iterate something by hand), since we do so for fast_callable (I think?). Just because we might not do it anytime soon doesn't mean we can't have a ticket for it! We usually only close tickets it is clear are duplicates or things we won't fix or are too vague; things which no one is motivated to provide just stay that way until someone shows up (and you'd be surprised how many stay open for 1 year and all of a sudden get someone working on them). OK, sure, that makes sense. I do hope the LaTeX issue gets resolved for you soon, though. My current theory is that it will be resolved if Ticket #9314 gets fixed. But I don't really know that for sure :-) - kcrisman -- 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.sagemath.org -- 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.sagemath.org
Re: [sage-support] Re: Simplification / Latex question
On 06/25/2010 06:07:02 AM, kcrisman wrote: Dear Mike, Just to follow up: There is further discussion at http://trac.sagemath.org/sage_trac/ticket/9329 if you are interested in saying exactly what sort of data structure would enable you to perform the simplifications you would like to without having to create a custom Maxima simplification routine. - kcrisman Well ... I can see how one might work one's way through the expression, using the operator() and operands() functions. And, I suppose, I can see how one could then build up the equivalent expression, having modified one of the operands in a certain way. So, I don't suppose that there is actually any need for a custom data structure to do this. I guess it's really just a question of whether the way these expressions sometimes display in latex bothers me enough to do something about it, other than just complain. Although ... I guess I'm still a bit confused as to why this happens, even given the form of the exponential. sage: f = e^(2*I*pi*n*x - 2*I*pi*n) sage: latex(f) e^{\left(\left(2 I\right) \, \pi n x + \left(-2 I\right) \, \pi n\right)} Still, I shouldn't really get +(-2i) right? I think you mentioned something about Pynac (another program I know nothing about). It seems like trying to fix this just involves learning too much of a learning curve for me to contemplate. -Mike -- 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.sagemath.org
Re: [sage-support] Re: Simplification / Latex question
On 06/24/2010 06:15:52 AM, kcrisman wrote: sage: n=var('n') sage: f=e^(i*x*pi*n-i*2*pi*n) sage: f.simplify_full() e^(I*pi*n*x - 2*I*pi*n) # Is there a way I can get this to simplify? This apparently isn't even that easy in Maxima. Maxima 5.21.1http://maxima.sourceforge.net using Lisp ECL 10.4.1 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i5) radcan(%e^(%pi*n-2*%pi)); %pi n - 2 %pi (%o5) %e (%i6) expand(%e^(%pi*n-2*%pi)); %pi n - 2 %pi (%o6) %e There are several Maxima experts on the list, though, who may know about a flag to set in such a case to factor the exponent first. I couldn't find one in the simplification documentation for Maxima, but it may be elsewhere. Well, I hope to hear from one of these Maxima experts! Of course, you can do this ahead of time: sage: e^((n*pi-pi*2).factor()) e^((n - 2)*pi) but this is probably not what you want. Right. This crops up in the middle of a more complicated expression. If I could figure out how to break the expression up in the right way, then I guess I could search for parts that are exponential functions, take the log of those, and then simplify the logs. I know how to ultimately find all the pieces of the function with .operands(), but I don't then know any way to put them back together with the proper operators. Maybe there's a way to access the parsed I believe there is, but I can't figure out how to do it without going through fast_callable, which doesn't seem right. This information is in Pynac, but I can't find a method or underscore method that accesses it. This is now http://trac.sagemath.org/sage_trac/ticket/9329 . tree of the expression? But of course that's crazy. There must be a normal way to simplify it! I don't know about that. Many other discussions about 'obvious' simplifications have led me to agree that this is a much harder problem than one thinks. On the other hand, it can be hard to find references to additional packages in Maxima that might do this; it turns out that lots of things one wants to do are not automatically available. Try http://maxima.sourceforge.net/docs/manual/en/maxima_71.html#SEC298 for ways you might be able to do this directly in Maxima, though I couldn't see for sure if that is part of its functionality. sage: maxima_console() (%i4) demo(facexp); Annoyingly, it continues this thing of asking whether 2*%pi is an integer which one often sees... I hope this helps. - kcrisman This is all good information, thanks. It helps to at least know that I'm not missing something obvious. It's the combination with that latex issue that results in some really ugly output. I've noticed too about how maxima continues to ask things that (it would seem) you have already told it. I guess it would be in my best interests to learn more about maxima. Thanks again, -Mike -- 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.sagemath.org
Re: [sage-support] Re: Simplification / Latex question
On 06/22/2010 12:41:17 PM, kcrisman wrote: sage: n=var('n') sage: f=e^(i*x*pi*n-i*2*pi*n) sage: f.simplify_full() e^(I*pi*n*x - 2*I*pi*n) # Is there a way I can get this to simplify? This apparently isn't even that easy in Maxima. Maxima 5.21.1 http://maxima.sourceforge.net using Lisp ECL 10.4.1 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i5) radcan(%e^(%pi*n-2*%pi)); %pi n - 2 %pi (%o5) %e (%i6) expand(%e^(%pi*n-2*%pi)); %pi n - 2 %pi (%o6) %e There are several Maxima experts on the list, though, who may know about a flag to set in such a case to factor the exponent first. I couldn't find one in the simplification documentation for Maxima, but it may be elsewhere. Well, I hope to hear from one of these Maxima experts! Of course, you can do this ahead of time: sage: e^((n*pi-pi*2).factor()) e^((n - 2)*pi) but this is probably not what you want. Right. This crops up in the middle of a more complicated expression. If I could figure out how to break the expression up in the right way, then I guess I could search for parts that are exponential functions, take the log of those, and then simplify the logs. I know how to ultimately find all the pieces of the function with .operands(), but I don't then know any way to put them back together with the proper operators. Maybe there's a way to access the parsed tree of the expression? But of course that's crazy. There must be a normal way to simplify it! sage: latex(f) e^{\left(I \, \pi n x + \left(-2 I\right) \, \pi n\right)} # Why the extra parentheses around -2I ? No idea. Pynac usually handles these sorts of things; I'm not sure whether I would call it a bug, though it does seem strange. Perhaps Pynac represents this as a complex internally and so this happens? Burcin will know :) - kcrisman -- 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.sagemath.org -- 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.sagemath.org
[sage-support] Simplification / Latex question
sage: version() 'Sage Version 4.4.3, Release Date: 2010-06-04' sage: f=e^(i*x*pi-i*2*pi) sage: f.simplify_full() e^(I*pi*x) # So far, so good sage: n=var('n') sage: f=e^(i*x*pi*n-i*2*pi*n) sage: f.simplify_full() e^(I*pi*n*x - 2*I*pi*n) # Is there a way I can get this to simplify? sage: latex(f) e^{\left(I \, \pi n x + \left(-2 I\right) \, \pi n\right)} # Why the extra parentheses around -2I ? --Mike -- 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.sagemath.org
Re: [sage-support] Re: Problem finding numeric eigenvectors
On 06/06/2010 10:43:38 PM, Rob Beezer wrote: On Jun 6, 9:05 am, Mike Witt msg...@gmail.com wrote: This does kind of reinforce the concept, which I guess I've heard expressed before here, that you have to be prepared to update your sage build very frequently in order to keep up with things. Exactly. ;-) But with sage -upgrade at a system prompt, it couldn't be much easier. Rob Well, getting a new version is no problem (assuming it builds on one's system). But since there is no distinction between bug fix releases and releases in which the interface to some function might change (such as the change we were just discussing) you never know when downloading a new version is going to cause you some work figuring out how to update existing code. Again, I may be an atypical user. I like to have a stable system. I only install every *other* fedora release :-) I have the distinct impression that most of the people here are active developers, who spend time every day reading the mailing lists, looking at the code, and keeping track of the status of bugs, etc. I'm actually the guy who is trying to use Sage as a viable free open source alternative to Magma, Maple, Mathematica and Matlab :-) But, note that I'm not asking for my money back ... -Mike -- 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.sagemath.org
Re: [sage-support] Re: Problem finding numeric eigenvectors
On 06/06/2010 08:45:53 AM, Rob Beezer wrote: Yes, there were changes, including the output format, as of 4.4 (about 7 weeks ago). See eigenmatrix_right totally broken at http://trac.sagemath.org/sage_trac/ticket/4756 Rob Ahh, well that explains some things. I had been watching: http://trac.sagemath.org/sage_trac/ticket/6934, but somehow I hadn't noticed ticket 4756. This does kind of reinforce the concept, which I guess I've heard expressed before here, that you have to be prepared to update your sage build very frequently in order to keep up with things. Anyway, thanks! -Mike -- 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.sagemath.org
Re: [sage-support] Re: latex \cancel not rendering
On 06/06/2010 10:28:43 AM, Rob Beezer wrote: I'm working on a guide. Still in *very* rough draft stage, but might be readable in Trac (just click on the version 2 patch). Feedback welcome. Here is some feedback: (1) This is very useful. I just read through it and learned some things that I never knew about sage/latex interaction. (2) I rarely use the notebook interface, but most of what I do with sage ends up constructing latex for output (from the command line). I gather, from the lack of discussion about this mode, that my usage is atypical(?) (3) I think it would be helpful to have some information on how to create objects with custom latex representations. -Mike -- 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.sagemath.org
[sage-support] Problem finding numeric eigenvectors
I'm confused about this, and hoping for some clarification ... sage: M=matrix([[0, .707-.707*i],[.707+.707*i, 0]]) sage: M = M.change_ring(CDF) sage: M [ 0 0.707 - 0.707*I] [0.707 + 0.707*I 0] sage: M.eigenvectors_left() ([0.999848988598 + 5.55111512313e-17*I, -0.999848988598 - 5.55111512313e-17*I], [0.7071067811870.5 + 0.5*I] [0.707106781187 -0.5 - 0.5*I]) sage: M.eigenvectors_right() ([0.999848988598 + 5.55111512313e-17*I, -0.999848988598 - 5.55111512313e-17*I], [0.707106781187 0.707106781187] [ 0.5 + 0.5*I -0.5 - 0.5*I]) I believe that eigenvectors_left() is giving me the answers that I expected. But I don't understand the values returned by eigenvectors_right(). I *thought* that eigenvectors_right() was the one I wanted to call in order to get regular old eigenvectors (as a mathematical novice such as myself would be expecting to see). Thanks, -Mike -- 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.sagemath.org
[sage-support] Re: Display of i vs I
I just thought I'd try this question one more time: On May 20, 10:59 am, Mike Witt wrote: Is there any way to make the square root of -1 display lower case i rather than I (at least for latex output)? -- 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.sagemath.org
Re: [sage-support] Re: Display of i vs I
On 05/22/2010 08:49:29 AM, Burcin Erocal wrote: You can also try changing line 1742 of sage/symbolics/pynac.pyx to make it always print as 'i' or any other letter. I like the sound of that. Thanks! -- 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.sagemath.org
[sage-support] Display of i vs I
Is there any way to make the square root of -1 display lower case i rather than I (at least for latex output)? -- 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.sagemath.org
[sage-support] (1 - i) == -(i + 1) ??
[m...@vector ~]$ sage -- | Sage Version 4.3.1, Release Date: 2010-01-20 | | Type notebook() for the GUI, and license() for information.| -- sage: (1-I)/(sqrt(2)-1) -(I + 1)/(sqrt(2) - 1) sage: -- 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.sagemath.org To unsubscribe, reply using remove me as the subject.
Re: [sage-support] (1 - i) == -(i + 1) ??
On 04/11/2010 01:56:45 PM, Minh Nguyen wrote: Hi Mike, On Mon, Apr 12, 2010 at 6:51 AM, Mike Witt msg...@gmail.com wrote: [m...@vector ~]$ sage -- | Sage Version 4.3.1, Release Date: 2010-01-20 | | Type notebook() for the GUI, and license() for information. | -- sage: (1-I)/(sqrt(2)-1) -(I + 1)/(sqrt(2) - 1) This has been fixed in Sage 4.3.5: Ahh, thanks! Do you happen to know if 4.3.5 builds on Fedora 12? (I remember seeing that one of the recent ones had problems) -Mike -- 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.sagemath.org To unsubscribe, reply using remove me as the subject.
Re: [sage-support] (1 - i) == -(i + 1) ??
On 04/11/2010 02:39:58 PM, Jaap Spies wrote: Mike Witt wrote: On 04/11/2010 01:56:45 PM, Minh Nguyen wrote: Hi Mike, On Mon, Apr 12, 2010 at 6:51 AM, Mike Witt msg...@gmail.com wrote: [m...@vector ~]$ sage -- | Sage Version 4.3.1, Release Date: 2010-01-20 | | Type notebook() for the GUI, and license() for information.| -- sage: (1-I)/(sqrt(2)-1) -(I + 1)/(sqrt(2) - 1) This has been fixed in Sage 4.3.5: Ahh, thanks! Do you happen to know if 4.3.5 builds on Fedora 12? (I remember seeing that one of the recent ones had problems) It builds ok, but there are a few issues with some tests. Jaap I notice it says this on the download page: Mirror network is currently synchronizing. Please try again later. A new release is upcoming. Maybe come back later for the next version of Sage? I don't remember ever seeing either of those messages before. I guess I should wait? -Mike -- 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.sagemath.org To unsubscribe, reply using remove me as the subject.
Re: [sage-support] (1 - i) == -(i + 1) ??
On 04/11/2010 03:05:02 PM, Jaap Spies wrote: Mike Witt wrote: I notice it says this on the download page: Mirror network is currently synchronizing. Please try again later. A new release is upcoming. Maybe come back later for the next version of Sage? I don't remember ever seeing either of those messages before. I guess I should wait? Look here for a mirror in your neighbourhood: http://www.sagemath.org/mirrors.html Ok, downloading now. Thanks again. -- 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.sagemath.org To unsubscribe, reply using remove me as the subject.
Re: [sage-support] Re: Eigenvectors of a matrix
On 04/09/2010 10:05:08 PM, Alec Mihailovs wrote: For M, you could do something like M=matrix([[1,1+i],[1-i,-1]])/sqrt(3) html.table(maxima(M).eigenvectors().sage()) or html.table([[r,(M-matrix(2,2,r)).right_kernel().basis_matrix()] for r in M.eigenvalues()]) And numerically the eigenvectors could be found as matrix(M.numpy(dtype=complex)).eigenvectors_right() Alec That did the trick, thanks! -- 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.sagemath.org To unsubscribe, reply using remove me as the subject.
[sage-support] Eigenvectors of a matrix
Can anyone tell me if there's a way to find the eigenvectors of this matrix in sage? sage: M=matrix([[1,1+i],[1-i,-1]]) sage: M=M/sqrt(3) sage: M [ 1/3*sqrt(3) (1/3*I + 1/3)*sqrt(3)] [-(1/3*I + 1/3)*sqrt(3) -1/3*sqrt(3)] sage: M^2 [1 0] [0 1] sage: M.eigenvalues() [-1, 1] sage: M=M.n() sage: M.eigenvectors_right() /usr/local/sage-4.3.1/local/bin/sage-ipython:1: UserWarning: Using generic algorithm for an inexact ring, which may result in garbage from numerical precision issues. #!/usr/bin/env python /usr/local/sage-4.3.1/local/bin/sage-ipython:1: UserWarning: Using generic algorithm for an inexact ring, which will probably give incorrect results due to numerical precision issues. #!/usr/bin/env python [(1.00, [ ], 1), (-1.00, [ ], 1)] -- 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.sagemath.org To unsubscribe, reply using remove me as the subject.
[sage-support] Re: latex representation of matrix
On 03/30/2010 08:19:33 PM, Mike Witt wrote: First, note I'm still on Sage Version 4.3.1 sage: M = matrix([[1,0],[0,1]]) sage: latex(M) \left(\begin{array}{rr} 1 0 \\ 0 1 \end{array}\right) Now, this seems to work OK in a notebook, but I'm outputting stuff to a .tex file, and this (for me at least) inserts the extra lines, making the matrix appears twice as tall as it should. In order to get it to look right I have to do: str = latex(M).replace('\n','') which appears (to me) to work with either html in a notebook, or as output to a latex file. Perhaps I'm doing something wrong (that is often the case :-), but if anyone has any comments ... -Mike Hmmm... Well, I guess I should have tried this before complaining, but when I cut and paste the output of latex(M) DIRECTLY into the .tex file everything works the way it's supposed to. So, somewhere along the line I must be mangling the string. I guess I have some code somewhere that didn't expect to see line breaks in the middle of the expression. Sorry about wasting the group bandwidth. -Mike -- 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.sagemath.org To unsubscribe, reply using remove me as the subject.
Re: [sage-support] jmol and Firefox
On 03/09/2010 11:54:15 AM, D.C. Ernst wrote: Recently (at least I think so), I have been having trouble using plot3d with Firefox. I get a message that says Jmol script has terminated. I see that they have quite a few message posted in the past about Jmol issues. Is this current problem particular to me or there some larger issue? Thanks, Dana I don't have any idea what the issue is, but it's not particular to you. I get this frequently, and to get things to work again I (apparently) have to exit firefox and restart it. I kind of assumed it was a firefox problem (for no particular reason :-) -Mike -- 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.sagemath.org
[sage-support] Version 4.3.1 - Did attach path change for notebook?
I have a soft link in .sage: /home/mike/.sage/sage-code - /home/mike/Projects/Sage/sage-code/ Then I'll say: attach sage-code/whatever and it would attach the file in /home/mike/Projects/Sage/sage-code/whatever In 4.3.1, this appears to still work from the command line, but not from a notebook. Should this work? Should I be doing this some other way? -- 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.sagemath.org
[sage-support] Getting 'partial' rather than 'D' notation for derivatives
It seems to me I saw information somewhere on how to get: foo=function('foo',x,y) latex(diff(foo,y)) To give the 'partial' notation rather than 'D' notation. I hope that makes sense. The idea is that I'd like something on the order of \frac{\partial}{\partial y} foo ... Anyway, I can't find the information about this now, and I wonder if someone could point me to the relevant documentation or thread. Thanks! -Mike -- 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.sagemath.org
[sage-support] Defaults for plots
Is there a way to specify default parameters for graphics? One specific example, is that I would like to specify that the default color for function plots, lines, points, etc be 'black' instead of 'blue'. -- 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.sagemath.org
Re: [sage-support] Defaults for plots
On 01/21/2010 07:35:13 AM, William Stein wrote: On Thu, Jan 21, 2010 at 7:06 AM, Mike Witt msg...@gmail.com wrote: Is there a way to specify default parameters for graphics? One specific example, is that I would like to specify that the default color for function plots, lines, points, etc be 'black' instead of 'blue'. sage: plot.options {'fillalpha': 0.5, 'detect_poles': False, 'plot_points': 200, 'thickness': 1, 'adaptive_tolerance': 0.01, 'fillcolor': 'automatic', 'alpha': 1, 'adaptive_recursion': 5, 'rgbcolor': (0, 0, 1), 'fill': None} sage: plot.options['rgbcolor'] = (0,0,0) sage: plot(sin) [outputs a black plot of sin] I guess what I was looking for was some equivalent options for graphics in general. plot.options affects the color of functions plotted, but I'd like to change the default color for functions, points, lines, etc from blue to black. -mike -- 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.sagemath.org
Re: [sage-support] Defaults for plots
On 01/21/2010 08:16:22 AM, William Stein wrote: On Thu, Jan 21, 2010 at 7:50 AM, Mike Witt msg...@gmail.com wrote: On 01/21/2010 07:35:13 AM, William Stein wrote: On Thu, Jan 21, 2010 at 7:06 AM, Mike Witt msg...@gmail.com wrote: Is there a way to specify default parameters for graphics? One specific example, is that I would like to specify that the default color for function plots, lines, points, etc be 'black' instead of 'blue'. sage: plot.options {'fillalpha': 0.5, 'detect_poles': False, 'plot_points': 200, 'thickness': 1, 'adaptive_tolerance': 0.01, 'fillcolor': 'automatic', 'alpha': 1, 'adaptive_recursion': 5, 'rgbcolor': (0, 0, 1), 'fill': None} sage: plot.options['rgbcolor'] = (0,0,0) sage: plot(sin) [outputs a black plot of sin] I guess what I was looking for was some equivalent options for graphics in general. plot.options affects the color of functions plotted, but I'd like to change the default color for functions, points, lines, etc from blue to black. -mike You can set the defaults for those as well in a similar way: sage: line2d.options {'alpha': 1, 'rgbcolor': (0, 0, 1), 'thickness': 1} sage: point2d.options {'alpha': 1, 'pointsize': 10, 'faceted': False, 'rgbcolor': (0, 0, 1)} So that's the trick. I had been trying to find line.options and point.options :-) -- 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.sagemath.org
[sage-support] list_plot3d (?)
If I have a list of points that represent a 3d curve, how would I go about plotting them? For example, is there a way to make list_plot3d plot a curve rather than a surface? -- 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.sagemath.org
[sage-support] Re: list_plot3d (?)
On Dec 25, 10:05 am, William Stein wst...@gmail.com wrote: On Fri, Dec 25, 2009 at 9:07 AM, Mike Witt mwg...@gmail.com wrote: If I have a list of points that represent a 3d curve, how would I go about plotting them? For example, is there a way to make list_plot3d plot a curve rather than a surface? Use line3d. Ah, OK. I had hoped to make sure of the interpolation that list_plot3d does to smooth things out. But I guess if I generate enough points it won't matter. -- 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.sagemath.org
[sage-support] Re: list_plot3d (?)
On Dec 25, 3:59 pm, Jason Grout jason-s...@creativetrax.com wrote: Mike Witt wrote: On Dec 25, 10:05 am, William Stein wst...@gmail.com wrote: On Fri, Dec 25, 2009 at 9:07 AM, Mike Witt mwg...@gmail.com wrote: If I have a list of points that represent a 3d curve, how would I go about plotting them? For example, is there a way to make list_plot3d plot a curve rather than a surface? Use line3d. Ah, OK. I had hoped to make sure of the interpolation that list_plot3d does to smooth things out. But I guess if I generate enough points it won't matter. You might also be interested in some of the scipy.interpolate for fitting splines to a bunch of points, if you're interesting in smoothing out curves. http://docs.scipy.org/doc/scipy/reference/interpolate.html or see the last example ofhttp://www.scipy.org/Cookbook/Interpolation Of course, generating points might be the easiest thing to do, though. Thanks, Jason Those are good pointers. Thanks! -Mike -- 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.sagemath.org
[sage-support] Re: The default number of digits displayed
On Dec 21, 9:04 am, Jason Grout jason-s...@creativetrax.com wrote: Mike Witt wrote: Is there a way to control the default number of display digits. In other words, suppose I have something like e^k and k ends up taking on the value (1.23*10^-12)*t. Then when I display this, either with print or by taking it's latex format, I get a pretty long string of digits in the exponent. Is there any way to control this? Do you mean something like the interface inhttp://trac.sagemath.org/sage_trac/ticket/7682, perhaps? That interface is not implemented, but is a suggestion. Jason I think that's what I'm looking for (if I understand correctly what's being suggested). Actually I figured there was some way to do this and I just didn't know what it was. -Mike -- 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.sagemath.org
[sage-support] notebook vs command line (variable)
Is there a variable that will tell me whether I've been invoked by a notebook or via the command line? -- 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.sagemath.org
[sage-support] The default number of digits displayed
Is there a way to control the default number of display digits. In other words, suppose I have something like e^k and k ends up taking on the value (1.23*10^-12)*t. Then when I display this, either with print or by taking it's latex format, I get a pretty long string of digits in the exponent. Is there any way to control this? -- 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.sagemath.org
[sage-support] forgetting assumptions
Is there a problem forgetting assumptions. Or do I not understand how this is supposed to work ... [m...@puddleglum ~]$ sage -- | Sage Version 4.2, Release Date: 2009-10-24 | | Type notebook() for the GUI, and license() for information.| -- sage: n=var('n') sage: assumptions() [] sage: foo=sin((-1)*n*pi) sage: foo.simplify() -sin(pi*n) sage: assume(n, 'odd') sage: assumptions() [n is odd] sage: foo=sin((-1)*n*pi) sage: foo.simplify() 0 sage: forget(n, 'odd') sage: assumptions() [] sage: foo=sin((-1)*n*pi) sage: foo.simplify() 0 sage: -- 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.sagemath.org
[sage-support] Out of memory allocating triangulation (implicit_plot3d)
Can anyone tell me if this is really an out of memory error? MemoryError: Out of memory allocating triangulation for type 'sage.plot.plot3d.implicit_surface.ImplicitSurface' This happens when I'm calling implicit_plot3d(). I aplogize for not posting more context, but it will take some work to come up with a working fragment that doesn't have a lot of other complications. The thing is, that I appear to have plenty of available memory when this happens, and I suspect that it's really some other kind of error (probably in my code :-) I was just hoping that somebody might have an idea what might generate this. Thanks, -Mike --~--~-~--~~~---~--~~ 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.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: axes_range problem ?
Yes, that seems to do the trick. Thanks! -Mike On Jul 10, 5:56 pm, Marshall Hampton hampto...@gmail.com wrote: I am not sure but I think when objects are added together their bounding boxes are checked, which might result in the -2 to 2 plotrange you are seeing. So you might have to do: (e+p).show(xmax = 2, xmin = -2) to get what you want. -M. Hampton On Jul 9, 5:14 pm, Mike Witt mwg...@gmail.com wrote: var('t') e=parametric_plot((3*sin(t), 2*cos(t)), (t,0,2*pi)) e.set_aspect_ratio(1) e.set_axes_range(-3 , 3 , -3 ,3 ) p=point((2,2/3*sqrt(5))) p.set_aspect_ratio(1) p.set_axes_range(-3 , 3 , -3 ,3 ) e.show() p.show() (e+p).show() -- e.show() and p.show() both look correct, with the axes extending from -3 to 3. But (e+p).show() only draws the y axis from -2 to 2. Am I doing something wrong? This is sage-4.0.2. --~--~-~--~~~---~--~~ 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 URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: build errors for sage 4.0.1 on Fedora 11
On Jun 25, 2:18 pm, William Stein wst...@gmail.com wrote: On Thu, Jun 25, 2009 at 8:19 PM, Mike Wittmwg...@gmail.com wrote: Was this ever resolved. I'm having the same problem with sage-4.0.2. Should I be building a different version? We reported this to the Singular group, they agreed it is a bug, and they fixed it in their version. I don't know if it has been fixed for the upcoming sage-4.1 yet or not. I hope so. This probably falls into the 'dumb question' category, but I'm not clear on how to proceed. I couldn't find a ticket related to this, and I can't figure out (1) How to tell when there's a version available that will build on FC11, or (2) how to patch 4.0.2 so that it will build. I guess it just needs a cast(?) but I don't understand where it goes (not directly into febase.cc I presume). If anyone has time to either educate me a little, or point me to relevant information ... -Mike --~--~-~--~~~---~--~~ 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 URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: build errors for sage 4.0.1 on Fedora 11
OK, sorry about that. I now realize that there is an spkg in ticket #6362 which appears to fix this. So I'll try downloading that. -Mike --~--~-~--~~~---~--~~ 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 URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: build errors for sage 4.0.1 on Fedora 11
Was this ever resolved. I'm having the same problem with sage-4.0.2. Should I be building a different version? -Mike --~--~-~--~~~---~--~~ 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 URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Best way to evaluate a string
Is there a way to evaluate a string in the same way as sage would evaluate it? Or, to put it another way, maybe I'm just confused about the way 'eval' works (or maybe eval isn't the right function) ... sage: var('frac') frac sage: frac=eval('x/2') sage: frac x/2 But ... sage: type(frac) class 'sage.calculus.calculus.SymbolicArithmetic' sage: frac=eval('1/2') sage: frac 0 sage: type(frac) type 'int' Thanks, -Mike --~--~-~--~~~---~--~~ 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 URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Best way to evaluate a string
On May 18, 6:08 pm, Mike Hansen mhan...@gmail.com wrote: On Mon, May 18, 2009 at 5:48 PM, Mike Witt mwg...@gmail.com wrote: Is there a way to evaluate a string in the same way as sage would evaluate it? Or, to put it another way, maybe I'm just confused about the way 'eval' works (or maybe eval isn't the right function) ... ... sage: frac=eval('1/2') sage: frac 0 sage: type(frac) type 'int' You can use sage_eval: sage: sage_eval('1/2') 1/2 sage: type(_) type 'sage.rings.rational.Rational' This is basically equivalent for the following: sage: eval(preparse('1/2')) 1/2 Great. Thanks! -Mike --~--~-~--~~~---~--~~ 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 URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Direct installation of Maxima, etc.
Sage creates shell scripts like this in /usr/local/bin: [EMAIL PROTECTED] ~]$ cat /usr/local/bin/maxima#!/bin/sh sage -maxima $* What happens if I install some of these programs (such as Maxima, gap, R) directly (for example if I were to do a yum install maxima) ? I'm assuming (perhaps I'm wrong) that this will put an actual maxima executable in /usr/local/bin/maxima. So, what I'm curious about, is whether those shell scripts that sage puts in /usr/local/bin are actually used by sage, or whether they are just a convenience in case someone wants to invoke one of those tools by name from the shell. I hope that question made sense. The immediate practical import is that I do actually want to do: yum info maxima maxima-gui and I'm unclear if this will clash with my sage installation. Thanks, -Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Plotting and constant functions
On 08/21/2008 06:55:48 PM, Joel B. Mohler wrote: On Thursday 21 August 2008 01:58:23 pm Mike Witt wrote: I'm looking for a work-around for the situation where I would normally call parametric_plot (or plot, for that matter) with a function, and in some particular case that function turns out to evaluate to a constant. For example: sage: def f(a,b): return e^(a+b*I) : sage: parametric_plot([real(f(x,1)),imag(f(x,1))], -pi, pi) Works as expected sage: parametric_plot([real(f(x,-1)),imag(f(x,-1))], -pi, pi) Works as expected sage: parametric_plot([real(f(x,0)),imag(f(x,0))], -pi, pi) Gives a page full of errors, which I interpret to mean that there was a problem plotting because imag(f(x,0)) evaluates to a constant. I believe that this is the same issue described in: http://trac.sagemath.org/sage_trac/ticket/2410 I'm the person that entered the trac ticket and the point of that trac ticket is precisely the (mis-)functionality you are describing. I'm truly mystified by the other responses in this thread. To me, this is an obvious bug... -- Joel Thanks Joel. I was beginning to wonder if I was nuts. Just to summarize what I've found out so far. The work-arounds suggested by David Joyner, Mike Hansen, and Carl Witty all work under certain assumptions, but none of the three provides a completely general fix as far as I can see. Using a combination of the techniques I am able to do what I want. But I am for whatever it's worth I'd certainly like to add my vote that tickets #2409 and #2410 should get attention. This issue with parametric_plot is certainly *very* confusing to a newcomer. -Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Plotting and constant functions
This is an attempt to ask my previous question more clearly :-) I'm looking for a work-around for the situation where I would normally call parametric_plot (or plot, for that matter) with a function, and in some particular case that function turns out to evaluate to a constant. For example: sage: def f(a,b): return e^(a+b*I) : sage: parametric_plot([real(f(x,1)),imag(f(x,1))], -pi, pi) Works as expected sage: parametric_plot([real(f(x,-1)),imag(f(x,-1))], -pi, pi) Works as expected sage: parametric_plot([real(f(x,0)),imag(f(x,0))], -pi, pi) Gives a page full of errors, which I interpret to mean that there was a problem plotting because imag(f(x,0)) evaluates to a constant. I believe that this is the same issue described in: http://trac.sagemath.org/sage_trac/ticket/2410 But I'm not sure. I notice that: sage: type(imag(f(x,1))) class 'sage.calculus.calculus.SymbolicArithmetic' and: sage: type(imag(f(x,0))) class 'sage.calculus.calculus.SymbolicConstant' So, perhaps I could use this test (at least in this particular case) to avoid calling parametric_plot and simply draw a line instead. But I wonder if there is a more general strategy. For example, a single test that will tell if a function if going to evaluate to any kind of constant that plot or parametric_plot will have a problem with? I'm trying to be as clear as I can about this. I'm very new to Sage, and I realize that I could be missing something obvious. -Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Plotting and constant functions
On 08/21/2008 11:14:16 AM, William Stein wrote: On Thu, Aug 21, 2008 at 10:58 AM, Mike Witt [EMAIL PROTECTED] wrote: This is an attempt to ask my previous question more clearly :-) I'm looking for a work-around for the situation where I would normally call parametric_plot (or plot, for that matter) with a function, and in some particular case that function turns out to evaluate to a constant. For example: sage: def f(a,b): return e^(a+b*I) : sage: parametric_plot([real(f(x,1)),imag(f(x,1))], -pi, pi) Works as expected sage: parametric_plot([real(f(x,-1)),imag(f(x,-1))], -pi, pi) Works as expected sage: parametric_plot([real(f(x,0)),imag(f(x,0))], -pi, pi) Gives a page full of errors, which I interpret to mean that there was a problem plotting because imag(f(x,0)) evaluates to a constant. I believe that this is the same issue described in: http://trac.sagemath.org/sage_trac/ticket/2410 But I'm not sure. I notice that: sage: type(imag(f(x,1))) class 'sage.calculus.calculus.SymbolicArithmetic' and: sage: type(imag(f(x,0))) class 'sage.calculus.calculus.SymbolicConstant' So, perhaps I could use this test (at least in this particular case) to avoid calling parametric_plot and simply draw a line instead. But I wonder if there is a more general strategy. For example, a single test that will tell if a function if going to evaluate to any kind of constant that plot or parametric_plot will have a problem with? I'm trying to be as clear as I can about this. I'm very new to Sage, and I realize that I could be missing something obvious. Just out of curiosity, do you know Python? If not, you might *greatly* benefit from learning Python, which is a pretty easy thing to do -- it takes a few hours to get up to speed with the basics and there are many good free resources online. William I've never really used Python, and if I actually decide to dump Mathematica and go with Sage, it certainly sounds like learning Python would be a good idea :-) I'm curious if you're asking this because the solution to my problem would be obvious if I knew Python? If so, could you possibly say a little more? -Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Plotting and constant functions
On 08/21/2008 12:18:26 PM, David Joyner wrote: On Thu, Aug 21, 2008 at 1:58 PM, Mike Witt [EMAIL PROTECTED] wrote: This is an attempt to ask my previous question more clearly :-) I *conjecture* (and definitely could be wrong) that your problem is related to the issue that Sage can plot symbolic functions but constants (rather, numerical constants which have not been coerced to the symbolic expression ring) don't mix well with symbolic expressions. I think this will be fixed soon but don't know what, if any, active trac tickets are related to this. You might try coercing the expressions to the symbolic expression ring (type ?SR for details), assuming the above conjecture is roughly correct. I *think* that's correct. Is it not this ticket? http://trac.sagemath.org/sage_trac/ticket/2410 If it's going be fixed soon, then I might not want to spend too much time on a work around. I will look into coercing the expressions, as you mentioned. I'm sorry that I don't seem to be able to explain this in an understandable way. I'm not quite sure what I'm doing wrong (in my explanation). I'm looking for a work-around for the situation where I would normally call parametric_plot (or plot, for that matter) with a function, and in some particular case that function turns out to evaluate to a constant. For example: sage: def f(a,b): return e^(a+b*I) : sage: parametric_plot([real(f(x,1)),imag(f(x,1))], -pi, pi) Works as expected sage: parametric_plot([real(f(x,-1)),imag(f(x,-1))], -pi, pi) Works as expected sage: parametric_plot([real(f(x,0)),imag(f(x,0))], -pi, pi) Gives a page full of errors, which I interpret to mean that there was a problem plotting because imag(f(x,0)) evaluates to a constant. I believe that this is the same issue described in: http://trac.sagemath.org/sage_trac/ticket/2410 But I'm not sure. I notice that: sage: type(imag(f(x,1))) class 'sage.calculus.calculus.SymbolicArithmetic' and: sage: type(imag(f(x,0))) class 'sage.calculus.calculus.SymbolicConstant' So, perhaps I could use this test (at least in this particular case) to avoid calling parametric_plot and simply draw a line instead. But I wonder if there is a more general strategy. For example, a single test that will tell if a function if going to evaluate to any kind of constant that plot or parametric_plot will have a problem with? I'm trying to be as clear as I can about this. I'm very new to Sage, and I realize that I could be missing something obvious. -Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: parametric_plot and constants? multiple plots?
On Aug 19, 5:48 pm, David Joyner [EMAIL PROTECTED] wrote: On Tue, Aug 19, 2008 at 8:23 PM, Mike Witt [EMAIL PROTECTED] wrote: Hi, I'm a long time Mathematica user who just discovered Sage a couple of months ago, and I'm starting to warm up to it. I have a question about parametric_plot. It appears that if you've got a function that evaluates to zero, then parametric_plot won't accept it. For example, if z(a,b)=e^(I*b + a) then this seems to be OK: show(animate([parametric_plot((real(z(x,b)), imag(z(x,b))), 0, 1) for b in srange(pi/6, 2*pi/6, pi/24)])) But if I do this: show(animate([parametric_plot((real(z(x,b)), imag(z(x,b))), 0, 1) for b in srange(-pi/6, 2*pi/6, pi/24)])) I have a problem, which (I *think*) is because the imaginary part of z(x,b) evaluates to zero during the animation. I don't understand the question. Are you saying for the commands sage: z = var(z) sage: z = lambda a,b: e^(I*b + a) sage: show(animate([parametric_plot((real(z(x,b)), imag(z(x,b))), 0, 1) for b in srange(pi/6, 2*pi/6, pi/24)])) you have a problem? What is it exactly? Sorry if I wasn't clear. The problem will occur if you change the start of the range from pi/6 to -pi/6 (so that the function evaluates to zero as you cross the real axis. And so, perhaps, this is related to Ticket #2410. On the other hand, it could just be some misunderstanding on my part. In any event, if anyone can shed any light on this I'd appreciate it. As long as I'm here, a 2nd question. Using the command line interface, is there any way I can spawn more than one window to render different plots in them at the same time? (Of, if Ticket #2380 is likely to be worked on in the near future, that would be even better.) Or, if there is some other way to get multiple plots (from the command line) Sorry but I don't understand this question either. Do you want something like this:? sage: P = plot(sin(x),x,0,1) sage: Q = plot(cos(x),x,0,1) sage: show(P+Q) No. I'd like to show two separate plots. Not the two functions on the same plot. It appears (from the next response) that using a graphics_array() is the answer to this. -Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: parametric_plot and constants? multiple plots?
On Aug 19, 6:20 pm, Jason Merrill [EMAIL PROTECTED] wrote: On Aug 19, 8:23 pm, Mike Witt [EMAIL PROTECTED] wrote: As long as I'm here, a 2nd question. Using the command line interface, is there any way I can spawn more than one window to render different plots in them at the same time? (Of, if Ticket #2380 is likely to be worked on in the near future, that would be even better.) Or, if there is some other way to get multiple plots (from the command line) See graphics_array. Like this: sage: p1 = plot(sin,-4,4) sage: p2 = plot(cos,-4,4) sage: g = graphics_array([p1, p2]); print g sage: g.show() I found this by using the help link at the top of the notebook, choosing Reference Manual - 2D plotting Best, JM Thank you, yes it appears that graphics_array() is what I was looking for! -Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] parametric_plot and constants? multiple plots?
Hi, I'm a long time Mathematica user who just discovered Sage a couple of months ago, and I'm starting to warm up to it. I have a question about parametric_plot. It appears that if you've got a function that evaluates to zero, then parametric_plot won't accept it. For example, if z(a,b)=e^(I*b + a) then this seems to be OK: show(animate([parametric_plot((real(z(x,b)), imag(z(x,b))), 0, 1) for b in srange(pi/6, 2*pi/6, pi/24)])) But if I do this: show(animate([parametric_plot((real(z(x,b)), imag(z(x,b))), 0, 1) for b in srange(-pi/6, 2*pi/6, pi/24)])) I have a problem, which (I *think*) is because the imaginary part of z(x,b) evaluates to zero during the animation. And so, perhaps, this is related to Ticket #2410. On the other hand, it could just be some misunderstanding on my part. In any event, if anyone can shed any light on this I'd appreciate it. As long as I'm here, a 2nd question. Using the command line interface, is there any way I can spawn more than one window to render different plots in them at the same time? (Of, if Ticket #2380 is likely to be worked on in the near future, that would be even better.) Or, if there is some other way to get multiple plots (from the command line) Thanks! -Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---