Displaying 20 results from an estimated 3000 matches similar to: "Setting default plot size in Sweave"
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.
2009 Jul 13
3
SweaveListingUtils question
Hello,
recently I read about the SweaveListingUtils package and now I want to try
it out. However, I can not make it work...
Below a minimal example. The problem seems to be the following line
(generated by SweaveListingPreparations()?):
\ifthenelse{\boolean{Sweave@gin}}{\setkeys{Gin}{width=0.6\textwidth}}{}%
If I comment out this line, it works.
What can I do about this?
I am using the
2005 Sep 16
1
setkeys and Sweave
Hi there:
Using
\setkeys{Gin}{width=1.0\textwidth}
\setkeys{Gin}{height=10cm}
\setkeys{Gin}{height=0.8\textwidth}
all seem to work under R-2.1.1 under sparc, solaris2.9, but
\setkeys{Gin}{scale=0.3}
\setkeys{Gin}{angle=90}
do not work. I have not been able to find relevant information, googling
on setkeys proved confusing, at best.
http://cnlart.web.cern.ch/cnlart/218/node85.html states:
2005 Jan 06
2
autoscaling plot font size in Sweave output possible?
Hi,
I was wondering if it's possible to have fonts in plots to be
autoscaled to the same font size used by LaTeX in a surrounding
Sweave document.
Here's a short example in which the fonts of the first plot are
barely readable:
--8<------------------------schnipp------------------------->8---
\documentclass{article}
\usepackage{graphicx}
\newcommand{\mytext}{Some normal sized
2009 Mar 17
1
Combining Sweave and fancyvrb
I find Sweave very useful and I was trying to combine it with the
latex package fancyvrb. I was trying to get line numbering and labels
in order to reference the lines where particular commands occur.
Unfortunately, I haven't been able to figure out how to do it. Maybe
somebody can help me.
The following is a sample Rnw file: the first part shows what I would
like to get, the second what I
2009 Aug 22
1
improving ?RweaveLatex
Dear developers
Please read below.
On 6/25/09, Marc Schwartz <marc_schwartz at me.com> wrote:
> You can use the following *after* the \begin{document} directive:
> \setkeys{Gin}{width=0.8\textwidth}
>
> The above is the default. Reset it to what you would like.
>
> Note, as per that manual page, that the Sweave options 'height' and 'width'
> affect
2009 Jun 26
0
Modifying Sweave.sty to allow escapes with fancyvrb package in LaTeX
Dear Colleagues:
In an attempt to have things like # See page \pageref{this} inside
comments in R code chunks I have modified Sweave.sty as below. I have
followed fancyvrb's manual with regard to the use of the commandchars
argument. But when compiling with LaTeX (using attached test file) I
get a LaTeX error
(/usr/share/texmf-texlive/tex/latex/ae/t1aett.fd)
! Missing \endcsname
2010 Aug 17
3
Sweave
Dear R users,
I am using Sweave.
I would like to use the width option for the graphics :
\begin{figure}[h!]
\centering
\includegraphics[width=0.7\textwidth]{x}
\end{figure}
How do I get this ?
Thank you very much,
Randall
[[alternative HTML version deleted]]
2006 Dec 12
1
Sweave, Xfig, pdflatex and \setkeys
Dear useRs,
How does one include graphics created with Xfig with LaTeX fonts into
Sweave?
If I create a graphic with Xfig with some Computer Modern fonts, I
choose to export it as combined PDF and LaTeX. So I get two files, one
foo.pdf with the drawings without the text and foo.pdftex with some
LaTeX code that ensures the text lands in the right place together with
the drawing. I'm supposed
2005 May 31
0
Plot Font Size in Sweave
Dear List
I'm working to modify the font size inside of an plot generated using
Sweave. I found a thread in the archives addressing this issue from F.
Leisch which suggests the solution below. I'm wondering if this is still
the best option for this problem or if another solution may exist.
Here is how I have resolved the issue based on the prior thread.
1) I modified the original
2008 Nov 22
1
declaring constants in an Sweave / LaTeX document
List,
I would like to set a variable to hold, say, the size of my plots in a
Sweave document. i.e. something like the following in my '.Rnw' file:
==============================================================================
smallPlotSize = 4
<<fig1, echo=false, results=hide, height=smallPlotSize, width=smallPlotSize,
fig=true>>=
dat <- read.table("
2008 Nov 04
3
getting "small" graphs with Sweave using Rnews.sty
I'm sorry for having to post this, but I can't seem to find any
solutions to this, which seems pretty simple, but then again...
I've started playing with the example r news project and wanted to start
adding some graphs, but replacing:
\begin{figure}
\vspace*{.1in}
\framebox[\textwidth]{\hfill \raisebox{-.45in}{\rule{0in}{1in}}
A graph goes here \hfill}
2009 Aug 28
1
Plotmath, sweave and lattice graphics interaction problem
Dear List,
I have hit this problem with using a plotmath expression in an axis
label on a lattice plot I'm including in a Sweave document. The actual
document is far too long and boring (unless you are interested in the
hydrochemistry of upland lakes) to include here, but the following
minimal example reproduces the problem; basically, the PDF produced by
Sweave has missing characters in the
2005 Nov 17
3
changing figure size in Sweave
Hi
In Sweave, how does one change the size of the plots?
I tried using a hook:
<<echo=FALSE, print=FALSE, fig=TRUE>>=
options(SweaveHooks=list(fig=function() ps.options(width=1)))
library(graphics)
pairs(iris)
@
but this didn't change the size of the figure. How to make the
figures a
different size?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre,
2003 Jul 30
0
Sweave
Many of you are using Sweave for making statistical reports. I thought it might be helpful to some to see an example of the setup I use (in Linux). For those of you who have not yet discovered the power and productivity gains from using Fritz Leisch's wonderful package, I encourage you to give Sweave a try.
%File: model.nw
%Usage:
% Put library(Hmisc;Design;tools} in .First
% Sweave model
2010 Jul 13
1
latex table question
Hi:
My head is spinning with this latex doc so hopefully after I align my tables to
the left of the page
my headache are going to be over. I always use:
\hspace*{-0.1in}
to move my figures horizontally to the left margin of the page but the table
below doesn't move at all,
but instead it gets sideways. Not sure if \begin{landscape} has something to do
with it or is just me.
I? hope someone
2008 May 18
1
Figure environment and includegraphics options from Sweave
Tha handy thinb about the fig=TRUE option in Sweave is that you do not
have to bother about filenames and starting and stpping the device.
I want the the resulting LaTeX to look as:
\begin{Schunk}
\begin{Sinput}
> x <- seq(-2 * pi, 2 * pi, 0.1)
> plot(x, cos(x), type = "l", lwd = 4)
\end{Sinput}
\end{Schunk}
\begin{figure}
\includegraphics[width=0.6\textwidth]{xx-001}
2010 Jul 10
2
Passing a LaTeX length to Sweave
I'd really love to do this
\setkeys{Gin}{width=\columnwidth}
<<label=something,fig=TRUE,echo=FALSE,width=\columnwidth,height=0.3\columnwidth>>=
plot(y~x)
@
The \columnwidth macro does not work, of course, in the second line.
What can I do instead?
2009 Aug 07
2
xtable, sweave and resizebox
does anyone know to rezize a table produzed by xtable? The size of my table
is too big and I would like to resize it like using resizebox but it gives
an erros when I try using it
using it its fine
\SweaveOpts{echo=false}
<<results=tex>>=
xtable(stats0,caption='Número de transacções dos artigos frequentes e
infrequentes',label='tab:INEStats')
@
but the size is too
2012 Feb 20
2
Computing plot size in Sweave
Sometimes you want to compute the physical size of a plot based on data.
In R itself this is no problem.
But is there a way to compute the values of height and width in S-weave, say:
<<graph,fig=TRUE,height=xx,width=yy>>=
where xx and yy are computed and not physically written in the document?
Bendix
______________________________________________
Bendix Carstensen
Senior