Hi All,
I have this data:
type-c(country,country,country,world,world,world)
place-c(A,B,C,A,B,C)
rank-c(1,3,5,512,420,320)
df1-data.frame(type,place,rank)
and need to produce an xyplot with 2 panels, where the x-values are
labelled:
xyplot(place~rank|type, data=df1,
panel= function(x, y,
,..., subscripts)
require(grid)
panel.grid(h = -1,v = 0, lty=dotted)
grid.text(unit(x,native),
unit(y,native),
label=x, just=center)
})
http://www.nabble.com/file/p24760249/example2.png
taz9 wrote
Hi All,
I'm trying to format the y-axis in an xyplot to show numbers with a comma
separating the thousands but I'm not able to do it using formatNum(y,
big.mark=,). This is what I have:
library(lattice)
year-c(2003,2004,2005,2006,2007,2008,2003,2004,2005,2006,2007,2008)
Hi All,
I have some data which needs to be plotted with lattice.
library(lattice)
cars - c(0.1, 0.3, 0.6, 0.4, 0.9)
trucks - c(0.2, 0.5, 0.4, 0.5, 0.1)
drivers-c(121,145,167,200, 210)
year-c(2005,2006,2007,2008,2009)
type-c(local,local,foreign,foreign,foreign)
xyplot(cars+trucks~year|type,
Hi All,
I have a very simple graph:
cars - c(1, 3, 6, 4, 9)
trucks - c(2, 5, 4, 5, 12)
year - c(2004, 2005, 2006, 2007, 2008)
df2-data.frame(cars,trucks,year)
xyplot(cars+trucks~year, data=df2, type=o)
I need to show the values of cars on the graph. How can I do this?
Thanks.
--
View this
.
Hope this helps,
baptiste
On 8 Apr 2009, at 19:40, taz9 wrote:
Hi All,
I have a very simple graph:
cars - c(1, 3, 6, 4, 9)
trucks - c(2, 5, 4, 5, 12)
year - c(2004, 2005, 2006, 2007, 2008)
df2-data.frame(cars,trucks,year)
xyplot(cars+trucks~year, data=df2, type=o)
I need to show
Hi All,
I have a panel xyplot with 2 lines in each panel. I'd like to label one line
only but don't know how to do this. The code below labels both lines. Any
ideas on how I could change it to show the y-values of only one of the
lines? Many thanks!
xyplot(apples + bananas ~ year | category,
7 matches
Mail list logo