#2100: sensible defaults for aspect ratio
-------------------------------------------------------+--------------------
   Reporter:  jason                                    |       Owner:  was      
 
       Type:  enhancement                              |      Status:  
needs_work
   Priority:  major                                    |   Milestone:  
sage-4.6.2
  Component:  graphics                                 |    Keywords:           
 
     Author:  Jason Grout, Karl-Dieter Crisman         |    Upstream:  N/A      
 
   Reviewer:  Andrey Novoseltsev, Karl-Dieter Crisman  |      Merged:           
 
Work_issues:  Plotting of vectors examples             |  
-------------------------------------------------------+--------------------
Changes (by novoselt):

  * status:  positive_review => needs_work
  * work_issues:  => Plotting of vectors examples


Comment:

 Actually, I was too hasty:
 {{{
 sage -t -long "devel/sage-main/sage/modules/free_module_element.pyx"
 **********************************************************************
 File "/mnt/usb1/scratch/novoselt/sage/devel/sage-
 main/sage/modules/free_module_element.pyx", line 1390:
     sage: plot(v) # defaults to an arrow plot
 Exception raised:
     Traceback (most recent call last):
       File "/mnt/usb1/scratch/novoselt/sage/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File "/mnt/usb1/scratch/novoselt/sage/local/bin/sagedoctest.py",
 line 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/mnt/usb1/scratch/novoselt/sage/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_45[9]>", line 1, in <module>
         plot(v) # defaults to an arrow plot###line 1390:
     sage: plot(v) # defaults to an arrow plot
       File "/mnt/usb1/scratch/novoselt/sage/local/lib/python/site-
 packages/sage/misc/displayhook.py", line 174, in displayhook
         print_obj(sys.stdout, obj)
       File "/mnt/usb1/scratch/novoselt/sage/local/lib/python/site-
 packages/sage/misc/displayhook.py", line 142, in print_obj
         print >>out_stream, `obj`
       File "base.pyx", line 80, in
 sage.plot.plot3d.base.Graphics3d.__repr__ (sage/plot/plot3d/base.c:2453)
         self.show()
       File "base.pyx", line 1048, in sage.plot.plot3d.base.Graphics3d.show
 (sage/plot/plot3d/base.c:9375)
         opts = self._process_viewing_options(kwds)
       File "base.pyx", line 953, in
 sage.plot.plot3d.base.Graphics3d._process_viewing_options
 (sage/plot/plot3d/base.c:9174)
         self._determine_frame_aspect_ratio(opts['aspect_ratio'])
       File "base.pyx", line 199, in
 sage.plot.plot3d.base.Graphics3d._determine_frame_aspect_ratio
 (sage/plot/plot3d/base.c:3397)
         return [(a_max[i] - a_min[i])*aspect_ratio[i] for i in range(3)]
     TypeError: can't multiply sequence by non-int of type 'float'
 **********************************************************************
 File "/mnt/usb1/scratch/novoselt/sage/devel/sage-
 main/sage/modules/free_module_element.pyx", line 1391:
     sage: plot(v, plot_type='arrow')
 Exception raised:
     Traceback (most recent call last):
       File "/mnt/usb1/scratch/novoselt/sage/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File "/mnt/usb1/scratch/novoselt/sage/local/bin/sagedoctest.py",
 line 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/mnt/usb1/scratch/novoselt/sage/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_45[10]>", line 1, in <module>
         plot(v, plot_type='arrow')###line 1391:
     sage: plot(v, plot_type='arrow')
       File "/mnt/usb1/scratch/novoselt/sage/local/lib/python/site-
 packages/sage/misc/displayhook.py", line 174, in displayhook
         print_obj(sys.stdout, obj)
       File "/mnt/usb1/scratch/novoselt/sage/local/lib/python/site-
 packages/sage/misc/displayhook.py", line 142, in print_obj
         print >>out_stream, `obj`
       File "base.pyx", line 80, in
 sage.plot.plot3d.base.Graphics3d.__repr__ (sage/plot/plot3d/base.c:2453)
         self.show()
       File "base.pyx", line 1048, in sage.plot.plot3d.base.Graphics3d.show
 (sage/plot/plot3d/base.c:9375)
         opts = self._process_viewing_options(kwds)
       File "base.pyx", line 953, in
 sage.plot.plot3d.base.Graphics3d._process_viewing_options
 (sage/plot/plot3d/base.c:9174)
         self._determine_frame_aspect_ratio(opts['aspect_ratio'])
       File "base.pyx", line 199, in
 sage.plot.plot3d.base.Graphics3d._determine_frame_aspect_ratio
 (sage/plot/plot3d/base.c:3397)
         return [(a_max[i] - a_min[i])*aspect_ratio[i] for i in range(3)]
     TypeError: can't multiply sequence by non-int of type 'float'
 **********************************************************************
 File "/mnt/usb1/scratch/novoselt/sage/devel/sage-
 main/sage/modules/free_module_element.pyx", line 1393:
     sage: plot(v, plot_type='point')+frame3d((0,0,0), v.list())
 Exception raised:
     Traceback (most recent call last):
       File "/mnt/usb1/scratch/novoselt/sage/local/bin/ncadoctest.py", line
 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File "/mnt/usb1/scratch/novoselt/sage/local/bin/sagedoctest.py",
 line 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/mnt/usb1/scratch/novoselt/sage/local/bin/ncadoctest.py", line
 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_45[12]>", line 1, in <module>
         plot(v,
 plot_type='point')+frame3d((Integer(0),Integer(0),Integer(0)),
 v.list())###line 1393:
     sage: plot(v, plot_type='point')+frame3d((0,0,0), v.list())
       File "/mnt/usb1/scratch/novoselt/sage/local/lib/python/site-
 packages/sage/misc/displayhook.py", line 174, in displayhook
         print_obj(sys.stdout, obj)
       File "/mnt/usb1/scratch/novoselt/sage/local/lib/python/site-
 packages/sage/misc/displayhook.py", line 142, in print_obj
         print >>out_stream, `obj`
       File "base.pyx", line 80, in
 sage.plot.plot3d.base.Graphics3d.__repr__ (sage/plot/plot3d/base.c:2453)
         self.show()
       File "base.pyx", line 1048, in sage.plot.plot3d.base.Graphics3d.show
 (sage/plot/plot3d/base.c:9375)
         opts = self._process_viewing_options(kwds)
       File "base.pyx", line 953, in
 sage.plot.plot3d.base.Graphics3d._process_viewing_options
 (sage/plot/plot3d/base.c:9174)
         self._determine_frame_aspect_ratio(opts['aspect_ratio'])
       File "base.pyx", line 199, in
 sage.plot.plot3d.base.Graphics3d._determine_frame_aspect_ratio
 (sage/plot/plot3d/base.c:3397)
         return [(a_max[i] - a_min[i])*aspect_ratio[i] for i in range(3)]
     TypeError: can't multiply sequence by non-int of type 'float'
 **********************************************************************
 1 items had failures:
    3 of  17 in __main__.example_45
 ***Test Failed*** 3 failures.
 }}}

 These are the only errors on the whole library. I guess they should be
 fixed in the same way as in the reviewer patch. Or maybe there should be a
 better fix?..

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/2100#comment:36>
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 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