[Matplotlib-users] Multiple surface plots with correct z-ordering
Hi, is it possible to create a three-dimensional plot with several surface plots with correct z-ordering? The naive approach via import pylab from mpl_toolkits.mplot3d import Axes3D pylab.close('all') fig=pylab.figure() ax=fig.add_subplot(111, projection='3d') x=pylab.linspace(-8, 8, 128) y=pylab.linspace(-8, 8, 128) X, Y=pylab.meshgrid(x, y) ax.plot_surface(X, Y, X**2+Y**2) ax.plot_surface(X, Y, 100*pylab.ones_like(X), color='r') pylab.draw() pylab.show() does not work. One surface plot is hiding the other one completely. I am using Matplotlib version 1.1.1. May be one can combine the two Poly3DCollections generated by plot_surface into a single one. Any hints? Heiko -- -- Number Crunch Blog @ http://numbercrunch.de -- Cluster Computing @ http://www.clustercomputing.de --Heiko Bauke @ http://www.mpi-hd.mpg.de/personalhomes/bauke -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] 3d subplots, white space
Hi all, I try to make a figure with 6 3d subplots. My problem is that there is a lot white space around. I tried to play with subplot_adjust, but without much success. Any hints? Thanks. -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 3d subplots, white space
On Thu, Feb 14, 2013 at 1:58 PM, Petro wrote: > Hi all, > I try to make a figure with 6 3d subplots. > My problem is that there is a lot white space around. I tried to play > with subplot_adjust, but without much success. > Any hints? > Thanks. > > If I remember correctly, what happens is that the SubAxes class over-rides the rect argument to the Axes initializer because it is the position of the global axes box in figure coordinates (and therefore, for multiple subplots, it automatically determines the figure coordinates for each subplot). Unfortunately, it assumes a certain amount of margins to leave, which is applicible for 2d plots, but not for 3d plots. I would bet that there is some way to mess around with the default gridspec parameters, but that is not in my area of expertise. If anybody who knows this sort of stuff can give me a clue about it, I would love to update mplot3d to have a better default subplot appearance. Cheers! Ben Root -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users