Code covered by the BSD License  

Highlights from
Binned Scatter Plot

Be the first to rate this file! 5 Downloads (last 30 days) File Size: 3.71 KB File ID: #19506
image thumbnail

Binned Scatter Plot

by Stefan Schroedl

 

08 Apr 2008 (Updated 12 Jan 2010)

plot quantiles of y given quantiles of x.

| Watch this File

File Information
Description

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)

MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
12 Jan 2010

- 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

Tag Activity for this File
Tag Applied By Date/Time
specialized Stefan Schroedl 22 Oct 2008 09:56:55
plotting Stefan Schroedl 22 Oct 2008 09:56:55
scatter Stefan Schroedl 22 Oct 2008 09:56:55
bin Stefan Schroedl 22 Oct 2008 09:56:55
data exploration Stefan Schroedl 22 Oct 2008 09:56:55
histogram Stefan Schroedl 22 Oct 2008 09:56:55
density Stefan Schroedl 12 Jan 2010 13:53:36
visualization Stefan Schroedl 12 Jan 2010 14:24:43

Contact us at files@mathworks.com