binscatter
Binned scatter plot
Syntax
Description
Vector Data
binscatter(
displays a binned scatter plot for vectors x,y)x and
y. A binned scatter plot partitions the data space into
rectangular bins and displays the count of data points in each bin using
different colors. When zooming into the plot, the bin sizes automatically adjust
to show finer resolution.
Table Data
Additional Options
binscatter(___,
specifies property values with one or more name-value pair arguments. For
example, you can specify Name,Value)'ShowEmptyBins' as
'on' to color areas with no data points. For a full list
of properties, see Binscatter Properties. Use this option with any of the input argument
combinations in previous syntaxes.
binscatter( plots
into the axes specified by ax,___)ax instead of into the current
axes (gca). The ax input can precede any
of the input argument combinations in previous syntaxes.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Tips
Change the
ColorScaleproperty of the axes to'log'to produce better bin coloring when a few bins dominate the plot.ax = gca; ax.ColorScale = 'log';
Extended Capabilities
Version History
Introduced in R2017bSee Also
histogram | histogram2 | histcounts2 | histcounts | scatter









