On Fri, 24 Aug 2018, Richard M. Heiberger wrote:
color for the legend comes from trellis.par.get
You can control that for an individual plot with the par.settings argument.
tmp <- data.frame(y=sample(10),
group=rep(c("Median", "Maximum"), each=5),
year=factor(re
On Fri, 24 Aug 2018, Bert Gunter wrote:
For the legend, you can use the full "key" argument for more control.
Bert,
This I did.
For the scales, again, the docs provide the answer: the "at" and "labels"
components of "x" component of the scales lists can explicitly control the
x -labels,
For the legend, you can use the full "key" argument for more control. The
docs in ?xyplot for "key" Should answer your questions. "col" controls
text color within the "text" component and rectangle color within the
"rectangle" component , for example. I think this should work as an
alternative to
color for the legend comes from trellis.par.get
You can control that for an individual plot with the par.settings argument.
tmp <- data.frame(y=sample(10),
group=rep(c("Median", "Maximum"), each=5),
year=factor(rep(1998:1999, length=10)))
barchart(y ~ year, da
On Wed, 22 Aug 2018, Rich Shepard wrote:
More when I have results.
Almost there. I've read the auto.key section in ?barchart and looked at
examples from stackoverflow on the web without seeing my syntax errors. I
would like help on two issues:
1. What I want is to have the legend text in
On Wed, 22 Aug 2018, Bert Gunter wrote:
groups = Summary.Type, ...
in your call will then do the job.
As an aside, this is a good example of why you should adhere to this format
for data analysis in R.
Bert,
Progress and retreat. I'm putting this aside for a day or so because I
need t
On Wed, 22 Aug 2018, Bert Gunter wrote:
(I know that you said your post may already be "out of date", but ...)
Bert,
Still reading ?xyplot/?barchart.
But ?barchart says:
"Formally, if groups is specified, then groups along with subscripts is
passed to the panel function, ..."
which, as I
(I know that you said your post may already be "out of date", but ...)
" Despite additional reading of barchart() examples and help pages I'm
still
missing how to get grouping working and use the years in the dataframe as
labels on the x-axis."
But ?barchart says:
"Formally, if groups is specif
On Wed, 22 Aug 2018, Rich Shepard wrote:
Correcting the barchard() command fixed the main issue; getting the second
set of bars is still eluding me, but I'll continue working on fixing this.
I'll get the years as the x-axis labels rather than year number in
sequence from 1 to 29.
Despite add
On Wed, 22 Aug 2018, Bert Gunter wrote:
See inline.
Bert,
Will do. Sent a reply before seeing this. More to follow.
Thanks,
Rich
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
P
See inline.
-- Bert
On Wed, Aug 22, 2018 at 9:17 AM Rich Shepard
wrote:
> On Wed, 22 Aug 2018, Bert Gunter wrote:
>
> > No reproducible example (see posting guide below) so minimal help.
>
> Hi Bert,
>
>I thought the header and six data rows of the dataframe plus the syntax
> of
> the com
On Wed, 22 Aug 2018, Bert Gunter wrote:
No reproducible example (see posting guide below) so minimal help.
Hi Bert,
I thought the header and six data rows of the dataframe plus the syntax of
the command I used were sufficient. Regardless, here's the dput() output:
structure(list(Year = c(1
No reproducible example (see posting guide below) so minimal help.
Remove the quotes from your formula. Why did you think they should be
there? -- see ?formula.
Read the relevant portions of ?xyplot carefully (again?). You seemed to
have missed:
"*Primary variables:* The x and y variables should
I've not before created bar charts, only scatter plots and box plots.
Checking in Deepayan's book, searching the web, and looking at ?barchart has
not shown me the how to get the results I need.
The dataframe looks like this:
head(stage_heights)
Year Med Max
1 1989 91.17 93.32
2 1990
2)
)
)
Regards
Duncan
Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mac...@northnet.com.au
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Seth Bigelow
Sent: Thursday, 28 July 2016
I have constructed a barchart that requires a panel call, but the panel
reduces the facsimiles of bars in the legend to small colored circles. You
can see this behavior in the following example:
Titan <- as.data.frame(Titanic)
titanpanel <- function(x,y,...){
panel.barchart(x,y,...)
}
barchart(C
Pete,
Thank you for this example. I recommend using the likert function in
the HH package.
d2 <-
structure(c(1000, 2000, 2500, 5000, 1000, 2000, 3000, 2000, 200,
600, 1000, 900), .Dim = c(4L, 3L), .Dimnames = list(c("1/1/2014",
"2/1/2014", "3/1/2014", "4/1/2014"), c("A", "B", "C")))
d2
likert
Pete Brecknock wrote
> Hi
>
> The code below plots a stacked barchart.
>
> I would like to overlay on this chart a circular plotting character at the
> sum of the bars for each month. The plotted characters should be joined
> with a line.
>
> So, for "1/1/2014", I would like to see a point at 2
> > Anyone know what the 95% confidence
> > interval of the median would be?
For an R answer you could get one for each group from wilcox.test( ,
conf.int =TRUE ) and build that into an alternative boxplot stats function
which you could specify in your bwplot call.
Steve Ellison
This is not an R question. Read the references.
Bert
Sent from my iPhone -- please excuse typos.
On Jul 5, 2013, at 12:15 PM, Shaun Jackman wrote:
> Hmm. Interesting point, Bert. I don't know whether the notches show
> the 95% confidence interval or the median, or the 95% confidence
> interva
Hmm. Interesting point, Bert. I don't know whether the notches show
the 95% confidence interval or the median, or the 95% confidence
interval that two non-overlapping notches have different medians.
You're saying it's the latter? Anyone know what the 95% confidence
interval of the median would be?
Yes! Thank you, David. That's exactly what I'm I'm looking for. For
the record, here's a couple pages leading to this answer:
http://www.hep.by/gnu/r-patched/r-faq/R-FAQ_89.html
http://latticeextra.r-forge.r-project.org/man/segplot.html
http://rgm3.lab.nig.ac.jp/RGM/r_function?p=latticeExtra&f=seg
Be careful!
You are talking about 2 different varieties of apples here. As I read
it, the CI's in the cancer data, which I know is just for example
purposes, are CI's for the **individual means**; the notches in
boxplots are nonparametric and for 2 groups with roughly equal sample
sizes, "The ide
On Jul 5, 2013, at 11:15 AM, Shaun Jackman wrote:
> Hi Bert, Dennis,
>
> I'll agree that using a barchart was a poor choice. I was in fact using a
> notched bwplot to show the median and confidence interval of the median. In
> this case it's the median and confidence interval that I want to high
Hi Bert, Dennis,
I'll agree that using a barchart was a poor choice. I was in fact using a
notched bwplot to show the median and confidence interval of the median. In
this case it's the median and confidence interval that I want to highlight,
and I find that the visual noise of the box and whisker
Shaun:
I understand that this type of plot is standard in many disciplines,
but it really is awful (google on 'Dynamite plots' for some more
erudite perspectives). Have you considered bwplot() for your
unaggregated data instead?
(No need to reply. It's July 4, and I'm just waving a little flag fo
Hi,
I'd like to draw a lattice barchart of means with error bars to show
the standard deviation. I have the barchart, how do I add the error
bars?
require(datasets)
require(lattice)
x <- aggregate(weight ~ Diet, ChickWeight, function(x) c(mean=mean(x),
sd=sd(x)))
barchart(weight[,'mean'] ~ Diet,
Thanks. I switched to ggplot2 which offers error bars.
Joh
Dieter Menne wrote:
>
>
> Johannes wrote:
>>
>>
>> How can I, given the code snippet below, draw the error bars in the
>> center of each grouped bar rather than in the center of the group?
>>
>
> http://markmail.org/message/oljgimk
Johannes wrote:
>
>
> How can I, given the code snippet below, draw the error bars in the center
> of each grouped bar rather than in the center of the group?
>
http://markmail.org/message/oljgimkav2qcdyre
Dieter
--
View this message in context:
http://n4.nabble.com/Lattice-barchart-erro
Hi,
How can I, given the code snippet below, draw the error bars in the center
of each grouped bar rather than in the center of the group?
Thanks for any hints,
Joh
library(lattice)
barley[["SD"]] <- 5
barchart(
yield ~ variety | site,
data = barley,
groups=year,
origin=0,
lowDev=b
Thanks a lot for your help, the examples worked fine, just have to
change the colours to produce a b&w plot, and add the legend
On 05/02/2010 17:11, RICHARD M. HEIBERGER wrote:
Fran,
The trick is to use box.width, not box.ratio.
xyplot(Perc ~ as.POSIXct(hora,format="%d-%m-%Y %H:%M"),
d
Fran,
The trick is to use box.width, not box.ratio.
xyplot(Perc ~ as.POSIXct(hora,format="%d-%m-%Y %H:%M"),
data=digrate, groups=Drate, ## key=leg,
xlab="time of the day",
horizontal=FALSE,
scales=list(alternating=FALSE,
tck=c(1,0),
x=list(at=seq(r
Hi all,
Thanks for your answers, it worked, but still can't get the time scale on the x-axis, probably has
to do with the unit in the viewport or something like that. But following your recommendation I've
prepared some dummy data to go with the scripts. As before we have two graphs, one that ha
> SCript with xyplot:
> xyplot(Perc~as.POSIXct(hora,format="%d-%m-%Y
> %H:%M"),digrate,groups=digrate$Drate,key=leg,xlab="time of the day",
>
> scales=list(alternating=F,tck=c(1,0),x=list(at=seq(r[1],r[2],by="hour"),labels=format(seq(r[1],r[2],"hours"),format="%H:%M"))),
> panel=function
I'm trying to produce a barchart plot with groups, in which each group is placed in a particular
time scale in x-axis. If I use barchart directly it does not take the time scale. I've tried with
xyplot and adding a panel.barchart, I have the bars in the right place, but not the three groups I'm
On Tue, Nov 17, 2009 at 3:31 PM, Wilberforce
wrote:
>
> I have a data frame with two factors and want to create panel barcharts with
> one factor defining the panels and the other the vertical categories by
> which I can count the rows of data in each combination of factors. How do I
> do this?
>
I have a data frame with two factors and want to create panel barcharts with
one factor defining the panels and the other the vertical categories by
which I can count the rows of data in each combination of factors. How do I
do this?
I have been trying to use barchart(~factor1|factor2) but it doe
Veerappa Chetty wrote:
>
> Hi,Can I use "reorder" function with barchart as in dotchart? Here are
> some
> codes which do not work for me.
> .. example remove
>
As your example is not self-contained (it should be), I cannot show it with
your data.
My preferred way is to reorder outside, beca
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
Thanks a bunch, Coltrey! That works like a charm as well!
In summary, the code that solves both my queries is shown below:
---
mdat <- matrix(c
(-2.65,-3.7,-0.8,-1.4,-2.39,-1.12,-4.78,-4.9,-0.76,-1.56,
1.77,1.41,1.92,1.78,0.05,0.96,0.29,
No problem. Sorry I ignored your font question, I have no personal
experience, but this may help:
https://stat.ethz.ch/pipermail/r-help/2009-April/196745.html
On Wed, Jun 3, 2009 at 10:17, Girish A.R. wrote:
> Thanks, Coltrey! Option 1 is what I was looking for.
>
> -Girish
>
> On Jun 3, 8:05 pm
Thanks, Coltrey! Option 1 is what I was looking for.
-Girish
On Jun 3, 8:05 pm, Coltrey Mather wrote:
> barchart(mdat,
> groups=FALSE,
> layout=c(2,5),
> aspect=0.7,
> reference=FALSE,
> as.table=TRUE,
> main=list("Maintitle",cex=1),
> pane
barchart(mdat,
groups=FALSE,
layout=c(2,5),
aspect=0.7,
reference=FALSE,
as.table=TRUE,
main=list("Maintitle",cex=1),
panel=function(x, y, ...) {
colours <- character()
colours[x < 0] <- 'red'
co
On Jun 3, 2009, at 9:56 AM, Girish A.R. wrote:
Hi,
I have been recently experimenting with the lattice package, which I
must admit is just great! However, I'm sort of stuck in modifying
certain parameters; Would appreciate some pointers on a couple of
things:
1) Is it possible to change the f
Hi,
I have been recently experimenting with the lattice package, which I
must admit is just great! However, I'm sort of stuck in modifying
certain parameters; Would appreciate some pointers on a couple of
things:
1) Is it possible to change the font of the labels (say to computer
modern) -- eith
45 matches
Mail list logo