add_fun: Apply function to plot, without modifying data

View source: R/add.R

add_funR Documentation

Apply function to plot, without modifying data

Description

Useful when you need two or more layers that apply a summary statistic to the original data.

Usage

add_fun(p, fun, ...)

Arguments

p

a plotly object.

fun

a function. Should take a plotly object as input and return a modified plotly object.

...

arguments passed to fun.


plotly documentation built on Oct. 22, 2023, 1:14 a.m.