plot_scatter: Scatter plot with plotly

View source: R/plot_scatter.R

plot_scatterR Documentation

Scatter plot with plotly

Description

Scatter plot with plotly

Usage

plot_scatter(
  data,
  x,
  y,
  group = NULL,
  text = NULL,
  hoverinfo = "x+y+text",
  linear = TRUE,
  colors = "Set1",
  one2one_line = FALSE,
  eq_x = 0.6,
  eq_y = 1,
  ...
)

Arguments

data

Data frame.

x

Name of x variable.

y

Name of y variable.

group

Optional name for grouping variable.

text

Optional name for text variable. This will show in the hover text box.

hoverinfo

If text variable is specified, use "x+y+text" to show text. For more info, check plotly::schema()

linear

Whether a linear best fit line is drawn.

colors

RColorBrewer palette name.

one2one_line

Should the 1:1 line be drawn.

eq_x

A number between 0 to 1 to specify the location of equation relative to the x axis.

eq_y

A number between 0 to 1 to specify the location of equation relative to the y axis.

...

Other arguments passed to plotly::plot_ly()

Value

A plotly object.


MohoWu/ricardor documentation built on March 24, 2022, 4:39 p.m.