%% plot_box_scatter(data, groupIdx, pos, color, symbol, opt)
% Plot boxplot and scatter overlaid figure
% INPUT:
% - data, <vector>, M * 1, M number of total points.
% - groupIdx, <vector>, M * 1, mark different groups of data
% OPTIONAL INPUTS:
% - pos, <vector>, position of each boxplot
% Default: 1 : N, N number of groups
% - color, <cellarray>, cell, N * 1, scatter color of each group
% Default: random
% - symbol, <cellarray>, cell, N * 1, scatter symbol of each group
% Default: random
% - opt, <scalar>, scatter along center of box (0) or fullfill box (1)
% Default: 1
% OUTPUT:
% - ax, current axis
% Example:
% A = rand(100,1); B = rand(20,1); C = rand(60,1); % data
% data = [A;B;C]
% groupIdx = [ones(size(A)); 2* ones(size(B)); 3* ones(size(C))];
% plot_box_scatter(data, groupIdx)
%
% Hui Wang
% wang.hui@wustl.edu
% 2019/09/11
Citation pour cette source
Hui WANG (2024). plot_box_scatter (https://www.mathworks.com/matlabcentral/fileexchange/72722-plot_box_scatter), MATLAB Central File Exchange. Récupéré le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
- MATLAB > Graphics > Formatting and Annotation > Labels and Annotations > Annotations >
- Sciences > Mathematics > Probability & Statistics > Box Plots >
- Sciences > Mathematics > Probability & Statistics > Scatter Plots >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Version | Publié le | Notes de version | |
---|---|---|---|
2.0.1 | update output |
||
2.0.0 | Update colors |
||
1.0.0 |