ggmatplot: Plot columns of a matrix

View source: R/ggplot.R

ggmatplotR Documentation

Plot columns of a matrix

Description

Creates plots of matrices like graphics::matplot() but uses ggplot2, defaults to drawing lines, and can specify a column to use for the x-axis.

Usage

ggmatplot(x, x_axis_column = NULL, n_colors = 6, unique_rows = TRUE)

Arguments

x

A matrix.

x_axis_column

Index (number) of the column to plot for the x-axis. Defaults to NULL in which case it uses row index (number) as the x-axis.

n_colors

Number of colors to cycle through. Defaults to 6.

unique_rows

Whether to work first take the unique rows of the matrix. Defaults to TRUE.

Value

a ggplot2 plot.


tjmahr/tjmisc documentation built on Feb. 8, 2023, 12:21 p.m.