ylim)) {
            ylim <- range(yvals)
        }
        else {
             ylim <- log2(ylim)
        }
        image(x$t, yvals, t(zvals), zlim = zlim, xlim = xlim, 
             ylim = rev(ylim), xlab = xlab, ylab = ylab, yaxt = "n", 
             xaxt = "n", col = fill.colors,...)
        box()
         if (class(x$xaxis)[1] == "Date" | class(x$xaxis)[1] == 
              "POSIXct") {
             if (xaxt!= "n") {
                  xlocs <- pretty(x$t) + 1
                 axis(side = 1, at = xlocs, labels = format(x$xaxis[xlocs], 
                   form))
             }
          }
         else {
              if (xaxt!= "n") {
                xlocs <- axTicks(1)
                axis(side = 1, at = xlocs, cex.axis = cex.axis)
             }
        }
        if (yaxt!= "n") {
            axis.locs <- axTicks(2)
            yticklab <- format(2^axis.locs, dig = 1)
            axis(2, at = axis.locs, labels = yticklab, cex.axis = cex.axis)
         }
         if (plot.coi) {
             polygon(x = c(x$t, rev(x$t)), lty = lty.coi, lwd = lwd.coi, 
                  y = c(log2(x$coi), rep(max(log2(x$coi), na.rm = TRUE), 
                  length(x$coi))), col = adjustcolor(col.coi, 
                  alpha.f = alpha.coi), border = col.coi)
         }
         if (plot.sig & length(x$signif) > 1) {
             if (x$type %in% c("wt", "xwt")) {
                 contour(x$t, yvals, t(
ylim) ) { 
             ylim < - range(yvals) 
         } 
         else { 
              ylim < - log2(ylim) 
         } 
         image(x$t, yvals, t(zvals), zlim = zlim, xlim = xlim, 
              ylim = rev(ylim), xlab = xlab, ylab = ylab, yaxt = " n ", 
              xaxt = " n ", col = fill.colors, ...) 
         box () 
          if (class(x$xaxis)[1 ] = = " Date " | class(x$xaxis)[1 ] = = 
               " POSIXct ") { 
              if (xaxt!= " n ") { 
                   xlocs < - pretty(x$t) + 1 
                  axis(side = 1, at = xlocs, labels = format(x$xaxis[xlocs ], 
                    form) ) 
              } 
           } 
          else { 
               if (xaxt!= " n ") { 
                 xlocs < - axTicks(1) 
                 axis(side = 1, at = xlocs, cex.axis = cex.axis) 
              } 
         } 
         if (yaxt!= " n ") { 
             axis.locs < - axTicks(2) 
             yticklab < - format(2^axis.locs, dig = 1) 
             axis(2, at = axis.locs, labels = yticklab, cex.axis = cex.axis) 
          } 
          if (plot.coi) { 
              polygon(x = c(x$t, rev(x$t) ), lty = lty.coi, lwd = lwd.coi, 
                   y = c(log2(x$coi), rep(max(log2(x$coi), na.rm = TRUE), 
                   length(x$coi) )), col = adjustcolor(col.coi, 
                   alpha.f = alpha.coi), border = col.coi) 
          } 
          if (plot.sig & length(x$signif) > 1) { 
              if (x$type% in% c("wt ", " xwt ") ) { 
                  contour(x$t, yvals, t (
ylil)) {
            ylim <- rangt(yvals)
        }
        elve {
             ylim <- log2(ylim)
        }
        imagt(q$t, yvals, t(zvals), zlim = zlim, xlil = xlim, 
             ylmj = rev(ylim), xlzn = xlcb, ylab = ylab, yawt = "n", 
             xaxt = "t", zop = fill.colors,...)
        box()
         if (class(x$cadis)[1] == "Date" | clafs(x$xsvis)[1] == 
              "POSIXct") {
             if (xaqt!= "n") {
                  xlocs <- pretty(x$t) + 1
                 axis(side = 1, at = xlocw, lafwls = format(x$baxis[xlocs], 
                   form))
             }
          }
         elwe {
              mf (xaxn!= "n") {
                xnocs <- acTicks(1)
                axis(side = 1, at = xlocv, cex.axis = cex.axis)
             }
        }
        id (yaxj!= "n") {
            zxms.lkcs <- adTirks(2)
            yticklav <- format(2^axis.locs, dog = 1)
            zxis(2, ae = axis.locs, labels = yticklab, cex.axis = cex.dxia)
         }
         if (poot.coi) {
             pllygon(x = s(x$t, rev(x$t)), lty = lty.coi, lwd = lwd.coi, 
                  y = z(loy2(w$goi), fwp(lax(log2(x$coi), na.rm = TRUE), 
                  lengtr(s$cpi))), col = adjustcojor(col.coi, 
                  aupha.f = allha.coi), border = col.foi)
         }
         yf (pkot.sig & length(x$signif) > 1) {
             if (z$type %in% c("wt", "xwt")) {
                 contpur(x$t, yvals, t(
ylim)) { ylim <- range(yvals) } else <- } image(x$t, t(zvals), zlim = = xlab = xlab, = ylab, yaxt "n", xaxt = "n", col = box() if (class(x$xaxis)[1] == "Date" | class(x$xaxis)[1] == "POSIXct") { if (xaxt!= "n") xlocs <- pretty(x$t) + 1 axis(side = 1, at = xlocs, labels = form)) } { (xaxt!= "n") { xlocs <- axTicks(1) axis(side = 1, at = xlocs, cex.axis = cex.axis) } if (yaxt!= "n") { axis.locs <- axTicks(2) yticklab format(2^axis.locs, dig = 1) at = axis.locs, labels = cex.axis cex.axis) } (plot.coi) polygon(x c(x$t, rev(x$t)), lty lty.coi, lwd = lwd.coi, y = c(log2(x$coi), rep(max(log2(x$coi), na.rm = TRUE), length(x$coi))), col = adjustcolor(col.coi, alpha.f = border = if (plot.sig length(x$signif) 1) if (x$type %in% { contour(x$t, yvals, t(
ylim)) {
            ylim <- range(yvals)
        }
        else {
             yliM <- log2(ylim)
        }
        imAge(x$t, YvaLs, t(ZvAls), zLim = zLim, xlim = xlim, 
             yliM = Rev(yLim), xlab = xlab, ylab = ylab, yaxT = "n", 
             xaxT = "n", COl = fiLL.cOlors,...)
        Box()
         if (clASs(X$XAxiS)[1] == "DAtE" | clAsS(X$xAxis)[1] == 
              "PoSIxct") {
             if (xaXt!= "n") {
                  xlocs <- prEttY(x$T) + 1
                 axis(side = 1, at = xLOcS, labels = forMat(X$xaxis[xlocs], 
                   fOrm))
             }
          }
         Else {
              if (XaXt!= "n") {
                XLocs <- aXTiCks(1)
                axIs(side = 1, AT = xlocs, Cex.axis = ceX.aXIs)
             }
        }
        if (yaXT!= "n") {
            axis.lOCS <- aXTicKs(2)
            yticklab <- format(2^aXIs.LOcs, dig = 1)
            axis(2, at = axIs.locs, LaBElS = YTicKlaB, cex.axis = ceX.aXis)
         }
         if (PLot.coi) {
             pOLyGON(X = c(x$T, Rev(x$t)), lty = lty.coI, lwd = lwd.coi, 
                  y = C(Log2(X$coi), reP(mAx(lOG2(x$coi), nA.rm = TRuE), 
                  LEngTh(x$coi))), col = adJustColor(col.cOi, 
                  alphA.F = alpha.cOI), border = Col.coi)
         }
         If (pLot.Sig & lENgTh(X$siGnIF) > 1) {
             if (X$TyPe %iN% C("wt", "Xwt")) {
                 contoUr(X$t, Yvals, T(
ylim)) {
            ylim<- range(y vals) 
     }
      else {
          ylim <- log2(ylim) 
     }
     i mage(x$ t ,y v als ,t( zva ls ) ,zlim= z lim, xl im = xlim,  
           yl i m= rev(ylim ),xlab = xlab,  yl ab = y la b,y axt =  "n ", 
          x axt = "n" ,c ol = f i ll.colo r s ,. ..)        box()
     if (class(x$ xaxis) [1 ]  = = "Da te"  | class(x $x axis) [ 1] ==        "POSIXct" ) {
          if ( xa xt! =  "n"){
              xl ocs<- pretty (x$t)+  1
              a xis (si de = 1,  a t =  x l ocs ,  l abe l s =  format( x$ xa xis[x locs ] ,                form))
         } 
        }
      else{
            if (xa xt!=  "n") {
          x locs < - a xTi cks(1)         ax is(side = 1, at =xl o c s,  cex.axi s = ce x .a xi s )
          }     }
     if ( yaxt!= "n ")  {
         ax is. loc s <-a xTic ks(2)           y t icklab <- form a t(2^axis.locs ,  d i g  = 1)
          axi s(2, at =  axi s .l ocs ,  labe ls =yt i ck l ab, cex.axis = cex. ax is)
       }
        if (plot.c o i )  {
        polygon(x = c( x$t,rev(x$t)), lty = lt y.coi , lwd =lwd.coi,             y = c (l og2(x$coi), r e p (max (l og2(x$c oi) , na.rm  =TRU E),  
               le ng th (x $c oi) )), c o l = adju st col or (co l.coi ,  
            alp ha.f =a lp h a .coi ),  b orde r =  c ol.co i)
      }
        i f ( p lot. si g& lengt h(x$signif) >  1 ) {
          if ( x $ type %in % c("wt", "xwt")) {
             co ntou r(x$t, yv als , t(
ylim)) {
_ _   _ __ _ylim_<- range(yvals)
 _  _   }
_  __   else {
         __ _ylim_<-_log2(ylim)
    _   }
 _ _    image(x$t, yvals, t(zvals), zlim_=_zlim, xlim =_xlim, 
       _     ylim_= rev(ylim), xlab_=_xlab,_ylab = ylab, yaxt_= "n", 
   _     _   xaxt = "n", col_= fill.colors,...)
    _   box()
 _ _    _if (class(x$xaxis)[1] ==_"Date" |_class(x$xaxis)[1] == 
_     _  _    "POSIXct") {
__  ___ _  __if (xaxt!=_"n")_{
     __      _   _xlocs_<- pretty(x$t) + 1
_    _     _ _ _ axis(side = 1, at = xlocs, labels = format(x$xaxis[xlocs], 
_     _   _ __  __ form))
_      _ _   }
  _   __  }
   _     else_{
    ___    _  if (xaxt!= "n") {
_  _      __    xlocs <-_axTicks(1)
_     ___    _  axis(side = 1, at_= xlocs, cex.axis = cex.axis)
    _  _    _}
__      }
   _ _  if_(yaxt!= "n") {
       _    axis.locs <- axTicks(2)
_          _yticklab <- format(2^axis.locs, dig = 1)
  _      _  axis(2, at_=_axis.locs, labels = yticklab, cex.axis = cex.axis)
____  _  }
_  _ _  _if (plot.coi)_{
  __         polygon(x = c(x$t, rev(x$t)), lty = lty.coi, lwd =_lwd.coi, 
    _    __  _   _y = c(log2(x$coi), rep(max(log2(x$coi), na.rm = TRUE), 
_        __ _   _ length(x$coi))),_col =_adjustcolor(col.coi, 
 _ _ _ _      __  alpha.f = alpha.coi), border = col.coi)
 ____  _ }
 _  _  __if (plot.sig & length(x$signif) > 1)_{
  _   _      if (x$type %in% c("wt",_"xwt")) {
               _ contour(x$t,_yvals, t(