generate results and plot