similar to: change axis format for different panels in xyplot in lattice

Displaying 20 results from an estimated 10000 matches similar to: "change axis format for different panels in xyplot in lattice"

2010 Nov 30
2
xyplot : superimposed 2 groups in different panels
Hello, I would like to plot the following xyplot : for each date of fff (1 date per panel), bbb=f(aaa) for the two groups (ddd=1 and ddd=2) superimposed. I can do it by group (see below) but not together. I looked at http://lmdvr.r-forge.r-project.org/figures/figures.html but I haven't found what I was looking for (to be honest, I haven't understood all the examples). Any help will be
2005 Jul 25
1
order of panels in xyplot
I'm having trouble with the order of the panels using xyplot. I had used this bit of code before and received the desired plot (the code was not identical, but very similar; perhaps more importantly I was working with an older version of R) . Now the panels appear right to left instead of left to right, as it says in the help files, which is what I would like. Does anyone know if this has
2006 Jun 14
2
positioning of separate y-axis labels in xyplot
I like the functionality provided by outer=TRUE, but when it comes time to place separate xlabs or ylabs, I always end up 'eyeballing' it on a case-by-case basis. For example, ##begin example require(lattice) cars.lo <- loess(dist ~ speed, cars) print(xyplot(cars.lo$residuals+cars.lo$fitted~cars.lo$x, strip=FALSE, outer=TRUE, layout=c(1,2),
2006 Oct 27
2
Question: xyplot panel configurations for Trellis package
Hi, I am new to R community and I have a question on panel configurations in the Trellis package. Particularly, I have the following code: require(lattice) plotTable <- NULL Date <- seq(as.Date("2006-11-01"), as.Date("2009-12-01"), by = 1) nYear <- length(unique(format(Date,"%Y"))) plotTable$Date <- as.Date(paste(unique(format(Date, "%Y-%m")),
2009 Oct 30
1
How to properly shade the background panels of an xyplot?
Dear R users, this is a follow up of this message http://tolstoy.newcastle.edu.au/R/e6/help/09/05/13897.html I'm reproducing the core of it for convenience. > // > / data(Oats, package = "MEMSS") / > / tp1.oats <- xyplot(yield ~ nitro | Variety + Block, / > / data = Oats, / > / panel = function(x, y, subscripts, ...) { /
2005 Mar 17
1
Varying grid.rect in different panels of a Lattice plot
Dear r-help, Sleep-deprivation from having 2 youngsters under 2 around the house is fuzzing my brain, so please be gentle if the answer to this query is obvious! In the example below, I'm trying to use grid.rect to add grey rectangles to the panels of a lattice plot to indicate which months spawning occurred of a (very cute) native Tasmanian fish. The fish in the two lakes spawned at
2009 Dec 04
1
Apparent different in symbol scaling between xyplot and grid.points
Dear R-users, For the past few days, I have been trying to find the reason why some of my plots were showing symbols of different sizes, while I thought I was using the same .cex arguments everywhere. The problem is exemplified by the following example code where the xyplot and grid.points functions are used. The scaling factor is set to 0.84 in both the functions settings, but one can see
2005 Dec 22
1
panel order in xyplot
Hi all, I have a question concerning xyplot. My data is a data.frame looking like that: In the first column I have numbers from 0 to 23 (hours of a day), the second column contains the name of a weekday (Day as factor) and the third column contains the number I am interested in. So as an example, the first five rows look like that: Hour Day Freq 1 0 Mo 23 2 1 Mo
2013 Jan 26
2
different legends in lattice panels
Hi listers, I want to make lattice plots xyplots with the indication of legends inside each panel with only the points and the lines actually ploted inside each given panel according to the group(ing) factor. The code below shows what I have achieved so far and I hope will make clear what I want to have. It seems to me that my solution is a very "dirty hack" and there certainly is
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 <-
2005 Feb 16
1
panel/prepanel for polar plots ala xYplot
First a bit of background: After doing a search for a flexible polar plot function and coming up empty, I have begun writing one myself. Since I am new to writing mid-level graphics routines, this has required some learning about lattice, grid and related things. I am to the point where I have a workable proof of concept, but still need to make some improvements. My goal is to have
2008 Nov 19
1
Buggy trellis.focus() with xyplot ?
Hi: (Tried to find a bug report about this issue, but was unable to find it, let me know if this is a known issue) I have been working on an interface to highlight xyplot panels on mouse overs in JavaGD but I have stumbled with what seems to be a bug in trellis.focus. I am using R 2.8 with lattice 0.17-15 *** To replicate the bug: 1.- display an xyplot. For example, from the xyplot help page:
2006 Dec 14
2
xyplot: discrete points + continuous curve per panel
I have a number of x, y observations (Time, Conc) for a number of Subjects (with subject number Subj) and Doses. I can plot the individual points with xyplot fine: xyplot(Conc ~ Time | Subj, Groups=Dose, data=myData, panel = function(x,y) { panel.xyplot(x, y) panel.superpose(???) # Needs more here } ) I also like to plot on
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 Nov 26
1
problem with xyplot
Dear Rlisters, When trying to indicate which data belong to which of 7 groups, the following plot shows only 5 groups: ss <- trellis.par.get("superpose.symbol") ss$col <- c("red","blue","green","yellow","orange","magenta","cyan") ss$pch <- format(1:7) ss$cex <- 1.2 ss <-
2004 Jul 01
2
y-axis of lattice panels not printing to paper
Greetings, I am printing lattice plots from the R-interface to a printer, and although the y-axes of the left-most panels are visable on the screen, they are not present on the paper when there are multiple panels (ie, >1). For example: trellis.device(bg='white') histogram(~dbh, data=diameter.df) ###print to a printer from the R-interface by clicking the print button on the
2012 Apr 07
6
Drawing a line in xyplot
i am trying to replicate the following graph using xyplot : attach(x) plot ( jitter(type), mortality, pch=16, xlim = c(0.25, 3.75)) lines ( c(1-0.375,1.375) , c ( median(mortality[type==1]), median(mortality[type==1])), lwd=5,col=2) lines ( c(2-0.375,2.375) , c ( median(mortality[type==2]), median(mortality[type==2])), lwd=5,col=2) lines ( c(3-0.375,3.375) , c ( median(mortality[type==3]),
2006 Aug 24
5
xyplot tick marks and line thickness
Hello, A made a xyplot using the lattice library in R (latest version). The publisher of our paper has requested: 1. all tick marks should point inwards instead of outwards. 2. All lines should be thicker (lines, axes, boxes, etc. Everything). Lines is easy...I used: lwd=1.5 but what about the lines of the axes, and the lines that build up the plot itself?....? Any
2009 May 14
2
assign unique size of point in xyplot
Hello,I am using xyplot to try and create a conditional plot. Below is a toy example of the type of data I am working with slevel <- rep(rep(c(0.5,0.9), each=2, times=2), times=2) tlevel <- rep(rep(c(0.5,0.9), each=4), times=2) noutliers <- rep(rep(c(2,4), times=4), times=2) analysis <- as.factor(rep(c('uv', 'mv'), each=8)) cp <-
2011 Jan 25
1
lattice draw.key(): position of key in panels
Good afternoon, I am working on a plot that requires custom legends to be placed in some panels of the plot; other panels do not contain legends. The problem that I run into is positioning of the legend in individual panels. In particular, the 'x' and 'y' elements of the key-list are ignored by draw.key() when it is called from inside a panel function. As a result, the legend is