python-pil is used by the WeeWX image generator to create/manipulate the image file (ie create the image file, draw points, lines, labels etc). The logic for obtaining the data to be plotted, working out what goes where and what colours are used etc are all contained in various WeeWX .py files (imagegenerator.py, weeplot/genplot.py etc).
Gary
