mark_circle: Circle mark

Description Usage Arguments References Examples

View source: R/mark.r

Description

Circle and square marks are similar to point mark, except that (1) the shape value is always set to circle or square (2) they are filled by default.

Usage

1
2
mark_circle(vl, size = NULL, opacity = NULL, filled = NULL,
  color = NULL, fill = NULL, stroke = NULL)

Arguments

vl

a Vega-Lite object

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.

opacity

0.0-1.0

filled

whether the shape's color should be used as fill color instead of stroke color.

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
vegalite() %>%
  add_data("https://vega.github.io/vega-editor/app/data/cars.json") %>%
  encode_x("Horsepower", "quantitative") %>%
  encode_y("Miles_per_Gallon", "quantitative") %>%
  mark_circle()

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