first version of dotPlotPattern(), with a few optimization