drveera / ggman

R package to create manhattan plots using ggplot
30 stars 12 forks source link

ymax in ggmanZoom #9

Open gmkov opened 6 years ago

gmkov commented 6 years ago

Hi! Great package, thank you.

I really cant get ymax to work in ggmanZoom, it doesnt seem to follow what is specified by y=max (i.e. I get automatic y axis lims) and it doesnt inherit the asthetics from the whole genome ggman plot either. Anything I'm missing? Thanks very much

Example: Main ggman: f1.ggplot <- ggman(f1.e.lat.EhighE.ElowE, snp = "SNP", bp = "BP", chrom = "CHR", pvalue = "P", relative.positions = TRUE, logTransform = FALSE, sigLine=NA, ylabel = "Fst", pointSize = 1, ymax = 0.4, title="")

Zoom: ggmanZoom(f1.ggplot, chromosome=1, title="", ylabel = "", xlabel = "", ymax=0.4)

Output: plot_zoom_png-9

gmkov commented 6 years ago

I have however found a solution by just adding: p = p + ylim(0,0.4) to the ggmanZoom plot