keep selected lines in x axis and label at particular segment in Y using ggplot2 in R
Here is my plot


    dat <- data.frame(
      pos = c(1, 3, 5, 8, 10, 12),
      start = c(1,3, 6, 7, 10, 11),
      end = c(5, 6, 9, 9, 13, 12)
    )
    
    library(ggplot2)
    p <- ggplot(dat) + geom_segment(aes(x=start, y=pos, xend=end, yend=pos), color="blue", size=2) + ylab("Fragments)") +  xlab("Position")
        scale_y_reverse() + theme_bw()
    
    p1 <- p + opts(legend.position="left",
            panel.background=theme_blank(),panel.border=theme_blank(),panel.grid.major=theme_blank(),
            panel.grid.minor=theme_blank(),plot.background=theme_blank())
            
            
    p1

![enter image description here][1]

Bitmapped desired version is, with axis line and labels near the segments. [ just exta-note: Note that bitmap changed the line to round ended (it would be interesting to see if we can do in the ggplot2)] 

![enter image description here][2]


  [1]: http://i.stack.imgur.com/hd6Hm.jpg
  [2]: http://i.stack.imgur.com/PeOU1.jpg
keep selected lines in x axis and label at particular segment in Y using ggplot2 in R
===

Here is my plot


    dat <- data.frame(
      pos = c(1, 3, 5, 8, 10, 12),
      start = c(1,3, 6, 7, 10, 11),
      end = c(5, 6, 9, 9, 13, 12)
    )
    
    library(ggplot2)
    p <- ggplot(dat) + geom_segment(aes(x=start, y=pos, xend=end, yend=pos), color="blue", size=2) + ylab("Fragments)") +  xlab("Position")
        scale_y_reverse() + theme_bw()
    
    p1 <- p + opts(legend.position="left",
            panel.background=theme_blank(),panel.border=theme_blank(),panel.grid.major=theme_blank(),
            panel.grid.minor=theme_blank(),plot.background=theme_blank())
            
            
    p1

![enter image description here][1]

Bitmapped desired version is, with axis line and labels near the segments. [ just exta-note: Note that bitmap changed the line to round ended (it would be interesting to see if we can do in the ggplot2)] 

![enter image description here][2]


  [1]: http://i.stack.imgur.com/hd6Hm.jpg
  [2]: http://i.stack.imgur.com/PeOU1.jpg