View source: R/annotation-raster-tern.R
annotation_raster_tern | R Documentation |
This is a special version of geom_raster
optimised for static
annotations that are the same in every panel. These annotations will not
affect scales (i.e. the x and y axes will not grow to cover the range
of the raster, and the raster must already have its own colours).
annotation_raster_tern(
raster,
xmin = 0,
xmax = 1,
ymin = 0,
ymax = 1,
interpolate = FALSE
)
raster |
raster object to display |
xmin , xmax |
x location (in npc coordinates) giving horizontal location of raster |
ymin , ymax |
y location (in npc coordinates) giving vertical location of raster |
interpolate |
If |
Most useful for adding bitmap images.
Nicholas Hamilton
data(Feldspar)
data(FeldsparRaster)
ggtern(Feldspar,aes(Ab,An,Or)) +
theme_rgbw() +
annotation_raster_tern(FeldsparRaster,xmin=0,xmax=1,ymin=0,ymax=1) +
geom_mask() +
geom_point(size=5,aes(shape=Feldspar,fill=Feldspar),color='black') +
scale_shape_manual(values=c(21,24)) +
labs(title="Demonstration of Raster Annotation")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.