Teun van den Brand
@teunbrand.bsky.social
930 followers 90 following 130 posts
GitHub: https://github.com/teunbrand
Posts Media Videos Starter Packs
Pinned
teunbrand.bsky.social
Hi to all the #rstats friends that just followed me! I'm dipping my toes into blogging for the first time, so I've made an introductory post if you want to get to know me:
teunbrand.github.io/teunbrand_bl...
Hello world – Blog | Teun van den Brand
Wherein I introduce myself
teunbrand.github.io
teunbrand.bsky.social
`ggsave(bg)` is doing the exact same thing. The difference you might see is that themes now adhere to the `ink`/`paper` settings. This also populates the `plot.background` setting, which wasn't always the case before.
teunbrand.bsky.social
It sets the device's background colour. If you have a non-transparent `plot.background` setting, it will show on top of the device's background colour.
Reposted by Teun van den Brand
alexkraieski.bsky.social
So far I really like ggplot2 4.0.0 a lot, but the color blending with ink/paper means you can end up with too little contrast in your axis text.

Luckily, you can easily detect this with {colorspace} to prevent accessibility issues. see blog for more info

kraieski.dev/ggplot2-40-i...

#Rstats
ggplot2 4.0 Ink and Paper: Don’t Forget about Axis Text Contrast — Alex Kraieski
ggplot2 4.0.0 has introduced some very useful improvements to themes, but there's at least one color blending and accessibility pitfall you'll want to avoid.
kraieski.dev
Reposted by Teun van den Brand
ginareynolds.bsky.social
📊💿🧡🎉 Exciting news!!

'Release party' tomorrow Friday Oct 3rd at 3pm Eastern for #ggplot2 v4.0.0!

With developer and maintainer @teunbrand! bit.ly/join-gg-exte...
teunbrand.bsky.social
Take your plots from drab to fab! #ggplot2
thomasp85.com
🎨 Theming got a huge overhaul with the latest #ggplot2 release. In honour of that @teunbrand.bsky.social has written a comprehensive deep-dive into styling your plots, covering both old and new functionality. Grab a coffee and dive in!

#rstats
ggplot2 styling
This post discusses one function in ggplot2: `theme()`. Find out about the glamour of graphics in this deep-dive article.
www.tidyverse.org
Reposted by Teun van den Brand
posit.co
The new ggplot2 4.0.0 is here! 🎉

This major update includes a foundational rewrite of S7 and user benefits such as smarter labeling and a revamped theming system.

Check the details: www.tidyverse.org/blog/2025/09...

BONUS: Join the release party on Oct 3, 3pm ET. bit.ly/join-gg-extenders

#RStats
ggplot2 hex with tada emoji. Text: Join the v4.0.0 release party with Teun van den Brand and the ggplot2 extenders, Oct 3 at 3pm Et, bit.ly/join-gg-extenders
teunbrand.bsky.social
ALL HAIL THE HORIZONTAL BARPLOT 🫡
teunbrand.bsky.social
I'm updating the ggarrow logo. Left is new, right is old. I like that the new one is chaotic, but also recognisable as ggplot2-related due to the background grid and default colour palette. The familiarity counters the chaos.

#rstats #ggplot2
Shows 6 arrows with different hues spiralling outward from the middle of a hexagon. The background is a ggplot2 grid. In the foreground, 'ggarrow' is written horizontally and the 'A' coincides with the arrow head of a 7th arrow. A yellow hexagon with 3 black arrows pointing upwards reaching different heights. The text 'ggarrow' is placed horizontally, such that the 'A' consides with one of the arrow heads.
teunbrand.bsky.social
So sensible! My soul is soothed again 😌
teunbrand.bsky.social
Contribution is contribution!
Reposted by Teun van den Brand
jbarg.bsky.social
Just saw my profile among the list of contributors to ggplot2 4.0.0 - that is a project I want to be affiliated with for sure. Pretty sure it's just for a ticket I opened. It was resolved within a record two days or something, too. The beauty of a well-running free and open-source software project.
ggplot2 4.0.0
A new major version of ggplot2 has been released on CRAN. Find out what is new here.
www.tidyverse.org
teunbrand.bsky.social
The folder 1-up in the hierarchy where my projects/repos live, is littered with half-titled .R files. They contain random snippets of code I found useful but wasn't willing to commit to git yet. I'm sure all of this can be contained in `git stash`, but where'd all the chaos go?
Reposted by Teun van den Brand
flolecorvaisier.bsky.social
Months ago, I reported an issue in ggplot2 (github.com/tidyverse/gg...). Glad to know that this issue was corrected in v4.0.0, and what a nice surpise to see my name in the acknowledgements of this new version!
www.tidyverse.org/blog/2025/09...
teunbrand.bsky.social
Probably related to ggplot2's S7 updates, which means it is more strict about types in `element_text(family)`. However, you can also swap the `ink` and `paper` setting in ggplot2's themes to make a dark theme now.
Reposted by Teun van den Brand
jbengler.de
The new ggplot2 4.0.0 now supports absolute plot dimensions 🤩

#rstats #dataviz #phd
library(tidyverse)

mtcars |> 
  head(8) |> 
  rownames_to_column("name") |> 
  ggplot(aes(x = drat, y = name, fill = name)) + 
  geom_col() +
  theme(panel.widths = unit(50, "mm"), panel.heights = unit(50, "mm"))
Reposted by Teun van den Brand
mrcaseb.com
Happy to announce that my R package {ggpath} v 1.1.0 just hit CRAN. It fully supports ggplot2 v4.
mrcaseb.github.io/ggpath/index...
Reposted by Teun van den Brand
gnoblet.bsky.social
And I used #ggplot2 new v4.0.0 btw, to produce the below graph with the splendid new palette.fill.discrete argument in `theme()`.

@posit.co #tidverse #rstats #dataviz
Reposted by Teun van den Brand
mattansb.msbstats.info
New blog post!

Ever wonder what geom_histogram is actually doing? How about geom_boxplot?

In celebration of the release of #ggplot2 4.0.0 (ggplot8?), I explore the relationships between the “geoms” and “stats” offered by the core {ggplot2} functions.

#rstats
Exploring {ggplot2}’s Geoms and Stats – Stat’s What It’s All About
blog.msbstats.info
teunbrand.bsky.social
Adapted ggarrow to the new ggplot2 theme features!

```r
library(ggplot2)

ggplot(ggarrow::whirlpool(5), aes(x, y, group = group)) +
ggarrow::geom_arrow() +
theme_minimal(ink = "purple")
```
#ggplot2 #rstats
An x/y plot with arrows spiraling outwards from the center. Everything is a shade of purple or white.
teunbrand.bsky.social
Huh I didn't know these quantile settings were vectorised, but it is good to know!
teunbrand.bsky.social
Though if you do find bugs, I hope people report them! (but do that in a few days once the newness wears off and it no longer embarasses me)
teunbrand.bsky.social
Thank you for the praise! I hope y'all enjoy the new features and hopefully will not discover a whole new set of bugs :D
Reposted by Teun van den Brand
grrrck.xyz
ggplot2 4.0.0 is out and the new `paper`, `ink`, `accent` theme variables look super cool! Just pick 2-3 colors 🎨 to make your plots look great! I'm excited to hook this up to brand.yml 😉
A ggplot2 plot showing a classic `mpg` scatter plot. The code uses `theme_gray()` with `paper = "cornstalk"` for a light yellow background, `ink = "navy"` for navy blue text and points, and `accent = "tomato"` which is applied to the smoothing line created with `geom_smooth()`