similar to: control span in panel.loess in xyplot

Displaying 20 results from an estimated 10000 matches similar to: "control span in panel.loess in xyplot"

2013 May 02
3
Lattice xyplot multipanels
Derar Rxperts, I have a strange situation.. I see curly brackets around "strip.levels" in multipanel strips while using lattice::xyplot. .How do I get rid of the curly brackets? For some reason, I am not able to reproduce the problem using an example below... Any suggestions are highly welcome! Thanks, Santosh q <-
2010 May 09
1
lattice: customising panel.segments using groups
Hi, I want to customise the segments on an xyplot. Below is a simple example of what I'm trying to do... #Example dataset x <- c(-0.25, 0.25, 0.8) y <- c(-0.5, 0, 0.75) gp <- c("A", "I", "C") my.data <- cbind.data.frame(x,y,gp) #setting up the parameters to customise the lines with. ltype <- c(1,2,3) env.col <-
2009 Mar 23
1
using xyplot
Dear R-sians! I am trying generate a bunch of xyplots library(lattice) myPanel <- function(x,y,xl=range(x),yl=range(y),...) { panel.xyplot(x,y, pch=20,col='blue',cex=0.7,xlim=xl,ylim=yl,...) panel.abline(v=0, col='gray30',lty=2,lwd=1.5,...) panel.loess(x,y, span=2/3,family='gaussian',normalize=T,col='red',lwd=1.5,...) #
2006 Nov 23
1
loess lines in xyplot with two or more variables on the left side of a formula
Hello: I recall something like this being discuss recently, but I can't seem to locate an example in the archives. I have data like the following: df <- expand.grid(1:4, 1992:2002) names(df) <- c("MSA", "YEAR") df$IDUPREV <- runif(44) df$VALIDAT <- rnorm(44) I want to create an xyplot() with separate loess lines for each series (IDUPREV and VALIDAT) in
2013 Jun 10
1
Using Lattice, LatticeExtra - Hide right and top axes in multipanel plots
Dear Rxperts, How do I hide the top and right axes in multiple panel plots? A couple of examples are provided below.. Would highly appreciate appreciate your assistance.. #Example 1 library(latticeExtra) xyplot((1:200)/20 ~ (1:200)/20, type = c("p", "g"), scales = list(x = list(log = 2,alternating=0), y = list(log = 10,alternating=0)), xscale.components =
2010 Apr 09
2
lattice background grid
Hi, I wonder if anyone knows how to control color and darkness of the background grid generated by ' type = c("g", "p") ' in a lattice plot (e.g., in xyplot). The documentation does not seem to offer a way to change them. Thanks a lot! Wen
2009 Sep 28
1
xyplot help - colors and break in plot
Dear List, I am new to lattice plots, and am having problems with getting my plot to do what I want. Specifically: 1. I would like the legend to have the same symbols as the plot. I tried simpleKey but can't seem to get it to work with autoKey. Right now my plot has dots (pch=19) and my legend shows circles. 2. I have nine groups but xyplot seems to only be using seven colors, so two
2010 Apr 19
2
Overlay of barchart and xyplot
Hello R Folks, I am new to R. I have been struggling to overlay a barchart with a xyplot together on one plot but did not get this worked out. Any help and idea are greatly appreciated. I attached R scripts for barchart and xyplot below and also data I used. What I am trying to do is just to put the barchart and xyplot together on one plot. Huapeng <<dispersal_infestation.csv>>
2009 Jun 14
1
learning about panel functions in lattice
Hi All, I am trying to understand panel functions. Let's use this example. library(lattice) time<-c(rep(1:10,5)) y <-time+rnorm(50,5,2) group<-c(rep('A',30),rep('B',20)) subject<-c(rep('a',10),rep('b',10),rep('c',10),rep('d',10),rep('e',10)) myData <-data.frame(subject,group,time,y) head(myData) Plot 1 xyplot(y ~ time
2010 May 14
2
help color coding map in R
I am trying to create a map with selected states based on highest to lowest mean cost. The following code properly selects the correct states, and the legend is properly color coded with ranges, but the colors per range does not match the state colors. I need help getting the state colors to match the ranges outlined in the legend. I have tried ordering the mean amounts and this correctly creates
2010 Jun 22
2
Lattice legend
I have a moderately complex graph with three panels. There are data points plotted, and fitted lines are added using a panel function, which includes "with(alt.data[[which.packet()[1]]]" statements. It all graphs out beautifully, but none of the usual tricks to get the proper legend to plot are working, i.e., using auto.key, key, etc. One message I keep getting is Error in
2012 Apr 19
1
Fwd: User defined panel functions in lattice
Hi ilai Thank you for your suggestions. I do not know what happened yesterday I must have omitted a few changes out in going from R to email and apologies for the double posting - I had troubles sending it as my ISP gave a message of not being connected for email but was for the web I was trying to get panel.Locfit to work in a number of situations. 1. Conditioned by Farm (3 panels) with 2
2006 Oct 05
2
xyplot
Hi, for the data below: time<-c(rep(1:10,5)) y<-time+rnorm(50,5,2) subject<-c(rep('a',10),rep('b',10),rep('c',10),rep('d',10),rep('e',10)) group<-c(rep('A',30),rep('B',20)) df<-data.frame(subject,group,time,y) I'd like to produce a plot with a single pannel with two loess curves one for each group. the code below does
2009 Oct 03
1
Problem using with panel.average in Lattice package
Hi, I'm having a problem getting the panel.average function to work as I expect it to in a lattice plot. I wish to draw lines between the averages of groups of y-values at specific x-values. I have created a dataset below which is similar to my real data. I also show an example of using panel.loess in place of panel.average; it performs in a manner similar to what I want panel.average to do
2009 Dec 31
1
xyplot - help with multiple Y's vs. X of a member data in multiple panels
Dear R experts, Wish you all a HAPPY NEW YEAR! How do I go about plotting (using lattice) overlays of an ID (group=ID) observed, fitted data in each panel of a multiple panel plot (each panel identified by DS1 + DS2 + DS3)? "x" variable is X1 in the accompanying section of a dataset. each individual is identified by color and Y's are identified by "pch" or "lty".
2010 Mar 05
4
conditioning variable in panel.xyplot?
I wish to create a multipanel plot (map) from several datasets ("d" and "q" in the example below). I can condition the main xyplot statement on the "site" variable, but I don't know how to pass a conditioning variable to panel.xyplot plot so that the x-y coordinates from dataset q are only plotted at the appropriate site. library(lattice) d <-
2010 Apr 28
1
Multiple cex sizes in main for xyplot?
Folks: I would like to write two lines of text in two different font sizes (or faces or ...) as the title ("main") of a trellis plot. The following code does it, but not well: xyplot((0:1)~(0:1), main = textGrob(lab=c("Some Text","Some More Text"),y=c(.95,.8), gp=gpar(cex=c(1.2,1.0))) ) There is too much space between the title text and the plot. I assume
2012 Apr 19
5
User defined panel functions in lattice
Hi I have a problem with passing line and symbol parameters to user defined panel functions I had a look at the archives and created a panel function on what was shown and on panel.loess. I could not to get panel.locfit to work for what I intend it for. There is another layer to work with before success as lp() is called from locfit. xx <- structure(list(Farm = c("A",
2010 Mar 10
2
calling map() in xyplot()
Hi All, I'm trying to add a map on the following lattice plot, but not correctly... can anyone help please... R Code: require(lattice) us.map <- map(plot = FALSE, fill = TRUE) Depth <- equal.count(quakes$depth, number=8, overlap=.1) xyplot(lat ~ long | Depth, data = quakes, panel = function(...) { panel.polygon(us.map$x,us.map$y) panel.xyplot(...) } ) Any help would be
2010 Aug 21
1
lattice::xyplot() with one factor for points and another for lines
Hi: In lattice, how does one handle separate graphical behavior for two different factors? In the xyplot below, the objective is to use the levels of one factor to distinguish corresponding shapes and colors, and the levels of the other factor to perform level-wise loess smooths. # Illustrative data: d <- data.frame(time = rep(1:8, each = 6), val = rnorm(48), gp1 =