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

  • SEARCH
  • Home
  • 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 7687393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:41:37+00:00 2026-05-31T19:41:37+00:00

When I run this line: plot(z$prod,z$x, type=l) It plots the values as dashes and

  • 0

When I run this line:

plot(z$prod,z$x, type="l")

It plots the values as dashes and ignores the type command.
I can easily get it to plot the line if I run:

points(z$prod, z$x, type="l")

What is it about plot() that ignores the type command while points() recognizes it?

  • z$prod is a factor with 4 levels
  • z$x is a num[1:6]

This is driving me crazy!

  • 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-31T19:41:38+00:00Added an answer on May 31, 2026 at 7:41 pm

    Expanding on my comment…

    The second paragraph you read when looking up ?plot (you did read ?plot right?) is this:

    For simple scatter plots, plot.default will be used. However, there
    are plot methods for many R objects, including functions, data.frames,
    density objects, etc. Use methods(plot) and the documentation for
    these.

    Then continue reading about the type argument:

    type: what type of plot should be drawn […] Note that some methods, e.g. plot.factor, do not accept this


    Typing methods(plot) lists a whole bunch of functions. You note that your x values are a factor. Hmmm. There’s a plot.factor listed in there. I wonder what it does. Turning next to ?plot.factor we see that:

    …For numeric y a boxplot is used…

    And further,

    Further arguments to barplot, boxplot, spineplot or plot as
    appropriate. All of these accept graphical parameters (see par) and
    annotation arguments passed to title and axes = FALSE. None accept
    type.

    There. Mystery solved.

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

Sidebar

Related Questions

How can I run this on linux command line when my username has an
I want to run weka through the command line. I type in this command:
I want to run this as a batch rather than through the command line:
I can't run this function. It gives the error: ERROR at line 9: PL/SQL:
I want to do this: run a command capture the output select a line
When I run this line: ERB.new(<%= 'hi' %>).result It works fine and I get
I consistantly get an error when I run this line moreContent.addView(findViewById(moreViews[0]), 0); extra code:
I get the above error when I run this line of JavaScript (And thisMaxNode
When I run this code plot(c(0,1), c(0, 1), type = n) legend(topleft, legend =
I need to run this line from my c++ program: java -jar test.jar text1

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.