jacob-long / jtools

Tools for summarizing/visualizing regressions and other helpful stuff
https://jtools.jacob-long.com
GNU General Public License v3.0
165 stars 22 forks source link

apa_theme top border missing with facet_wrap #152

Closed victorhartman closed 3 months ago

victorhartman commented 6 months ago

The top border is missing when using facet_wrap in combination with theme_apa. Facet_grid works as expected

library(ggplot2)

p <- ggplot(mpg, aes(displ, hwy)) + geom_point()

p + facet_wrap(vars(class)) + 
  jtools::theme_apa()
jacob-long commented 4 months ago

Hi @victorhartman, thanks for the report! I'm not totally clear on what's missing. Just for reference, here's the output I'm currently getting:

image

And when I check out your pull request and re-run the code, I'm getting what I think is an identical output:

image

I wonder if maybe there's a ggplot2 version issue or something?

victorhartman commented 4 months ago

Hi, thanks for looking into to this. I should have attached an image beforehand, but here it is. Here the top border is missing.

Rplot

and here with my proposed change:

Rplot01

sessioninfo:

R version 4.4.0 (2024-04-24 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows 10 x64 (build 19045)

jtools_2.2.2 ggplot2_3.5.1