First version of the plotting code