similar to: How to adjust the distance between legend and the plot (xyplot)

Displaying 20 results from an estimated 30000 matches similar to: "How to adjust the distance between legend and the plot (xyplot)"

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
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
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
2002 Jul 29
2
Bug or feature in xyplot?
Hi, Can someone of you tell me why these two simple examples works as "expected", plot(c(1,1,2,2)~c(1,2,1,2),col=c(1,2,3,4),pch=c(1,2,3,4)) coplot(c(1,1,2,2)~c(1,2,1,2)|c("A","A","B","B"),col=c(1,2,3,4),pch=c(1,2,3,4 )) but when I try it with xyplot in the lattice package it fails.
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",
2006 Oct 26
2
distance between legend title and legend box
Hi, I've looked at the parameters available for the legend function and cannot find a way to change the distance between the top of the box surrounding a legend and the legend's title. I have a math expression that raises the height of my title. If you don't mind the non-sensical title I give to the legend for this plot (Figure 3.20 in R Graphics): with(iris,
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
2011 Feb 04
1
Can an xyplot() plus legend be saved as an Enhanced Windows Metafile (EMF)?
I am trying to save some graphical output including a legend in the Windows Enhanced Metafile (EMF) format. This fails when xyplot() is used rather than plot(). Here is a simple example: require(lattice) a <- c(1:10) b <- c(2,4,5,2,3,5,7,8,9,5) # Output can be saved (or copied to the clipboard) as a Windows EMF image file # from the Graphics Device output window. plot(a , b)
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
2011 Jun 14
1
xyplot Legend Title and Position
Dear R Community, I'm using xyplot in Lattice with a legend and a title on the legend. The title on legend is being cut off, as can be seen by running the code below. The legend is on the right, but I would like to get to the top right of the graphics window. Is there a way to get the legend title to display correctly and move the whole legend up the the top right? Thanks, Justin ### R
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
2010 Jan 02
2
xyplot: problems with column names & legend
Hello! one more question about xyplot. If I have data which have space in the column names, say "xyz 123". How do I create a working graph where this text is displayed in the legend key? Now when I try something like xyplot("xyz 123" ~ variable1, data = mydata, .......) I get nothing. Also, is it possible to genrate the graph with xyplot(mydata[,1] ~ variable1, data = mydata,
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
2009 Jun 23
1
Identify groups by character point in xyplot legend
http://www.nabble.com/file/p24173983/groups.csv groups.csv http://www.nabble.com/file/p24173983/groups.r groups.r Hello, Points of an xyplot can be identified to a particular group according to 'sunflowers', a different one per group. However, this distinction does not appear in the legend generated by auto.key, all groups are expressed as a point or line, of different colours, but
2023 Mar 06
1
legend: interplay between title and y.intersp
Hi, I think you are right, legend cannot do it. I have now created my own legend function where I changed only one line and now it works the way I want it to. But I'm not sure if that might not have other side effects. I have the impression that the legend and the title start at the same y-position (try y.intersp=0). Only if y.intersp is big enough, then it leads to a non-overlap of
2011 Nov 10
1
newbie's question : xyplot legend with a white background
Hello, Sorry in advance for adding a silly question on this forum but I haven't found the right keywords to find a solution to this basic problem. I'm just looking a way to have a white background behind the legend to hide the grid. Thanks in advance. The silly example for my silly question: xyplot(1~1, panel = function(x,y, ...) { panel.xyplot(x,y)
2005 Apr 14
2
Legend in xyplot two columns
Dear R-Help I have some trouble to set the legend in a xyplot into two rows. The code below gives me the legend in the layout I am looking for, I just rather have it in two rows. library(lattice) schluessel <- list( points=list( col="red", pch=19, cex=0.5 ), text=list(lab="John"), lines=list(col="blue"),
2023 Mar 04
1
legend: interplay between title and y.intersp
Set the legend position explicitly with x and y values and add xpd = TRUE to the legend call to clip the plot to the figure region and not the plot region (the default). Something like this (you may have to fool around with y.intersp, etc. to allow enough space between the legend lines): plot(c(0,1), c(0,1), type="n") legend(x = .4, y = 1.25, legend=c("", "",
2008 May 02
0
xYplot legend keys labels
I came across this little problem in the xYplot function recently and I found it very poorly documented. The legend (keys) in the xYplot is very confusing, especially if you want to change the data labels you have in the data frame column names... say for example you want something with a subscript. Here is a quick solution to it, by keeping (keys='lines') you need to change the parameter
2023 Mar 06
1
legend: interplay between title and y.intersp
What about plot(c(0,1), c(0,1), type="n") legend("top", legend=c("", "a", ""), col=c("blue", "red", "green"), title="test", y.intersp=c(1,-0.4), lwd=1) (in recent versions of R) Best, Uwe On 06.03.2023 11:34, Sigbert Klinke wrote: > Hi, > > I think you are right, legend cannot do