Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
352 B
3
Indexable
Never
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import poisson

support = np.arange(20)
lambda_values = [3.0, 5.0, 7.0]

for lambda_value in lambda_values:
    val = poisson.pmf(support, lambda_value)
    plt.plot(support, val, label=f'$\lambda={lambda_value}$')

plt.xticks(support)  # THIS IS THE NEW LINE
plt.legend()
plt.show()