plotFreq

Purpose

Generate frequency plot of categorical data.

Format

plotFreq([myPlot, ]x, column)
Parameters:
  • myPlot (struct) – Optional argument, a plotControl structure.
  • x (NxK matrix) – data.
  • column (scalar or string) – Categorical variable to be plotted.

Examples

// Load data
fname = getGAUSSHome $+ "examples/auto2.dta";
auto2 = loadd(fname);

// Frequency plot
plotFreq(auto2, "rep78");

See also

Functions plotHist(), plotHistP(), plotHistF()