add_relative_scales: Add x_rel and y_rel scales

View source: R/scales.R

add_relative_scalesR Documentation

Add x_rel and y_rel scales

Description

This function adds scales named x_rel and y_rel, each of which has a domain of 0 to 1, and the range is the plot's width or height. These scales are useful for positioning visual elements relative to the plotting area. For example, with legends.

Usage

add_relative_scales(vis)

Arguments

vis

A ggvis object.

See Also

add_legend for a usage example.


rstudio/ggvis documentation built on Feb. 5, 2024, 9:13 p.m.