Gaston: swap :image axes
This commit is contained in:
parent
ed7b6f7f64
commit
67f441f152
@ -213,13 +213,11 @@ function gaston_add_series(plt::Plot{GastonBackend}, series::Series)
|
|||||||
if st == :image
|
if st == :image
|
||||||
z = reverse(Float32.(Gray.(z)), dims=1) # flip y axis
|
z = reverse(Float32.(Gray.(z)), dims=1) # flip y axis
|
||||||
nr, nc = size(z)
|
nr, nc = size(z)
|
||||||
lx = length(x)
|
if (ly = length(y)) == 2 && ly != nr
|
||||||
if lx == 2 && lx != nr
|
y = collect(range(y[1], y[2], length=nr))
|
||||||
x = collect(range(x[1], x[2], length=nr))
|
|
||||||
end
|
end
|
||||||
ly = length(y)
|
if (lx = length(x)) == 2 && lx != nc
|
||||||
if ly == 2 && ly != nc
|
x = collect(range(x[1], x[2], length=nc))
|
||||||
y = collect(range(y[1], y[2], length=nc))
|
|
||||||
end
|
end
|
||||||
elseif st == :heatmap
|
elseif st == :heatmap
|
||||||
length(x) == size(z, 2) + 1 && (x = @view x[1:end-1])
|
length(x) == size(z, 2) + 1 && (x = @view x[1:end-1])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user