Adding plot generation, still need to test.