similar to: can the pdf output page break be controlled manually?

Displaying 20 results from an estimated 30000 matches similar to: "can the pdf output page break be controlled manually?"

2008 Feb 27
2
multiple plots per page using hist and pdf
Hello, I am puzzled by the behavior of hist() when generating multiple plots per page on the pdf device. In the following example two pdf files are generated. The first results in 4 plots on one pdf page as expected. However, the second, which swaps one of the plot() calls for hist(), results in a 4 page pdf with one plot per page. How might I get the histogram with 3 other scatter
2010 Nov 10
1
par mfrow in "function" problem
Hi all, I defined the following ############################# myhist=function(x){ hist(x,xlab="",main="") h=hist(x) xfit=seq(min(x),max(x),length=100) yfit=dnorm(xfit,mean(x),sd=sd(x)) yfit=yfit*diff(h$mids[1:2])*length(x) lines(xfit, yfit, col="blue", lwd=2) } ############################# individually, it worked fine however, if I used par(mfrow=c(2,2))
2005 Sep 20
2
why this postscript didn't work?
Hi, List, I used the following codes to generate ps plots but foo.ps contains nothing. Would someone please point out what is wrong with my codes? Thanks a million! postscript('foo.ps') par(mfrow=c(2,1)) par(mfg=c(1,1)) hist(rnorm(100),col='blue') par(mfrow=c(2,2)) par(mfg=c(2,1)) hist(rnorm(50),col='blue') par(mfg=c(2,2)) hist(rnorm(60),col='blue') dev.off()
2013 Oct 08
3
Latin Hypercube Sample and transformation to uniformly distributed integers or classes
Hi, I'd like to use Latin Hypercube Sampling (LHC) in the the context of uncertainty / sensitivity analysis of a complex model with approximately 10 input variables. With the LHC approach I'd like to generate parameter combinations for my model input variables. Therefore I came across an simple example here on the mailing list (
2009 Nov 24
4
Graphic Device - View/get all graphics
Hi Listers, I am producing some graphics that the commands are in a FUNCTION... The problem is that I end up viewing just last graphic and in my FUNCTION there are 4 graphics with the PAR command function... Like those below... How do I view/get the other 3 graphics? Any help? Thanks in advance... histogram<-par(mfrow=c(1,2)) hist(rw_mean_app,main='Bootstrap Method
2008 Jul 17
2
Sampling distribution (PDF & CDF) of correlation
Hi all, I'm looking for an analytic method to obtain the PDF & CDF of the sampling distribution of a given correlation (rho) at a given sample size (N). I've attached code describing a monte carlo method of achieving this, and while it is relatively fast, an analytic solution would obviously be optimal. get.cors <- function(i, x, y, N){ end=i*N
2006 Sep 28
3
complex plots using layout()
Dear r-help, I am trying to plot several scatter plots with marginal histograms on one page. Ideally, a page is equally divided into 4 figure regions. Within each figure region, a scatter plot with marginal histograms will be plotted. I followed Dr. Paul Murrell's code released online to successfully plot the scatter plot with marginal histograms. The code applies "layout()" to
2009 Nov 17
1
Plotting graphs using FOR loop
I have the following codes but can anyone make it shorter i.e making these FOR loop into one loop ... thanks... par(mfrow=c(2,4)) for(i in 16:23){ hist(data[,i],main=paste(colnames(data)[i],sep=""),ylab="Frequency",xlim=c(1,5),xlab="Score",ylim=c(0,100)) } png("histogram.png") dev.off() par(mfrow=c(2,4)) for(i in
2001 May 07
1
unexpected breaks in hist
Hello R-list, I've been using hist to plot histograms of some data, but I get variable numbers of bins. I understood from reading the help file that breaks will set the number of bins. Please correct me if I'm wrong. I'm plotting measures from subsets of a larger data set. Depending on the data subset the number of bins varies despite having set breaks to 5 in all cases. See
2011 Feb 19
3
Kolmogorov-smirnov test
Is the kolmogorov-smirnov test valid on both continuous and discrete data? I don't think so, and the example below helped me understand why. A suggestion on testing the discrete data would be appreciated. Thanks, a <- rnorm(1000, 10, 1);a # normal distribution a b <- rnorm(1000, 12, 1.5);b # normal distribution b c <- rnorm(1000, 8, 1);c # normal distribution c d <- rnorm(1000,
2003 Sep 14
1
title for plot contain 4 subplots
Hi, I'm plotting 4 graphs on one page (2x2 matrix) but I cant seem to get the title for the whole page right. I'm doing: op <- par(mfrow = c(2,2), pty="s") hist(var$V2, breaks="FD",main="Euclidean Metric", xlab="Sum of 3NN ... hist(var$V2, breaks="FD",main="Manhattan Metric", xlab="Sum of 3NN ... hist(var$V2,
2012 Mar 13
1
size of graphs when using multiple figures by row
Hi all, I have a basic question concerning graphs in R. I?m using the par() function and I?m working with multiple figures by row (mfrow) but my the hight of my figures become compressed. I have 4 rows and 2 columns (because I want to plot 8 histograms (freq = FALSE ) on it. I know I can adapt my margins with for example ?oma? and ?mai? but I don?t know how to choose the size of the figure? I
2005 Aug 19
1
multiple plots in png output
I am using R version 1.9.1 under Linux. In the past I have had no problem saving a multi-plot page to a postscript or png device. However, the last time I did this may have been under a previous version of R. Presently nothing I do seems to succeed in saving multi-plots, defined (for example) with mfrow=c(2,2) ... plot(..) .. plot(..) The same problem has occurred using hist() and plot(). These
2007 Jun 19
1
: create a PDF file (text (print list) and grafics)
Dear helpers, I need help to create a PDF file like the example ----------------------------------- | Title | ----------------------------------- | | | Text (print a list) | | | ----------------------------------- | | | | | | | image | image | | | | | | | -----------------------------------
2008 Sep 19
2
family="mono" does not work (PR#12931)
Full_Name: Jaan Vajakas Version: 2.7.2 OS: Windows XP Submission from: (NULL) (193.40.5.245) When I execute the following code in the R GUI, the text "mono" is printed in monotype font in the first plot, but in normal (sans-serif) font in the remaining three plots: op=par(mfrow=c(2,2)) for (i in 1:4) { hist(1:10,xlab="") mtext("normal",side=1,line=2)
2006 May 19
1
edit/environment bug??
I sent the query below out to 'cran at r-project.org' which was probably not appropriate. I seem to have run into some weird behavior concerning the latest Windows version 2.3.0 of R. It does not happen in 2.2.1. I have reduced it to a very simple exersise and I attach the workspace after things are messed up. That workspace is no longer readable by R 2.2.1. <<.RData>>
2010 Dec 18
3
use of 'apply' for 'hist'
Hi all, ########################################## dof=c(1,2,4,8,16,32) Q5=matrix(rt(100,dof),100,6,T,dimnames=list(NULL,dof)) par(mfrow=c(2,6)) apply(Q5,2,hist) myf=function(x){ qqnorm(x);qqline(x) } apply(Q5,2,myf) ########################################## These looks ok. However, I would like to achieve more. Apart from using a loop, is there are fast way to 'add' the titles to be
2013 May 27
1
Plot histograms in a loop
Hi, Try either: set.seed(28) stats1<- as.data.frame(matrix(rnorm(5*10000),ncol=5)) pdf(paste("test",1,".pdf",sep="")) par(mfrow=c(2,1)) lst1<- lapply(names(stats1),function(i) {hist(stats1[,i],100,col="lightblue",main=paste0("Histogram of ",i),xlab=i );qqnorm(stats1[,i])}) dev.off() #or
2009 Dec 12
3
help with graphing -- Points in my graph are not apparent, always displayed in steps
I am trying to graphically represent a large set of data who's result is not strictly uniform. http://n4.nabble.com/file/n961629/egraph_rules_list_2.png The scatter plot to the left has all of the data rising in steps however I know that there are cases within my data that do not fit the dotted line. temp<-edat[edat$R1SC>0,,]
2007 Apr 13
3
labels cut partially on hist
Dear List, I have the following function where I plot on one page a histogram and a boxplot. I use option labels = TRUE in hist to show labels. However the label on the highest bar in the histogram is not showing entirely. How can I correct this? Thanks for any suggestions? histtst <- function(n = 100,...){ set.seed(15) # makes rnorm reproducible par(mfrow = c(2,1)) x <-