RM_raincloud_Plot (Matlab)
MarkKramer opened this issue · 1 comments
Thank you for a great resource.
For some reason the rm_raincloud.m code does not want to plot my repeated measures? My data consists of 15 participants performing landing tasks in 5 different directions (the repeated measures), on 2 separate occasions (the "groups"). my datafile (DF) therefore consists of a 150x3 matrix (see attached file). I have then implemented the code as per the tutorial (see below):
% Get the repeated measures data
DF = readmatrix(fullpath{1});
i = [];
j = [];
data = [];
% read into cell array of the appropriate dimensions
for i = 1:5 % number of repeated measures
for j = 1:2 % number of groups
data{i, j} = DF(DF(:, 2) == i & DF(:, 3) ==j);
end
end
% make figure
f9 = figure('Position', fig_position);
h = rm_raincloud(data, cl);
set(gca, 'YLim', [-0.3 1.6]);
title('Repeated measures raincloud plot');
The plot however consists only of the 5th landing task, none of the other landing tasks are plotted. What am I doing wrong?
Kind regards,
Mark
Med_lat_V1.csv
The issue appears to be due to the "YLim" line of code. If I block this out then the code works fine.