Reputation: 631
I am reading from a large file that has data. I want to plot the PDF of the data but in Python.
This is the part of my code related to the question (I know it isn't helpful but I can't upload the files as they're huge).
ax_1 = pl.subplot(2,2,3)
y = norm.pdf(bins, Nat_Coronary_Mean, Nat_Coronary_std)
l = pl.plot(bins, y, 'r-', linewidth=2.5)
x_ticks_1 = np.arange(-13.*Nat_Coronary_std, 13.*Nat_Coronary_std, Nat_Coronary_std)
x_labels_1 = [r"${} \sigma$".format(i) for i in range(-13,10)]
ax_1.set_xticks(x_ticks_1)
ax_1.set_xticklabels(x_labels_1)
pl.title('Nat Cor Tau PDF: Mean '+str(Nat_Coronary_Mean)+' and sigma '+str(Nat_Coronary_std)+'',fontsize=11)
Does norm.pdf
mean that it is transforming the distribution into a gaussian one? Or is it normalizing the data? (I understand that the area under the PDF curve is equal to 1) I am just confused about why there is no "pdf" option alone and what the "norm
" is for.
Upvotes: 0
Views: 3866
Reputation: 38307
I want to check the overall histograms and pdf's before I make conclusions.
You can plot histograms using pyplot:
import matplotlib.pyplot as plt
plt.hist(data, bins=100)
plt.show()
Upvotes: 1
Reputation: 4578
After some back and forth, I will offer this as an answer to the original question. This is a list of the PDFs available in the latest scipy.stats. You will be able to generate a theoretical PDF with each of these.
Upvotes: 0