PlotPTsmooth {RFOC} | R Documentation |
Plot Smooth PT-axes
Description
Project PT axes on the sphere and smooth the image. This function requires function kde2d, from the MASS library.
Usage
PlotPTsmooth(paz, pdip, x = 0, y = 0, siz = 1, bcol = "white", border ="black",
IMAGE = TRUE, CONT = TRUE, cont.col = "black",
pal = terrain.colors(100), LABS = FALSE, add = FALSE, NCP=50, NIP=200)
Arguments
paz |
vector of Axis azimuths, degrees |
pdip |
vector of dip angles, degrees |
x |
x-location of plot center in user coordinates |
y |
y-location of plot center in user coordinates |
siz |
siz of plot in user coordinates |
bcol |
color |
border |
border color |
IMAGE |
logical, TRUE=create an image plot |
CONT |
logical, TRUE=add contour lines |
cont.col |
color of contour lines |
pal |
pallete for image plot |
LABS |
text Label for image |
add |
logical, TRUE=add to plot |
NCP |
integer, Number of points to use for calculating smoothed contours, default=50 |
NIP |
integer, Number of points to use for calculating smoothed image, default=200 |
Details
Program requires MASS libary for 2D smoothing routine kde2d.
For calculating contours the kde2d program creates a smoothed 2D image using NCP points per side. For the images, NIP points are used. To reduce the size of plots, or, if the subplots are very small, reduce NIP to a smaller value for faster plotting.
Value
Graphical Side Effect
Note
Points that fall on the opposite hemisphere are reflected through the origin.
Author(s)
Jonathan M. Lees<jonathan.lees@unc.edu>
See Also
kde2d
Examples
plot(c(-1,1), c(-1,1), asp=1, type='n')
paz = rnorm(100, mean=297, sd=10)
pdip = rnorm(100, mean=52, sd=8)
PlotPTsmooth(paz, pdip, x=0.5, y=.5, siz=.3, border=NA, bcol='white' ,
LABS=FALSE, add=FALSE, IMAGE=TRUE, CONT=FALSE)
taz = rnorm(100, mean=138, sd=10)
tdip = rnorm(100, mean=12, sd=8)
PlotPTsmooth(taz, tdip, x=-.5, y=.4, siz=.3, border=NA, bcol='white' ,
LABS=FALSE, add=FALSE, IMAGE=TRUE, CONT=TRUE)
########### put them together
plot(c(-1,1), c(-1,1), asp=1, type='n')
PlotPTsmooth(paz, pdip, x=0, y=, siz=1, border=NA, bcol='white' ,
LABS=FALSE, add=FALSE, IMAGE=TRUE, CONT=FALSE)
PlotPTsmooth(taz, tdip, x=0, y=, siz=1, border=NA, bcol='white' ,
LABS=FALSE, add=TRUE, IMAGE=FALSE, CONT=TRUE)