No BSD License  

Highlights from
Plot a 'grouped' univariate histogram

4.0

4.0 | 2 ratings Rate this file 11 Downloads (last 30 days) File Size: 18.26 KB File ID: #14598
image thumbnail

Plot a 'grouped' univariate histogram

by Dimitri Shvorob

 

10 Apr 2007 (Updated 12 Jul 2007)

(Subsample histograms, stacked)

| Watch this File

File Information
Description

Function HISTG ('grouped histogram') adapts Matlab's HIST to cases where data vector includes values from several observed groups, and lets one color-code group membership on the overall histogram. Separate histograms are constructed for all x-groups (each identified by a distinct finite value of a class-assignment variable c), and vertically stacked. HISTG offers display options (x-percentile cut-offs, absolute axis limits, bin size, marker line) implemented in HISTF, linked to below. (Note: when range of x is limited with [pmin, pmax], no adjustment for truncation is made. The cut-offs are meant to exclude 'extreme', low-mass values).

Required Products Statistics Toolbox
MATLAB release MATLAB 7.2 (R2006a)
Other requirements HISTG invokes function PRCTILE of Statistics Toolbox, which can be replaced with a user-contributed function.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
30 May 2008 Adam A

Very useful. Would be nice if the group vector was allowed to be a cell, like gscatter etc.

13 May 2011 Hemingway  
13 May 2011 Hemingway

Would have liked the option to include a legend. But otherwise very good. Thanks.

Please login to add a comment or rating.
Updates
12 Jul 2007

cosmetic revision

Tag Activity for this File
Tag Applied By Date/Time
data exploration Dimitri Shvorob 22 Oct 2008 09:08:33
histogram Dimitri Shvorob 22 Oct 2008 09:08:33
grouped Dimitri Shvorob 22 Oct 2008 09:08:33
plot Dimitri Shvorob 22 Oct 2008 09:08:33
interaction Dimitri Shvorob 22 Oct 2008 09:08:33
data Dimitri Shvorob 22 Oct 2008 09:08:33
exploration Dimitri Shvorob 22 Oct 2008 09:08:33
graphical Dimitri Shvorob 22 Oct 2008 09:08:33
data yael shemla 13 Jun 2010 12:50:29

Contact us at files@mathworks.com