Skip to content

Commit

Permalink
cell centered ticks
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Feb 16, 2022
1 parent 3629be1 commit 35388dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/axes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,6 @@ end
# we return (continuous_value, discrete_index)
function discrete_value!(axis::Axis, dv)
cv_idx = get(axis[:discrete_map], dv, -1)
# @show axis[:discrete_map], axis[:discrete_values], dv
if cv_idx == -1
ex = axis[:extrema]
cv = NaNMath.max(0.5, ex.emax + 1.0)
Expand Down
4 changes: 2 additions & 2 deletions src/recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@ function clamp_greys!(mat::AMat{<:Gray})
end

@recipe function f(mat::AMat{<:Gray})
n, m = map(a -> 0:(a.stop), axes(mat))
n, m = map(a -> range(0.5, stop = a.stop + 0.5), axes(mat))

if is_seriestype_supported(:image)
seriestype := :image
Expand All @@ -1399,7 +1399,7 @@ end

# images - colors
@recipe function f(mat::AMat{T}) where {T<:Colorant}
n, m = map(a -> 0:(a.stop), axes(mat))
n, m = map(a -> range(0.5, stop = a.stop + 0.5), axes(mat))

if is_seriestype_supported(:image)
seriestype := :image
Expand Down

0 comments on commit 35388dc

Please sign in to comment.