tile.plot: Lightweight tile plot function

tile.plotR Documentation

Lightweight tile plot function

Description

This function has no dependencies outside of base R, but provides a reasonable approximation to the functionality of ggplot2::geom_raster.

Usage

tile.plot(
  tile_df,
  col = NULL,
  ncols = NULL,
  main = "",
  zlim = NULL,
  na.color = "grey80"
)

Arguments

tile_df

A matrix or a data frame with three columns: Var1, Var2, and value describing locations within a matrix. See melt_array for an example.

col

A color palette

ncols

The number of colors for a color palette, if col is not provided.

main

Plot title (character)

zlim

a vector with the minimum and maximum limits for the plotted values.

na.color

The color that should be used to represent NA values in the tile plot

Value

A tile plot done in base R graphics

Examples

x <- matrix(rnorm(50*50),50,50)
x_df <- melt_array(x)
tile.plot(x_df)

danieladamspencer/bayestensorreg documentation built on July 23, 2024, 10:14 a.m.