[R] squared "pie chart" - is there such a thing?

Gabor Grothendieck ggrothendieck at gmail.com
Thu Jul 21 19:53:15 CEST 2011


On Thu, Jul 21, 2011 at 11:29 AM, Dimitri Liakhovitski
<dimitri.liakhovitski at gmail.com> wrote:
> Hello!
> It's a shoot in the dark, but I'll try. If one has a total of 100
> (e.g., %), and three components of the total, e.g.,
> mytotal=data.frame(x=50,y=30,z=20), - one could build a pie chart with
> 3 sectors representing x, y, and z according to their proportions in
> the total.
> I am wondering if it's possible to build something very similar, but
> not on a circle but in a square - such that the total area of the
> square is the sum of the components and the components (x, y, and z)
> are represented on a square as shapes with right angles (squares,
> rectangles, L-shapes, etc.). I realize there are many possible
> positions and shapes - even for 3 components. But I don't really care
> where components are located within the square - as long as they are
> there.
>
> Is there a package that could do something like that?
> Thanks a lot!

Check out the treemap package. See the bottom of this page for examples:

http://www.oga-lab.net/RGM2/func.php?rd_id=treemap:treemap-package

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list