简体   繁体   中英

R pie() adjust thickness of lines

I tried all sorts of cex options as I found in help, they do not alter thickness of lines of pie() plot.

x <- c(21, 62, 10, 53)
labels <- c("London", "New York", "Singapore", "Mumbai")
pie(x, labels, main = "City pie chart", col = rainbow(length(x)))
#same as:
pie(x, labels, main = "City pie chart", cex.line=100, col = rainbow(length(x)))

How can I alter thickness of lines in pie()?

I believe base pie() does not include the lwd parameter to be modified.

You can do it by setting it beforehand in the Graphical Parameters .

To see the defaults line width:

par()$lwd

Now to change it you can try:

par(lwd = 3)
pie(x, labels, main = "City pie chart", col = rainbow(length(x)))

在此处输入图片说明

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