similar to: Array of legend text with math symbols from predefined variables

Displaying 20 results from an estimated 800 matches similar to: "Array of legend text with math symbols from predefined variables"

2009 Jan 14
4
How to get legend outside of plot?
I am creating a CDF plot function more user-friendly than any default r function. Depending upon the bimodality of the data (it is often bimodal), or any other strange data trends, the points can end up gathering in just about any corner of the plot. So, when I add a legend, whether I choose to add it in the bottom right, top left, or wherever, it will sometimes end up putting the legend right
2011 Jul 13
1
Smart legend ???
Hi, all: Is there an automatic smart legend for R? Since my R code is running in a row, which will produce a bunch of R plots in a single run, some of the produced plots are really "ridiculous". Because my legend is fixed to "topleft", sometimes, which occludes the key parts of the figure/plots, but most of the time, the legend works just fine. I'm wondering is there a
2008 Oct 23
3
xy.coords in text
Hello, I want to add text annotation about correlation on "pairs" plots. I found that I could pass a function to the "panel" argument of pairs : panel.annot <- function(x, y, ...) { points(x, y, ...) c <- cor.test(x, y) legend("topleft", legend=substitute(rho == r, list(r=sprintf("%.2f", c$estimate))), bty="n") } And then :
2007 Oct 30
1
Sweave line length
Hello, I am trying to add R code to my dissertation and the length of a line of text that Sweave generates is longer than the right margin in my dissertation. I have found no way to tell Sweave how to set the line length. I am using an iMac with tiger ver. 10.4.10, and R: ver. 2.5.1. Here is the R code that is longer than my right margin: input to Sweave:
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 Feb 10
1
Add different types of legend: line and points
Hello, I plot box plot, and add a point to the box indicating mean. I also add some range to the box width. I want to add legend for both the range (line) and mean (point). However, I cannot add line legend and point legend together. The code looks like the following. (1) First, I tried the following code, however, it plot a line across the point legend("*"). boxplot(count ~ spray,
2009 Nov 20
0
Guardar gráficos en eps con letras griegas en las leyendas
Beatriz, Prueba legend("topleft",0,substitute(chi)). En mi PC funciona! En cuanto a LATEX, tienes razón, excede el tema de este foro, con lo que me reservo (lamentablemente) mis sugerencias. Saludos, Jose -----Original Message----- From: r-help-es-bounces en r-project.org [mailto:r-help-es-bounces en r-project.org] On Behalf Of Beatriz Lacruz Sent: 20 November 2009 15:13 To: Jorge Ivan
2010 Jul 24
1
Doubt about a population competition function
Hi, I'm doing a function that describe two populations in competition. that's the function that i wrote: exclusao<-function(n10, n20, k1, k2, alfa, beta, t){ n1<-k1-(alfa*n20) n2<-k2-(beta*n10) if(t==0){plot(t, n10, type='b', xlim=range(c(1:t),c (1:t)), ylim=range(n10, n20), xlab='tempo', ylab='tamanho populacional') points(t, n20, type='b',
2011 Apr 29
3
Change the text size of the title in a legend of a R plot.
Hello, Is it possible to change the text size of the title in a legend of a R plot? I tried to directly change the title.cex argument but it seems not to work. Trying : Horizo <- c(1,2,6,10,20) legtext <- paste(Horizo,sep="") legend("topleft", legend=legtext,col=col,text.col=col,lwd=lwd, lty=lty,cex=1.1,ncol=3,title = "Horizons",title.col
2004 May 27
2
block diagonal matrix function
Hello List I have just written a little function that takes two matrices as arguments and returns a large matrix that is composed of the two input matrices in upper-left position and lower-right position with a padding value everywhere else. (function definition and toy example below). I need nonsquare matrices and rowname() and colname() inherited appropriately. Two questions: (1) Is there a
2006 Nov 09
4
Plotting symbols with two positions?
Thanks a lot to Demitris for a prompt answer some minutes ago on another tread (see below). To avoid excess mails on the list, I move onto next question: I have another small plotting problem that confuses me. I want to plot results from a field trial series, using the numbers of the trials as symbols in the plot. pch = as.character(trial_no) works fine, but truncates the trial number to the
2008 Jul 15
1
manipulating (extracting) data from distance matrices
Hi all, Does anyone have any tips for extracting chunks of data from a distance matrix? For instance, if one was interested in only a subset of distance comparisons (i.e., that of rows 4 thru 6, and no others), is there a simple way to pull that data out? >From some playing around with an example (below), I've been able to figure out that a distance matrix in R is stored as a single
2006 Oct 13
3
Barplot legend position
Dear useRs, I'm trying to create a barplot like so: x=matrix(1:10,2,5) barplot(x,leg=c("left","right"),besid=T) The legend is placed in default position topright, however the data are plotted there too. I tried controlling the legend position by adding x="topleft" but this results in an error that x matches multiple formal arguments. Leaving out the legend
2009 Aug 25
3
math symbol + value of a variable in legend.
Hi R users: I will like to have a legend with math symbols and also with the value of a variable. But I cannot obtain both at the same time (symbol + value of a variable): Here is a reproducible example: m1<-5 m2<-12 plot(1:5,1:5,type="n") legend("topleft",legend=c(paste(expression(mu),"=",m1),expression(paste(mu,"=",m2))),lty=1:2) Thank you for
2009 Aug 25
3
math symbol + value of a variable in legend.
Hi R users: I will like to have a legend with math symbols and also with the value of a variable. But I cannot obtain both at the same time (symbol + value of a variable): Here is a reproducible example: m1<-5 m2<-12 plot(1:5,1:5,type="n") legend("topleft",legend=c(paste(expression(mu),"=",m1),expression(paste(mu,"=",m2))),lty=1:2) Thank you for
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",
2005 Oct 01
2
Multiple expressions, when using substitute()
expression() accepts multiple expressions as arguments, thus: plot(1:2, 1:2) legend("topleft", expression(y == a * x^b, "where "* paste(y=="wood; ", x=="dbh"))) Is there a way to do this when values are to be substituted for a and b? i.e., the first element of the legend argument to legend() becomes,
2011 Jul 28
1
color of math annotation in legend
Dear useRs, Can someone help me to adjust the color of math annotation in a legend? The following code gives me a black "alpha = 2". x=y=1:100 z=seq(0.5,50,by=0.5) plot(x,y,type='l',col='black') lines(x,z,col='red') legend('topleft',c(expression(paste(alpha," = ", 1)), expression(paste(alpha," = ",
2010 Sep 17
1
How to denote a line on the graph
Please give me some help, many thanks. I graphed a expected CDF line of a binomial distribution on a graph, And I have some observed points (observed CDF) from 4 groups fall on the smooth CDF line. I cannot really get the legend I want legend ('topleft', c('a, 'b', 'c', 'd', 'expected CDF'), col=c(1,2,3,4), pch=c(0,1,2, 3, '' ),
2008 Aug 09
3
matrix name
Hello, Presently, we are able to add additionnal info to a matrix thanks to the nice comment() and attr() functions. Maybe I miss some other functions ? Since there is a always a little remaining place on the top left when one print a matrix, I was wondering if it won't be interesting to offer the possibility to show some information here, I'm thinking on something like : > attr(M,