How to creat grouped violin plot?
47 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, how can I create a grouped violin plot like this? I have tried different violin plot function such as GitHub - bastibe/Violinplot-Matlab: Violin Plots for Matlab. But I cannot find a way to create violin plot that is grouped by their categoery. The example figure is created in Seaborn-python. But I am not very familiar with python so I can only create the figure with default setting. It will be great if somebody can help me to create it in Matlab! :)
0 Kommentare
Antworten (3)
Abhinaya Kennedy
am 14 Jun. 2024
Bearbeitet: Abhinaya Kennedy
am 14 Jun. 2024
I found this on MATLAB File Exchange: https://www.mathworks.com/matlabcentral/fileexchange/45134-violin-plot. It does pretty much what your image depicts. Hope it helps.
0 Kommentare
Jeremy Z
am 30 Jul. 2024
I know this answer might be slightly late but I recently found a good alternative on MATLAB File Exchange: https://www.mathworks.com/matlabcentral/fileexchange/136524-daviolinplot-beautiful-violin-and-raincloud-plots . This can create grouped violin plot in a nice way.
0 Kommentare
Adam Danz
am 9 Okt. 2024
data = random(makedist('Weibull'),1000,8);
xgroup = categorical(["Post 1m", "Post 6m"]);
colorGroup = categorical(["med off rest","med off walk", ...
"med on rest", "med on walk"]);
xgroupData = repelem(xgroup,height(data),4);
cgroupData = repmat(colorGroup,height(data),2);
violinplot(xgroupData(:), data(:), GroupByColor=cgroupData(:))
legend(colorGroup)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Polar Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!