save horizontal and vertical lines separately