creates a polarhistogram
load citiesItaly
zone=[repelem("N",46) repelem("CS",57)]';
polarhistogramFS(citiesItaly,'DataVars',[2 5],'groupvars',zone);
load citiesItaly
zone=[repelem("N",46) repelem("CS",57)]';
polarhistogramFS(citiesItaly,'DataVars',1:4,'groupvars',zone,'nbins',10);
load citiesItaly
zone=[repelem("N",46) repelem("CS",57)]';
polarhistogramFS(citiesItaly,'DataVars',1:4,'groupvars',zone,'nbins',10,'FaceAlpha',0.01);
load citiesItaly
zone=[repelem("N",46) repelem("C",21) repelem("S",36)]';
polarhistogramFS(citiesItaly,'DataVars',1:4,'groupvars',zone,'nbins',10);
load citiesItaly
zone=[repelem("N",46) repelem("C",21) repelem("S",36)]';
polarhistogramFS(citiesItaly,'DataVars',1:4,'groupvars',zone,'nbins',10,'DisplayStyle','stairs');load citiesItaly % Example of nbins as a vector. % In this case nbins contains the edges polarhistogramFS(citiesItaly,'DataVars',1:2,'groupvars','','nbins',[1000:1000:5000 30000],'DisplayStyle','stairs','LineWidth',2);
load citiesItaly
zone=[repelem("N",46) repelem("CS",57)]';
C=citiesItaly;
C.zone=zone;
polarhistogramFS(C,'DataVars',2:5,'groupvars',"zone");Y — Input data.
2D array or table.n x p data matrix; n observations and p variables. Rows of Y represent observations, and columns represent variables.
Rows of TBL represent observations, and columns represent variables.
Data Types: single|double
Specify optional comma-separated pairs of Name,Value arguments.
Name is the argument name and Value
is the corresponding value. Name must appear
inside single quotes (' ').
You can specify several name and value pair arguments in any order as
Name1,Value1,...,NameN,ValueN.
'DataVars',[2 4]
, 'groupvars',2
, 'nbins',10
DataVars
—Table variables for which to compute polarhistograms.numeric vector | string array of cell array of character vectors.For examples if 'DataVars' is [3 5], polar histogram is done for variables 3 and 5. If 'DataVars' is ["Name1" "Name4"] variable with these names inside the input table are used
Example: 'DataVars',[2 4]
Data Types: character vector | string array | cell array of character vectors | vector of positive integers | logical vector
groupvars
—Grouping Variable.identifiers for the grouping variables in input array Y.If groupvars is [] then the output refers to the overall sample. It can be vector of length n or a string (char) or a number identifying a particular column in the input table Y.
Example: 'groupvars',2
Data Types: character vector | string array | cell array of character vectors | vector of positive integers | logical vector | []
nbins
—number of bins or bin edges.scalar | vector.If nbins is a scalar, then we assume that it is referred to the number of bins. Alternatively if nbins is a numeric vector of length>1, we assume that nbins(1) is the leading edge of the first bin, and nbins(end) is the trailing edge of the last bin elements. The elements of input vector y are binned into nbins equally spaced containers if nbins is a scalar or into length(nbins)-1 containers if nbins is not a scalar.
Remark: note that it is possible to pass all the options which are allowed inside polarhistogram. See the examples below for further details.
Example: 'nbins',10
Data Types: numeric vector
H —array of graphic objects.
Graphic object of size
length(groupvars)-by-length(DataVars)In position i,j it contains the handle for i-th level of groupvars for variable DataVars.
Tufte E.R. (1983), "The visual display of quantitative information", Graphics Press, Cheshire.