Displaying 20 results from an estimated 329 matches for "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
panel...
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),
barchart(table(daten$COUNTRY)|table(daten$STATUS)),...
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),
auto.key=list(title="Survived"...
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,
gr...
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, data=my_data, col=c(&...
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))
myd...
2012 Mar 03
2
Grouped barchart confidence intervals in lattice
Hi everyone,
I'm having trouble adding error bars to a grouped barchart in lattice. I know that this topic has been addressed quite a bit, as I've been searching the internet for a while to try to troubleshoot the issue, but I've not been able to find any solution that I could get working on my data. I was wondering if someone could look at my code and tell me...
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...
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...
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 s...
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...
barchart(Percentage~Organisms|Complex,data=data,layout=...
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'...
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...
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 trelli...
2008 Jul 16
2
barchart with bars attached to y=0-line
Dear R users,
i am using the following code to produce barcharts with lattice:
Compound<-c("Glutamine", "Arginine", "Glutamate", "Glycine", "Serine",
"Glucose", "Fructose", "Raffinose",
"Glycerol", "Galacglycerol", "Threitol", "Galactinol"...
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...
2010 Feb 16
1
ellipsis-related error: used in an incorrect context, no ... to look in
Hi,
I have the following code snippet:
require(lattice)
f.barchart <- function(...) {
barchart(...,
panel = function(x, y, ...) {
panel.barchart(x, y, ...)
}
)
}
x <- data.frame(a = c(1,1,2,2), b = c(1,2,3,4), c = c(1,2,2,1))
f.barchart(a ~ b, data = x, groups = c)
Which results in the fol...
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 w...
2007 Apr 25
1
barchart producing incorrect number of barcharts when columns renamed
Hi everybody,
I'm having problems with the barchart command in the lattice package.
I'm creating barcharts from matrices with with anything from 20 to 71
columns. When I leave the column names alone, that is they are set in
the read.table command (and inherited by subsequent commands) the
correct number barcharts is created by the "p...
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=li...