Implemented average plot and make it accessible from other packages.