Displaying 20 results from an estimated 8000 matches similar to: "bwplot(): Can Panel Heading Span Two Lines?"
2012 Sep 06
2
Lattice bwplot(): Changing Orientation of Plots in Multipanel Display
I've looked again at Deepayan Sakar's 'Lattice' book and not seeing the
information I know must be in there. A clue stick would be much appreciated.
A pair of box-and-whisker plots for two conditions of the same data set
display each box plot horizontally (see attached pH figure). Relations of
the two are not as easily seen as they would be if the two panels had the
plots
2012 Sep 28
1
Lattice bwplot(): Conditioning on one factor
I'm not able to create the proper syntax to specify a lattice bwplot() for
only one of two conditioning factors.
The syntax that produces a box plot of each of the two conditioning
factors is:
bwplot(quant ~ param | era, data=mg.d, main='Dissolved Magnesium', ylab='Concentration (mg/L)')
What I've tried unsuccessfully are:
bwplot(quant ~ param |
2004 Jan 02
1
bwplot and panel.bwplot
Hello,
I am trying to use "bwplot" to display whisker boxes according to some conditioning factors ("age" has two values 1/2). I get the following messages:
> library(trellis)
> bwplot(dvk95~age|site*season,panel=function(x,y){panel.bwplot(x,y)})
Error in tapply(1:0, structure(list(INDICES = numeric(0)), .Names = "INDICES"), :
arguments must have
2010 Nov 02
1
Colour filling in panel.bwplot from lattice
Inspired by colouring the dots of box-whisker plots I am trying to also
fill the boxes (rectangles) with different colours. This seems not to
work as I expected.
Looking at the help page of panel.bwplot it says: 'fill - color to fill
the boxplot'. Obviously it is only intended to fill all boxes with only
one colour?
Nevertheless the following example shows, that 'fill' from
2011 May 01
2
bwplot in ascending order
Can anyone point me to examples with R code where bwplot in lattice is used to order the boxes in ascending order? I have found the following discussion and it partly works. But, I have a conditioning variable, so my example is more like
bwplot(var1 ~ var2|condition, dat)
Th example in the discussion below works only when there is not a conditioning variable as far as I can tell. I can tweak the
2004 Sep 17
2
lattice: bwplot and panel.lmline()
On Friday 17 September 2004 13:52, RenE J.V. Bertin wrote:
> Hello again,
>
> I am doing regressions (using panel.lmline() (and panel.abline(
> rlm(...))) ) inside a panel method which I pass to bwplot().
>
> What I would like to do is create a boxplot of categorised data
> (binned on the independent variable), and superpose a regression line
> which is calculated using the
2010 Sep 27
1
bwplot superpose panel.points from another dataframe
Hi everybody,
using bwplot for producing panel boxplot with 3 dimensions
i want to add a mark on each boxplot representing one individual (on all its
dimensions)
till now, i didn't succeed getting the desired solution
I want as well to keep the median symbols as a line
Many thanks for your help
christophe
here is the tested code:
########################
library(lattice)
ex <-
2004 Nov 05
1
I: a coloured band within each panel of a lattice bwplot
Hi all,
I would like to add to each panel of a bwplot a coloured central band,
centered on the mean of the values, being its width +- 2% of the mean
itself.
I know how to add lines, i.e. something like
bwplot(X ~ Y|FACTOR
data=my.df,
panel= function(x, y){
panel.bwplot(x, y)
panel.abline(v = mean(x, na.rm = T) - mean(x, na.rm = T) * 0.02
panel.abline(v =
2005 Mar 23
2
alternative to 'groups' for lattice bwplot()
Hi,
Is there some alternative to the 'groups' argument in lattice's bwplot
function for boxplots? Say in the example below:
bwplot(yield ~ site | year, data = barley)
you want to have two side by side boxplots per site, corresponding to each
year in the barley data frame. Ideally, the space between boxplots of the
same site should be smaller than that between boxplots of different
2011 Mar 24
1
Colour makes my life; but not my bwplot (panel.violin)
Using Trellis, am successfully setting up a number of panels (25) in which I
have two box and violin plots.
I would like to colour - one plot as RED and the other as BLUE (in each
panel). I can do that with the box plots, but the violin density areas just
take on one colour.
My basic call is as follows:
bwplot(rmsd ~ file | code,
data=spread_data.filtered,
panel = function(...,
2011 Sep 22
3
Bivariate Scatter Plots with Lattice
Data frame has this structure:
'data.frame': 11169 obs. of 4 variables:
$ stream : Factor w/ 37 levels "Burns","CIL",..: 1 1 1 1 1 1 1 1 1 1 ...
$ sampdate: Date, format: "1987-07-23" "1987-09-17" ...
$ param : Factor w/ 8 levels "As","Ca","Cl",..: 1 1 1 1 1 1 1 1 1 1 ...
$ quant : num 0.01 0.01 0.01 0.01
2008 Jan 07
2
reducing the number of x-axis lables in a bwplot while plotting all boxes
I apologize if this is somewhere in the archives, but I can't seem to find
a solution to this question.
I've been trying to plot a bwplot:
print(
bwplot( n.pareto ~ as.factor(gen) | mut.rate * n.pop,
data=p6,
horizontal=FALSE,
box.ratio=0.75,
cex=0.6,
xlim=c(-1,51),
ylim=c(-1,500),
2006 Feb 08
1
bwplot: how to display response variables separately in same panel?
Hi -
I have two response variables 'y1' and 'y2' and a factor 'x'. I would like
to create paired box-whiskers plots for y1~x and y2~x and labeled for the
same x. the b-w plots would be side-by-side in the same panel - almost like
a barchart with two parallel columns for the same x.
the code 'bwplot(y1+y2~x, outer=T)' gives me two side-by-side panels. this
is ok,
2012 Jun 13
2
add horizontal reference lines in lattice bwplot
I'm plotting a lattice bwplot from a data.frame and would like to add some horizontal lines indicating some reference values (preferably with text annotation) as well as a grid of regular log tics. The following illustrates the plot:
data(ToothGrowth)
require("lattice")
p = bwplot(exp(len) ~ supp, ToothGrowth,
panel = function(..., box.ratio) {
panel.grid(h=-1,
2012 Dec 05
4
Changing data frame column headings
I have a reshaped data frame with value column headings concatenated from
two column headings in the melted data frame. I want to change all 56
headings in a single command, but 'names' allows me to change only one at a
time. In Hadley's 2007 article on reshape in the Journal of Statistical
Software he mentions a 'rename' function, but I cannot find that.
Is there a way to
2008 Apr 20
1
Attempting to sync x-axis labels with grid lines in lattice bwplot
I have created a lattice bwplot that suffers from axis label
overplotting. The box plot contains grid lines, and I thought that
only plotting the labels for corresponding vertical grid lines would
not only cure the overplotting but also be more aesthetically
pleasing. Unfortunately hours of poring over manuals, documentations,
mailing list archives, and other R-related text hasn't helped.
2012 Jul 22
1
Lattice/"panel.bwplot" and Gviz: Boxplot question
Hi,
I was using Gviz package to create a boxplot. I understand that Gviz uses
"panel.bwplot" to create the boxplot.
Is there any way that I can remove the dashed line surrounding each pair of
boxplots?
Here is some sample code:
#############
library(Gviz)
thisdata <- matrix(sample(1:100,60),nrow=10,ncol=6)
positions <- sample(1:100,6)
limit1 <- min(positions)-1
limit2
2011 Jun 26
1
bwplot questions: box order, axis breaks, and multiple y-axis labels
Hi all,
I used bwplot in lattice to create a 6-panel boxplot grouped by a
conditioning variable (param) that displays concentration (conc) in
response to treatment (trtmnt). Here is the functional part of my
code followed by my three questions:
library(lattice);
ww<-read.csv(file="c:/Rdata/lattice_boxplot_prep.csv",header=TRUE,sep=",");
attach(ww);
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"),
2006 Feb 06
2
turn off selected axes in bwplot
I want to turn off selected axes in bwplot. I would like to only have the bottom axis drawn, with the others off.
I have a series of bwplots that I want on one device, like this:
p1<-bwplot(x1,box.ratio=.1)
p2<-bwplot(x2,box.ratio=.1)
...
print(p1,position=c(0,.8,1,1),more=T)
print(p2,position=c(0,.6,1,.8),more=T)
...
I know about the panel functions panel.bwplot() and panel.axis(), but