surfacePlot | R Documentation |
Creates a surface plot to show three-dimensional data or a colored surface plot to show four-dimensional data.
surfacePlot(pre, z.color = "lightblue", Surface = list(name = "", lineColor = "black", levels = 20, ramp = "coolWarm"), xtitle = "", ytitle = "", ztitle = "", margin = c(NA, NA, NA, NA), caption = "")
pre |
the output from |
z.color |
the surface color. Can be either a character string indicating the
color of the surface, or a numeric matrix. If a matrix, then must have
|
Surface |
control parameters for the surface. See Details. |
xtitle |
the x-axis title (also called x-axis caption). |
ytitle |
the y-axis title (also called y-axis caption). |
ztitle |
the z-axis title (also called z-axis caption). |
margin |
set up the plot area margins. To allocate space for a graph title,
set the third value to 1.5, otherwise all values should be |
caption |
the figure caption. |
If z.color
is a numeric matrix, then the values represent the average
surface of the grid defined by x
and y
, that is it represents the
value one-half way between each value of x
and one-half way between each
value of y
, the mid point. If it has the same dimensions as z.surf
,
then the data are resampled by averaging each of the four corners to compute the
mid point value. The values of z.color
are assigned using the controls
in Surface
.
The Surface
argument must be a tagged list with these components:
the name of z.color
used in the explanation.
the color for each line on the surface. If "none," then lines are not drawn.
the levels of the surface colors. May be either a single numeric value that indicates the approximate number of levels, or a vector that indicates the exact breaks in the levels.
the name of the color ramp. May be "gray" or "grey" for a gray
scale or the prefix name of a function that creates a range of colors, see
coolWarm.colors
for examples.
Information about the graph.
A call must be made to setPage
or setPDF
to set up the
graphics environment before calling surfacePlot
.
setPage
, preSurface
,
persp
## Not run: # See for examples of surfacePlot: vignette(topic="GraphGallery", package="smwrGraphs") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.