Grouped scatter plot with categories (strings) on y-axis (essentially stacked 1-D plots)

2 views (last 30 days)
I have 3 specific values (lets say max, min, and avg) for 5 different experiments (total of 15 numerical values).
I want to make a scatter plot where the x-axis represents the numerical value and the y-axis is each case (labelled by a string representing experiment name). In essence it is stacking five 1-D plots on top of one another. I DO NOT want boxplots.
I could do this by giving each experiment an integer value (each of the 15 numerical values will be X,Y where Y=1:5) and plotting, although I'm unsure of how to overwrite the default labeling to map each value to my strings (experiment name).
This is a very, VERY quick mockup of what I want to do. http://i52.tinypic.com/awsxeo.png
What's the easiest way to do this? I figured someone else might have a stupid easy answer (some built in function I'm missing?) rather than me fool around with it for a couple hours.

Answers (2)

bym
bym on 5 Apr 2011
I guess
barh()
doesn't cut it either?

Matt Tearle
Matt Tearle on 6 Apr 2011
I'd go with what you suggest of giving the experiments integer values. Then do
set(gca,'YTick',1:n)
set(gca,'YTickLabel',strings)
where strings is an n-element cell array of the labels you want on the axis.

Products

Community Treasure Hunt

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

Start Hunting!