added function to draw a patterned line on y axis