Fixed the legend issue

Had to print to "png" before print the plot to the screen.