title: Is there a way to put limits on confidence intervals if you know your data cant go over or below a certain point
body: <p>I am making dose-response curves and using the predict function to create values and confidence values with an example of the code below.</p>
  <pre><code>Davies_A.hya_preddata = data.frame(temp = seq(28,42, length.out = 100))
  Davies_A.hya_pred = as.data.frame(predict(Davies_A.hya_pop, newdata = Davies_A.hya_preddata, interval = 'confidence'))
  Davies_A.hya_preddata = data.frame(Davies_A.hya_preddata, fvfm = Davies_A.hya_pred$Prediction, Lower = Davies_A.hya_pred$Lower, Upper = Davies_A.hya_pred$Upper)
  </code></pre>
  <p>when I plot the data with I (code below), get a graph like</p>
  <pre><code>P.lob_sites_plot&lt;- ggplot() +
    geom_jitter(data = P.lob_data, aes(x = Temp, y = PAM, color = Site_Species), size = 1, width = 0.25) +
    scale_x_continuous(limits=c(27,39), breaks=c(28,30,32,34,36,38)) +
    scale_y_continuous(limits=c(-0.05, 0.8), breaks=c(0, 0.2, 0.4, 0.6, 0.8, 1)) +
    
    
    geom_line(data = NthDirection_P.lob_preddata, aes(x = temp, y = fvfm), color = 'seagreen4', show.legend = FALSE) +
    geom_ribbon(data = NthDirection_P.lob_preddata, aes(x = temp, ymin=Lower, ymax=Upper), color = 'seagreen4', linetype=2, alpha = 0.2) +
    geom_vline(data = Coeff_means, aes(xintercept = NthDirection_P.lob_coeff_mean), color = 'seagreen4', show.legend = FALSE) +
    annotate(&quot;rect&quot;, xmin=Coeff_lowers$NthDirection_P.lob_coeff_lower, xmax=Coeff_uppers$NthDirection_P.lob_coeff_upper, ymin=-Inf, ymax=Inf, fill= 'seagreen4',  alpha = 0.1) +
    geom_text(data = Coeff_means, aes(label=round(NthDirection_P.lob_coeff_mean, digits = 2)), x = 31, y = 0.35, show.legend = FALSE, color = 'seagreen4') +
    
    geom_line(data = Moore_P.lob_preddata, aes(x = temp, y = fvfm), color = '#B31E6F', show.legend = FALSE) +
    geom_ribbon(data = Moore_P.lob_preddata, aes(x = temp, ymin=Lower, ymax=Upper), color = '#B31E6F', linetype=2, alpha = 0.2) +
    geom_vline(data = Coeff_means, aes(xintercept = Moore_P.lob_coeff_mean), color = '#B31E6F', show.legend = FALSE) +
    annotate(&quot;rect&quot;, xmin=Coeff_lowers$Moore_P.lob_coeff_lower, xmax=Coeff_uppers$Moore_P.lob_coeff_upper, ymin=-Inf, ymax=Inf, fill= '#B31E6F',  alpha = 0.1) +
    geom_text(data = Coeff_means, aes(label=round(Moore_P.lob_coeff_mean, digits = 2)), x = 31, y = 0.30, show.legend = FALSE, color = '#B31E6F') +
    
    geom_line(data = Davies_P.lob_preddata, aes(x = temp, y = fvfm), color = 'royalblue4', show.legend = FALSE) +
    geom_ribbon(data = Davies_P.lob_preddata, aes(x = temp, ymin=Lower, ymax=Upper), color = 'royalblue4', linetype=2, alpha = 0.2) +
    geom_vline(data = Coeff_means, aes(xintercept = Davies_P.lob_coeff_mean), color = 'royalblue4', show.legend = FALSE) +
    annotate(&quot;rect&quot;, xmin=Coeff_lowers$Davies_P.lob_coeff_lower, xmax=Coeff_uppers$Davies_P.lob_coeff_upper, ymin=-Inf, ymax=Inf, fill= 'royalblue4',  alpha = 0.1) +
    geom_text(data = Coeff_means, aes(label=round(Davies_P.lob_coeff_mean, digits = 2)), x = 31, y = 0.25, show.legend = FALSE, color = 'royalblue4') +
    
    geom_line(data = LadyMusgrave_P.lob_preddata, aes(x = temp, y = fvfm), color = 'darkorange4', show.legend = FALSE) +
    geom_ribbon(data = LadyMusgrave_P.lob_preddata, aes(x = temp, ymin=Lower, ymax=Upper), color = 'darkorange4', linetype=2, alpha = 0.2) +
    geom_vline(data = Coeff_means, aes(xintercept = LadyMusgrave_P.lob_coeff_mean), color = 'darkorange4', show.legend = FALSE) +
    annotate(&quot;rect&quot;, xmin=Coeff_lowers$LadyMusgrave_P.lob_coeff_lower, xmax=Coeff_uppers$LadyMusgrave_P.lob_coeff_upper, ymin=-Inf, ymax=Inf, fill= 'darkorange4',  alpha = 0.1) +
    geom_text(data = Coeff_means, aes(label=round(LadyMusgrave_P.lob_coeff_mean, digits = 2)), x = 31, y = 0.20, show.legend = FALSE, color = 'darkorange4') +
    
    ggtitle(&quot;P.lob only&quot;) +
    scale_color_manual(values=c('seagreen4','#B31E6F','royalblue4','darkorange4')) +
    ylab(&quot;Fv/Fm&quot;) +
    xlab(&quot;Temperature (°C)&quot;) +
    theme_bw()
  P.lob_sites_plot
  </code></pre>
  <p><a href="https://i.stack.imgur.com/prrcM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/prrcM.png" alt="enter image description here" /></a></p>
  <p>For some, the CI is large, making the ribbons take up a large area. I was wondering if there was a way to set limits on the CI as the values will not increase above what the model is at the beginning, or it can not fall below 0. Is it possible to set limits on it if you know your data cant go above or below a certain value? this would make the figure look a lot better, and I would not have to zoom out of the data as much</p>