How can I break the Y axis on a stairs plot?

4 ビュー (過去 30 日間)
Katie
Katie 2014 年 9 月 30 日
回答済み: Image Analyst 2014 年 10 月 1 日
Hi:
I need to plot histograms of event intensity for 6 different treatments on the same graph. I used histc and stairs. one of my samples has 7000 events that are in the first bin- and this makes it really hard to see the rest of the bins. Is there a way to break the y axis so I can see both the bottom and top portions of the graph?
this is the code I used
if true
nbins = 25;
mindat = min([intensity250 ; unlabeledintensity]);
maxdat = max([intensity250 ; unlabeledintensity]);
edges = linspace(mindat,maxdat,nbins);
x250= histc(intensity250,edges);
xunl = histc(unlabeledintensity,edges);
x125=histc(intensity125, edges);
x61=histc(intensity61,edges);
x31=histc(intensity31,edges);
x10=histc(intensity10,edges);
figure; hold on
stairs(edges,x250,'r')
stairs(edges,xunl,'b')
stairs(edges,x125, 'g')
stairs(edges,x61, 'k')
stairs(edges,x31, 'm')
stairs(edges,x10, 'c')
% code
end
  2 件のコメント
dpb
dpb 2014 年 10 月 1 日
How about
set(gca,'yscale','log')
???
Katie
Katie 2014 年 10 月 1 日
yes! Taking the log made it much easier to visualize. Thank you.

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2014 年 10 月 1 日
Here's an option: http://www.mathworks.com/matlabcentral/fileexchange/3668-breakaxis. Not sure if that's what you're after though, or if taking the log before calling stairs is what you want.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by