File Exchange

image thumbnail

Binned Scatter Plot

version 1.1 (3.71 KB) by

plot quantiles of y given quantiles of x.

4 Downloads

Updated

View License

With the default settings, BINNED_PLOT(X,Y) splits vector X into bins of approximately equal size, and plots each median against the median of the corresponding Y-values, as well as their inter-quartile range. X and Y must have the same number of rows or columns.

This is useful to visualize two-dimensional distributions.

Options include e.g.: plotting different quantiles; means/variances instead of quantiles; varying the number of bins; and density-dependent coloring.

Example:
x=0:0.1:20;
y=[sin(x); cos(x)] +randn(2,201);
binned_plot(x,y)

Comments and Ratings (3)

David Diwik

Figured it out. Take what I said back

fateh

fateh (view profile)

how could i run this code...

MiauMiau

Updates

1.1

- Bug fixes: rare cases of empty bins; show minimum and maximum x-value
- New options: density-based transparency; mean/std instead of quantiles (useful for quantized data)
- Optional arguments specified as attribute/value pairs

MATLAB Release
MATLAB 7.4 (R2007a)
Acknowledgements

Inspired: clickfit_OH for curve fitting by eye/hand

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video