Aleš Čadež wrote:
> First of all, thanks for helping me. What you wrote is not exactly what 
> i need. Let me show you an example:
> 
>  
> 
>  
> 
> Now here are different size circles (biggest grey is »size=8«, other two 
> are »size=4«, and blue circles are size 2 and 1). I would like to color 
> them according to colorbar (size=1 = blue, size=4 = green, size = 8 = red)
> 
>  
> 
> In your example there is random color to the circle size, i want the 
> size to match the color.

I think my randomizing of the position is throwing you off.  Here is a 
version that I think makes it more clear that the size (radius) is 
matching the color:

radius = np.arange(10)
area = np.pi*radius**2
x = radius
y = area
cmap = plt.get_cmap('spectral')
plt.scatter(x, y, s=area, c=radius, cmap=cmap)
plt.colorbar()

Eric


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to