OK,
This worked for me for turning the figure to black and white:
After saving the figure in colors I write
fig=gcf()
for o in fig.findobj(matplotlib.lines.Line2D):
o.set_color('k')
for o in fig.findobj(matplotlib.text.Text):
o.set_color('k')
Than I save it as black and white.
It is beyond my programming skills, but I wish we could have a built in
function of this type.
Perhaps as:
Fig_BW=makeBW(fig)
Regards,
Eli
On Mon, Sep 20, 2010 at 6:19 PM, Benjamin Root <ben.r...@ou.edu> wrote:
> On Mon, Sep 20, 2010 at 11:13 AM, Eli Brosh <ebro...@gmail.com> wrote:
>
>> Hello Friedrich,
>> I tried your second solution:
>>
>> figure = matplotlib.figure.Figure()
>> ... do plotting ...
>> ... save as colour ...
>> figure.set_gray(True)
>> ... save as b/w ...
>>
>> but it gives me an error message:
>> fig.set_gray(True)
>> AttributeError: 'Figure' object has no attribute 'set_gray'
>>
>> I got the same error message when trying in in pylab as:
>> fig1=gcf()
>> fig1.set_gray(True)
>>
>> and when generating the figure with the command
>> fig1 = matplotlib.figure.Figure()
>>
>> I am using matplotlib 0.99.1.1 on ubuntu 10.04/
>>
>> Is there another way to do it?
>>
>> Thanks,
>> Eli
>>
>>
> Eli, the feature is highly experimental, and is available only though fork
> of matplotlib that Friedrich made in the link he provided you. You would
> have to install that matplotlib from its source at that link.
>
> Ben Root
>
>
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users