added functionality to toggle plots.