Separated the statplot function