similar to: legend with cofor-filled symbol

Displaying 20 results from an estimated 20000 matches similar to: "legend with cofor-filled symbol"

2011 Jul 25
1
Creating png of layered legend
I am trying to create a plot that has multiple plot characters for each point (e.g. a point within a triangle, a triangle within a square, etc). The workaround I have found to do this is by plotting twice, as in this example: x <- c(1.1, 2.3, 4.6) y <- c(2.0, 1.6, 3.2) plot(x, y) points(x,y, pch=20, col="red", cex=0.5) This works, but perhaps there is a better way to do it in one
2004 Mar 25
1
Error in 'legend' help?
Dear all, maybe I have misunderstood something but to me it seems like a minor error in the help for ?legend for the argument 'bg'. There it says: bg: the background color for the legend box. (Note that this is only used if 'bty = "n"'.) I think, however, that it should be changed to: bg: the background color for the legend box. (Note that this
2012 Jun 08
2
changing font to italic for one entry in legend()
Hello, I need to change the font for one of the items (C. elegans) in my legend to italic. Can someone suggest how to accomplish this? legend('bottomright', bty='n', c('C. elegans range', 'Study area'), cex=0.8, fill=c('light gray', 'white'), border=c('black','black')) I tried using lab.font=c(1,3) but R ignored and did not write
2009 Mar 24
2
Legend containing maths symbol and values of variables
I need to have the maths symbol for >= in the legend, and to substitute threshold variable with its value. Somehow, various attempts weren't successful. Please help. threshold <- 0.5 plot(NA, xlab="", ylab="", main="", axes=F, xlim=c(0,1), ylim=c(0,1), xaxs="i", yaxs="i") legend(x=0, y=1, fill=c("orange", "white",
2012 Feb 22
1
line width in legend of interaction.plot
Dear R developers, The following command produces an interaction plot with lwd=2. interaction.plot(c(1, 2, 1, 2), c(1, 1, 2, 2), 1:4, lwd=2) In the legend, however, lwd seems to be 1, which does not seem to be intended behavior. Probably the lwd is not correctly forwarded to legend: from the interaction.plot source: legend(xleg, yleg, legend = ylabs, col = col, pch = if (type %in%
2009 Feb 18
1
interaction.plot - gridlines and formatting legend title...
Thank you for providing advice on this graphics question. I am building an interaction.plot. d=data.frame(xx=c(3,3,2,2,1,1),yy=c(4,3,4,3,4,3),zz=c(5.1,4.2,4.4,3.5,3.3,-1.1,-1.3) d[[1]]<-as.factor(d[[1]]) d[[2]]<-as.factor(d[[2]]) print(d) interaction.plot(d$xx, d$yy, d$zz, type="b", col=c("red","blue"), legend=F, lty=c(1,2), lwd=2, pch=c(18,24),
2005 Nov 21
1
Howto? plot legend with no line behind the points
Hi R-help, We are using R 2.2 on Win XP and have a detail question on how the legend can be optimised. We use the following; -> plot(,type="b",...) The lines in the plot do not cross the points. How can we obtain the same effect in the legend? (points without a line through them..) We tried setting the pt.bg to white but this did not help. See script below. thanks, Jan
2010 Apr 26
5
How to make legend with line+ character
Dear all, I have a multiline plot with each line labeled with a different letter. But I'm not able to make the legend display the same kind of pattern '-a-', instead the letter is overwritten by the line. A simpler legend with only the letter is not very visible and the pt.bg does nothing with letters. Any idea? plot(1:10,10:1,lty=1,type='b', lwd=2,pch='a')
2011 Jul 18
2
line jump in plot legend title
Hello, In order to reduce the width of my legend in a plot I introduced line jumps in the title. Here's the problem; the legend box hasn't adapted accordingly and part of the title is printed out of the frame. See the example below: plot(1:10) legend("bottomright", bg="white", fill=c(7,8,12,13,19),
2011 Sep 20
3
Problem with legend
HI, This code is part of a code I used to do a linear regression: >points(var1~var2,data=Regress,pch=21,bg="grey") >reg11<-lm(var1~var2,data=Regress) >abline(lm(var1~var2,data=Regress),lty=2,lwd=2,col="grey") >legend("topleft",legend= >c("NDII from composite", >"y= 0.0007x - 0.1156",expression(paste(r^2 ==
2010 Sep 27
1
Issues with Legend symbols
Hello forum! I am currently having trouble getting R to recognize one of my pch characters. Here's what I have: legend(120, 40, c("SAL-arterial", "SAL-portal", "GLP-1-arterial", "GLP-1-portal"), bty="n", col=c("black"), pch=19:15:21:22, pt.bg="white", pt.cex=2:2:2:2, lty=1, lwd=2, text.col="black", cex=1.3) Now,
1997 May 11
2
R-alpha: Logarithmic scales
Here are another three problems with logarithmic scales: 1) segments() does not work with logarithmic scales. I suggest to change lines 962-973 in "plot.c": for (i = 0; i < n; i++) { if (FINITE(xt(x0[i%nx0])) && FINITE(yt(y0[i%ny0])) && FINITE(xt(x1[i%nx1])) && FINITE(yt(y1[i%ny1]))) { GP->col = INTEGER(col)[i % ncol];
2010 Jan 12
1
Multiple symbols per single line in a legend
Hello everybody, Is it possible to coax legend() into displaying more than one simbol per line in legend? I have a graph like the one attached to this mail; I would like to reorganize the legend in such a way that the duplicate text would be omitted, i.e., the first line would read <square> <triangledown> "increasing frequency" and the second one would read <circle>
2008 Mar 01
1
jpeg and margin text
Hi guys, I use R 2.6.2 and Windows XP. I’ve got the following question: I wrote a lot of text into the margin of a plot. When I use the “jpeg”-function, only a little part of the margin text is displayed in the final jpeg? Any ideas to change it? Source-Code: datenbankdaten<-data.frame(LETTERS[1:20],
2012 Sep 14
2
plotting points on a map, assigning vectors to values from dataset
Dear everyone, as a newbie I fear I have made an easy mistake and am just too blind to see it. Can anyone help me seeing the (possibly) obvious? I have a command that creates a map of South America. In a separate txt-file I stored data about latitude and longitude of languages, and in a third column values that differ from language to language. The command should read that file and assign the
2007 May 15
1
legend with mixed boxes and lines (not both)
Hi, I seem to be unable to get a mixed legend that has lines *or* polygons (not both). For example: ppi <- seq(0,2*pi,length.out=21)[-21] frame() plot.window(ylim=c(-5,5),xlim=c(-5,5),asp=1) polygon(cos(ppi)*4+rnorm(20,sd=.2),sin(ppi)*4+rnorm(20,sd=.2), col="green",border=FALSE) polygon(cos(ppi)*2+rnorm(20,sd=.1),sin(ppi)*2+rnorm(20,sd=.1), col="blue",border=FALSE)
1998 Dec 15
2
legend() buglet 2
Perhaps this is not a bug but rather my misunderstanding of lty and col. I would like to generate a legend for plots as follows: par(mfcol = c(2, 1), mar = c(5.1, 6.1, 4.1, 2.1)) matplot(t(matrix(1:8,8,20)), type="l") par(mfg = c(2, 1, 2, 1)) box(col = 0) # Rbug workaround. Thanks Martin legend((par()$usr)[1:2], (par()$usr)[3:4], as.character(1:8), lty=1:8, col=1:8,
1998 Dec 15
2
legend() buglet 2
Perhaps this is not a bug but rather my misunderstanding of lty and col. I would like to generate a legend for plots as follows: par(mfcol = c(2, 1), mar = c(5.1, 6.1, 4.1, 2.1)) matplot(t(matrix(1:8,8,20)), type="l") par(mfg = c(2, 1, 2, 1)) box(col = 0) # Rbug workaround. Thanks Martin legend((par()$usr)[1:2], (par()$usr)[3:4], as.character(1:8), lty=1:8, col=1:8,
2009 Aug 27
1
Wishlist: specify the border color of boxes in legend() (PR#13913)
I could not find a way to specify the border color of the boxes drawn in a legend, so that the legend can match exactly the colors of the actual plot (e.g. in the case of two superimposed histograms which have different shading and different borders). Indeed, the legend function seems to hard code the color "black" for the borders in this call: rect2(left = xt, top = yt +
2006 Mar 02
2
'...' passed to both plot() and legend()
Dear R-devels, I'd like to create a plot method for a class of objects that passes the '...' argument to both plot() and legend(), e.g., x <- list(data = rnorm(1000)) class(x) <- "foo" plot.foo <- function(x, legend = FALSE, cx = "topright", cy = NULL, ...){ dx <- sort(x$data) plot(dx, dnorm(dx), type = "l", ...) if (legend)