Revision: 7173
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7173&view=rev
Author:   leejjoon
Date:     2009-06-02 00:31:45 +0000 (Tue, 02 Jun 2009)

Log Message:
-----------
axes_grid: fix broken spine support

Modified Paths:
--------------
    trunk/matplotlib/examples/axes_grid/simple_axisline.py
    trunk/matplotlib/lib/mpl_toolkits/axes_grid/ChangeLog
    trunk/matplotlib/lib/mpl_toolkits/axes_grid/axes_rgb.py
    trunk/matplotlib/lib/mpl_toolkits/axes_grid/axislines.py

Modified: trunk/matplotlib/examples/axes_grid/simple_axisline.py
===================================================================
--- trunk/matplotlib/examples/axes_grid/simple_axisline.py      2009-06-01 
22:39:49 UTC (rev 7172)
+++ trunk/matplotlib/examples/axes_grid/simple_axisline.py      2009-06-02 
00:31:45 UTC (rev 7173)
@@ -26,7 +26,8 @@
 
     # make new (right-side) yaxis, but wth some offset
     offset = (20, 0)
-    new_axisline = ax.get_grid_helper().new_axisline
+    new_axisline = ax.get_grid_helper().new_fixed_axis
+
     ax.axis["right2"] = new_axisline(loc="right",
                                      offset=offset)
     ax.axis["right2"].label.set_text("Label Y2")

Modified: trunk/matplotlib/lib/mpl_toolkits/axes_grid/ChangeLog
===================================================================
--- trunk/matplotlib/lib/mpl_toolkits/axes_grid/ChangeLog       2009-06-01 
22:39:49 UTC (rev 7172)
+++ trunk/matplotlib/lib/mpl_toolkits/axes_grid/ChangeLog       2009-06-02 
00:31:45 UTC (rev 7173)
@@ -1,3 +1,7 @@
+2009-06-01  Jae-Joon Lee  <[email protected]>
+
+       * axislines.py (Axes.toggle_axisline): fix broken spine support.
+
 2009-05-04  Jae-Joon Lee  <[email protected]>
 
        * inset_locator.py (inset_axes, zoomed_inset_axes): axes_class support

Modified: trunk/matplotlib/lib/mpl_toolkits/axes_grid/axes_rgb.py
===================================================================
--- trunk/matplotlib/lib/mpl_toolkits/axes_grid/axes_rgb.py     2009-06-01 
22:39:49 UTC (rev 7172)
+++ trunk/matplotlib/lib/mpl_toolkits/axes_grid/axes_rgb.py     2009-06-02 
00:31:45 UTC (rev 7173)
@@ -10,8 +10,8 @@
 
     pad_size = Size.Fraction(pad, Size.AxesY(ax))
 
-    xsize = Size.Fraction(Size.AxesX(ax), (1.-2.*pad)/3.)
-    ysize = Size.Fraction(Size.AxesY(ax), (1.-2.*pad)/3.)
+    xsize = Size.Fraction((1.-2.*pad)/3., Size.AxesX(ax))
+    ysize = Size.Fraction((1.-2.*pad)/3., Size.AxesY(ax))
 
     divider.set_horizontal([Size.AxesX(ax), pad_size, xsize])
     divider.set_vertical([ysize, pad_size, ysize, pad_size, ysize])
@@ -51,6 +51,22 @@
 #import matplotlib.axes as maxes
 import axislines
 
+def imshow_rgb(ax, r, g, b, **kwargs):
+    ny, nx = r.shape
+    R = np.zeros([ny, nx, 3], dtype="d")
+    R[:,:,0] = r
+    G = np.zeros_like(R)
+    G[:,:,1] = g
+    B = np.zeros_like(R)
+    B[:,:,2] = b
+
+    RGB = R + G + B
+
+    im_rgb = ax.imshow(RGB, **kwargs)
+
+    return im_rgb
+
+
 class RGBAxes(object):
     def __init__(self, *kl, **kwargs):
         pad = kwargs.pop("pad", 0.0)

Modified: trunk/matplotlib/lib/mpl_toolkits/axes_grid/axislines.py
===================================================================
--- trunk/matplotlib/lib/mpl_toolkits/axes_grid/axislines.py    2009-06-01 
22:39:49 UTC (rev 7172)
+++ trunk/matplotlib/lib/mpl_toolkits/axes_grid/axislines.py    2009-06-02 
00:31:45 UTC (rev 7173)
@@ -1249,16 +1249,14 @@
             b = not self._axisline_on
         if b:
             self._axisline_on = True
-            #self.frame.set_visible(False)
             for s in self.spines.values():
-                s.artist.set_visible(False)
+                s.set_visible(False)
             self.xaxis.set_visible(False)
             self.yaxis.set_visible(False)
         else:
             self._axisline_on = False
-            #self.frame.set_visible(True)
             for s in self.spines.values():
-                s.artist.set_visible(True)
+                s.set_visible(True)
             self.xaxis.set_visible(True)
             self.yaxis.set_visible(True)
 


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

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to