SF.net SVN: matplotlib: [4941] trunk/matplotlib/lib/matplotlib
Revision: 4941 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4941&view=rev Author: jdh2358 Date: 2008-02-05 13:50:58 -0800 (Tue, 05 Feb 2008) Log Message: --- applied gael's ginput patch Modified Paths: -- trunk/matplotlib/lib/matplotlib/backend_bases.py trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py trunk/matplotlib/lib/matplotlib/backends/backend_qt.py trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py trunk/matplotlib/lib/matplotlib/backends/backend_wx.py trunk/matplotlib/lib/matplotlib/figure.py trunk/matplotlib/lib/matplotlib/pyplot.py Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py === --- trunk/matplotlib/lib/matplotlib/backend_bases.py2008-02-05 07:54:01 UTC (rev 4940) +++ trunk/matplotlib/lib/matplotlib/backend_bases.py2008-02-05 21:50:58 UTC (rev 4941) @@ -1151,7 +1151,13 @@ """ return self.callbacks.disconnect(cid) +def flush_events(self): +""" Flush the GUI events for the figure. Implemented only for +backends with GUIs. +""" +raise NotImplementedError + class FigureManagerBase: """ Helper class for matlab mode, wraps everything up into a neat bundle Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py === --- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008-02-05 07:54:01 UTC (rev 4940) +++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008-02-05 21:50:58 UTC (rev 4941) @@ -386,6 +386,13 @@ def get_default_filetype(self): return 'png' +def flush_events(self): +gtk.gdk.threads_enter() +while gtk.events_pending(): +gtk.main_iteration(True) +gtk.gdk.flush() +gtk.gdk.threads_leave() + class FigureManagerGTK(FigureManagerBase): """ Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt.py === --- trunk/matplotlib/lib/matplotlib/backends/backend_qt.py 2008-02-05 07:54:01 UTC (rev 4940) +++ trunk/matplotlib/lib/matplotlib/backends/backend_qt.py 2008-02-05 21:50:58 UTC (rev 4941) @@ -175,6 +175,9 @@ return key +def flush_events(self): +qt.qApp.processEvents() + class FigureManagerQT( FigureManagerBase ): """ Public attributes Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py === --- trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2008-02-05 07:54:01 UTC (rev 4940) +++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2008-02-05 21:50:58 UTC (rev 4941) @@ -13,7 +13,7 @@ from matplotlib.mathtext import MathTextParser from matplotlib.widgets import SubplotTool -from PyQt4 import QtCore, QtGui +from PyQt4 import QtCore, QtGui, Qt backend_version = "0.9.1" def fn_name(): return sys._getframe(1).f_code.co_name @@ -174,6 +174,9 @@ return key +def flush_events(self): +Qt.qApp.processEvents() + class FigureManagerQT( FigureManagerBase ): """ Public attributes Modified: trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py === --- trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py 2008-02-05 07:54:01 UTC (rev 4940) +++ trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py 2008-02-05 21:50:58 UTC (rev 4941) @@ -269,8 +269,9 @@ key = self._get_key(event) FigureCanvasBase.key_release_event(self, key, guiEvent=event) +def flush_events(self): +self._master.update() - class FigureManagerTkAgg(FigureManagerBase): """ Public attributes Modified: trunk/matplotlib/lib/matplotlib/backends/backend_wx.py === --- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2008-02-05 07:54:01 UTC (rev 4940) +++ trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2008-02-05 21:50:58 UTC (rev 4941) @@ -1301,6 +1301,9 @@ wxapp.Yield() return True +def flush_events(self): +wx.Yield() + class FigureManagerWx(FigureManagerBase): """ This class contains the FigureCanvas and GUI frame Modified: trunk/matplotlib/lib/matplotlib/figure.py === --- trunk/matplotlib/lib/matplotlib/figure.py 2008-02-05 07:54:01 UTC (rev 4940) +++ trunk/matplotlib/lib/matplotlib/figure.py 2008-02-05 21:50:58 UTC (rev 4941) @@ -2,6 +2,7 @@ Figure class -- add docstring here! """ import numpy as npy +import time import artist from artist import Artist @@ -96,6 +97,83
SF.net SVN: matplotlib: [4942] trunk/matplotlib
Revision: 4942 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4942&view=rev Author: jdh2358 Date: 2008-02-05 13:52:04 -0800 (Tue, 05 Feb 2008) Log Message: --- added ginput example Modified Paths: -- trunk/matplotlib/CHANGELOG Added Paths: --- trunk/matplotlib/examples/ginput_demo.py Modified: trunk/matplotlib/CHANGELOG === --- trunk/matplotlib/CHANGELOG 2008-02-05 21:50:58 UTC (rev 4941) +++ trunk/matplotlib/CHANGELOG 2008-02-05 21:52:04 UTC (rev 4942) @@ -1,3 +1,6 @@ +2008-02-05 Applied Gael's ginput patch and created + examples/ginput_demo.py - JDH + 2008-02-03 Expose interpnames, a list of valid interpolation methods, as an AxesImage class attribute. - EF Added: trunk/matplotlib/examples/ginput_demo.py === --- trunk/matplotlib/examples/ginput_demo.py(rev 0) +++ trunk/matplotlib/examples/ginput_demo.py2008-02-05 21:52:04 UTC (rev 4942) @@ -0,0 +1,6 @@ +from pylab import arange, plot, sin, ginput, show +t = arange(10) +plot(t, sin(t)) +print "Please click" +ginput(3, verbose=True) +show() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [4943] trunk/matplotlib/lib/matplotlib/backends/ backend_wx.py
Revision: 4943 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4943&view=rev Author: pkienzle Date: 2008-02-05 15:17:34 -0800 (Tue, 05 Feb 2008) Log Message: --- Move flush_events to canvas as in other backends; remove Yield loop on gui_repaint; fix showfig callback in FigureManager Modified Paths: -- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py Modified: trunk/matplotlib/lib/matplotlib/backends/backend_wx.py === --- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2008-02-05 21:52:04 UTC (rev 4942) +++ trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2008-02-05 23:17:34 UTC (rev 4943) @@ -889,6 +889,9 @@ if repaint: self.gui_repaint() +def flush_events(self): +wx.Yield() + def _get_imagesave_wildcards(self): 'return the wildcard string for the filesave dialog' default_filetype = self.get_default_filetype() @@ -921,7 +924,7 @@ drawDC.BeginDrawing() drawDC.DrawBitmap(self.bitmap, 0, 0) drawDC.EndDrawing() -wx.GetApp().Yield() +#wx.GetApp().Yield() filetypes = FigureCanvasBase.filetypes.copy() filetypes['bmp'] = 'Windows bitmap' @@ -1301,9 +1304,6 @@ wxapp.Yield() return True -def flush_events(self): -wx.Yield() - class FigureManagerWx(FigureManagerBase): """ This class contains the FigureCanvas and GUI frame @@ -1332,9 +1332,9 @@ self.canvas.figure.add_axobserver(notify_axes_change) def showfig(*args): -figwin.frame.Show() -figwin.canvas.realize() -figwin.canvas.draw() +frame.Show() +canvas.realize() +canvas.draw() # attach a show method to the figure self.canvas.figure.show = showfig This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [4944] trunk/matplotlib/examples/backend_driver.py
Revision: 4944
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4944&view=rev
Author: pkienzle
Date: 2008-02-05 15:31:32 -0800 (Tue, 05 Feb 2008)
Log Message:
---
Put output from each backend in a separate directory
Modified Paths:
--
trunk/matplotlib/examples/backend_driver.py
Modified: trunk/matplotlib/examples/backend_driver.py
===
--- trunk/matplotlib/examples/backend_driver.py 2008-02-05 23:17:34 UTC (rev
4943)
+++ trunk/matplotlib/examples/backend_driver.py 2008-02-05 23:31:32 UTC (rev
4944)
@@ -131,6 +131,16 @@
_backend = 'cairo'
else:
_backend = backend
+
+# Clear the destination directory for the examples
+path = backend
+if os.path.exists(path):
+import glob
+for fname in os.listdir(path):
+os.unlink(os.path.join(path,fname))
+else:
+os.mkdir(backend)
+
for fname in files:
if fname in exclude:
print '\tSkipping %s, known to fail on backend: %s'%backend
@@ -138,7 +148,7 @@
print ('\tdriving %-40s' % (fname)),
basename, ext = os.path.splitext(fname)
-outfile = basename + '_%s'%backend
+outfile = os.path.join(path,basename)
tmpfile_name = '_tmp_%s.py' % basename
tmpfile = file(tmpfile_name, 'w')
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [4945] trunk/matplotlib
Revision: 4945 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4945&view=rev Author: efiring Date: 2008-02-05 22:30:44 -0800 (Tue, 05 Feb 2008) Log Message: --- Added getters for title, xlabel, ylabel (Brandon Kieth) Modified Paths: -- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/CHANGELOG === --- trunk/matplotlib/CHANGELOG 2008-02-05 23:31:32 UTC (rev 4944) +++ trunk/matplotlib/CHANGELOG 2008-02-06 06:30:44 UTC (rev 4945) @@ -1,3 +1,6 @@ +2008-02-05 Added getters for title, xlabel, ylabel, as requested + by Brandon Kieth - EF + 2008-02-05 Applied Gael's ginput patch and created examples/ginput_demo.py - JDH Modified: trunk/matplotlib/lib/matplotlib/axes.py === --- trunk/matplotlib/lib/matplotlib/axes.py 2008-02-05 23:31:32 UTC (rev 4944) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-02-06 06:30:44 UTC (rev 4945) @@ -2225,6 +2225,12 @@ Labelling +def get_title(self): +""" +Get the title text string. +""" +return self.title.get_text() + def set_title(self, label, fontdict=None, **kwargs): """ SET_TITLE(label, fontdict=None, **kwargs): @@ -2250,6 +2256,13 @@ return self.title set_title.__doc__ = cbook.dedent(set_title.__doc__) % martist.kwdocd +def get_xlabel(self): +""" +Get the xlabel text string. +""" +label = self.xaxis.get_label() +return label.get_text() + def set_xlabel(self, xlabel, fontdict=None, **kwargs): """ SET_XLABEL(xlabel, fontdict=None, **kwargs) @@ -2269,6 +2282,13 @@ return label set_xlabel.__doc__ = cbook.dedent(set_xlabel.__doc__) % martist.kwdocd +def get_ylabel(self): +""" +Get the ylabel text string. +""" +label = self.yaxis.get_label() +return label.get_text() + def set_ylabel(self, ylabel, fontdict=None, **kwargs): """ SET_YLABEL(ylabel, fontdict=None, **kwargs) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
