Learn R Programming

tikzDevice (version 0.5.2)

tikzDevice-package: Support for native LaTeX output of R graphics

Description

This package implements the tikz device which allows for the output of R graphics to be saved in a LaTeX friendly format. All text in a graphic be typeset by LaTeX and therefore will match whatever fonts are currently used in the document. This also means that LaTeX mathematics can be typeset directly into labels and annotations

Arguments

Details

ll{ Package: tikzDevice Type: Package Version: 0.35 Date: 2009-07-16 License: GPL 2.0 or greater LazyLoad: yes }

References

The TikZ and PGF Packages: Manual for version 2.00 http://sourceforge.net/projects/pgf Till Tanatu, February 20, 2008

See Also

tikz

Examples

Run this code
td <- tempdir()
tf <- file.path(td,'example.tex')
oldwd <- getwd()
setwd(td)

tikz(tf,standAlone=T)
	plot(-2:2, -2:2, type = "n", axes=F, 
			xlab='', ylab='', main='TikZ Device Example')
    text(x,y,paste('\\Large$\\',syms,'$',sep=''))
dev.off()
tools::texi2dvi(tf,pdf=T)
system(paste(getOption('pdfviewer'),file.path(td,'example.pdf')))
setwd(oldwd)

Run the code above in your browser using DataLab