This paper presents the first design principles that optimize the visualization of sets using linear diagrams. These principles are justified through empirical studies that evaluate the impact of graphical features on task performance. Linear diagrams represent sets using straight line segments, with line overlaps corresponding to set intersections. This work builds on recent empirical research which establishes that linear diagrams can be superior to prominent set visualization techniques, namely Euler and Venn diagrams. We address the problem of how to best visualize overlapping sets using linear diagrams. To solve the problem, we investigate which graphical features of linear diagrams significantly impact user task performance. To this end, we conducted seven crowd-sourced empirical studies involving a total of 1760 participants. These studies allowed us to identify the following design principles, which significantly aid task performance: use a minimal number of line segments, use guide-lines where overlaps start and end, and draw lines that are thin as opposed to thick bars. We also evaluated the following graphical properties which did not significantly impact task performance: colour, orientation, and set-order. The results are brought to life through a freely available software implementation that automatically draws linear diagrams with user-controlled graphical choices. An important consequence of our research is that users are now able to create effective visualizations of sets automatically, thus improving human-computer interaction.