I’m working on a plot where I need to draw legends and I require one of them to be a triangle.
plot.new()
legend(x=.5,y=.9, c("A","B","C","D"), cex=.8, bty="n",
fill = c("green","yellow","red","blue"))
I would like legend D to be triangle in shape. How can I implement this?
Regards
Use
pchandcol(instead offill):