ggvis (version 0.4.4)

add_props: Add visual properties to a visualisation

Description

Add visual properties to a visualisation

Usage

add_props(vis, ..., .props = NULL, inherit = NULL,
  env = parent.frame())

Arguments

vis

Visualisation to modify.

...

A set of name-value pairs. The name should be a valid vega property.

The first two unnamed components are taken to be x and y. Any additional unnamed components will raise an error.

.props

When calling props from other functions, you'll often have a list of quoted function functions. You can pass that function to the .props argument instead of messing around with substitute. In other words, .props lets you opt out of the non-standard evaluation that props does.

inherit

If TRUE, the defaults, will inherit from properties from the parent layer If FALSE, it will start from nothing.

env

The environment in which to evaluate variable properties.

Examples

Run this code
# NOT RUN {
mtcars %>% ggvis(~wt, ~mpg) %>% layer_points()
mtcars %>% ggvis() %>% add_props(~wt, ~mpg) %>% layer_points()
mtcars %>% ggvis(~wt) %>% add_props(y = ~mpg) %>% layer_points()
# }

Run the code above in your browser using DataCamp Workspace