Setting the y-values of the start and end points to zero, (x[0],0.0) and
(x[-1],0.0), forces the return baseline path to be "well defined" at y=0,
allowing it to be overlain with a second line of a neutral colour.

However, this baseline also wipes a through adjacent slice data.


= FAIL.


Steve.


On 21/11/12 08:38, Stephen Gibson wrote:
Unfortunately, as you state, "edgecolors='none'"  also wipes the
(x,y) data line.

I tried adding an additional "erase" zero line, with "edgecolors='none'"
for each slice, but it seems the return path extends from
(x[0],y[0])  to (x[-1],y[-1]) via some intermediate point.

An additional blank (x[0], 0.0) to (x[-1], 0.0) does not overlap the baseline.

If I can determine the baseline path (coordinates) this procedure
may work.

Thanks, for your input.

Steve.

On 21/11/12 04:04, Benjamin Root wrote:


On Tue, Nov 20, 2012 at 12:55 AM, Stephen Gibson <stephen.gib...@anu.edu.au <mailto:stephen.gib...@anu.edu.au>> wrote:

    I want to plot a series of (x,y) datasets similar to the
    polygon plot tutorial example (add_collection3d),
    but with a transparent facecolor and no baseline.


    Setting alpha=0.0 in the tutorial example (below)
    achieves the transparency, but the baseline remains.

    Is there a way to remove the baseline?

    Tks,

    Steve.


    from mpl_toolkits.mplot3d import Axes3D
    from matplotlib.collections import PolyCollection
    from matplotlib.colors import colorConverter
    import matplotlib.pyplot as plt
    import numpy as np
    [cc('w',1.0),cc('w',1.0)
    fig = plt.figure()
    ax = fig.gca(projection='3d')

    cc = lambda arg: colorConverter.to_rgba(arg, alpha=0.0)

    xs = np.arange(0, 10, 0.4)
    verts = []
    zs = [0.0, 1.0, 2.0, 3.0]
    for z in zs:
         ys = np.random.rand(len(xs))
         ys[0], ys[-1] = 0, 0
         verts.append(list(zip(xs, ys)))

    poly = PolyCollection(verts, facecolors = [cc('r'), cc('g'), cc('b'),
                                                cc('y')])
    #poly.set_alpha(0.7)
    ax.add_collection3d(poly, zs=zs, zdir='y')

    ax.set_xlabel('X')
    ax.set_xlim3d(0, 10)
    ax.set_ylabel('Y')
    ax.set_ylim3d(-1, 4)
    ax.set_zlabel('Z')
    ax.set_zlim3d(0, 1)


You should be able to set "edgecolors='none'" or as the same color as the facecolors in the constructor for PolyCollection to make it disappear. Unfortunately, that would apply to the entire polygon, and not just the part at the base.

Ben Root




------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov


_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to