title: Plot zoomed inset plot of a plot with square and lines
body: <p>I am trying to plot a zoomed inset plot with lines and box showing which part of the plot is zoomed.
  Is this possible in R?<br>
  <a href="https://stackoverflow.com/questions/35710402/creating-a-subplot-below-a-plot-with-an-inset-graph-in-python">This</a> is an example of what I would like to do done in Python.<br>
  Some sample code:</p>
  
  <pre><code>    p &lt;-
    qplot(1:10, 1:10)
  g &lt;-
    p +
    coord_cartesian(ylim = c(8, 10), xlim = c(8, 10)) +
    theme(axis.title.x = element_blank(),
          axis.title.y = element_blank())
  p +
    annotation_custom(
      grob = ggplotGrob(g),
      xmin = 7,
      xmax = 10,
      ymin = 1,
      ymax = 5
    )
  </code></pre>