sidimok <[EMAIL PROTECTED]> writes:

> Well, let's take the one you've proposed the last time. How than can i put a
> colorbar beside the plot?

Add in the imports

from matplotlib.colorbar import ColorbarBase, make_axes

and change the myscatter function to

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))
    cax, _ = make_axes(ax)
    ColorbarBase(cax, cmap=colormap)

A better solution is probably to implement a CircleCollection similarly
to the other collections.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


-------------------------------------------------------------------------
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