LaTeX Using R and Sweave to Incorporate Graphics in Latex Documents"

  • Thread starter Thread starter MaxManus
  • Start date Start date
  • Tags Tags
    Latex
AI Thread Summary
The discussion centers on issues encountered while using R and Sweave to create a LaTeX document. The user is experiencing problems with scatterplots, specifically that the final LaTeX output displays lines but not the dots in the plots. The user initially compiled the document using MikTeX and later switched to MacTeX with TeXworks, discovering that the built-in PDF reader in TeXworks does not render the graphics correctly, while Adobe Acrobat Reader displays them properly. The main focus is on troubleshooting the rendering of scatterplot elements in the generated LaTeX document.
MaxManus
Messages
268
Reaction score
1
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?
 

Attachments

Last edited:
Physics news on Phys.org
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.
 
Thanks, it showed in Acrobat
 

Similar threads

Replies
8
Views
12K
Replies
1
Views
8K
Replies
4
Views
12K
Replies
2
Views
5K
Back
Top