similar to: xyplot with 2 panels and 2 different x-scales

Displaying 20 results from an estimated 2000 matches similar to: "xyplot with 2 panels and 2 different x-scales"

2009 Jun 16
1
xyplot format axis
Hi All, I'm trying to format the y-axis in an xyplot to show numbers with a comma separating the thousands but I'm not able to do it using formatNum(y, big.mark=","). This is what I have: library(lattice) year<-c(2003,2004,2005,2006,2007,2008,2003,2004,2005,2006,2007,2008)
2010 Sep 27
1
conditional assignment of colors in xyplot()
# Dear R Community, # I have this data frame: df1 <- data.frame( F1 = factor( c( rep("D1",12),rep("D2",12),rep("D3",12) ) ), F2 = factor( rep( rep( paste("O",1:6,sep=""), rep(2,6) ), 3) ), F3 = factor( rep( c("V1","V2"), 18 ) ), S1 =
2010 Nov 08
1
Add values of rlm coefficients to xyplot
Hello, I have a simple xyplot with rlm lines. I would like to add the a and b coefficients (y=ax+b) of the rlm calculation in each panel. I know I can do it 'outside' the xyplot command but I would like to do all at the same time. I found some posts with the same question, but no answer. Is it impossible ? Thanks in advance for your help. Ptit Bleu. x11(15,12) xyplot(df1$col2 ~
2009 Aug 18
1
second y-axis in lattice xyplot
Dear R-help, I recently discovered lattice xyplot, but have been struggling with plotting a second y-axis. I am able to do this with plot() but can't figure it out in xyplot. Any help would be appreciated. I have found help on adding a second Y-axis when the data is all part of the same data frame, but I have two different data frames. Both data sets are being plotted against "Date".
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)
2008 Aug 13
3
Comination of two barcharts and one xyplot
Hi Rhelpers, I would like to have some help with a plot which is beyond my capabilities. This plot that I am seeking involves an overlay of two different barcharts and one xyplot. The code that I have used is the following : #save(df1,file="M:\\KBR\\df1.RData") load(file="M:\\KBR\\df1.RData") # df1$Year.ord created to obtain the right order i.e. 2015M < 2015K
2004 Jun 11
1
lattice: cumsum and xyplot
I want to display cumulative summary functions with lattice. First I tried to get cumulated data: library(lattice) data(barley) d.cum <- with( barley, by( yield, INDICES=list(site=site,year=year), FUN=cumsum ) ) I got a list of vectors. I tried to get a dataframe which I could use in xyplot. But neither of the following functions led to the goal: d.cum.df1 <-
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
2017 Oct 10
1
About multiple panels with limited space in-between
Hi R users, I have a question about plotting. The following two datasets are an example. What I have in mind is like the attached figure, but just have two rows, top row is for DF1, bottom row is for DF2. The top and bottom rows, have x-axis as var1, var2, var3, etc, while the y-axis represents A. For each row, only the leftmost panel has y-axis ticks and label. For the two rows, only the bottom
2003 Jun 05
1
scales in xyplot doesn't seem to work for x axis
Hi I'm doing a xyplot and I wand to reduce the number of tick marks in the x axis. My x axis are month and I want to reduce the 12 tick marks to 4. I used the scales argument but it doesn't seem to work, althougth it works on y axis if I use scales=list(tick.number=4).
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
2005 Apr 01
1
Ordering scales in xYplot.Hmisc
Dear R community, I am using xYplot() from the Hmisc package. The package works great to plot means + CI. But I am having issues handling the scales. I am plotting "Soil Clay content" vs "Soil depth" by "land use". Usually in this type of graphs it is better to place the variable "soil depth" in the y-axis and it should be ordered downward by depth (0-5
2007 Oct 09
2
lattice/xyplot: horizontal y-axis labels with scales(relation="free")
I would like to create an xyplot with varying y-axis limits and horizontal labels at the y-axis tickmarks. The following does not seem to work, although I think it should, going by the documentation for par. R version 2.5.1, Windows XP Prof. Thanks for a clue. Andreas Krause library(lattice) # axis labels for y-axis are horizontal xyplot(Sepal.Length ~ Sepal.Width | Species, data=iris) #
2007 Jan 08
1
finer control of scales in xyplot
When plotting over multiple pages in lattice, I'd like to be able to have "same" scales within a page, but "free" scales between pages. In other words, something like: z<-data.frame(x=1:100, y=runif(100), d=rep(1:2,50), p=rep(1:2,each=50)) plot<-xyplot(y~x|d*p, data=z,
2008 May 18
1
How to change col and pch between panels in xyplot
Dear R-helpers, x <- rep(1:2, 4) y <- c(2, 4, 3, 5, 1, 3, 2, 4) w <- factor(rep(1:2, each = 4)) v <- rep(1:2, each = 2, 2) xyplot(y ~ x | w, groups = v, type = 'b') How do I tell xyplot to use four colors and four plot characters and four line types? And how do I set up an appropriate key in each? _____________________________ Professor Michael Kubovy University of Virginia
2008 Sep 02
2
annotating individual panels produced by xyplot
Hi all, I'm new to R and lattice and panel functions. I've produced a lattice graph using xyplot. Now I would like to add various, and *different*, annotations to each individual panel. I tried something like this, using panel.text ... <code> xyplot(dent ~ era | vegzone, groups=seedtype, panel=function(...) { panel.xyplot(...)
2006 Aug 29
2
lattice/xyplot: plotting 4 variables in two panels - can this be done?
Hi, I would like to create a plot of y1,y2,y3,y4 against x for several subjects such that y1 and y2 are plotted against x in one panel and y3 and y4 against x in another panel. Thus if there are 3 subjects I should end up with 6 panels. Is there a simple way of doing so (i.e. without calling xyplot() several times, and then padding the results together)?? Regards S?ren
2007 May 08
1
Separate x-axis ticks for panels in xyplot()?
Dear r-helpers, In an xyplot I have xyplot(y ~ x | c, groups = g, scales = list( x = list( at = v1, labels = c('A', 'B', 'C', 'D'), rot = 45 ) ) ) g consists of two groups. How do I define a different set of x ticks and labels for the second panel? I'm looking for something like xyplot(y ~ x | c, groups = g, scales = list( x =
2009 Jan 30
0
How to generate a xyplot with multiple panels using an empty data frame ?
Hi: I am coding some interactive interface using an xyplot from lattice. When a user clicks on a panel of the xyplot, a simulation is executed and the resulting data is plotted on the corresponding panel. The problem is that I start with an empty data frame and only fill it as the user request data from simulations. And, I have found it impossible to create a conditional plot that contains panels
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,