plotting lines well, need to modify assumptions about finding endpoints of lines