Main plotting func