# pictex: A PicTeX Graphics Driver

## Description

This function produces simple graphics suitable for inclusion in TeX and LaTeX documents. It dates from the very early days of R and is for historical interest only.

## Usage

 1 2 pictex(file = "Rplots.tex", width = 5, height = 4, debug = FALSE, bg = "white", fg = "black") 

## Arguments

 file the file path where output will appear. Tilde expansion (see path.expand) is done. An input with a marked encoding is converted to the native encoding or an error is given. width The width of the plot in inches. height the height of the plot in inches. debug should debugging information be printed. bg the background color for the plot. Ignored. fg the foreground color for the plot. Ignored.

## Details

This driver is much more basic than the other graphics drivers included in R. It does not have any font metric information, so the use of plotmath is not supported.

Line widths are ignored except when setting the spacing of line textures. pch = "." corresponds to a square of side 1pt.

This device does not support colour (nor does the PicTeX package), and all colour settings are ignored.

Note that text is recorded in the file as-is, so annotations involving TeX special characters (such as ampersand and underscore) need to be quoted as they would be when entering TeX.

Multiple plots will be placed as separate environments in the output file.

## Conventions

This section describes the implementation of the conventions for graphics devices set out in the ‘R Internals’ manual.

• The default device size is 5 inches by 4 inches.

• There is no pointsize argument: the default size is interpreted as 10 point.

• The only font family is cmss10.

• Line widths are only used when setting the spacing on line textures.

• Circle of any radius are allowed.

• Colour is not supported.

## Author(s)

This driver was provided around 1996–7 by Valerio Aimale of the Department of Internal Medicine, University of Genoa, Italy.

## References

postscript, pdf, Devices.
The tikzDevice in the CRAN package of that name for more modern TeX-based graphics (http://pgf.sourceforge.net/, although including PDF figures via pdftex is most common in (La)TeX documents).
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 require(graphics) pictex() plot(1:11, (-5:5)^2, type = "b", main = "Simple Example Plot") dev.off() ##-------------------- ## Not run: %% LaTeX Example \documentclass{article} \usepackage{pictex} \usepackage{graphics} % for \rotatebox \begin{document} %... \begin{figure}[h] \centerline{\input{Rplots.tex}} \caption{} \end{figure} %... \end{document} ## End(Not run) ##-------------------- unlink("Rplots.tex")