- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- 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 remove the plot margin in base R between the axes and the points inside the plot?

To remove the plot margin in base R between the axes and the points inside the plot, we can use xaxs and yaxs argument in plot function. Depending on the choices of the arguments xaxs and yaxs, the plot region in the respective direction is 4% larger than specified by these limits or exactly matches the "i" limits.

## Example

x<-rnorm(10) plot(x)

## Output

## Example

plot(x,xaxs="i",yaxs="i")

## Output

- Related Questions & Answers
- How to exclude extra margin between points and the axes for a plot created by using ggplot2 in R?
- How to create a base R plot without axes but keeping the frame of the plot?
- How to display axes ticks and labels inside the plot using ggplot2 in R?
- How to display X-axis labels inside the plot in base R?
- How to put the plot title inside the plot using ggplot2 in R?
- How to change the starting and ending points of axes labels using plot function in R?
- How to remove Index in base R plot?
- How to display base R plot axes titles in italics?
- How to make the axes widths in a plot wider than default in base R?
- How to check the difference between plot generation time in base R?
- How to change the axis color in base R plot?
- How to change the axes labels using plot function in R?
- How to remove scientific notation form base R plot?
- How to create a histogram with main title in the outer margin of plot window in base R?
- How to change the color and size of the axes labels of a plot created by using plot function in R?

Advertisements