similar to: [lattice] print only legend

Displaying 20 results from an estimated 30000 matches similar to: "[lattice] print only legend"

2012 Nov 19
2
lattice: defining grouping variable only for the upper/lower panel with splom
Using the mtcars dataset, how to define the grouping variable to be valid only for the upper or lower panel? The following doesn't work: # Code start splom(~data.frame(mpg, disp, hp, drat, wt, qsec), data=mtcars, pscales=0, auto.key=list(columns=3), upper.panel = function(...){ panel.grid(...) panel.xyplot(groups=cyl,...) } ) # Code end -- View
2009 Nov 02
1
Lattice: Saving Plots with Legend
Dear R Users! I've want to save a lattice "parallel" plot with legend as png: Plotting with legend works well, but when trying to save the plot there occurs a problem with the legend. ################################################### require(lattice) #Some data: data<-matrix(rnorm(100),ncol=5) #Plot works parallel(data)
2011 Jul 27
2
Creating a flat legend 'grob' for lattice xyplot
Hi, I want my xyplot legend to be flat, not tall, and there seems to be no way for xyplot's auto.key and key elements to do this: I tried many, many permutations of what I could find in the archives and reading the documentation. If there there's a way to make it flat, please tell me what the magic incantation is. Here's a simple example of what I like to see. The xyplot will be a
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 |
2007 Mar 20
1
lattice key (legend) with both points and lines
Hello, I'm running into a frustrating problem with the legend on a lattice plot I'm working with. The plot is a stripplot with a panel.linejoin () line running through the mean of each of the categories. Thus there are both points and lines in the plot. In trying to make a key for the plot, I can't figure out how to make a legend for both the points and the lines. What I'd
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
2008 Nov 20
1
Repost:lattice graphics -- legend color problems
Hello R-folks, I don't get the color of the legend in a lattice-plot right. I select a palette from RColorBrewer and use (with a col = mypalette argument) it in the barchart plot. The resulting graph shows the new palette in the graph, but uses the standard palette in the legend rectangles. Adding a col argument into auto.key uses the new palette with the legend text, but not in the
2008 Jun 13
1
Switching the order of legend boxes in a lattice bar graph
I suspect there is a simple solution to this problem, but have been unable to find it. Below is some code that I have run to create 3 lattice graphs. I have been asked to change the legend so that the 'No' and dark blue are above "Y" and light blue in the legend to mirror the stacked bars in the graph which feature dark blue above light blue. I have tried changing the data
2010 Apr 12
1
lattice garphs: combining multiple scatterplots and adding legend
Dear List members, its me again, fighting with lattice graphics. I am trying to plot a world map, add some points on different locations with different colors and add a legend, but did not succeed yet with the legend. Here is my code: library(fields) # Data for demonstration data_x = c(0,50,60) data_y = c(0,0,0) cols???= c(1,2,3) data(world.dat) #print map all=xyplot(world.dat$y? ~
2010 Mar 19
1
One main title and One legend for multiple lattice plots
Hi All, Can anyone please help me with getting a "single title" and "legend" for both the plots in the following R code. I'll eventually be using .wmf file. # R code: library(lattice) p1 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos, type = "a", main="Same title / legend", auto.key = list(space = "right",
2001 Jul 30
1
legend on a lattice (developmental package) plot
Is there a way to put a legend on an xyplot -- eg, something akin to the key function? Or, is there a way to get the R legend function to work on a lattice plot? To the people who have done the work on lattice and grid: Thanks for making lattice. I'm finding it very useful. Anne ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Anne E. York National Marine Mammal Laboratory Seattle WA 98115-0070 USA
2011 Aug 17
2
Lattice: problem with setting space between plot and legend
Dear R Users, I am writing code to present my output data (I'm using Lattice Package). However, it's essential for me to control space between barchart and legend. I've read the package's specification, but unfortunately I haven't spot the information how to do this. Here's the code I've written: barchart(mymatrix[,1:ncol(mymatrix)],horizontal=FALSE,
2011 Jan 03
0
Keeping lattice plot axes in the same place when legend sizes vary
Dear all, I am generating a number of lattice plots with common axes but varying legends. There is one plot in the window at a time. I would like the plot axes to always appear in the same place within the window (and saved images) so the plots do not move around when they are combined in a video or browsed in something like an HTML document. The default behaviour of the lattice package is
2007 Aug 30
2
Additions to xyplot (lattice)? - legend, ticks, axis label size, text
I have created an xyplot of a time series with the following code... win.graph(width = 10, height = 7) panel1 = function(x, y) { panel.loess(x, y, lwd=2.5, span=0.5, col="gray") panel.xyplot(x, y, pch=19, col="blue", cex=1.25) } xyplot(oneplusdensity ~ year, data=figdata, aspect="fill", cex=1.5, xlab=NULL, ylab=expression("Crabs per
2006 Sep 07
1
legend problems in lattice
Hi! Im sorry to bother you but I cant fix this. I use the lattice function levelplot and I want the colorkey at the bottom, how do I get it there? I have tried changing colorkey.space and changing in legend but I cant get it right, plz help btw I'd like to speceify strings to appear at the tick marks and also there I fail any thoughts? cheers Ernst
2006 Aug 24
1
Lattice symbol size and legend margins
Hi: I am using the following command: xyplot(dat6$CO3*1e6 ~ dat6$irradiance, data=dat6, group=ref, xlab=list(label=expression(paste("Irradiance (", mu, "mol photons", m^"-2", " ", s^"-1", ")")), cex=1.3), ylab=list(label=expression(paste("Carbonate concentration (x ", 10^"6", " ", kg^"-1",
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
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 =
2023 Jan 28
1
lines through points in lattice legend
On Sat, Jan 28, 2023 at 2:49 PM Kenneth Knoblauch <ken.knoblauch at inserm.fr> wrote: > > 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)
2008 Sep 05
3
how to draw the legend about color from 3d picture
I have drawed a picture with persp, it's 3d map with different color, indicate different altitude. In gnuplot, the corresponding command 'splot' will generate a picture beside to indicate the relationship between color and altitude. But in R, how to draw it? I have read the manual of legend, but they are all about how to draw a legend with colored text, not a continuous varing color