- 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 change the axis ticks color in base R plot?
To change the axis ticks color in base R plot, we can use axis function after creating the plot. For example if we want to change the color of X-axis to red then we can use the command given below −
axis(1,col.ticks="red")
If we want to change the color of Y-axis to red then we can use the command given below −
axis(2,col.ticks="red")
Check out the below given example to understand how it works.
Example
To change the axis ticks color in base R plot, use the code given below −
plot(1:10)
Output
If you execute the above given code, it generates the following output −
To change the axis ticks color in base R plot, add the following code to the above snippet −
plot(1:10) axis(1,col.ticks="blue") axis(2,col.ticks="blue")
Output
If you execute all the above given codes as a single program, it generates the following output −
- Related Articles
- How to change the axis color in base R plot?
- How to change the Y-axis title in base R plot?
- How to change the color of the axis, ticks and labels for a plot in matplotlib?
- How to change the background color of base R plot region?
- How to change the background color of legend in base R plot?
- How to change the position of X-axis in base R plot?
- How to change the border color of box of a base R plot?
- How to change the color of bars in base R barplot?
- How to display X-axis labels inside the plot in base R?
- How to change the resolution of a plot in base R?
- How to change the color of outliers in base R boxplot?\n
- How to change the color of box of boxplot in base R?
- How to change the font size of legend in base R plot?
- How to display superscript for X-axis title in base R plot?
- How to display X-axis labels with dash in base R plot?

Advertisements