2010/9/20 Eli Brosh <email@example.com>:
> I need to prepare two versions of figures: color and BW(Black&White).
> Is there an easy way to produce just the colored version and than use some
> command or script to turn it to BW or grayscale?
> I thought that converting from color to BW really means: "in all object in
> the figure, turn any color that is not white to black".
> Is there an easy way to implement this?
I implemented a RC setting 'gray'. Turn it on by setting either
matplotlib.rcParams['gray'] = True or by setting it in your
You can also gray out any artist (e.g., the figure), by calling
figure = matplotlib.figure.Figure()
... do plotting ...
... save as colour ...
... save as b/w ...
If you're using pyplot or pylab, I'm not sure, but I think there is a
function gcf() which gives you the current figure object so that you
can turn gray on there. pylab support should be placed on the TODO
list, I would appreciate feedback on the preferred pylab way, since
I'm not a pylab user at all. I think a pylab function gray(boolean)
would do it.
It's beta, so try it out. It's tested, though.