简体   繁体   中英

floating pie() in plotrix package in R (adjusting the opening & closing pattern)

Background:

Presently, my "floating.pie" by plotrix package using:

plot(1:10,ty="n")

library(plotrix)

floating.pie(3, 8,c(.8, .2), 200 , 1, col=c("maroon","white"), lwd=2)

looks like this:

在此处输入图片说明

QUESTION: I was wondering if there might be an argument or a way so that floating pie ALWAYS looks downwards (always making a "V" or "/\\" shape)?

For example, the above floating.pie becomes like this:

在此处输入图片说明

In your case, you can obtain the exact value of startpos as

startpos = (3*pi/2) + #Start at 3*pi/2 (facing generally downward)
           (0.2*2*pi/2) #Add half of the angle assigned for smaller value

#Then plot
plot(1:10,ty="n")
floating.pie(3, 8,c(.8, .2), 200 , 1, col=c("maroon","white"), lwd=2, startpos = startpos )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM