pylab-matplotlib-canvas-background-color change...

I need a reference to a "How to..." (or a sample code) to changing the color
(Default or otherwise) of the Canvas, when plotting with matplotlib, using
Python 2.5 on Windows.

···


View this message in context: http://www.nabble.com/pylab-matplotlib-canvas-background-color-change…-tp22541479p22541479.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

When creating your figure, just pass the facecolor you want in

fig = figure(facecolor=‘red’)

With an existing figure instance, you can set the facecolor property of the rectangle patch

fig.patch.set_facecolor(‘green’)

or you can set the default ‘figure.facecolor’ property in your matplotlibrc config file

http://matplotlib.sourceforge.net/users/customizing.html

JDH

···

On Mon, Mar 16, 2009 at 1:52 PM, GKalman <kalman_g@…1836…954…> wrote:

I need a reference to a “How to…” (or a sample code) to changing the color

(Default or otherwise) of the Canvas, when plotting with matplotlib, using

Python 2.5 on Windows.

John Hunter-4 wrote:

···

On Mon, Mar 16, 2009 at 1:52 PM, GKalman <kalman_g@...1954...> wrote:

I need a reference to a "How to..." (or a sample code) to changing the
color
(Default or otherwise) of the Canvas, when plotting with matplotlib,
using
Python 2.5 on Windows.

Thanks John,

I was asking the WRONG question.
What is should have asked: How to set the color of the "axisbg"
Luckily I found an example under matplotlib examples: color_demo.py.

Please consider this Thread closed

When creating your figure, just pass the facecolor you want in

  fig = figure(facecolor='red')

With an existing figure instance, you can set the facecolor property of
the
rectangle patch

  fig.patch.set_facecolor('green')

or you can set the default 'figure.facecolor' property in your
matplotlibrc
config file

  http://matplotlib.sourceforge.net/users/customizing.html

JDH

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


View this message in context: http://www.nabble.com/pylab-matplotlib-canvas-background-color-change…-tp22541479p22563253.html
Sent from the matplotlib - users mailing list archive at Nabble.com.