#260: [with patch, needs work] background of graphics output
-------------------------+--------------------------------------------------
 Reporter:  was          |       Owner:  was       
     Type:  enhancement  |      Status:  new       
 Priority:  minor        |   Milestone:  sage-4.1.2
Component:  graphics     |    Keywords:            
 Reviewer:               |      Author:            
   Merged:               |  
-------------------------+--------------------------------------------------

Comment(by mpatel):

 A quick (and crude) change to `Graphics.save()` sets up a
 `background_color` option:
 {{{
 #!python
         if savenow:
 [...]
             background_color = None
             if kwds.has_key('background_color'):
                 background_color = kwds.pop('background_color', False)

             figure=self.matplotlib(*args, **kwds)
 [...]
             if background_color:
                 figure.patch.set_color(background_color)
                 for ax in figure.axes:
                     ax.patch.set_color(background_color)
                 # Not sure how to avoid using these:
                 options['edgecolor'] = background_color
                 options['facecolor'] = background_color

             figure.savefig(filename,dpi=dpi,bbox_inches='tight',**options)
 }}}
 If we can avoid using the `savefig()` options, perhaps we can set a
 background color ''and'' transparency level entirely in `matplotlib()`.
 Then, I think, we could handle combinations like

  * `transparent=True, opacity=0.5`
  * `opacity=0.8, background_color='#ffbefa'`

 in a way a user expects.  Thoughts?

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