0

I don't know whats wrong, but no errors show up, yet nothing happens... I'm trying to represent graphically the frequency of appearance of every number (0-9) in the first 100.000 digits of pi (in a histogram, for example)

import numpy as np import matplotlib.pyplot as plt from numpy import * from mpmath import * mp.dps=100000 data = (str(pi)) plt.hist(data, bins=10, color='steelblue') 

It should show a histogram with 10 bins and the frequency of each digit in each bin,but instead nothing shows up, but no error message is printed.

1
  • Why do you import numpy twice? Also you should maybe try plt.show() at the end Commented Jan 23, 2019 at 15:44

1 Answer 1

0

You've forgotten to add: plt.show()

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.