Horizontal bar charts are a regular part of my work with graphs in R. Nevertheless, I have to look up the details regularly, so here is another example.
The graph visualizes the disproportionality of the results in the recent UK election 2024.
It uses forcats to order categories, here the parties, by another value in the dataset, here the vote share.
The color codes of the parties are based on the BBC election page. I just used inspect on the internet browser to find the respective color code used on the page.
Finding the details for the parameters to customize the legend and the axes in ggplot took some time. GitHub Copilot, my new AI pair programmer, was very helpful. In fact, I use it a lot now to get examples for the use of various tidyverse functions, that I used to look up regularly.