How do I pass an array of line specifications or styles to plot?
问题 I want to plot multiple lines with one call to plot() , with different line styles for each line. Here's an example: Both plot([1,2,3]', [4,5;6,7;8,9], {'-o', '-x'}) and hs = plot([1,2,3]', [4,5;6,7;8,9]) set(hs, 'LineStyle', {'--'; '-'}) don't work. I've tried a whole bunch of arcane combinations with square and curly braces, but nothing seems to do the trick. I know it's possible to loop through the columns in Y and call plot() for each one (like in this question), but that isn't what I'm