Hi Gviz developers,
I found the option to increase the margin around the plot area very helpful to include longer than usual titles, but when I tried in par(mar(c(bottom, left, top, right))-like manner to specify side specific margins it did not work as expected.
Somehow the margin was defined by the maximum of the specified vector, so I am wondering wether this behaviour is intended or a bug.
Anyways, thank you for providing the awesome Gviz package for plotting genomics data, it is really extensible and looks very nice with minimal tweaking.
Small reproducible example:
## Create some tracks to plot st <- c(2000000, 2070000, 2100000, 2160000) ed <- c(2050000, 2130000, 2150000, 2170000) str <- c("-", "+", "-", "-") gr <- c("Group1","Group2","Group1", "Group3") annTrack <- AnnotationTrack(start=st, end=ed, strand=str, chromosome=7, genome="hg19", feature="test", group=gr, id=paste("annTrack item", 1:4), name="annotation track foo", stacking="squish") ax <- GenomeAxisTrack() dt <- DataTrack(start=seq(min(st), max(ed), len=10), width=18000, data=matrix(runif(40), nrow=4), genome="hg19", chromosome=7, type="histogram", name="data track bar") ## Now plot the tracks plotTracks(list(ax, annTrack, dt),frame=TRUE) ## Plot with higher margin (single value) plotTracks(list(ax, annTrack, dt),margin = 50,frame=TRUE) ## Plot with higher margin (per site value) --> only first two are respected plotTracks(list(ax, annTrack, dt),margin = c(50,100,200,400),frame=TRUE) ## Plot with higher margin (c(horizontal,vertical) value) --> same as before plotTracks(list(ax, annTrack, dt),margin = c(50,100),frame=TRUE)