plt xlabel ' plt ylabel ' plt grid ( np pi - show see also figure make sure to select proper python environment see figure ( visual studio supports multiple python environments in this example we use the matplotlib package for plottingso we need to have that package installed on the computer you can install the matplotlib package in different python environments have installed the matplotlib package as part of the anaconda distribution setupso select "anaconda xin the python environments window if you haven' installed the matplotlib package yet (either as part of anaconda or manually using pip)you can also easily install python packages from visual studio see figure you can also easily see which python packages that are installed for the different python environments see figure