In [30]:
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 5, 11)
y = x ** 2
%matplotlib inline
In [31]:
plt.scatter(x,y)
Out[31]:
In [5]:
from random import sample
data = sample(range(1, 1000), 100)
#plt.hist(data)
data
Out[5]:
In [21]:
from random import sample
data = sample(range(1, 1000), 100)
plt.hist(data)
Out[21]:
In [23]:
z=[10,20,30,40,50]
plt.hist(z)
Out[23]:
In [32]:
z=[10,20,30,40,50,20,10,30,30]
plt.hist(z)
Out[32]:
In [33]:
data = [np.random.normal(0, std, 100) for std in range(1, 4)]
#data
# rectangular box plot
plt.boxplot(data,vert=True,patch_artist=True);
No comments:
Post a Comment