MadsAlbertsen / mmgenome

Please use mmgenome2 instead. Tools for extracting individual genomes from metagenomes
https://kasperskytte.github.io/mmgenome2/
27 stars 8 forks source link

mmplot_locator: Locator coordinate system out of sync when using custom axis limits #14

Open SorenKarst opened 10 years ago

SorenKarst commented 10 years ago

mmplot_locator is used with a ggplot object often generated by mmplot. If custom axis limits are added to the ggplot object e.g.with scale_x_log10(limits=c(x1, x2)) the coordinate system in mmplot_locator will be out of sync with the coordinate system in the ggplot object. The wrong area of the plot is selected as a result.

Workaround: Instead of zooming by using axis limits, zoom by using mmplot_locator and mmextract to subset your data.

nr0cinu commented 9 years ago

Interestingly, I don’t have this problem. I always use the limits parameter to zoom and never had any problems. What does not work for me is zooming by setting limits with coord_cartesian

Btw, how would one use mmplot_locator to zoom?

Thanks! Bela