[MINOR] Added a method to save the entire figure to an image file. The already existing 'writeScreenshot' method only saves that part of the figure which is visible on screen.