Sharpie / RTikZDevice

A R package for producing graphics output as PGF/TikZ code for use in TeX documents.
32 stars 36 forks source link

Annotations for grid graphics #37

Closed Sharpie closed 13 years ago

Sharpie commented 13 years ago

It would be nice to drop coordinates and annotations into grid graphics. For base graphics, the grconvertX and grconvertY functions are used. However, grid graphics are a bit different because the actual location of a point is unknown until it is rendered to a viewport --- not technically true, locations in a viewport are unknown until it is pushed to a graphics device.

A possible solution could be to provide an "annotation object" that could be combined with other grid objects and printed to viewports. Upon printing, this annotation object would insert information at the appropriate point.

Sharpie commented 13 years ago

Possible function of interest:

current.transform

Doesn't look that special in the man pages, but Paul Murrell said the following:

current.transform() transforms from inches within the current viewport to inches on the overall device.

Sounds like something that can be used to fill the function of grconvertX and grconvertY.