refactor Plotting