I have two data-sets and i want to plot them using plotyy to have two different scales. Second data-set is all zeros except in some points. i want to plot the second data-set as vertical lines. In regular plot function i can use plot([x x],[y y]) or i can also use line function. First when i use either ways, when i try to insert legends it puts one legend for each line. I want to have one legend for all vertical lines. Secondly i could not find any way how to use either plot or line inside plotyy function for multtiple vertical lines.