diff --git a/src/recipes.jl b/src/recipes.jl index 3cd07e02..593079cd 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -1380,7 +1380,8 @@ function clamp_greys!(mat::AMat{<:Gray}) end @recipe function f(mat::AMat{<:Gray}) - n, m = axes(mat) + n, m = map(a -> 0:(a.stop), axes(mat)) + if is_seriestype_supported(:image) seriestype := :image yflip --> true @@ -1398,7 +1399,7 @@ end # images - colors @recipe function f(mat::AMat{T}) where {T<:Colorant} - n, m = axes(mat) + n, m = map(a -> 0:(a.stop), axes(mat)) if is_seriestype_supported(:image) seriestype := :image diff --git a/test/runtests.jl b/test/runtests.jl index a5e1cf61..eb27269a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -249,15 +249,6 @@ end @test show(io, p) isa Nothing end - @testset "PlotlyJS" begin - @test plotlyjs() == Plots.PlotlyJSBackend() - @test backend() == Plots.PlotlyJSBackend() - - p = plot(rand(10)) - @test p isa Plots.Plot - @test_broken display(p) isa Nothing - end - @testset "GR" begin ENV["PLOTS_TEST"] = "true" ENV["GKSwstype"] = "100" @@ -274,4 +265,13 @@ end ) end end + + @testset "PlotlyJS" begin + @test plotlyjs() == Plots.PlotlyJSBackend() + @test backend() == Plots.PlotlyJSBackend() + + p = plot(rand(10)) + @test p isa Plots.Plot + @test_broken display(p) isa Nothing + end end