similar to: User defined panel functions in lattice

Displaying 20 results from an estimated 20000 matches similar to: "User defined panel functions in lattice"

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
2014 Oct 07
3
lattice add a fit
What is the way to add an arbitrary fit from a model to a lattice conditioning plot ? For example xyplot(v1 ~v2 | v3,data=mydata, panel=function(...){ panel.xyplot(...) panel.loess(...,col.line="red") } ) Will add a loess smoother. Instead, I want to put a fit from lm (but not a simple straight line) and the fit has to be done for each panel
2011 Jan 09
1
Rectangle height in lattice xyplot key
Dear All I have a problem with the height of the boxes in the key in the following. (The text is over 2 lines to accentuate the problem of no space between the rectangles.) Is there an easy way to put a space between the rectangles; size controls the width but there appears to be nothing for the height? xyplot(1~1, key = list(corner = c(0.8,0.8),
2009 Aug 05
4
multiple lty on same panel in xyplot
I would like to use lattice graphics to plot multiple functions (or groups or subpopulations) on the same plot region, using different line types "lty" or colors "col" to distinguish the functions (or groups). In traditional graphics, this seems straightforward: First plot all the data using 'type="n"', and subsequently execute a series of "points"
2013 Mar 12
2
Specifying point symbol fill colour in lattice xyplot keys
Dear all, When defining explicit keys with xyplot, I have previously used the fill parameter to set the background colour of point symbols. That's no longer working for me, and I am wondering whether it's a bug or whether I've misinterpreted the documentation and have been relying on a feature wasn't intended. If the latter, can anyone suggest the correct way to do it?
2013 May 21
1
Lattice, ggplot, and pointsize
Hi! When inserting R plots into a document using odfWeave, I fought for a while to get Lattice plots use the same text size as base plots. I eventually discovered that specifying a point size via e.g. svg(pointsize=10) has no effect on Lattice plots. One needs to adjust the size manually via: trellis.par.set(fontsize=list(text=10, points=8)) This is also developed for both Lattice and ggplot2 by
2009 Aug 28
1
Plotmath, sweave and lattice graphics interaction problem
Dear List, I have hit this problem with using a plotmath expression in an axis label on a lattice plot I'm including in a Sweave document. The actual document is far too long and boring (unless you are interested in the hydrochemistry of upland lakes) to include here, but the following minimal example reproduces the problem; basically, the PDF produced by Sweave has missing characters in the
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".
2010 Jan 02
1
xyplot: several plots in one creates y-scale problem
Hello, I've been looking for a solution to this problem for some time now but I seem unable to solve it.. so this is the case: I want to plot 4 time series in the same graph using xyplot(). When I do this with xyplot(mydata[,2]+mydata[,3]+mydata[,4]+mydata[,5] ~ mydata[,1], data = mydata, type = "l", auto.key = list(space="right", lines = T, points = F),
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 Oct 28
1
xyplot and panel.curve
Hi All I have regression coefficients from an experiment and I want to plot them in lattice using panel curve but I have run into error messages. I want an 3 panel conditioned plot of 2 curves of Treatment 2 in each panel conditioned by Treatment1, the example curve expression is x+value*x^2 A rough toy example to give an idea of what I want is: Data: data = expand.grid(Treatment1 =
2011 Aug 04
4
Sweave - landscape figure
Dear R-users I am trying to understand how Sweave works by running some simple examples. In the example I am working with there is a chunk where the R-commands related to plotting a figure are placed. When running R CMD Sweave ? , pdflatex the output is a portrait figure. I wonder whether it would be possible to change the orientation to landscape (not in the latex file but in Rnw file). Many
2013 Feb 26
1
Help with graphs in A4 size
Hi, I need to generate complex graphics which have to be shown in the plot window but also in pdf file, and they must have A4 size. This is the reason why I use width=8.27 and heigth=11.69. The problem is that I don't make it runs when I put something (text, lines, and so on) outside the plot region. I mean if I run the following code, it works perfectly, because the text "My
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 <-
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
2013 Apr 07
4
Same boxplot colors by panels in lattice (bwplot)
Dear all, I would like to have the same color for the all boxplots from the same panel, but my code below shows the two colors alternating. Thanks! set.seed(42) D1 <- rnorm(200) D2 <- factor(sample(letters[1:2],200,TRUE)) D3 <- factor(sample(letters[3:5],200,TRUE)) DF <- data.frame(x=D1,a=D2,b=D3) print(bwplot(b~x|a,data=DF,col=c("black","black"),
2013 Feb 15
3
lattice 3x3 plot: force common y-limits accross rows and align x-axes
Good afternoon, I would like to ask for help in controlling y-axis limits and labels in lattice doplots. Unfortunately, the problem is somewhat convoluted, please bear with the long explanation. I would like to create a 3x3 lattice of dotplots, say subject ~ count. The plot is conditioned on variables treatment and risk: subject ~ count | treatment + risk. In the experiment, not all subjects
2009 Nov 26
1
lattice --- different properties of lines corresponding to type=c("l", "a") respectively
I think the subject says it all. I want to make a simple lattice plot, using xyplot with the argument type=c("l","a"). The problem then is that in the resulting plot it is difficult/impossible to see which plot corresponds to the average and which to the individual profiles. I triedthings like extra arguments lwd=c(1,3) or col=c("blue","red") hoping
2006 Dec 04
2
background color in strip.custom()
Hi all, how can I change the background color in lattice strips according to a factor level, eg: library(lattice) x <- rnorm(100) y <- sqrt(x) f <- gl(2, 50, c("A", "B")) xyplot(y ~ x | f) I like to change the background color of the strips according to the levels in f and tried several things like this with no success: xyplot(y ~ x | f,
2013 Dec 13
1
data point labeling in xyplot
Hi Folks, I have data with a format like: ID y param1 param2 groupingFactor1 groupingFactor2..... 1 ... 1 1 1 2 2 2 2 3 3 3 so several grouping factors and repeated measures. I am using trellis and xyplot to get plot with several grouping factors. something like xyplot(y~x|grouping1*grouping2, data=na.omit(mydata), panel=function{panel.xyplot(x,y);....}); Lets say x is the