#5812: [with patch, needs work?] option zorder has no effect for point() and
polygon()
----------------------+-----------------------------------------------------
 Reporter:  whuss     |       Owner:  whuss   
     Type:  defect    |      Status:  new     
 Priority:  minor     |   Milestone:  sage-4.0
Component:  graphics  |    Keywords:          
----------------------+-----------------------------------------------------

Comment(by kcrisman):

 Seems to work as advertised - a nice addition!   One question: if I
 manually set zorder, usually what you expect to happen happens.  But
 doesn't the order in which the objects are created matter otherwise, if
 everything has the same zorder?  For instance:
 {{{
 sage: p = polygon([(0,0),(0,1),(1,1)])
 sage: p+= polygon([(0,0),(0,2),(2,2)],rgbcolor='red')
 sage: p.show()
 }}}
 gives only a red triangle, while
 {{{
 sage: p = polygon([(0,0),(0,2),(2,2)],rgbcolor='red')
 sage: p+= polygon([(0,0),(0,1),(1,1)])
 sage: p.show()
 }}}
 shows the blue triangle on top of the red one.  But
 {{{
 sage: g = polygon([(0,0), (0,1), (1,1), (1,0)], rgbcolor = 'red', zorder =
 0)
 sage: g += point((1,1), rgbcolor = 'green', pointsize = 1000)
 sage: g.show()
 }}}
 and
 {{{
 sage: g = point((1,1), rgbcolor = 'green', pointsize = 1000)
 sage: g += polygon([(0,0), (0,1), (1,1), (1,0)], rgbcolor = 'red', zorder
 = 0)
 sage: g.show()
 }}}
 give the same thing, even though they should also have the same zorder at
 this point, if I understand the code correctly.  Or does the polygon
 somehow take precedence naturally in matplotlib?

 REVIEW

 Positive review of fixing the example given.  With regards to the comments
 above:

 If this is a bug or design in matplotlib, positive review.

 If it's possible to fix this in one of these files so that the order plots
 are added behaves consistently, needs work.

 If it's not possible to do that within these files, but it needs to be
 done in plot.py or show or something, positive review but please open
 another ticket.

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