add_plotly_trace: add genoppi trace

View source: R/add_plotly_trace.R

add_plotly_traceR Documentation

add genoppi trace

Description

adding a trace with new data to plotly is non-trivial. This function takes care of adding data correctly with the correct coloring.

Usage

add_plotly_trace(
  p,
  data,
  parameters,
  stroke_width = 0.2,
  legend = F,
  legend_group = NULL
)

Arguments

p

a plot_ly() object.

data

a data.frame with columns dataset, gene,

parameters

a list of parameters or an environement generated with environment().

stroke_width

numeric. the line width/stroke of a given point.

legend

Boolean. should legend be displayed?

legend_group

group legend into sublegends. Argument is directly passed to plotly::add_trace(legendgroup).

Note

global variable 'global_colors' must be specified using setNames().

See Also

Other plotly: add_plotly_layout_scatter(), add_plotly_layout_volcano(), add_plotly_line_unity(), add_plotly_threshold_lines(), plotly_tissue_enrichment()


lagelab/Genoppi documentation built on Oct. 13, 2022, 2:36 p.m.