Here's one solution:
import numpy as np
import matplotlib.pyplot as plt
k1, k2 = 300., 100. # s-1
A0 = 2. # mol.dm-3
# the time axis, in ms
t = np.linspace(0., 20., 1000)
A = A0 * np.exp(-(k1+k2)*t/1000.)
B = (k1/(k1+k2)) * (A0 - A)
C = (k2/(k1+k2)) * (A0 - A)
plt.rc('text', usetex=True)
plt.plot(t, A, label = '[A]')
plt.plot(t, B, label = '[B]')
plt.plot(t, C, label = '[C]')
plt.xlabel('time /ms', fontsize=16.)
plt.ylabel('$\mathrm{concentration}\;/\mathrm{mol\,dm^{-3}}$', fontsize=16.)
plt.title('Reaction rate plot')
plt.legend()
plt.show()
In the above program, we define the time axis as a linspace
object. The lifetime (the time taken for [A] to fall by a factor of $\mathrm{e}$) of the reactant, A, is $1/(k_1+k_2) = 2.5\;\mathrm{ms}$, so the reaction is certainly "over'' by $t = 20\;\mathrm{ms}$. The concentrations of A, B and C can be calculated using NumPy's vectorized methods, and plotted with a legend as described in the text. Finally, the plot is given axis labels and a title.