title: How to mark the y-values of data points in a given ggplot object?
body: <p>I'm trying to annotate the y-values of data points in a <em><strong>given</strong></em> ggplot object, after the fact.</p>
  <p>To have a reproducible example, I'll create a model on <code>mtcars</code> data, using <code>lm()</code>, and plot using <code>sjPlot::plot_model()</code>.</p>
  <pre class="lang-r prettyprint-override"><code>library(magrittr)
  library(sjPlot)
  
  given_p_object &lt;- 
    mtcars %&gt;% 
    lm(mpg ~ as.factor(gear), data = .) %&gt;% 
    sjPlot::plot_model(., type = &quot;pred&quot;)
  </code></pre>
  <hr />
  <p>So my question starts here: say that I'm given the object <code>given_p_object</code>. I execute it and get the plot:</p>
  <pre class="lang-r prettyprint-override"><code>&gt; given_p_object
  </code></pre>
  <p><a href="https://i.stack.imgur.com/PdX3R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PdX3R.png" alt="given_plot" /></a></p>
  <p>Is it possible to mark the y-values for each point on the plot, <strong>without</strong> referring back to the original data and the process that led to the plot (thus ignoring <code>mtcars %&gt;% lm() %&gt;% sjPlot::plot_model()</code>)? In other words, how can I extract from within the current <code>given_p_object</code> the information needed to do the following?
  <a href="https://i.stack.imgur.com/x4nhY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x4nhY.png" alt="demo" /></a></p>