From 67f441f152e49041242ed7242706b7f17d8c47d6 Mon Sep 17 00:00:00 2001 From: t-bltg <13423344+t-bltg@users.noreply.github.com> Date: Tue, 3 Aug 2021 17:54:49 +0200 Subject: [PATCH] Gaston: swap :image axes --- src/backends/gaston.jl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/backends/gaston.jl b/src/backends/gaston.jl index 9c2bc2a2..a7f56dc5 100644 --- a/src/backends/gaston.jl +++ b/src/backends/gaston.jl @@ -213,13 +213,11 @@ function gaston_add_series(plt::Plot{GastonBackend}, series::Series) if st == :image z = reverse(Float32.(Gray.(z)), dims=1) # flip y axis nr, nc = size(z) - lx = length(x) - if lx == 2 && lx != nr - x = collect(range(x[1], x[2], length=nr)) + if (ly = length(y)) == 2 && ly != nr + y = collect(range(y[1], y[2], length=nr)) end - ly = length(y) - if ly == 2 && ly != nc - y = collect(range(y[1], y[2], length=nc)) + if (lx = length(x)) == 2 && lx != nc + x = collect(range(x[1], x[2], length=nc)) end elseif st == :heatmap length(x) == size(z, 2) + 1 && (x = @view x[1:end-1])