Is it possible to add arrows using locator? I gave it a try but no luck….
plot(1:3)
arrows(x0=locator(1), x1=locator(1),
y0=locator(1), y1=locator(1), code=1)#single headed arrow
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you look at what
locator(1)returns you’ll see why this isn’t even close to working:So you were passing a list of length two to each argument. I would probably (though this won’t be reproducible so I wouldn’t really do it in anger in any analysis) approach this via:
The add the arrow using the data saved in
locs: