Displaying 20 results from an estimated 10000 matches similar to: "no plots in for loop (was RE: (no subject))"
2004 Sep 26
1
(no subject)
Hello R help mailing list,
I'm having difficulty saving a series of figures in an
analysis. I have attempted to save them in a for loop with
the following code:
for(i in 1:20){
sF<-paste("fig",i,".jpeg",sep="")
jpeg(file=sF,width=600,height=500,quality=100,pointsize=12)
attach(plotData)
xyplot(CHC~1:13),
detach(plotData)
graphics.off()
}
If I break
2012 Apr 06
1
Saving multiple plots using tiff function
Dear R experts,
I am trying to save three plots using tiff graphics devices; however the
following code only produces two files (Rplot002.tif and Rplot003.tif)
showing figures 1 and 3. Here is a simplified ex code
tiff(filename ="Rplot%03d.tif",width=24,height=20,units="cm",res=300,
pointsize=10, compression = "lzw")
plot(1)
mtext("Fig
2008 Nov 26
0
Second y-axis
Hi list,
In the following code, how can I place the percentage label away from
numbers in the second y-axis (lets say all should be inside plot area)?
Thanks
Alireza
=================
require(grid)
vp<- viewport(x=.1,y=.1,width=.6,height=.6,just=c("left", "bottom"))
pushViewport(vp)
2010 Jul 08
1
xyplot help
Hi, I am learning xyplot. I have an example dataset attached.
plotdata<-read.table("plotdata.txt",sep='\t',header=T,row.names=1)
head(plotdata,n=4)
y x type
1 -4.309601 -0.7448405 A
2 -4.715421 0.7875994 A
3 -2.310638 0.5455310 A
4 -2.685803 10.4116868 A
xyplot(y~x,groups=type,plotdata, auto.key=T)
This shows different colors for different
2006 Jun 09
1
Saving dns2.plot as a jpg image
Hello,
I am using R 2.2.1 with sn 0.4.0 and am trying to save a dns2.plot as a jpg
file.
Here is the latest version of the code I have tried:
x <- seq(0,200,length=200)
y <- seq(0, 35, length=200)
jpeg(filename = "C:/fig1.jpg", width = 5, height = 4,pointsize = 12, quality
= 100, bg = "white", res = NA)
2008 Nov 04
1
How to create margin area around a graphic made by xyplot
Hi list,
Does any body know how I can create a margin area around the graphic created
by xyplot (the same thing we do using par in plot function)? I tried
viewport, but does not work.
Here is the code:
==============================================
require(grid)
vp<- viewport(x=.1,y=.1,width=.6,height=.6,just=c("left", "bottom"))
pushViewport(vp)
2008 Jun 27
1
Sweave: controlling pointsize (pdf)
Hello,
Is there a way to control pointsize of pdf:s produced by Sweave? I
would like to have the same pointsize from (not a working example)
pdf(file="C:/temp/example.pdf", width=7, height=7, bg="white", pointsize=10)
plot(1:10)
etc..
dev.off()
as
\documentclass[a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[finnish]{babel}
\usepackage[T1]{fontenc}
2009 Aug 20
1
lattice xyplot strip colors and location
Hi all,
I've been trying (unsuccessfully) to modify an xyplot I created using the lattice package. I would like to change default strip colors and locations.
I started with numeric data in 4 columns, which look like this:
0.25 2 1 32
0.25 2 2 30
0.25 2 3 27
0.25 2 4 23
0.25 2 5 17
0.25 3 1 30
0.25
1999 Dec 03
1
R-help Digest V1 #34
R-help Digest Friday, December 3 1999 Volume 01 : Number 034
In this issue:
[R] model.tables
Re: [R] Installing R on Slackware Linux
Re: [R] Installing R on Slackware Linux
[R] nlmin
Re: [R] nlmin
Re: [R] nlmin
Re: Summary: [R] Wanted: online Introduction to R
[R] Applying a function of several variables to data
Re: [R] R and XML -- a near perfect
2004 Nov 19
0
Legend
I have recently converted from S-Plus (Dec Alpha) to R (Mandrake 10.0). The
differences are subtle but in some cases not easily converted. My Splus
Command plotting deck was over 1200 lines and R has simplified this down to
900 lines so far. I do a lot of mapping with polygons and I am trying to
figure out how to increase the default size of the fill boxes in the legend
call. Splus had a
2011 Feb 15
2
Sweave doesn't hand on width of special characters of Computer Modern fonts to LaTeX
Hello R users,
Using R, Sweave and the cmsyase.afm font it is possible to write LaTeX
documents including R figures with text in the Computer Modern Fonts:
\documentclass{article}
\usepackage{Sweave}
\begin{document}
<<echo = false, results = hide>>=
CM <- Type1Font("CM",
c(file.path("C:/texlive/2009/texmf-dist/fonts/afm/public/cm-lgc",
2008 Oct 30
2
xyplot, the first tick mark starts from 2 rather than 1, and also there is a NA as the final tick mark.
I am trying to plot some data, but have got some difficulties with labels on
the tick marks on the x-axes. There are 20 data points. All I want to do is
to plot the Loss versus Lines. When I use xyplot, the first tick mark starts
from 2 rather than 1, and also there is a NA as the final tick mark.
Here is the R code you code give it a try:
Would any body be able to fix this, please?
2003 Jul 25
0
Sweave and Printing Lattice Figures From Loop
Community,
(Windows Xp , 1.7.1, too little memory)
This may have the flavor of an answer in search of a question, but I'll
pose this question: Is their a better way to do the following than what
I'll show below?
Problem:
In Sweave I have multiple figures from lattice, some of which have more
that one page. I can easily figure out the total number of figures I
have created, but its
1999 Oct 04
1
bitmap copies of plots
Michael Lapsley was suggesting on R-help direct copies to gif/png/jpeg.
The following seems to do a sensible job for me of copying the current
device to any bitmap format supported by gs. The manipulation is needed
to work around assumptions made by postscript(), and I think better fixed
in postscript() (but not a couple of days before a release).
I want to make onefile=FALSE work on
2004 Jan 07
1
Sweave and X11 on OSX 10.3
Hi -
I'm running R 1.8.1 (compiled from source) on Mac OS X 10.3 (Panther). I
find that, if Apple's X11 application is not running, Sweave gives an
error when it wants to create a pdf or eps figure. E.g., in the package's
own example-1.Snw file a boxplot is created at chunk 2:
<<fig=TRUE,echo=FALSE>>=
boxplot(Ozone ~ Month, data = airquality)
@
Normally this will create
2005 Oct 12
2
Sharing Problems: huge numbers of share
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
My name is Olivier Gaspard, and I work for the CHC Belgium (IT
department of differents Hospitals).
So, let's me introduce the situation: for the moment, the firm works
with Win NT for the users profiles, and Samba 3.0 on Unix platform for
the "files sharing". Resuming : Every users having a user (NT) profile
(roamming profile)
2004 Oct 26
1
Newbie question about the use of lm and anova
Version of R: Windows Version 2.0.0
The experimental design contains two plant lines - a control (C) and a
mutant (M) - grown out three separate times in plots A, B, C.
The design is unbalanced:
In plot A, 9 control plants were grown with 29 mutant plants.
In plot B, 8 control plants were grown with 20 mutant plants.
In plot C, 8 control plants were grown with 22 mutant plants.
The
2000 Jul 07
2
Question of programming style
This is really a question of how to program this *BETTER*. It works as I have
done it, but is quite ugly.
I want to do a 3d scatterplot of the upper triangle of a matrix, where the
z-values are the values in the matrix, and the row and column indices are the y-
and x-values. The complete (11 by 11) matrix is mmtop94.2. Here is my awkward
code:
mmtop94.2[lower.tri(mmtop94.2)] <- NA
# Here i
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 Nov 20
2
Merge two ggplots
Hello everyone.
I am using ggplot and I need some help to merge these two plots into one.
plot_CR<-function(x,y,agentid,CRagent){
library(ggplot2)
agent<-CRagent[[agentid]] # To make following expression shorter
ggplot((data.frame(x=CRX,y=CRY,sr=agent$sr)))+
geom_point(aes(x,y,colour=cut(sr,c(0,-10,-20,-30,-40,-50,-60,-70,-80))))+
geom_text(aes(x,y,color=cut(sr,