https://github.com/bastibe/Violinplot-Matlab
Revision 1cebda3ad21b3932294da9a82f4f09bfa9a58704 authored by Bastian Bechtold on 09 June 2016, 07:19:50 UTC, committed by Bastian Bechtold on 09 June 2016, 07:19:50 UTC
0 parent
Tip revision: 1cebda3ad21b3932294da9a82f4f09bfa9a58704 authored by Bastian Bechtold on 09 June 2016, 07:19:50 UTC
initial commit
initial commit
Tip revision: 1cebda3
violinplot.m
function violins = violinplot(data, cats, varargin)
% d = 1xN, c = []; violin without name
% d = 1xN, c = 1xn; violins with names
% d = NxM, c = 1xn; violins with names
% d = NxM, c = []; violins without names
% d = table; violins with names
cats = categorical(cats);
catnames = categories(cats);
for n=1:length(catnames)
thisCat = catnames{n};
thisData = data(cats == thisCat);
violins(n) = Violin(thisData, n, varargin{:});
end
end
Computing file changes ...