Is there any way to reduce the amount of whitespace around pie charts generated using the base plotting tools in R?
I'd like to create a multi-panel figure but I can't figure out a way to reduce the amount of whitespace around the plot.
Example code:
par(mfrow=c(2,1))
pie(1:5)
pie(rep(1,5))
I tried playing with mar, omi, and oma within par(), but all values for those vectors seem to already be set to zero, and negative values are not accepted. Any way around this?
The default value of mai is :
> par("mai")
[1] 1.02 0.82 0.82 0.42
You can reset it as:
> par(mfrow = c(2, 1), mai = c(0, 0, 0, 0))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With