R: Stata linetype palette (discrete)

scale_linetype_stata {ggthemes} | R Documentation

## Stata linetype palette (discrete)

### Description

See `stata_linetype_pal` for details.

### Usage

    scale_linetype_stata(...)

### Arguments

`...` | common discrete scale parameters: `name`, `breaks`, `labels`, `na.value`, `limits` and `guide`. See `discrete_scale` for more details

### See Also

Other linetype stata: `stata_linetype_pal`

### Examples

    library("reshape2") # for melt
    library("plyr") # for ddply
    library("ggplot2")
    ecm <- melt(economics, id = "date")
    rescale01 <- function(x) {(x - min(x)) / diff(range(x))}
    ecm <- ddply(ecm, "variable", transform, value = rescale01(value))
    ggplot(ecm, aes(x = date, y = value, linetype=variable)) +
      geom_line() +
      scale_linetype_stata()

[Package ggthemes version 3.4.0 Index]