search for: yjust

Displaying 20 results from an estimated 50 matches for "yjust".

Did you mean: just
2003 Jun 05
2
Fwd: Re: legend() with option adj=1
...er this short > reproducable example. > > x <- 1:5 > y1 <- 1/x > y2 <- 2/x > plot(rep(x,2),c(y1,y2),type="n",xlab="x",ylab="y") > lines(x,y1) > lines(x,y2,lty=2) > legend(5,2,c("1,000","1,000,000"),lty=1:2,xjust=1,yjust=1) > legend(5,1.5,c("1,000","1,000,000"),lty=1:2,xjust=1,yjust=1,adj=1) > > Now, I would like to right-justify the text of the legend. As you can see, > the option adj=1 does not give satisfactory results. > > Is this a bug or is there an easy way that I'm...
2003 May 20
1
legend() with option adj=1
...tify to right the text of my legend. Consider this short reproducable example. x <- 1:5 y1 <- 1/x y2 <- 2/x plot(rep(x,2),c(y1,y2),type="n",xlab="x",ylab="y") lines(x,y1) lines(x,y2,lty=2) legend(5,2,c("1,000","1,000,000"),lty=1:2,xjust=1,yjust=1) legend(5,1.5,c("1,000","1,000,000"),lty=1:2,xjust=1,yjust=1,adj=1) Now, I would like to right-justify the text of the legend. As you can see, the option adj=1 does not give satisfactory results. Is this a bug or is there an easy way that I'm missing? Thanks, Jerome -...
2004 Aug 20
0
legend lwd - feature request (PR#7023)
...t; plot(x,y,bty="l",lwd=3,type="o",col=2,ylim=c(min(y,y2),max(y,y2)),cex=1.5) > points(x,y2,lwd=3,lty=8,col=4,type="o",pch=2,cex=1.5) > legend(10,max(y,y2),legend=c("Method 1","Method > 2"),col=c(2,4),lty=c(1,8),pch=c(1,2), > xjust=1,yjust=1,pt.cex=1.5,lwd=3) > > Workaround (thanks to Peter Dalgaard): > x <- 1:10 ; y <- rnorm(10,10,5) ; y2 <- rnorm(10,8,4) > plot(x,y,bty="l",lwd=3,type="o",col=2,ylim=c(min(y,y2),max(y,y2)),cex=1.5) > points(x,y2,lwd=3,lty=8,col=4,type="o",pch=2,c...
2003 Dec 12
1
legend() graphics output bug (PR#5725)
...e 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 statement is: legend(x=(daysold+2), y=0.95*maxy.j, legend=leg.txt, col = leg.col, lty=1,angle = NULL, density = NULL, bty = "o", xjust = 0, yjust = 1, x.intersp = 1, y.intersp = 1, ncol = 1, horiz = FALSE) If i write the statement as follows: legend(x=(daysold+2), y=0.95*maxy.j, legend=leg.txt, col = leg.col, lty=1,angle = NULL, density = NULL, bty = "o", xjust = 0, yjust = 1, x.intersp = 1, y.intersp = 1, ncol = 1, horiz = FALSE,...
2002 Jul 31
2
Bug in legend?
...),c(0,1),type="n",xaxt="n",yaxt="n",xlab="",ylab="") #empty plot mtext(expression(Expression~text),cex=i/2) #Some text in margin - expression TEXT legend(.5,.5,expression(Some[subscripted],Thing),lty=c(1,2),bty="o ",xjust=.5,yjust=.5,cex=1) #Draw legend with subscript in middle of plot } #This does what it should for (i in 1:4) { plot(c(0,1),c(0,1),type="n",xaxt="n",yaxt="n",xlab="",ylab="") #empty plot mtext("Normal Text",cex=i/2) #Some te...
1997 May 11
2
R-alpha: Logarithmic scales
...3); return R_NilValue; } 3) The legend() function needs changes as well. I attach my quick hack below, but I think there are better solutions... :-) legend <- function (x, y, legend, fill, col = "black", lty, pch, bty = "o", bg = par("bg"), xjust = 0, yjust = 1, ...) { xlog <- par("xlog") ylog <- par("ylog") if (xlog) x <- log10(x) if (ylog) y <- log10(y) xchar <- xinch(par("cin")[1]) ychar <- yinch(par("cin")[2]...
2008 Nov 07
0
barplot can put legend in wrong place, request option to override that (PR#13265)
...bind(x = c(465,91) / 465 * 100, y = c(840,200) / 840 * 100, z = c(37,17) / 37 * 100), beside = FALSE, width = c(465, 840, 37), col = c(1, 2), legend.text = c("A", "B"), args.legend = list(x = 35, y=140, xjust=0, yjust=.5, lty=2)) $ diff -c barplot.R barplot2.R *** barplot.R Mon Aug 11 02:51:52 2008 --- barplot2.R Fri Nov 7 11:52:00 2008 *************** *** 25,31 **** xlim = NULL, ylim = NULL, xpd = TRUE, log = "", axes = TRUE, axisnames = TRUE, cex.axis = par("cex.axi...
2000 May 31
1
legend with multiple columns
...o legend.Rd and legend.R: *** legend2.txt Wed May 31 14:45:18 2000 --- legend2.R Wed May 31 15:02:22 2000 *************** *** 1,7 **** ! function (x, y, legend, fill, col = "black", lty, lwd, pch, bty = "o", ! bg = par("bg"), cex = 1, ! xjust = 0, yjust = 1, x.intersp = 1, y.intersp = 1, adj = 0, ! text.width = NULL, merge = do.lines && has.pch, trace = FALSE) { if(is.list(x)) { if(!missing(y)) { # the 2nd arg maybe really is `legend' --- 1,9 ---- ! function (x, y, legend, fill, col = &quot...
2002 Nov 12
1
problem with `legend' + `substitute'
...e ( paste ( Sr["2"] ,GaMnO["5.541"] ,", T = " ,T ,"K" ) ,list (T = T) ) ,bg = "white" ,xjust = 0.5 ,yjust = 0.5 ) So, I get plot with not one, but *six* instances of the desired expression, one under another! Ok, trying to use `text' .. plot(x) text ( 1.0 ,1.0 ,substitute ( paste ( Sr["2"] ,GaMnO["5.541"] ,"...
2004 Dec 02
3
Wishlist: simple legend options (PR#7400)
...stead of entering specific coordinates, like "topleft", "topright","topcenter", etc. based on par("usr") coordinates. I know I've wanted it so often I've made my own simple non-robust wrap-around, so I don't have to remember or parse the xjust and yjust options necessary to make it work. Of course there should be the option of entering in your own coordinates. Also it would be nice to be able to put a optional title inside your legend. Currently I just make my title the first value in my legend vector, and then fix the other options so no symbol...
2012 Oct 10
2
r-plot help-it prints outside frame
...yself and have a little trouble with plotting values: par(xpd=TRUE) plot(vector,xlab="Period",ylab="Values") legend(max(vector), legend = c("Original values", "Estimated values"), col=c("blue","red"),lwd=0.5, cex=1, xjust=0.1, yjust=-0.3) lines (vector, type = "o", col="blue") #original values lines (est_vector, type = "o", col="red") # estimated values lines (length(vector)+1,forecast, type = "o", col="green") #forecasted value i get result as in pdf fi...
2010 Feb 07
4
x-axis plot problem
...="Model Output") legend("topleft", legend = c("F", "M","P","B"),text.width = strwidth("1,000,000,"),pch=c(1,22,17,16),col =c("gray10"," gray10","gray10","gray10"),lty=c(2,2,2,5), xjust = 1, yjust = 1, bty="n", cex=0.8, ncol=2) axis(1, 1:6, row.names(model)) -- View this message in context: http://n4.nabble.com/x-axis-plot-problem-tp1472286p1472286.html Sent from the R help mailing list archive at Nabble.com.
2008 Apr 10
6
How to create a legend without plot, and to use scientific notation for axes label ?
Hi, I have a 3 by 2 plots per page, and would like to place a legend on the last region. How to do that ? Also, is there any way to specify scientific notation for axes label ? [[alternative HTML version deleted]]
2000 Jun 09
2
w0 in legend
In Version 1.1.0 Under development (unstable) (June 8, 2000) there seems to be a problem with an internal variable w0 in legend that generates the following new error: Error in legend((par()$usr)[1:2], (par()$usr)[3:4], Legend, lty = lty, : Object "w0" not found > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read
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>
2007 Aug 31
1
Question on shardsplot
...ap ? ---Below commands don't display the sample No.(from 1 to 150).--- library(som) library(klaR) iris.som3 <- som(iris[,1:4], xdim = 14,ydim = 6) library(klaR); opar<- par(xpd = NA) shardsplot(iris.som3, data.or = iris,label = TRUE) legend(3.5,14.3, col = rainbow(3), xjust =0.5, yjust = 0,legend = levels(iris[, 5]),pch = 16, horiz = TRUE) par(opar) ---------------- Ebi [[alternative HTML version deleted]]
1997 Aug 04
0
R-alpha: `axes' argument for barplot()
...ULL, border=par("fg"), beside=FALSE, space=0.2, legend.text, ! main=NULL, xlab=NULL, ylab=NULL, xlim, ylim, axes = TRUE, ...) { opar <- par(yaxs="i", xpd=TRUE) on.exit(par(opar)) *************** function (height, names.arg, col=NULL, b *** 68,72 **** xjust=1, yjust=1) } title(main=main, xlab=xlab, ylab=ylab, ...) ! axis(2) } --- 68,73 ---- xjust=1, yjust=1) } title(main=main, xlab=xlab, ylab=ylab, ...) ! if (axes) ! axis(2) } =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- r-devel mailing list -- Read ht...
2000 Sep 18
1
phantom(0) doesn't do what I expect it to [plotmath]
Hi, I'm trying to make a legend with a justified list of numbers, so I thought I would use phantom(0) to align the 3-digit numbers properly with the 4-digit ones: legend(x, y, xjust=1, yjust=1, lty=c(1,2,3,4,5), adj=c(0,0.5), legend=expression(phantom(0)*300*plain(K), phantom(0)*550*plain(K), phantom(0)*830*plain(K), 1440*plain(K), 2500*plai...
2009 Jun 26
3
Automatically placing a legend in an area with the most white space...
At one point I believe I heard of an R package that would automatically find the most empty space in a plot, and then that answer could then be used to intelligently place a legend. I would like to try to apply that R package to the contrived example shown below, so thank you for any hints or tips that can be provided. x = seq(0, 1000, by = 1) y1_vals<-rnorm(1000, mean = 0, sd = 50)
1997 Jun 23
0
R-alpha: various graphics Q.
...anted in legends -- to be able to mix symbols and lines in the same legend without having to have a symbol or a line for every item in the legend, and to be able to put symbols and lines in the same column (option "merge"). The spacing's not quite perfect, though. 3c3 < xjust=0, yjust=1, merge=FALSE, ...) --- > xjust=0, yjust=1, ...) 5,8c5,8 < xchar <- xinch(par("cin")[1])*par("cex") < ychar <- yinch(par("cin")[2])*1.2*par("cex") < xbox <- xinch(par("cin")[2]*0.8)*par("cex") < ybox <- yin...