Reputation: 185
The problem of legend is too big. When I change the number of cex ,the font is too small and the box is still big. I hope the box and test can be matched.They will not too small and big.
table <- data.frame(num = c(90, 26, 28, 39, 98),
countries = c("India","Sri Lanka","Nepal","Bhutan", "China"))
label <-paste(table[,1],"%",sep="")
pie3D(table$num, labels = label, main = "Chart",radius = 1, explode = 0)
par(xpd = TRUE)
legend(1, 0.7, legend = table$countries, cex=0.7, yjust=0.6, xjust = -0.1,
fill = heat.colors(length(table$num)))
Upvotes: 2
Views: 2427
Reputation: 1664
You can work with the pointsize
or the resolution (width
and height
) of the image. Than you have as well to adapt the labelcex
.
bmp("plot.bmp", height=600, width=800, pointsize = 15)
pie3D(table$num,labels=label,main="Chart",radius = 1,explode = 0, labelcex=1)
par(xpd=TRUE)
legend(1,0.7,legend=table$countries,cex=0.7,yjust=0.2, xjust = -0.1,
fill = heat.colors(length(table$num)))
dev.off()
Upvotes: 1