create_scatterplot: Method for scatter plot creation

Description Usage Arguments Details Value

View source: R/function.R

Description

Method for scatter plot creation

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
create_scatterplot(
  data,
  data.labels = NULL,
  data.hovertext = NULL,
  transparency = 1,
  pointsize = 1,
  labelsize = 3,
  color = NULL,
  x_label = "",
  y_label = "",
  z_label = "",
  density = TRUE,
  line = TRUE,
  categorized = FALSE,
  highlight.data = NULL,
  highlight.labels = NULL,
  highlight.hovertext = NULL,
  highlight.color = "#FF0000",
  xlim = NULL,
  ylim = NULL,
  colorbar.limits = NULL,
  width = "auto",
  height = "auto",
  ppi = 72,
  plot.method = "static",
  scale = 1
)

Arguments

data

data.table containing plot data column 1: id column 2, 3(, 4): x, y(, z)

data.labels

Vector of labels used for data. Length has to be equal to nrow(data).

data.hovertext

Character vector with additional hovertext. Length has to be equal to nrow(data).

transparency

Set point transparency. See geom_point.

pointsize

Set point size. See geom_point.

labelsize

Set label size. See geom_text.

color

Vector of colors used for color palette.

x_label

Label x-Axis

y_label

Label Y-Axis

z_label

Label Z-Axis

density

Boolean value, perform 2d density estimate.

line

Boolean value, add reference line.

categorized

Z-Axis (if exists) as categories.

highlight.data

data.table containing data to highlight. Same structure as data.

highlight.labels

Vector of labels used for highlighted data. Length has to be equal to nrow(highlight.data).

highlight.hovertext

Character vector with additional hovertext. Length has to be equal to nrow(highlight.data).

highlight.color

String with hexadecimal color-code.

xlim

Numeric vector of two setting min and max limit of x-axis. See lims.

ylim

Numeric vector of two setting min and max limit of y-axis. See lims.

colorbar.limits

Vector with min, max values for colorbar (Default = NULL).

width

Set plot width in cm (Default = "auto").

height

Set plot height in cm (Default = "auto").

ppi

Pixel per inch (default = 72).

plot.method

Whether the plot should be 'interactive' or 'static' (Default = 'static').

scale

Modify plot size while preserving aspect ratio (Default = 1).

Details

Width/ height limit = 500. If exceeded default to 500 and issue exceed_size = TRUE.

Value

Returns list(plot = ggplotly/ ggplot, width, height, ppi, exceed_size).


loosolab/wilson documentation built on Nov. 16, 2021, 3:21 p.m.