From: <ef...@us...> - 2009-03-08 06:37:15
|
Revision: 6966 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6966&view=rev Author: efiring Date: 2009-03-08 06:37:06 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Let pyplot users find out if a figure number exists, or list fignums. Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/doc/api/api_changes.rst trunk/matplotlib/lib/matplotlib/pyplot.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2009-03-07 23:47:02 UTC (rev 6965) +++ trunk/matplotlib/CHANGELOG 2009-03-08 06:37:06 UTC (rev 6966) @@ -1,3 +1,5 @@ +2009-03-07 Add pyplot access to figure number list - EF + 2009-02-28 hashing of FontProperties accounts current rcParams - JJL 2009-02-28 Prevent double-rendering of shared axis in twinx, twiny - EF Modified: trunk/matplotlib/doc/api/api_changes.rst =================================================================== --- trunk/matplotlib/doc/api/api_changes.rst 2009-03-07 23:47:02 UTC (rev 6965) +++ trunk/matplotlib/doc/api/api_changes.rst 2009-03-08 06:37:06 UTC (rev 6966) @@ -19,8 +19,12 @@ Changes for 0.98.x ================== -* Removed numerix package. +* Added new :func:`matplotlib.pyplot.fignum_exists` and + :func:`matplotlib.pyplot.get_fignums`; they merely expose + information that had been hidden in :mod:`matplotlib._pylab_helpers`. +* Deprecated numerix package. + * Added new :func:`matplotlib.image.imsave` and exposed it to the :mod:`matplotlib.pyplot` interface. @@ -46,7 +50,7 @@ ================ ================ -* Removed the configobj and experiemtnal traits rc support +* Removed the configobj and experimental traits rc support * Modified :func:`matplotlib.mlab.psd`, :func:`matplotlib.mlab.csd`, :func:`matplotlib.mlab.cohere`, and :func:`matplotlib.mlab.specgram` Modified: trunk/matplotlib/lib/matplotlib/pyplot.py =================================================================== --- trunk/matplotlib/lib/matplotlib/pyplot.py 2009-03-07 23:47:02 UTC (rev 6965) +++ trunk/matplotlib/lib/matplotlib/pyplot.py 2009-03-08 06:37:06 UTC (rev 6966) @@ -273,6 +273,14 @@ else: return figure() +fignum_exists = _pylab_helpers.Gcf.has_fignum + +def get_fignums(): + "Return a list of existing figure numbers." + fignums = _pylab_helpers.Gcf.figs.keys() + fignums.sort() + return fignums + def get_current_fig_manager(): figManager = _pylab_helpers.Gcf.get_active() if figManager is None: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |