Skip to content

Commit e5eaa83

Browse files
committed
Restrict heatmap argument types
1 parent 968cd11 commit e5eaa83

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/TextHeatmaps.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ using FixedPointNumbers: N0f8
55
using Colors: Colorant, RGB, hex
66
using ColorSchemes: ColorScheme, get, seismic
77

8-
export heatmap
9-
108
include("heatmap.jl")
119

10+
export heatmap
11+
1212
end # module

src/heatmap.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ Arguments `values` and `words` (and optionally `colors`) must have the same size
1414
before the color scheme is applied. Can be either `:extrema` or `:centered`.
1515
Defaults to `:centered` for use with the default color scheme `seismic`.
1616
"""
17-
function heatmap(val, words::AbstractArray{<:AbstractString}; kwargs...)
17+
function heatmap(
18+
val::AbstractArray{<:Real}, words::AbstractArray{<:AbstractString}; kwargs...
19+
)
1820
return TextHeatmap(val, words; kwargs...)
1921
end
2022

0 commit comments

Comments
 (0)