matplotlib set x and y label in one line code example Example: add x axis label python plt.xlabel("X axis label")