mark_text {vegalite} | R Documentation |
Text mark
Description
A text mark represents each data point with a text instead of a point.
Usage
mark_text(vl, opacity = NULL, color = NULL, fill = NULL, stroke = NULL)
Arguments
vl |
a Vega-Lite object |
opacity |
|
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
Examples
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()
[Package vegalite version 0.6.1 Index]