gg_to_npc.ggtikzCanvas {ggtikz}R Documentation

Convert data coordinates to npc coordinates.

Description

Convert data coordinates to npc coordinates.

Usage

## S3 method for class 'ggtikzCanvas'
gg_to_npc(self, coord, panelx, panely, ...)

Arguments

self

a ggtikzCanvas object

coord

A numeric vector of length 2, with the x coordinate to convert at coord[1] and the y coordinate to convert at coord[2]

panelx

X position (column) of the panel holding the data

panely

X position (row) of the panel holding the data

...

unused

Value

The input coordinates from coord converted to npc coordinates in the form of a numeric vector of length 2. (0,0) corresponds to the lower left corner of the viewport containing the ggplot panel specified by panelx and panely, and (1,1) corresponds to the upper right corner.


[Package ggtikz version 0.1.3 Index]