similar to: lattice, xyplot layout questions

Displaying 20 results from an estimated 10000 matches similar to: "lattice, xyplot layout questions"

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
2008 Jul 10
2
xYplot customizing y-axis scaling
Dear list, using the packages Hmisc and lattice i produced some nice xYplots. However, since the data range of the conditioning variable is very big, i need to define more than one y-scale for the plot (in some panels you just see a flat line of data points very close to the x-axis), e.g. different y-axis scales for the different rows of the plot. Is there a way to do so? Thanks, Henning
2011 May 10
1
specifying scales in lattice xyplot makes the lines disappear?
I have a dataframe concerning manner of death from death certificates, from 2005 to 2009 inclusive, with the following structure: > str(MannerYoung.plot.data) 'data.frame': 245 obs. of 4 variables: $ year : Factor w/ 5 levels "2005","2006",..: 1 2 3 4 5 1 2 3 4 5 ... $ manner : Factor w/ 7 levels "Accident","Homicide",..: 1 1 1
2008 May 06
1
Spacing between lattice panels
I'm trying to set up a lattice plot with two y-axes for each panel. (Yes, I know that multiple y-axes are generally a bad idea; the graph is for someone else and they want it that way.) I've used a custom yscale.component in xyplot to achieve this: myyscale.component <- function(...) { ans <- yscale.components.default(...) ans$right <- ans$left foo <-
2013 Jul 20
2
Different x-axis scales using c() in latticeExtra
Hi, I would like to combine multiple xyplots into a single, multipanel display. Using R 3.0.1 in Ubuntu, I have used c() from latticeExtra to combine three plots, but the x-axis for two plots are on a log scale and the other is on a normal scale. I also have included equispace.log=FALSE to clean up the tick labels. However, when I try all of these, the x-axis scale of the first panel is used
2008 Aug 08
1
Lattice: regression lines within grouped xyplot panels
Dear community, I am looking for a possibility to draw 'regression lines' instead of 'smooth' lines in grouped xyplots. The following code should give you a small example of the data structure. library(lattice) data(Gcsemv, package = "mlmRev") # Creates artificial grouping variable ... Gcsemv$Groups <- ifelse(as.numeric(as.character(Gcsemv$school))>65000,
2008 Feb 05
2
dynamically add items to key of lattice xyplot
Hi all, is it possible to dynamically add key items to an already existing key, belonging to a lattice xyplot? This is what I do: I make an xyplot with an initial key. Later on, I want to extend this key with more items, as more lines are added to the plot (lines are added using trellis.focus("panel")). I guess I need some function to access the key panel in order to extend it,
2004 Aug 19
3
More precision problems in testing with Intel compilers
The Intel compiled version also fails the below test: > ###------------ Very big and very small > umach <- unlist(.Machine)[paste("double.x", c("min","max"), sep='')] > xmin <- umach[1] > xmax <- umach[2] > tx <- unique(outer(-1:1,c(.1,1e-3,1e-7)))# 7 values (out of 9) > tx <- unique(sort(c(outer(umach,1+tx))))# 11 values
2003 Oct 20
1
controling x-labels in xyplot (lattice) when x is POSIX object
Hi, V1.8.0 seems to allow DateTimeClasses as the x argument in xyplots (lattice). For example: x <- seq.POSIXt(strptime("2003/01/01", format = "%Y/%m/%d"), strptime("2003/10/01", format = "%Y/%m/%d"), by = "month") y <- rnorm(length(x)) dat <- data.frame(x= x, y = y) xyplot(y ~ x, data = dat, type = "b")
2009 Apr 15
1
Lattice xyplot with text under x-axis
Hi All, I have a data set which I need to plot and show the values of one of the variables as a second x-axis. library(lattice) year<-c(2001,2002,2003,2004,2005,2006) fac<-c("arts","arts","arts","sci","sci","sci") staff<-c(95,98,99,32,31,36) part<-c(32,31,33,15,16,14) df1<-data.frame(year,fac,staff,part)
2009 Feb 20
4
adding a reference line to an xyplot
Hi, I want to add a dashed vertical line to a number of xyplots. Here is a simple script of the type of plot I have but then I want to add a reference line to 1995 on each of the panels. I have tried panel.abline and other suggestions on the forum but can't get it to work. plot<-rep(letters[1:3],each=10) year<-rep(1991:2000,times=3) matter<-rep(seq(2,6.5,0.5),times=3)
2004 Mar 31
3
Maximum number of connections in R
It appears that the maximum number of connections available in R is about 48. Can anyone tell me how to bump this number up? I've been perusing the source, but any info would speed things up. Is there a reason that it was set to such a low number? Thanks for any help. -Frank
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
2009 Jul 31
1
xyplot with 2 panels and 2 different x-scales
Hi All, I have this data: type<-c("country","country","country","world","world","world") place<-c("A","B","C","A","B","C") rank<-c(1,3,5,512,420,320) df1<-data.frame(type,place,rank) and need to produce an xyplot with 2 panels, where the x-values are labelled:
2004 Feb 09
2
moments, skewness, kurtosis
I checked the help and the mailing list archives, but I can find no mention of a routine that calculates higher moments like skewness and kurtosis. Of course, these are easy enough to write myself, but I was thinking that they MUST be in here. Am I wrong? Thanks. -Frank
2005 Nov 15
1
combination xyplot and barchart?
Dear R community, I am having trouble determining how to create the graph I want utilizing my relatively limited knowledge of R. So far I have been using the lattice library to create most of what I need. The dataset (enviro) consists of 2 variables (Temp and Precip) for each Day of a 2-yr period (Year). I wish to display Temp and Precip along the y axis plotted by Day on the x axis to allow
2007 May 26
1
lattice: aligning independent graphs
I find myself wanting to plot three graphs side by side 'as if' they were panels -- that is, with the same y-axis limits, no space between the graphs, and precise vertical alignment of the plot areas. However, I don't want strip titles; I want each graph to have its own x-axis label, on the bottom of the plot. The best way I have so far found to do this is to fake up a data frame that
2011 Apr 06
2
Layout within levelplot from the lattice package
Hi, I'm a novice with levelplot and need some assistance! Basically, I want a window which contains 6 levelplots of equal size presented in 3 columns and 2 rows. I've tried to approach it two ways. The first way leads to this question: Is there any way to concatenate levelplots from a factor vertically as opposed to horizontally? I'd like to pair the levelplots by factor.2 on
2010 Feb 07
2
conditioned xyplot, many y variables
The example below creates parallel time-series plots of three different y variables conditioned by a dichotomous factor. In the graphical layout, ? Each y variable inhabits its own row and is plotted on its own distinct scale. ? Each level of the factor has its own column, but within each row the scale is held constant across columns. ? The panels fit tightly (as they do
2005 Nov 22
2
change axis format for different panels in xyplot in lattice
Dear R users, My apologies for a simple question for which I suspect there is a simple answer that I have yet to find. I'd like to plot panels in lattice with different graphical parameters for the axes. For example, the code x<-rnorm(100) y<-rnorm(100) z<-c(rep(1,50), rep(2,50)) library(lattice) xyplot(y~x|z) plots two panels with the default black axes. Running the following