#18327: Fix graph bounding box
-------------------------------------+-------------------------------------
       Reporter:  vbraun             |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.7
      Component:  graph theory       |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Volker Braun       |    Reviewers:  Nathann Cohen
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/vbraun/fix_graph_bounding_box    |  57e13e6f294218589d95caf5122a1841ecbe71a0
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by vbraun):

 * status:  positive_review => needs_work


Comment:

 {{{
 sage -t --long src/sage/graphs/graph_generators.py
 **********************************************************************
 File "src/sage/graphs/graph_generators.py", line 511, in
 sage.graphs.graph_generators.GraphGenerators
 Failed example:
     graphs_list.show_graphs(L)              # long time
 Expected nothing
 Got:
     doctest:1004: UserWarning: Unable to find pixel distance along axis
 for interval padding; assuming no interval padding needed.
     doctest:1011: UserWarning: Unable to find pixel distance along axis
 for interval padding; assuming no interval padding needed.
 **********************************************************************
 1 item had failures:
    1 of  33 in sage.graphs.graph_generators.GraphGenerators
     [78 tests, 1 failure, 12.66 s]
 }}}
 This is because without the artificial padding of axes you can have graph
 plots with extreme dimensions where the only two nodes are aligned along
 one axis. Its not specific to graphs, though, you can trigger it without
 as well:
 {{{
 sage: line([(1e-19,-1), (-1e-19,+1)], aspect_ratio=1.0)
 /home/vbraun/Code/sage/local/lib/python2.7/site-
 packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/axis.py:1004:
 UserWarning: Unable to find pixel distance along axis for interval
 padding; assuming no interval padding needed.
   warnings.warn("Unable to find pixel distance along axis for interval
 padding; assuming no interval padding needed.")
 /home/vbraun/Code/sage/local/lib/python2.7/site-
 packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/axis.py:1011:
 UserWarning: Unable to find pixel distance along axis for interval
 padding; assuming no interval padding needed.
   warnings.warn("Unable to find pixel distance along axis for interval
 padding; assuming no interval padding needed.")
 Launched png viewer for Graphics object consisting of 1 graphics primitive
 }}}
 The warning means that matplotlib trips over floating point errors.

--
Ticket URL: <http://trac.sagemath.org/ticket/18327#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to