another problem with hardcoded colors

When using white over back color scheme the legend() is unreadable, with
apparently hard-coded white legend background - or is there a way to set
it in the rc file?

Dominik

Unfortunately no.
I recommend you to manually change the color of the legend frame.

l = plt.legend()
l.legendPatch.set_fc(plt.rcParams["axes.facecolor"])

I'm not very kin to introduce a new rc param for this. I think it is
good enough to have the legend background to follow the color of the
axes, as above. I'll try to commit the relevant change soon.
But any other suggestion will be welcomed.

Regards,

-JJ

···

On Sat, Jan 9, 2010 at 4:27 PM, Dominik Szczerba <dominik@...2910...> wrote:

When using white over back color scheme the legend() is unreadable, with
apparently hard-coded white legend background - or is there a way to set
it in the rc file?

Jae-Joon Lee wrote:

When using white over back color scheme the legend() is unreadable, with
apparently hard-coded white legend background - or is there a way to set
it in the rc file?

Unfortunately no.
I recommend you to manually change the color of the legend frame.

l = plt.legend()
l.legendPatch.set_fc(plt.rcParams["axes.facecolor"])

I'm not very kin to introduce a new rc param for this. I think it is
good enough to have the legend background to follow the color of the
axes, as above. I'll try to commit the relevant change soon.
But any other suggestion will be welcomed.

Hmmm, that property really deserves its own rc param, but if you do not
like it, it should at least be somewhere automatically set to the
current background color to be resistant against people like me :wink: I
would be happy to have such a fix...

Thanks,
Dominik

···

On Sat, Jan 9, 2010 at 4:27 PM, Dominik Szczerba <dominik@...2910...> wrote:

Regards,

-JJ

I just committed a change that makes the face- and edgecolor of the
legend patch to match those of the axes patch.

The reason I'm not very kin to introduce such new rc parameters is
partly that, we actually needs a lot of rc parameters, not just the
facecolor of the legend parch. What about the edgecolor of the legend
patch, or the linewidth? Or the color of the legend text. What about
the colors of the parch around the annotation text?

I don't think it is desirable to add a new rc parameter for every
property that needs to be customized.
In my personal opinion, one of the the best way to customize the plot
is to have something like CSS that supports inheritance of properties.

So, I'm inclined to leave it as is. But other developers may have
different thoughts.

Regards,

-JJ

···

On Mon, Jan 11, 2010 at 2:38 PM, Dominik Szczerba <dominik@...2910...> wrote:

Hmmm, that property really deserves its own rc param, but if you do not
like it, it should at least be somewhere automatically set to the
current background color to be resistant against people like me :wink: I
would be happy to have such a fix...