pamSPHERE: Plot 3d sphere

View source: R/pamSPHERE.R

pamSPHERER Documentation

Plot 3d sphere

Description

This function takes a spherical projection of acceleration or magentic data and plots it on a sphere which can be turned and zoomed into.

Usage

pamSPHERE(
  x,
  y,
  z,
  spherecolor = "white",
  linecolor = "black",
  linewidth = 2,
  ptcol = "black",
  ptsize = 0.02,
  arrows = TRUE,
  cex = 1.5,
  ...
)

Arguments

x

data on x axis

y

data on y axis

z

data on z axis

spherecolor

color of the sphere

linecolor

color of the lines on the sphere

linewidth

width of the lines on the sphere

ptcol

color of points

ptsize

size of the points plotted on the sphere

arrows

default TRUE - whether or not to draw the arrows

cex

size of font. If cex = 2 then fond is two times bigger.

...

additional input for rgl::spheres3d for plotting points on the sphere using

Value

a 3d sphere plot

References

Adler, D., Nenadic, O. and Zucchini, W., 2003, March. Rgl: A r-library for 3d visualization with opengl. In Proceedings of the 35th Symposium of the Interface: Computing Science and Statistics, Salt Lake City (Vol. 35).

Examples

#data("swift")
#start = as.POSIXct("2016-09-01","%Y-%m-%d", tz="UTC")
#end = as.POSIXct("2017-04-15","%Y-%m-%d", tz="UTC")
#swift = cutPAM(swift, start, end)
#PAM_data = swift

## plot an m-phere
#calibration = triMAG(dta = PAM_data$magnetic)
#pamSPHERE(x = calibration$calib_magx,
#          y = calibration$calib_magy,
#          z = calibration$calib_magz,
#          ptcol = "goldenrod",
#          ptsize = 0.03,
#          linecolor ="black",
#          spherecolor="royalblue4",
#          arrows=TRUE,
#          cex=2)

## plot an g-phere
#calibration = triACC(dta = PAM_data$magnetic)
#pamSPHERE(x = calibration$centered_accx,
#          y = calibration$centered_accy,
#          z = calibration$centered_accz,
#          ptcol = "royalblue4",
#          ptsize = 0.03,
#          linecolor ="black",
#          spherecolor="goldenrod",
#          arrows=TRUE)


KiranLDA/PAMLr documentation built on March 6, 2023, 1:40 p.m.