ggdisp.plot: Plotting of irregular spaced matrix data with aribitary...

Description Usage Arguments Examples

Description

ggplot2 wrapper for disp.plot3. Plotting of irregular spaced matrix data with aribitary transformations using ggplot package.

Usage

1
ggdisp.plot(x,y=NA,z=NA,fx=x,fy=y,midpoint=FALSE,col=c("black","white"))

Arguments

x

x vector

y

y vector

z

z vector

fx

functional transformation of length(x)

fy

functional transformation of length(y)

midpoint

see ?poly.image

col

a vector of R colors for the gradient on the resulting image plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(fields)

library(ggplot2)

data(SPPdispersion) #load example dataset

wavelength<-SPPdispersion$wavelength

angle<-SPPdispersion$angle

reflection<-SPPdispersion$reflection

ggdisp.plot(wavelength,angle,reflection) #plot data

kx<-(2*pi/wavelength)*sin(angle*pi/180)#transformation to dispersion plots
omega<-2*pi*3e8/wavelength

ggdisp.plot(wavelength,angle,reflection,kx,omega) #plot transformed data

tjconstant/photonMonkey documentation built on May 31, 2019, 3:38 p.m.