Displaying 20 results from an estimated 3000 matches similar to: "R Graphics into Latex"
2002 Dec 20
5
Getting graphs into LaTeX
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
2010 May 22
1
Lattice Wireframe Plot into LaTex
Dear R/LaTex user,
I'm simply trying to include a plot created with the Lattice wireframe
function into LaTex. I have no problems including other R plots into LaTex
by exporting as a Postcript and then including the graph in LaTex using
\begin{figure}
% Requires \usepackage{graphicx}
\includegraphics[width=]{mygraph.eps}\\
\caption{}\label{}
\end{figure}
However, for some reason when I
2008 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl,
I'm using something like:
----------------------- tex.tex ---------------------------
\documentclass{article}
\usepackage{graphicx}
\usepackage{fancyvrb}
\newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}}
\newcommand{\myinput}[1] {\begin{scriptsize}
\VerbatimInput[frame=single,label=#1]{#1}
\end{scriptsize}}
\title{The R logo,
2008 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl,
I'm using something like:
----------------------- tex.tex ---------------------------
\documentclass{article}
\usepackage{graphicx}
\usepackage{fancyvrb}
\newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}}
\newcommand{\myinput}[1] {\begin{scriptsize}
\VerbatimInput[frame=single,label=#1]{#1}
\end{scriptsize}}
\title{The R logo,
2005 Jan 14
2
Questions on Inserting R graphs in latex!
Hi,
I try to insert R graphs into a latex file and I am using a Texniccenter/MikTex combination in my Windows XP. Here are the errors I got. Could someone give me some clues?
In R, I did
> plot(sin(1:10), pch="+")
> dev.print(device=postscript, "C:\\myFigure.eps",onefile=FALSE, horizontal=FALSE, paper="special")
In latex, I did (myFigure.eps is in the same
2002 Feb 07
12
R graphs in LaTeX documents?
I have tried to find a neat way to include graphs from R in LaTeX documents,
but have not succeeded (I work with a WinEdt/MikTeX combination). The two
roads I have stumbled along so far are the following:
*Generate postscript files and convert them into EPS files by means of
GhostScript or other not so straightforward tools.
*Generate pictex files and include these.
None of these solutions have
2002 Jan 27
5
EPS->LaTeX problem
Greetings-
I have a strange problem displaying a graph from R (1.3.1, linux) in a
LaTeX document of documentclass seminar.
I'm using graphicx to include the file:
\usepackage{graphicx}
...
\resizebox{\textwidth}{\textheight}{\includegraphics{crime.eps}}
When I do this, the entire slide (including the page number) is rotated
180 degrees. Any ideas why this happens?
The graph was created
2007 Oct 07
5
how to use \Sexpr{} with sweave
I'm trying to learn Sweave. So far things are going well with the chunks of code identified by << >>=
But I'm having trouble with the in-line text use of \Sexpr.
Here is a short example .Rnw file:
\documentclass[12pt]{article}
\usepackage[margin=1.25in]{geometry}
\usepackage{graphicx}
\usepackage{Sweave}
\begin{document}
<<test>>=
pnorm(1)
@
\Sexpr{2+6}
2002 Nov 08
1
pdf() and pdflatex
I am having good success in using pdf() to produce pdf graphics files for inclusion in documents processed by pdflatex [I'm using R 1.6.0 on Linux]. I am having one small problem consistently though, which I believe I also had with S-Plus's pdf.graph(): wasted space at the top of the graph which causes pdflatex to put the graph on a later page, when the current page has plenty of space.
2010 Feb 22
2
(Somewhat) broken EPS files produced
Hello.
I'm writing some simple text using sweave, and faced a strange problem
with eps files produced for my plots (one example attached).
Individual eps files are interpreted by ghostscript just fine, and
show up without errors. But once I try to include them into main
LaTeX/Sweave document (using regular \includegraphics, produced by
Sweave),
ghostscript gives me this error on those files:
2004 Mar 11
1
Difficulties in interaction between R and latex (prosper)
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 =
2004 Sep 29
2
lattice .ps graphic is rotated in LaTeX slides
I've generated a version of the classic dotplot of the barley data with
library(lattice)
data(barley)
trellis.device("postscript", color=TRUE, file="barley2x3.ps")
old.settings <- trellis.par.get()
trellis.par.set("background", list(col = "white"))
lset(list(superpose.symbol=list(pch=c(19, 1, 25, 2, 15, 22, 23),
2005 Apr 26
2
postscript (eps) / latex / par(mfg=...) / problem!
The same problem I am having has been reported here
http://tolstoy.newcastle.edu.au/R/devel/04a/0344.html
Namely that using par(mfg=...) with a postscript (eps) for inclusion with
latex makes the figure appear upside down and back to front (flipped)!
Converting the dvi to ps makes matters worse (the eps seems to be broken),
however, it appears fine with gv.
Here is (basically) the code I am
2005 Apr 26
2
postscript (eps) / latex / par(mfg=...) / problem!
The same problem I am having has been reported here
http://tolstoy.newcastle.edu.au/R/devel/04a/0344.html
Namely that using par(mfg=...) with a postscript (eps) for inclusion with
latex makes the figure appear upside down and back to front (flipped)!
Converting the dvi to ps makes matters worse (the eps seems to be broken),
however, it appears fine with gv.
Here is (basically) the code I am
2010 Feb 11
1
Sweave, lty = 3 line incorect in pdf output
I'm having a problem with dotted lines (lty = 3) in the pdf output
in documents generated with Sweave. In the displayed pdf, the
dotted line does not show up and in the printed output, it is
there but does not seem to respect the lwd argument, for example, it
is very faint despite using lwd = 3. The dotted line is correct
in a quartz window and if I save the Quartz window to a pdf
and
2005 Oct 31
2
Sweave (R?) font encoding problems
Dear R list,
I'm having some problems with font encodings when using R+Sweave+Latex in my
native language: Portuguese.
My environment:
Kubuntu 5.10 Linux
$> uname -a
Linux nassa 2.6.12-9-686 #1 Mon Oct 10 13:25:32 BST 2005 i686 GNU/Linux
R> R.version
_
platform i486-pc-linux-gnu
arch i486
os linux-gnu
system i486, linux-gnu
2012 Apr 04
3
Rgui maintains open file handles after Sweave error
Hello Folks,
When I run the document below through sweave, rgui.exe/rsession.exe
leaves a file handle open to the sweave-001.pdf graphic (as verified by
process explorer). Pdflatex.exe then crashes (with a Permission Denied
error) because the graphic file is locked.
This only seems to happen when there is an error in the sweave document.
When there are no errors, no file handles are left open.
2012 May 03
1
pdf, pairs and subfloats
Hi there!
I have found a trange problem with getting pairs()-plots to show properly in latex \subfloat environments.
If i generate images of these plots with pdf() and include them in subfloats, they will either show up in grayscale, or sometimes the datapoints of the pairplots are missing. Mind you, the PDFs themselves are properly colored and look perfectly fine, both as pdf-image in acrobat
2007 Jun 21
2
Need Help: User Defined R Functions in Sweave/Latex
Dear all,
I want to start my post by expressing my sincere gratitude for all the
help this group has given me in Sweave/Latex/R. The tools are
excellent and so is the community!
On to the question.
My Sweave code is intended to make lots of plots and create a *.pdf
document. Sweave is perfect for this. The only problem is that I find
myself using the same R code, within my Sweave input file
2009 Jun 14
1
Centering graphics by default in Sweave
Is there an elegant way to get Sweave to center graphics by default?
I'd like to use \centerline{\includegraphics{}} etc. to save some
vertical space that \begin{center} ... \end{center} uses, and I'd like
to avoid centering with each <<fig=T>>=
Thanks
Frank
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of