scale_type: Determine default scale type

Description Usage Arguments Value Examples

View source: R/scale-type.R

Description

You will need to define a method for this method if you want to extend ggplot2 to handle new types of data. If you simply want to pass the vector through as an additional aesthetic, return "identity".

Usage

1

Arguments

x

A vector

Value

A character vector of scale types. These will be tried in turn to find a default scale. For example, if scale_type returns c("foo", "bar") and the vector is used with the colour aesthetic, ggplot2 will first look for scale_colour_foo then scale_colour_bar.

Examples

1
2
3

czxa/ggplot2 documentation built on Oct. 8, 2018, 12:11 a.m.