I just discovered there is no R parallel dotplot function on CRAN but the plots are usually hand-crafted. Duh.
Here is a nice one in ggplot2 from Andrew Gelman's blog Statistical Modeling, Causal Inference, and Social Science
It might be a bit more effort to implement but seems to offer a lot of flexibility and looks like it can handle the bore depth issue.
Blast it, reprex is hanging my system so I am going to have to just paste the code.
library(ggplot2)
library(patchwork)
mtcars$car_name <- rownames(mtcars) # create new column for car names
arrange data set in order of mpg
mtcars$car_name <- factor(mtcars$car_name, levels = mtcars$car_name[order(mtcars$mpg)])
mtcars$car_name
p1 <- ggplot(mtcars, aes(x=car_name, y=mpg)) +
geom_point(stat='identity', fill="black", size=2) +
scale_y_continuous(position = "right") +
theme(plot.margin = unit(c(0.2,0,0.2,0), "cm"),
axis.line.y = element_line("black", size= 1),
axis.line.x = element_line("black", size= 1)) +
labs(title="Car mpg") +
coord_flip()
p2 <- ggplot(mtcars, aes(x=car_name, y=hp)) +
geom_point(stat='identity', fill="black", size=2) +
scale_y_continuous(position = "right") +
theme(axis.text.y = element_blank(),
axis.ticks.y = element_blank(),
axis.title.y = element_blank(),
axis.line.y = element_line("black", size= 1),
axis.line.x = element_line("black", size= 1),
plot.margin = unit(c(0.2,0,0.2,0), "cm")) +
labs(title="Car hp") +
coord_flip()
p3 <- ggplot(mtcars, aes(x=car_name, y=wt)) +
geom_point(stat='identity', fill="black", size=2) +
scale_y_continuous(position = "right") +
theme(axis.text.y = element_blank(),
axis.ticks.y = element_blank(),
axis.title.y = element_blank(),
axis.line.y = element_line("black", size= 1),
axis.line.x = element_line("black", size= 1),
plot.margin = unit(c(0.2,0,0.2,0), "cm")) +
labs(title="Car weight") +
coord_flip()
p1 + p2 + p3