Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

addGrid

Add grid lines to an existing plot.


Description

This function adds horizontal and/or vertical grid lines to an existing plot. The grid lines are aligned with tick marks.

Usage

addGrid(linesPerTick = NULL, horiz = TRUE, vert = FALSE, col = "grey30", lty = 3)

Arguments

linesPerTick

Number of lines between successive tick marks (including the line on the tickmarks themselves)

horiz

Draw horizontal grid lines?

vert

Draw vertical tick lines?

col

Specifies color of the grid lines

lty

Specifies line type of grid lines. See par.

Details

If linesPerTick is not specified, it is set to 5 if number of tick s is 5 or less, and it is set to 2 if number of ticks is greater than 5.

Note

The function does not work whenever logarithmic scales are in use.

Author(s)

Peter Langfelder

Examples

plot(c(1:10), c(1:10))
  addGrid();

WGCNA

Weighted Correlation Network Analysis

v1.70-3
GPL (>= 2)
Authors
Peter Langfelder <Peter.Langfelder@gmail.com> and Steve Horvath <SHorvath@mednet.ucla.edu> with contributions by Chaochao Cai, Jun Dong, Jeremy Miller, Lin Song, Andy Yip, and Bin Zhang
Initial release
2021-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.