I am curious if it is possible to put axis titles on each facet in a facet_wrap. I can get close but I can't get x and y to display properly. The code is currently displaying both x and y on the same axis. I know this isn't exactly how it is supposed to function, but I want to see if it can be done without going to something more complex (arranging separate plots with grob or something).
In short, I would like y_names and x_names to appear on their respective axes.
testdat<-data.frame(x_names=c("A","B","C"),x_vals=c(1,2,3),y_names=c("B","C","A"), y_vals=c(2,3,1))
ggplot(testdat, aes(x_vals, y_vals)) +
geom_point(pch=21) +
facet_wrap(y_names~x_names,
ncol=1,
scales="free",
strip.position="left",
labeller=as_labeller(c(A= "Apple",
B= "Bread",
C= "Cantaloupe"))
)+
theme( strip.background = element_blank(),
strip.placement = "outside",
axis.title.x=element_blank(),
axis.title.y=element_blank())

