rqtl / qtl2plot

R/qtl2 module for data visualization
http://kbroman.org/qtl2
Other
2 stars 2 forks source link

legend won't display with scan1_output parameter #46

Closed ytakemon closed 6 years ago

ytakemon commented 6 years ago

Hello Karl,

I am running the code below on a dataset containing DO mouse data, the legend does not display when I have the scan1_output parameter available. I've also tried using the legend parameter within plot_coefCC, but I get a warning message saying that the legend parameter is not a graphical parameter.

The legend, however, does work if the scan1_output is removed.

Any insights on how I can get the legend to display in a plot showing both allele coefficient and scan1 outputs?

Thanks, Yuka

plot_coefCC(x = add_coef, map = map_all[add_chr], scan1_output=add_lod) legend("topright", col=CCcolors, names(CCcolors), ncol=2, lwd=2, bg="gray95")

kbroman commented 6 years ago

The qtl2plot package is now deprecated. I've merged the qtl2geno, qtl2scan, qtl2plot, and qtl2db packages into a single package, qtl2. Could you try removing the old packages and installing qtl2? I added your issue over there.

install.packages("qtl2", repos="https://rqtl2.org/qtl2cran")
remove.packages(paste0("qtl2", c("geno", "scan", "plot", db")))

The plot_coefCC should take an argument legend that indicates to include a legend and in what position (e.g. use legend="topright"). Need to do this particularly when including scan1 output due to the multi-panel figure.