similar to: Lattice: Feature Request

Displaying 20 results from an estimated 9000 matches similar to: "Lattice: Feature Request"

2011 Mar 01
1
Lattice: useOuterStrips and axes
Consider the following: library(lattice) library(latticeExtra) temp <- expand.grid( subject = factor(paste('Subject', 1:3)), var = factor(paste('Variable', 1:3)), time = 1:10 ) temp$resp <- rnorm(nrow(temp), 10 * as.numeric(temp$var), 1) ylimits <- by(temp$resp, temp$var, function(x) range(pretty(x))) useOuterStrips(xyplot( resp ~ time
2011 Nov 21
1
Lattice graph help
Hi all I hope you might help me with some aspects of producing a graph in lattice. There are three things I have struggling with and that is: 1. to separate the horizontal box rows from each other; 2. to change the colour of the horizontal and vertical strips to white; and 3. to place the axes labels on the left y axes and on the bottom x axes. I would really appreciate some help. I have put the
2009 Apr 09
3
Multiple Hexbinplots in 2 columns with a Single Categorical Variable
Dear Ladies and Gentlemen, I have a fairly large database (N=13,000) and a single main categorical discriminator between the groups. I want to look at the time course of a number of continuous biochemical variables over chronologic age. Therefore I believe I need to prepare hexbinplots in two columns with simple regression lines in them (with useOuterStrips (in library(latticeExtra) if
2011 Mar 26
1
bwplot [lattice]: how to get different y-axis scales for each row?
Dear expeRts, How can I get ... (1) different y-axis scales for each row (2) while having the same y-axis scales for different columns? I coulnd't manage to do this with relation="free" [which gives (1) but not (2)]. I also tried relation="sliced", but it did not give the same y-axis scales within each row (see the fourth row). Further, it "separates" the
2008 Jun 18
1
Custom strips in lattice
I've recently been playing with strip functions for a data presentation I'd like to use, and have a couple questions. I've cannibalised the useOuterStrips function from latticeExtra to give me the following sample code: library(lattice) myData <- expand.grid( type = c('First 3 days','Whole profile'), sub = paste('Subject', 1:3,
2018 Apr 25
3
Can't Get Lattice Histogram Minor Tick Marks to Work
I'm drawing a paneled histogram using the lattice package. I've succeeded in adding minor tick marks to the vertical axis, but I can't get the desired number of minor tick marks between the major tick marks. I've attached a self-contained program to illustrate the problem. Thanks for your help, Don Macnaughton Here's my sessionInfo: R version 3.4.3 (2017-11-30) Platform:
2018 Apr 25
0
Can't Get Lattice Histogram Minor Tick Marks to Work
Per the Posting Guide, why didn't you post the reproducible R code example? On April 24, 2018 8:22:15 PM PDT, Donald Macnaughton <donmac at matstat.com> wrote: >I'm drawing a paneled histogram using the lattice package. I've >succeeded in >adding minor tick marks to the vertical axis, but I can't get the >desired >number of minor tick marks between the major
2011 May 17
1
scales argument in bwplot (lattice)
Suppose I have data such as the following set.seed(12345) tmp <- data.frame(var1 = rnorm(100), var2 = rnorm(100), var3=rnorm(100, 10, 30)) tmp1 <- data.frame(vars = with(tmp, c(var1, var2, var3)), type = gl(3, 100)) var3 is on a different scale, but I create the following plot, which looks terrible as a result bwplot(~ vars|type, tmp1, layout = c(1,3), ) Of course, I can
2018 Apr 25
1
Can't Get Lattice Histogram Minor Tick Marks to Work
Thanks Jeff, I attached a file with the program to my earlier email because the posting guide seemed to imply that non-binary attachments would work. But I see that the file was stripped off. I installed the program file on a web site, but when I downloaded it, the line breaks were stripped out. So I've included the program below: ------------------------------------------------------- #
2012 Jun 25
1
combineLimits and Dates
I'm having some trouble using the latticeExtra 'combineLimits' function with a Date x-variable: require(lattice) set.seed(12345) dates <- seq(as.Date("2011-01-01"), as.Date("2011-12-31"), "days") dat <- data.frame(d = rep(dates, 4), g = factor(rep(rep(c(1,2), each = length(dates)), 2)), h =
2010 Mar 31
1
strip.custom with strip on left for three conditioning variables
I want to use a strip.custom as with useOuterStrips for three conditioning variables. useOuterStrips restricts this to only two conditioning variables, and I cannot figure out how to write strip.custom properly to do this. library(lattice) mtcars$HP <- equal.count(mtcars$hp) #with two factors x2<-xyplot(mpg ~ disp | HP + factor(cyl), mtcars) useOuterStrips(x2) #with three factors
2013 Feb 22
3
Help xyplot
Hi Mackay and anybody (a) Is it possible to select randomly (let say five grids) and plot? (b) Is it possible to plot five nearest grid in one figure? The original question and improved codes: #I am ploting gridded time series data. I would like the actual lat #and lon value appear on the graph-if possible inside the graph as #numbers. If there is also more elegant ways to plot the graphs I
2010 Aug 25
5
lattice help required
hello, i want to stack two lattice plots beneath each other using one x-axis and sharing the same text-panels, like: ##################################################################### library(lattice) y1 <- rnorm(100,100,10) y2 <- rnorm(100,10,1) facs<-expand.grid(Sites=rep(c("Site I","Site II"),25),Treatment=c("A","B")) pl1<-dotplot(y1 ~
2011 Jul 21
6
Lattice: place ticks only on y-axis
I am using lattice for a bar plot, having a little trouble removing ticks, tick labels from x-axis, but keeping them on the y-axis. I looked around quite a bit (http://tolstoy.newcastle.edu.au/R/e7/help/09/06/1733.html, help pages, etc), tried variations of "scales = list(alternating = c(0,0)", "scales = list(alternating = c(0,0), tck = c(0,0))" and others, couldn't quite
2010 Feb 05
2
lattice barchart using a time scale in x axis
I'm trying to produce a barchart plot with groups, in which each group is placed in a particular time scale in x-axis. If I use barchart directly it does not take the time scale. I've tried with xyplot and adding a panel.barchart, I have the bars in the right place, but not the three groups I'm trying to produce. I've tried defining panel and panel.group, but can't get it to
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 =
2005 Jul 30
1
xyplot auto.key issue
Hi all, I'm having a problem with the auto.key function in xyplot. I hate to bother the list like this and I'm positive I must be missing something very simple, yet I've spent the last day searching for a solution to no avail. Essentially, I want a key that contains entries in which the plot points are superimposed on a line of the same color as the points, like this: o--o--o Now,
2009 May 08
1
centering axis labels in lattice
Hello, I'm attempting to alter the location of text in my axis labels in lattice plots and have been unsuccessful so far. For example, the y-axis labels are always right-justified, but I would like them to be horizontally centered. Here's an example: library(lattice); # create fake dataset to plot to.plot <- data.frame( x = 1:5, y = c("1\nAAA", "2\nBBB",
2006 Oct 31
1
2.4.0 and lattice 0.14-9: Changed behaviour of scales-argumenttck
Dear list, I have observed a change in the behaviour of the scales-argument tck of xyplot() after having installed R 2.4.0 (for version info see below). The help page of xyplot() says about the scales-argument tck: 'tck' numeric to control length of tick marks. Can be a vector of length 2, to control left/bottom and right/top separately. But if I issue xyplot( y ~ x, scales=
2005 Jun 01
2
problem with chron scales in lattice
I can't get the scales parameter in xyplot of lattice to work as I expected. I'm using R-2.1.0 and lattice 0.11-8. There should be year labels from 1992 to 2004 for the x axis in the plot below, but instead only a few of them appear, and in the wrong spots, as if the coordinate system has changed after finishing with the panel function. library(chron) library(lattice) # vertical grid