Description Usage Arguments Details
Plot only the legend from a contour plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | filled_legend(
x = seq(0, 1, length.out = nrow(z)),
y = seq(0, 1, length.out = ncol(z)),
z,
xlim = range(x, finite = TRUE),
ylim = range(y, finite = TRUE),
zlim = range(z, finite = TRUE),
levels = pretty(zlim, nlevels),
nlevels = 20,
color.palette = cm.colors,
col = color.palette(length(levels) - 1),
plot.title,
plot.axes,
key.title,
key.axes,
asp = NA,
xaxs = "i",
yaxs = "i",
las = 1,
axes = TRUE,
frame.plot = axes,
...
)
|
x |
locations of grid lines at which the values in |
y |
numeric same as |
z |
a numeric matrix containing the values to be plotted.. Note that
|
xlim |
x limits for the plot. |
ylim |
y limits for the plot. |
zlim |
z limits for the plot. |
levels |
a set of levels which are used to partition the range
of |
nlevels |
if |
color.palette |
a color palette function to be used to assign colors in the plot. |
col |
an explicit set of colors to be used in the plot. This argument overrides any palette function specification. There should be one less color than levels |
plot.title |
statements which add titles to the main plot. |
plot.axes |
statements which draw axes (and a |
key.title |
statements which add titles for the plot key. |
key.axes |
statements which draw axes on the plot key. This overrides the default axis. |
asp |
the y/x aspect ratio, see |
xaxs |
the x axis style. The default is to use internal labeling. |
yaxs |
the y axis style. The default is to use internal labeling. |
las |
the style of labeling to be used. The default is to use horizontal labeling. |
axes |
logicals indicating if axes and a box should be
drawn, as in |
frame.plot |
logical for frame |
... |
additional graphical parameters, currently only passed to
|
This function was taken from the filled.legend script at http://wiki.cbr.washington.edu/qerm/index.php/R/Contour_Plots. The following was taken directly from original script:
Modification of filled.contour by Carey McGilliard and Bridget Ferris designed to just plot the legend.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.