finished R function for ploting histogram for varying wsize wstride