I have the following dummy data and plots:
library(ggplot2)
library(patchwork)
test_data <- data.frame(sample = c("sample1_long_label","sample2","sam3","sample4_long_labels_are_annoying"),
var1 = c(20,24,19,21),
var2 = c(4000, 3890, 4020, 3760))
p1 <- ggplot(test_data, aes(var1, sample)) +
geom_col() +
scale_x_reverse() +
theme(axis.text.y = element_blank(),
axis.ticks.y = element_blank(),
axis.title.y = element_blank())
p2 <- ggplot(test_data, aes(var2, sample)) +
geom_col() +
theme(axis.title.y = element_blank(),
axis.ticks.y = element_blank())
p1 + p2
This creates a plot that looks like this:

Now, the y-axis labels are right-aligned to the right plot (they have been removed in the left plot). I would like the y-axis labels to be center-aligned between the two plots. Is this possible? If not, any other method that will create a similar plot is welcome.
Edit: I forgot to mention that the labels may be of different lengths, and have adjusted the test data. Is it possible to make the whole label visible in the center while center-adjusting the text?

