Graph plotted when button clicked