4
votes

in excel, in order to have drop line in a line chart you just click the line output, and then drop line, but if your plot is scatter plot then you will click error bars, set to minus, no cap, and 100 percent and you will have almost the same output. but i don't know if Matlab can do that, please help
this is my x, y data:

x=28,35,44,57,68,70,85
y= 5,6,14,10,17,7,8,5

i don't know if matlab can do dropping line if your data is scatter data, please help me thanks :)

1

1 Answers

2
votes

You want the stem function instead of plot. Much easier than in Excel, no hacks required.

x = [28, 35, 44, 57, 68, 70, 85];
y = [5,  6,  14, 17, 7,  8,  5 ];

stem(x,y)