Message-ID: <42820FC3.1050105@lancaster.ac.uk>
Date: 2005-05-11T13:59:31Z
From: Barry Rowlingson
Subject: display two pie-charts
In-Reply-To: <42820C00.7030704@pik-potsdam.de>
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 plot.new(), thus creating a new plot. Comment out the
plot.new 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 'plot.new' 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