[R] How to draw clock in R ?
Jim Lemon
jim at bitwrit.com.au
Thu Aug 9 11:01:39 CEST 2012
On 08/09/2012 03:43 PM, Manish Gupta wrote:
> 0 down vote favorite
>
>
> I am working on R and trying to draw a clock using a pie chart.
>
> code:
>
> pie(c(25,20,15,10,10,30),labels = c(1,2,3,4,5,6,7,8,9,10,11,12),
> col=rainbow(length(lbls)), clockwise = TRUE, init.angle = 90)
>
> but i need all 12 labels to be there independent of no of segments in input.
>
> http://r.789695.n4.nabble.com/file/n4639721/Screenshot-7.png
>
> How can i implement it?
>
Hi Manish,
library(plotrix)
pie(c(25,20,15,10,10,30))
floating.pie(0,0,c(25,20,15,10,10,30))
pie.labels(0,0,seq(0,23*pi/12,by=pi/6),c(3:1,12:4),
radius=1.1,border=NA)
Jim
More information about the R-help
mailing list