return plot from patternPlot.R