So basically, I was reading a paper about simulated disk stars and their relation with different parameters (I'm particulary interested in the abundance). In one of the plots, they showed the abundace of [Fe/H] vs # (counts), and gave the results of their data's parameters, which were Mean 0.04, Scatter 0.17, Skewness -1.55 and Kurtosis 6.62. I've been trying to recreate their plot using the following code, but I have not been able to deal with the Kurtosis parameter.
I tried using the following code:
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm, skewnorm
from scipy.stats import kurtosis
# Parameter value
mean = 0.04
scatter = 0.17
skewness = -1.55
kurtosis = 6.62
# Generating data to plot
x = np.linspace(mean - 4 * scatter, mean + 4 * scatter, 1000)
y = skewnorm.pdf(x, skewness, loc=mean, scale=mean)
# Plotting
plt.plot(x, y)
plt.xlabel('Values')
plt.ylabel('Probability density')
plt.title('Distribution')
#plt.legend()
plt.grid()
plt.show()
This code plots me a distribution where I can see how the skewness affects it, but I still haven't found a way to the same with the kurtosis. I'd like to do both in just one distribution. I searched for some info, but most of them just showed me how to calculate it from the data, but I want to plot a distribution already knowing the parameters.