Custom Pie-Like Marker In Scatter

Hi All,

   I was wondering about custom markers in the scatter method, and I
thought to ask here for some suggestions.
Basically, I have 3 variables to show, which are oil, gas and water
production. I would like to define the bubble size by the sum of these
three variables (or something akin), and then I would like to be able
to split the bubble marker in 3 sections (like having a small pie
chart in place of the marker), with each section area proportional to
the value of oil, gas and water production respectively. I know this
might sound not very clear, I attach a small picture of what I mean
(the picture shows the bubble divided into 2 sections, but the purpose
is the same).
I know about custom marker, but I am not so expert with matplotlib to
be able to implement it... could someone please share some suggestion
on how to do this?

Thank you very much.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Pie_Marker_Scatter.jpg

Andrea Gavana wrote:

Hi All,

   I was wondering about custom markers in the scatter method, and I
thought to ask here for some suggestions.
Basically, I have 3 variables to show, which are oil, gas and water
production. I would like to define the bubble size by the sum of these
three variables (or something akin), and then I would like to be able
to split the bubble marker in 3 sections (like having a small pie
chart in place of the marker), with each section area proportional to
the value of oil, gas and water production respectively. I know this
might sound not very clear, I attach a small picture of what I mean
(the picture shows the bubble divided into 2 sections, but the purpose
is the same).
I know about custom marker, but I am not so expert with matplotlib to
be able to implement it... could someone please share some suggestion
on how to do this?

Thank you very much.

Andrea.

Hi,
as you already suggested, you have to do a little hand-work, but its not too hard. I attached an example, which you can use as a starting point...

Manuel

pie_example.png

pie_example.py (968 Bytes)

···

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

------------------------------------------------------------------------

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Hi Manuel,

···

On Fri, Apr 18, 2008 at 8:49 AM, Manuel Metz wrote:

Andrea Gavana wrote:
> Hi All,
>
> I was wondering about custom markers in the scatter method, and I
> thought to ask here for some suggestions.
> Basically, I have 3 variables to show, which are oil, gas and water
> production. I would like to define the bubble size by the sum of these
> three variables (or something akin), and then I would like to be able
> to split the bubble marker in 3 sections (like having a small pie
> chart in place of the marker), with each section area proportional to
> the value of oil, gas and water production respectively. I know this
> might sound not very clear, I attach a small picture of what I mean
> (the picture shows the bubble divided into 2 sections, but the purpose
> is the same).
> I know about custom marker, but I am not so expert with matplotlib to
> be able to implement it... could someone please share some suggestion
> on how to do this?
>
> Thank you very much.
>
> Andrea.
>

Hi,
as you already suggested, you have to do a little hand-work, but its not too
hard. I attached an example, which you can use as a starting point...

Thank you for the sample, this is exactly wht I was looking for. Thank
you very much!

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Hey Manuel -- very cool example. I added this example to the svn
trunk (rewritten slightly to conform to recommended import style) as
examples/scatter_piecharts.py

Cool stuff,
JDH

···

On Fri, Apr 18, 2008 at 2:49 AM, Manuel Metz <mmetz@...1721...> wrote:

as you already suggested, you have to do a little hand-work, but its not
too hard. I attached an example, which you can use as a starting point...