Skip to content

Commit 83c9a75

Browse files
committed
switch back plotting axes input order
1 parent 5327006 commit 83c9a75

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/plotting.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ using RecipesBase
33
@recipe function f(model::PSFModel, inds...)
44
seriestype := :heatmap
55
aspect_ratio --> 1
6-
xlims --> extrema(first(inds))
7-
ylims --> extrema(last(inds))
6+
xlims --> extrema(last(inds))
7+
ylims --> extrema(first(inds))
88

9-
arr = model[reverse(inds)...]
9+
arr = model[inds...]
1010

11-
return inds..., arr
11+
return reverse(inds)..., arr
1212
end
1313

14-
@recipe f(model::PSFModel, inds=reverse(axes(model))) = model, inds...
14+
@recipe f(model::PSFModel, inds=axes(model)) = model, inds...

test/plotting.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ using RecipesBase: apply_recipe
66
for rec in recipes
77
@test rec.args[1] === psf
88
ys, xs = axes(psf)
9-
@test rec.args[2] == xs
10-
@test rec.args[3] == ys
9+
@test rec.args[2] == ys
10+
@test rec.args[3] == xs
1111
end
1212

13-
recipes_full = apply_recipe(Dict{Symbol,Any}(), psf, reverse(axes(psf))...)
13+
recipes_full = apply_recipe(Dict{Symbol,Any}(), psf, axes(psf)...)
1414
for rec in recipes_full
1515
@test rec.plotattributes == Dict{Symbol,Any}(
1616
:seriestype => :heatmap,

0 commit comments

Comments
 (0)