Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

matplotlib-users

 [Matplotlib-users] How to get axes limits of subplot ? From: Axel Kowald - 2004-12-14 16:19:58 ```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 some trick with get() ? Btw. is there somewhere a list of properties that I can get/set with get() or set() ? Many thanks, Axel ```
 Re: [Matplotlib-users] How to get axes limits of subplot ? From: John Hunter - 2004-12-14 19:13:46 ```>>>>> "Axel" == Axel Kowald writes: Axel> Hi, I'm new to matplotlib and I have a question regarding Axel> axes. Once I created some axes (either with the axes() Axel> command or with subplot() ), how can I later find out the Axel> limits (left bottom, width, height) of the axes ? Maybe 7 >>> ax = subplot(111) 8 >>> ax.get_position() Out[8]: [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. Axel> some trick with get() ? Btw. is there somewhere a list of Axel> properties that I can get/set with get() or set() ? A timely question. This feature was just added in the last release, 0.65 >>> set(ax) # lists all settable properties >>> get(ax) # lists all properties and their values Works for any matplotlib artist or sequence of artists; see http://matplotlib.sf.net/examples/set_and_get.py 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. JDH ```