Vertically stacked histograms or violin plots or density estimators for 14 variables

6 views (last 30 days)
Hi,
I am looking to create a figure similar to the attached. Where X axis is 0:100 and y axis has the string name to each variable. I would like the 'height' of each variable to represent the frequency of the value. Before this I have visualised the data through box plots, but now want to view the density of each variable by exploring figures similar to below and/or violin plots. Any help or advice would be greatly appreciated.
% code
figure(1)
boxplot(mDATA)
ylabel('% of cycle')
ylim([0 100])
xticklabels(names)
view([90 -90])
X = mDATA(:,1);
figure(2)
histfit(X)
hold on
[f,Xi] = ksdensity(X);
plot(Xi,f);
hold off
end

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!