- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create a perpendicular arrow in base R plot?
To create a perpendicular arrow in base R plot, we can use arrows function. There are five arguments of arrows function that will be used to create the perpendicular arrow. The first four values define the position of the arrow and the last argument xpd allows R to create the arrow. Check out the below examples to understand how it works.
Example
plot(1:10) arrows(1,-1,1,0,xpd=TRUE)
Output
Example
plot(1:10) arrows(1,-1,1,2,xpd=TRUE)
Output
Example
plot(1:10) arrows(2,-1,2,2,xpd=TRUE)
Output
Advertisements