> Or are you effectively doing a scatter plot? Could you use scatter?
>
> Eric
>
Yes, I've already tried doing the trick with a scatter plot, but since the
filling colors correspond to a "physical quantity" and the radius of the
scatters are the "real" circle radius, using RegularPolygons is
John Hunter wrote:
> On Sun, Jun 15, 2008 at 7:48 AM, sidimok <[EMAIL PROTECTED]> wrote:
>
>> The code above was working for me as a charm, but since the new matlplotlib
>> flavor 0.98, I'm getting this error message:
>>
AttributeError: 'CirclePolygon' object has no attribute 'get_verts' <<
>
On Sun, Jun 15, 2008 at 7:48 AM, sidimok <[EMAIL PROTECTED]> wrote:
> The code above was working for me as a charm, but since the new matlplotlib
> flavor 0.98, I'm getting this error message:
>
>>> AttributeError: 'CirclePolygon' object has no attribute 'get_verts' <<
>
> Any idea?
The new patch
import matplotlib
from matplotlib.patches import CirclePolygon
from matplotlib.collections import PolyCollection
import pylab
fig=pylab.figure()
ax=fig.add_subplot(111)
resolution = 50 # the number of vertices
N = 20
x = pylab.rand(N)
y = pylab.rand(N)
radii = 0.1*pylab.rand(N
sidimok <[EMAIL PROTECTED]> writes:
> Thank you very much indeed for the help, both solutions work like a
> charm. However Dave's one gives rough cirlces, approximated by
> polygones, which is not very accurate for my buisness.
As he said, increasing the number of vertices could be enough, depend
Behalf Of
sidimok
Sent: Thursday, September 20, 2007 4:59 AM
To: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Drawing filled circles (discs)
Mika, David P (GE, Research) wrote:
>
> How about this solution? I'm a complete newbe, but this seems to do
> th
Mika, David P (GE, Research) wrote:
>
> How about this solution? I'm a complete newbe, but this seems to do the
> trick. I didn't see a CircleCollection so I used CirclePolygon to
> generate vertices for a circle; these I grab and toss into a
> PolyCollection. Enjoy, Dave
>
>
Hi all!
Than
On Behalf Of Jouni K. Seppänen
Sent: Wednesday, September 19, 2007 11:03 AM
To: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Drawing filled circles (discs)
sidimok <[EMAIL PROTECTED]> writes:
> Well, let's take the one you've proposed the last time. How
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
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/
sidimok <[EMAIL PROTECTED]> writes:
> It works just fine, however the colorbar I'm getting with the following
> commands is very tiny.
>
> norm = matplotlib.colors.Normalize(vmin=x[0], vmax=x[-1]) # just an example
> cb = matplotlib.colorbar.ColorbarBase(ax, cmap=matplotlib.cm.jet, norm=norm)
It
Jouni K. Seppänen wrote:
>
> sidimok <[EMAIL PROTECTED]> writes:
>
>> I'm using matplotlib to draw (from matplotlib.Patches import Circle)
>> filled
>> circles (disks) from a formatted data file, and would give each disk a
>> color relative to a variable, as done by the "scatter" function.
>
sidimok <[EMAIL PROTECTED]> writes:
> I'm using matplotlib to draw (from matplotlib.Patches import Circle) filled
> circles (disks) from a formatted data file, and would give each disk a
> color relative to a variable, as done by the "scatter" function.
Here's one way to do it:
#!/usr/bin/env p
Hi all!
I'm using matplotlib to draw (from matplotlib.Patches import Circle) filled
circles (disks) from a formatted data file, and would give each disk a
color relative to a variable, as done by the "scatter" function.
Any idea how to handle this, please?
Thank's.
--
View this message in con
14 matches
Mail list logo