Skip to content

Instantly share code, notes, and snippets.

@RobBlackwell
Created May 10, 2018 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobBlackwell/71d45405876ad77cfe4860b027f9ae09 to your computer and use it in GitHub Desktop.
Save RobBlackwell/71d45405876ad77cfe4860b027f9ae09 to your computer and use it in GitHub Desktop.
using PerceptualColourMaps
using Images
function myimagesc(A)
x = minimum(A)
y = maximum(A)
B = (A .- x) ./ (y - x)
imgc = applycolormap(B, cmap("R3")) # outputs a 3-dimensional array
imgc2 = colorview(RGB, permuteddimsview(imgc, (3,1,2)))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment