Re: [R] display two pie-charts

From: Barry Rowlingson <>
Date: Wed 11 May 2005 - 23:59:31 EST

Lars wrote:

> i'd like to compose a clock-like looking plot composed out of two
> circles, each showing the length of a period (to compare them). first,
> to do so, it looked the easiest by using pie(), just puting multiple
> pie-charts over each other. the problem is that once the second pie is
> drawn, it replaces the first one. does anybody know how to add a second,
> smaller pie over an existing one, like a layer?

  pie() calls, thus creating a new plot. Comment out the call and you'll have a pie() function that splats over the current plot.

  Suggest you copy 'pie' to something of your own:

  > clock = pie

  Then edit the 'clock' function, removing the '' call.

  All 'pie' does is call 'polygon' with some sine and cosine trickery - you may be better off writing your own graphics function to do what you want. Reading the 'pie' code may help!

Baz mailing list PLEASE do read the posting guide! Received on Thu May 12 00:04:58 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:41 EST