[R] Getting graphs into LaTeX

About this list Date view Thread view Subject view Author view Attachment view

From: Andrew Criswell (arc@arcriswell.com)
Date: Thu 21 Aug 2003 - 23:17:05 EST


Message-id: <3F44C651.3060006@arcriswell.com>

Hello ALL:

I ran with success the following commands in R getting a file saved
------------------------------------------------------------------------------------
postscript()

postscript('~/data/st202/2003/lecture00/lecture00-graph-01.eps',
           horizontal = FALSE, height = 6, pointsize = 10)

hist(trial.outcome.5, breaks = 5,
     main = '1000 Replications of 5 Trials of a Coin Toss',
     xlab = 'Frequency of a Tail')
------------------------------------------------------------------------------------
But when I try to include it within a LaTeX document, I get the
following complaint.

LaTeX document (trix.tex):
------------------------------------------------------------------------------------
\documentclass[11pt]{article}
\usepackage[pdftex]{graphicx,color}
\begin{document}
\includegraphics{lecture00-graph-01.eps}
\end{document}
------------------------------------------------------------------------------------
Which I try to compile with the command: pdflatex trix.tex

But then, I get this error:
------------------------------------------------------------------------------------
! LaTeX Error: Unknown graphics extension: .eps.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
 ...

l.5 \includegraphics{lecture00-graph-01.eps}

?
------------------------------------------------------------------------------------
Any suggestions?

Thanks,
ANDREW

______________________________________________
R-help@stat.math.ethz.ch mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jun 2004 - 09:31:59 EST