- Trending Categories
- 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 plot in base R with tick marks but excluding axes lines?
To create a plot with tick marks but without axes lines, we first need to create the plot without axes and then add the tick marks. This can be done with the help of plot function and axis function in base R. The axis function will help us to decide where do we need the tick marks and the ticks.
Example1
> plot(1:10,axes=FALSE) > axis(1,c(1:10),col=NA,col.ticks=1)
Output
Example2
> x<-rpois(5,2) > x
Output
[1] 5 2 1 2 1
Example
> plot(x,axes=FALSE) > axis(1,c(1:5),col=NA,col.ticks=1)
Output
Advertisements