updated plotPurchasequantityVSFrequency()