if (FALSE) {
oldmar = par("mar")
# Dual legend example (color + bubble)
l1 = list(
lgnd_labs = c("Red", "Blue", "Green"),
legend_args = list(title = "Colors"),
pch = 16,
col = c("red", "blue", "green"),
type = "p"
)
l2 = list(
lgnd_labs = c("Tiny", "Small", "Medium", "Large", "Huge"),
legend_args = list(title = "Size"),
pch = 16,
col = "black",
cex = seq(0.5, 2.5, length.out = 5),
type = "p"
)
# Draw together
draw_multi_legend(list(l1, l2), position = "right!")
par(mar = oldmar)
}
Run the code above in your browser using DataLab