Description Usage Arguments Details References See Also Examples
These functions wrap the main plotting functions.
They take a suitable function object, along with xlim/ylim/etc, and compute the x/y/fv/etc values.
Refer to Main Plotting Functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | plotf_dfield (f, xlim, ylim=xlim, ...)
plotf_bar (f, xlim, ylim=xlim, zlim, ...)
plotf_cfield (f, xlim, ylim=xlim, ..., n=30, nc = max (n, 60), nh=n)
plotf_surface (f, xlim, ylim=xlim, zlim, ..., n=30)
plotf_tricontour (f, ..., n=30)
plotf_trisurface (f, ..., n=30)
plotf_isosurface (f, xlim, ylim=xlim, zlim=xlim, ...,
nsurfaces=2, fb, fq,
nested=TRUE, maximal, panel.contours=TRUE,
base.contours=panel.contours, rear.contours=panel.contours,
pconstants,
n)
plotf_cfield3 (f, xlim, ylim=xlim, zlim=xlim, ...,
nslides=6, z.reverse=FALSE, z, n=30)
plotf_vec (vf, xlim, ylim=xlim, ..., n=20, nv=n, nh = max (n, 40) )
plotf_vec3 (vf, xlim, ylim=xlim, zlim=xlim, ..., n = c (20, 22, 16) )
|
f |
In plotf_dfield, plotf_bar, plotf_cfield and plotf_surface, a numeric-valued function of two variables. |
vf |
In plotf_vec, a function of two variables that returns a two-column matrix, giving the dx and dy values. |
xlim, ylim, zlim |
In plotf_dfield and plotf_bar, a length-two integer vector, giving the plotting ranges. |
nsurfaces, fb, fq |
The number of isosurfaces, and function values (or “levels”), for isosurfaces. |
nested, maximal |
nested |
panel.contours, base.contours, rear.contours |
Logical, include contour lines on the base or rear panels of the plot. |
pconstants |
Optional length-3 numeric vector of panel constants. |
nslides |
Integer, the number of slides. |
z.reverse |
Logical, reverse the z axis. |
z |
Optional numeric vector, of z coordinates. |
n |
In most plots, an integer of length one or two, giving the number of bin/grid points, in each x/y direction.
In plotf_isosurface and plotf_vec3d, an integer of length one or three, giving the number of grid points, in each x/y/z direction. |
nc, nv, nh |
Same as n, but computes separate input matrices, for contour lines (nc), vector arrows (nv) and heatmaps (nh). |
... |
Additional arguments for the main plotting functions. |
These functions wrap the main plotting functions.
i.e. plotf_isosurface calls plot_isosurface.
They take a suitable function object, along with xlim/ylim/etc, and compute the x/y/fv/etc values.
i.e. plotf_surface takes a numeric-valued function of two variables, a computes the x and y vectors, along with the fv matrix.
If you need to plot different functions to those described by the f argument above, it may be possible to create a wrapper function.
ISOSURFACE PLOTS
(plotf_isosurface)
THIS FUNCTION REQUIRES THE misc3d PACKAGE TO BE INSTALLED AND LOADED
(There's no requirement for the package to be attached).
If the nested argument is true, different n sizes are used for each isosurface.
The resolution of the fv array is highest for the first isosurface, and each fv array has a progressively lower resolution.
Resulting plots should result in smaller file sizes, and render more quickly.
Optionally, 2D contour lines may be added to the base panel and rear panels.
This needs a vector of panel constants, which defaults to the xlim/ylim/zlim midpoints.
The function (of three variables), f, is called three times, holding one variable constant, each time.
The third constant is for the base panel contours.
And the first and second constants, are for the right-rear and left-rear panel contours, respectively.
Refer to the vignette for an overview, references and better examples.
Main Plotting Functions
Global Options
litmus, litmus.fit
Predefined Litmus Objects, Predefined Litmus-Fitting Functions
With predefined colors.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ##############################
#functions of two variables
#(discretely-spaced)
##############################
df <- function (x, y, n=10, p=0.5)
dbinom (x, n, p) * dbinom (y, n, p)
plotf_dfield (df, c (0, 10) )
plotf_bar (df, c (0, 10) )
##############################
#functions of two variables
#(continuously-spaced)
##############################
plotf_cfield (rotated.sinc, c (-15.5, 15.5), fb=0, n=40, hcv=TRUE)
plotf_surface (rotated.sinc, c (-15.5, 15.5), n=40)
##############################
#triangular functions
##############################
tf <- function (w1, w2, w3 = 1 - w1 - w2)
(w1 - 1 / 3)^2 + (w2 - 1 / 3)^2 + (w3 - 1 / 3)^2
plotf_tricontour (tf, xlab="w1", ylab="w2")
plotf_trisurface (tf, xlab="w1", ylab="w2")
##############################
#functions of three variables
##############################
plotf_isosurface (bispherical.dist, c (-3, 3),, c (-2, 2) )
plotf_cfield3 (bispherical.dist, c (-3, 3),, c (-2, 2), emph="l")
##############################
#vector fields
##############################
plotf_vec (circular.field, c (-1.5, 1.5) )
plotf_vec3 (plughole.field, c (-1.5, 1.5),, c (-0.5, 1) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.