added parameter for number of yticks