grid_at: Draw a Character Grid Matrix

Description Usage Arguments Value See Also Examples

View source: R/8-Draw.R

Description

Constructs a grid with given dimension, character values, and step parameter, and prints it to screen

Usage

1
2
3
4
5
6
7
grid_at(
  yx = c(1, 1),
  dim = NULL,
  step = c(2, 2),
  text = c(".", ".", "+", "|", "|", "-", "-", rep("+", 8)),
  border = TRUE
)

Arguments

yx

(row,column) on screen or window where the upper-left corner of the grid is to be printed

dim

(row, column) vector for size of grid.

step

numeric vector describing grid step across (rows, columns)

text

character vector of values for the grid, in order: horizontal grid line, vertical grid line, grid intersection, left border, right border, top border, bottom border, corners (upper-left, upper-right, lower-left, lower-right), ticks (right, bottom, left, top)

border

logical value for whether a border should be included.

Value

NULL

See Also

Other drawing functions: box_at(), draw_arc(), draw_bezier(), draw_circle(), draw_ellipse(), draw_fn(), draw_lerp(), draw_path(), draw_ray(), draw_rect(), draw_shape(), fill_circle(), fill_ellipse(), fill_rect(), fill_shape(), grid_mat(), hline_at(), hline(), vline_at(), vline()

Examples

1
grid_at(yx=c(2,2), dim=c(11,13), step=c(2,4), border=TRUE)

cursr documentation built on Jan. 13, 2021, 7:35 a.m.