Is there a strong reason to avoid this? The memory usage for heatmap is probably going to be proportional to the size of a dense matrix anyway.
To ensure that you only avoid plotting “structural” zeros, you can use findnz when creating the dense matrix:
X = sprand(Float64, 5, 5, 0.5)
I, J, V = findnz(X)
A = fill(NaN, size(X))
setindex!.((A,), V, I, J)
(here I used NaN instead of missing to avoid having to deal with Union types).
If the matrix is so huge that allocating a dense version is a problem, then probably you don’t want heatmap — you want some kind of smart downsampling algorithm, as discussed in Plotting image data in Julia is much slower than MATLAB - #17 by stevengj