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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:21:18+00:00 2026-06-07T20:21:18+00:00

hist() will generate a histogram composed of lots of bars How can I replace

  • 0

hist() will generate a histogram composed of lots of “bars”

How can I replace each bar with one point, so that many points together will look like a continuous curve?

  • 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-06-07T20:21:21+00:00Added an answer on June 7, 2026 at 8:21 pm

    some dummy data

    x <- rnorm(50)
    
    # create a histogram
    .hist <- hist(x)
    
    # look at the structure to see what is created when calling hist
    str(.hist)
    
    ## List of 7
    ## $ breaks     : num [1:10] -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2
    ## $ counts     : int [1:9] 1 2 5 6 8 10 10 5 3
    ## $ intensities: num [1:9] 0.04 0.08 0.2 0.24 0.32 0.4 0.4 0.2 0.12
    ## $ density    : num [1:9] 0.04 0.08 0.2 0.24 0.32 0.4 0.4 0.2 0.12
    ## $ mids       : num [1:9] -2.25 -1.75 -1.25 -0.75 -0.25 0.25 0.75 1.25 1.75
    ## $ xname      : chr "x"
    ## $ equidist   : logi TRUE
    ## - attr(*, "class")= chr "histogram"
    
    # we could plot the mids (midpoints) against the counts
    with(.hist, plot(mids, counts))
    

    Or you could simply use density

    plot(density(x))
    

    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 am using pythons hist function to generate 1d histograms each linked to a
I have created a histogram using (hist) function... after that, I need to save
How can one plot the percentages as opposed to raw frequencies using the hist()
I'm trying to plot some data into a histogram using pyplot.hist as such: hst
I would like to rotate a histogram in R, plotted by hist(). The question
The problem that I am facing at the moment as can be seen in
As we know, 'hist' function in Matlab plots the histogram of an array. I
I have a Python program that generates a histogram using matplotlib. The problem is
I am creating histogram with pylab.hist(data,weights,histtype='step',normed=False,bins=150,cumulative=True) getting (there are other plots, which are irrelevant
I'm drawing a histogram with the standard hist function with this example dataset: v=

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.