ggtikzAnnotation objects are meant to be added to a ggtikzCanvas object.
ggtikzAnnotation(
tikz_code,
x = c("data", "panel"),
y = c("data", "panel"),
xy = NULL,
panelx = NULL,
panely = NULL,
transform = TRUE,
replace_inf = TRUE,
clip = "on"
)A ggtikzAnnotation object, which can be added to a ggtikzCanvas object.
The tikz code to use for annotation. Backslashes must be escaped!
Reference frame for the x coordinates. Either "data" or "panel".
Reference frame for the y coordinates. Either "data" or "panel".
Reference frame for both x and y coordinates. Trumps x and y. Either "data" or "panel" or "plot".
x position of the panel to use as coordinate reference, starting from the left, 1-based.
y position of the panel to use as coordinate reference, starting from the top, 1-based.
Should TikZ coordinates be transformed according to the
scale transformation? If TRUE, coordinates in tikz_code are replaced by
the transformation of the x/y scale, as appropriate. Coordinates components
with physical lengths are not changed. See ggtikzTransform for
details.
Should annotation coordinates containing 'Inf' or '-Inf'
be adjusted so these values correspond to the edge of the available space?
This is analogous to the behavior of ggplot when infinite values are
encountered.
See also ggtikzUninfinite
Should annotations be clipped to the panel boundaries?
See the clip argument to viewport
This function prepares TikZ annotations in a form understandable to a ggtikzCanvas object. An annotation can be added to multiple ggtikzCanvas objects, provided that each underlying ggplot object has the necessary panels to know what to do with this information.
grid.tikzAnnotate for annotation of base graphics
ggtikz for a helper function for quick one-step annotations.
ggtikzCanvas for information about initiating the annotation process.