r plot legend code example
Example 1: r language legend parameters
makePlot()
# Add a legend to the plot
legend(1, 95, legend=c("Line 1", "Line 2"),
col=c("red", "blue"), lty=1:2, cex=0.8,
title="Line types", text.font=4, bg='lightblue')
Example 2: plot legend
plt.plot([1, 2, 3], label='Inline label')
plt.legend()