[Matplotlib-users] Contour and Scatter with same colorbar

2011-04-07 Thread Wang Jun
Hello,

 I want to plot a contourf (or imshow) map with some scatter symbol 
lay on it, and I
want them to use a same color set.

like contour(x,y,z) or imshow(x,y,z) have a color set (colorbar)

   and scatter(x1,y1, s=z1,c=z1). in the scatter, the color of z1 would 
be the same with
the color of z if their value is the same.  How could I do? thanks!

Best Regards,
Wang Jun

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib-users Digest, Vol 62, Issue 3

2011-07-03 Thread Wang Jun
Hello, Angus!

For this method, if I want to draw a colorbar to indicate the specific 
values
for the colors, what should I do? the colorbar() in pylab is not 
waorking for
this case.

  Thanks,
Wang Jun

于 2011/7/3 8:48, [email protected] 写道:
> On 1 July 2011 14:35, Francois Lemery  wrote:
>> >  Hello,
>> >
>> >  I am interested in producing a 4 dimensional plot to represent some data.
>> >
>> >  I picture this as looking like a normal 3d scatter plot with datapoints
>> >  varying in a color scale which depends on a fourth column of data.
>> >
>> >  Could anyone help me with this- I have searched google and the matplotlib
>> >  website and have only found some documentation for a MatLab solution 
>> > bywhich
>> >  I am not interested.
>> >
>> >  Thank you kindly!
>> >  -Francois
> How about this?
>
> from mpl_toolkits.mplot3d import Axes3D
> import matplotlib.pyplot as plt
> import numpy as np
>
> fig = plt.figure()
> ax = fig.add_subplot(111, projection='3d')
>
> x = np.random.standard_normal(100)
> y = np.random.standard_normal(100)
> z = np.random.standard_normal(100)
> c = np.random.standard_normal(100)
>
> ax.scatter(x, y, z, c=c, cmap=plt.hot())
> plt.show()
>
> Angus.
> -- AJC McMorland Post-doctoral research fellow Neurobiology, 
> University of Pittsburgh


--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users