Skip to content

Commit 5b8da61

Browse files
committed
fix typo
1 parent 2fb79f9 commit 5b8da61

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/QuantumToolboxCairoMakieExt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function _plot_wigner(
9494
wlim = maximum(abs, wig)
9595

9696
kwargs = merge(Dict(:colormap => Reverse(:RdBu), :colorrange => (-wlim, wlim)), kwargs)
97-
hm = heatmap!(ax, xvec, yvec, wig'; kwargs...)
97+
hm = heatmap!(ax, xvec, yvec, transpose(wig); kwargs...)
9898

9999
if colorbar
100100
Colorbar(lyt[1, 2], hm)
@@ -127,7 +127,7 @@ function _plot_wigner(
127127
wlim = maximum(abs, wig)
128128

129129
kwargs = merge(Dict(:colormap => :RdBu, :colorrange => (-wlim, wlim)), kwargs)
130-
surf = surface!(ax, xvec, yvec, wig'; kwargs...)
130+
surf = surface!(ax, xvec, yvec, transpose(wig); kwargs...)
131131

132132
if colorbar
133133
Colorbar(lyt[1, 2], surf)

test/ext-test/cairomakie_ext.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@testset "CairoMakie Extension" verbose = true begin
22
ψ = normalize(coherent(50, 5.0) + coherent(50, -5.0))
33
xvec = yvec = -15.0:0.1:15.0
4-
wig = wigner(ψ, xvec, yvec)'
4+
wig = transpose(wigner(ψ, xvec, yvec))
55

66
@test_throws ArgumentError plot_wigner(ψ; library = :CairoMakie, xvec = xvec, yvec = yvec)
77

0 commit comments

Comments
 (0)