Displaying 20 results from an estimated 39 matches for "bottomleft".
2007 Mar 22
2
quick legend() question
...scatterplot of points with pch=1 and a single point with
pch=3, lwd=3.
It has a high line width to attract attention to it.
The following script
plot(rnorm(10),rnorm(10),col="black")
points(rnorm(10),rnorm(10),col="red")
points(0,0,pch=3,lwd=3)
if(TRUE){
legend("bottomleft",c("a","b","Truth"),pch=c(1,1,3),col=c
("black","red","black"))
} else {
legend("bottomleft",c("a","b","Truth"),pch=c(1,1,3),col=c
("black","red","black"),lwd=...
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 == choices
The problem is that I have more...
2009 Feb 17
1
plot.lm: "Cook's distance" label can overplot point labels
...- diff(ylim)*max(0, fracht-0.04)
## End insert new code
plot(xx, rsp, xlim = c(0, max(xx, na.rm = TRUE)),
ylim = ylim, main = main, xlab = "Leverage",
ylab = ylab5, type = "n", ...)
Then, about 15 lines further down, replace
legend("bottomleft", legend = "Cook's distance",
lty = 2, col = 2, bty = "n")
by
legend("bottomleft", legend = "Cook's distance",
lty = 2, col = 2, bty = "n", y.intersp=0.5)
If this second change is not made, the...
2010 Sep 22
1
legend
Hi,
there is a function to plot survival curves:
library(survival)
plot.KM <- function(survival, x, x_cut.off, main='', label='')
{
plot(survfit(survival ~ I(x >= x_cut.off)), main=main)
legend('bottomleft', c(expression(label >= x_cut.off),expression(label <
x_cut.off)))
}
Now, I need to determine as the argument what appears in the legend. I want
plot.KM(survival, x, x_cut.off=0.5, main='', label='ABC')
but what I get is ('label < x_cut.off') in legend instead...
2005 Jun 28
2
Producing character "given" i.e. "| " with plotmath
...this a bug?
legend(legend = c(expression(L(y|mu))), x = "top")
## Group produces an error
legend(legend = c(expression(group(L(y, "|", mu)))), x = "topleft")
## Paste keeps commas in expression
legend(legend = c(expression(paste(L(y, "|", mu)))), x = "bottomleft")
## This one is OK, but braces are not as they should be
legend(legend = c(expression(paste("L(y", "|", "mu)"))), x = "bottom")
Thanks!
Lep pozdrav / With regards,
Gregor Gorjanc
-----------------------------------------------------------------...
2007 Sep 20
1
Time series graphs, question about using zoo
...reg(as.matrix(DF), start = as.yearmon(as.Date("2007-01-01")), freq
>= 12)
>z <- aggregate(z, as.Date, tail, 1)
>plot(z, plot.type = "single", type = "o",
> pch = c("A", "A", "B", "B"), lty = 1:2)
>legend("bottomleft", c("Bob", "Tom"), lty = 1:2)
>
>
>
>On 9/20/07, Bill Pepe <sonicbill12 at yahoo.com> wrote:
> > I'm fairly new to S-Plus and I need to get this done quickly. Suppose I
>have the following fake data below:
> >
> > There are two c...
2024 Feb 05
1
ggarrange & legend
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
2008 Jul 02
1
Multiple time series plots
...eriesPositions(x.agg))
r <- as.Date(range(dates))
ts.plot(x.agg@Data[,c(1,5)],gpars=list(ylab="Volume",
lty=c(1:2),xaxt="n",main="Plot of Volume"))
axis.Date(1, at=seq(r[1], r[2], length.out=10),
format="%Y-%m-%d",cex.axis=.75)
legend("bottomleft",legend=c("Base Volume","Model Base
Volume"),lty=c(1,2),inset=.01,cex=.5,adj=0)
All this works fine, except I don't get the dates on the x-axis like I
want. When I try to plot a single series using "plot" it works as
expected.
Any advice?
John...
2011 Aug 11
1
legend position in interaction.plot
How do I move the legend from default position (right and within the plot)?to the "bottomleft" of the plot?
?
interaction.plot(YEAR, ID?GROWTH, legend=TRUE, col = 2:7,xlab="Year",
?????? ylim=c(0,2), ylab="Growth",leg.bty = "o")
Peter Maclean
Department of Economics
UDSM
2010 Oct 30
1
two group cox model
Dear all,
I am doing
library(survival)
fit <- coxph(Surv(futime,fustat) ~ rx, ovarian)
plot(survfit(fit,newdata=ovarian),col=c(1,2))
legend("bottomleft", legend=c("rx = 0", "rx = 1"),
lty=c(1,2),col=c(1,2))
Is this correct to compare these two groups? Is the 0.31 the p-value that
the median f two groups are equal
Why lty does not work here?
Many thanks in advance.
Cheba
[[alternative HTML version deleted]]
2011 Jul 13
1
Smart legend ???
...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?
Cheers
--
Pei JIA
Email: jp4work@gmail.com
cell: +1 604-362-5816
We...
2009 Mar 01
0
Wishlist for plot.lm() (PR#13560)
...ylim[1] - diff(ylim)*max(0, fracht-0.04)
## End insert new code
plot(xx, rsp, xlim = c(0, max(xx, na.rm = TRUE)),
ylim = ylim, main = main, xlab = "Leverage",
ylab = ylab5, type = "n", ...)
Then, about 15 lines further down, replace
legend("bottomleft", legend = "Cook's distance",
lty = 2, col = 2, bty = "n")
by
legend("bottomleft", legend = "Cook's distance",
lty = 2, col = 2, text.col=2, bty = "n", y.intersp=0.5)
# This changes the legen...
2012 Jan 19
1
Legend problem in line charts
...t;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]]
2024 Feb 05
1
ggarrange & legend
...lp <
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 read the posting...
2008 Apr 01
1
superimpose histogram on biplot
...above "scatter" command, there is a
histogram in the upper left corner. I want to know how to
superimpose that histogram on a similar plot, such as the following:
groups = as.factor(c(rep(1,2), rep(2,4), rep(3,4)))
s.arrow(dfxy=nipmat$co[,1:2]*8, sub="Day 10", possub="bottomleft",
csub=3)
s.class(dfxy=nipmat$li[,1:2], fac=groups, cellipse=2, axesell=F,
cstar=0 , col=c(2:3), add.plot=T)
I can create the histogram using:
plot(nipmat$eig/sum(nipmat$eig), type='h')
but I don't know how to superimpose it on the above graph.
Thanks for any help!
Best,...
2024 Feb 05
2
ggarrange & legend
...t;r-help at r-project.org <mailto: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 <mailto:R-help at r-project.org> mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the postin...
2008 Aug 06
1
bug submitting bug? [Fwd: Undelivered Mail Returned to Sender]
...Version: 2.7.1
OS: Windows
Submission from: (NULL) (72.89.97.235)
# The following code shows that the legend is misplaced when a title is included
AND xlim specifies a decreasing x axis.
matplot(1:5, matrix(rnorm(5*3), nrow=5), type="l", col=1:3, lty=1, lwd=3,
xlim=c(5,1))
legend("bottomleft", col=1:3, lty=1, legend=paste("line", letters[1:3]))
legend("topleft", col=1:3, lty=1, legend=paste("line", letters[1:3]),
title="Hello")
legend("bottomright", col=1:3, lty=1, legend=paste("line", letters[1:3]))
legend("toprigh...
2011 Oct 17
1
contouring x y scatter data
...39,0.145,0.222,0.273,0.308,0.331,0.347,0.357,0.364,0.368,0.368,0.353,0.302,0.253,0.211,0.176,0.147,0.121,0.097,0.066,0.000)
FD<-data.frame(x=X2,z=Z2,ts181=ts181.2,ts1825=ts1825.2)
plot(FE$x,FE$z,xlim=range(FE$x),ylim=c(0.8*range(FE$z)[1],1.1*range(FE$z)[2]))
points(FD$x,FD$z,pch=4)
legend("bottomleft",c("Finite Element Mesh Nodes","Finite Difference Grid
Cell Nodes"),pch=c(1,4))
--
View this message in context: http://r.789695.n4.nabble.com/contouring-x-y-scatter-data-tp3912828p3912828.html
Sent from the R help mailing list archive at Nabble.com.
2015 Aug 02
3
ayuda con anĂ¡lisis de supervivencia
...Rdata?dl=0>
sapply(levels(df0$bmi0),function (x){ #####SURVIVAL CURVE
dfx=filter(df0,bmi0==x)
surv2=Surv(dfx$bmi,dfx$MetS)
km2=survfit(surv2~dfx$apoe4)##start.time=20,type='kaplan')
plot(km2,lty=2:1,xlim=c(20,41),xlab='BMI at onset',main=x,mark.time = F)
legend('bottomleft',c('E4','no-E4'),lty=2:1)
cox=list(coxph(surv2~relevel(dfx$apoe4,ref='no-E4')))
})
sapply(levels(df0$bmi0),function (x){ #####CUMULATIVE HAZARDs
dfx=filter(df0,bmi0==x)
surv2=Surv(dfx$bmi,dfx$MetS)
km2=survfit(surv2~dfx$apoe4)
plot(km2,lty=2:1,xlim=c(20,41)...
2024 Feb 05
1
ggarrange & legend
...gt; 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 read the posting...