similar to: Using panel.grid in barchart

Displaying 20 results from an estimated 6000 matches similar to: "Using panel.grid in barchart"

2009 Feb 08
0
Fwd: Using panel.grid in barchart
I forgot to reply this to the list; my (apparently quite trivial) problem is solved. Begin forwarded message: > > It just doesn't seem to do anything useful when I do it. If the goal > were to learn how not to annoy the syntax engine in R, I guess the > goal was accomplished, but not much beyond that. > > -- > David > > On Feb 8, 2009, at 11:25 AM,
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 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
2004 Jun 22
1
Grouped AND stacked bar charts possible in R?
Good day all, My statisticians want an R procedure that will produce grouped stacked barplots. Barplot will stack or group, but not both. The ftable function can produce a table of the exact form they want, but the barplot doesn't show all the divisions we want. For an example, here's the sample from the help file for "ftable:" data(Titanic) ftable(Titanic, row.vars = 1:3)
2011 Feb 09
1
Adding labels into lattice's barchart
*** APOLOGIZES FOR THOSE READING THE LIST THROUGH NABBLE THIS WAS ALREADY POSTED THERE BUT NOT FORWARDED TO THE LIST FOR SOME UNKNOWN REASON *** I have a dataset that looks like: $ V1: factor with 4 levels $ V2: factor with 4 levels $ V3: factor with 2 levels $ V4: num (summing up to 100 within V3 levels) $ V5: num (nr of cases for each unique combination of V1*V2*V3 levels) Quite new to
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 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
2011 Jan 26
1
barchart panel.text add label value and percent
Hello everybody, i need some help to display text as label in my barchart the label is the combination of x value + text text= calculated percentage => per it display properly the x value but, wrongly repeats the text of the fisrt level LangueTXT factor on the second any solution? Thanx very much Christophe ######## here is the code ########## library(lattice) Langue <- c(1, 1, 1, 2, 2,
2008 Jun 12
1
Panel-specific colours in barchart, lattice package.
I would like, for possibly invalid reasons, to have the bars of the barchart in each panel to be the same colour, but with *different* colours from panel to panel. Can this be done? If so, how? I've read the help as much as I am capable of, and done an RSiteSearch () without becoming any wiser. Here's an example of what I'd like to do: X <- structure(list(y = c(2.8, 6.7,
2006 Dec 08
1
missing factor levels in a lattice barchart panel cause unexpected failure
Hi all - I'm trying to generate lattice barchart graphs with missing values, and came across the following: This does not run. I would expect it to: library(lattice) D = data.frame(X=1, Y=factor(letters[2], letters[1:2])) barchart(~ X, D, groups=Y) Error in grid.Call.graphics("L_rect", x$x, x$y, x$width, x$height, resolveHJust(x$just, : invalid line type which is simply
2009 Aug 18
1
three dimensions barchart
Dear R community, I have one problem with figures. I draw the Relative Distribution graph, it looks like barchart(X,Y plot), but I have ten(year) Relative Distribution grapgs, have any command am can combine ten barcharts(X,Y plot) to become a three dimensions barchart(X,Y,Z plot)? All help highly appreciated Best, Yichih One Relative Distribution graph:
2012 Aug 24
1
help with a special variant of balloonplot
Hi, I am interested in implementing a special variant of balloonplot.  Let me explain with an example dataset from the reference manual : library(gplots) data(Titanic) dframe<-as.data.frame(Titanic) survived<-dframe[dframe$Survived=="Yes",] attach(survived) balloonplot(x=Class,y=list(Age,Sex),z=Freq,sort=TRUE,show.zeros=TRUE,cum.margins=FALSE,             main="BalloonPlot :
2008 Jul 02
1
exporting ftable
How can I export an ftable object in the same format that appears in R command window? For testing that i was using this example that is in help of this function. ## Start with a contingency table. ftable(Titanic, row.vars = 1:3) ftable(Titanic, row.vars = 1:2, col.vars = "Survived") ftable(Titanic, row.vars = 2:1, col.vars = "Survived") ## Start with a data frame. x <-
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,
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 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
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
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)),