Jouni K. Seppänen wrote:
> 
> 
> It would help to give a complete example. ColorbarBase itself does not
> create a colorbar but is useful for drawing a colorbar in existing axes.
> 
> 
Well, let's take the one you've proposed the last time. How than can i put a
colorbar beside the plot?

#!/usr/bin/env python 

import matplotlib 
from matplotlib.patches import Circle 
import pylab 

def myscatter(ax, colormap, x, y, radii, colors): 
    for x1,y1,r,c in zip(x, y, radii, colormap(colors)): 
        ax.add_patch(Circle((x1,y1), r, fc=c)) 

fig=pylab.figure() 
ax=fig.add_subplot(111) 

myscatter(ax, matplotlib.cm.jet, 
          pylab.rand(20), pylab.rand(20), 0.1*pylab.rand(20),
pylab.rand(20)) 

ax.axis('equal') 
pylab.show()
-- 
View this message in context: 
http://www.nabble.com/Drawing-filled-circles-%28discs%29-tf4441651.html#a12777776
Sent from the matplotlib - users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to