griffithlab / GenVisR

Genome data visualizations
Creative Commons Zero v1.0 Universal
206 stars 62 forks source link

cnFreq y axis scale #353

Closed cgrisdale closed 5 years ago

cgrisdale commented 5 years ago

Hi,

When using cnFreq the plot often has a lot of white space above and below the max/min y-values (see attachment), which squishes the actual data. Is there a way to set the axis limits or some other parameter that will help minimize this blank area at the top and bottom of the plot?

Thanks, Cam screenshot from 2019-01-31 15-46-35

zlskidmore commented 5 years ago

The y-limits are set automatically based on the data, I suspect you have a very small segment that is hard to see on the plot. At any rate you can adda ggplot layer to control the ylim, for example:

library(GenVisR)
library(ggplot2)
layer <- ylim(c(-5, 5))
cnFreq(LucCNseg, plotLayer = layer)