SF.net SVN: matplotlib: [4995] trunk/matplotlib/lib/matplotlib/backends

2008-03-10 Thread mdboom
Revision: 4995
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4995&view=rev
Author:   mdboom
Date: 2008-03-10 05:46:12 -0700 (Mon, 10 Mar 2008)

Log Message:
---
Fixing Qt/Qt4 blit shearing problem

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py
trunk/matplotlib/lib/matplotlib/backends/backend_qtagg.py

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py  2008-03-04 
22:58:49 UTC (rev 4994)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py  2008-03-10 
12:46:12 UTC (rev 4995)
@@ -109,8 +109,9 @@
 # we are blitting here
 else:
 bbox = self.replot
-l, b, w, h = bbox.bounds
-t = b + h
+l, b, r, t = bbox.extents
+w = int(r) - int(l)
+h = int(t) - int(b)
 reg = self.copy_from_bbox(bbox)
 stringBuffer = reg.to_string()
 qImage = QtGui.QImage(stringBuffer, w, h, 
QtGui.QImage.Format_ARGB32)

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qtagg.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_qtagg.py   2008-03-04 
22:58:49 UTC (rev 4994)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_qtagg.py   2008-03-10 
12:46:12 UTC (rev 4995)
@@ -115,8 +115,9 @@
 # we are blitting here
 else:
 bbox = self.replot
-l, b, w, h = bbox.bounds
-t = b + h
+l, b, r, t = bbox.extents
+w = int(r) - int(l)
+h = int(t) - int(b)
 reg = self.copy_from_bbox(bbox)
 stringBuffer = reg.to_string()
 qImage = qt.QImage(stringBuffer, w, h, 32, None, 0, 
qt.QImage.IgnoreEndian)


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: [4996] trunk/matplotlib

2008-03-10 Thread dsdale
Revision: 4996
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4996&view=rev
Author:   dsdale
Date: 2008-03-10 06:44:28 -0700 (Mon, 10 Mar 2008)

Log Message:
---
workaround a blitting bug in backend_qt4agg

Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/examples/animation_blit_qt4.py
trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py

Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG  2008-03-10 12:46:12 UTC (rev 4995)
+++ trunk/matplotlib/CHANGELOG  2008-03-10 13:44:28 UTC (rev 4996)
@@ -1,3 +1,7 @@
+2008-03-10 Workaround a bug in backend_qt4agg's blitting due to a
+   buffer width/bbox width mismatch in _backend_agg's
+   copy_from_bbox - DSD
+
 2008-02-16 Added some new rec array functionality to mlab
(rec_summarize, rec2txt and rec_groupby).  See
examples/rec_groupby_demo.py.  Thanks to Tim M for rec2txt.

Modified: trunk/matplotlib/examples/animation_blit_qt4.py
===
--- trunk/matplotlib/examples/animation_blit_qt4.py 2008-03-10 12:46:12 UTC 
(rev 4995)
+++ trunk/matplotlib/examples/animation_blit_qt4.py 2008-03-10 13:44:28 UTC 
(rev 4996)
@@ -22,7 +22,7 @@
 # destroyed first and avoids a possible exception when the user clicks
 # on the window's close box.
 QtCore.QObject.__init__(self, self.canvas)
-
+
 self.cnt = 0
 
 # create the initial line
@@ -34,7 +34,7 @@
 
 def timerEvent(self, evt):
 # See if the size has changed since last time round.
-current_size = self.ax.bbox.width(), self.ax.bbox.height()
+current_size = self.ax.bbox.width, self.ax.bbox.height
 
 if self.old_size != current_size:
 self.old_size = current_size

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py  2008-03-10 
12:46:12 UTC (rev 4995)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py  2008-03-10 
13:44:28 UTC (rev 4996)
@@ -112,6 +112,7 @@
 l, b, r, t = bbox.extents
 w = int(r) - int(l)
 h = int(t) - int(b)
+t = int(b) + h
 reg = self.copy_from_bbox(bbox)
 stringBuffer = reg.to_string()
 qImage = QtGui.QImage(stringBuffer, w, h, 
QtGui.QImage.Format_ARGB32)


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: [4997] branches/v0_91_maint/lib/matplotlib/backends /backend_wx.py

2008-03-10 Thread mdboom
Revision: 4997
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4997&view=rev
Author:   mdboom
Date: 2008-03-10 08:05:30 -0700 (Mon, 10 Mar 2008)

Log Message:
---
Fix bug where Wx figures were getting shortened by the height of the status bar 
(Thanks, Gary Ruben)

Modified Paths:
--
branches/v0_91_maint/lib/matplotlib/backends/backend_wx.py

Modified: branches/v0_91_maint/lib/matplotlib/backends/backend_wx.py
===
--- branches/v0_91_maint/lib/matplotlib/backends/backend_wx.py  2008-03-10 
13:44:28 UTC (rev 4996)
+++ branches/v0_91_maint/lib/matplotlib/backends/backend_wx.py  2008-03-10 
15:05:30 UTC (rev 4997)
@@ -1291,9 +1291,9 @@
 DEBUG_MSG("__init__()", 1, self)
 self.num = num
 
-self.canvas = self.get_canvas(fig)
 statbar = StatusBarWx(self)
 self.SetStatusBar(statbar)
+self.canvas = self.get_canvas(fig)
 self.sizer =wx.BoxSizer(wx.VERTICAL)
 self.sizer.Add(self.canvas, 1, wx.TOP | wx.LEFT | wx.EXPAND)
 # By adding toolbar in sizer, we are able to put it at the bottom


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: [4998] branches/v0_91_maint/lib/matplotlib/rcsetup. py

2008-03-10 Thread mdboom
Revision: 4998
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4998&view=rev
Author:   mdboom
Date: 2008-03-10 08:06:25 -0700 (Mon, 10 Mar 2008)

Log Message:
---
Correcting range of subfigure values.  This is a backport of 4913 from
the trunk: "fixed a bug where annotations w/ arrows were not getting
the figure instance set properly"

Modified Paths:
--
branches/v0_91_maint/lib/matplotlib/rcsetup.py

Modified: branches/v0_91_maint/lib/matplotlib/rcsetup.py
===
--- branches/v0_91_maint/lib/matplotlib/rcsetup.py  2008-03-10 15:05:30 UTC 
(rev 4997)
+++ branches/v0_91_maint/lib/matplotlib/rcsetup.py  2008-03-10 15:06:25 UTC 
(rev 4998)
@@ -425,13 +425,14 @@
 'figure.facecolor'  : [ '0.75', validate_color], # facecolor; scalar gray
 'figure.edgecolor'  : [ 'w', validate_color],  # edgecolor; white
 
-'figure.subplot.left'   : [0.125, ValidateInterval(0, 1, closedmin=False, 
closedmax=False)],
-'figure.subplot.right'  : [0.9, ValidateInterval(0, 1, closedmin=False, 
closedmax=False)],
-'figure.subplot.bottom' : [0.1, ValidateInterval(0, 1, closedmin=False, 
closedmax=False)],
-'figure.subplot.top': [0.9, ValidateInterval(0, 1, closedmin=False, 
closedmax=False)],
-'figure.subplot.wspace' : [0.2, ValidateInterval(0, 1, closedmin=False, 
closedmax=True)],
-'figure.subplot.hspace' : [0.2, ValidateInterval(0, 1, closedmin=False, 
closedmax=True)],
+'figure.subplot.left'   : [0.125, ValidateInterval(0, 1, closedmin=True, 
closedmax=True)],
+'figure.subplot.right'  : [0.9, ValidateInterval(0, 1, closedmin=True, 
closedmax=True)],
+'figure.subplot.bottom' : [0.1, ValidateInterval(0, 1, closedmin=True, 
closedmax=True)],
+'figure.subplot.top': [0.9, ValidateInterval(0, 1, closedmin=True, 
closedmax=True)],
+'figure.subplot.wspace' : [0.2, ValidateInterval(0, 1, closedmin=True, 
closedmax=False)],
+'figure.subplot.hspace' : [0.2, ValidateInterval(0, 1, closedmin=True, 
closedmax=False)],
 
+'figure.autolayout'   : [False, validate_bool],
 
 'savefig.dpi' : [100, validate_float],   # DPI
 'savefig.facecolor'   : ['w', validate_color],  # facecolor; white


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: [4999] trunk/matplotlib

2008-03-10 Thread mdboom
Revision: 4999
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4999&view=rev
Author:   mdboom
Date: 2008-03-10 08:18:49 -0700 (Mon, 10 Mar 2008)

Log Message:
---
Merged revisions 4989-4998 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint


  r4991 | mdboom | 2008-02-29 09:04:48 -0500 (Fri, 29 Feb 2008) | 2 lines
  
  Fix classic Wx toolbar pan and zoom functions (Thanks Jeff Peery)

  r4997 | mdboom | 2008-03-10 11:05:30 -0400 (Mon, 10 Mar 2008) | 1 line
  
  Fix bug where Wx figures were getting shortened by the height of the status 
bar (Thanks, Gary Ruben)

  r4998 | mdboom | 2008-03-10 11:06:25 -0400 (Mon, 10 Mar 2008) | 4 lines
  
  Correcting range of subfigure values.  This is a backport of 4913 from
  the trunk: "fixed a bug where annotations w/ arrows were not getting
  the figure instance set properly"


Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/backends/backend_wx.py

Property Changed:

trunk/matplotlib/


Property changes on: trunk/matplotlib
___
Name: svnmerge-integrated
   - /branches/v0_91_maint:1-4988
   + /branches/v0_91_maint:1-4998

Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG  2008-03-10 15:06:25 UTC (rev 4998)
+++ trunk/matplotlib/CHANGELOG  2008-03-10 15:18:49 UTC (rev 4999)
@@ -2,6 +2,9 @@
buffer width/bbox width mismatch in _backend_agg's
copy_from_bbox - DSD
 
+2008-02-29 Fix class Wx toolbar pan and zoom functions (Thanks Jeff
+   Peery) - MGD
+
 2008-02-16 Added some new rec array functionality to mlab
(rec_summarize, rec2txt and rec_groupby).  See
examples/rec_groupby_demo.py.  Thanks to Tim M for rec2txt.

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_wx.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py  2008-03-10 
15:06:25 UTC (rev 4998)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_wx.py  2008-03-10 
15:18:49 UTC (rev 4999)
@@ -938,7 +938,7 @@
 
 def print_bmp(self, filename, *args, **kwargs):
 return self._print_image(filename, wx.BITMAP_TYPE_BMP, *args, **kwargs)
-
+
 def print_jpeg(self, filename, *args, **kwargs):
 return self._print_image(filename, wx.BITMAP_TYPE_JPEG, *args, 
**kwargs)
 print_jpg = print_jpeg
@@ -948,14 +948,14 @@
 
 def print_png(self, filename, *args, **kwargs):
 return self._print_image(filename, wx.BITMAP_TYPE_PNG, *args, **kwargs)
-
+
 def print_tiff(self, filename, *args, **kwargs):
 return self._print_image(filename, wx.BITMAP_TYPE_TIF, *args, **kwargs)
 print_tif = print_tiff
 
 def print_xpm(self, filename, *args, **kwargs):
 return self._print_image(filename, wx.BITMAP_TYPE_XPM, *args, **kwargs)
-
+
 def _print_image(self, filename, filetype, *args, **kwargs):
 origBitmap   = self.bitmap
 
@@ -994,7 +994,7 @@
 
 def get_default_filetype(self):
 return 'png'
-
+
 def realize(self):
 """
 This method will be called when the system is ready to draw,
@@ -1230,9 +1230,9 @@
 DEBUG_MSG("__init__()", 1, self)
 self.num = num
 
-self.canvas = self.get_canvas(fig)
 statbar = StatusBarWx(self)
 self.SetStatusBar(statbar)
+self.canvas = self.get_canvas(fig)
 self.sizer =wx.BoxSizer(wx.VERTICAL)
 self.sizer.Add(self.canvas, 1, wx.TOP | wx.LEFT | wx.EXPAND)
 # By adding toolbar in sizer, we are able to put it at the bottom
@@ -1829,28 +1829,28 @@
 
 DEBUG_MSG("panx()", 1, self)
 for a in self._active:
-a.panx(direction)
+a.xaxis.pan(direction)
 self.canvas.draw()
 self.canvas.Refresh(eraseBackground=False)
 
 def pany(self, direction):
 DEBUG_MSG("pany()", 1, self)
 for a in self._active:
-a.pany(direction)
+a.yaxis.pan(direction)
 self.canvas.draw()
 self.canvas.Refresh(eraseBackground=False)
 
 def zoomx(self, in_out):
 DEBUG_MSG("zoomx()", 1, self)
 for a in self._active:
-a.zoomx(in_out)
+a.xaxis.zoom(in_out)
 self.canvas.draw()
 self.canvas.Refresh(eraseBackground=False)
 
 def zoomy(self, in_out):
 DEBUG_MSG("zoomy()", 1, self)
 for a in self._active:
-a.zoomy(in_out)
+a.yaxis.zoom(in_out)
 self.canvas.draw()
 self.canvas.Refresh(eraseBackground=False)
 


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

-