[R] Labelling a secondary axis in R

Nakamura rbt501 at york.ac.uk
Tue Apr 22 10:45:57 CEST 2008


Thanks, the problem was solved using the line

mtext('Probability',4,cex=1.25,at=50,3)

Rob


Charles Annis, P.E. wrote:
> 
> If you just want the title, look at ?mtext.
> 
> 
> Charles Annis, P.E.
> 
> Charles.Annis at StatisticalEngineering.com
> phone: 561-352-9699
> eFax:  614-455-3265
> http://www.StatisticalEngineering.com
>  
> 
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
> On
> Behalf Of rbt501 at york.ac.uk
> Sent: Monday, April 21, 2008 10:23 AM
> To: Duncan Murdoch
> Cc: r-help at r-project.org
> Subject: Re: [R] Labelling a secondary axis in R
> 
> Apologies for the private mail, Nabble has not yet updated the thread so I 
> can write another post in it. I think I have confused things. I don't mean 
> the labels are incorrect. They are fine. What I am referring to is a title 
> for the secondary axis, which is currently entitled as "c(-100,200)". 
> Obviously this isn't very useful.
> 
> I will put some reproducible code on the post when it updates.
> 
> Thanks,
> Rob
> 
> On Apr 21 2008, Duncan Murdoch wrote:
> 
>>On 4/21/2008 9:02 AM, Nakamura wrote:
>>> Hello,
>>> 
>>> How can I label a secondary axis in R? At the moment it's labelled as
>>> c(-100,200). Obviously I would like it to be more sensible. 
>>> 
>>> Here is the code I am using
>>> 
>>> newx = -100+37.5*((1:9)-1)
>>> axis(4,at=newx,labels=(newx+100)/3750)
>>
>>I don't understand your question.  When I run this code:
>>
>> > newx = -100+37.5*((1:9)-1)
>> > plot(1:9, newx)
>> > axis(4,at=newx,labels=(newx+100)/3750)
>>
>>I get labels on side 4 which are 0, 0.01, ..., 0.08.
>>
>>I think we need a complete example to see the problem.
>>
>>Duncan Murdoch
>>
> 
> ______________________________________________
> 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.
> 
> ______________________________________________
> 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/Labelling-a-secondary-axis-in-R-tp16807708p16823724.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list