How to have smaller histogram show up on top of larger histogram
3 views (last 30 days)
Show older comments
I have code that currently plots several histograms on the same figure, but when the first histogram created is smaller than the next one, it becomes completely covered. Is there a way to make it so that the smallest histogram always shows up in the foreground?
Answers (1)
Image Analyst
on 21 Feb 2022
How are you plotting? Did you try
histogram(data1);
hold on;
grid on;
histogram(data2);
3 Comments
Jeff Miller
on 22 Feb 2022
maybe check the number of values in each dataset and plot the smallest one's histogram last?
See Also
Categories
Find more on Histograms 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!