PDA

View Full Version : Latex and includegraphics


MaxManus
Mar7-11, 02:22 PM
I'm trying to use R and Sweave to make a document. This gives the Latex;
\documentclass[a4paper,norsk]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel,textcomp}
\title{test}
\author{me}
\usepackage{Sweave}
\begin{document}


1a)

\begin{Schunk}
\begin{Sinput}
> summary(cod)
\end{Sinput}
\begin{Soutput}
length seas area age
Min. : 35.00 1:100 1:200 Min. : 2.00
1st Qu.: 55.00 2:100 2:200 1st Qu.: 5.00
Median : 64.00 3:100 Median : 6.00
Mean : 65.17 4:100 Mean : 5.87
3rd Qu.: 73.00 3rd Qu.: 7.00
Max. :134.00 Max. :13.00
\end{Soutput}
\end{Schunk}
\includegraphics{test-003}
dad




\end{document}

When I try to run Latex with MikTex it gives me a empty plot. Does anyone know why?

Edit: It seems like it's the "dots" in the scatterplots that are the problem. The finished latex document shows lines, but not dots. Does anyone know what to do?

MATLABdude
Mar8-11, 08:05 PM
I used pdflatex to compile in MacTeX--TeXwork's (which I believe is also the default for MikTeX) built-in PDF reader garbles your graphic, but Acrobat Reader seems to render it just fine.

MaxManus
Mar9-11, 02:52 AM
Thanks, it showed in Acrobat