Description Usage Arguments Examples
image plot of irregular spaced matrix data with aribitary transformations
1 2 |
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
... |
Additional arguments to be passed to the geom or stat |
formula |
The modelling formula passed to |
n |
Number of points used for interpolation. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | data("SPPdispersion")
SPPdispersion$wavelength<-SPPdispersion$wavelength*1e9
q<-ggplot(SPPdispersion, aes(x=wavelength, y=angle,fill=reflection)) +
geom_disp()
print(q)
kx<-function(x,y) (2*pi/(x*1e-9))*sin(y*pi/180)
omega<-function(x,y) 2*pi*3e8/(x*1e-9)
q<-ggplot(SPPdispersion, aes(x=wavelength, y=angle,fill=reflection)) +
geom_disp(fx=kx,fy=omega,nx=200,ny=200)
print(q)
fx <- function(x,y) x*sin(y*pi/180)
fy <- function(x,y) x*cos(y*pi/180)
q<-ggplot(SPPdispersion, aes(x=wavelength, y=angle,fill=reflection)) +
geom_disp(fx=fx,fy=fy)+coord_equal()
print(q)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.