Re: [Matplotlib-users] Axes3d have improved handling of label placement yet
On Sun, Jul 28, 2013 at 7:14 AM, Jeffrey Spencer jeffspenc...@gmail.comwrote: Ben, Thanks that works great and also one more question. If you look at the previous example. I have noticed that at the angle the figure is at the ticklabels look like they are at the center of the grid boxes. This is not the case because if you turn it to the side as the example below image.pdf. The 0.00, 0.05 on the I_lw axis are supposed to be at the actual tick marks. Thus, can the axis be manually moved too? This isn't a huge deal but I was just wondering if it was possible to offset the ticklabels. I looked in the _axinfo but looks like for ticklabel their is only a space_factor parameter. Cheers, Jeff The effect you are seeing is that the tick labels are set to be below and in front of the tick marks. More specifically, what happens is that the ticklabels (and the axis label) are offsetted away from the center of the domain. The space_factor value you found is just some empirical value that I have found to work fairly well. Effectively, there is only a radial-like control over the spacing, not a finer-grained control. That being said, you can modify the va value of the _axinfo to control the vertical allignment of the labels. I would wonder if messing around with that might have some desired impact. Another possibility is to use '\n' characters before or after the main text for the label to make an apparent shift. Just some ideas to play around with. Cheers! Ben Root -- Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3d have improved handling of label placement yet
Jeffrey, Sorry if the documentation is a bit vague on the _axinfo front. It was intentionally done that way to keep the number of people dependent upon that kludge down. It was created as an improvement upon the previous hard-coded constants that completely prevented anybody from making any customizations at all. The spacing of tick labels for an axis can be modified like so: ax.xaxis._axinfo['ticklabel']['space_factor'] = 0.7 # This is the default value. Make it less to bring it closer to the axis and for the axis label: ax.xaxis._axinfo['label']['space_factor'] = 1.6 # Again, this is the default value. Make it larger to move it away from the axis I hope that helps! Ben Root On Thu, Jul 18, 2013 at 3:18 AM, Jeffrey Spencer jeffspenc...@gmail.comwrote: I have a problem with labels overlapping the tickmark labels. No matter changing the fontsize or plot_size or other things. I can't find something that works properly. I found somethwhere setting linespacing should work but this seems to do nothing in my case. Any good suggestions or updates on this?? I'm using 1.2.x matplotlib version. I put a plot here showing how the label overlaps but I know this has been a problem in the past. Also, I couldn't figure out how to get access to the _axinfo like stated in the documentation for a possible fix. Where is this located?? How do I acess or modify it as a temporary fix?? -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] axes3d, initial azimuth and elevation
On Saturday, July 14, 2012, gsal wrote: So, I have [code] from mpl_toolkits.mplot3d import axes3d fig = plt.figure(figsize=(10,7)) ax = fig.gca(projection='3d') ax.scatter(xs, ys, zs, c='r') plt.show() [/code] but when the figure first comes up, it is not to my liking; when I interactively (with the mouse) move it around to my liking, the lower right corner of the window displays: azimuth=20 deg, elevation=35 deg... ...how can I achieve my desired azimuth, elevation from the beginning? is it possible to set it up? I search the on-line docs and found nothing. thanks, gsal Yes, it is possible. You can use the view_init() method of your axes object. Ben Root -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] axes3d, initial azimuth and elevation
got it, thanks. -- View this message in context: http://old.nabble.com/axes3d%2C-initial-azimuth-and-elevation-tp34161970p34162843.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3D depth problem
On Tue, Jul 27, 2010 at 2:25 PM, copyrig...@gmx.de wrote: Hallo, I got a depth problem with Axes3D. I made a plot_surface and add 2 Circle object with add_patch and mpl_toolkits.mplot3d.art3d.patch_2d_to_3d. The problem is that the circles are always in front. I upload a picture here http://yfrog.com/nd3dproblemp . The gui is rotatable, so I can't just remove the second Circle (like I did for the screenshot). How to get right order to the object? greetz Frank Frank, Could you please include a script that reproduces this? There have been some issues like this reported before, but it would only occur at certain viewing angles. Is this problem occurring regardless of what viewing angle you are looking at the plot? It would be useful to have an example that *always* looks bad for fixing purposes. Ben Root -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3D depth problem
Hallo Ben Root, I put together some snippets #CODE import matplotlib.pyplot as plt from matplotlib.patches import Circle import mpl_toolkits.mplot3d.art3d as art3d from mpl_toolkits.mplot3d import Axes3D import numpy import matplotlib step = 0.04 maxval = 1.0 fig = plt.figure() ax = Axes3D(fig,aspect='equal') ri = 0.625 rj = 1.25 l = 5 ##CONE r = numpy.linspace(rj,rj,6) r[0]= numpy.zeros(r[0].shape) r[1] *= ri/rj r[5] *= ri/rj r[3]= numpy.zeros(r[3].shape) p = numpy.linspace(0,2*numpy.pi,50) R,P = numpy.meshgrid(r,p) X,Y = R*numpy.cos(P),R*numpy.sin(P) tmp=list() for i in range(50): tmp.append([0,0,l,l,l,0]) Z = numpy.array(tmp) ax.plot_surface(X, Z,Y, rstride=1, cstride=1, color=b) ##CIRCLES p=Circle((0,0),rj,color=red) ax.add_patch(p) art3d.patch_2d_to_3d(p, z=l, zdir=y) p=Circle((0,0),ri,color=red) ax.add_patch(p) art3d.patch_2d_to_3d(p, z=0, zdir=y) ax.set_ylim3d(-0.5, l+.5) ax.set_xlim3d(-l*0.5-0.5, l*0.5+0.5) ax.set_zlim3d(-l*0.5-0.5, l*0.5+0.5) plt.show() #CODE greetz Frank Am 27.07.2010 21:36, schrieb Benjamin Root: On Tue, Jul 27, 2010 at 2:25 PM, copyrig...@gmx.de mailto:copyrig...@gmx.de wrote: Hallo, I got a depth problem with Axes3D. I made a plot_surface and add 2 Circle object with add_patch and mpl_toolkits.mplot3d.art3d.patch_2d_to_3d. The problem is that the circles are always in front. I upload a picture here http://yfrog.com/nd3dproblemp . The gui is rotatable, so I can't just remove the second Circle (like I did for the screenshot). How to get right order to the object? greetz Frank Frank, Could you please include a script that reproduces this? There have been some issues like this reported before, but it would only occur at certain viewing angles. Is this problem occurring regardless of what viewing angle you are looking at the plot? It would be useful to have an example that *always* looks bad for fixing purposes. Ben Root -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3D depth problem
On Tue, Jul 27, 2010 at 3:10 PM, copyrig...@gmx.de wrote: Hallo Ben Root, I put together some snippets #CODE import matplotlib.pyplot as plt from matplotlib.patches import Circle import mpl_toolkits.mplot3d.art3d as art3d from mpl_toolkits.mplot3d import Axes3D import numpy import matplotlib step = 0.04 maxval = 1.0 fig = plt.figure() ax = Axes3D(fig,aspect='equal') ri = 0.625 rj = 1.25 l = 5 ##CONE r = numpy.linspace(rj,rj,6) r[0]= numpy.zeros(r[0].shape) r[1] *= ri/rj r[5] *= ri/rj r[3]= numpy.zeros(r[3].shape) p = numpy.linspace(0,2*numpy.pi,50) R,P = numpy.meshgrid(r,p) X,Y = R*numpy.cos(P),R*numpy.sin(P) tmp=list() for i in range(50): tmp.append([0,0,l,l,l,0]) Z = numpy.array(tmp) ax.plot_surface(X, Z,Y, rstride=1, cstride=1, color=b) ##CIRCLES p=Circle((0,0),rj,color=red) ax.add_patch(p) art3d.patch_2d_to_3d(p, z=l, zdir=y) p=Circle((0,0),ri,color=red) ax.add_patch(p) art3d.patch_2d_to_3d(p, z=0, zdir=y) ax.set_ylim3d(-0.5, l+.5) ax.set_xlim3d(-l*0.5-0.5, l*0.5+0.5) ax.set_zlim3d(-l*0.5-0.5, l*0.5+0.5) plt.show() #CODE greetz Frank Am 27.07.2010 21:36, schrieb Benjamin Root: On Tue, Jul 27, 2010 at 2:25 PM, copyrig...@gmx.de mailto:copyrig...@gmx.de wrote: Hallo, I got a depth problem with Axes3D. I made a plot_surface and add 2 Circle object with add_patch and mpl_toolkits.mplot3d.art3d.patch_2d_to_3d. The problem is that the circles are always in front. I upload a picture here http://yfrog.com/nd3dproblemp . The gui is rotatable, so I can't just remove the second Circle (like I did for the screenshot). How to get right order to the object? greetz Frank Thanks, At first glance, I am wondering if the problem is that the Circle objects are not properly getting a zsort value when converted to a 3d object. I will see if there is an inconsistency in behavior between different types of patches. Ben Root -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3D and basemap
Here is a partial solution. If you use the SVN code, check out this example: http://matplotlib.sourceforge.net/trunk-docs/examples/mplot3d/pathpatch3d_demo.html I haven't ever done it, but I think you can create some kind of image patch. -Ben -Original Message- From: John [H2O] [mailto:washa...@gmail.com] Sent: Tuesday, March 02, 2010 1:10 PM To: matplotlib-users@lists.sourceforge.net Subject: [Matplotlib-users] Axes3D and basemap Has anyone ever used a basemap instance as the 'floor' of an Axes3D plot? What I'm looking for is example code to do something like this: http://www.dfanning.com/tips/scatter3d_on_map.jpg Thanks, john -- View this message in context: http://old.nabble.com/Axes3D-and-basemap-tp27759152p27759152.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3D - Equal Aspect Ratio
Hi, I am searching for a solution of the axis aspect in 3d plots, too. On 10/14/2009 14:01, Tinne De Laet wrote: axis(scaled) worked for me. Tinne This does not seem to work. At least I am not getting it to work. This command does not seem to be applied to the 3d axis. Do you have an example where this works on 3d axis? Regards Paul. -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3D rotation not working when embedded in backend
One more note about Axes3D and mouse rotation. Axes3D disconnects the mouse callbacks when cla() is called. Which means that if you do this: self.axes = Axes3D(self.figure) self.axes.scatter(xs, ys, zs) self.axes.cla() self.axes.scatter(xs, ys, zs) then the plot will have no mouse rotation. To fix this, mouse_init() should be called after cla(). Currently, all of this is undocumented. Is disconnecting mouse callbacks on cla() the preferred matplotlib way to do things? Is it safe to *not* disconnect mouse callbacks on cla()? Maybe there is another type of destructor that is more appropriate for this? Thanks, -Ben -Original Message- From: Ben Axelrod [mailto:baxel...@coroware.com] Sent: Saturday, February 06, 2010 5:55 PM To: matplotlib-users@lists.sourceforge.net Subject: Re: [Matplotlib-users] Axes3D rotation not working when embedded in backend I looked into this issue a little bit and found that the FigureCanvas must be set on the Figure before the 3D axes is instantiated. A simple re-ordering of the lines in the code below makes mouse rotation work again. # ... self.figure = Figure() self.canvas = FigureCanvas(self, -1, self.figure) #You must set up the canvas before creating the 3D axes self.axes = Axes3D(self.figure) # ... Perhaps this should be documented somehow? Or maybe a new mplot3d example code should be added. Or maybe Axes3D.mouse_init() should warn the user if self.figure.canvas is None. -Ben -Original Message- From: Ben Axelrod [mailto:baxel...@coroware.com] Sent: Monday, February 01, 2010 3:56 PM To: matplotlib-users@lists.sourceforge.net Subject: [Matplotlib-users] Axes3D rotation not working when embedded in backend I would like to use Axes3D embedded in Wx. This works, but there is no mouse rotation. Clicking and dragging the mouse on the plot does not rotate the 3D axes like it does in the scatter3d_demo.py. I tried: WX, WXAgg, and TkAgg with similar results. Can this be fixed soon, or can someone point me to where I can try to fix it? I tested with the latest SVN tree on Linux and Windows. Thanks, -Ben Below is some sample code adapted from embedding_in_wx2.py, but with an Axes3D instead of the regular plot: #!/usr/bin/env python # adapted from example code embedding_in_wx2.py # Used to guarantee to use at least Wx2.8 import wxversion wxversion.ensureMinimal('2.8') import numpy as np import matplotlib # uncomment the following to use wx rather than wxagg #matplotlib.use('WX') #from matplotlib.backends.backend_wx import FigureCanvasWx as FigureCanvas # comment out the following to use wx rather than wxagg matplotlib.use('WXAgg') from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas from matplotlib.backends.backend_wx import NavigationToolbar2Wx from matplotlib.figure import Figure from mpl_toolkits.mplot3d import Axes3D import wx class CanvasFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self,None,-1, 'CanvasFrame',size=(550,350)) self.SetBackgroundColour(wx.NamedColor(WHITE)) self.figure = Figure() self.axes = Axes3D(self.figure) xs = np.random.rand(100) ys = np.random.rand(100) zs = np.random.rand(100) self.axes.scatter(xs, ys, zs) self.canvas = FigureCanvas(self, -1, self.figure) self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) self.SetSizer(self.sizer) self.Fit() self.add_toolbar() # comment this out for no toolbar def add_toolbar(self): self.toolbar = NavigationToolbar2Wx(self.canvas) self.toolbar.Realize() 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 self.SetToolBar(self.toolbar) else: # On Windows platform, default window size is incorrect, so set # toolbar width to figure width. tw, th = self.toolbar.GetSizeTuple() fw, fh = self.canvas.GetSizeTuple() # 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(wx.Size(fw, th)) self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) # update the axes menu on the toolbar self.toolbar.update() def OnPaint(self, event): self.canvas.draw() class App(wx.App): def OnInit(self): 'Create the main window and insert the custom frame' frame = CanvasFrame() frame.Show(True) return True app = App(0) app.MainLoop() #end code
Re: [Matplotlib-users] Axes3D rotation not working when embedded in backend
I looked into this issue a little bit and found that the FigureCanvas must be set on the Figure before the 3D axes is instantiated. A simple re-ordering of the lines in the code below makes mouse rotation work again. # ... self.figure = Figure() self.canvas = FigureCanvas(self, -1, self.figure) #You must set up the canvas before creating the 3D axes self.axes = Axes3D(self.figure) # ... Perhaps this should be documented somehow? Or maybe a new mplot3d example code should be added. Or maybe Axes3D.mouse_init() should warn the user if self.figure.canvas is None. -Ben -Original Message- From: Ben Axelrod [mailto:baxel...@coroware.com] Sent: Monday, February 01, 2010 3:56 PM To: matplotlib-users@lists.sourceforge.net Subject: [Matplotlib-users] Axes3D rotation not working when embedded in backend I would like to use Axes3D embedded in Wx. This works, but there is no mouse rotation. Clicking and dragging the mouse on the plot does not rotate the 3D axes like it does in the scatter3d_demo.py. I tried: WX, WXAgg, and TkAgg with similar results. Can this be fixed soon, or can someone point me to where I can try to fix it? I tested with the latest SVN tree on Linux and Windows. Thanks, -Ben Below is some sample code adapted from embedding_in_wx2.py, but with an Axes3D instead of the regular plot: #!/usr/bin/env python # adapted from example code embedding_in_wx2.py # Used to guarantee to use at least Wx2.8 import wxversion wxversion.ensureMinimal('2.8') import numpy as np import matplotlib # uncomment the following to use wx rather than wxagg #matplotlib.use('WX') #from matplotlib.backends.backend_wx import FigureCanvasWx as FigureCanvas # comment out the following to use wx rather than wxagg matplotlib.use('WXAgg') from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas from matplotlib.backends.backend_wx import NavigationToolbar2Wx from matplotlib.figure import Figure from mpl_toolkits.mplot3d import Axes3D import wx class CanvasFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self,None,-1, 'CanvasFrame',size=(550,350)) self.SetBackgroundColour(wx.NamedColor(WHITE)) self.figure = Figure() self.axes = Axes3D(self.figure) xs = np.random.rand(100) ys = np.random.rand(100) zs = np.random.rand(100) self.axes.scatter(xs, ys, zs) self.canvas = FigureCanvas(self, -1, self.figure) self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) self.SetSizer(self.sizer) self.Fit() self.add_toolbar() # comment this out for no toolbar def add_toolbar(self): self.toolbar = NavigationToolbar2Wx(self.canvas) self.toolbar.Realize() 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 self.SetToolBar(self.toolbar) else: # On Windows platform, default window size is incorrect, so set # toolbar width to figure width. tw, th = self.toolbar.GetSizeTuple() fw, fh = self.canvas.GetSizeTuple() # 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(wx.Size(fw, th)) self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) # update the axes menu on the toolbar self.toolbar.update() def OnPaint(self, event): self.canvas.draw() class App(wx.App): def OnInit(self): 'Create the main window and insert the custom frame' frame = CanvasFrame() frame.Show(True) return True app = App(0) app.MainLoop() #end code -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros
Re: [Matplotlib-users] Axes3D - Equal Aspect Ratio
Hi Thomas,. I'm playing around with mpl_toolkits.mplot3d to represent a 3D scatter, but I need the axis' aspect to be 'equal'. I tried to : ax = Axes3D(fig) ax.set_aspect('equal') axis(scaled) worked for me. Tinne -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3D labels
I'm not an axes3d expert and below is from my quick at the code, so there may be better ways. axes3d have w_[xyz]axis attributes, which are responsible for drawing tick, ticklables, and you need to change these to change ticks, etc. While, I think something like w_xaxis.set_ticks should work, currently it fails, which I think is a bug. As a workaround, you have to directly set the ticklocator. For example, ax.xaxis.set_ticks([-20, 0, 20]) becomes from matplotlib.ticker import FixedLocator locator = FixedLocator([-20, 0, 20]) ax.w_xaxis.set_major_locator(locator) -JJ On Tue, Oct 6, 2009 at 7:07 AM, William Hall w...@qualtersystems.com wrote: Does anyone know if it possible to annotate the axes with strings? I've tried a hundred combinations of set_xticklabels with and without set_xticks but absolutely nothing seems to have any effect. Perhaps this is a bug? Perhaps labelling 3d axes is not supported? There's no documentation on this matter and I'm at my wits end - any help is appreciated. -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3D - size of the Z axe
On Friday 02 October 2009 14:24:17 German Ocampo wrote: Hello everybody How can I control the size of the Z axis in a 3D plot using Axes3D in matplotlib? I think for an axes like ax = Axes3D(fig) you can use ax.set_zlim3d( ... ) Kind regards, Matthias -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3D - size of the Z axe
Hello After search in google, I found a solution changing the initial point of view of the plot, using a function which control the angle and elevation of the initial view: ax.view_init(elevation, azimuth) and tried and works ax = Axes3D(fig) ax.view_init(64, -30) Question: Is it possible to include this function in the Axes3D documentation web page? or where I could find it in the webpage? http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/api.html?highlight=axes3d#module-mpl_toolkits.mplot3d.axes3d Thanks German On Fri, Oct 2, 2009 at 1:24 PM, German Ocampo geroca...@gmail.com wrote: Hello everybody How can I control the size of the Z axis in a 3D plot using Axes3D in matplotlib? regards german -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3D - size of the Z axe
I was looking for something similar. It seems Axes3D() takes the angle as argument: import matplotlib.pyplot as plt import mpl_toolkits.mplot3d as m3d fig = plt.figure() ax = m3d.Axes3D(fig, elev = 20.0, azim = 45) in degrees. 2009/10/2 German Ocampo geroca...@gmail.com Hello After search in google, I found a solution changing the initial point of view of the plot, using a function which control the angle and elevation of the initial view: ax.view_init(elevation, azimuth) and tried and works ax = Axes3D(fig) ax.view_init(64, -30) Question: Is it possible to include this function in the Axes3D documentation web page? or where I could find it in the webpage? http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/api.html?highlight=axes3d#module-mpl_toolkits.mplot3d.axes3d Thanks German On Fri, Oct 2, 2009 at 1:24 PM, German Ocampo geroca...@gmail.com wrote: Hello everybody How can I control the size of the Z axis in a 3D plot using Axes3D in matplotlib? regards german -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] axes3d material in matplotlib-0.99.0.win32-py2.5 missing?
On Thu, Sep 17, 2009 at 8:34 PM, Reckoner recko...@gmail.com wrote: thanks. does this mean that http://www.scipy.org/Cookbook/Matplotlib/mplot3D is out of date? Yes, it needs to be updated -- best would just be to remove the contents there and point to the mplot3d on the mpl website. Can you do this for us? JDH -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] axes3d material in matplotlib-0.99.0.win32-py2.5 missing?
if you're asking me, I don't have write access to this website. Thanks again. On Fri, Sep 18, 2009 at 4:45 AM, John Hunter jdh2...@gmail.com wrote: On Thu, Sep 17, 2009 at 8:34 PM, Reckoner recko...@gmail.com wrote: thanks. does this mean that http://www.scipy.org/Cookbook/Matplotlib/mplot3D is out of date? Yes, it needs to be updated -- best would just be to remove the contents there and point to the mplot3d on the mpl website. Can you do this for us? JDH -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] axes3d material in matplotlib-0.99.0.win32-py2.5 missing?
On Thu, Sep 17, 2009 at 6:46 PM, Reckoner recko...@gmail.com wrote: unless I'm misunderstanding something, the website says that matplotlib-0.99.0.win32-py2.5 should contain the axes3d material. It doesn't. Instead, it axes3d.py contains the following: raise NotImplementedError('axes3d is not supported in matplotlib-0.98. You may want to try the 0.91.x maintenance branch') note that I am on a Windows machine and I'm not sure I can build everything from the trunk. It looks like you are having tow problems -- first, you apparently installed a new matplotlib over an old matplotlib and so there are some old files laying around. Blow away site-packages/matplotlib and reinstall. See http://matplotlib.sourceforge.net/faq/installing_faq.html#cleanly-rebuild-and-reinstall-everything Secondly, you need to be importing mplot3d from mpl_toolkits, it's new location. You appear to be importing it from matplotlib.axes3d, it's old location which is now deprecated. Eg see http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/tutorial.html Hope this helps, JDH -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] axes3d material in matplotlib-0.99.0.win32-py2.5 missing?
thanks. does this mean that http://www.scipy.org/Cookbook/Matplotlib/mplot3D is out of date? thanks On Thu, Sep 17, 2009 at 6:22 PM, John Hunter jdh2...@gmail.com wrote: On Thu, Sep 17, 2009 at 6:46 PM, Reckoner recko...@gmail.com wrote: unless I'm misunderstanding something, the website says that matplotlib-0.99.0.win32-py2.5 should contain the axes3d material. It doesn't. Instead, it axes3d.py contains the following: raise NotImplementedError('axes3d is not supported in matplotlib-0.98. You may want to try the 0.91.x maintenance branch') note that I am on a Windows machine and I'm not sure I can build everything from the trunk. It looks like you are having tow problems -- first, you apparently installed a new matplotlib over an old matplotlib and so there are some old files laying around. Blow away site-packages/matplotlib and reinstall. See http://matplotlib.sourceforge.net/faq/installing_faq.html#cleanly-rebuild-and-reinstall-everything Secondly, you need to be importing mplot3d from mpl_toolkits, it's new location. You appear to be importing it from matplotlib.axes3d, it's old location which is now deprecated. Eg see http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/tutorial.html Hope this helps, JDH -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] axes3d material in matplotlib-0.99.0.win32-py2.5 missing?
Reckoner wrote: thanks. does this mean that http://www.scipy.org/Cookbook/Matplotlib/mplot3D is out of date? Yes. Eric thanks On Thu, Sep 17, 2009 at 6:22 PM, John Hunter jdh2...@gmail.com wrote: On Thu, Sep 17, 2009 at 6:46 PM, Reckoner recko...@gmail.com wrote: unless I'm misunderstanding something, the website says that matplotlib-0.99.0.win32-py2.5 should contain the axes3d material. It doesn't. Instead, it axes3d.py contains the following: raise NotImplementedError('axes3d is not supported in matplotlib-0.98. You may want to try the 0.91.x maintenance branch') note that I am on a Windows machine and I'm not sure I can build everything from the trunk. It looks like you are having tow problems -- first, you apparently installed a new matplotlib over an old matplotlib and so there are some old files laying around. Blow away site-packages/matplotlib and reinstall. See http://matplotlib.sourceforge.net/faq/installing_faq.html#cleanly-rebuild-and-reinstall-everything Secondly, you need to be importing mplot3d from mpl_toolkits, it's new location. You appear to be importing it from matplotlib.axes3d, it's old location which is now deprecated. Eg see http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/tutorial.html Hope this helps, JDH -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] axes3D
Lisa Tauxe wrote: Are there any plans for incorporating this (what used to be mplot3d) into the new matplotlib version? Not that I know of. It was not being maintained even before the move to 0.98.x. Eric - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3d
Mike, just a question about the new transforms backend -- can the input dimensionality be greater than 2? (I realize functions to do so probably don't currently exist, but the question is about the transforms machinery itself.) -Andrew Michael Droettboom wrote: I'm not very familiar with how axes3d works, but just by looking at the number of transform calls and objects, it appears that it will take significant effort to update it. It was never one of the goals of the transformation refactoring to have that working. Personally, I'm +1 on removing axes3d.py to avoid confusion. However, a motivated user could follow the information in API_CHANGES to update axes3d.py. I'd be happy to help if you got stuck, but I don't really have the motivation/mandate to do the whole thing myself. Cheers, Mike Matthias Michler wrote: Hello list, I know it is not recommended to use matplotlib for 3d plotting, but for a while simple plots worked fine for me. This is not the case with actual svn version and therefore my question is: Would it break at lost or cost much effort to make the 3d-plot-examples of the Cookbook work? if I try: [1] import matplotlib.axes3d as p3 I get the error attached below. Thanks for any advise in advance. best regards Matthias --- type 'exceptions.ImportError' Traceback (most recent call last) /home/michler/CompPhys_2008/Uebungsaufgaben/050_Antidot/3D_matplotlib/ipython console in module() /scratch/michler/SOFT/lib/python2.5/site-packages/matplotlib/axes3d.py in module() 14 from axes import Axes 15 import cbook --- 16 from transforms import unit_bbox 17 18 import numpy as np type 'exceptions.ImportError': cannot import name unit_bbox /scratch/michler/SOFT/lib/python2.5/site-packages/matplotlib/axes3d.py(16)module() 15 import cbook --- 16 from transforms import unit_bbox 17 - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3d
Michael Droettboom wrote: I'm not very familiar with how axes3d works, but just by looking at the number of transform calls and objects, it appears that it will take significant effort to update it. It was never one of the goals of the transformation refactoring to have that working. Personally, I'm +1 on removing axes3d.py to avoid confusion. I agree. This is overdue. Eric - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3d
On Fri, Jun 20, 2008 at 12:12 PM, Eric Firing [EMAIL PROTECTED] wrote: transformation refactoring to have that working. Personally, I'm +1 on removing axes3d.py to avoid confusion. Done home:~/mpl/lib/matplotlib cat axes3d.py raise NotImplmentedError('axes3d is not supported in matplotlib-0.98. You may want to try the 0.91.x maintenance branch') - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3d
In theory, yes, but it's a completely untested theory. Each transform class has an input_dims and output_dims member that defines the input and output dimensions. So theoretically, you could create a perspective or orthogonal projection that maps from 3D to 2D. Cheers, Mike Andrew Straw wrote: Mike, just a question about the new transforms backend -- can the input dimensionality be greater than 2? (I realize functions to do so probably don't currently exist, but the question is about the transforms machinery itself.) -Andrew Michael Droettboom wrote: I'm not very familiar with how axes3d works, but just by looking at the number of transform calls and objects, it appears that it will take significant effort to update it. It was never one of the goals of the transformation refactoring to have that working. Personally, I'm +1 on removing axes3d.py to avoid confusion. However, a motivated user could follow the information in API_CHANGES to update axes3d.py. I'd be happy to help if you got stuck, but I don't really have the motivation/mandate to do the whole thing myself. Cheers, Mike Matthias Michler wrote: Hello list, I know it is not recommended to use matplotlib for 3d plotting, but for a while simple plots worked fine for me. This is not the case with actual svn version and therefore my question is: Would it break at lost or cost much effort to make the 3d-plot-examples of the Cookbook work? if I try: [1] import matplotlib.axes3d as p3 I get the error attached below. Thanks for any advise in advance. best regards Matthias --- type 'exceptions.ImportError' Traceback (most recent call last) /home/michler/CompPhys_2008/Uebungsaufgaben/050_Antidot/3D_matplotlib/ipython console in module() /scratch/michler/SOFT/lib/python2.5/site-packages/matplotlib/axes3d.py in module() 14 from axes import Axes 15 import cbook --- 16 from transforms import unit_bbox 17 18 import numpy as np type 'exceptions.ImportError': cannot import name unit_bbox /scratch/michler/SOFT/lib/python2.5/site-packages/matplotlib/axes3d.py(16)module() 15 import cbook --- 16 from transforms import unit_bbox 17 - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users