search for: bottomright

Displaying 20 results from an estimated 54 matches for "bottomright".

2012 Mar 30
1
avoiding expression evaluation when calling a function
Another question on functions - I have something that looks like plotter<-function(i){ temp.i<-rwb[rwb$vector1 <=(i*.10),] with(temp.i, plot(vector2, vector3, main=(i*.10),)) mod<-lm(vector3~vector3-1,data=temp.i) r2<-summary(mod)$adj.r.squared rsqrd[i]<-r2 legend("bottomright", legend=signif(r2), col="black") abline(mod) rsqrd<<-rsqrd } I'd rather not have to go into the function and re-type each vector and dataframe as I apply it to different vectors. My idea is something like: plotter<-function(i,frm,obj,x,y){ temp.i<-frm[frm$obj &l...
2006 Feb 09
7
putting text in the corner
I want to write some text in a corner of my plot. Is it possible to get the xlim and ylim of an open window? Or is there anything similar like legend(x="bottomright", inset=0.01,legend=...) for text(x=1,y=2, "test") Thomas
2012 Oct 05
1
Format of numbers in plotmath expressions.
I want to do something like: TH <- sprintf("%1.1f",c(0.3,0.5,0.7,0.9,1)) plot(1:10) legend("bottomright",pch=1:5,legend=parse(text=paste("theta ==",TH))) Notice that the final "1" comes out in the legend as just plain "1" and NOT as "1.0" although TH is [1] "0.3" "0.5" "0.7" "0.9" "1.0" I can get plotmat...
2006 Mar 10
2
Plot.date and legends
Hi: I'm trying to plot dates on the x-axis of a code, but the legend is not being displayed. I receive the following error: Error in match.arg(x, c("bottomright", "bottom", "bottomleft", "left", : 'arg' should be one of bottomright, bottom, bottomleft, left, topleft, top, topright, right, center In addition: Warning message: longer object length is not a multiple of shorter object length in: arg...
2010 Feb 02
2
mysterious extra spaces appearing in expression paste
...gend on some figures and they're coming out a bit wonky. here's an example: a <- c(1:10) par(mfrow=c(2,1)) plot(a,type="s",lwd=3) leg <- c(expression(paste("data1 (",rho,"=1)")), expression(paste("data2 (",rho,"=0.0)"))) legend("bottomright",legend=leg,col=c(1,2),lwd=3) plot(a,type="s",lwd=3) leg <- c(expression(paste("data1 \n(",rho,"=1)")), expression(paste("data2 \n(",rho,"=0.0)"))) legend("bottomright",legend=leg,col=c(1,2),lwd=3, y.intersp = 2.0,adj=c(0,1.5)) th...
2016 Oct 26
2
borrar texto en una gráfica
...la a todos, Os envío una consulta que considero sencilla pero me está resultando imposible de resolver. Si ejecutáis el siguiente código, obtendréis la gráfica que os adjunto: library(ltm) modelo <- rasch(LSAT) plot(modelo, main="Curva probabilidad pregunta 1",legend = TRUE, cx = "bottomright", items=1,xlab="Conocimiento",ylab="Probabilidad") Resulta que la gráfica saca una leyenda que dice "ítem 1". Querría eliminarla. Resulta que si en legend hago = FALSE, desaparece la leyenda pero me saca un "1" debajo de la curva, lo cual es peor. ¿Algun...
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 the legend at all. Any advice would be great. Thanks. V
2012 Apr 01
1
indexing in a function doesn't work?
...sub.plotter<-function(i,fram,framvec,form1,form2,form3,type, xlm,ylm,var1,var2){ temp.i<-fram[framvec <=(i*.10),] plot(form1, data=temp.i, xlim=c(0,xlm), ylim=c(0,ylm), main=((i-1)*.10)) if(type==1){ mod<-lm(form2,data=temp.i) r2<-summary(mod)$adj.r.squared num<-r2 legend("bottomright", legend=signif(r2), col="black") abline(mod) num} else{ if(type==2){ try(mod<-nls(form3, data=temp.i, start=list(x=sx,n=sn), na.action="na.omit"), silent=TRUE) try(x1<-summary(mod)$coefficients[1,1], silent=TRUE) try(n1<-summary(mod)$coefficients[2,1], silent=T...
2011 Jul 25
1
Creating png of layered legend
...;- 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 step? My main problem comes when I want to make a legend. The workaround I have here is to again plot twice, as in legend(x="bottomright", legend=c("Category 1"), text.col="white", title="Fairly long title", title.col="white", col=c("red"),pch=20, pt.cex=0.5, bty="o", bg="white") legend(x="bottomright", legend=c("Category 1"), title="...
2013 Jun 07
1
cannot update battery.date value of APC ups battery
Hi, I'm running this command: # upsrw -s "battery.date=2013Jun7" -u ups-mon-IT "IT-APC-BOTTOMRIGHT at 127.0.0.1" Password: OK but I'm getting this listing: # upsc IT-APC-BOTTOMRIGHT at 127.0.0.1 battery.alarm.threshold: 0 battery.charge: 100.0 battery.charge.restart: 15 battery.date: 01/10/06 battery.packs: 000 battery.runtime: 1440 battery.runtime.low: 120 battery.voltage: 55.05 batt...
2008 Jul 15
1
manipulating (extracting) data from distance matrices
...trix, column lengths are 9,8,7,6....1 #get comparisons of rows 1:4 (from dat) ONLY #top-left matrix will consist of top 3 of first column, top 2 of second col, top 1 or third col. topleft<-c(dmat[1:3],dmat[10:11],dmat[18]) topleft #get comparisons of rows 9:10 (from dat) ONLY #bottom right 4 bottomright<-c(dmat[8:9],dmat[16:17]) bottomright #######end##### I'm sure there's a simpler way to do this using the labels of the distance matrix, but I can't see it. I've thought of converting it using as.matrix(), which would allow me to pull out particular rows, but I'm only inter...
2010 Oct 22
2
Random Forest AUC
...t;- predict(fit,newdata = iris,type="response") library(ROCR) plot(performance(prediction(train.predict,iris$Species),"tpr","fpr"),col = "red") auc1 <- performance(prediction(train.predict,iris$Species),"auc")@y.values[[1]] legend("bottomright",legend=c(paste("Logistic Regression (AUC=",formatC(auc1,digits=4,format="f"),")",sep="")), col=c("red"), lty=1) library(randomForest) fit <- randomForest(Species ~ ., data=iris, ntree=50) train.predict <- predict(fit,iris,type=&quo...
2005 Nov 16
2
X11 error in png
...following codes: png(paste(savepath,"a_rnaplot.png",sep = ""),width = fwidth, height = fheight,pointsize = fpointsize); data_deg <- AffyRNAdeg(data_cel) plotAffyRNAdeg(data_deg,col=cols,lty=1,lwd = "2") #a <- par("fin") legend("bottomright",sampleNames(data_cel),col=cols,lty=1) RNAdegSlope = cbind("Sample Names" = data_deg$sample.names, "RNA Deg Slope" = data_deg$slope) write.csv(RNAdegSlope, file = paste(savepath,"RNAdegSlope.csv",sep = "")) dev.off() I got this error message...
2012 Mar 29
3
scalar assignment within a vector within function
...100,.5,.2)^2 x<-rnorm(100,10,5) y<-rnorm(100,20,5) fr<-data.frame(x,y,per) test<-rep(0,9) plotter<-function(i){ temp.i<-fr[fr$per <=(i*.10),] with(temp.i, plot(x, y, main=(i*.10),)) mod<-lm(y~x-1,data=temp.i) r2<-summary(with(temp.i, lm(y~x)))$adj.r.squared legend("bottomright", legend=signif(r2), col="black") test[i]<-r2 print(r2) abline(mod) rm(temp.i) rm(i) rm(mod) rm(r2) } test Test comes up as the original vector of zeros. I know r2 is created for a couple reasons (print works, and they show up on the graphs). Also, if I run the function line by...
2018 Oct 08
4
Texto en el eje de ordenadas de un gráfico
...gráfico, desaparezcan las marcas de 0,.2, 0.4, 0.6 y 0.8 y aparezcan en 0.25, 0.50 y 0.75. He probado varias cosas que he visto por Googe pero no me han funcionado. ¿Alguna idea? library(ltm) # creo el modelo modelo <- ltm(LSAT ~ z1) # represento el modelo plot(modelo, legend = TRUE, cx = "bottomright", lwd = 3,cex.main = 1.5, cex.lab = 1.3, cex = 1.1,main="") # creamos las líneas horizontales abline(h=0.25, col="purple") abline(h=0.50, col="red") abline(h=0.75, col="green") saludos y muchas gracias, Fernando [[alternative HTML version deleted]]
2007 Jan 10
2
labels outliers in boxplot
...outline=TRUE,main="Negative control response of each patient", cex.main=1, font.main=1, col.main="blue", names=c(1:35,"B")) grid(nx=NA, ny=NULL) ### grid over boxplot legend("bottomright", "B = Buffer + sec",text.col="blue") out.block<- identify(tb_ncs$y,tb_ncs$Slide) _________________________________________________________ Flyger tiden iv?g? F?nga dagen med Yahoo! Mails inbyggda
2011 Jul 13
1
Smart legend ???
...nd 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? Cheers -- Pei JIA Email: jp4work@gmail.com cell: +1 604-362-5816 Welcome to Vision Open http://...
2011 Sep 15
1
legend with cofor-filled symbol
Hi folks, Please let me know what I am doing wrong. I want to have a legend with symbols that are filled with same color as the drawn line, but I failed to do that: plot(1:100, 1:100, pch=21, bg="red") legend("bottomright", "test", bty='n', pch=21, bg="red", col="red") It looks to me that the "bg" option in legend does not work properly as in plot. Please help, Thanks, D.
2009 Feb 18
1
interaction.plot - gridlines and formatting legend title...
...ctor(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), xlab="X Label", ylab="Y Label", main="Chart Label") legend("bottomright", c("level 1","level 2"),bty="n",lty=c(1,2),lwd=2,pch=c(18,24), col=c("red","blue"), title="Legend Title",inset = .02) I think it is not using lattice, does it? So, I was wondering if it is at all possible to: 1. Create gridlines in...
2012 Jan 19
1
Legend problem in line charts
...i])) } # add a title and subtitle paste("REFID = ", unique(refid1$REFID), "; STATANAL = ", unique(refid1$STATANAL), sep="") -> x title(x) # add a legend legend(xrange[1], yrange[2], unique(refid1$ACTTRT), cex=0.8, col=colors, pch=plotchar, lty=linetype) #"bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center" dev.off() } [[alternative HTML version deleted]]