fix bug when drawing dashed vertical lines
The problem was that the length of the dashed line was assumed as being the top coordinate. This is no longer the case once the median line is moved down.