On Wed, Sep 7, 2011 at 3:13 PM, Matthew Koichi Grimes <m...@cs.nyu.edu>wrote:

> Thanks Ben, I for one would be very interested in any workarounds you might
> find that don't require an upgrade from 1.0.1.
>
> -- Matt
>
>
Ok, looks like the hiding of the 3d axes was a feature added after the v1.0
release (but before I started working on mplot3d).  This patch should enable
the basic feature without interfering with existing functions.  To hide the
axes, you would have to set the private member "_axis3don" to False, like
so:

ax = plt.gca(projection='3d')
ax._axis3don = False


If you do it this way, then you will get what you want now, and your code
will still be compatible with mplot3d when you upgrade (although the
preferred method would be to call set_axis_on() or set_axis_off()).

I hope that helps!
Ben Root
diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py
index 4420c93..db8dacd 100644
--- a/lib/mpl_toolkits/mplot3d/axes3d.py
+++ b/lib/mpl_toolkits/mplot3d/axes3d.py
@@ -78,6 +78,7 @@ class Axes3D(Axes):
 
         self.M = None
 
+        self._axis3don = True
         self._ready = 1
         self.mouse_init()
         self.create_axes()
@@ -165,11 +166,12 @@ class Axes3D(Axes):
         for i, (z, patch) in enumerate(zlist):
             patch.zorder = i
 
-        axes = (self.w_xaxis, self.w_yaxis, self.w_zaxis)
-        for ax in axes:
-            ax.draw_pane(renderer)
-        for ax in axes:
-            ax.draw(renderer)
+        if self._axis3don :
+            axes = (self.w_xaxis, self.w_yaxis, self.w_zaxis)
+            for ax in axes:
+                ax.draw_pane(renderer)
+            for ax in axes:
+                ax.draw(renderer)
 
         Axes.draw(self, renderer)
 
------------------------------------------------------------------------------
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to