Add test for plot_events