mark_tick {vegalite} | R Documentation |
Tick mark
Description
A tick mark represents each data point as a short line. This is a useful mark for displaying the distribution of values in a field.
Usage
mark_tick(vl, orient = NULL, size = NULL, thickness = 1, opacity = NULL,
color = NULL, fill = NULL, stroke = NULL)
Arguments
vl |
Vega-Lite object |
orient |
the orientation of a non-stacked bar, area, and line charts. The value is either "horizontal", or "vertical" (default). For bar and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. For area, this property determines the orient property of the Vega output. For line, this property determines the path order of the points in the line if path channel is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored. |
size |
The pixel area each the point. For example: in the case of circles, the radius is determined in part by the square root of the size value. |
thickness |
Thickness of the tick mark. Default value: 1 |
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() %>%
add_data("https://vega.github.io/vega-editor/app/data/cars.json") %>%
encode_x("Horsepower", "quantitative") %>%
encode_y("Cylinders", "ordinal") %>%
mark_tick()