myGrid: myGrid draws grids

Description Usage Arguments Value Author(s) Examples

View source: R/myGrid.R

Description

Extension of R's core function grid(). This function plots a grid only within the box constraints specified by xlim and ylim. The grid will be drawn to the currently open graphics device.

Usage

1
2
myGrid(xlim, ylim, nx, ny = nx, lty = DASHED, lwd = 1,
  col = "black")

Arguments

xlim

Vector of type double - The bounds along the x axis for the grid.

ylim

Vector of type double - The bounds along the y axis for the grid.

nx

Integer - Number of vertical lines to be drawn.

ny

Integer - Number of horizontal lines to be drawn. Defaults to nx.

lty

Integer - Specifies the linetype similarly to R's core function grid().

lwd

Integer - Specifies the linewidth similarly to R's core function grid().

col

Character string - The color to be used for the grid lines.

Value

No return value.

Author(s)

P.v.W. Crommelin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
x = seq(from = 0,
             to = 3,
             by = 0.01)
plot(x = x,
     y = x,
     type = "l")
myGrid(xlim = c(1,2),
       ylim = c(0.5,2.5),
       nx = 10,
       ny = 15,
       lty = 2,
       lwd = 2,
       col = "blue")

PhilippVWC/myBayes documentation built on Oct. 2, 2020, 8:25 a.m.