ggscatterplot: Make a scatterplot using ggplot2

Description Usage Arguments Value Author(s)

Description

This is a encapsulated function to make a scatterplot using the ggplot2 package. It allows the users to control the plot color, size, and other styles using arguments.

Usage

1
2
3
4
ggscatterplot(data, x, y, cols, rows, color, trendline = TRUE,
  trendline.color = "steelblue", trendline.size = 1,
  show.points = TRUE, point.size = 3, point.alpha = 1,
  point.color = "black", color.pal = NULL, show.legend = TRUE)

Arguments

data

A data.frame containing all the variables needed to draw the box plot.

x

A character string indicating the x axis variable.

y

A character string indicating the y axis variable.

cols

A character string indicating the variable defines faceting groups on columns.

rows

A character string indicating the variable defines faceting groups on rows.

color

A character string indicating the variable defines the color of lines or points.

trendline

Logic value whether to draw a linear trandline.

trendline.color

DESCRIPTION.

trendline.size

DESCRIPTION.

show.points

DESCRIPTION.

point.size

Numeric value defines the size of points.

point.alpha

Numeric value defines the transparency.

point.color

Character value defines the color of points when the argument 'color' is not specified.

color.pal

Character vector defines the color panel to use.

show.legend

Logic value defines whether to show legend.

Value

a ggplot object

Author(s)

Chenghao Zhu


zhuchcn/ggmetaplots documentation built on May 12, 2019, 10:53 a.m.