- 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 include a zero with tick in base R plot?
When we create a plot in base R the Y-axis values are generated automatically and mostly zero is now shown except in few cases that can’t be defined in particular but happens when there exists a zero in data. Therefore, if we want to include a zero with tick in base R plot then ylim argument can be used with the plot function.
Example
plot(5,ylim=c(0,5))
Output
Example
plot(rnorm(100),ylim=c(-5,5))
Output
Example
plot(rpois(10,2),ylim=c(0,10))
Output
- Related Articles
- How to create a plot in base R with tick marks of larger size?
- How to create a plot in base R with tick marks but excluding axes lines?
- How to create a plot with tick marks between X-axis labels in base R?
- How to highlight a value with underline in base R plot?
- How to display text in base R plot with outline?
- How to display mean with underline in base R plot?
- How to create a plot with dashed regression line in base R?
- How to add a picture to plot in base R?
- How to create a plot with reversed Y-axis labels in base R?
- How to rotate text in base R plot?
- How to remove Index in base R plot?
- How to display fraction in base R plot?
- How to assign a value to a base R plot?
- How to create a perpendicular arrow in base R plot?
- How to create a cumulative sum plot in base R?

Advertisements