Skip to content

Commit

Permalink
normalize colormap range to data range (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
harisorgn authored Oct 31, 2024
1 parent 1eba98e commit de84dac
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions ext/MakieExtension.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,7 @@ function Makie.plot!(p::Adjacency)

X, Y, D = findnz(adj.matrix)

heatmap!(p, X, Y, D; colormap = p.colormap[])

idxs = Tuple.(findall(iszero, adj.matrix))
x_zero = first.(idxs)
y_zero = last.(idxs)

#heatmap!(p, x_zero, y_zero, fill(0, length(x_zero)); color=:black)
heatmap!(p, X, Y, D; colormap = p.colormap[], colorrange = (minimum(D), maximum(D)))

return p
end
Expand Down

0 comments on commit de84dac

Please sign in to comment.