similar to: labelling a stacked barchart (lattice)

Displaying 20 results from an estimated 3000 matches similar to: "labelling a stacked barchart (lattice)"

2011 Aug 17
2
dotchart vs. dotplot ... groups
I'm trying to create a dotplot with some grouping. I've been able to create what I want using dotchart (basic graphics), but can't quite get it using dotplot (lattice). I prefer to use lattice (or ggplot2) because I think it's a bit easier to control some other aspects of the plot appearance. Basically, w/ lattice I've not been able to get the y-axis label to include the
2009 Nov 26
3
barchart() {Lattice} help.
Hi R Users, I'm trying to plot a stacked barplot. Here is data: Sample Col1 Col2 Col3 Row1 -2 4 -1 Row2 3 -2 4 Row3 3 5 -2 Row4 4 1 -1 I'm using following R code: library(lattice) dta<-read.table("data.txt", header=TRUE, row.names="Sample") barchart(data.matrix(dta), horizontal=FALSE, stack=TRUE, col=2:4,
2009 Dec 02
1
barchart() {Lattice} -- auto.key()
Hi R Users, I'm using following data/code (data is also attached) to produce a stacked barplot. *I need help with changing legend boxes, currently I'm using "rectangles=TRUE". Is it possible to get small squares instead -- may be with a small gap between colored squares.* Currently there is no gap between the colored rectangles. # Sample Data: Names Col1 Col2 Col3 Row1 -20 40
2009 Dec 02
2
Help: barchart() {Lattice}
Hi R Users, I'm using following data/code (data is attached also) to produce a stacked barplot. # Sample Data: Names Col1 Col2 Col3 Row1 -20 40 -10 Row2 30 -20 40 Row3 30 10 -20 Row4 20 20 -10 # R Code: dta<-read.table("data.txt", header=TRUE, row.names="Names") barchart(data.matrix(dta), horizontal=FALSE, stack=TRUE, par.settings = simpleTheme(col =
2009 Dec 02
1
Fw: Re: Help: barchart() {Lattice}
I HAVE BEEN ASKED TO BE REMOVED FROM THIS LIST OVER 20 TIMES, PLEASE CAN I BE REMOVED!!!!!!!!!!!!! --- On Thu, 3/12/09, Peng Cai <pengcaimaillist@gmail.com> wrote: From: Peng Cai <pengcaimaillist@gmail.com> Subject: Re: [R] Help: barchart() {Lattice} To: "Felix Andrews" <felix@nfrac.org> Cc: r-help@r-project.org Received: Thursday, 3 December, 2009, 10:17 AM Got it
2009 Feb 11
2
changing settings on a barchart (lattice)
Hello! I apologize - I never used lattice before, so my question is probably very basic - but I just can't find the answer in the archive nor in the documentation: I have a named numeric vector p of 6 numbers (of the type 6 numbers with people's names to whom those numbers belong). I want a simple bar chart. I am doing: library(lattice) trellis.par.set(fontsize=list(text=12)) #
2009 Jan 20
2
Stacked barplot with two stacked bars besides each other
Hi, I have a particular barplot I would like to generate, but I am having trouble getting it to work. What I would like is in effect two barplots with stacked bars merged into one. For example, I have two samples (yoda1,yoda2) on which I measure whether two variables (var1,var2) are present or absent for a number of measurements on that sample. > var1 <- data.frame(yoda1=c(3,7),
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:
2012 Jan 20
1
Stacked barchart in ggplot (or other library)
Hey, I want to create a stacked barchart in R for the following dataset (http://pastebin.com/pyHUNgr2): # usage capacity diff 1 4 10 6 2 2 20 18 3 5 10 5 The stacked barchart should, in one plot show each line of the dataset as a stacked bar using data from 'usage' and 'diff' to create the stacked bar. I can't find a good example of how to do this on the ggplot2 site.
2012 Nov 08
2
Stacked Barchart as relative share
Hi @ all, I'm looking for a solution to plot a dataframe as a stacked bar chart like on this picture: http://4.bp.blogspot.com/_79SognVSu7A/S6OtzgksPSI/AAAAAAAABrw/-IuFNewdZFE/s400/Stacked%2BBar%2BChart.png My dataframe example2.csv <http://r.789695.n4.nabble.com/file/n4648854/example2.csv> My questions: Is there a standard function to convert the values to 100 percent relate to
2008 Nov 18
1
legend color problems
Hello R-folks, I don't get the color of the legend in a lattice-plot right. I select a palette from RColorBrewer and use it in the barchart plot. The resulting graph shows the new palette in the graph, but in the legend rectangles the standard palette is used. Adding a col argument into auto.key uses the new palette with the legend text, but not in the rectangle fill. What am I missing?
2008 Nov 20
1
Repost:lattice graphics -- legend color problems
Hello R-folks, I don't get the color of the legend in a lattice-plot right. I select a palette from RColorBrewer and use (with a col = mypalette argument) it in the barchart plot. The resulting graph shows the new palette in the graph, but uses the standard palette in the legend rectangles. Adding a col argument into auto.key uses the new palette with the legend text, but not in the
2005 Jul 07
2
Brewer colours
Anyone who is interested in using optimal colour palettes should look at the work of Cindy Brewer: www.colorbrewer.org I have written code to use her colour schemes in R. It is included below. Perhaps someone may find this interesting enough to work into a package. Included also is a function showpalette, which was posted here a while back. I don't remember who wrote it. I have copied all
2010 Aug 26
7
Find classes for each column of a data.frame
Hello, Is there a simple way to get the class type for each column of a data.frame? I am in the situation where I would like to get all the columns of a data.frame that are factors. I have tried: apply(df,2,class) but all the columns come back as class "character". Thanks Dan -- ************************************************************** Daniel Brewer, Ph.D. Institute of
2009 Apr 06
2
Collapse data matrix with extra info separated by commas
Hello, I would like to reshape my data for presentation purposes from something like this: > test <- data.frame(a=c("A","A","A","A","B","B","B"),b=c(1,1,2,2,1,1,1),c=1:7) > test a b c 1 A 1 1 2 A 1 2 3 A 2 3 4 A 2 4 5 B 1 5 6 B 1 6 7 B 1 7 to something like this: a b c 1 A 1 1,2 3 A 2 3,4 5 B 1 5,6,7 This seems
2007 Aug 07
11
Positioning text in top left corner of plot
Simple question how can you position text in the top left hand corner of a plot? I am plotting multiple plots using par(mfrow=c(2,3)) and all I want to do is label these plots a), b), c) etc. I have been fiddling around with both text and mtext but without much luck. text is fine but each plot has a different scale on the axis and so this makes it problematic. What is the best way to do this?
2006 May 22
2
SUSE 10.1 64 bit binary
Hi, I was just wondering if anyone had created a 64 bit binary for SUSE 10.1 x86_64 yet. Unfortunately, I upgraded before looking whether a package was available and now cannot find a suitable package on CRAN. If noone has produced one yet, does anyone have any idea when one will be available? Many Thanks Daniel Brewer
2008 Jan 26
1
Read stata file from internet?
Dear R-helpers, I would like to have my students read into R an online Stata dataset: 'http://www.stat.ucla.edu/projects/datasets/risk_project.dta' I was able to read it into R after downloading it and converting it with StatTransfer (http://www.stattransfer.com/). Here is what happens when I use read.dta() as I would use read.table(): > require(foreign) > risk2 <-
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
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,