title: R code for plotting multiple line segments with unique R ranges
body: <p>I know there are many many questions on here around plotting multiple lines in a graph in R, but I've been struggling with a more specific task. I would like to add multiple line segments to a graph using only the intercept and slope specified for each line. abline() would work great for this, except each line has a specific range on the X axis, and I do not want the line plotted beyond the range.</p>
  <p>I managed to get the graph I want using plotrix, but I am hoping to publish the work, and the graph does not look up-to-par (very basic). I am somewhat familiar with ggpplot, and think that graphs generated in ggplot look much better than what I have made, especially with the various themes availible, but I cannot figure out how to do something similar using ggplot.</p>
  <p>Code:</p>
  <p>library(plotrix)</p>
  <p>plot(1, type=&quot;n&quot;, xlab=&quot;PM2.5(ug/m3)&quot;, ylab=&quot;LogRR Preeclampsia &quot;, xlim=c(0, 20), ylim=c(-1, 2.5))</p>
  <p>ablineclip(a = 0, b = 0.3, x1=1.2, x2=3)</p>
  <p>ablineclip(a = 0, b = 0.08, x1=8.0, x2=13.1)</p>
  <p>ablineclip(a = 0, b = 0.5, x1=10.1, x2=18.9)</p>
  <p>ablineclip(a = 0, b = 0.12, x1=2.6, x2=14.1)</p>
  <p>Any help would be appreciated!</p>
  <p>Thank you.</p>