surface_plot {mosaicCalc} | R Documentation |
Make an interactive plotly plot of a function of two variables
Description
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()
.
Usage
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)
Arguments
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: |
Examples
## Not run:
interactive_plot(
sin(fred*ginger) ~ fred + ginger,
domain(fred=range(0,pi),
ginger = range(0, pi)),
type = "both")
## End(Not run)
[Package mosaicCalc version 0.6.4 Index]