Scatter distribution figure

Function to create a scatter plot showing the individual data points and the distributions on the X and Y-axis.
122 téléchargements
Mise à jour 29 avr. 2022

Afficher la licence

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')

Citation pour cette source

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

Compatibilité avec les versions de MATLAB
Créé avec R2019b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0