Creating customized barplot for different lengths of arrays
Show older comments
I have data comes from three different sources. Each of [data1, data2, and data3] are column vectors with different lengths and it only contains integer values from 1-3. Like following:
data1 = randi([1 3], 20,1])
data2 = randi([1 3], 34,1])
data3 = randi([1 3], 56,1])
The code should calculate the percentage of each integers value and group them on the same bar plot for data1, data2, and data 3. See below hand sketched picture [approximate]. Any thoughts would be greatly appreciated!

1 Comment
dpb
on 30 Dec 2016
BTW: As discussed in the other comment and the answer, that it takes such effort in HG1 and is, from what I've read at File Exchange, even more complicated if not actually impossible with HG2 is simply unacceptable in my opinion.
I would suggest submitting this topic as a bug report; it really is a worse omission than simply an enhancement request.
Just imo, $0.02, ymmv, etc., etc., with all the other associated caveats...
Accepted Answer
More Answers (0)
Categories
Find more on Data Distribution 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!

