Plots of continuously-spaced scalar fields, of three variables.
#x-y-fv version
#(main argument is a list of matrices)
plot_cfield_3d (x, y, z, fv, fb, …,
contours=TRUE, heatmap=TRUE,
main, xlab="x", ylab="y",
axes=TRUE, reverse.z=FALSE,
ncontours=6, emph="n", color.function, color.fit)#functional version
#(which calls the x-y-fv version, above)
plotf_cfield_3d (f, xlim, ylim=xlim, zlim=xlim, …, nslides=6, n=30, z)
Optional sorted numeric vectors of x and y coordinates, refer to details.
Optional numeric vector of two or more z coordinates, refer to details.
A list of two or more numeric matrices (representing a continuously-spaced scalar fields), one for each z value.
Optional numeric vector of function values (or "levels"), for contours.
Logical, include contour lines.
Logical, include heatmap.
Strings, main/axes titles.
Logical vector of length one or two, plot reference arrows.
Logical, if true reverse the z axis.
Integer, the number of contour lines. Ignored if fb supplied.
What to emphasize, either "n" (for nothing), "b" for both (low and high regions), "l" for low regions or "h" for high regions, or "B", "L" or "H" for the same but with a stronger effect.
Optional color function, such as a litmus object, refer to details.
Optional color fitting function, such as a litmus.fit wrapper, refer to details.
A numeric-valued function of three variables (x, y, and z), suitable for use with base::outer, called with four arguments, x, y, f, and z [i].
Length-2 numeric vectors, the x and y ranges. Currently, these need to be ascending.
Length-2 numeric vector, the z (vertical) range, ignored is z supplied.
Integer, giving the number of slides, ignored if z supplied.
An integer vector of length one or two, giving the number of grid points.
In the x-y-fv version, ignored.
These functions are similar to plot_cfield, plot_contour_3d, plot_surface and plotf_contour_3d. (So, please refer to those functions for background information).
These functions produce 3d-based combined contour-heat plots.
Plots contain a set of of two or more 2d slides (or slices), which can be used to plot functions of three variables, x, y and z.
In plot_cfield_3d, fv is a list of matrices, rather than a single matrix.
Each matrix represents one slide.
In general, six or seven slides produces a good result. More slides may be used, but with care.
x and y (the first two variables) have the same interpretation as they do in plot_surface. z (the third variable) gives the vertical position of the slides.
Note that: (1) In plot_cfield_3d the only argument that is required is fv. (2) In some cases, the plotting device/window should be opened before calling these functions, and the plot should be higher than it is wide. (3) There's no guarantee that default contour lines will be suitable. (4) Unlike other heatmaps in this package, these functions may use semitransparent colors.
Expanding on point (4), some PDF viewers may produce visual artifacts, such as grid lines.
In general, these artifacts are minimal.
If you want to remove them, possible options are to change your PDF viewer's settings or save the plot in a raster format, such as PNG.
Refer to the vignette for an overview, references and better examples.
Plots of scalar fields over two variables: plot_dfield, plot_cfield
Other plots of scalar fields over three variables: plot_contour_3d
Other functions: litmus, litmus.fit
# NOT RUN {
plotf_cfield_3d (bispherical.dist, c (-3, 3),, c (-2, 2), emph="l")
# }
Run the code above in your browser using DataLab