mark_text: Text mark

Description Usage Arguments References Examples

View source: R/mark.r

Description

A text mark represents each data point with a text instead of a point.

Usage

1
mark_text(vl, opacity = NULL, color = NULL, fill = NULL, stroke = NULL)

Arguments

vl

a Vega-Lite object

opacity

0.0-1.0

color

color of the mark – either fill or stroke color based on the filled mark config.

fill

fill color. This config will be overridden by color channel’s specified or mapped values if filled is true.

stroke

stroke color. This config will be overridden by color channel’s specified or mapped values if filled is false.

References

Vega-Lite Mark spec

Examples

1
2
3
4
5
6
7
8
9
vegalite() %>%
  cell_size(300, 200) %>%
  add_data("https://vega.github.io/vega-editor/app/data/cars.json") %>%
  encode_x("Horsepower", "quantitative") %>%
  encode_y("Miles_per_Gallon", "quantitative") %>%
  encode_color("Origin", "nominal") %>%
  calculate("OriginInitial", "datum.Origin[0]") %>%
  encode_text("OriginInitial", "nominal") %>%
  mark_text()

vegalite documentation built on May 2, 2019, 10:46 a.m.