Description Usage Arguments Author(s) See Also Examples
This function is a wrapper around image
and contour. See vignette('plotfunctions')
for an example of how you could use image and
contour.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
x |
Locations of grid lines at which the values in z are measured. These must be in ascending order. By default, equally spaced values from 0 to 1 are used. If x is a list, its components x$x and x$y are used for x and y, respectively. If the list has component z this is used for z. |
y |
Locations of grid lines at which the values in z are measured. |
z |
a matrix containing the values to be plotted (NAs are allowed). Note that x can be used instead of z for convenience. |
main |
Text string, an overall title for the plot. |
xlab |
Label for x axis. Default is name of first |
ylab |
Label for y axis. Default is name of second |
xlim |
x-limits for the plot. |
ylim |
y-limits for the plot. |
zlim |
z-limits for the plot. |
col |
Color for the contour lines and labels. |
color |
a list of colors such as that generated by
|
nCol |
The number of colors to use in color schemes. |
add.color.legend |
Logical: whether or not to add a color legend.
Default is TRUE. If FALSE (omitted), one could use the function
|
... |
Optional parameters for |
Jacolien van Rij
image, contour,
filled.contour. See plotsurface
for plotting model predictions using color_contour.
Other Functions for plotting:
addInterval(),
add_bars(),
add_n_points(),
alphaPalette(),
alpha(),
check_normaldist(),
dotplot_error(),
drawDevArrows(),
emptyPlot(),
errorBars(),
fill_area(),
getCoords(),
getFigCoords(),
getProps(),
gradientLegend(),
legend_margin(),
marginDensityPlot(),
plot_error(),
plot_image(),
plotsurface(),
sortBoxplot()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Volcano example of R (package datasets)
color_contour(z=volcano)
# change color and lines:
color_contour(z=volcano, color='terrain', col=alpha(1), lwd=2, lty=5)
# change x-axis values and zlim:
color_contour(x=seq(500,700, length=nrow(volcano)),
z=volcano, color='terrain', col=alpha(1), lwd=2, zlim=c(0,200))
# compare with similar functions:
filled.contour(volcano, color.palette=terrain.colors)
# without contour lines:
color_contour(z=volcano, color='terrain', lwd=0, drawlabels=FALSE)
# without background:
color_contour(z=volcano, color=NULL, add.color.legend=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.