Untitled
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 line sets the x-axis ticks to the values in the support array. plt.legend() plt.show()