https://github.com/dianadima/mot_action
Raw File
Tip revision: af9eede56f27215ca38ddd32564017f1f90417d0 authored by Diana Dima on 20 November 2021, 02:04:32 UTC
final clean up fixes
Tip revision: af9eede
plot_rainclouds.m
function [] = plot_rainclouds(datamatrix,labels,metric)
%UNTITLED3 Summary of this function goes here
%   Detailed explanation goes here

nvar = size(datamatrix,2);
data = cell(nvar,1);
labels = fliplr(labels); %label correctly

for i = 1:nvar

    data{i} = datamatrix(:,i);
    
end
    
figure

rp = rm_raincloud(data,[0.7 0.7 0.7],1);

set(gca,'FontSize',20)
yticklabels(labels)
set(gca,'TickLength',[0.001 0.001])
xlabel(metric)

colours = viridis(nvar+1);

for c = 1:2
    rp.p{c}.CData(1,:,:) = colours(c,:);
    rp.s{c}.MarkerFaceColor = colours(c,:);
end

set(gca,'xgrid', 'on')
clear rp

end

back to top