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!