pophelper
pophelper copied to clipboard
showsp= FALSE does not turn off the strip panel
Hi,
I'm trying to turn off the strip panel of one of my plots. Unless I'm getting something wrong, according to the manual this is done with showsp= FALSE
. But this doesn't seem to work. Below an reproducible example, but the same happens with my own data:
# use ADMIXTURE files (do not use this command to read local files)
afiles<- list.files(path=system.file("files/admixture",package="pophelper"), full.names=T)
alist <- readQ(files=afiles)
# plot
p3<-plotQ(alist[1],
returnplot=T,
exportplot=F,
sortind = "all", divsize = 1.5, showsp = FALSE,
exportpath = getwd())
plot(p3$plot[[1]])
And what I get:
I noticed that I would get rid of the strip text with splab=""
so I got what I wanted, but I wanted to let you know in case this is a bug.
I'm running:
R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: OS X El Capitan 10.11.6 pophelper_2.3.1
(yes I hate upgrading, let me know if that is related)
I am having this same problem with R version 4.0.4 (2021-02-15), pophelper_2.3.1
Yes. I can reproduce this. It is probably due to a change in ggplot2. Here is a solution.
p3$plot[[1]] + theme(strip.text.y=element_blank())