legend bg color?

Hi all,

Can you change the background of the figure legends generated by matplotlib? I’d like to have some white-on-black figures for a few presentations that I’m giving, and I can change the figure and axes facecolor attributes accordingly (as well as the default text and axis label colors), but I can’t find an option anywhere to change the background of the legend: it still shows up as a white box. Any ideas?

Thanks in advance.

Yours,
Patrick

Never mind - I missed a key point in the documentation. For anyone who’s wondering:

lg = legend()
lg.get_frame().set_facecolor(‘black’)

works fine.

–Patrick

···

On 9/5/07, Patrick Bradley <patrick.bradley@…287…> wrote:

Hi all,

Can you change the background of the figure legends generated by matplotlib? I’d like to have some white-on-black figures for a few presentations that I’m giving, and I can change the figure and axes facecolor attributes accordingly (as well as the default text and axis label colors), but I can’t find an option anywhere to change the background of the legend: it still shows up as a white box. Any ideas?

Thanks in advance.

Yours,
Patrick

Hi,

···

On 9/5/07, Patrick Bradley <patrick.bradley@...287...> wrote:

lg = legend()
lg.get_frame().set_facecolor('black')

Does anyone know how to set this background to transparent? I think I
sent a message to the list a few days ago, but I think it never made
it...

Cheers!
Jose