search for: topright

Displaying 20 results from an estimated 169 matches for "topright".

2024 Feb 05
2
ggarrange & legend
...t(p1, p2) dev.new(width=28, height=18) fig1<- ggarrange(plotlist=mylist, common.legend = TRUE, legend="top", labels = c("(A)", "(B)"), font.label = list(size = 18, color = "black"), ncol=2) fig1 2. My question is how I can position the legend on the topright of the top axis. However, ?topright? is not a common label for legend in ggarrange (but in other plot functions), so legend =?topright? is not working. mylist<-list(p1, p2) dev.new(width=28, height=18) fig1<- ggarrange(plotlist=mylist, common.legend = TRUE, legend="topright", lab...
2012 May 18
3
colocar subscripts y cursiva
Hola He estado tratando varias formas de colocar el subíndice para los grados de libertad del F test y la expresión adj; y sencillamente no funciona. legend("topright",legend=c(expression('r[adj]=0.40'),expression('F[3,23]=15.43'),expression('P < 0.001')),col=black, bty='n',cex=0.9) Luego al tratar de colocar las cusriva utilizando par(font=3) tampoco funciona. ¿Alguna idea de un script para hacer esto? Gracias Eric Fl...
2006 May 10
2
Legend titles in log plots broken? (ver. 2.2.1)
Legend titles work in linear plots: curve(1/x, xlim = c(0, 1)) legend(x = 'topright', inset = 0.04, legend = '1/x', lty = 1, title = 'Legend Title') But when you change to a log plot on either dimension things get screwy: curve(1/x, xlim = c(0, 1), log = 'y') legend(x = 'topright', inset = 0.04, legend = '1/x',...
2024 Feb 05
1
ggarrange & legend
...t; fig1<- ggarrange(plotlist=mylist, common.legend = TRUE, legend="top", > labels = c("(A)", "(B)"), font.label = list(size = 18, color = "black"), > ncol=2) > > fig1 > > > > 1. My question is how I can position the legend on the topright of the > top axis. However, ?topright? is not a common label for legend in ggarrange > (but in other plot functions), so legend =?topright? is not working. > > mylist<-list(p1, p2) > > dev.new(width=28, height=18) > > fig1<- ggarrange(plotlist=mylist, common.lege...
2012 Mar 20
3
Graphic legend with mathematical symbol, numeric variable and character variable
Hi, I'd like to make a legend with a mix of mathematical symbol (tau), numeric variable and character variables.I have tried : types<-c("Type 1","Type 2","Type 2") tau<-c(1,3,2) legend(x="topright",legend=paste(types,"tau=",expression(tau))) but it doesn't work: the 'tau' symbol is not written in its 'symbol style' but as 'tau' Any (good) idea ? Thank you in advance ! David
2012 Jan 18
2
How do I exactly align the right hand side of "mtext" relative to a plot device? Beyond "adj".
...t, or the values on the x-axis. Here's a simple example with two versions (the first three lines of each version are identical). I would like the right end of the added text to be the same distance from the legend in both versions. ### v1 dev.new() plot(c(0,1),c(0,1),ylim=c(0,2)) legend("topright",c("data1","data2"),col=c(1,2),lty=1,bty="n") mtext("text",side=3,line=-2,adj=0.8) ### v2 dev.new() plot(c(0,1),c(0,1),ylim=c(0,2)) legend("topright",c("data1","data2"),col=c(1,2),lty=1,bty="n") mtext("really...
2006 Nov 13
1
Anoying bug in scale when using custom shortcuts
I'm using gandalfn's ubuntu-dev-pakages. I had this bug on beryl before. If I set a custom shortcut for scale (in my case I want to initiate all viewports on the default shortcut <ctrl><alt>Up), initiate_edge is automaticaly set to TopRight, too. The Problem is, I don't want to use the active edges at all. So I go everytime into gconf-editor, remove TopRight from initiate_edge, but after each login into gnome, initiate_edge is set to TopRight. This bug was removed in beryl, but seems to be still in compiz. regards Peter Ackerma...
2004 May 27
2
block diagonal matrix function
...better way to do this? (kronecker() isn't applicable here) (2) How do I generalize it to take an arbitrary number of matrices as inputs? TIV Robin "blockdiag" <- function (m1, m2, p.tr = 0, p.ll = 0) { ## p.tr and p.ll are padding values topleft <- m1 topright <- matrix(p.tr, nrow(m1), ncol(m2)) colnames(topright) <- colnames(m2) lowleft <- matrix(p.ll, nrow(m2), ncol(m1)) lowright <- m2 rbind(cbind(topleft, topright), cbind(lowleft, lowright)) } m1 <- structure(c(1, 1, 3, 1, 3, 4), .Dim = as.integer(c(2, 3)), .Dimname...
2024 Feb 05
1
ggarrange & legend
...KLI via R-help < r-help at r-project.org> wrote: > Dear R community > > It is possible to adjust the legend in combined ggplots using ggarrange > with > be positions top, bottom, left and right. > My question: Is there a function to change the position of the legend to > topright or bottomleft? Right and top etc are in the middle of the axis. > > Kind regards > Sibylle > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do rea...
2009 Nov 02
2
superscript troubles
...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 = "n","topright",paste("r2=",round(summary(lat_x)$r.squared,digits=3),", P=",round(coefficients(summary(lat_x))[2,4], digits=3))) Thank you Jacob -- Jacob Kasper http://twitter.com/Protect_Oceans 66°04' N 23°07' W Coastal & Marine Management Master's Student University Ce...
2010 Nov 11
3
overlap histogram and density
...  hist(datobs,prob=TRUE, main ="Volume of a catchment from four     stations",col="yellowgreen", cex.axis=1,     xlab="rainfall",ylab="Relative frequency", ylim= c(0,.003), xlim=c(0,1200))     lines(density(dd), lwd=3,col="red")     #legend("topright",c("observed","generated"),lty=c(0,1),fill=c("blue",""),bty="n")     legend("topright", legend = c("observed","generated"),            col = c("yellowgreen", "red"), pch=c(15,NA), lty = c(0, 1)...
2008 Sep 23
2
Creating a Legend
...trying to create a legend for my graph. I hope to have the title as "Land Use Type" and the two elements being "Urban" and "Rural" with a red point and green point respectively. So far I have the following command, but obviously it isn't correct: > legend("topright", title="Land Use Type", cex=0.75, pch=16, col="red","Urban"&"green","Rural", ncol=2) As you can see, I'm a bit confused as to how to deal with the point colours and associated text. Also, how would I make the associated text ("...
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. [[alte...
2007 Nov 08
1
Mixing lty specifications in legend
Hi all I have a plot with lines, one specified as (say) lty=1, using standard line types, and another as (say) my own spec: lty="51". I can't get legend to display both. Toy example: > plot(1~1) > legend("topright", lty=c("51",1), legend=c("My own","Standard")) Error in segments(x1, y1, x2, y2, ...) : invalid line type: must be length 2, 4, 6 or 8 > Any ideas? P. > sessionInfo() R version 2.5.0 (2007-04-23) i386-pc-mingw32 locale: LC_COLLATE=English_Australia.1...
2011 Jul 13
1
Smart legend ???
...opleft", 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 smart legend in R? Whenever I set "topleft" but occlude the actual plots, the smart legend may reset from "topleft" to "topright". Or, just try "topleft", "topright", "bottomleft" and "bottomright" in a particular sequence, and calculate the occlusion ratio. Pick up either the legend with the least occlusion, or the first priority legend when some legends are of the same occlusion...
2012 Sep 03
3
Horizontal grid in background of barplot
...;- c("Went to doctor","No response","Did nothing","Self-medicated") x <- t(x) print(x) barplot(x,beside=TRUE, ylim=c(0,90), xlab="Ailment", ylab="Percent", legend.text=TRUE, args.legend=list("topright",title="Treatment")) abline(h=c(seq(10,90,10))) box() I'd like to get the horizontal lines in the background. Any suggestions? D. -- View this message in context: http://r.789695.n4.nabble.com/Horizontal-grid-in-background-of-barplot-tp4642081.html Sent from the R help mai...
2011 Mar 22
1
Problem with plot histogram
...osed". The R-code is like this: goal <- c(125, 143, 81, 26, 2, 3) numgoal <- 0:5 lambda <- sum(goal*numgoal)/sum(goal) plot(numgoal, goal, type="h") x <- 0:5 y<-dpois(x, lambda) att<-y*380 lines(x,att, type="h", col="red") legend(x="topright", legend=c("Osservate", "Attese"), col=c("black","red"), ncol=1, lty=1, lwd=3, inset=c(0.01, 0.02), bg="white") How can I draw the two lines one near other? Thanks a lot to everyone -- View this message in context: http://r.789695.n4.nab...
2012 Feb 24
1
Telling plot() the max y value to expect when plotting one distribution and then using lines() to add more distributions
...axhx3 maxhx if (maxhx1==maxhx) {plot(x, hx1 , type="l", lwd=2, col=colors[1], xlab="x value", ylab="Density", main="pt4") for (i in 2:3){ lines(x, dpearsonIV(x,m=mx[i],nu=nux[i],location=locationx[i],scale=scalex[i]), lwd=2, col=colors[i])} legend("topright", inset=.05, title="Distributions", labels, lwd=2, lty=c(1, 1, 1, 1, 2), col=colors) grid() } if (maxhx2==maxhx) {plot(x, hx2 , type="l", lwd=2, xlab="x value", ylab="Density", main="SPX", col=colors[2]) { lines(x, dpearsonIV(x,m=mx[1],nu...
2017 Mar 24
2
Error in documentation for ?legend
To whom it may concern: The help page for ?legend refers to a `title.cex` parameter, which suggests that the function has such a parameter. As far as I can tell, though, it doesn't; here's an example: > plot(1,1) > legend("topright",pch=1, legend="something", title="my legend", title.cex=2) Error in legend("topright", pch = 1, legend = "something", title = "my legend", : unused argument (title.cex = 2) This issue appears to have been discussed online before (e.g. her...
2009 Nov 02
1
Lattice: Saving Plots with Legend
...llel" 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) legend("topright",legend=c("let's","rock"),col=c("black","red"),pch=1) #Writing the legend doesn't png("test.png") parallel(data) legend("topright",legend=c("let's","rock"),col=c("black","red"),pch=...