Displaying 20 results from an estimated 2000 matches similar to: "Sweave: no eps fig"
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("
2000 Feb 14
2
par(fig) problem
hello R-users,
I'd like to plot four graphics on the same page but with different
sizes. I've tried to use :
par(fig=c(0,0.5,0,0.6))
plot(fig1)
par(fig=c(0.5,1,0,0.6))
plot(fig2)
etc...
but when a figure is plotted, it erase the previous.
I've tried to pass 'new=T' to plot function but it's not possible.
What can I do ? is it a bug ?
I've already reported this a 2 or
2009 Apr 14
1
using Sweave, how to save a plot in a given size
Hi,
I'm trying to realise a repport with R and Latex (TeXnicCenter and Miktex for Windows) using Sweave().
I'd like to save my plots in a given size. How can I do that ? The code is :
\SweaveOpts{prefix.string = figs/plot, eps = FALSE, pdf = TRUE}
<<partI, echo=FALSE ,fig=TRUE, include=FALSE>>=
plotFunction()
@
\includepdf[pages=-]{figs/plot-partI}
When I use
2012 Aug 21
2
Sweave: R chunk inside caption?
Hi Folks,
I'm surprised, but I didn't find this question addressed anywhere. I'd
like to generate a LaTeX caption with R code. I've tried the code
below, but I get the following TeX error:
! Argument of \@caption has an extra }.
<inserted text>
\par
l.21 }
Any thoughts? Perhaps I'll have to write the "\caption{}" text with R?
thanks!
2000 Feb 14
0
summary : par(fig)
many thanks to P. Dalgaard, J. Fox, J. Lemon, JE. Paradis and J. Polzehl
for their quick replies.
The original posting is at the end of this summary.
I've not well explained myself but I don't wanted to use par(mfrow) or
par(mfcol) because I wanted to plot very different graphics and this
solution doesn't match my needs.
E. Paradis and P. Dalgaard made me discover a new (for me!)
2004 Dec 06
2
Blank eps output files
Dear all,
The following commands results in a blank graph file,
postscript(file = "C:/Temp/Fig1.eps", height=4.0, width=4.0,
horizontal = FALSE, onefile = FALSE, paper = "special")
x11(height=3,width=3)
par(mar=.1+c(4.5,4.5,0,0))
x <- c(10,20,30)
y <- c(5, 7, 9)
plot (x,y)
dev.off()
The codes function normally without any error in the command window.
However, the
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
2010 Dec 10
1
Sweave: Setting options with SweaveOpts{} when using driver=RweaveHTML
When using Sweave in connection with the driver RweaveLatex(), global options can be set with \SweaveOpts{}, e.g.
\SweaveOpts{keep.source=T}.
Does anybody know if it is possible to set global options in the same way when using Sweave with the driver RweaveHTML().
Regards
Søren
[[alternative HTML version deleted]]
2011 Apr 14
1
trouble with \SweaveOpts{grdevice=...}
Dear all
I've just tried the brand new 'grdevice' option in Sweave but couldn't
make it work. When I declare
\SweaveOpts{grdevice=pdf}
or
\SweaveOpts{grdevice=cairo_pdf}
trying to plot something simple
<<fig=T, echo=T>>=
plot(1:10,1:10,main='Some title')
@
would result in an Sweave error:
18:16:47.299: 1 : term verbatim
18:16:47.308: 2 : echo term verbatim
2012 Dec 02
1
Problem with figures
I am having problem making ggplot2, tikzDevice, and knitr working together.
I used a very simple example:
---------------------------example.Rnw-----------------------------
\documentclass[preview]{standalone}
\begin{document}
\begin{figure}
<<fig1,eval=TRUE,echo=FALSE,dev='tikz'>>=
library(ggplot2)
qplot(displ, hwy, data = mpg, colour = factor(cyl))
@
\end{figure}
2024 Feb 05
1
ggarrange & legend
I'm sorry but that is not a working example.
A working example needs to create the plots being used.
For example, stealing some code from
https://rpkgs.datanovia.com/ggpubr/reference/ggarrange.html
#=================================================================
data <https://rdrr.io/r/utils/data.html>("ToothGrowth")df <-
ToothGrowthdf$dose <- as.factor
2024 Feb 05
2
ggarrange & legend
Dear John Kane
Dear R community
Here my working example
1. Example that is working with legend=?top?. However, as mentioned, the legend is in the middle of the top axis.
mylist<-list(p1, p2)
dev.new(width=28, height=18)
fig1<- ggarrange(plotlist=mylist, common.legend = TRUE, legend="top", labels = c("(A)", "(B)"), font.label = list(size = 18, color =
2009 Jun 01
2
Sweave:Figures from plot (LME output) not getting generated (pdf or eps)
Hi,
I seem to be facing a strange problem when I use Sweave for creating a
LaTeX document of the R lme() output --- The EPS and PDF figure files
get created, but are empty. I have attached a reproducible example
below (taken from the R lme() help example).
------------------------------------------------------------------------------------
\documentclass[a4paper,10pt]{article}
2010 Nov 15
1
Sweave: Conditional code chunks?
I have a code junk that produces a figure. In my special case,
however, data does not always exist. In cases where data exists, the
code chunk is of course trival (case #1), however, what do I do for
case # 2 where the data does not exist?
I can obviously prevent the code from being executed by checking the
existence of the object x, but on the Sweave level I have a static
figure chunk. Here an
2013 Jan 28
1
Adding 95% contours around scatterplot points with ggplot2
Hi all,
I have been looking for means of add a contour around some points in a
scatterplot as a means of representing the center of density for of the
data. I'm imagining something like a 95% confidence estimate drawn around
the data.
So far I have found some code for drawing polygons around the data. These
look nice, but in some cases the polygons are strongly influenced by
outlying points.
2012 Oct 26
1
asking about R Code
Hi, my name is Ellen. I want to ask you about R Code.
I got a code for extracting a pixel value, but I can't compile it..
It is said "Error in is.data.frame(x) : object 'lena' not found"
Here is the original full code:
library(pixmap)
lena <- read.pnm("oldlennablur.pgm")
write.table(lena@grey,"mylenna", quote=FALSE, row.names = FALSE, col.names=
2011 Mar 23
3
Sweave: multiple graphic formats, e.g. win.metafile
Dear R devel,
being constrained to a windows environment at work and having colleagues being accustomed to the Microsoft Office Suite, I was looking for a way to have the RweaveLatex driver for Sweave automatically generating 'win.metafile's in addition to the pdf graphics.
Without this functionalilty, the generation of emf-graphics is quite laborious, I think:
<<>>=
plotit
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:
2011 Feb 22
1
odfWeave graphics glitch
Using R2.12.1 on Ubuntu 10.04.1 I've tried to run the following code chunk in odfWeave
<<fig1, echo=TRUE,fig=TRUE,width=7,height=4>>=
x<-seq(1:100)/10
y<-sin(cos(x/pi))
imageDefs <- getImageDefs()
imageDefs$dispWidth <- 4.5
imageDefs$dispHeight<- 4.5
setImageDefs(imageDefs)
X11(type="cairo")
plot(x,y)
title(main="sin(cos(x/pi))")
2009 Feb 02
2
Sweave
I'm trying to (re)learn Sweave and run into some problems. I use now ubuntu
(8.10), emacs + ess.
Slowly getting upto speed on ess. I have a complete (hopefully) .Rnw file,
but the resulting .tex
will not compile. The file does not contain anything exotic, but it produces
pdf figures, and that
is where the problems come:
library(tools)
> Sweave("varioCoo.Rnw")
Writing to file