search for: oldpar

Displaying 20 results from an estimated 75 matches for "oldpar".

1998 May 24
1
R-beta: problem with graphics parameter "fin"
Hi, I have the following problem (with R 0.61.3 an Linux, and a new and empty workspace) > oldpar<-par() > par(oldpar) Error: attempt to set invalid value for graphics parameter "fin". > oldpar$fin [1] 6.992034 6.990803 but now: > oldpar$fin <- c(6.99,6.99) > par(oldpar) it works. It seems, that if I set oldpar$fin to values greater than listed above (6.9920...)...
2005 Apr 29
2
Automating plot labelling in custom function in lapply() ?
Dear List, Consider the following example: dat <- data.frame(var1 = rnorm(100), var2 = rnorm(100), var3 = rnorm(100), var4 = rnorm(100)) oldpar <- par(mfrow = c(2,2), no.readonly = TRUE) invisible(lapply(dat, function(x) { plot(density(x), main = deparse(substitute(x))) } ) ) par(oldpar) I want to the main title in each of the density plots to b...
2006 Oct 08
2
Size problem with two dotcharts side by side
Dear all, I'm trying to produce two dotcharts side-by-side within a Sweave document. When I'm compiling this example: \documentclass{article} \begin{document} <<fig=T,width=8,height=4>>= par(mfrow = c(1, 2), cex = 0.7) for(i in 1:2) dotchart(1:10) @ <<fig=T,width=8,height=4>>= par(mfrow = c(1, 2), cex = 0.7) for(i in 1:2) hist(1:10) @
2016 Apr 21
2
clock24.plot/radial plot
...The script below has a result I am looking for: testlen<-rnorm(24)*2+5 testpos<-0:23+rnorm(24)/4 clock24.plot(testlen,testpos,main="Test Clock24 (lines)",show.grid=FALSE, line.col="green",lwd=3) if(dev.interactive()) par(ask=TRUE) # now do a 'daylight' plot oldpar<-clock24.plot(testlen[7:19],testpos[7:19], main="Test Clock24 daytime (symbols)", point.col="blue",rp.type="s",lwd=3) # reset everything par(oldpar) I tried to play with the script to work with my data. I read my data: swe<-scan("onedaydata",list...
2010 Jun 23
5
Plotrix Trick
...e other way around: leave the data as is, but use a color log scale. Many thanks Lorenzo library(plotrix) set.seed(1234) myseq <- abs(rnorm(25)) myseq[20] <- 100 #introduce outlier! A <- matrix(myseq, ncol=5,nrow=5) #nasty looking figure pdf("test_color_scale.pdf") oldpar<-par( mar = c(4.5,5, 2, 1) + 0.1, cex.axis=1.4,cex.lab=1.6,cex.main=1.6) color2D.matplot(A,main="Title",c(0.2,1),c(0.2,0.5),c(0,0), xlab = "", ylab="", show.legend=TRUE, show.values=1,vcol="black",vcex=1, axes=FALSE) ## axis(1,at=c(0.5,1.5,2.5,3.5,4.5)...
2003 Jan 08
2
Problem with fontsize of pie-chart in postscript file
...;I", "H", "G", "K", "V") lineItems <- c(6252,943605,271207,517764,44108) orders <- c(2084,226894,49218,164056,15809) value <- c(1380425,87743481,35212459,76346384,10403599) count <- c(52,17571,261,53270,843) col = gray(seq(0.2,.8,length=6)) oldpar <- par() par(cex=2) #postscript("c:/temp/1.eps", onefile = FALSE) pie(lineItems, labels=labels, col=col, density=15, angle = 15 + 10 * 1:6) #dev.off() postscript("c:/temp/2.eps", onefile = FALSE) pie(orders, labels=labels, col=col, density=15, angle = 15 + 10 * 1:6) dev.off...
2016 Apr 22
0
clock24.plot/radial plot
...looking for: > testlen<-rnorm(24)*2+5 > testpos<-0:23+rnorm(24)/4 > clock24.plot(testlen,testpos,main="Test Clock24 (lines)",show.grid=FALSE, > line.col="green",lwd=3) > if(dev.interactive()) par(ask=TRUE) > # now do a 'daylight' plot > oldpar<-clock24.plot(testlen[7:19],testpos[7:19], > main="Test Clock24 daytime (symbols)", > point.col="blue",rp.type="s",lwd=3) > # reset everything > par(oldpar) > > I tried to play with the script to work with my data. I read my data: > swe&lt...
2007 Dec 27
1
warning on gamma option in par(args) or calling par(= new)?
Dear All, I have the following function tstpar <- function(n = 200, want.pdf = FALSE, pdfFileName = NULL){ oldpar <- par(no.readonly = TRUE) on.exit(par(oldpar)) steps <- seq(from = 1, to = 8, by = 1) h <- 10; w <- 6 if(want.pdf){pdf(file = pdfFileName, onefile = TRUE, paper = "letter", width = w, height = h)} par(mfrow = c(4,2)) for(i in steps){ txt &lt...
2016 Apr 22
2
clock24.plot/radial plot
...orm(24)*2+5 >> testpos<-0:23+rnorm(24)/4 >> clock24.plot(testlen,testpos,main="Test Clock24 >> (lines)",show.grid=FALSE, >> line.col="green",lwd=3) >> if(dev.interactive()) par(ask=TRUE) >> # now do a 'daylight' plot >> oldpar<-clock24.plot(testlen[7:19],testpos[7:19], >> main="Test Clock24 daytime (symbols)", >> point.col="blue",rp.type="s",lwd=3) >> # reset everything >> par(oldpar) >> >> I tried to play with the script to work with my data. I r...
2006 Dec 01
3
Make many barplot into one plot
...end.text=rownames(tiga), ylim = c(0, max(colSums(tiga)) * 1.2)) x11() barplot(empat, beside=TRUE, legend.text=rownames(empat), ylim = c(0, max(colSums(empat)) * 1.2)) ## I can make all barplot above into one plot with x11(width=11,height=8) ## Make a plot with 2 rows and 2 columns oldpar <- par(mfrow=c(2,2), barplot(above) par(oldpar) ## Are there any functions to make all barplot above into one plot? ## I would like to produce barplot like: | | | | | | | | | | | | | | | | | | |pos|neg|pos|neg|pos|neg|pos|neg| |p...
2004 Jun 11
2
Sweave and multiple graphs
Dear list, I am using Sweave to build a small report. I want to produce a series of figures, each figure containing a number of plots and then have them included in the Sweave file. An example would be to : postscript(file = "ANCbwplot%03d.eps", onefile = FALSE, other options...) oldpar <- par(mfrow = c(2,2)) .... do lots of plots to produce a number of eps files .... par(oldpar) dev.off() The example in the Sweave FAQ shows how to do something similar for cases where you know how many figures there are, but I do not know how many figures will be produced so want to produce...
2010 Mar 09
3
Fine Tuning Plotrix
Dear All, Please see the code snippet at the end of the email. I am using the color2D.matplot in Plotrix to plot a matrix. It works great, but there are a few things I cannot figure out (1) the value of cex.axis in the code snippet does not seem to affect the final pdf at all (at least on my system, Ubuntu 9.10, plotrix and Cairo installed from cran). How do I specify the size of the axis ticks
2009 Apr 26
7
Bumps chart in R
...ordafrika", "Sydasien","?Stasien og stillehaveet", "Kina", "Brasilien") poor_1990 <- c(28.7,46.7,0.5,10.2,2.3,43,29.8,33,14) poor_2004 <- c(18.1,41.1,0.9,8.6,1.5,30.8,9.1,9.9,7.5) poor <- cbind(poor_1990,poor_2004) rownames(poor) <- countries oldpar <- par(no.readonly=T) par <- par(mar=c(15,5,5,1)) png("poor.png") par <- par(mar=c(15,5,5,1)) barplot(t(poor[order(poor[,2]),]),beside=T,col=c(1,2),las=3,ylab="% poor",main="Percent living for < 1 USD per day (1993 prices)",ylim=c(0,50)) legend("toplef...
2003 Nov 26
0
pdf files, change in content
...ted works as I would expect. **************** platform powerpc-apple-darwin6.8 arch powerpc os darwin6.8 system powerpc, darwin6.8 status major 1 minor 8.1 year 2003 month 11 day 21 language R Mac OS 10.2.8 ***************** The programme I have used as a test is: oldpar <- par(no.readonly=TRUE) postscript("test.eps", onefile=TRUE, bg = "white", family= "Times", paper = "A4", horizontal = TRUE) par(omi=c(0.5,0.5,0.5,0.5)) plot(1:10,type = "p") text (5, 5, labels = "Hello world", cex = 1.5) par(oldpar)...
2005 Sep 16
1
How to make two figures in one plot - package vcd
...olumns in package vcd. Here an example code I take from "\library\vcd\html\plot.loglm.html" What I need, I want to make two figures in one plot. How could I do that. I have tried with layout(rbind(c(1, 1, 2, 2))) but the same result, two plot. Best wishes, Muhammad Subianto library(vcd) oldpar <- par(mfrow=c(1, 2)) ## mosaic display for PreSex model data(PreSex) fm <- loglm(~ PremaritalSex * ExtramaritalSex * (Gender + MaritalStatus), data = aperm(PreSex, c(3, 2, 4, 1))) ## visualize Pearson statistic plot(fm, split_vertical = TRUE) ## visualize LR statistic plot(fm, s...
2005 Apr 29
0
Automating plot labelling in custom function in lapply( ) ?
...z > > On Fri, 2005-04-29 at 13:00 +0100, Gavin Simpson wrote: > > Dear List, > > > > Consider the following example: > > > > dat <- data.frame(var1 = rnorm(100), var2 = rnorm(100), > > var3 = rnorm(100), var4 = rnorm(100)) > > oldpar <- par(mfrow = c(2,2), no.readonly = TRUE) > > invisible(lapply(dat, > > function(x) { > > plot(density(x), > > main = deparse(substitute(x))) } > > ) > > ) > > p...
2012 Sep 06
1
Change margin size of complex barplot
...e font size of "text" and "ylab" names from 1 to 2. Unfortunately I'm not able to adjust the margin so, that the plot is appers complete (all names readable) on a 8:14 Inch scale plot. Some times I get the error message that the margin borders are to big (if I increase the oldpar value), sometimes nothing happens , I have no clue why. Can anyone help me? Thank you Michi -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: geo_barplot_percentage_top10.txt URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120906/89...
2008 Nov 13
1
Boxplots with different variables and different ranges in R
.... Actually I have a large dataset, around 35 water quality variables with different units and of course in different ranges (some are orders of magnitude bigger than others). I want to produce one diagram with all the boxplots of the variables of my dataset. I tried these series of commands: >oldpar <- par(mfrow=c(1,ncol(R))) > invisible(apply(R, 2,boxplot)) > for (i in 1:ncol(R)) boxplot(R[,i], main=colnames(R)[i]) > par(oldpar) (where R is the name of my dataset) The problem is that after the second command, there is an error in plot.new( ): figure margins too large. Is there...
2006 May 12
4
Title of page with multiple plots
I want to place four plots on a page, and I would like to have all four plots share a common title. I have tried the following code, but the title is centered over the fourth graph and not centered across all four plots. Does anyone have any suggestions? R 2.1.1 windows xp oldpar<-par(mfcol =c(1,4),ask=TRUE) plot(p,varp) plot(p,SEp) plot(p,CVp) plot(p,ppval) title(paste("P and 95%CI for a sample size of",n,"subjects.")) Thanks, John John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics Baltimore VA Medical Center GRECC and University of Ma...
2004 Jun 11
1
space-time k function problem
...t;y", "t") manufac23<-read.table('d:/dissertation/dailynew/jun10/manufac23.txt', sep=",") names(manufac23)<-c("x", "y", "t") bur2 <- stkhat(manufacpt, manufac23$t, countiespt, c(34060, 37712), seq(1,60,60), seq(91,1005,60)) oldpar <- par(mfrow=c(2,1)) plot(bur2$s, bur1$ks, type="l", xlab="distance", ylab="Estimated K", main="spatial K function") plot(bur2$t, bur2$kt, type="l", xlab="time", ylab="Estimated K", main="temporal K function") pa...