how to add x and y labels in matplotlib code example Example: add x axis label python plt.xlabel("X axis label")