how to install import matplotlib.pyplot as plt code example Example: python pip install matplotlib pip install matplotlib