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 6174025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:40:49+00:00 2026-05-23T23:40:49+00:00

Why is R inconsistent with the add parameter in the plot() function? It sometimes

  • 0

Why is R inconsistent with the add parameter in the plot() function?
It sometimes works and sometimes doesn’t!
In this example, it takes the parameter add=TRUE with no problem:

plot(0:10, 0:10*3)
plot(identity, add=TRUE, xlim=c(0,10))
plot(function (x) { sin(x)*10 }, add=TRUE, xlim=c(0,10))

But when I issue

plot(c(2, 3, 4), c(20,10,15), add=TRUE, pch="A")

It doesn’t work!! It says that “add” is not a graphical parameter.

Please do not write that I should use points() instead. I know I can use it.
I want to understand the strange behaviour of R – why does it sometimes work and sometimes not?

  • 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-23T23:40:50+00:00Added an answer on May 23, 2026 at 11:40 pm

    This is admittedly annoying and inconsistent, but it’s explicable.

    identity is an object of a class — function — that has a plot method (plot.function) with an add argument, while the default plot method does not have an add argument.

    In general, when trying to plot object bar, you should try class(bar); if it is of class foo then try methods(class="foo") to see that it has a plot method, or methods("plot") to see that plot.foo exists. Try ?plot.foo (or help("plot.foo") to see help, or plot.foo to see the function itself. (If the method is a private function in the package mypkg you may need mypkg:::plot_foo or or getAnywhere(plot.foo) to find it.)

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

Sidebar

Related Questions

Whats wrong with the following c# code? Compiler reports this error: Inconsistent accessibility: parameter
I have noticed that my geocoder is inconsistent in the code shown below because
I've been experiencing very inconsistent results while developing an iPhone app and trying to
In VisualStudio (Pro 2008), I have just noticed some inconsistent behaviour and wondered if
Ok so I thought it was fixed, but I'm getting totally inconsistent results. I
Assume i have a custom Windows application written in C#. This application has only
I want to loop through a collection of objects and add them all to
Sadly, I have a legacy PHP4 system that I continuously need to add features
im trying to use this method to make my characters but i get the
im trying to use this method to make my characters but i get the

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.