[R] adding texts to plots and a problem....

Petr Pikal petr.pikal at precheza.cz
Mon Apr 3 16:26:10 CEST 2006


Hi

in that case it is positioning text what need to be chanded

for interactive placement something like

text(locator(1),expression(mu),col=3)

and for setted placement

text(x.position,0.025+(orta),expression(mu),col=3)

could be appropriate with x.positione derived from

x.position <- dates(as.character(tam[,tkolon]))[some.number]

HTH
Petr



On 3 Apr 2006 at 16:14, Levent TERLEMEZ wrote:

Date sent:      	Mon, 03 Apr 2006 16:14:01 +0300
From:           	Levent TERLEMEZ <lterlemez at anadolu.edu.tr>
To:             	Petr Pikal <petr.pikal at precheza.cz>
Subject:        	Re: [R] adding texts to plots and a problem....

> Hello,
> 
>     Thanks for your kind reply. The problem is, when i used the 
> dates(...), plot's axes and the dates(...) are ok. But added text(...)
> doesn't seen. When i don't use the dates(...) as x-axis, added
> text(...) can be seen.
> 
> best regards,
> Levent.
> 
> 
> Petr Pikal wrote:
> > Hi
> >
> > You did not tell us much about what the problem is. I presume that
> > dates(as.character(tam[,tkolon])) is not evaluated correctly and
> > therefore not plotted but it is only my guess.
> >
> > If you want more specific answer you shall stick more closely to the
> >  rules specified in posting guide.
> >
> > HTH
> > Petr
> >
> >   
> >> PLEASE do read the posting guide!
> >> http://www.R-project.org/posting-guide.html
> >>     
> >
> >
> >
> > On 31 Mar 2006 at 13:11, Levent TERLEMEZ wrote:
> >
> > Date sent:      	Fri, 31 Mar 2006 13:11:31 +0300
> > From:           	Levent TERLEMEZ <lterlemez at anadolu.edu.tr>
> > To:             	R Project Help - Mail LÝst
> > <r-help at stat.math.ethz.ch> Subject:        	[R] adding texts to
> > plots and a problem....
> >
> >   
> >> Hello,
> >>
> >> I have a problem with adding texts to my plots: The code is
> >>
> >> plot(dates(as.character(tam[,tkolon])),d[,i],ylab=names(d[i]),ylim=
> >> c( galt,gust),type="l") 
> >>
> >> abline(orta,0,lty=3,col=3)
> >> text(length(d[,i]),0.025+(orta),expression(mu),col=3)
> >> abline(orta+l2,0,lty=4,col=2)
> >> text(length(d[,i]),0.025+(orta+l2),expression(+2*sigma),col=2)
> >> abline(orta-l2,0,lty=4,col=2)
> >> text(length(d[,i]),0.025+(orta-l2),expression(-2*sigma),col=2)
> >> abline(orta+l1,0,lty=5,col=3)
> >> text(length(d[,i]),0.025+(orta+l1),expression(+sigma),col=3)
> >> abline(orta-l1,0,lty=5,col=3)
> >> text(length(d[,i]),0.025+(orta-l1),expression(-sigma),col=3)
> >>
> >>
> >> in this code, everything is ok without as.character(tam[,tkolon])).
> >> But when adding the statement, it dosen't work. If there is a known
> >> solution, sorry for my disturbance. I am new with R.
> >>
> >> best regards,
> >> Levent.
> >>
> >> ______________________________________________
> >> R-help at stat.math.ethz.ch mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guide!
> >> http://www.R-project.org/posting-guide.html
> >>     
> >
> > Petr Pikal
> > petr.pikal at precheza.cz
> >
> >
> >
> >   
> 
> 

Petr Pikal
petr.pikal at precheza.cz




More information about the R-help mailing list