histf

バージョン 1.0.0.0 (62.4 KB) 作成者: Chad Greene
Simply produce histograms formatted the way you like them.
ダウンロード: 4.9K
更新 2014/8/15

ライセンスの表示

This function plots formatted histograms. It's similar to hist, but with more options for FaceColor, BarWidth, LineStyle, FaceAlpha, etc.

Syntax
histf(Y)
histf(Y,x)
histf(Y,nbins)
histf(...,'BarWidth',BarWidth)
histf(...,'FaceColor',FaceColor)
histf(...,'EdgeColor',EdgeColor)
histf(...,'LineStyle',LineStyle)
histf(...,'LineWidth',LineWidth)
histf(...,'FaceAlpha',FaceAlpha)
histf(...,'EdgeAlpha',EdgeAlpha)
histf(...,'Alpha',Alpha)
[n,xout,h] = histf(...)

Description
histf(Y) bins the elements in vector Y into 10 equally spaced containers and returns the number of elements in each container as a row vector. If Y is an m-by-p matrix, histf treats the columns of Y as vectors. No elements of Y can be complex or of type integer.

histf(Y,x) where x is a vector, returns the distribution of Y among length(x) bins with centers specified by x. For example, if x is a 5-element vector, histf distributes the elements of Y into five bins centered on the x-axis at the elements in x, none of which can be complex.

histf(Y,nbins) where nbins is a scalar, uses nbins number of bins.

histf(...,'BarWidth',BarWidth) specifies the width of bars as a fraction of total space available for each bar. Default BarWidth is 1.

histf(...,'FaceColor',FaceColor) specifies face color as a short name, long name, or RGB triple.

histf(...,'EdgeColor',EdgeColor) specifies edge coloras a short name, long name, or RGB triple.

histf(...,'LineStyle',LineStyle) specifies line style of bar edges. Can be '-' (default), ':', '--', '-.', or 'none'.

histf(...,'LineWidth',LineWidth) specifies line width of bar edge in points. Default LineWidth is 0.5 points.

histf(...,'FaceAlpha',FaceAlpha) specifies transparency value of bar faces. FaceAlpha must be a scalar between 0 and 1. Default value is 1.

histf(...,'EdgeAlpha',EdgeAlpha) specifies transparency value of bar edges. EdgeAlpha must be a scalar between 0 and 1. Default value is 1.

histf(...,'Alpha',Alpha) sets FaceAlpha and EdgeAlpha to Alpha.

[n,xout,h] = histf(...) returns vectors n and xout containing the frequency counts and the bin locations. h is the handle of the newly plotted histogram.

引用

Chad Greene (2026). histf (https://jp.mathworks.com/matlabcentral/fileexchange/47552-histf), MATLAB Central File Exchange. 取得日: .

MATLAB リリースの互換性
作成: R2012b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersData Distribution Plots についてさらに検索
謝辞

ヒントを得たファイル: legalpha

histf_documentation/html/

バージョン 公開済み リリース ノート
1.0.0.0