Q:

Write a NumPy program to compute the line graph of a set of data

0

Write a NumPy program to compute the line graph of a set of data.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import numpy as np    
import matplotlib.pyplot as plt
arr = np.random.randint(1, 50, 10)
y, x = np.histogram(arr, bins=np.arange(51))
fig, ax = plt.subplots()
ax.plot(x[:-1], y)
fig.show()

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now