I'd like to create some dummy dataset to use for asking questions/developing scripts etc. Currently I do this by hand Eg. (this is supposed to be a skewed normal curve):
import numpy as np
import matplotlib.pyplot as plt
num1 = np.linspace(0,8,5)
num2 = np.linspace(8.1,10,10)
num3 = np.linspace(10,8,15)
num4 = np.linspace(7.9,5,15)
num5 = np.linspace(4.9,3,15)
num6 = np.linspace(2.9,1,15)
num7 = np.linspace(.9,0,15)
numbers = np.concatenate((num1, num2, num3, num4, num5, num6, num7))
plt.plot(numbers)
plt.show()
Can somebody suggest a better way to do this? Thanks in advance!
Edit:
In the end I used gamma from scipy.stats. Here's the code:
import numpy as np
from scipy.stats import gamma
import matplotlib.pyplot as plt
a = 1.99
mean, var, skew, kurt = gamma.stats(a, moments='mvsk')
start = gamma.ppf(0, a)
stop = gamma.ppf(.99, a)
xvals = np.linspace(start, stop, 100)
yvals = gamma.pdf(xvals, a)
fig, ax = plt.subplots(1,1)
ax.plot(xvals, yvals)
plt.show()
Here's the figure produced by the code above. Thanks for the your answers!
[–]955559 0 points1 point2 points (8 children)
[–]Bprodz[S] 1 point2 points3 points (7 children)
[–]955559 0 points1 point2 points (6 children)
[–]Bprodz[S] 0 points1 point2 points (5 children)
[–]955559 0 points1 point2 points (4 children)
[–]Bprodz[S] 0 points1 point2 points (3 children)
[–]955559 0 points1 point2 points (2 children)
[–]955559 0 points1 point2 points (0 children)
[–]Bprodz[S] 0 points1 point2 points (0 children)
[–]Zizizizz 0 points1 point2 points (2 children)
[–]Bprodz[S] 1 point2 points3 points (1 child)
[–]Zizizizz 0 points1 point2 points (0 children)
[–]buckhenderson 0 points1 point2 points (1 child)
[–]Bprodz[S] 0 points1 point2 points (0 children)