similar to: bar order using lattice barchart()

Displaying 20 results from an estimated 1000 matches similar to: "bar order using lattice barchart()"

2010 Aug 25
2
Removing inter-bar spaces in barchart
Rhelpers: I'm trying to make a barchart of a 2-group dataset (barchart(x~y,data=data,groups=z,horizontal=FALSE)). My problem is that I can't, for the life of me, seem to get rid of the inter-bar space -- box.ratio set to 10000 doesn't do much. Any ideas? I'd ideally want zero space between the bars. Thanks! --j -- Jonathan A. Greenberg, PhD Assistant Project Scientist
2010 Jan 14
3
Barchart bar lengths not proportionate
When I use barchart (with default formatting options), I get bars whose lengths/heights are not proportional to their value. For example: http://drop.io/wbagm6s/asset/capture-png Many of the values in this chart are 1; however, because the blue bars extend to the left of the "0" tick mark, those bars appear to represent higher numeric values. Is there a way to make the length of the
2010 May 04
4
Show number at each bar in barchart?
when i plot a barchart with 5 bars there is one bar pretty long and the others get smaller like (20, 80, 20, 5, 2) is there a way of displaying the number accoirding to each bar next to it? like in a bwplot the panel option N? -- View this message in context: http://r.789695.n4.nabble.com/Show-number-at-each-bar-in-barchart-tp2125438p2125438.html Sent from the R help mailing list archive at
2008 Jan 23
1
Bar width and labels in barchart
Hi everyone I am using barchart to make my graphs. Here is my code. barchart(percent_below ~ factor(Year)| factor(Season, levels=unique(Season)), data= .season_occurrence, origin = 0, layout = c(4, 1), scales=list(tick.number=ticknum,labels=NULL), ylim=c(0, ymax), group = factor(Year), xlab= "Year", auto.key = list(points = FALSE, rectangles =
2010 Feb 20
1
How get the single bar x coordinate in barchart when groups is used?
Hi all, I am using barchart() to plot values above the bars. When using groups argument we get bars grouped arround a given x level. By placing values above this bars we need to know the respective x coordinates. How can I get it? require(lattice) da <- expand.grid(x=1:5, z=1:3, w=1:2) da$y <- rpois(da$x, lambda=23) barchart(y~x|w, groups=z, data=da, horizontal=FALSE,
2010 Apr 20
1
the bar width of barchart plot in lattice package
Dear R users, I am trying to use the following code to make a barchar plot. The bars in the plot turn out to be a little narrow. Is there any way to modify the width of the bars? Thank you! library(lattice) scores = gl(2, 5, label=c('Sensitivity', 'PPV'), length = 100) sequences = gl(5, 1, label=c('Lemna minor', 'Dugesia japonica A', 'Gymnosporangium
2008 May 02
1
Errors bar in barchart
Hi, I user barplot2 to make a plot bar with errors bars. In old times I needed to use a sequence of segments commands to make this. Now I try to make the same but using lattice. Is possible to use barplot2 in barchart function? If not, what is the simplest way to put errors bar in barchart? I try to find an example in Lattice book, but dont find anythink like this. Thanks a lot Int? Ronaldo
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
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),
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,
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),
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
2007 Feb 24
2
barchart (lattice) with text labels
I would like to place the value for each bar in barchart (lattice) at the top of each bar. Something like the following code produces. library(lattice) mypanelfunc <- function(x, y, ...) { panel.barchart(x, y, ...) panel.text(x, y, labels=as.character(round(x,2)), ...) } myprepanelfunc <- function(x, y, ...) list(xlim=c(0, max(x)+.1)) mydata <- expand.grid(a=factor(1:5),
2004 Feb 10
3
confidence-intervals in barchart
Hi R users, 1) How does one show confidence-intervals in a barchart and use rownames for labels on the y-axes? I have looked at "plotCI" in "gregmisc" package . But it does not seem to produce something like a barchart. The statistic, error, upper-bound, and lower-bound are in a dataframe. 2) How to show CI in a barchart either using the statistic and, either (a)
2010 Jul 05
4
Data Labels in a barchart (Lattice or otherwise)
Hi, Can anyone please help me with how I could add labels with the value for each bar in a barchart? (similar to how data labels can be added in Excel) I have done a lot of searching but havent been lucky. Thanks, Raoul -- View this message in context: http://r.789695.n4.nabble.com/Data-Labels-in-a-barchart-Lattice-or-otherwise-tp2278027p2278027.html Sent from the R help mailing list archive at
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
2006 Jan 25
2
panel function with barchart (lattice)
Folks at R help, I can't quite get the panel function to work the way I want within barchart. I guess I'm still not understanding how to piece together multiple panel arguments, especially when "groups" is specified. Example: I want to be able to add the value of "yield" to each section of each bar in this graph: barchart(yield ~ variety | site, data = barley,
2007 May 07
2
graphing with barchart question
I am graphing data using barchart (barchart(DV ~ IV | subject). I have 2 groups of 9 subjects each. How can I easily identify which group each subject belongs to? I have been trying to color code them, but can't seem to get that to work. Any suggestions would be appreciated. Thanks, Matt Bridgman
2008 Feb 03
2
(Small) problem with barchart
Hi, I have a small problem when using barchart. I have the following data: letters a 6 f 18 1 a 15 10 j 12 9 i 12 4 d 9 5 e 6 The data is from a survey and summaries the alternatives selected in one question. The idea is to have a bar chart illustrating the count of each selection in descending order. The data frame is already ordered in
2010 May 07
3
How to sort a grouped barchart?
Hi, I have a barchart very similar to the example on the function documetation, however, I want to sort the bars according one group in one panel. Reminding: library(lattice) barchart(yield ~ variety | site, data = barley, groups = year, layout = c(1,6), ylab = "Barley Yield (bushels/acre)", auto.key=list(), scales = list(x = list(abbreviate = TRUE,