Displaying 20 results from an estimated 10000 matches similar to: "help for barchart(lattice)"
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,
2009 Oct 13
1
Lattice barchart-reordered
Hi,Can I use "reorder" function with barchart as in dotchart? Here are some
codes which do not work for me. Thanks
Chetty
___________________________
a1c.cast$bmi.cat.reordered[a1c.cast$eth!="Other"]
<-with(a1c.cast[a1c.cast$eth!="Other",],reorder(bmi.cat.ordered[a1c.cast$eth!="Other"],
BP.FN.RATE,median ))
barchart(BP.FN.RATE~
2003 Jul 31
2
help with graphics
I'd like to use lattice to make graphics under conditional structure like :
if (TRUE) { barchart(....)
dev.print(png, file = "image1.png", width = 600)
}
but there's nothing in the output file. It seems that it's too long to print graphic into the graphical output and the saved file is a blank picture.
it works if I do that without the conditionnal structure.
it doesn't
2006 Mar 21
5
How to use: library lattice: barchart
Dear ladies and gentlemen!
In the help text for the xyplot (library(lattice), help(xyplot)) is an example
given how one can use barchart:
barchart(yield ~ variety | site, data = barley,
groups = year, layout = c(1,6),
ylab = "Barley Yield (bushels/acre)",
scales = list(x = list(abbreviate = TRUE,
minlength = 5)))
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)),
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 =
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,
2010 Mar 17
2
Adding text outside (lattice barchart) plotting region.
Hi All,
I need some help with adding text at the bottom of the graph (outside of
default outline of graph).
Say, I need to write "Month: 01 04" below each of the two years in the
following R code, something like this:
_______________
| |
| Plot |
|___ __________|
1931 1932
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,
2010 Apr 22
1
how to reorder of groups and specify ylim for each row in lattice barchart
R experts,
Is there anyway to reorder inside each group? In the following example, the
bar of year 1932 is always plotted before the bar of year 1931, may I change
the order inside each groups of bars?
library(lattice)
barchart(yield ~ variety | site,data=barley, groups = year, layout =
c(1,6),auto.key = list(points = FALSE, rectangles = TRUE, space =
"right"),ylab = "Barley Yield
2009 Dec 08
3
re-ordering x-lables using barchart()
Hi R Users,
I'm trying to re-order the "site names" ("Waseca", "Morris", ...). I'm using
following code:
libarry(lattice)
barchart(yield ~ variety | site, data = barley,
groups = year, layout = c(6,1), aspect=.7,
ylab = "Barley Yield (bushels/acre)",
scales = list(x = list(abbreviate = TRUE, rot=45,
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 Feb 26
1
bwplot() {lattice}
Hi All,
I'm trying to plot boxplot graph. I tried barchart with "groups=" option and
it worked fine. But when I try to generate same kind of graph using
bwplot(), "groups=" option doesn't seem to work. Though this works,
yield ~ variety | site * year
I'm thinking why "groups=" doesn't work in this case, can anyone help
please...
#Code:
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 :
2010 Jan 24
2
different x-axes in Lattice
I use lattice package and 'barchart' to build a chart. I have a
problem with setting different x-axes. Some x categories are missing
but they are display and I don't want. I use scales = list(y =
"free",x="free") but it works only for y-axes. Simple example:
package(lattice)
barchart(yield ~ variety | site, data = barley,
groups = year, layout = c(1,6),
2002 Dec 13
1
lattice barchart sorting and coloring
Hi List,
I am trying to produce a lattice barchart with text as labels. My data is
ordered, but the chart sorts x labels alphabetically.
Is there any way of forcing my ordering onto the chart?
Secondly, I wish to color groups of the bars based on a coded variable. Any
way of passing these codes onto colors on the chart (panel.superpose does
changes columns to dots).
Any suggestions
2010 May 06
1
bar order using lattice barchart()
Dear List,
I am want to plot my data in increasing order using the lattice barchart() function. I used order() to put my data in the order I want, but when I plot it I get the original order of the data. I think this has to do with the row index number since order() does not re-number the rows in the new order but instead keeps the original row numbers and puts them in a different order. For
2003 Jul 31
2
history for graphics
I've seen that there's an history for graphics.
How can I save it manually?
Can I save more than 4 plots?
I'm using R1.6.2 under win98
[[alternative HTML version deleted]]
2006 Apr 01
2
barchart in black & white with 10 categories?
Dear list,
I am trying to plot a barchart (from lattice) in B & W, with 10
categories per bar.
It seems that the colours are recycled after reachingcategory number
7, which creates a problem interpreting the chart. I therefore have
two questions:
1) How do I get more shades?
2) Does anyone have a theme to share with me with distinctive shades
in Black & White?
Thankful for all the
2006 Mar 01
2
lattice-Internal
Hi,
The functions prepanel.default.bwplot() and lpretty() are not running in Deepayan's
barley example concerning vertical bars with the lattice function barchart().
Why, is there a restricted use for the package lattice-Internal?
Urs Simmen
mailto:usimmen at dtc.ch