View source: R/ggtikzTransform.R
ggtikzTransform | R Documentation |
ggtikzTransform extracts coordinates definitions in an annotation's TikZ code and transforms them with the transformer functions stored in the underlying plot's x or y scales, respectively.
ggtikzTransform(ggtikzCanvas, ggtikzAnnotation)
ggtikzCanvas |
A |
ggtikzAnnotation |
A |
This function does not have to called directly. It is automatically called
when annotations are added to a canvas, if transform = TRUE
in the
ggtikzAnnotation
construction call.
Coordinates components with physical lengths are not changed. For a plot with a linear x scale and a log10-transformed y scale,
the TikZ coordinate (10,10) becomes (10,1),
the TikZ coordinate (10cm,10) becomes (10cm,1),
the TikZ coordinate (10,10cm) becomes (10,10cm)
the TikZ coordinate (0,0) will raise an error.
A link{ggtikzAnnotation}
object, with transformations applied
to the coordinates in the TikZ code.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.