Have I mentioned that I love slope plots? Here's one from the NYT


Hey folks!

This week I have a figure for you from the New York Times based on a poll they did with Siena that describes Americans’ sentiments concerning Israel’s actions in their war with Gaza.

What does it say to me? This plot is saying that more Americans think that Israel is intentionally killing civilians than they did in December 2023. The change in percentage of people in the other categories seems to decrease accordingly. What do you like? I love slope plots! I think they’re a great strategy for showing the change in a variable between two time points. As always, I am a fan of the NY Times minimalist aesthetic to plots. What don’t you like? Although the war has been in the news for several years now, I’m not sure that Americans - in general - have a very good sense of what’s going on or how Israel is waging the war. This somewhat comes through in the percentage that don’t have an opinion. For December 2023 the three categories only add to 72% and for September 2025 they add to 81%. I feel like that’s a big pool of people with no opinion. How would I make this in R? Good question! Several things stand out to me.

First, the slope plot itself. There are lines and points at the end of the lines. I imagine having a data frame with three columns - date, sentiment, and percentage. I’d map the date to the x-axis and the percentage to the y-axis. Then I’d group and color the lines by the sentiment. We can draw the lines with geom_line() and add the points with geom_point(). For the x-axis, I don’t think I’d make the date an actual date variable type. The date type has some nice features when there are many dates, but it does add some cognitive overhead. Here, I think I’d use the date as a categorical variable since there are only two dates.

Second, the points and lines are labelled. The plot includes the percentage of respondents with each of the three sentiments at each date. The text label uses a bold font for “Intentionally” and “Unintentionally” and a regular font for the third category. I actually forget if I can vectorize the fontface argument to geom_text(). If I can’t, I’d likely use geom_richtext(). I’d probably prefer geom_text() since I can use it with annotate() and I can’t use geom_richtext() with annotate(). Using annotate() would be a simple way to add the three sentiments to the plot. Regardless of the geom I end up using, I notice that those labels are off in the right margin of the plot. To achieve this and have the y-axis only cover the two categories, I’d use clip = "off" and expand = FALSE as arguments in coord_cartesian(). Also, I’d likely use geom_text() to add the percentages to the points with some customized y-axis positions to get their placement correct. The 2023 values are left justified and the 2025 values are right justified.

Third, I already mentioned the x-axis line. I’ll need to figure out how to get the x-axis text to not be centered under the tick. Again, I’m not sure if I can vectorize the hjust parameter to element_text() but that would be the first thing I’d try. Alternatively, I’d leave the ticks and remove the text using the theme() function but add the text to the correct position again using annotate(). Of course, they’ve also removed the y-axis line, text, and ticks and neither axis has a title.

Finally, they have some fun stuff going on with their titles and captions! I count three bits of text above the plot. Within labs(), I’d likely use tag = for the name of the poll, title = for the line with the dates, and subtitle = for the question. That looks like it will involve some fun formatting. At the bottom is the first time I’ve seen a right justified caption. That’s the default {ggplot2} setting, but I always seem to make it left justified. It’s great to see one of these out in the wild :)

What do you think about this plot? I’d love to get your insights. It’s likely you have an idea that is better than mine or at least having a try at. Stay tuned for a future YouTube video when I try to implement this figure.

Workshops

I'm pleased to be able to offer you one of three recent workshops! With each you'll get access to 18 hours of video content, my code, and other materials. Click the buttons below to learn more

In case you missed it…

Here is a livestream that I published this week that relate to previous content from these newsletters. Enjoy!

video preview

Finally, if you would like to support the Riffomonas project financially, please consider becoming a patron through Patreon! There are multiple tiers and fun gifts for each. By no means do I expect people to become patrons, but if you need to be asked, there you go :)

I’ll talk to you more next week!

Pat

Riffomonas Professional Development

Read more from Riffomonas Professional Development

Hey folks, I’ve really enjoyed the flow of combining these newsletters with a Monday critique video, a Wednesday recreation video, and occasionally a Friday remake video. A few weeks in, I feel pretty good about our ability to engage in constructive critiques. Of course, we have to train ourselves (myself included) to use those tools and not just resort to immediate and emotional responses - “I hate that plot”. We need to engage, get in the head of the original creator, and try to understand...

Hey folks! I’m appreciating the positive feedback on Monday critique videos. They’re a lot of fun to think through and make. I think I might start looking at figures that are drawn from the scientific literature since many of you found out about me from my science work. Let me know if there are plots or practices that you’d like to see me talk about. I’ll see if I can work them into the queue. Also, if you’re working on developing figures for a presentation, poster, or paper and would like to...

Hey folks! I continue to get positive feedback about my critique videos. This has me quite excited that I’ve perhaps scratched an itch that people have been struggling with. Would you like to meet with a group of other people who are committed to making their data visualizations better? I’m forming groups now that would meet once a week or every other week to give each other constructive feedback on the visualizations they are making for their work. Alternatively, if you have ever thought, “I...