title: Plot the ranges of values in R
body: <p>I am interested in plotting the range of values of variables so that the names appear on the Y-axis and the range on the X-axis, for a better visualization.</p>
  
  <p>I have used the following code:</p>
  
  <pre><code>primer_matrix1a &lt;- matrix(
    c(
      "EF1", 65, 217,
      "EF6",  165, 197,
      "EF14", 96, 138,
      "EF15", 103, 159,
      "EF20", 86, 118,
      "G9", 115, 173,
      "G25", 112, 140,
      "BE22", 131, 135,
      "TT20", 180, 190
    )
    ,nrow=9,ncol=3,byrow = T)
  
  # Format data
  Primer_name &lt;- primer_matrix1a[,1]
  Primer_name &lt;- matrix(c(Primer_name),nrow = 9,byrow = T)
  Primer_values&lt;- matrix(c(as.numeric(primer_matrix1a[ ,2-3])),nrow = 9,ncol = 2,byrow = T)
  Primer_Frame &lt;- data.frame(Primer_name,Primer_values)
  colnames(Primer_Frame) &lt;- c("Primer","min","max")
  Primer_Frame$mean&lt;- mean(c(Primer_Frame$min,Primer_Frame$max))
  
  
  ggplot(Primer_Frame, aes(x=Primer))+
    geom_linerange(aes(ymin=min,ymax=max),linetype=2,color="blue")+
    geom_point(aes(y=min),size=3,color="red")+
    geom_point(aes(y=max),size=3,color="red")+
    theme_bw()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/OnVKW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OnVKW.png" alt="enter image description here"></a></p>
  
  <p>but the plot is weird, EF15 goes from 103, 159, while G9 goes from 115 to 173, and they do not overlap, so I am doing something wrong.</p>