Displaying 20 results from an estimated 7000 matches similar to: "Rotating the axis labels in the basic graphic device ?"
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,
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,
2006 Mar 08
1
Trellis stacked bar legend
Dear R-Listers,
(well... called Depayan)
The standard example 
barchart(yield ~ variety | site, data = barley,
    groups = year, layout = c(1,6), stack = TRUE,
    auto.key = list(points = FALSE, rectangles = TRUE, space = "right"),
    ylab = "Barley Yield (bushels/acre)",
    scales = list(x = list(rot = 45)))
shows the problem: legend colors are inverted compared to
2010 Mar 03
1
How to create a line and bar panel chart with two different axes?
I need to create a line and bar panel chart with two different axes. I tried
in lattice but couldn't get it worked. Here is my code:
data(barley)
barchart(yield ~ variety | site, data = barley,
              groups = year, layout = c(1,6), stack = F, 
              auto.key = list(points = FALSE, rectangles = TRUE, space =
"right"),
              ylab = "Barley Yield
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
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,
         
2009 Sep 18
1
Lattice barplot not wokring in for-loop?
Dear List-Members,
I am plotting a barplot with the lattice package. The code works, but
when I execute the same code in a for-loop
no plot is shown. Can't figure what the problem is.
(Maybe I am missing something here, but I tried it with plot device
pdf, calling windows() or X11(), testing on windows and linux, etc.)
INFO: R version 2.9.1 (2009-06-26) using Windows/RGui
require(lattice)
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)))
			
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 =
2013 Jan 17
1
Equivalent of box() in grid graphics
Paul Murell's article "What's in a Name" in The R Journal Vol 4/2
gives an interesting example of editing a stacked barplot of the barley
data.  Using the method described in that article, it's easy to do
something along the lines of
grid.edit("plot_01.border.strip.1",
          grep=TRUE, global=TRUE,
          gp=gpar(col = "red"))
That changes more
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~
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
2008 Dec 23
1
Borders for rectangles in lattice plot key
Hopefully an easy question.  When drawing a rectangles in a lattice plot 
key, how do you omit the black borders?
Here is an example adapted from one on the xyplot help page:
bar.cols <- c("red", "blue")
key.list <- list(
   space="top",
   rectangles=list(col=bar.cols),
   text=list(c("foo", "bar"))
)
barchart(
   yield ~ variety | site, 
2006 Nov 06
1
line width (all elements) in Trellis
Dear All,
I am hoping to implement a barchart using trellis graphics where all 
elements have a line width of 2.
Using trellis.par.set(), I am able to make most elements lwd=2, but not 
all.  In particular, the top of the box (above the upper most strip) and 
the left y-axis remain one point.
Code with a barchart() example is below.  Any advice would be greatly 
appreciated.
Thanks for your
2004 Sep 29
2
lattice .ps graphic is rotated in LaTeX slides
I've generated a version of the classic dotplot of the barley data with
library(lattice)
data(barley)
trellis.device("postscript", color=TRUE, file="barley2x3.ps")
old.settings <- trellis.par.get()
trellis.par.set("background", list(col = "white"))
lset(list(superpose.symbol=list(pch=c(19, 1, 25, 2, 15, 22, 23),
       
2005 Jun 01
1
font size in the trellis plot
>library(lattice)
>dotplot(variety ~ yield | site, data = barley, groups = year,
             key = simpleKey(levels(barley$year), space = "right"),
             xlab = "Barley Yield (bushels/acre) ",
             aspect=0.5, layout = c(1,6), ylab=NULL)
and i get the plot whose font overlaps .what parematers should i change.(i do not want to change the size of the plot).
2007 Jan 30
1
change plotting symbol for groups in trellis graph
Hi,
how can I change the plotting symbol for the groups in a trellis panel dotplot.
My graph is similar to:
library(trellis)
dotplot(variety ~ yield | site, data = barley, groups = year,
             key = simpleKey(levels(barley$year), space = "right"),
             xlab = "Barley Yield (bushels/acre) ",
             aspect=0.5, layout = c(1,6), ylab=NULL)
I'd like to
2007 Dec 04
2
Multiple stacked barplots on the same graph?
Dear R-Users,
I would like to know whether it is possible to draw several
stacked barplots (i.e. side by side on the same sheet)...
my data look like :
                            Cond1  Cond1' Cond2   Cond2'
Compartment 1    11,81    2,05    12,49    0,70   
Compartment 2     10,51    1,98    13,56    0,85
Compartment 3     1,95    0,63    2,81    0,22  
Compartment 4     2,08    0,17
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:
2002 May 13
3
Histograms rotated, side-by-side
Hi there,
I am wanting to create 8 side-by-side histograms which have been rotated 90
degrees clockwise from how they usually sit.. all with the same scales.  Is
someone able to help me out?
Thanks so much,
Rachel Cunliffe
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send