[R] Pointing to a specific place on the x-axis with an arrow
Barry Rowlingson
b.rowlingson at lancaster.ac.uk
Wed Oct 6 13:05:24 CEST 2010
On Wed, Oct 6, 2010 at 11:04 AM, Michael Bedward
<michael.bedward at gmail.com> wrote:
> On 6 October 2010 20:51, Ivan Calandra <ivan.calandra at uni-hamburg.de> wrote:
>>
>> Moreover, Josh wanted the arrow to be really big. Is it possible to make
>> it bigger? I would be interested too!
>>
>
> Sorry - missed that bit. You can use the cex argument of the mtext
> function to make the symbol bigger.
>
And you might also need 'line=' to shift it down a bit once it starts growing.
If all else fails, use arrows() - but that might get tricky...
> plot(1:10)
> par(xpd=NA) # dont clip to the plot
> arrows(5,0,5,1)
You could use various other par() options to get the position of the axis...
> plot(2:20)
> par(xpd=NA)
> arrows(7,par()$usr[3]-3,7,par()$usr[3],lwd=2)
Barry
More information about the R-help
mailing list