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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:54:24+00:00 2026-06-12T21:54:24+00:00

I intend for part of a program I’m writing to automatically generate Gaussian distributions

  • 0

I intend for part of a program I’m writing to automatically generate Gaussian distributions of various statistics over multiple raw text sources, however I’m having some issues generating the graphs as per the guide at:

python pylab plot normal distribution

The general gist of the plot code is as follows.

import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as pyplot

meanAverage = 222.89219487179491    # typical value calculated beforehand
standardDeviation = 3.8857889432054091    # typical value calculated beforehand

x = np.linspace(-3,3,100)
pyplot.plot(x,mlab.normpdf(x,meanAverage,standardDeviation))
pyplot.show()

All it does is produce a rather flat looking and useless y = 0 line!
Can anyone see what the problem is here?

Cheers.

  • 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-12T21:54:25+00:00Added an answer on June 12, 2026 at 9:54 pm

    It looks like you made a few small but significant errors. You either are choosing your x vector wrong or you swapped your stddev and mean. Since your mean is at 222, you probably want your x vector in this area, maybe something like 150 to 300. This way you get all the good stuff, right now you are looking at -3 to 3 which is at the tail of the distribution. Hope that helps.

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

Sidebar

Related Questions

I intend to make some software to be sold over internet. I've only created
I intend to write my own JIT-interpreter as part of a course on VMs.
I am writing a program that displays a random natural note and waits for
I am currently writing my first program on C# and I am extremely new
I'm writing a pathfinding visualizer in python and Pygame. I intend to write a
My program generates a set of words from which I intend to build a
Introduction a.k.a. what do I intend to do feel free to skip this part,
I wrote the following code in a part of Android program, but it is
I intend to convert a physical book into a ebook for iPhone. I am
I intend to create a realtime counter. So one user can incremenet the counter

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.