[R] Difficulties in interaction between R and latex (prosper)
Ajay Shah
ajayshah at mayin.org
Thu Mar 11 02:44:21 CET 2004
Hello, folks! I'm trying to use R as a graphics program, to make some
pretty graphs that will go into prosper slideshows.
I wrote this fragment, from the R manual, into a file demo.R:
x=seq(-3,3,0.1)
postscript("cm_test.eps", width = 4.0, height = 3.0,
horizontal = FALSE, onefile = FALSE, paper = "special",
family = "ComputerModern")
plot(x, sin(x), type="l")
I fed this into a simplest-possible tex file, named sl_demo.tex, which
uses prosper:
\documentclass[pdf,serpaggi,slideColor,colorBG]{prosper}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\begin{document}
\begin{slide}{Demo}
\includegraphics[width=\linewidth]{cm_test.eps}
\end{slide}
\begin{slide}{This one works}
\includegraphics[width=\linewidth]{thisworks.eps}
\end{slide}
\end{document}
The file cm_test.eps is produced using R. I left a file
"thisworks.eps" there as a counterpoint (it was made using jgraph and
it works fine).
The resulting sl_demo.pdf is attached. It's supposed to be a
slideshow. Under Adobe acrobat, when I say Ctrl-L it must go
fullscreen. That works correctly for thisworks.eps but not for the
eps file that's made using R.
Any ideas what I'm doing wrong? How do I get the graph made using R
to sit horizantally (i.e. landscape), and fill the screen? I tried to
say "horizontal=T" and that doesn't work.
--
Ajay Shah Consultant
ajayshah at mayin.org Department of Economic Affairs
http://www.mayin.org/ajayshah Ministry of Finance, New Delhi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sl_demo.pdf
Type: application/pdf
Size: 18435 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20040311/edfd56bf/sl_demo.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thisworks.eps
Type: application/postscript
Size: 10672 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20040311/edfd56bf/thisworks.eps
-------------- next part --------------
x=seq(-3,3,0.1)
# Example from the manual, obtained when we say ?postscript
postscript("cm_test.eps", width = 4.0, height = 3.0,
horizontal = FALSE, onefile = FALSE, paper = "special",
family = "ComputerModern")
plot(x, sin(x), type="l")
More information about the R-help
mailing list