similar to: problems with lattice barchart

Displaying 20 results from an estimated 2000 matches similar to: "problems with lattice barchart"

2003 May 08
2
border of bars in lattice barchart
Hello! How to change a color (or linewidth) of border in lattice 'barchart'? I am trying barchart( (......) - my arguments panel=function(x,y,color,subscripts,groups,...) { panel.barchart(x=x,y=y,box.ratio=2,col=color,border=FALSE) })) or ... panel.barchart(x=x,y=y,box.ratio=2,col=color,border='transparent') ... or
2009 Feb 08
2
Using panel.grid in barchart
Hi all, I'm trying to do an example in Deepayan Sarkar's Lattice book. It involves making a barchart based on the Titanic dataset. I can get the barchart to plot fine; however, when I try to edit panel.grid, I get an error: > titan<-barchart(Class ~ Freq | Age + Sex, data = as.data.frame(Titanic), groups=Survived, stack=TRUE, layout=c(4,1),
2006 Oct 28
1
What determines the order of rows in a lattice barchart?
Hi, What determines the order of the rows in a barchart? Cheers, Geoff. Here is my code, and the data follows. If I have z in alpha order, the barchart is in some order I can't determine. I originally tried rownames(twater)~twater$Cat, but the chart wasn't in rownames(twater) order either. library(lattice) twater<-read.csv("totalwater.csv",strip.white=T)
2010 Nov 30
2
Error bars in lattice barchart with groups
Dear R-users, i want to plot gene regulation data in a lattice barchart. To illustrate the problem i encounter, the following code uses the "barley"dataset: library(lattice) barley[["SD"]] <- 5 PLOT <- barchart(data=barley, yield~variety|site, groups=year,origin=0, as.table=TRUE, scales=list(x=list(relation="same", rot=30), y=list(alternating=3,tck=-1)),
2008 Sep 16
2
Setting user colors in barchart
Dear R Users, I have a basis question regarding the use of color in the lattice package. I read the ?barchart help page and searched the R archives but could not understand how to do it. I just need to plot a barchart using specific colors for my groups, e.g. green and red instead of the default lattice colors. How do I do that? If I say: barchart(x ~ a_factor, groups=my_groups,
2002 Mar 27
0
Re: RE Vertical bars with barchart()
Hi, [I'mm cc-ing r-help on this, since some others might be interested (Tony Rossini is, at least)] Yes, I saw your mail and was wondering about what would be the best approach to do it. It's definitely not trivial, mainly because Trellis is not designed to handle factors on the x-axis (chiefly for convenience, as factors typically have long names which are difficult to write on the
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
2010 Jan 20
3
barchart with stacked and beside bars
Hi, Is there a way to stack bars in a barchart as well as "beside" bars for the same treatment? eg.... I have one barchart like this: bio<-matrix(c(10,23,9,25),nrow=2,byrow=T) ntreat<-c("n0","n96") colnames(bio)<-ntreat barplot(bio,beside=T) now i want a similar barchart but with stacked bars:
2003 Nov 02
3
barchart in lattice
Dear all, I have two factors 'country' and 'status' which I would like to plot via barchart (lattice). 'status' consist of three different levels and should be the grouping variable, i.e. there should be drawn three different panels and within each panel a barchart of 'country'. barchart(daten$COUNTRY|daten$STATUS),
2009 Oct 12
1
Loading data to Trellis barchart plot.
Dear all, I have a question about loading the data to barchart plot. I know this could be a very easy question, but I just can not get my head around. What I need to do is to create a trellis plots barchart style (horizontal bar), with levels of one variable (ie. variable “colour” in my example) as ylab and frequency as xlab on each trellis plot. The trellis plots is separated based on
2008 Jun 26
1
Gettting barchart titles as numbers not characters
Hi, I wonder if you could help me with my barcharts, I am using the barchart function from the lattice library. I have data like this: Complex,Organisms,Percentage 130,0,50 130,1,10 130,2,20 130,3,15 130,4,5 133,0,10 133,1,15 133,2,20 133,3,50 133,4,5 I draw barcharts using this command...
2010 Apr 03
2
Export bug? Hist() vs. barchart().
Hi, If you want to export a single bar chart, this works: > png( "ET" ); > barchart( data[,"ET"] ) > dev.off() quartz_off_screen 2 But if you want to export a few of them, this does not: > factorCols <- c("MR","ET"); > sapply( factorCols, function(x) { + png( x ); + barchart( data[, x] ); + dev.off(); + } );
2009 Jan 16
0
Barchart in lattice package: controlling order of bars in plot and color of a selected bar
Hi, I'm using the lattice function 'barchart' to make a series of 4 histograms. Currently, the y-axis values are graphed in order of the y-axis variable. I'd like to have the y-axis values sorted in ascending order of the x-axis values so that the longest bar horizontally is on top of the graph (in it's seciton) and the shortest bar is on the bottom. I can do this in
2006 Aug 14
1
Lattice barchart with different fill pattern
Dear list, I am new to lattice plots. I want to make a barchart with 10 and more levels. I need to use a grey scale for printing purposes. The problem is that with 10 or more levels in factors it is very difficult to distinguish each level in the plot and legend, since the greys are very similar (some levels have value of zero and don't appear). Here is an example of my problem: df <-
2007 Jul 10
1
Lattice: vertical barchart
barchart(Titanic, stack=F) produces a very nice horizontal barchart. Each panel has four groups of two bars. barchart(Titanic, stack=F, horizontal=F) doesn't produce the results I would have expected, as it produces this warning message: Warning message: y should be numeric in: bwplot.formula(x = as.formula(form), data = list(Class = c(1, And it results in each panel having 22 groups of
2004 Oct 19
1
barchart fails when grouping variable has more than 7 levels (PR#7293)
Full_Name: Andreas Kiermeier Version: 2.0.0 OS: Windows XP Submission from: (NULL) (203.26.122.12) I've struck a problem drawing barcharts after installing R 2.0.0. Previously I've used the following command print(barchart(100*result ~ sample, groups=congener, data=dioxin.2003.fresh.ub.p, stack=TRUE, ylim=c(0,102))) to draw a stacked barchart of the
2007 Jun 22
1
Barchart legend position
I am using barchart to make charts for some data with a lot more functions and labels and such in the command. barchart(Freq ~ factor(HH), data = dataset1, group= year) So I have my data grouped by year and I get a legend at the top of graph, which is great cause I need the legend for the different years but it is a weird spot. So how can I manipulate the legend, ie. Move it, shrink it, do
2005 Jun 25
1
Confidence interval bars on Lattice barchart with groups
I am trying to add confidence (error) bars to lattice barcharts (and dotplots, and xyplots). I found this helpful message from Deepayan Sarkar and based teh code below on it: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/50299.html However, I can't get it to work with groups, as illustrated. I am sure I am missing something elementary, but I am unsure what. Using R 2.1.1 on various
2007 Dec 19
1
Different labels by panel in barchart
Dear all, I'm analysing a survey, and creating a barchart of the different responses for each question. The questions are grouped according to a number of categories, so I'm using lattice to create a plot with each question in a category on it. The problem is that the response set for different questions within the same category varies. I want to be able to draw only the relevant
2009 Mar 29
1
Two variables on one lattice barchart
Hi, I created the barchart below using the lattice package, however I can't seem to find a way to add another variable as a line (see the desired square/lines that I drew for the last 10 years of the plot). Can anyone help me with this? Your help is much appreciated! Code: Schart<-barchart(Catch~Year,data=SNA, scales=list(col = "black", tck = c(1, 0),x=list(rot=45)))