UP | HOME

Exercise 21

Multiline plot

Let x be a vector [1,2,3,4,5]. Let y1 = [1,2,3,4,4], and y2 = [1,5,6,8,10], and y3 = [5,4,2,2,1]. Generate a multi-line plot like this:

e21plot1.jpg

Add a legend

Add a legend to your plot that looks like this:

e21plot2.jpg

solutions


Paul Gribble | fall 2014
This work is licensed under a Creative Commons Attribution 4.0 International License
Creative Commons License