Learn R Programming

NostalgiR (version 1.0.2)

nos.image: nos.image text-based image plot.

Description

Produces a text-based image plot for the visualization of three-dimensional data that are stored in a matrix.

Usage

nos.image(data, xmin = 1, xmax = dim(data)[1], ymin = 1, ymax = dim(data)[2], xlab = NULL, ylab = NULL, ratio = 0.35, width = round(options()$width * 0.8), height = round(ratio * width), pch = c(".", "o", "x", "X", "#"))

Arguments

data
A numeric matrix of data to be plotted. NA and NaN are allowed, but are removed for the plot. Infinities will cause an error.
xmin
A numeric value indicating the smallest x-axis value, which corresponds to the first row of data.
xmax
A numeric value indicating the greatest x-axis value, which corresponds to the last row of data.
ymin
A numeric value indicating the smallest y-axis value, which corresponds to the first column of data.
ymax
A numeric value indicating the greatest y-axis value, which corresponds to the last column of data.
xlab
Label of the x-axis of the plot.
ylab
Label of the y-axis of the plot.
ratio
Coefficient that controls the aspect ratio of the plot.
width
Width of the plot in points.
height
Height of the plot in points.
pch
A vector of single-character symbols. The length of the vector determines the number of bins that the data is partitioned into. From left to right, the symbols represent an increasing order of binned.

See Also

hist, image, volcano, and txtplot.

Examples

Run this code
## Produce the image plot of the volcano dataset, using the default plotting symbols.
library(datasets)
nos.image(volcano)

## Produce the image plot of the volcano dataset, using the plotting symbols 1:9.
library(datasets)
nos.image(volcano,pch=1:9)

Run the code above in your browser using DataLab