Description Usage Arguments Note Author(s) See Also Examples
Produces a text-based contour plot for the visualization of three-dimensional data that are stored in a matrix.
1 2 3 4 |
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. |
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.
Hien D. Nguyen
quantile
, contour
, contourLines
, volcano
, and txtplot
.
1 2 3 4 5 6 7 | ## 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])
|
Loading required package: txtplot
+-+------------+-----------+------------+------------+------+
60 + 22 2222 11 +
| 22222222333333333 222222222 1 |
| 22 33333 4444 3333 222 1 |
50 + 2 333444444 44444333 2222 1 +
| 22 333 444 5555555 4 333333 222222 11 |
| 22 33 444 555 5555 4 33333333222 1111111 |
40 + 2 3 44 55 55 5 444 33 22 111 +
| 3 4 55 55 444444 3 222 |
| 233 44 5 5 4444 3 222 |
30 + 2 3 44 55 55 55 44 33 222 +
| 22 3 4 5 555 555 44444 3 222 |
| 2233 4 55 555 555 444 3 222 |
20 + 223344 555555555 4 32 +
| 2233444 444444444444444444 44 3 2 |
| 2233 44444 4444 4444 3 22 |
10 + 22 33 44444 33333333 3 3322 +
| 22 3 333 33333 33333333 2 |
| 22 33 333 222 2 |
0 + 22 3333333 2222 22 2 +
+-+------------+-----------+------------+------------+------+
0 20 40 60 80
Legend: 1 ~ 97; 2 ~ 110; 3 ~ 124; 4 ~ 147; 5 ~ 179
+------------+-------------+------------+------------+------+
60 + a +
| bbbbbbbbb a |
| bbbbb bbbb aa |
50 + bbb bb a +
| bbb ccccccc bbbbbb aa |
| bbb ccc ccccc bbbbbbbb aaaaaaa |
40 + bb ccc cc c b aaa +
| b cc c b |
| b c c bb |
30 + bb c c cc bbb +
| b cc ccc cccc bb |
| b cc ccc ccc bb |
20 + b cccccccc bb +
| bb b |
| bbb b |
10 + bb bbbbbbbbb bb bbb +
| bb bbb bbbbb bbbbbbbbb |
| bb bbb |
0 + bbbbbbb +
+------------+-------------+------------+------------+------+
0 20 40 60 80
Legend: a ~ 97; b ~ 124; c ~ 179
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.