similar to: xyplot Legend Title and Position

Displaying 20 results from an estimated 20000 matches similar to: "xyplot Legend Title and Position"

2011 Feb 21
1
wrong lines in auto.key xyplot
Hi all, I'm having a problem with the auto.key function in xyplot. I changed the symbols an lines styles using these commands trellis.par.set(superpose.symbol=list(pch=c(0,1,2,3,4,5,6,8,15,16))) trellis.par.set(superpose.symbol=list(col=c(rep("black",11)))) trellis.par.set(superpose.symbol=list(cex=c(rep(0.6,11))))
2008 May 13
1
Legend in scatterplot and adding regression lines
Hi R users The scatterplot (used package R-Cmdr ) obtained has the legend off the plot in the upper left I would like to decide where to put the legend - is that option still available and how do I do it? code: Dataset <- read.table("J:/Pigmatingsb.txt", header=TRUE, sep="\t", na.strings="NA", dec=".", strip.white=TRUE)
2006 Aug 02
1
help with formatting legend in xyplot
I am doing a xyplot: (x~y, groups = z, pch=8, auto.key=T). This changes the symbol in the graph to an asterisk (*), but not in the legend, which is still an open circle. I have found out how to manipulate the position and the color of the letters in the legend, but cannot change the legend symbol to match the symbol in the graph. Could you help? Thanks, Kaushik [[alternative HTML version
2010 Mar 22
1
Add title to color spectrum legend in xyplot
Hi, I have a plot that is essentially the same as that in Figure 5.6 of "Lattice - Multivariate Data Visualization with R". The key difference is that I would like to add a title to top of the grey color spectrum legend, but have thus far been unsuccessful. I've tried a variety of options, but to no avail. I'm new to R, and admittedly I don't understand the
2011 Jul 26
2
Lattice: choice of symbol and symbol position in legend
I am making final adjustments to a multi-plot figure using basic and lattice. In the lattice plot, I would like to include a legend that matches the format of the legends in the other plots, which consist of appropriately colored squares (pch 22) followed by text. In lattice, I was able to get a legend using auto.key = list(x = .6, y = .6, corner = c(0, 0), pch=22) but my request for pch=22 was
2006 Aug 09
1
legend on trellis plot
Dear all I have two questions regarding trellis plots - which I hope you may be able to help me with. Is it possible to place the key in a trellis plot on the panel (instead of beside the panel)? This will cause the same key to be reproduced on each panel. Please see the plot below - here I placed the legend below the plot. I tried moving the key to the function statement, but it did not really
2008 Feb 19
1
Change the color and lines of the legend using bwplot
Dear list, I have following plot, where I have set the color (red and green) and lines (lty=2:3) in the panel.groups but can't not figure out how change the lines and color of the legend in the "key" to the same lines and color as in the panel.groups. bwplot(means ~ age | scales , dat, panel = "panel.superpose", groups = sex,scales = list(x = list(rot =
2008 Oct 15
2
Lattice key title color
Dear R users, is there a way to define the color of the title for the legend in lattice? The help page on xyplot has a lot of details on key options just as the new book, but no mentioning of a color attribute for the title. Should I use ltext or is there any other way? Best wishes, Erik [[alternative HTML version deleted]]
2008 Jan 11
4
lattice color problem with symbols: bug?
Dear useR's, I have a problem with the lattice plotting of some symbols: library(lattice) test<-data.frame(x=c(2,3,1,5),u=c(rep(1,2),rep(2,2)),g=c(rep(c(1,2),2))) xyplot(x~u,groups=g, data=test, par.settings=list( superpose.symbol=list(pch=c(22, 23),cex=c(1.7,1.6),col="black") ), key=list( text=list(c("t1","t2")), space =
2009 Jun 19
1
Adding site id to xyplot
Dear R Lists, Can anyone help me add site IDs (site: 1~50) directly to my xyplot. I have 50 sites and collected observations from the sites at 13 different time points. I want to look at the change of my observations in each site. I was able to make a graph using xyplot, however, I can't find how to add site IDs within the graph not adding them in the legend. Overall, I would like to be able
2006 Dec 15
1
xyplot: legend title + legend on 1 line
Does anybody know how in xyplot to put the legend title on one line with the legend? I can get the legend on one line with columns=... but the title is always on top. I tried a custom key with key=... and text=... but I can't put the title text in front of the plotting symbol. I am looking for the following layout of the legend, on one line: "Legend Title:" + plot symbol1 + legend
2010 Jun 22
2
Lattice legend
I have a moderately complex graph with three panels. There are data points plotted, and fitted lines are added using a panel function, which includes "with(alt.data[[which.packet()[1]]]" statements. It all graphs out beautifully, but none of the usual tricks to get the proper legend to plot are working, i.e., using auto.key, key, etc. One message I keep getting is Error in
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
2011 Aug 22
1
lattice to ggplot2 conversion help
Hi, I am interested in ggplot2 and I found this lattice code very interesting (http://addictedtor.free.fr/graphiques/graphcode.php?graph=48). Code: library(lattice) lattice.options(default.theme = canonical.theme(color = FALSE)) tmp <- expand.grid(geology = c("Sand","Clay","Silt","Rock"), species = c("ArisDiff",
2023 Jan 28
2
lines through points in lattice legend
Hi, I'm struggling to find if there is a simple way to make the lines and points overlap in a legend for a lattice plot using auto.key. ?Here is a toy example of what doesn't work (for me) as the lines and points are adjacent rather than overlapping: library(lattice) d <- data.frame(x = 1:2, y = 1:4, f = factor(letters[1:2])) xyplot(y ~ x, d, groups = f, type = "b",? pch =
2010 Mar 29
1
xyplot second y-xis and legend
Dear list, I try to set a secondary y-axis in a lattice xyplot. This works. However, I am unable to set a proper legend/key together with the 2nd y-axis under general xyplot procedures. See example below. The combination of the par.settings with simpleTheme and other settings seems to go wrong. I couldn't find a solution from previous topics. Any suggestions? thanks in advance! Robbert
2011 Jan 25
1
lattice draw.key(): position of key in panels
Good afternoon, I am working on a plot that requires custom legends to be placed in some panels of the plot; other panels do not contain legends. The problem that I run into is positioning of the legend in individual panels. In particular, the 'x' and 'y' elements of the key-list are ignored by draw.key() when it is called from inside a panel function. As a result, the legend is
2005 Jul 20
1
help with a xyplot legend
Hi, I try to put a legend in a xyplot graphic. xyplot(y~x|g,ylim=c(0,80),xlim=c(10,40),as.table=T,layout=c(2,3), ylab="N??mero de machos capturados",xlab=expression(paste("Temperatura (",degree,"C)")), key=list(corner=c(0,0),x=0, y=0, text=list(legenda),lines=list(col=cor, lwd = espessura, lty=linha),columns=7,between=0.5,betwen.columns=0.5,cex=0.8)) The problem
2005 Dec 09
1
lattice legend colors recycling sooner than expected
dear r-helpers, it seems the colors in an automatically generated lattice legend recycle after the 8th color, even when the user has set e.g. superpose.symbol$col to be longer than 8. the following example will illustrate what i mean: z <- data.frame(x=rep(letters[1:15], each=4), y=rnorm(60), groups=rep(LETTERS[1:3], 20)) library(nlme) library(lattice) plot(groupedData(y ~ x |
2010 Aug 22
0
lattice::xyplot() with one factor for points and another for lines - solution
Hi: Yesterday, I posted a question regarding how to handle different graphical behavior between two factors in xyplot() [package lattice]. After a public and private reply from Deepayan Sarkar, the problem has been resolved nicely, including the addition of a stacked legend for the two factors in question. The latter requires package latticeExtra. library(lattice) library(latticeExtra) # Test