A plot showing out-of-pocket payments as a percent of total health spending for many countries over time. Countries are grouped using 2022 World Bank income classifications. Reliance on out-of-pocket payments for health care is falling, but many countries still face heavy burdens
Yesterday we announced the alpha release of #ggsql ๐ In celebration, here is a ggsql plot for #TidyTuesday Week 16 of 2026, using a dataset on global health spending! ๐ฐ
ggsql source: gist.github.com/georgestagg/...
6 hours ago
6
1
0
0
I've been working on this over the last few months and in my opinion it is just beyond cool. Grammar of graphics for SQL users!
1 day ago
58
15
1
0
ggsql: A grammar of graphics for SQL
Introducing ggsql, a grammar of graphics for SQL that lets you describe visualizations directly inside SQL queries.
I am excited beyond description to lift the veil on what we have been working on in 2026:
Please meet ggsql! A new extension of the SQL language for creating visualisations using the grammar of graphics. Read all about it in the blog post or visit the website at ggsql.org
1 day ago
355
81
12
9
Four complex equations shown in a grid, with their LaTeX representation shown above and the rendered expression below
Some of the test cases for the native LaTeX math expression parser and renderer I've been working on for textshaping which will soon bring native math equation rendering to #rstats and marquee
1 month ago
102
14
3
3
You're absolutely right! Let me make a few changes to the countertop so we can drop a pitcher of orange juice instead
1 month ago
1
0
0
0
Example
```
library(ggplot2)
data.frame(cat = LETTERS[1:5], x = rnorm(5), xend = rnorm(5)) |>
ggplot(aes(x, xend = xend, cat)) +
ggarrow::geom_arrow_segment(
arrow_head = NULL,
stroke_colour = "black", colour = "red",
linewidth = 10
) +
coord_radial(theta = "y")
```
1 month ago
2
0
2
0
You can use `ggarrow::geom_arrow_segment(arrow_head = NULL)`. It distinguishes `stroke_colour` for the outline and regular `colour` for the interior. This confusing parametrisation was brought to you 'wanna be like `geom_segment`' ๐
1 month ago
3
0
1
0
Advertisement
A screenshot of two reply messages on bluesky commenting on the same post. The reply on top is very negative about the data.table package, saying 'it was just the worst'. The bottom reply instead claims that data.table's syntax is the best thing produced in #rstats.
Never change #rstats, never change
1 month ago
54
3
0
0
I've been charmed recently by ggiraph. It feels well-integrated and mostly works with extensions even if doesn't wrap them in interactivity. ggplotly sort of 'translates' ggplot figures and some of the more niche settings or extensions don't have a natural translation.
1 month ago
1
0
1
0
PDF has a horrible habit messing up font stuff. I'm an SVG enthusiast myself and I use ggrastr when my plot has too many points.
1 month ago
0
0
1
0
A humble suggestion:
```
`%xtab%` <- function(x, y) {
table(x, y, dnn = list(
deparse(substitute(x)),
deparse(substitute(y))
))
}
```
1 month ago
5
0
0
0
How can you say this when theme_barbie() exists? (cc @matthewbjane.bsky.social)
1 month ago
10
1
1
0
'ignored positional aesthetics' are so handy and cool, wanted to share on bsky! (as seen on mastodon ๐) #rstats #ggplot2
2 months ago
15
1
0
0
Advertisement
ggplot2 styling
This post discusses one function in ggplot2: `theme()`. Find out about the glamour of graphics in this deep-dive article.
You can use this instead of your `update_geom_defaults()`:
```
theme(geom = element_geom(linewidth = 0.25, borderwidth = 0.25, pointsize = 0.5))
```
And you can use `set_theme()` to globally apply a theme as the default theme.
I wrote some additional tricks here: tidyverse.org/blog/2025/10...
2 months ago
3
1
0
0
ONE OF US, ONE OF US, ONE OF US โจgithub.com/ggplot2-extenders/ggplot... โจ
2 months ago
2
0
0
0
Look the use of the word 'extension' was very deliberate to absolve ggplot2 from having to absorb more functionality than it already does ๐
2 months ago
3
0
1
0
I like this use case for a facet extension!
2 months ago
0
0
1
0
I think this may come from Afrikaans/Dutch and means 'red forest', so bois (woods) wasn't too far of ๐คท
2 months ago
1
0
0
0
dplyr 1.2.0
dplyr 1.2.0 fills in some important gaps in dplyr's API: we've added a new complement to `filter()` focused on dropping rows, and we've expanded the `case_when()` family with three new recoding and re...
dplyr 1.2.0 is out now and we are SO excited!
- `filter_out()` for dropping rows
- `recode_values()`, `replace_values()`, and `replace_when()` that join `case_when()` as a complete family of recoding/replacing tools
These are huge quality of life wins for #rstats!
tidyverse.org/blog/2026/02...
2 months ago
465
133
12
12
# pretty slick
l <- c(mpg = "Miles per gallon", wt = "Weight (1,000 lbs)", `mpg/2` = "yes this works")
ggplot(mtcars, aes(mpg, wt)) + labs(dictionary = l)
ggplot(mtcars, aes(wt, mpg)) + labs(dictionary = l)
ggplot(mtcars, aes(wt, mpg/2)) + labs(dictionary = l)
2 months ago
38
6
2
1
This is a very good primer on why we encounter breaking changes whenever ggplot2 has a meaningful update ๐
2 months ago
11
0
1
0
A second crime is not putting these on the y-axis and displaying the names horizontally.
2 months ago
0
0
1
0
Advertisement
It is a (relatively) new thing ๐
3 months ago
1
0
1
0
You can specify relative position in ggplot with I(x) I(y).
E.g. annotate("text", x = I(.5), y = I(.5), label = "hello!") will place the text in the middle of the plot.
This, combined with alignment arguments is like 87% of the magic for me.
3 months ago
111
30
3
5
They're alright if you have mutually inclusive categories, mostly as an alternative for large venn-diagram like data. Here, KO/WT are mutually exclusive and 8h/24h/48h are mutually exclusive. I'd opt for other ways of emphasising the experimental conditions.
3 months ago
1
0
0
0
Where'd be the artistry in deftly replacing `theme_gray()` with something more sensible? You gotta give the people some sense of accomplishment for free.
3 months ago
1
0
0
0
lukewarm take, but plotly is uggy and ggplotly should generally be avoided for disrespecting your static ggplot2 formatting (use ggiraph instead)
3 months ago
9
2
2
0
If there is a fear that some undocumented behaviour you rely on may break on accident, one thing you could do is PR a unit test for the behaviour. At least then, it'll only be broken purposefully ๐
4 months ago
2
0
1
0