dat <- read.table(header=TRUE,
text="
X Y Latency 
0 0 461 
0 1 10295 
0 2 0 
0 3 0 
1 0 169 
1 1 7089 
1 2 4310 
1 3 0")
What you're looking for is technically a 3D bar plot, not a histogram (which would be a summary of the number of discrete points falling within a specified (X,Y) bin).
Here's one solution:
library("epade")
with(dat,
   bar3d.ade(xticks=unique(X),yticks=unique(Y),
            matrix(Latency,ncol=2),
                 col="gray",alpha=0.5))
Or, modifying from demo("hist3d",package="rgl"):
library("rgl")
barplot3d_0 <- function(x,y,z,alpha=1,topcol="#ff0000",sidecol="#aaaaaa")
 {
   save <- par3d(skipRedraw=TRUE)
   on.exit(par3d(save))
  x1 <- c(rep(c(x[1],x[2],x[2],x[1]),3),rep(x[1],4),rep(x[2],4))
  z1 <-c(rep(0,4),rep(c(0,0,z,z),4))
  y1 <-c(y[1],y[1],y[2],y[2],rep(y[1],4),
          rep(y[2],4),rep(c(y[1],y[2],y[2],y[1]),))
  x2 <-c(rep(c(x[1],x[1],x[2],x[2]),2),
        rep(c(x[1],x[2],rep(x[1],3),rep(x[2],3)),))
  z2 <-c(rep(c(0,z),4),rep(0,8),rep(z,8) )
  y2 <-c(rep(y[1],4),rep(y[2],4),
        rep(c(rep(y[1],3),rep(y[2],3),y[1],y[2]),2) )
  quads3d(x1,z1,y1,col=rep(sidecol,each=4),alpha=alpha)
  quads3d(c(x[1],x[2],x[2],x[1]),rep(z,4),c(y[1],y[1],y[2],y[2]),
            col=rep(topcol,each=4),alpha=1) 
  lines3d(x2,z2,y2,col="#000000")
 }
 barplot3d <- function(x,y,z,aspect=c(1,1,1)) {
    dx <- diff(unique(sort(x)))[1]
    dy <- diff(unique(sort(y)))[1]
    mapply(function(x,y,z) {
               barplot3d_0(c(x-dx/2,x+dx/2),
                           c(y-dy/2,y+dy/2),
                           z)
           },x,y,z)
    aspect3d(aspect)
}
with(dat,barplot3d(X,Y,Latency))
axes3d()
##  Z/Y confusion can probably be sorted out ...
title3d(xlab="X",zlab="Y",ylab="Latency")