vscatter(vals,MARKER_SIZE)
% VSCATTER
% One dimensional vertical scatterplot which emphasizes distribution of
% values by presenting close-by values (difference less than MARKER_SIZE) in a row.
% Good for plotting all experimental values without markers overlapping
% each other.
% The y of each row is the average of values in that row. Some rows
% might be shifted up by a maximum of MARKER_SIZE to prevent overlap.
% For debugging, uncomment plot commands in source code.
%
% INPUT:
%
% vals - values to plot
% MARKER_SIZE - diameter of the marker representing each data point, given in the units of the y-axis.
% Deafult is range(vals)/50. It is recommended to first use the default parameter, plot the data,
% measure the size of the marker in y-axis units, and then re-run the function using appropriate value.
%
% OUTPUT:
%
% x - x values for plot function.
% y - y values for plot function
%
% USAGE:
%
% [x,y] = vscatter(vec)
% plot(x,y,'o')
% axis equal
%
Cite As
Oren Civier (2026). vscatter(vals,MARKER_SIZE) (https://www.mathworks.com/matlabcentral/fileexchange/58759-vscatter-vals-marker_size), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.6.0.0 | Changed default MARKER_SIZE value |
||
| 1.5.0.0 | Corrected description to explain how to set MARKER_SIZE |
||
| 1.4.0.0 | Bug fix |
||
| 1.3.0.0 | Fixed parameter names |
||
| 1.2.0.0 | Fixed usage |
||
| 1.1.0.0 | Added figure |
||
| 1.0.0.0 | Fixed usage |
