Code covered by the BSD License  

Highlights from
histoutline

3.5

3.5 | 2 ratings Rate this file 10 Downloads (last 30 days) File Size: 1.28 KB File ID: #14702
image thumbnail

histoutline

by Matthew Foster

 

18 Apr 2007 (Updated 19 Apr 2007)

Plot a histogram outline

| Watch this File

File Information
Description

Plots the outline of a histogram, instead of the usual bar format.

h = histoutline(xx, num, varargin) Plot a histogram outline.

Example:
    data = randn(100,1);
    histoutline(data, 50);

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
19 Apr 2007 Jos x@y.z

This is a fair (but somewhat complicated programmed) wrapper for:
[n,x] = hist(data,num) ;
stairs(x,n,varargin{:})

btw your example specifies only one bin ...

Adding a H1 line and some more help (just "copy" from HIST!) will improve this submission.

19 Apr 2007 Matt Foster

Thanks. That's a much more efficient way of doing it. I've uploaded a new version with your suggestions included.

24 Feb 2008 rafi pl

Jos - rather this bellow will be better...
[n,x] = hist(tau_rms_gen) ;
stairs([x(1)-(x(2)-x(1))/2 x-(x(2)-x(1))/2 x(length(x))+(x(2)-x(1))/2],[0 n 0])

Please login to add a comment or rating.
Updates
19 Apr 2007

Update following suggestions in comments.

Tag Activity for this File
Tag Applied By Date/Time
specialized Matthew Foster 22 Oct 2008 09:09:47
plotting Matthew Foster 22 Oct 2008 09:09:47
histogram stairs outline Matthew Foster 22 Oct 2008 09:09:47

Contact us at files@mathworks.com