Bar graphs with two sets of different sizes
16 views (last 30 days)
Show older comments
Flo on 5 May 2016
I am trying to plot one bar graph with using twos sets of different sizes.
The following code works fine if the datasets are equal in size, but doesnt if not.
xlabel('Area'); % x-axis label
ylabel('Frequency'); % y-axis label
one and two are my datasets.
would you know if there is a way of doing through matlab?
Thanks for your help :)
Mike Garrity on 5 May 2016
One simple way is this:
none = length(one);
ntwo = length(two);
h = nan(max(none,ntwo),2);
[y,x] = hist(h);
More Answers (0)
Find more on Graphics Performance 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!