Display range of points(as an "i letter") in plot command

2 views (last 30 days)
Hello all,
I have 4 sets of data that has 5 points per data set. If i want to graph this data set by showing a line on the largest and smallest value and a dot on the average value(a capital i shape) for eery set so the range of the values as well as the average can be seen in one plot, how can i dothis?
Thanks for your help!

Accepted Answer

Walter Roberson
Walter Roberson on 12 Nov 2011
Perhaps the stats toolbox boxplot would be what you need.

More Answers (1)

Fangjun Jiang
Fangjun Jiang on 12 Nov 2011
Unfortunately, there is no marker in the shape of letter "I". Is the following close to what you want?
d=rand(4,5);
figure(1);hold on;
plot(max(d),'r:')
plot(min(d),'g--')
plot(mean(d),'b*')
Or use the errorbar() in a twisted way. Just specify an error matrix that is fit for your data but shows a proper size "I" shape.
d=rand(4,5);
figure(1);hold on;
plot(max(d),'r:')
plot(min(d),'g--')
E=0.05*ones(size(d,2),1);
errorbar(mean(d),E);

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!