Displaying 20 results from an estimated 6000 matches similar to: "combination xyplot and barchart?"
2006 Jan 16
1
label of second y-axis in xyplot (lattice)
Dear group,
First I provide you with an example, I found in the newsgroup. Then I'd like to explain my problem to you by means of the output.
enviro <-
data.frame(Year = rep(2001:2002, each = 365),
Day = rep(1:365, 2),
Precip = pmax(0, rnorm(365 * 2)),
Temp = 2 + 0.2 * rnorm(365 * 2))
xyplot(Precip + Temp ~ Day | Year,
2006 Dec 08
1
missing factor levels in a lattice barchart panel cause unexpected failure
Hi all - I'm trying to generate lattice barchart graphs with missing
values, and came across the following:
This does not run. I would expect it to:
library(lattice)
D = data.frame(X=1, Y=factor(letters[2], letters[1:2]))
barchart(~ X, D, groups=Y)
Error in grid.Call.graphics("L_rect", x$x, x$y, x$width, x$height,
resolveHJust(x$just, :
invalid line type
which is simply
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
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
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
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,
2012 Mar 03
2
Grouped barchart confidence intervals in lattice
Hi everyone,
I'm having trouble adding error bars to a grouped barchart in lattice. I know that this topic has been addressed quite a bit, as I've been searching the internet for a while to try to troubleshoot the issue, but I've not been able to find any solution that I could get working on my data. I was wondering if someone could look at my code and tell me what I'm doing
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 Apr 19
2
Overlay of barchart and xyplot
Hello R Folks,
I am new to R. I have been struggling to overlay a barchart with a
xyplot together on one plot but did not get this worked out. Any help
and idea are greatly appreciated.
I attached R scripts for barchart and xyplot below and also data I used.
What I am trying to do is just to put the barchart and xyplot together
on one plot.
Huapeng
<<dispersal_infestation.csv>>
2010 Feb 20
1
How get the single bar x coordinate in barchart when groups is used?
Hi all,
I am using barchart() to plot values above the bars. When using groups argument we get bars grouped arround a given x level. By placing values above this bars we need to know the respective x coordinates. How can I get it?
require(lattice)
da <- expand.grid(x=1:5, z=1:3, w=1:2)
da$y <- rpois(da$x, lambda=23)
barchart(y~x|w, groups=z, data=da, horizontal=FALSE,
2018 Sep 22
2
grafico de barras (barchart) con barras de error y achurado (hatching) en lugar de escala de grises
Que tal comunidad, hace dias que estoy en un problema que no puedo
resolver. Resulta que debo confeccionar un grafico de barras (columnas)
que debe incluir barras de error. La unica forma en que me resulto es
con barchart() de la libreria Hmisc, y haciendo un truco un poco
complicado para mi nivel de usuario autodidacta. Ahora que ya lo tengo
(despues de semanas de busqueda) resulta que me
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),
2011 Jan 26
1
barchart panel.text add label value and percent
Hello everybody,
i need some help to display text as label in my barchart
the label is the combination of x value + text
text= calculated percentage => per
it display properly the x value
but, wrongly repeats the text of the fisrt level LangueTXT factor on the
second
any solution?
Thanx very much
Christophe
######## here is the code ##########
library(lattice)
Langue <- c(1, 1, 1, 2, 2,
2018 Sep 22
2
grafico de barras (barchart) con barras de error y achurado (hatching) en lugar de escala de grises
Gracias Carlos !!! ... alguna idea con la libreria lattice ? es solo
que tengo que hacer 3 graficos diferentes y el aspecto de los mismos
quedara diferente con lattice y ggplot. Voy a ver si me resulta todo en
ggplot.
Saludos y gracias de nuevo,
Eric.
On 22/09/18 12:08, Carlos Ortega wrote:
> Hola,
>
> ggplot tiene un /geom /justamente para esto...
>
>
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
2010 Jul 05
4
Data Labels in a barchart (Lattice or otherwise)
Hi,
Can anyone please help me with how I could add labels with the value for
each bar in a barchart? (similar to how data labels can be added in Excel) I
have done a lot of searching but havent been lucky.
Thanks,
Raoul
--
View this message in context: http://r.789695.n4.nabble.com/Data-Labels-in-a-barchart-Lattice-or-otherwise-tp2278027p2278027.html
Sent from the R help mailing list archive at
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)),
2005 Apr 21
3
Need help with R date handling and barchart with errorbars
Hi All..
Have a question.. For the following r code
testdata <- as.data.frame(t(structure(c(
"1/1/04","LV1",3.8,2,87,
"2/1/04","LV1",3.2,3,28,
"3/1/04","LV1",3.4,3,88,
"4/1/04","LV1",3,2,26,
"5/1/04","LV1",3.8,2,87,
"6/1/04","LV1",3.2,3,28,
2023 Nov 18
1
combine barchart and xyplot in lattice
On Sat, 18 Nov 2023 at 06:44, Naresh Gurbuxani
<naresh_gurbuxani at hotmail.com> wrote:
>
> In below graph, I would like to add two vertical lines using
> panel.abline(). Is this possible?
I assume you want the 'v' variable in panel.abline() to be interpreted
in the context of your x-axis, which here represents a factor
variable. Unless two factor variables have the same
2005 May 05
6
Need some quick help with lattice - barchart
For the following code below, the x-axis ticks are 1,2,3,4,5,6,7 when I was expection them to be 1,2,8,9,10,11,12. Please help me figure out where is the mistake.
library(lattice)
testdata <- as.data.frame(t(structure(c(
1,2005,9.24,6.18,634,
2,2005,8.65,6.05,96,
8,2004,6.81,6.51,16,
9,2004,9.0,7.29,8,
10,2004,8.84,6.18,524,
11,2004,8.54,6.35,579,
12,2004,9.97,6.3,614,
12,2005,8.75,5.84,32,