From: Michael D. <md...@st...> - 2008-06-25 14:10:08
|
"rectangle" might be a bad name for "axesPatch" since it can be a circle for polar plots, and ellipse for geo plots etc. Cheers, Mike John Hunter wrote: > On Wed, Jun 25, 2008 at 8:25 AM, Stéfan van der Walt <st...@su...> wrote: > >> 2008/6/25 Michael Droettboom <md...@st...>: >> >>> Maybe this should be made an option on the "transparent" kwarg to savefig, >>> something like: >>> >>> transparent = 'figure' | 'figure_and_axes' >>> >>> Or is that just making things too complicated? >>> >> Those options would both be very handy. >> > > Stefan -- just for a little background. The figure has a > matplotlib.patches.Rectangle instance called "figurePatch" and the > axes has a Rectangle instance called axesPatch. You can set any > property on them directly (facecolor, edgecolor, linewidth, linestyle, > alpha). Eg, > > fig = plt.figure() > fig.figurePatch.set_alpha(0.5) > ax = fig.add_subplot(111) > ax.axesPatch.set_alpha(0.5) > > Michael's transparent kwarg is just a helper function to do this > automatically at save time w/o affecting the screen rendered figure. > For stylistic reasons, I'd like a new name for figurePatch and > rectanglePatch. "background", "rectangle" and "patch" would all be > nicer. I'm inclined toward "rectangle" -- I think I'll just put an > alias in Figure and Axes unless someone has a better idea. > > JDH > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |