[R] Put 2 ablines in an "empty plot"
Matteo Murenu
mmurenu at unica.it
Fri Dec 5 10:51:27 CET 2014
plot.new()
abline(0,1)
abline(1,1)
# or as Michael suggest
plot(1:10, 1:10, type = "n")
# then
abline(0,1)
abline(1,1)
Best
Matteo Murenu,
Cagliari, IT
-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of David
Winsemius
Sent: 05 December 2014 10:07
To: Adrien Bonvin
Cc: r-help at r-project.org
Subject: Re: [R] Put 2 ablines in an "empty plot"
On Dec 5, 2014, at 12:30 AM, Adrien Bonvin wrote:
> Bonjour
> Hi everybody,
>
> Firs of all, sorry for my terrible English,
>
> I would like to know if it's possible to create an "empty plot" in which i
could add two ablines I created on two different plots earlyer in my script.
>
>
>
Read there help page for ?plot.default. There is a type parameter that lets
you do what you ask. There's also a worked example on ?plot.window
>
> As a result I would like to have a plot with only the two ablines (in the
same plot) but without the graphs I used to create the ablines in the first
place.
>
> I hope I explained my problem well enough.
>
> Thanks for helping me out, i hope someone has the answer.
>
> Adrien Bonvin
> [[alternative HTML version deleted]]
Please read what the posting guide says about html posting.
>
> ______________________________________________
> 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 guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius
Alameda, CA, USA
______________________________________________
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 guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list