Reputation: 55
I would like to plot a heatmap of the following kind of matrix.
The final output should look like this: Expected output style
Thanks very much!
Upvotes: 4
Views: 1585
Reputation: 1368
I would suggest
using PlotlyJS
z = convert(Matrix{Float64}, z)
plot( heatmap(z=z))
Upvotes: 2
Reputation: 2995
Have you tried the heatmap
function from a plotting package, e.g., Plots.jl?
julia> using Plots, LinearAlgebra
julia> M = min.(1.0, Matrix(Symmetric(rand(5,5) + I)))
5×5 Matrix{Float64}:
1.0 0.737985 0.0273955 0.199343 0.0553962
0.737985 1.0 0.604142 0.576031 0.785242
0.0273955 0.604142 1.0 0.854256 0.389215
0.199343 0.576031 0.854256 1.0 0.327517
0.0553962 0.785242 0.389215 0.327517 1.0
julia> heatmap(M, yflip=true)
gives
Upvotes: 3