In plot
, set ylab=''
and xlab=''
:
with(dat, plot(NA, xlim=c(min(x1),max(x2)),
ylim=c(min(y),max(y)+.15),
type="n", xlab='', ylab='')) # <- specify xlab and ylab here
with(dat, rect(x1,y,x2,y+0.1))
title(xlab="chrX Position", ylab="Divergence")