improve random line plotting