similar to: Multiple xyplots on the same page

Displaying 20 results from an estimated 20000 matches similar to: "Multiple xyplots on the same page"

2004 Feb 23
2
Error in multiple xyplots
Dear R-listers, I got an error when I try to plot two grouped data into a single win.metafile device: library(lattice) trellis.device(device="win.metafile",color=F,filename="Profiles-Var1.wmf") par(mfrow=c(1,2)) # First plot xyplot(log(v)~t|id,data=Con.20, main="Group A: Control, Var-1", xlab="ocasion",ylab="var1", panel=function(x,y) {
2006 Jan 16
1
Legends in xyplot
Hi, How can I add legends in the "xyplot" function, in the "lattice" library? Here is a simulation example: x <- runif(90) z <- sample(1:3, 90, rep=T) y <- rnorm(90, mean = x^2 + z, sd=1) library(lattice) trellis.par.set(col.whitebg()) xyplot(y ~x, groups=as.factor(z), type = c('p', 'smooth'), span = .67) Thanks in advance, Ravi.
2006 Sep 29
2
X-axis labels in histograms drawn by the "truehist" function
Hi, I have a simple problem that I would appreciate getting some tips. I am using the "truehist" function within an "apply" call to plot multiple histograms. I can't figure out how to get truehist to use the column names of the matrix as the labels for the x-axis of the histograms. Here is a simple example: X <- matrix(runif(4000),ncol=4) colnames(X)
2005 Nov 21
4
Can't figure out warning message
Hi, I apologize for the previous posting, where the message was not formatted properly. Here is a better version: I have written the following function to check whether a vector has elements satisfying monotonicity. is.monotone <- function(vec, increase=T){ ans <- TRUE vec.nomis <- vec[!is.na(vec)] if (increase & any(diff(vec.nomis,1) < 0, na.rm=T)) ans <- FALSE
2009 Sep 24
1
superimposing xyplots on same scale
I have two xyplots that i want to superimpose (code below). By default they are displayed on slightly different y scales (one runs from 10 to 25, the other from 10 to 30). I would like to force them both onto the same scale (10 to 30) so the relation between the two is clear. Is there a way to do this? thanks much pct_compl_chart <- xyplot(pct_compl ~ date, col="red",
2008 Jan 30
2
Concatenate xyplots
Dear R-community, I created 5 different xyplots and graphed all of them with the print command on one page (e.g. print(graph1, split=c(1,1,1,5), more = T) ... print(graph5, split=c(1,5,1,5), more =T) Using the above commands separates each graph by a white space. However, since the graphs do share the same x-axis, I was wondering if there is a way to concatenate graph1 through 5 so
2009 Oct 27
2
Print several xyplots to the same page in a pdf file
Hello everybody, I'm using the lattice package and the xyplot to make several graphs like below. However, I can just print the three grouped plots onto one page as I'm putting them into a pdf-file, which gives me a huge amount of pages... Is it possible to put them all, or at least more than one on the same page, for instance put three groups beside each other like columns? ...
2004 May 26
6
Saving Trellis Graphics in R 1.9.0. (PR#6915)
Full_Name: Zdenek Valenta Version: 1.9.0. OS: Windows XP Submission from: (NULL) (147.231.7.250) I could not copy/save (Trelis) graphics using R version 1.9.0. The graphics displayed normally, but copying/saving it only produced an empty file. Everything works o.k. with R rel. 1.8.1. Best regards, Zdenek Valenta
2011 Mar 10
1
Main title in a multiple display of graphs
Hello! I want to display four xyplots in the same window (sorry if I don't use the propers words, but my English is rude) I know that if I use plot(y~x) then x=(1:100) y=(1:100) par(mfrow=c(2,2)) plot(y~x) plot(y~x) plot(y~x) plot(y~x) would give what I want, but this is not the case because I need the functions of xyplot. So I did the following: plot.new()
2006 Apr 18
1
xyplot (PR#8778)
Full_Name: Katell Hamon Version: 2.2.1 OS: windows Submission from: (NULL) (130.226.135.149) I have a problem in : xyplot(df[,v] ~ df$year , [....] ) the error is "Error in df[, v] : object is not subsettable" but this used to run well with versions of R before R 2.1.1 it seems to be a problem with the new way of
2009 Jul 09
2
Lattice xyplot: same scales within one factor
I am using R 2.8.1 and lattice to produce xyplots conditioned on two factors. What I would like is to have the scales be free between values of one factor, but some within. Thus, in the example: xyplot(mpg ~ disp | factor(gear) + factor(cyl), mtcars, scales=list(x=list(relation="free"))) rather than having the x scales be free within a gear as well, I want it to be the same for
2007 Jun 20
4
finding roots of multivariate equation
Hello, I want to find the roots of an equation in two variables. I am aware of the uniroot function, which can do this for a function with a single variable (as I understand it...) but cannot find a function that does this for an equation with more than one variable. I am looking for something implementing similar to a Newton-Raphson algorithm. Thanks. -- Bill Shipley North American Editor for
2002 Jun 05
2
par(new=T) with xyplot
I know I should not mix base plotting functions with grid/lattice functions, but I have used a "quick-and-dirty" trick of par(new=T) in the past for annotating a trellis-drawn graph in various versions of S-PLUS. The sequence goes something like this: > windows(width = 5, height = 5, pointsize = 10) # open up the device > xyplot(y ~ x) > par(new=T) > xyplot(y2 ~ x) >
2008 Apr 09
4
Skipping specified rows in scan or read.table
Hi, I have a data file, certain lines of which are character fields. I would like to skip these rows, and read the data file as a numeric data frame. I know that I can skip lines at the beginning with read.table and scan, but is there a way to skip a specified sequence of lines (e.g., 1, 2, 10, 11, 19, 20, 28, 29, etc.) ? If I read the entire data file, and then delete the character
2010 Jul 23
5
UseR! 2010 - my impressions
Dear UseRs!, Everything about UseR! 2010 was terrific! I really mean "everything" - the tutorials, invited talks, kaleidoscope sessions, focus sessions, breakfast, snacks, lunch, conference dinner, shuttle services, and the participants. The organization was fabulous. NIST were gracious hosts, and provided top notch facilities. The rousing speech by Antonio Possolo, who is the chief
2007 May 25
2
xyplot: different scales accross rows, same scales within rows
Dear list members, I would like to set up a multiple panel in xyplots, with the same scale for all colunms in each row, but different accross rows. relation="free" would set up all x or y scales free... which is not what I want :-( Is this possible? Thank you in advance, Best wishes, Marta
2008 Mar 12
3
Types of quadrature
Dear R-users I would like to integrate something like \int_k^\infty (1 - F(x)) dx, where F(.) is a cumulative distribution function. As mentioned in the "integrate" help-page: integrate(dnorm,0,20000) ## fails on many systems. This does not happen for an adaptive Simpson or Lobatto quadrature (cf. Matlab). Even though I am hardly familiar with numerical integration the implementation
2006 Nov 29
2
How to solve differential equations with a delay (time lag)?
Hi, I would like to solve a system of coupled ordinary differential equations, where there is a delay (time lag) term. I would like to use the "lsoda" function "odesolve" package. However, I am not sure how to specify the delay term using the syntax allowed by odesolve. Here is an example of the kind of problem that I am trying to solve: > library(odesolve)
2007 Feb 01
3
Need help writing a faster code
Hi, I apologize for this repeat posting, which I first posted yesterday. I would appreciate any hints on solving this problem: I have two matrices A (m x 2) and B (n x 2), where m and n are large integers (on the order of 10^4). I am looking for an efficient way to create another matrix, W (m x n), which can be defined as follows: for (i in 1:m){ for (j in 1:n) { W[i,j] <-
2009 Oct 15
4
Generating a stochastic matrix with a specified second dominant eigenvalue
Hi, Given a positive integer N, and a real number \lambda such that 0 < \lambda < 1, I would like to generate an N by N stochastic matrix (a matrix with all the rows summing to 1), such that it has the second largest eigenvalue equal to \lambda (Note: the dominant eigenvalue of a stochastic matrix is 1). I don't care what the other eigenvalues are. The second eigenvalue is