1 plot_colors <- c("blue","black", "green", "orange", "pink")
2 text <- c("Fabricated Metal", "Iron and Steel", "Paper",
3 "Beverages", "Tobacco")
4 plot.new()
5 par(xpd=TRUE)
6 legend("center",legend = text, text.width = max(sapply(text, strwidth)),
7 col=plot_colors, lwd=5, cex=1, horiz = TRUE)
8 par(xpd=FALSE)