ggplot2画箱线图将线改成虚线

ggplot2画箱线图默认情况下所有的线都是实线,如下
ggplot(HMP,aes(x=country,y=log10(rel_crAss)))+
geom_boxplot()

可以通过加参数
linetype
更改线的类型,比如改成虚线
ggplot(HMP,aes(x=country,y=log10(rel_crAss)))+
geom_boxplot(linetype="dashed")

但是现在遇到一个问题是所有的线都变成虚线了,我想要矩形的边框变成实线,那该如何实现呢?经过搜索找到了一个解决办法 链接是 https://stackoverflow.com/questions/53170465/how-to-make-a-base-r-style-boxplot-using-ggplot2
原来有一个函数
stat_boxplot()
可以只画箱线图的矩形,实现代码是
ggplot(HMP,aes(x=country,y=log10(rel_crAss)))+
stat_boxplot(aes(ymin=..lower..,ymax=..upper..))

直接把这个图形叠加到全是虚线边框的箱线图上就可以了
ggplot(HMP,aes(x=country,y=log10(rel_crAss)))+
geom_boxplot(linetype="dashed")+
stat_boxplot(aes(ymin=..lower..,ymax=..upper..))

添加最大值最小值的小横线
ggplot(HMP,aes(x=country,y=log10(rel_crAss)))+
geom_boxplot(linetype="dashed",color="blue")+
stat_boxplot(aes(ymin=..lower..,ymax=..upper..,