Skip to content

Commit

Permalink
Fix off-by-one error in contour levels in tricontour when is an integer
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeliux committed Feb 20, 2025
1 parent 75204cc commit 6ffa8b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/basic_recipes/tricontour.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ end
function Makie.plot!(c::Tricontour{<:Tuple{<:DelTri.Triangulation, <:AbstractVector{<:Real}}})
tri, zs = c[1:2]
# FIXME: This uses _get_isoband_levels, from contourf.jl. This should be moved to an utils.jl file
if typeof(c.levels[]) <: Integer

c.levels[] += 1
end
# Same issue is found in tricontour.jl
c.attributes[:_computed_levels] = lift(c, zs, c.levels, c.mode) do zs, levels, mode
return _get_isoband_levels(Val(mode), levels, vec(zs))
Expand Down

0 comments on commit 6ffa8b9

Please sign in to comment.