From a79a40b1e8b79162f7cf1c429207b703a7694d5a Mon Sep 17 00:00:00 2001 From: Andrew Palugniok Date: Thu, 18 Jan 2018 18:21:26 +0000 Subject: [PATCH] Allow manual flipping of yaxis for images. --- src/pipeline.jl | 1 - src/series.jl | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pipeline.jl b/src/pipeline.jl index e05f7791..931aa76e 100644 --- a/src/pipeline.jl +++ b/src/pipeline.jl @@ -360,7 +360,6 @@ function _expand_subplot_extrema(sp::Subplot, d::KW, st::Symbol) xmin, xmax = ignorenan_extrema(d[:x]); ymin, ymax = ignorenan_extrema(d[:y]) expand_extrema!(sp[:xaxis], (xmin, xmax)) expand_extrema!(sp[:yaxis], (ymin, ymax)) - sp[:yaxis].d[:flip] = true elseif !(st in (:pie, :histogram, :bins2d, :histogram2d)) expand_extrema!(sp, d) end diff --git a/src/series.jl b/src/series.jl index a727844c..1a502cc5 100644 --- a/src/series.jl +++ b/src/series.jl @@ -321,6 +321,7 @@ end n, m = size(mat) if is_seriestype_supported(:image) seriestype := :image + yflip --> true SliceIt, 1:m, 1:n, Surface(mat) else seriestype := :heatmap @@ -338,6 +339,7 @@ end if is_seriestype_supported(:image) seriestype := :image + yflip --> true SliceIt, 1:m, 1:n, Surface(mat) else seriestype := :heatmap @@ -472,6 +474,7 @@ end @recipe function f(x::AVec, y::AVec, mat::AMat{T}) where T<:Gray if is_seriestype_supported(:image) seriestype := :image + yflip --> true SliceIt, x, y, Surface(mat) else seriestype := :heatmap @@ -487,6 +490,7 @@ end @recipe function f(x::AVec, y::AVec, mat::AMat{T}) where T<:Colorant if is_seriestype_supported(:image) seriestype := :image + yflip --> true SliceIt, x, y, Surface(mat) else seriestype := :heatmap