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.


ggvis documentation built on May 29, 2024, 1:12 a.m.