Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

geom_mask

Apply Manual Clipping Mask


Description

This function creates a manual clipping mask, which in turn suppresses the standard clipping mask that would otherwise be rendered in the foregound rendering procedure, giving the user control over the exact placement with respect to other layers. For example, the user may wish to have the clipping mask placed after the geom_point(...) layer, but before the geom_label(...) layer, this situation has been demonstrated in the example below. In the event that the user wishes to suppress the mask altogether, then a convenience function has been provided, theme_nomask().

Usage

geom_mask()

Author(s)

Nicholas Hamilton

Examples

data(Feldspar)
x = ggtern(Feldspar,aes(Ab,An,Or,label=Experiment)) + geom_point()

#Default Behaviour
x + geom_label()

#Insert manual mask before the labels, to prevent them being truncated
x + geom_point(size=6) + geom_mask() + geom_label()

ggtern

An Extension to 'ggplot2', for the Creation of Ternary Diagrams

v3.3.0
GPL-2 | file LICENSE
Authors
Nicholas Hamilton [aut, cre]
Initial release
2020-04-9

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.