plotly_tidy: Tidy up 'plotly' plot

Description Usage Arguments Details Value Author(s) See Also

Description

Functions plotly_tidy and plotly_tidy0 tidy* up plotly object, usually created using function ggplotly.
Function ggplotly_tidy0 converts ggplot object to a tity* plotly plot.
These are the convenience functions.
* - see section "Details"

Usage

1
2
3
4
5
6
7
plotly_tidy(obj, title = NULL)

plotly_tidy0(obj, title = NULL, ...)

ggplotly_tidy(obj_gg = ggplot2::last_plot(), title = NULL, ...)

ggplotly_tidy0(obj_gg = ggplot2::last_plot(), title = NULL, ...)

Arguments

obj

a plotly object (created with function plot_ly, ggplotly, subplot or similar).

title

(string | NULL) the title of the plot.

...

in plotly_tidy arguments to be passed to plotly_annotation_rm.
in ggplotly_tidy arguments to be passed to plotly_annotation_rm.

obj_gg

ggplot2 object.

Details

Function plotly_tidy is a wrapper of following functions with default parameters applied in sequence as follows:
label_expr2text,
plotly_modify_legend,
plotly_modify_hover

plotly_tidy0 additionaly applies plotly_annotation_rm(...) after the sequence described above.

ggplotly_tidy additionaly applies ggplotly(...) before the sequence described above but does not remove annotations.

Value

An updated plotly object (class plotly).

Author(s)

Vilmantas Gegzna

See Also

ggplotly(), layout(), plot_ly(), subplot(), ggplot().

Other spPlot functions for plotly: label_expr2text(), plotly_annotation_rm(), plotly_modify_hover(), plotly_modify_legend()


GegznaV/spPlot documentation built on April 29, 2020, 11:06 p.m.