<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Looks like a bug under High Sierra.
<div class="">Repro</div>
<div class="">1. Close any open Quartz  graphics window</div>
<div class="">2. Running the example on the top of the cowplot page you linked.</div>
<div class=""><br class="">
</div>
<div class="">Obtained:  useMethod("depth") error when the second plot tries to render (no need to resize the window)
<div class="">
<div class=""><br class="">
</div>
<div class="">Running the code a second time (i.e., when an already open graphics window) there's no error.</div>
<div class=""><br class="">
<div class="">Repro  code:</div>
<div class="">
<div class="">theme_set(theme_cowplot(font_size=12)) # reduce default font size</div>
<div class="">plot.mpg <- ggplot(mpg, aes(x = cty, y = hwy, colour = factor(cyl))) +  geom_point(size=2.5)</div>
<div class="">plot.diamonds <- ggplot(diamonds, aes(clarity, fill = cut)) + geom_bar() +  theme(axis.text.x = element_text(angle=70, vjust=0.5))</div>
<div class="">plot_grid(plot.mpg, plot.diamonds, labels = c('A', 'B'))</div>
<div class=""><br class="">
</div>
<div class="">Error in UseMethod("depth") : </div>
<div class="">  no applicable method for 'depth' applied to an object of class "NULL"</div>
<div class=""><br class="">
</div>
<div><br class="">
</div>
<div>
<div>sessionInfo()</div>
<div>R version 3.4.1 (2017-06-30)</div>
<div>Platform: x86_64-apple-darwin15.6.0 (64-bit)</div>
<div>Running under: macOS High Sierra 10.13</div>
<div><br class="">
</div>
<div>Matrix products: default</div>
<div>BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib</div>
<div>LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib</div>
<div><br class="">
</div>
<div>locale:</div>
<div>[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8</div>
<div><br class="">
</div>
<div>attached base packages:</div>
<div>[1] stats     graphics  grDevices utils     datasets  methods   base     </div>
<div><br class="">
</div>
<div>other attached packages:</div>
<div>[1] cowplot_0.8.0   ggplot2_2.2.1   umx_1.8.0       OpenMx_2.7.16-8 devtools_1.13.3</div>
<div><br class="">
</div>
<div>loaded via a namespace (and not attached):</div>
<div> [1] Rook_1.1-1         purrr_0.2.3        splines_3.4.1      lattice_0.20-35    colorspace_1.3-2   htmltools_0.3.6    viridisLite_0.2.0  XML_3.98-1.9       rlang_0.1.2       </div>
<div>[10] nloptr_1.0.4       glue_1.1.1         withr_2.0.0        RColorBrewer_1.1-2 bindrcpp_0.2       bindr_0.1          plyr_1.8.4         stringr_1.2.0      munsell_0.4.3     </div>
<div>[19] gtable_0.2.0       visNetwork_2.0.1   htmlwidgets_0.9    memoise_1.1.0      labeling_0.3       DiagrammeR_0.9.2   parallel_3.4.1     visreg_2.4-1       Rcpp_0.12.12      </div>
<div>[28] xtable_1.8-2       readr_1.1.1        scales_0.4.1       jsonlite_1.5       rgexf_0.15.3       lme4_1.1-13        gridExtra_2.2.1    polycor_0.7-9      brew_1.0-6        </div>
<div>[37] hms_0.3            digest_0.6.12      stringi_1.1.5      dplyr_0.7.2        numDeriv_2016.8-1  grid_3.4.1         influenceR_0.1.0   tools_3.4.1        magrittr_1.5      </div>
<div>[46] lazyeval_0.2.0     tibble_1.3.4       tidyr_0.7.0        pkgconfig_2.0.1    MASS_7.3-47        Matrix_1.2-10      downloader_0.4     minqa_1.2.4        assertthat_0.2.0  </div>
<div>[55] rstudioapi_0.6     viridis_0.4.0      R6_2.2.2           sfsmisc_1.1-1      igraph_1.1.2       nlme_3.1-131       compiler_3.4.1    </div>
<div>> </div>
<div><br class="">
</div>
<blockquote type="cite" class="">
<div class="">On 29 Aug 2017, at 4:49 pm, Brandon Hurr <<a href="mailto:brandon.hurr@gmail.com" class="">brandon.hurr@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Tim, 
<div class=""><br class="">
</div>
<div class="">I've run the example code on the page below and resized the plots with no errors. </div>
<div class=""><br class="">
</div>
<div class=""><a href="https://cran.r-project.org/web/packages/cowplot/vignettes/plot_grid.html" class="">https://cran.r-project.org/web/packages/cowplot/vignettes/plot_grid.html</a><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">It may have something to do with running High Sierra, or the specific code/data you are using.</div>
<div class=""><br class="">
</div>
<div class="">Could you post a reproducible example?</div>
<div class=""><br class="">
</div>
<div class="">Brandon</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""><br class="">
</div>
</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Tue, Aug 29, 2017 at 8:26 AM, BATES Timothy <span dir="ltr" class="">
<<a href="mailto:tim.bates@ed.ac.uk" target="_blank" class="">tim.bates@ed.ac.uk</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Resized a plot window and got this error in the console<br class="">
<br class="">
Error in UseMethod("depth") :<br class="">
  no applicable method for 'depth' applied to an object of class "NULL"<br class="">
<br class="">
<br class="">
The plot was two ggplot2 graphs side by side, made using cowplot::plot_grid()<br class="">
<br class="">
Set up is<br class="">
R version: R version 3.4.1 (2017-06-30)<br class="">
Platform: x86_64-apple-darwin15.6.0<br class="">
MacOS: 10.13 Beta (17A352a)<br class="">
<br class="">
<br class="">
Is there a githuib or other page to log bugs in Mac R.app?<br class="">
<br class="">
best, tim<br class="">
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</body>
</html>