Transparent graph background

Hi there,

Thanks for your help with my problem yesterday.. the code was fine,
and it was a problem with my system. I installed a fresh copy of EPD's
Python and that fixed it!

I have a quick question about making the chart background transparent.

Here's the original graph: http://screencast.com/t/YuRZLOnmg

Here's what i looks like when I use 'fig.frameon= False' :
http://screencast.com/t/ZFkUFRoor
(the gray part is transparent)

So how do I make the last remaining white part transparent? I still
want to keep the black axis, and just get rid of the white.

Thanks!
Tyler

## Update the graph
r = mlab.csv2rec("gmail-count.txt", names='date,val1,val2',
                 converterd={'date' : cbook.todatetime('%Y-%m-%d %H:%M:%S')})

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(r.date, r.val1, 'g-')
fig.autofmt_xdate ()
#fig.frameon= False
plt.savefig("gmail-graph.png")

Have you seen

http://matplotlib.sourceforge.net/faq/howto_faq.html?highlight=codex%20transparent#save-transparent-figures

You can make the axes transparent with

ax.patch.set_alpha(0.5)

or turn off the axes face entirely with

ac.patch.set_facecolor(‘None’)

Note the string ‘None’ is not the symbol None – the latter means “use the default face color”

JDH

···

On Thu, Mar 26, 2009 at 10:00 AM, Tyler B <bosmeny@…1972…> wrote:

Hi there,

Thanks for your help with my problem yesterday… the code was fine,

and it was a problem with my system. I installed a fresh copy of EPD’s

Python and that fixed it!

I have a quick question about making the chart background transparent.

Here’s the original graph: http://screencast.com/t/YuRZLOnmg

Here’s what i looks like when I use ‘fig.frameon= False’ :

http://screencast.com/t/ZFkUFRoor

(the gray part is transparent)

So how do I make the last remaining white part transparent? I still

want to keep the black axis, and just get rid of the white.