On Thu, Dec 27, 2012 at 10:08 AM, Diego Avesani <diego.aves...@gmail.com>wrote:

>
> dear all,
> this is my code:
>
> *import numpy as np*
>
> *import matplotlib.pyplot as plt*
>
> *from mpl_toolkits.mplot3d import Axes3D*
>
> *data1Dx = np.genfromtxt('output.dat')*
>
> *xp = data1Dx[:,0]*
>
> *yp = data1Dx[:,1]*
>
> *zpA = data1Dx[:,1]*0+5*
>
> *CA = data1Dx[:,2]*
>
> *CB = data1Dx[:,3]*
>
> *# Create Map*
>
> *cm = plt.get_cmap("RdYlGn")*
>
> *# 3D Plot*
>
> *fig = plt.figure()*
>
> *ax3D = fig.add_subplot(111, projection='3d')*
>
> *ax3D.scatter(xp, zpA,yp, s=10, c=CA,
> marker='o',edgecolor='none',alpha=0.1)*
>
> *plt.show()*
>
> *
> *
>
> I am not able to set the color according to vector CA, all scatters became
> blue.
>
> *
> *
>
> the same thing happens when I put:
>
> #fig.savefig('test.png',format='png',bbox_inches='tight')
>
>
> to overcome this problems I set:
>
>
> *def forceUpdate(event):*
>
> *    global scatCollection*
>
> *    scatCollection.changed()*
>
> *fig.canvas.mpl_connect('draw_event',forceUpdate)*
>
> *
> *
>
> However the transparency "alpha" does not works.
>
>
> do you think that is this a bugs?
>
> I am running python on ubuntu 12.10
>
>
>  thanks
>
>
> Diego
>
>
The color part of this issue is known, and was fixed for v1.1.1, I
believe.  Certainly for v1.2.0.  Please double-check your matplotlib
version.  As for the alpha issue, that is a tough one that I am working on
in a personal branch.  The issue is that mplot3d uses transparency as a way
to simulate "depth".  Scatter markers further away are "foggier", kind of.
This means that any alpha provided by the user is immediately over-written
upon display.

Ben Root
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to