Answers for "common legend for multiple plots in r"

1

how to legend a multi graph with plot in r

plot_colors <- c("blue","black", "green", "orange", "pink")
  text <- c("Fabricated Metal", "Iron and Steel", "Paper", 
  "Beverages", "Tobacco")
  plot.new()
  par(xpd=TRUE)
  legend("center",legend = text, text.width = max(sapply(text, strwidth)),
         col=plot_colors, lwd=5, cex=1, horiz = TRUE)
  par(xpd=FALSE)
Posted by: Guest on August-06-2020
0

common legend for multiple plots in r

# for ggplot
ggarrange(bxp, dp,  common.legend = TRUE)
Posted by: Guest on September-28-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language