control the margins of a plot in a figure

To control the white space you can set the position and size of the axes:

ax = gca()
ax.set_position(pos)

set_position(self, pos) method of matplotlib.axes.Subplot instance
    Set the axes position with pos = [left, bottom, width, height]
    in relative 0,1 coords

    ACCEPTS: len(4) sequence of floats

You can also change the default values of figure.subplot in the
matplotlibrc file.

Mark

···

Hello,
I set my figure to a certain size and I want the plot to be scaled
into that figure canvas
Currently, that doesnt happen, there is a lot of whitespace at the margins
how do I control that whitespace?
thanks
-frank

Thank you mark!
coming from gnuplot, this wasn't obvious to me, as the word "margin"
appears nowhere in the docs
-frank

···

On 11/14/05, Mark Bakker <markbak@...287...> wrote:

To control the white space you can set the position and size of the axes:

ax = gca()
ax.set_position(pos)

set_position(self, pos) method of matplotlib.axes.Subplot instance
    Set the axes position with pos = [left, bottom, width, height]
    in relative 0,1 coords

    ACCEPTS: len(4) sequence of floats

You can also change the default values of figure.subplot in the
matplotlibrc file.

Mark

> Hello,
> I set my figure to a certain size and I want the plot to be scaled
> into that figure canvas
> Currently, that doesnt happen, there is a lot of whitespace at the margins
> how do I control that whitespace?
> thanks
> -frank