% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{wid_plot_lorenz}
\alias{wid_plot_lorenz}
\title{Lorenz curve}
\usage{
wid_plot_lorenz(data, variable = NULL, country = NULL, country_labels = NULL)
}
\arguments{
\item{data}{A \code{wid_df} with share (\code{"s"}) series.}

\item{variable}{Variable code to plot.}

\item{country}{Country codes to include.}

\item{country_labels}{Named character vector for renaming countries.}
}
\value{
A \code{ggplot} object.
}
\description{
Lorenz curve
}
\examples{
\donttest{
  d <- data.frame(
    country = rep("US", 3L), year = rep("2020", 3L),
    variable = "sptinc992j",
    percentile = c("p0p50", "p50p90", "p90p100"),
    value = c(0.20, 0.40, 0.40), age = "992", pop = "j",
    stringsAsFactors = FALSE
  )
  class(d) <- c("wid_df", "data.frame")
  wid_plot_lorenz(d)
}
}
