Grouped scatter plot with categories (strings) on y-axis (essentially stacked 1-D plots)
이전 댓글 표시
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.
답변 (2개)
bym
2011년 4월 5일
I guess
barh()
doesn't cut it either?
Matt Tearle
2011년 4월 6일
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.
카테고리
도움말 센터 및 File Exchange에서 Scatter Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!