SF.net SVN: matplotlib:[6972] branches/v0_98_5_maint

2009-03-11 Thread efiring
Revision: 6972
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6972&view=rev
Author:   efiring
Date: 2009-03-11 19:36:22 + (Wed, 11 Mar 2009)

Log Message:
---
Ensure wx version >= 2.8; Sandro Tosi patch plus change to backend

Modified Paths:
--
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/examples/user_interfaces/embedding_in_wx2.py
branches/v0_98_5_maint/examples/user_interfaces/embedding_in_wx3.py
branches/v0_98_5_maint/examples/user_interfaces/embedding_in_wx4.py
branches/v0_98_5_maint/examples/user_interfaces/embedding_in_wx5.py
branches/v0_98_5_maint/lib/matplotlib/backends/backend_wx.py
branches/v0_98_5_maint/lib/matplotlib/backends/backend_wxagg.py

Modified: branches/v0_98_5_maint/CHANGELOG
===
--- branches/v0_98_5_maint/CHANGELOG2009-03-10 20:45:44 UTC (rev 6971)
+++ branches/v0_98_5_maint/CHANGELOG2009-03-11 19:36:22 UTC (rev 6972)
@@ -1,3 +1,6 @@
+2009-03-11 Ensure wx version >= 2.8; thanks to Sandro Tosi and
+   Chris Barker. - EF
+
 2009-02-26 Support image clipping in pdf backend. - JKS
 
 2009-02-16 Move plot_directive.py to the installed source tree.  Add

Modified: branches/v0_98_5_maint/examples/user_interfaces/embedding_in_wx2.py
===
--- branches/v0_98_5_maint/examples/user_interfaces/embedding_in_wx2.py 
2009-03-10 20:45:44 UTC (rev 6971)
+++ branches/v0_98_5_maint/examples/user_interfaces/embedding_in_wx2.py 
2009-03-11 19:36:22 UTC (rev 6972)
@@ -4,6 +4,10 @@
 toolbar - comment out the setA_toolbar line for no toolbar
 """
 
+# Used to guarantee to use at least Wx2.8
+import wxversion
+wxversion.ensureMinimal('2.8')
+
 from numpy import arange, sin, pi
 
 import matplotlib
@@ -20,15 +24,15 @@
 
 from matplotlib.figure import Figure
 
-from wx import *
+import wx
 
-class CanvasFrame(Frame):
+class CanvasFrame(wx.Frame):
 
 def __init__(self):
-Frame.__init__(self,None,-1,
+wx.Frame.__init__(self,None,-1,
  'CanvasFrame',size=(550,350))
 
-self.SetBackgroundColour(NamedColor("WHITE"))
+self.SetBackgroundColour(wx.NamedColor("WHITE"))
 
 self.figure = Figure()
 self.axes = self.figure.add_subplot(111)
@@ -38,8 +42,8 @@
 self.axes.plot(t,s)
 self.canvas = FigureCanvas(self, -1, self.figure)
 
-self.sizer = BoxSizer(VERTICAL)
-self.sizer.Add(self.canvas, 1, LEFT | TOP | GROW)
+self.sizer = wx.BoxSizer(wx.VERTICAL)
+self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
 self.SetSizer(self.sizer)
 self.Fit()
 
@@ -49,7 +53,7 @@
 def add_toolbar(self):
 self.toolbar = NavigationToolbar2Wx(self.canvas)
 self.toolbar.Realize()
-if Platform == '__WXMAC__':
+if wx.Platform == '__WXMAC__':
 # Mac platform (OSX 10.3, MacPython) does not seem to cope with
 # having a toolbar in a sizer. This work-around gets the buttons
 # back, but at the expense of having the toolbar at the top
@@ -62,8 +66,8 @@
 # By adding toolbar in sizer, we are able to put it at the bottom
 # of the frame - so appearance is closer to GTK version.
 # As noted above, doesn't work for Mac.
-self.toolbar.SetSize(Size(fw, th))
-self.sizer.Add(self.toolbar, 0, LEFT | EXPAND)
+self.toolbar.SetSize(wx.Size(fw, th))
+self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND)
 # update the axes menu on the toolbar
 self.toolbar.update()
 
@@ -71,7 +75,7 @@
 def OnPaint(self, event):
 self.canvas.draw()
 
-class App(App):
+class App(wx.App):
 
 def OnInit(self):
 'Create the main window and insert the custom frame'

Modified: branches/v0_98_5_maint/examples/user_interfaces/embedding_in_wx3.py
===
--- branches/v0_98_5_maint/examples/user_interfaces/embedding_in_wx3.py 
2009-03-10 20:45:44 UTC (rev 6971)
+++ branches/v0_98_5_maint/examples/user_interfaces/embedding_in_wx3.py 
2009-03-11 19:36:22 UTC (rev 6972)
@@ -18,6 +18,11 @@
 Thanks to matplotlib and wx teams for creating such great software!
 
 """
+
+# Used to guarantee to use at least Wx2.8
+import wxversion
+wxversion.ensureMinimal('2.8')
+
 import sys, time, os, gc
 import matplotlib
 matplotlib.use('WXAgg')
@@ -26,18 +31,18 @@
 from matplotlib.figure import Figure
 import numpy as npy
 
-from wx import *
-from wx.xrc import *
+import wx
+import wx.xrc as xrc
 
 ERR_TOL = 1e-5 # floating point slop for peak-detection
 
 
 matplotlib.rc('image', origin='lower')
 
-class PlotPanel(Panel):
+class PlotPanel(wx.Panel):
 
 def __init__(self, parent):
-Panel.__init__(self, parent, -1)
+wx.Panel.__init__(self, parent, -1)
 
 self.fig = Figure(

SF.net SVN: matplotlib:[6973] trunk/matplotlib

2009-03-11 Thread efiring
Revision: 6973
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6973&view=rev
Author:   efiring
Date: 2009-03-11 19:45:23 + (Wed, 11 Mar 2009)

Log Message:
---
Merged revisions 6972 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint


  r6972 | efiring | 2009-03-11 09:36:22 -1000 (Wed, 11 Mar 2009) | 2 lines
  
  Ensure wx version >= 2.8; Sandro Tosi patch plus change to backend


Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/examples/user_interfaces/embedding_in_wx2.py
trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py
trunk/matplotlib/examples/user_interfaces/embedding_in_wx4.py
trunk/matplotlib/examples/user_interfaces/embedding_in_wx5.py
trunk/matplotlib/lib/matplotlib/backends/backend_wx.py
trunk/matplotlib/lib/matplotlib/backends/backend_wxagg.py

Property Changed:

trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py


Property changes on: trunk/matplotlib
___
Modified: svnmerge-integrated
   - /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6960
   + /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6972
Modified: svn:mergeinfo
   - /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960
   + /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972

Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG  2009-03-11 19:36:22 UTC (rev 6972)
+++ trunk/matplotlib/CHANGELOG  2009-03-11 19:45:23 UTC (rev 6973)
@@ -1,3 +1,6 @@
+2009-03-11 Ensure wx version >= 2.8; thanks to Sandro Tosi and
+   Chris Barker. - EF
+
 2009-03-10 Fix join style bug in pdf. - JKS
 
 2009-03-07 Add pyplot access to figure number list - EF


Property changes on: trunk/matplotlib/doc/pyplots/README
___
Modified: svn:mergeinfo
   - 
/branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960
   + 
/branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972


Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___
Modified: svn:mergeinfo
   - /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960
   + /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972


Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___
Modified: svn:mergeinfo
   - /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960
   + /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5