nos.contour {NostalgiR} | R Documentation |
nos.image text-based contour plot.
Description
Produces a text-based contour plot for the visualization of three-dimensional data that are stored in a matrix.
Usage
nos.contour(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 = 1:5)
Arguments
data |
A numeric matrix of data to be plotted. |
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 contours to be plotted. From left to right, the symbols represent an increasing order of contour values. |
Note
Due to rounding to a relatively crude grid results can only be approximate. The equally spaced axis ticks, for example, may be non-equally spaced in the plot. Further, due to the crude grid also there might be several points per character. The function uses the same plotting symbol no matter how many points coincide on one character position. The contour values are equally spaced quantiles between the 5% and 95% level, and are produced using the quantile
function. The legend reports the value associated with each contour.
Author(s)
Hien D. Nguyen
See Also
quantile
, contour
, contourLines
, volcano
, and txtplot
.
Examples
## Produce the contour plot of the volcano dataset, using the default plotting symbols.
library(datasets)
nos.contour(volcano)
## Produce the contour plot of the volcano dataset, using the plotting symbols letters[1:3].
library(datasets)
nos.contour(volcano,pch=letters[1:3])