Re: [R] making a plot

2014-10-20 Thread Enrico Colosimo
Thanks David and Adrés,

it worked fine.

Enrico.


2014-10-20 15:37 GMT-02:00 David Winsemius :

>
> On Oct 20, 2014, at 8:24 AM, Andrés Aragón wrote:
>
> > Enrico,
> >
> > This may help you:
> >
> > text(locator(1), "*", cex=1.5,adj=0.5
> >
> > and
> >
> > text(locator(1), "º", cex=1.5,adj=0.5
>
> Why not just use the values of x2 and  y2 that were given to segments:
>
> > text( (ano+ranges)[1:3], 1:3, "*", cex=1.5,adj=0.5)
> > text( (ano+ranges)[4:6], 4:6 , "º", cex=1.5,adj=0.5)
>
> >
> >
> > Draw your plot, then write the code, locate the cursor on your plot, put
> > the symbols where you want itl and click.
> >
> > Regards,
> >
> >
> > Andrés
> >
> > PS ?locator
> >
> >
> > 2014-10-20 9:46 GMT-05:00 Enrico Colosimo :
> >
> >> Dear all,
> >>
> >> I am struggling to make a plot for my survival analysis
> >> class.
> >>
> >> This is my script
> >>
> >>
> >> labels<-c('1','2','3','4','5','6')
> >> ano<-c(2001,2002,2003,2004,2006,2008)
> >> ranges<-c(6,3,4,5,4,2)
> >> dotchart(ano, labels=labels, xlab='ano',
> >> ylab='Pacientes',pch=20,xlim=c(min(ano),  max(ano+ranges)))
> >> segments(ano,1:6,ano+ranges,1:6,pch=25,lty=1,lend=4)
> >>
> >> I need to put an asterix (failure) by the end of the three first lines
> and
> >> a small circle (censoring)
> >> by the end of the last three.
> >>
> >> Someone can help me?
> >>
> >> Thanks,
> >> Enrico.
> >>
> >>[[alternative HTML version deleted]]
> >
> --
>
> David Winsemius
> Alameda, CA, USA
>
>

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] making a plot

2014-10-20 Thread David Winsemius

On Oct 20, 2014, at 8:24 AM, Andrés Aragón wrote:

> Enrico,
> 
> This may help you:
> 
> text(locator(1), "*", cex=1.5,adj=0.5
> 
> and
> 
> text(locator(1), "º", cex=1.5,adj=0.5

Why not just use the values of x2 and  y2 that were given to segments:

> text( (ano+ranges)[1:3], 1:3, "*", cex=1.5,adj=0.5)
> text( (ano+ranges)[4:6], 4:6 , "º", cex=1.5,adj=0.5)

> 
> 
> Draw your plot, then write the code, locate the cursor on your plot, put
> the symbols where you want itl and click.
> 
> Regards,
> 
> 
> Andrés
> 
> PS ?locator
> 
> 
> 2014-10-20 9:46 GMT-05:00 Enrico Colosimo :
> 
>> Dear all,
>> 
>> I am struggling to make a plot for my survival analysis
>> class.
>> 
>> This is my script
>> 
>> 
>> labels<-c('1','2','3','4','5','6')
>> ano<-c(2001,2002,2003,2004,2006,2008)
>> ranges<-c(6,3,4,5,4,2)
>> dotchart(ano, labels=labels, xlab='ano',
>> ylab='Pacientes',pch=20,xlim=c(min(ano),  max(ano+ranges)))
>> segments(ano,1:6,ano+ranges,1:6,pch=25,lty=1,lend=4)
>> 
>> I need to put an asterix (failure) by the end of the three first lines and
>> a small circle (censoring)
>> by the end of the last three.
>> 
>> Someone can help me?
>> 
>> Thanks,
>> Enrico.
>> 
>>[[alternative HTML version deleted]]
> 
-- 

David Winsemius
Alameda, CA, USA

__
R-help@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.


Re: [R] making a plot

2014-10-20 Thread Andrés Aragón
Enrico,

This may help you:

text(locator(1), "*", cex=1.5,adj=0.5

and

text(locator(1), "º", cex=1.5,adj=0.5


Draw your plot, then write the code, locate the cursor on your plot, put
the symbols where you want itl and click.

Regards,


Andrés

PS ?locator





2014-10-20 9:46 GMT-05:00 Enrico Colosimo :

> Dear all,
>
> I am struggling to make a plot for my survival analysis
> class.
>
> This is my script
>
>
>  labels<-c('1','2','3','4','5','6')
>  ano<-c(2001,2002,2003,2004,2006,2008)
>  ranges<-c(6,3,4,5,4,2)
>  dotchart(ano, labels=labels, xlab='ano',
> ylab='Pacientes',pch=20,xlim=c(min(ano),  max(ano+ranges)))
>  segments(ano,1:6,ano+ranges,1:6,pch=25,lty=1,lend=4)
>
> I need to put an asterix (failure) by the end of the three first lines and
> a small circle (censoring)
> by the end of the last three.
>
> Someone can help me?
>
> Thanks,
> Enrico.
>
> [[alternative HTML version deleted]]
>
> __
> R-help@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.
>

[[alternative HTML version deleted]]

__
R-help@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.


[R] making a plot

2014-10-20 Thread Enrico Colosimo
Dear all,

I am struggling to make a plot for my survival analysis
class.

This is my script


 labels<-c('1','2','3','4','5','6')
 ano<-c(2001,2002,2003,2004,2006,2008)
 ranges<-c(6,3,4,5,4,2)
 dotchart(ano, labels=labels, xlab='ano',
ylab='Pacientes',pch=20,xlim=c(min(ano),  max(ano+ranges)))
 segments(ano,1:6,ano+ranges,1:6,pch=25,lty=1,lend=4)

I need to put an asterix (failure) by the end of the three first lines and
a small circle (censoring)
by the end of the last three.

Someone can help me?

Thanks,
Enrico.

[[alternative HTML version deleted]]

__
R-help@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.


[R] making a plot in xyplot

2009-10-23 Thread Ordaz, Sarah
Hello,

I am a newbie to the lattice package in R, and I'm trying to make a plot using 
the xyplot function.  I have repeated measures data (2 conditions) for two 
different groups of subjects (teens and adults).

So far, I've made a basic graph using xyplot(y ~x, group=subnum, data=mydata, 
type="b").

Now I would like to make all the teens' lines one color and the adults' 
another.  Additionally, I'd like to reformat the dots so that the points 
referencing condition 1 and condition 2 are different.  Can you help me with 
this?

Thanks!
Sarah

Sarah Ordaz
ord...@upmc.edu
Laboratory of Neurocognitive Development
University of Pittsburgh
121 Meyran Avenue
Loeffler Building Rm 113
Pittsburgh, PA 15213
412.383.9972
http://www.wpic.pitt.edu/research/lncd/


[[alternative HTML version deleted]]

__
R-help@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.