annotation_raster_tern: Annotation: High-performance rectangular tiling (ggtern...

Description Usage Arguments Details Author(s) Examples

View source: R/annotation-raster-tern.R

Description

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).

Usage

1
2
annotation_raster_tern(raster, xmin = 0, xmax = 1, ymin = 0,
  ymax = 1, interpolate = FALSE)

Arguments

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 TRUE interpolate linearly, if FALSE (the default) don't interpolate.

Details

Most useful for adding bitmap images.

Author(s)

Nicholas Hamilton

Examples

1
2
3
4
5
6
7
8
9
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")

leogama/ggtern documentation built on Dec. 21, 2021, 10:40 a.m.