Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7648805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:48:34+00:00 2026-05-31T10:48:34+00:00

When you generate plots in R with the ‘plot’ command, and set the left

  • 0

When you generate plots in R with the ‘plot’ command, and set the left side x-axis limit to zero, with, e.g.

plot(x=c(1:10), y=c(1:10), xlim=c(0,10), ylim=c(0,10))

R, for reasons which are not apparent to me, puts a bunch of extra space between the point (0,0) and the bottom lefthand corner (also at the top).

I can get the graph I want by manually guessing the offsets, and adjusting the bottom and left axis limits accordingly:

plot(x=c(1:10), y=c(1:10), xlim=c(0.38,10), ylim=c(0.38,10))

But the problem is, I have to do this manually for each graph, which seems excessive.

Is there a par-type setting for removing this margin?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:48:35+00:00Added an answer on May 31, 2026 at 10:48 am

    In calls to plot(), both xlim and ylim are by default padded (extended) by 4%. To suppress this behavior, set xaxs = "i" and/or yaxs = "i".

    For more details, see the help page for par.

    plot(x=c(1:10), y=c(1:10), xlim=c(0,10), ylim=c(0,10), xaxs="i", yaxs="i")
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of survey data, and I'd like to generate plots of
I have to generate 250 plots with the same view. My example data set:
I need to generate a stack of 2D polar plots (a 3D cylindrical plot)
By generate, I mean auto-generation of the code necessary for a particular selected (set
I am using matplotlib and a modified version of this example to generate plots
I use Rubyvis to generate SVG plots, and then allow the user to save
I'm playing with core-plot to generate a scatter plot. I've added a plot symbol
How can I generate a plot like the following in R. It shows the
I'm trying to generate a linear regression on a scatter plot I have generated,
I'm trying to generate a plot using Matplotlib with a non-Latin character (a μ)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.