R: Vega marks.

marks {ggvis} | R Documentation

## Vega marks.

### Description

These functions create mark objects, corresponding to vega marks. Marks are leaves in the plot tree, and control the details of the final rendering. Marks are equivalent to the basic geoms in ggplot2 (e.g. point, line, polygon), where ggvis layers correspond to combinations of geoms and statistical transforms.

### Usage

    emit_points(vis, props)

    layer_points(vis, ..., data = NULL)

    emit_images(vis, props)

    layer_images(vis, ..., data = NULL)

    emit_arcs(vis, props)

    layer_arcs(vis, ..., data = NULL)

    emit_ribbons(vis, props)

    layer_ribbons(vis, ..., data = NULL)

    emit_paths(vis, props)

    layer_paths(vis, ..., data = NULL)

    emit_rects(vis, props)

    layer_rects(vis, ..., data = NULL)

    emit_text(vis, props)

    layer_text(vis, ..., data = NULL)

### Arguments

`vis` | Visualisation to modify
`props, ...` | A `props` object, named according to the properties listed below.
`data` | An optional dataset, if you want to override the usual data inheritance for this mark.

### Details

Note that by supplying a fill property to `mark_path` will produce a filled property. `mark_point` is an alias to `mark_symbol`.

### Properties

You can set the following mark properties:

- x The first (typically left-most) x-coordinate.

- x2 The second (typically right-most) x-coordinate.

- width The width of the mark (if supported).

- y The first (typically top-most) y-coordinate.

- y2 The second (typically bottom-most) y-coordinate.

- height The height of the mark (if supported).

- opacity The overall opacity.

- fill The fill color.

- fillOpacity The fill opacity

- stroke The stroke color.

- strokeWidth The stroke width, in pixels.

- strokeOpacity The stroke opacity.

- size [symbol] The pixel area of the symbol. For example in the case of circles, the radius is determined in part by the square root of the size value.

- shape [symbol] The symbol shape to use. One of circle (default), square, cross, diamond, triangle-up, or triangle-down (symbol only)

- innerRadius [arc] The inner radius of the arc, in pixels.

- outerRadius [arc] The outer radius of the arc, in pixels.

- startAngle [arc] The start angle of the arc, in radians.

- endAngle [arc] The end angle of the arc, in radians.

- interpolate [area, line] The line interpolation method to use. One of linear, step-before, step-after, basis, basis-open, cardinal, cardinal-open, monotone.

- tension [area, line] Depending on the interpolation type, sets the tension parameter.

- url [image] The URL from which to retrieve the image.

- align [image, text] The horizontal alignment of the object. One of left, right, center.

- baseline [image, text] The vertical alignment of the object. One of top, middle, bottom.

- text [text] The text to display.

- dx [text] The horizontal margin, in pixels, between the text label and its anchor point. The value is ignored if the align property is center.

- dy [text] The vertical margin, in pixels, between the text label and its anchor point. The value is ignored if the baseline property is middle.

- angle [text] The rotation angle of the text, in degrees.

- font [text] The typeface to set the text in (e.g., Helvetica Neue).

- fontSize [text] The font size, in pixels.

- fontWeight [text] The font weight (e.g., bold).

- fontStyle [text] The font style (e.g., italic).

To each property, you can assign any property object (`prop`) either locally (i.e. in the mark), or in a parent `layer`.

[Package ggvis version 0.4.3 Index]