Hi again, I apologize for the proliferation of questions about plotting you may have seen from me here.
I would like to plot a GR or GRUtils heatmap that omits plotting in certain regions.
For example
julia> using GR
julia> heatmap(1:3., 1:4., [1. 2; 3 NaN; 5 6])
ERROR: InexactError: trunc(Int64, NaN)
Stacktrace:
[1] trunc at .\float.jl:703 [inlined]
[2] round(::Type{Int64}, ::Float64) at .\float.jl:367
[3] plot_data(::Bool) at C:\Users\aaron\.julia\packages\GR\8mv9N\src\jlgr.jl:1305
[4] plot_data at C:\Users\aaron\.julia\packages\GR\8mv9N\src\jlgr.jl:1074 [inlined]
[5] heatmap(::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::Array{Float64,2}; kv::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\Users\aaron\.julia\packages\GR\8mv9N\src\jlgr.jl:2052
[6] heatmap at C:\Users\aaron\.julia\packages\GR\8mv9N\src\jlgr.jl:2047 [inlined]
[7] #heatmap#17 at C:\Users\aaron\.julia\packages\GR\8mv9N\src\GR.jl:3419 [inlined]
[8] heatmap(::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::Array{Float64,2}) at C:\Users\aaron\.julia\packages\GR\8mv9N\src\GR.jl:3419
[9] top-level scope at REPL[6]:100:
It works fine in Plots.jl with GR as the backend… I don’t know how to accomplish what Plots outputs with the GR package alone.
julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
julia> heatmap(1.5:2.5, 1.5:3.5, [1. 2; 3 NaN; 5 6])