SF.net SVN: matplotlib:[8397] trunk/matplotlib/lib/matplotlib/backends/ backend_wx.py

2010-06-08 Thread efiring
Revision: 8397
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8397&view=rev
Author:   efiring
Date: 2010-06-08 21:57:14 + (Tue, 08 Jun 2010)

Log Message:
---
backend_wx: modernize show; multiple calls to show work now

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  2010-06-07 
23:39:24 UTC (rev 8396)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_wx.py  2010-06-08 
21:57:14 UTC (rev 8397)
@@ -1423,32 +1423,22 @@
 
 def show():
 """
-Current implementation assumes that matplotlib is executed in a PyCrust
-shell. It appears to be possible to execute wxPython applications from
-within a PyCrust without having to ensure that wxPython has been created
-in a secondary thread (e.g. SciPy gui_thread).
-
-Unfortunately, gui_thread seems to introduce a number of further
-dependencies on SciPy modules, which I do not wish to introduce
-into the backend at this point. If there is a need I will look
-into this in a later release.
+Show all the figures and enter the wx main loop.
+This should be the last line of your script.
 """
 DEBUG_MSG("show()", 3, None)
 
 for figwin in Gcf.get_all_fig_managers():
 figwin.frame.Show()
 
-if show._needmain and not matplotlib.is_interactive():
-# start the wxPython gui event if there is not already one running
+needmain = not wx.App.IsMainLoopRunning()
+if  needmain and len(Gcf.get_all_fig_managers())>0:
 wxapp = wx.GetApp()
 if wxapp is not None:
-# wxPython 2.4 has no wx.App.IsMainLoopRunning() method
-imlr = getattr(wxapp, 'IsMainLoopRunning', lambda: False)
-if not imlr():
-wxapp.MainLoop()
-show._needmain = False
-show._needmain = True
+wxapp.MainLoop()
+# start the wxPython gui event if there is not already one running
 
+
 def new_figure_manager(num, *args, **kwargs):
 """
 Create a new figure manager instance


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[8398] trunk/matplotlib/lib/matplotlib/backends/ backend_macosx.py

2010-06-08 Thread efiring
Revision: 8398
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8398&view=rev
Author:   efiring
Date: 2010-06-08 22:41:10 + (Tue, 08 Jun 2010)

Log Message:
---
[3013440] add set_alpha method to GraphicsContextMac

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py  2010-06-08 
21:57:14 UTC (rev 8397)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py  2010-06-08 
22:41:10 UTC (rev 8398)
@@ -180,6 +180,11 @@
 GraphicsContextBase.__init__(self)
 _macosx.GraphicsContext.__init__(self)
 
+def set_alpha(self, alpha):
+GraphicsContextBase.set_alpha(self, alpha)
+_alpha = self.get_alpha()
+_macosx.GraphicsContext.set_alpha(self, _alpha)
+
 def set_foreground(self, fg, isRGB=False):
 GraphicsContextBase.set_foreground(self, fg, isRGB)
 rgb = self.get_rgb()


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[8399] trunk/matplotlib/lib/matplotlib/axes.py

2010-06-08 Thread efiring
Revision: 8399
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8399&view=rev
Author:   efiring
Date: 2010-06-09 03:01:53 + (Wed, 09 Jun 2010)

Log Message:
---
[2982047] start default collection label with underscore, like line label

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/axes.py

Modified: trunk/matplotlib/lib/matplotlib/axes.py
===
--- trunk/matplotlib/lib/matplotlib/axes.py 2010-06-08 22:41:10 UTC (rev 
8398)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2010-06-09 03:01:53 UTC (rev 
8399)
@@ -1398,7 +1398,7 @@
 '''
 label = collection.get_label()
 if not label:
-collection.set_label('collection%d'%len(self.collections))
+collection.set_label('_collection%d'%len(self.collections))
 self.collections.append(collection)
 self._set_artist_props(collection)
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[8400] trunk/matplotlib/lib/matplotlib/backends/ backend_gtk.py

2010-06-08 Thread efiring
Revision: 8400
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8400&view=rev
Author:   efiring
Date: 2010-06-09 03:02:34 + (Wed, 09 Jun 2010)

Log Message:
---
remove spurious whitespace

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2010-06-09 
03:01:53 UTC (rev 8399)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2010-06-09 
03:02:34 UTC (rev 8400)
@@ -93,7 +93,7 @@
 class TimerGTK(TimerBase):
 '''
 Subclass of :class:`backend_bases.TimerBase` that uses GTK for timer 
events.
-
+
 Attributes:
 * interval: The time between timer events in milliseconds. Default
 is 1000 ms.
@@ -118,7 +118,7 @@
 
 def _on_timer(self):
 TimerBase._on_timer(self)
-
+
 # Gtk timeout_add() requires that the callback returns True if it
 # is to be called again.
 if len(self.callbacks) > 0 and not self._single:
@@ -453,9 +453,9 @@
 Creates a new backend-specific subclass of 
:class:`backend_bases.Timer`.
 This is useful for getting periodic events through the backend's native
 event loop. Implemented only for backends with GUIs.
-
+
 optional arguments:
-
+
 *interval*
   Timer interval in milliseconds
 *callbacks*


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[8401] trunk/matplotlib/lib/pytz/zoneinfo

2010-06-08 Thread efiring
Revision: 8401
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8401&view=rev
Author:   efiring
Date: 2010-06-09 03:04:53 + (Wed, 09 Jun 2010)

Log Message:
---
put 3 more pytz zoneinfo files under svn control; they were missed by accident 
when I updated pytz

Added Paths:
---
trunk/matplotlib/lib/pytz/zoneinfo/Antarctica/Macquarie
trunk/matplotlib/lib/pytz/zoneinfo/Asia/Kathmandu
trunk/matplotlib/lib/pytz/zoneinfo/Asia/Novokuznetsk

Added: trunk/matplotlib/lib/pytz/zoneinfo/Antarctica/Macquarie
===
(Binary files differ)


Property changes on: trunk/matplotlib/lib/pytz/zoneinfo/Antarctica/Macquarie
___
Added: svn:mime-type
   + application/octet-stream

Added: trunk/matplotlib/lib/pytz/zoneinfo/Asia/Kathmandu
===
(Binary files differ)


Property changes on: trunk/matplotlib/lib/pytz/zoneinfo/Asia/Kathmandu
___
Added: svn:mime-type
   + application/octet-stream

Added: trunk/matplotlib/lib/pytz/zoneinfo/Asia/Novokuznetsk
===
(Binary files differ)


Property changes on: trunk/matplotlib/lib/pytz/zoneinfo/Asia/Novokuznetsk
___
Added: svn:mime-type
   + application/octet-stream


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins