#5956: image dimensions for show() are in inches
----------------------+-----------------------------------------------------
 Reporter:  mvngu     |       Owner:  was                      
     Type:  defect    |      Status:  new                      
 Priority:  minor     |   Milestone:  sage-4.0                 
Component:  graphics  |    Keywords:  image dimensions, figsize
----------------------+-----------------------------------------------------
 As discussed at this [http://groups.google.com/group/sage-
 devel/browse_thread/thread/c411254b7bc0bb97 sage-devel thread], the
 optional argument {{{figsize}}} of the command {{{show()}}} needs to
 clearly state that the units of the image are in inches. As of Sage 3.4.1,
 the docstring for {{{show()}}} says:
 {{{
 - ``figsize``- [width, height] (same for square aspect)
 }}}
 which can be interpreted to mean that one can do something like
 {{{figsize=[w,h]}}}. But something like the following produces a
 segmentation fault:
 {{{
 [mv...@sage ~]$ sage
 ----------------------------------------------------------------------
 | Sage Version 3.4.1, Release Date: 2009-04-21                       |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------
 sage: q = var("q")
 sage: f(q) = (q^4 - q^2 + 1) * (q^4 + q^3 + q^2 + q + 1) * (q^4 - q^3 \
 + q^2 - q + 1) * (q^6 + q^5 + q^4 + q^3 + q^2 + q + 1) * (q^6 - q^5 + \
 q^4 - q^3 + q^2 - q + 1) * (q^(20) - q^(18) - q^(14) - q^(12) + q^(10) \
 - q^8 - q^6 - q^2 + 1)
 sage: g(q) = q^8 * (q^4 + q^2 + 1)^2 * (q^4 + 1)^5
 sage: p = complex_plot(f/g, (-2,2), (-2,2))
 sage: p.show(figsize=[256,256])
 }}}
 while the following results in a {{{ValueError}}}:
 {{{
 ----------------------------------------------------------------------
 | Sage Version 3.4.1, Release Date: 2009-04-21                       |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------
 sage: q = var("q")
 sage: f(q) = (q^4 - q^2 + 1) * (q^4 + q^3 + q^2 + q + 1) * (q^4 - q^3 \
 + q^2 - q + 1) * (q^6 + q^5 + q^4 + q^3 + q^2 + q + 1) * (q^6 - q^5 + \
 q^4 - q^3 + q^2 - q + 1) * (q^(20) - q^(18) - q^(14) - q^(12) + q^(10) \
 - q^8 - q^6 - q^2 + 1)
 sage: g(q) = q^8 * (q^4 + q^2 + 1)^2 * (q^4 + 1)^5
 sage: p = complex_plot(f/g, (-2,2), (-2,2))
 sage: p.show(figsize=[500,500])
 ---------------------------------------------------------------------------
 ValueError                                Traceback (most recent call
 last)
 ...
 ValueError: width and height must each be below 32768
 }}}
 Essentially, the documentation for {{{show()}}} needs to be updated,
 especially the optional arguments, to clearly explain the units of
 measurement of the width and height of the image size. Also, it would be a
 good idea to specify how one can pass in values for those dimensions. For
 example, can one do this {{{figsize=[124,124]}}}?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5956>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to