How can I break the Y axis on a stairs plot?
2 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/145561/image.png)
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
采纳的回答
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.
![](https://www.mathworks.com/matlabcentral/images/broken_image.png)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!