From d4ac30eb5cb512d18bd8cb73bc608b4c3a48e2b3 Mon Sep 17 00:00:00 2001 From: Datseris Date: Mon, 20 Feb 2023 15:01:33 +0000 Subject: [PATCH] fix incorrect orientation of `grayscale` --- src/matrices/plot.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/matrices/plot.jl b/src/matrices/plot.jl index 6384a70..70d34d3 100644 --- a/src/matrices/plot.jl +++ b/src/matrices/plot.jl @@ -155,7 +155,7 @@ recurrent points contained in it. The levels of gray are coded as numbers of the same type as the black and white codes. It is advised to use `width, height` arguments for large matrices otherwise -plots using functions like e.g. `imshow` could be misleading. +plots using functions like e.g. `heatmap` could be misleading. """ function grayscale(R, bwcode::Tuple{TT,T}=(0.0,1.0); exactsize=false, kwargs...) where {TT<:Real, T<:Real} @@ -193,4 +193,6 @@ function grayscale(R, bwcode::Tuple{TT,T}=(0.0,1.0); # Change to color scale p .= bwcode[1].*p .+ bwcode[2].*(1 .- p) pt = (T<:Integer) ? round.(T, p) : T.(p) + # need to flip `y` so that diagonal is in the correct way... + return reverse(pt; dims = 2) end