Displaying 20 results from an estimated 32 matches for "simplekey".
2024 Sep 14
1
how to specify point symbols in the key on a lattice dotplot
...ist(c("impaction", "no impaction")),
> points = list(pch =16:17, col = 1:2) ))
>
> gets me what I want.
>
> When using key = (), is it necessary to specify all features of the
> plotting symbols and the text? I was under the impression that auto.key
> and/or simpleKey (which I'd also tried) had certain defaults, but one or
> more of those defaults could be changed by providing arguments, with all
> unspecified features remaining at their respective defaults.
Here is a very brief review:
- To use key = list(...) you need to be very verbose, specifying...
2024 Sep 13
1
how to specify point symbols in the key on a lattice dotplot
...key = list(text = list(c("impaction", "no impaction")),
points = list(pch =16:17, col = 1:2) ))
gets me what I want.
When using key = (), is it necessary to specify all features of the
plotting symbols and the text? I was under the impression that auto.key
and/or simpleKey (which I'd also tried) had certain defaults, but one or
more of those defaults could be changed by providing arguments, with all
unspecified features remaining at their respective defaults.
Thanks.
--Chris Ryan
On Fri, 13 Sep 2024 10:45:08 -0700, Bert Gunter wrote:
>"Why does k...
2004 Mar 18
2
Install R on Mac OS.X
I am running R 1.8.1 flawlessly on my mac with OS.X.3
My friend is running 1.6.1 but it is impossible for him to make 1.8.1
work. I do not understand why it should work better in my computer. I
do, however, have X.11 installed, he doesnt, could that be an issue and
if it is, does it suffice to install X.11 after RAqua has been
installed?
Tor A Strand, MD PhD
Centre for International Health
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).
2008 Apr 18
1
Vertical bars with barchart
Hallo,
What is the right way to get vertical bars in
a barchart?
For instance
barchart(VADeaths,
key=simpleKey(colnames(VADeaths),points=F,rectangles=T))
gives what I need,
only I would like the bars to be vertical.
But
barchart(VADeaths,horizontal=F,
key=simpleKey(colnames(VADeaths),points=F,rectangles=T))
does not give what I need,
and I do not understand how to change the dimensions
accordingly.
T...
2024 Sep 13
2
how to specify point symbols in the key on a lattice dotplot
...r of my two
plotting symbols, one for each group. I would like the
symbols in the key to match the plotting characters in the graph: 16
(filled circle) for one group and 17 (filled triangle) for the second
group. How would I do that? I have not had any success with supplying
arguments to auto.key, simpleKey, or key. Guess I'm not understanding
the syntax.
Thanks.
--Chris Ryan
--
Agency Statistical Consulting, LLC
Helping those in public service get the most from their data.
www.agencystatistical.com
Public GnuPG email encryption key at
https://keys.openpgp.org
9E53101D261BEC070CFF1A0DC8BC50E7...
2008 Dec 02
1
legend idea for latticeExtra
...uot;),
unit="npc",
pch=1, lty=NULL, col=seq_along(text), cex=0.6,
cex.title=0.8, ...){
if(loc) {
ll <- grid.locator(unit)
print(ll)
x <- as.numeric(ll$x)
y <- as.numeric(ll$y)
}
lines <- !is.null(lty)
points <- !is.null(pch)
keyGrob <- draw.key(key=simpleKey(text, lines=lines,
points = points,cex=cex, cex.title=cex.title, ...),
vp=viewport(x=unit(x, unit), y=unit(y, unit)), draw=F)
grid.draw(keyGrob)
invisible(keyGrob)
}
# example (locator used for the second legend)
xyplot(1~1)
llegend()
llegend(loc=T, title="Here goes another&quo...
2004 Oct 26
1
help!!!
Dear R users,
Would need some help.
I will compare some results in a dotplot.
The picture is very dark(grey) in the background, could I get it ligther?
R-code
dotplot(LINES~VAL,
groups=QQ,key=simpleKey(levels(QQ1),space="top"),xlab="Values",main="Tail-Measure"
)
(where LINES,VAL, QQ is vectors)
------------------------------------------------------------------------------
This e-mail and any attachment may be confidential and may also be privileged.
If you are n...
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 plot the different years with different symbols (eg. one
with pch=19 the other with pch=21 or so). Thank you very much...
2008 Mar 07
1
using xyplot with groups and panel.linejoin
Dear All,
I am using xyplot() with many groups like this:
statselect <- levels(dat$stat)
xyplot(relmse~T|lambda, groups=stat, data=dat,
panel = panel.superpose,
key=simpleKey(statselect, lines=T))
However, I want lines not scatterplots and if I set
panel.groups=panel.linejoin that connects the lines according to the
relmse and not according the consecutive values of T. Is there a short
solution to this very simple problem, which doesn't require custom made
panel fu...
2008 Aug 05
1
xyplot key issue - line colors
...roblem regarding the colors assigned to the lines in the key
to an xy plot. I specify the plot like this:
xyplot(numbers~sqrt(breaks)|moltype+disttype, groups = type, data = alldata,
layout = c(3,2), type = "l" , lwd = 2, col = c("gray", "skyblue"),
key = simpleKey(levels(alldata$type), points = FALSE, lines = TRUE,
columns = 2, lwd = 2, col = c("gray", "skyblue")))
However, the lines in the key (the lines that indicates which line is
which) are still blue and magenta, and not gray and skyblue. I have
seen something about superposi...
2011 Aug 16
3
Constructing an additional key inside of a lattice panel
An embedded and charset-unspecified text was scrubbed...
Name: inte tillg?nglig
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110816/b1fd368c/attachment.pl>
2007 Apr 27
1
xy plot key colors don't match plot
...t;,"Human"))
library(lattice)
xyplot(DistanceMeters~Hours, groups=Surveyor, xlab="Time (h)",
ylab="Distace Moved (m)", pch = c(1, 16), col=c("black","black"),
auto.key=T)
Produces dots correctly, but not the points in the key. Switching to
simpleKey I have only been able to change the color of the key text,
but not the points.
xyplot(DistanceMeters~Hours, groups=Surveyor, xlab="Time (h)",
ylab="Distace Moved (m)", pch = c(1, 16), col=c("black","black"),
key=simpleKey( points = TRUE, text=c("H...
2012 Feb 28
1
Dotplot edition
...ylab in a dotplot. I have checked many webpages and R sites, but I have not found any help.
This is the same structure of the plot in R graph Gallery: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=150
thanks in thanks is advance
José
Mi code is this:
### setup the key
k <- simpleKey( c( "Perdidas ", "Contestadas" ) )
k$points$fill <- c("lightblue", "lightgreen")
k$points$pch <- 21
k$points$col <- "black"
k$points$cex <- 1
cliente100RD<- cliente100[order(cliente100$porc_perd),]
### create the plot
dotplot( rown...
2008 Dec 21
1
Trouble with 'smooth' using xyplot in lattice
...; lines for the different groups. This is the closest I can get to the desired plot:
xyplot(masmean ~ mas, data = Pre96CR.masmeans, groups = behavior,
type = 'smooth', span = 0.3, lwd =2,
xlab = "Minutes After Sunrise", ylab = "Behaviors at Castle"
key = simpleKey(levels(Pre96CR.masmeans$behavior), space = 'right'))
This code produces a plot, but one level of the grouping factor ('behavior') is always absent from the plot and in the middle of the plot I receive an error message:
Error using packet 1
NA/NaN/Inf in foreign function call (arg 1...
2009 Sep 28
1
xyplot help - colors and break in plot
Dear List,
I am new to lattice plots, and am having problems with getting my plot to do what I want. Specifically:
1. I would like the legend to have the same symbols as the plot. I tried simpleKey but can't seem to get it to work with autoKey. Right now my plot has dots (pch=19) and my legend shows circles.
2. I have nine groups but xyplot seems to only be using seven colors, so two groups have the same color. How do I get a range of nine colors?
3. I have one group who's y ran...
2008 May 20
2
need some help in plotting xy graph
...xyplot(formula(formd),
data = fdf, groups = overlay,
type = "b", as.table = TRUE, cex=0.20,
#subset = ok, commented to show breaks in graph
main = main, xlab = "Time", ylab = ylab,
scales = scales,
key = simpleKey(text = lgnd.txt, cex = 3/4,
points = FALSE, lines = TRUE),
page = function(n) annotate(opts$ann),
sub = "",
layout = c(1,1)
)
)
"computeTimeScales" <-
function(z, rot=0) ## z...
2008 Aug 25
1
lattice : using both strip and strip.left
...(which.given=2) ,
> panel = function(x, y, ...) {
> panel.fill(grey(0.95), border="white")
> panel.grid(h=-1, v=-1, col="white", col.line="white", lty=1,
> lwd=2.5)
> lpoints(x, y, pch=16, col=1:2, cex=1)
> },
> key = simpleKey(levels(df$variable), space = "right"))
>
> print(p2)
Several things resist me, I welcome any input,
- with two levels of facetting, i often find convenient to layout the
graphs in a 2d, rectangular matrix, and have vertical and horizontal
strips as in ggplot2. Using strip and...
2008 May 21
2
need some help in plotting xy graph
...xyplot(formula(formd),
data = fdf, groups = overlay,
type = "b", as.table = TRUE, cex=0.20,
#subset = ok, commented to show breaks in graph
main = main, xlab = "Time", ylab = ylab,
scales = scales,
key = simpleKey(text = lgnd.txt, cex = 3/4,
points = FALSE, lines = TRUE),
page = function(n) annotate(opts$ann),
sub = "",
layout = c(1,1)
)
)
"computeTimeScales" <-
function(z, rot=0) ## z...
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