[sage-support] BoxPlot in Sage: how do we plot?
I don't see a direct command in sage for BoxPlot. Thus, I've tried many 'R' versions of boxplot (like: r.bxplot, r.bplot, r.boxplot) on a dataset I have, but could not get a plot... I am using the latest Sage Notebook (v 4.3.3) Would you pls help? -- 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] SAGE make: "There is no spkg-install script, no setup.py, and no configure script,"...
are using binary.. then type simply ./sage On Sun, Mar 14, 2010 at 6:28 AM, rvaug...@gmail.com wrote: > In trying to make SAGE 4.3.3 on a Scientific Linux 5.4 machine, I see: > > "There is no spkg-install script, no setup.py, and no configure > script, > so I do not know how to install /usr/share/sage-4.3.3/spkg/standard/ > gd-2.0.35.p4.spkg. > make[1]: *** [installed/gd-2.0.35.p4] Error 1 > make[1]: Leaving directory `/usr/share/sage-4.3.3/spkg'" > > Thoughts/fixes? > > Thanks, > -Richard Vaughn > > -- > 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 > -- Ajay Rawat Kalpakkam, IGCAR - Save Himalayas - -- 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 doctesting files outside Sage library
Hello, I'm having trouble doctesting a file outside the Sage library: $ sage -t example-sageexample.sage sage -t "example-sageexample.sage" A mysterious error (perhaps a memory error?) occurred, which may have crashed doctest. [0.2 s] -- The following tests failed: sage -t "example-sageexample.sage" # Segfault Total time for all tests: 0.2 seconds This happens with 4.3.3 on both Linux and OS X. According to the developer guide, this should work, but it fails, both with the .sage and .py files. Any ideas? I'm attaching the offending file, which is related to a new SageTeX feature that Nicolas Thiery developed. Dan -- --- Dan Drake - http://mathsci.kaist.ac.kr/~drake --- ## This file (example-sageexample.sage) was *autogenerated* from the file example-sageexample.tex. import sagetex _st_ = sagetex.SageTeXProcessor('example-sageexample') try: _st_.doctest(0, r""" sage: 1+1 2 sage: x^3 x^3 """, globals(), locals(), False) except: _st_.goboom(27) try: _st_.doctest(1, r""" sage: 1+1 2 sage: x^3 x^3 """, globals(), locals(), True) except: _st_.goboom(50) try: _st_.doctest(2, r""" sage: 1+1 2 sage: x^3 x^3 sage: integral(cyclotomic_polynomial(10)) 1/5*x^5 - 1/4*x^4 + 1/3*x^3 - 1/2*x^2 + x """, globals(), locals(), False) except: _st_.goboom(64) try: _st_.doctest(3, r""" sage: p = 2 sage: p 2 """, globals(), locals(), False) except: _st_.goboom(71) try: _st_.doctest(4, r""" sage: p 2 """, globals(), locals(), False) except: _st_.goboom(76) try: _st_.doctest(5, r""" sage: def f(n): ... "Returns n^p" ... return n^p ... sage: f(5) 125 """, globals(), locals(), False) except: _st_.goboom(86) try: _st_.doctest(6, r""" sage: 1; 2; a=4; 3; a 1 2 3 4 sage: a 4 """, globals(), locals(), False) except: _st_.goboom(113) _st_.endofdoc() signature.asc Description: Digital signature
[sage-support] SAGE make: "There is no spkg-install script, no setup.py, and no configure script,"...
In trying to make SAGE 4.3.3 on a Scientific Linux 5.4 machine, I see: "There is no spkg-install script, no setup.py, and no configure script, so I do not know how to install /usr/share/sage-4.3.3/spkg/standard/ gd-2.0.35.p4.spkg. make[1]: *** [installed/gd-2.0.35.p4] Error 1 make[1]: Leaving directory `/usr/share/sage-4.3.3/spkg'" Thoughts/fixes? Thanks, -Richard Vaughn -- 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] Entering matrices whose elements are functions of row/column indices?
Here is another way: sage: coeffs = [[i^2-j for j in range(6)] for i in range(6)] sage: matrix(coeffs) [ 0 -1 -2 -3 -4 -5] [ 1 0 -1 -2 -3 -4] [ 4 3 2 1 0 -1] [ 9 8 7 6 5 4] [16 15 14 13 12 11] [25 24 23 22 21 20] On Sat, Mar 13, 2010 at 7:58 AM, Alasdair wrote: > This can be done in maxima: > > genmatrix(lambda([i,j],i-j),6,6); > > for example. But is there an easy Sage way of doing this? If I enter > > sage: M=maxima('genmatrix(lambda([i,j],i-j),6,6)') > > then I obtain a Maxima matrix, which then has to turned into a Sage > matrix (I don't know how to do this either). Clearly I could: > > sage: M=matrix(ZZ,6,6) > sage: for i in range(6): > : for j in range(6): > : M[i,j]=i-j > > but that seems a bit longwinded. Is there an easy straightforward > way? > > Thanks, > Alasdair > > -- > 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] Entering matrices whose elements are functions of row/column indices?
This can be done in maxima: genmatrix(lambda([i,j],i-j),6,6); for example. But is there an easy Sage way of doing this? If I enter sage: M=maxima('genmatrix(lambda([i,j],i-j),6,6)') then I obtain a Maxima matrix, which then has to turned into a Sage matrix (I don't know how to do this either). Clearly I could: sage: M=matrix(ZZ,6,6) sage: for i in range(6): : for j in range(6): : M[i,j]=i-j but that seems a bit longwinded. Is there an easy straightforward way? Thanks, Alasdair -- 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] Simplify matrix with variables
Hello there, I have a little kinematic project running. I have a matrix with Denavit-Hartenberg parameters for each joint. See http://upload.wikimedia.org/math/6/e/3/6e3a9d7ad118c01e0e8b06cdc6d0205f.png In my case everything except theta is constant. I need to multiply this matrix with itself for each joint. To save some computing time I want to simplify the matrix. My matrix looks like this: dh = matrix([[cos(theta), sin(theta) * cos(x), sin(theta) * sin(x), r * cos(theta)], [sin(theta), cos(theta) * cos(x), -cos(theta) * sin(x), r * sin(theta)], [0, sin(x), cos(x), d], [0, 0, 0, 1]]) Where x is the variable for alpha. When I want to print the matrix for the second and following matrixes, maxima always crashes. Therefore I can't multiply and simplify the matrixes. Any suggestions?! Attached the traceback. File "simplification.py", line 90, in fk print dh File "matrix0.pyx", line 909, in sage.matrix.matrix0.Matrix.__repr__ (sage/matrix/matrix0.c:4766) File "matrix0.pyx", line 937, in sage.matrix.matrix0.Matrix.str (sage/matrix/matrix0.c:5075) File "matrix0.pyx", line 150, in sage.matrix.matrix0.Matrix.list (sage/matrix/matrix0.c:1787) File "matrix_symbolic_dense.pyx", line 328, in sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense._list (sage/ matrix/matrix_symbolic_dense.c:3043) File "matrix_symbolic_dense.pyx", line 123, in sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense.get_unsafe (sage/matrix/matrix_symbolic_dense.c:2165) File "/usr/lib/python2.5/site-packages/sage/calculus/calculus.py", line 8250, in symbolic_expression_from_maxima_string s = maxima._eval_line('_tmp_;') File "/usr/lib/python2.5/site-packages/sage/interfaces/maxima.py", line 566, in _eval_line self._expect_expr(self._display_prompt) File "/usr/lib/python2.5/site-packages/sage/interfaces/maxima.py", line 457, in _expect_expr i = self._expect.expect(expr) File "/usr/lib/python2.5/site-packages/pexpect.py", line 1311, in expect return self.expect_list(compiled_pattern_list, timeout, searchwindowsize) File "/usr/lib/python2.5/site-packages/pexpect.py", line 1325, in expect_list return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize) File "/usr/lib/python2.5/site-packages/pexpect.py", line 1396, in expect_loop raise EOF (str(e) + '\n' + str(self)) pexpect.EOF: End Of File (EOF) in read_nonblocking(). Exception style platform. version: 2.3 ($Revision: 399 $) command: /usr/bin/maxima args: ['/usr/bin/maxima', '-p', '/usr/lib/sagemath/local/bin/sage- maxima.lisp'] searcher: searcher_re: 0: re.compile("") buffer (last 100 chars): before (last 100 chars): To reenable the Lisp debugger set *debugger- hook* to nil. (%i185) xmalloc: out of virtual memory after: match: None match_index: None exitstatus: None flag_eof: True pid: 3949 child_fd: 3 closed: False timeout: None delimiter: logfile: None logfile_read: None logfile_send: None maxread: 1 ignorecase: False searchwindowsize: None delaybeforesend: 0 delayafterclose: 0.1 delayafterterminate: 0.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
Re: [sage-support] Re: convert trigonometric/hyperbolic functions to exponentials
You can use something like this dêkuji merci thank you for all the answers always annoying to guess wether you should call maxima or not. -- Guillaume -- 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] sagetex and stereographic plots
On Mar 12, 2010, at 8:16 PM, Dan Drake wrote: On Fri, 12 Mar 2010 at 01:27PM +0100, G. Damm wrote: is it possible to make stereographic 3d-plots with sagetex? I'd want to make a beamer-presentation with these plots and want to help my students see the 3d. Can Sage make stereographic 3-d plots? If there's a way to get a PNG image of such a plot out of Sage, then you can get it into your presentation. What exactly do you mean by "stereographic"? Do you mean the kinds of image in which there's two images, from slightly different angles, and you project it using polarizing filters and the students wear polarized glasses? Or those "magic eye" images that look like static unless you cross your eyes just right? Sage (via Jmol) can do both. Right click on the applet for a menu. You can then save the image via the "get image" (or something like that) button. My guess, though, is that if you are already using a computer and a projector, it would be better to use an actual Jmol applet in your class. Then, instead of a three-dimensional static image, your students see something interactive, that can be twisted around, zoomed in and out, and so on. That works too. Of course you can zoom and twist a stereographic image, getting the best of both. - Robert -- 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