Sachin Kumar Sharma, on 2011-03-23 02:44, wrote: > BB, > > I am Xploting two variables using > Plot(a,b,'o') > > Is it possible to color code the same plot with a 3rd property c instead of > color we specify. > > Also advise if it is possible to do 3D Xplot in matplotlib for variables a,b, > & c and if possible to color code this 3d plot with 4th variable d.
Sashin, use scatter(a,b,c=c, marker='o') to set the color of individual point. There's even an 's' parameter with which you can individually set the size of the marker. npts = 100 a = np.random.rand(npts) b = np.random.rand(npts) c = np.random.rand(npts) d = np.random.rand(npts) plt.scatter(a,b,c=c,s=c*100, marker='o') best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users