Assuming price1 is stored in the vector p1
, price2 is stored in the vector p2
, interpolated price1 is stored in the vector pg
, and index is stored in the vector ind
, the following code can be used to plot and label the lines:
main.m59 chars3 lines
This will plot each vector against the index and label the lines with the legend specified.
gistlibby LogSnag