Scatter distribution figure

Function to create a scatter plot showing the individual data points and the distributions on the X and Y-axis.
122 Downloads
Aktualisiert 29 Apr 2022

Lizenz anzeigen

Function to create a scatter plot showing the individual data points and the distributions on the X and Y-axis.
Choose between a kernel (default) or gaussian distribution. The figure contains three subplots: Fig.scat, Fig.distx, and Fig.disty.
Options such as personalized colors, marker size, trendline, etc. are included.
% Example code with random data
datax = [randn(1,50) randn(1,50)+3 1.5*(randn(1,50)+1.5)];
datay = [0.5*datax(1:50)+2+0.4*randn(1,50) 0.7*datax(51:100)+1.8+1*randn(1,50) 0.4*datax(101:150)+2.4+0.6*randn(1,50)];
cats = [cellstr(repmat('Group A',50,1)); cellstr(repmat('Group B',50,1)); cellstr(repmat('Group C',50,1))];
figure
Fig = scatter_distribution_figure(datax, datay, cats, 'YLabel', 'Y label','XLabel','X label');
set(Fig.scat,'FontSize',23,'linewidth',2,'box','on')

Zitieren als

Eline Zwijgers (2024). Scatter distribution figure (https://www.mathworks.com/matlabcentral/fileexchange/110850-scatter-distribution-figure), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2019b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0