From 39a7815f8004ae431dd1d2f9dacdd25ae88ca968 Mon Sep 17 00:00:00 2001 From: Hayato Ikoma Date: Tue, 5 Dec 2017 08:54:54 -0800 Subject: [PATCH] Fix the display of an grayscale image for image-nonsupported backends --- src/series.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/series.jl b/src/series.jl index 1f00bb6e..a5425e94 100644 --- a/src/series.jl +++ b/src/series.jl @@ -306,9 +306,9 @@ end # # images - grays @recipe function f(mat::AMat{T}) where T<:Gray + n, m = size(mat) if is_seriestype_supported(:image) seriestype := :image - n, m = size(mat) SliceIt, 1:m, 1:n, Surface(mat) else seriestype := :heatmap @@ -371,7 +371,7 @@ end end # try some intervals over which the function may be defined -function tryrange(F::AbstractArray, vec) +function tryrange(F::AbstractArray, vec) rets = [tryrange(f, vec) for f in F] # get the preferred for each maxind = maximum(indexin(rets, vec)) # get the last attempt that succeeded (most likely to fit all) rets .= [tryrange(f, vec[maxind:maxind]) for f in F] # ensure that all functions compute there