I would to ask for your support with this one.
I am fitting an 2d-histrogram to a tuple of vectors. Then, I try to heatmap it but I cannot make it work. Interestingly, for random data it works as it should. I cannot use histogram2d() cause I want to manipulate(filter) the 2d-histogram before plotting it.
df=CSV.read("path") mybins=100 x=Vector(df[!,:A]) y=Vector(df[!,:B]) lenx=length(x) # equal to 2265 leny=length(y) # equal to 2265 h1=fit(Histogram,(x,y),closed=:left,nbins=mybins) h1=normalize(h1,mode=:pdf) p1=heatmap(h1.edges,h1.edges,h1.weights)
Length of x & y does not match the size of z. Must be either `size(z) == (length(y), length(x))` (x & y define midpoints) or `size(z) == (length(y)+1, length(x)+1))` (x & y define edges). error(::String) at error.jl:33
h2=fit(Histogram,(rand(lenx),rand(leny)),closed=:left,nbins=mybins) h2=normalize(h2,mode=:pdf) p2=heatmap(h2.edges,h2.edges,h2.weights)
My question: what am I missing?