similar to: graphing with barchart question

Displaying 20 results from an estimated 10000 matches similar to: "graphing with barchart question"

2011 Mar 22
1
Group labels in lattice barchart
Hello, I've been searching on the web for a few hours and seem to be stuck on this. The code pasted below generates a histogram of subject responses in four different conditions in an experiment. This version of the graph is one I'm using for internal consistency checking, so I've set it up to indicate the order of the responses, which is contained in the variable StimCount. The
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),
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),
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),
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,
2003 May 13
2
Barchart to make a graph like this??
Hi list, I'm trying to get R to make a graph like the one shown in this pdf, where males are white bars and females are black bars. http://www.brrc.unr.edu/~knussear/mmgraph.pdf I tried barchart, but I couldnt get the bars to share a common x axis. Do you have any suggestions? Thanks for your help Ken
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)
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
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)),
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 Apr 14
1
Adding values to top of bars in barchart
Given the following data frame ("freq.sp"), > str(freq.sp) `data.frame': 42 obs. of 4 variables: $ behav : Factor w/ 6 levels "approach","bowride",..: 1 1 1 1 1 1 1 2 2 2 ... $ species: Factor w/ 7 levels "COAST_SPOT","EAST_SPINR",..: 1 2 3 4 5 6 7 1 2 3 ... $ n : int 193 194 563 357 570 369 74 194 208 633 ... $ pct :
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
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 <-
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", "Galactitol")
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
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 =
2007 Sep 16
2
power calculation for repeated measures ANOVA?
Is there a way to calculate power for repeated measures ANOVA (2 groups x 7 observations)? I have searched all over, but all I can find is power.anova.test, but that would not give accurate results, right? Thanks, Matt Bridgman
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
2009 Nov 17
1
lattice barchart
I have a data frame with two factors and want to create panel barcharts with one factor defining the panels and the other the vertical categories by which I can count the rows of data in each combination of factors. How do I do this? I have been trying to use barchart(~factor1|factor2) but it does not give the panels as I want them. The data looks like this: Factor1 Factor2 A y B