plot.lorenz: Plot a Lorenz curve

View source: R/gplot.R

plot.lorenzR Documentation

Plot a Lorenz curve

Description

plot.lorenz plots a (generalized) Lorenz curve.

Usage

## S3 method for class 'lorenz'
plot(
  x,
  add = FALSE,
  lor.type = "ord",
  diff = FALSE,
  xlab = FALSE,
  ylab = FALSE,
  ylim = FALSE,
  xlim = FALSE,
  type = "l",
  lty = FALSE,
  ...
)

Arguments

x

A Lorenz curve object.

add

A logical. If TRUE, the Lorenz curve is added to a plot.

lor.type

The type of Lorenz curve to be drawn. If "ord", the graph is an ordinary Lorenz curve L(p), if "gen", the graph is a generalized Lorenz curve \mu_x L(p).

diff

A logical. If TRUE, graph is of p - L(p) rather than L(p).

xlab

The x axis label. Defaults to "Population share".

ylab

The y axis label. Defaults to "Income share".

...

Additional graphics arguments to pass to the plot function.

Details

plot.lorenz_list plots a list of lorenz curve on the same graph and optionally places a legend using the names of the lorenz curves as labels.

An ordinary Lorenz curve is bounded in the unit box, is positive and increasing and lies everywhere below the 45 degree line. By default the function draws the 45 degree line and sets ylim and xlim to c(0,1).

If several generalized Lorenz curves are drawn, or ordinary Lorenx curves are drawn with diff = FALSE, care need to be taken that the ylim gets correectly set.

Value

A plot.

Author(s)

Markus Jantti markus.jantti@iki.fi

See Also

lorenz.

Examples


plot(lorenz(runif(100), q = 5))


mjantti/incdist documentation built on Aug. 23, 2023, 5:33 p.m.