Learn R Programming

RFOC (version 1.0-4)

PlotPTsmooth: 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)

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

Value

  • Graphical Side Effect

Details

Program requires MASS libary for 2D smoothing routine kde2d.

See Also

kde2d

Examples

Run this code
library(MASS)

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)

Run the code above in your browser using DataLab