Hi, I'm new to matplotlib and I have a question regarding
> axes. Once I created some axes (either with the axes()
> command or with subplot() ), how can I later find out the
> limits (left bottom, width, height) of the axes ? Maybe
7 >>> ax = subplot(111)
8 >>> ax.get_position()
Out: [0.125, 0.10999999999999999, 0.77500000000000002, 0.79000000000000004]
You can change these values with ax.set_position. This works whether
ax is an Axes or Subplot instance.
> some trick with get() ? Btw. is there somewhere a list of
> properties that I can get/set with get() or set() ?
A timely question. This feature was just added in the last release,
>>> set(ax) # lists all settable properties
>>> get(ax) # lists all properties and their values
Works for any matplotlib artist or sequence of artists; see
This is still a work in progress - the introspection works in part by
examining doc strings and I have finished porting all the artist
docstrings to the new format. set(artist) should return a list of all
properties and their legal settable values. If the settable values is
listed as unknown, it means I haven't done that docstring yet.
Also, I'm working on implementing Perry's suggestion of returning
silent lists where appropriate, which will help in pretty printing the
output, eg, of get(ax).
But it's mostly functional, as is.