Working version with option to download plot as .png