Search code examples
rpie-chart

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()?


Solution

  • 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)))
    

    enter image description here