similar to: : bquote inside legend()

Displaying 20 results from an estimated 10000 matches similar to: ": bquote inside legend()"

2007 Sep 25
3
Legend
I have following syntax for putting a legend : legend("bottom", fill=c("red","blue"), legend=expression(p==0.30, p==0.50), bty="n") However what I want is that : the value "0.30" should be a value of a variable instead of a constant, so that I can put the name of this variable and in legend it's value will be displayed. Can anyone tell me how
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
2009 Nov 28
1
Plot-region not complete
Hello there, after I solved many problems in the last days with R I wanted to complete my plot. I used ylab=expression(paste("log(",mu,"/",cm^2,"/VS)")) to have greek symbols and to change cm^2 to cm?. Also cm^-3 I have in another plot, but it cuts my ^2 to _ in the y-axis. here is the code and I attach the plot: jpeg(file="Tabh2.jpg",quality=100)
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 +
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
2009 Aug 06
1
adding color bar to a graph
Hi everybody, I am wondering how i can add a "stretch" color bar / legend to a graph that uses colorBrewer to define the colors in it. I will try to explain my graph, but i also uploaded it at: ftp://ftpext.usgs.gov/pub/er/fl/st.petersburg/Monica_pal/ The file is: robcor_training_pca.pdf - i will also attach this file in case some people accept attachments. So i took apart the
1998 Dec 15
1
legend
I am trying to put a legend below some plots as follows: x11() par(mfcol = c(2, 1), mar = c(5.1, 6.1, 4.1, 2.1)) matplot(matrix(1:30,15,2), type="l", lty=1:2) par(mfg = c(2, 1, 2, 1)) legend((par()$usr)[1:2], (par()$usr)[3:4], c("a","b"), lty = 1:2, col=1:2, bty = "y") The letters "a" and "b" print but not the lines. If I omit
2009 Nov 02
2
superscript troubles
I know that this has been revisited over and over, yet I cannot figure out how to solve this case of superscript troubles... I would like the 2 in r2 to be superscript, yet I am pasting text before and after it. I have tried several variations but have not solved this yet, any suggestions? legend (bty =
2007 Jun 08
2
legend + expression
Dear all; A simple? question. I'm having a problem with a math expression in the legend of a plot and I haven't found the way to get this to work, so any help will be appreciate. Basically I want to include in the plot is the R-squared and its numerical value, so I tried this: R2c<-0.82879 # R-squared of calibration model plot(1:10,1:10) legend("topleft",
2007 Sep 10
3
plot legend: combining filled boxes and lines
Hello, I have difficulties combining boxes and lines in plot legend. I searched previous R-posts and found this (with no solution): http://tolstoy.newcastle.edu.au/R/help/06/07/30248.html. Is there a way to avoid boxes behind the line legends? x1 <- rnorm(100) x2 <- rnorm(100, 2) hist(x1, main = "", col = "orange",ylab = "density", xlab = "x", freq =
2003 Dec 12
1
legend() graphics output bug (PR#5725)
Full_Name: Daniel Gasser Version: 1.8.1 OS: Win XP Submission from: (NULL) (130.60.20.92) The legend()-Function shows a different behaviour than it did in Version 1.6.1. It plots a black box left of the legend lines on each legend row. In 1.6.1 there was just the line in appropriate color for each row in the legend (i was using exactly the same legend statement and same plot function). My legend
2010 Feb 19
1
"Legend" question
Hi, I want to get a histogram with the legend for my data. I drew a normal density curve and kernel density curve in the histogram, and I also label mean and median in the X axis. From the code, I got two legend: One shows "Normal Density" and "Kernel Density" and their corresponding lines, the other shows "Mean = value" and "Median = value" and their
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 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
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
2007 Aug 12
2
Legend on graph
Hi, I have a problem when I want to put a legend on the graph. I do: legend("topright", names(o), cex=0.9, col=plot_colors,lty=1:5, bty="n") but the legend is writen into the graph (graphs' top but into the graph), because I have values on this position. How can I write the legend on top the graph without the legend writes on graph's values. Thanks. [[alternative
2013 May 12
1
How to center a horizontal legend with specified 'text.width'
Hello dear list, I just cannot figure out how to do this and didn't find a solution for my specific problem. I want to place a centered horizontal legend between 4 plots. That's no problem. The problem is: As soon as I specify the "text.width" parameter to separate the two legend entries, the legend is not centered anymore. I thought the 'xjust' parameter would do what
2006 Apr 10
2
Legend in the outer margin
Dear Rs I have a 3x3 multiple plot. I would like to have a overall legend in the outer right margin. From the help archive, I found that it can be done by setting par(xpd=NA). However, I couldn't find the correct values for x and y co-ordinates for the legend. Please find the code snippet below: par(mfrow=c(3,3), mar=c(4,4,0.9,0.5), oma=c(1,2,2,4),cex.main=1.1)
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%
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