import pyfar as pf
import matplotlib.pyplot as plt
import numpy as np
plot_frequencies = np.logspace(1, 4.5, 100, base=10)
weights_A = pf.constants.frequency_weighting_curve(
    "A", plot_frequencies)
weights_C = pf.constants.frequency_weighting_curve(
    "C", plot_frequencies)
plt.plot(plot_frequencies, weights_A, label="A weighting")
plt.plot(plot_frequencies, weights_C, label="C weighting")
plt.semilogx()
plt.xlabel("f in Hz")
plt.ylabel("Weights in dB")
ticks = [10, 30, 100, 300, 1000, 3000, 10000, 30000]
plt.xticks(ticks, ticks)
plt.grid()
plt.legend()
