View source: R/interactive_plot.R
surface_plot | R Documentation |
An interactive plot lets you interrogate the plot to get
numerical values at each point. When type = "surface"
, the
plot can be rotated to see the "shape" of the function from
various perspectives. Using the interactive controls, you
can save the plot as a PNG file. But it's not possible to overlay
plots the way you can with contourPlot()
.
surface_plot(
formula,
domain = c(-5, 5),
npts = 50,
type = c("both", "surface", "contour", "heatmap")
)
interactive_plot(
formula,
domain = c(-5, 5),
npts = 50,
type = c("both", "surface", "contour", "heatmap")
)
surface_with_contours(formula, domain = c(-5, 5), npts = 50)
formula |
a formula describing a function in the manner
of |
domain |
a call to the |
npts |
The fineness at which to evaluate the function specified by the formula in the plot. Default: 50 |
type |
Plot type: |
## Not run:
interactive_plot(
sin(fred*ginger) ~ fred + ginger,
domain(fred=range(0,pi),
ginger = range(0, pi)),
type = "both")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.