[Matplotlib-users] 1-10^-1 Custom Log Ticker
Hi, As the subject shows, I am trying to create a custom ticker (class??) that has pretty formatted log tick. Instead of just 10^-5, 10^-5, etc, is something more like [1-10^-2, 1-10^-3, 1-10^-4] etc I am histogram'n a set of data that is very close to 1, basically ranging from 0.990 and 0.9922, but mostly being centered on 0.9921. I would love to see meaningful labels. Any ideas? -- View this message in context: http://old.nabble.com/1-10%5E-1-Custom-Log-Ticker-tp32414832p32414832.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- 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
[Matplotlib-users] how to hide axes in a 3D plot
How can I make a 3D plot without showing the axes? When plotting a 3d plot, Matplotlib not only draws the x, y, and z axes, it also draws light gray grids on the x-y, y-z, and x-z planes. I would like to draw a free-floating 3D graph, with none of these elements. My matplotlib.__version__ is 1.0.1. Stuff I've tried: # Doesn't work; this hides the plot, not the axes my_3d_axes.set_visible(False) # Doesn't do anything. Also, there's no get_zaxis() function. my_3d_axes.get_xaxis().set_visible(False) my_3d_axes.get_yaxis().set_visible(False) -- Matt -- 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
Re: [Matplotlib-users] how to hide axes in a 3D plot
On Wed, Sep 7, 2011 at 1:34 PM, Matthew Koichi Grimes m...@cs.nyu.eduwrote: How can I make a 3D plot without showing the axes? When plotting a 3d plot, Matplotlib not only draws the x, y, and z axes, it also draws light gray grids on the x-y, y-z, and x-z planes. I would like to draw a free-floating 3D graph, with none of these elements. My matplotlib.__version__ is 1.0.1. Stuff I've tried: # Doesn't work; this hides the plot, not the axes my_3d_axes.set_visible(False) # Doesn't do anything. Also, there's no get_zaxis() function. my_3d_axes.get_xaxis().set_visible(False) my_3d_axes.get_yaxis().set_visible(False) -- Matt Matt, Try my_3d_axes.set_axis_off(). I should probably override set_visible() to work as expected... Ben Root -- 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
Re: [Matplotlib-users] how to hide axes in a 3D plot
On Wed, Sep 7, 2011 at 2:14 PM, Joe Kington jking...@wisc.edu wrote: This no longer seems to work with matplotlib 1.0.1. As a quick example: import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.add_subplot(111, projection='3d') x,y,z,c = np.random.random((4,10)) ax.scatter(x, y, z, c=c) ax.set_axis_off() plt.show() The attached .png shows the result on my system... Is this a bug, or am I doing something strange? Thanks! -Joe Hmmm, try putting that call right after the add_subplot() call. I don't have time to test it out right now, but I wonder if the axes are being drawn once prior to the call to set_axis_off(). I would also be interested to know if the axes disappear when you interact with it. Ben Root -- 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
Re: [Matplotlib-users] how to hide axes in a 3D plot
I see the same thing here (from within ipython -pylab), and moving the ax.set_axis_off() immediately after the add_subplot call doesn't change anything. Interacting with the plot doesn't change anything either. Ethan On Sep 7, 2011, at 1:21 PM, Benjamin Root wrote: On Wed, Sep 7, 2011 at 2:14 PM, Joe Kington jking...@wisc.edu wrote: This no longer seems to work with matplotlib 1.0.1. As a quick example: import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.add_subplot(111, projection='3d') x,y,z,c = np.random.random((4,10)) ax.scatter(x, y, z, c=c) ax.set_axis_off() plt.show() The attached .png shows the result on my system... Is this a bug, or am I doing something strange? Thanks! -Joe Hmmm, try putting that call right after the add_subplot() call. I don't have time to test it out right now, but I wonder if the axes are being drawn once prior to the call to set_axis_off(). I would also be interested to know if the axes disappear when you interact with it. Ben Root -- 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 -- 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
Re: [Matplotlib-users] how to hide axes in a 3D plot
I tried Joe's code, with the call to ax.set_axis_off() moved to right after add_subplot(), as Ben suggested. The axes are still not disappearing, nor do they disappear when I interact with it (by rotating the plot). -- Matt On Wed, Sep 7, 2011 at 3:21 PM, Benjamin Root ben.r...@ou.edu wrote: On Wed, Sep 7, 2011 at 2:14 PM, Joe Kington jking...@wisc.edu wrote: This no longer seems to work with matplotlib 1.0.1. As a quick example: import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.add_subplot(111, projection='3d') x,y,z,c = np.random.random((4,10)) ax.scatter(x, y, z, c=c) ax.set_axis_off() plt.show() The attached .png shows the result on my system... Is this a bug, or am I doing something strange? Thanks! -Joe Hmmm, try putting that call right after the add_subplot() call. I don't have time to test it out right now, but I wonder if the axes are being drawn once prior to the call to set_axis_off(). I would also be interested to know if the axes disappear when you interact with it. Ben Root -- 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
Re: [Matplotlib-users] how to hide axes in a 3D plot
Interestingly, things work perfectly with the latest build from guithub. Presumably the bug was fixed already? On Wed, Sep 7, 2011 at 2:40 PM, Matthew Koichi Grimes m...@cs.nyu.eduwrote: I tried Joe's code, with the call to ax.set_axis_off() moved to right after add_subplot(), as Ben suggested. The axes are still not disappearing, nor do they disappear when I interact with it (by rotating the plot). -- Matt On Wed, Sep 7, 2011 at 3:21 PM, Benjamin Root ben.r...@ou.edu wrote: On Wed, Sep 7, 2011 at 2:14 PM, Joe Kington jking...@wisc.edu wrote: This no longer seems to work with matplotlib 1.0.1. As a quick example: import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.add_subplot(111, projection='3d') x,y,z,c = np.random.random((4,10)) ax.scatter(x, y, z, c=c) ax.set_axis_off() plt.show() The attached .png shows the result on my system... Is this a bug, or am I doing something strange? Thanks! -Joe Hmmm, try putting that call right after the add_subplot() call. I don't have time to test it out right now, but I wonder if the axes are being drawn once prior to the call to set_axis_off(). I would also be interested to know if the axes disappear when you interact with it. Ben Root -- 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
Re: [Matplotlib-users] how to hide axes in a 3D plot
On Wed, Sep 7, 2011 at 2:43 PM, Joe Kington jking...@wisc.edu wrote: Interestingly, things work perfectly with the latest build from guithub. Presumably the bug was fixed already? Uhm, sure! I totally intended for that nasty bug to be fixed for the upcoming release... _ Seriously, though, I made many changes to mplot3d as a part of my refactoring efforts. I would not be surprised if things magically break or get fixed because of it. I am glad you can confirm that the latest build works. I will take a peek at the v1.0.1 branch and see if there is an obvious fix for them. Ben Root -- 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
Re: [Matplotlib-users] how to hide axes in a 3D plot
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 On Wed, Sep 7, 2011 at 4:04 PM, Benjamin Root ben.r...@ou.edu wrote: On Wed, Sep 7, 2011 at 2:43 PM, Joe Kington jking...@wisc.edu wrote: Interestingly, things work perfectly with the latest build from guithub. Presumably the bug was fixed already? Uhm, sure! I totally intended for that nasty bug to be fixed for the upcoming release... _ Seriously, though, I made many changes to mplot3d as a part of my refactoring efforts. I would not be surprised if things magically break or get fixed because of it. I am glad you can confirm that the latest build works. I will take a peek at the v1.0.1 branch and see if there is an obvious fix for them. Ben Root -- 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
Re: [Matplotlib-users] how to hide axes in a 3D plot
On Wed, Sep 7, 2011 at 3:13 PM, Matthew Koichi Grimes m...@cs.nyu.eduwrote: 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
Re: [Matplotlib-users] Figure clipping incorrectly ; specify whether clips horizontally or vertically
On Wed, Sep 7, 2011 at 12:09 AM, Jeffrey Spencer jeffspenc...@gmail.com wrote: Can I specify horizontal or vertical clipping?? Or what is the best way to get around this? my understanding is that the clipping is done with a closed path. so I don't think one can do such thing as horizontal clipping, etc. I guess one way is to simply increase the size of the clipping box toward the direction you want. Here is a simple example, Regards, -JJ x = np.arange(0, 8, 0.01) y = np.sin(x) ax = subplot(111) l1, = plot(x, y, lw=4) import matplotlib.transforms as mtransforms bbox_ = mtransforms.Bbox.from_bounds(0, 0, 1., 1 + 0.1) # increase the height bbox = mtransforms.TransformedBbox(bbox_, ax.transAxes) l1.set_clip_box(bbox) -- Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users