How can I break the Y axis on a stairs plot?
5 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Image Analyst
on 1 Oct 2014
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 Comments
More Answers (0)
See Also
Categories
Find more on Discrete Data Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!