[R] overlap two graph
Scott Sherrill-Mix
shescott at mail.med.upenn.edu
Thu Aug 6 17:37:47 CEST 2009
It really sounds like you want to use points(). Maybe I'm missing the
true question but ellipsePoints returns a 2 column matrix of point
coordinates so passing it's output to points() should plot those
points on whatever plot you currently have open (in this case the plot
of the previous ellipse). If you're looking for an alternative way to
do it, you could rbind the outputs together and then plot the whole
thing:
allPoints<-rbind(ellipsePoints(2,5, alpha = 30),ellipsePoints(2,5, alpha = 60))
plot(allPoints)
Scott
Scott Sherrill-Mix
Department of Microbiology
University of Pennsylvania
402B Johnson Pavilion
3610 Hamilton Walk
Philadelphia, PA 19104-6076
On Thu, Aug 6, 2009 at 3:15 AM, Hemavathi Ramulu<hema.ramulu at gmail.com> wrote:
> Hi,
> actually there are coding before
> plot(ellipsePoints(2,5, alpha = 30), asp=1) which i got it from this website
> http://www.biostat.wustl.edu/archives/html/s-news/2002-10/msg00186.html
>
> It only can draw one ellipse,
> Now I want to know how to add more ellipse in same diagram?
> thank you.
> On Wed, Aug 5, 2009 at 9:53 PM, Scott Sherrill-Mix
> <shescott at mail.med.upenn.edu> wrote:
>>
>> Did you try already try:
>> plot(ellipsePoints(2,5, alpha = 30), asp=1)
>> points(ellipsePoints(2,5, alpha = 60), asp=1,col='red')
>> ?
>>
>> Scott
>>
>>
>>
>>
>> Scott Sherrill-Mix
>> Department of Microbiology
>> University of Pennsylvania
>> 402B Johnson Pavilion
>> 3610 Hamilton Walk
>> Philadelphia, PA 19104-6076
>>
>>
>>
>>
>> On Wed, Aug 5, 2009 at 5:46 AM, Hemavathi Ramulu<hema.ramulu at gmail.com>
>> wrote:
>> > Hi everyone,I need you all help.
>> > I want to create few image in same diagram.
>> >
>> > For example, I wan draw two ellipse in same diagram.
>> >
>> > plot(ellipsePoints(2,5, alpha = 60), asp=1)
>> > and
>> > plot(ellipsePoints(2,5, alpha = 30), asp=1)
>> >
>> > How to display both ellipse together? both is different in angle.
>> >
>> > Thank you.
>> > --
>> > Hemavathi Ramulu
>> >
>> > [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > R-help at r-project.org mailing list
>> > 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.
>> >
>
>
>
> --
> Hemavathi Ramulu
>
More information about the R-help
mailing list