Displaying 20 results from an estimated 2000 matches similar to: "How to paste graph from R in Latex?"
1997 Nov 05
3
R-beta: Latex and R
Hello R users,
This question might be already discussed before, I apologize
if it is the case.
Simple... how can I do to include a figure in a latex document.
As I have already done in Splus, I tried this:
\begin{figure}
\special{psfile=gauss.ps .......}
\end{figure}
but it didn't work. Any help?
Thank you in advance.
PS: I let down the Mac and the MS Window platforms and I am back
to my
2006 Nov 30
4
R_WinEdt question
if I want to put fig1plot to the left, figYPplot to the right
figYAaplot on the bottom.
How to modify the following cod to do these?
\begin{figure}[H]
\centering
\begin{minipage}[t]{0.5\textwidth}
\centering
<<label=fig1plot,fig=TRUE,echo=FALSE>>=
<<fig1plot>>
@
%\caption{Caption 1}
\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
\centering
2001 Feb 08
4
eps file not positioned properly in latex document
Dear People,
I am trying to include a barplot (see code below), in a latex document.
However, the plot appears in totally the wrong position. I know this is
not an R question as such, but the eps file is produced by R and I thought
that perhaps other people had had similar problems and could give me
pointers. Am I doing anything obviously wrong?
Sincerely, Faheem Mitha.
PS.
2008 Nov 03
1
Sweave: side by side dynamic graphs
Hi all:
I'm trying to create some side by side dynamic graphics on the same page but I am running into some problems. I am able to create side by side figures only if I import them into my PDF. see the example bellow:
\documentclass[12pt]{article}
\usepackage{color,cite,graphicx}% to put in axodraw
\usepackage{latexsym,amssymb,epsf}
\begin{document}
%Import two figures side by side. Please
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
2009 Mar 13
1
How to combine xtable and minipage with Sweave ?
Hello,
I'm trying to put a dynamic table and a dynamic graph side by side in a pdf
document using Sweave.
The data.frame used to generate the table is called rg (rg.txt):
"Date"; "Code"; "Data1"; "Data2"
"2009-03-10";"1";1958;147
"2009-03-10";"2";302;144
"2009-03-10";"3";4;141
2010 Feb 24
4
R Graphics into Latex
Hi,
I'm new in Latex and I'm trying to include an R chart into a Latex document.
This is what I'm doing:
1) In R: save the chart as a a Postcript in a folder C:/xxx/Density.eps
2) In Latex (using TexWorks on windows xp) :
In the preambule:
\documentclass[11pt]{article}
\usepackage{graphicx}
\begin{document}
blah..blah…blah
\begin{figure}
\centering
1997 Jun 07
1
R-beta: Encapsulated Postscript output with R-0.49
I've noticed that the postscript files produced by R-0.49
come up inverted in my postscript previewer. Also, they
do not behave like encapsulated postscript files so they
can't be imported into LaTeX documents. If I remove lines
with page-oriented commands like "%%Page", "%%Orientation",
"\bp" and "\ep", the resulting files seem to behave like
2007 Aug 21
4
Formatting Sweave in R-News
Hi,
I am editing a document for submission to the R-news newsletter, and
in my article my Sweave code inserts a dynamically generated PDF
report that my R program generates.
However, when I insert the PDF using the following Sweave code:
\newpage
\includegraphics[scale=1.0]{\Sexpr{print(location)}}
\newpage
(in tex this looks like):
\newpage
\includegraphics[scale=1.0]{/home/arjun/sample.pdf}
1998 Apr 25
1
R-beta: postscript in R and R
I am creating postscript-graphics in R. When I import them into
a LATEX document it is impossible to get the caption close
to the figure. I run the same program in Splus, and no problem
of getting the caption just below the figure. Another thing,
the ps file that S created is only 10% of the size of the file
that R created. What is wrong? Are there some parameters to
be set?
Helgi
1998 Oct 29
3
EPS
Perhaps this has been mentioned and I wasn't paying attention. When I try to
import a postscript file (which is EPS according to the R help on postscript) my
Framemaker filter chokes. If I simply edit the first line of the file to put
%!PS-Adobe-3.0 EPSF-3.0
rather than
%!PS-Adobe-3.0
it works just fine. It sure would be simpler if the postscipt driver put this in
the file.
Paul Gilbert
2010 May 13
1
Using Sweave in hostile environments
I'm trying to put together a poster using the LaTeX a0poster package and
including some things from pstricks to get gradient shading, etc.
The problem is that the default environments used by Sweave don't work
where I need them. A simple code chunk like
<<eval=FALSE>>=
x <- 1
@
buried in a minipage within a psshadowbox gives the error
Runaway argument?
> x <- 1
2009 Apr 19
2
Sweave: Changing the background color, adding a border
Hi all,
I am using Sweave to produce a document. Unfortunately, I have to print
several copies and I can't print them in color. So I would like to
change the way of printing the code. I would like to print the code in a
box with a black borderline and a grey background (quite classic). Is it
possible to do it by changing some Schunk options?
Christophe
2005 Jun 16
1
Sweave and sideways
Hi there,
I'm rying to 'turn' an Schunk in an .Rnw file(Xemacs-21.4.13, ESS-5.2.8,
R-2.1, miktex-2.4.1705).
Has anyone got the isorot package to work with Sweave?
JC
example test.Rnw:
\documentclass[a4paper]{article}
\usepackage{Sweave}
\usepackage{isorot}
\rotdriver{dvips}
\clockwise
\title{Sweave Example 1}
\author{apologies to Friedrich Leisch }
\begin{document}
\maketitle
2002 Feb 28
3
R-plots with 'complex' axis-labelling
Hi there,
I want to create plots with some kind of 'complex' axis labelling of the form
$\dot{V}$ and integrate those plots into a LaTeX document. What is the best
way to go?
I've figured out, that the 'plotmath' commands are somewhat limited (at least
I wasn't able to get the $\dot{V}$ generated) and that plots with
'plotmath'-axes wouldn't export
2003 Aug 06
3
How to copy and paste a R plot onto Word (or Power Point)
All,
Anybody can tell how to export a R plot onto Word (or Power Point)?
Many thanks in advance.
-MY
2006 Feb 28
3
LaTeX in R graph
Hello,
I would like to know if it is possible to insert LaTeX typesetting in R output.
I want to obtain a graph with LaTeX label in order to incorporate it as
postscript or pdf,
x<-seq(0,1,length=100)
y<-x*x
plot(x,y,xlab="$X$",ylab="$X^2$")
2010 Jan 25
3
Paste expression in graph title
This was my initial attempt at creating a title on a graph of the R squared
value:
x<-rnorm(10)
y<-rnorm(10)
plot(x,y, main=paste(expression(R^2)," = ",round(summary(lm(y~
x))$r.squared, digits=3), sep=""))
I've read various other posts that say expression needs to be taken outside
the paste, but I can't seem to get it work as the following fails
plot(x,y,
1998 Jul 05
0
R-beta: Suggestion for a very minor change to Rd.sty
Dear R gurus and users,
for some functions in some of the many packages available for R, with
the current definition of \Header given in Rd.sty, the heading bumps
into the surrounding words in documentation printed via LaTeX. To
alleviate this minor typographical mishap, I'd like to suggest the
change to R/doc/manual/Rd.sty included below as a context diff. With
this minor diff applied, the
2004 Feb 26
2
Sweave and Xemacs on Windows2000?
Hallo!
Trying to configure Xemacs to work with .snw files on windows 2000. Tried to do it how it is described in the FAQ for Sweaves.
When starting xemacs with and Snw file
*ESS* buffer contains hundrets of lines and the few last ones.
(ess-loop-timeout . 500000) (inferior-ess-primary-prompt . ^) (inferior-ess-secondary-prompt . ^) (comint-use-prompt-regexp-instead-of-fields . t)