scaleStrokeIdentity

fun scaleStrokeIdentity(name: String? = null, breaks: Any? = null, labels: Any? = null, lablim: Int? = null, limits: List<Any>? = null, naValue: Number? = null, format: String? = null, guide: Any? = "none"): Scale

Use this scale when your data has already been scaled. I.e. it already represents aesthetic values that can be handled directly. This will not produce a legend unless you also supply the breaks and labels.

Input data expected: positive Numeric values.

Parameters

name

The name of the scale - used as the axis label or the legend title. If null, the default, the name of the scale is taken from the first mapping used for that aesthetic.

breaks

A list of data values specifying the positions of ticks, or a dictionary which maps the tick labels to the breaks values.

labels

A list of labels on ticks, or a dictionary which maps the breaks values to the tick labels.

lablim

The maximum label length (in characters) before trimming is applied.

limits

Continuous scale: a numeric vector of length two providing limits of the scale. Discrete scale: a vector specifying the data range for the scale and the default order of their display in guides.

naValue

An aesthetic value which is used when data in not available.

format

Specifies the format pattern for labels on the scale.

guide

A result returned by guideLegend() function or "none" to hide the guide, default = "none".

Format patterns in the format parameter can be just a number format (like "d") or a string template where number format is surrounded by curly braces: "{d} cylinders". Note: the "$" must be escaped as "\$". For more info see: formats.html

Examples:

  • ".2f" -> "12.45"

  • "Score: {.2f}" -> "Score: 12.45"

  • "Score: {}" -> "Score: 12.454789"