Powered by AppSignal & Oban Pro

Portland Heatmap

24_portland_heatmap.livemd

Portland Heatmap

Mix.install([
  {:plotly_ex, "~> 0.3"},
  {:kino, "~> 0.18"}
])

Section

"Portland" is a sequential colorscale ranging from deep blue through cyan, green, yellow, and red — useful for showing density or intensity data.

alias Plotly.{Figure, Heatmap}

z = for i <- 0..9, do: (for j <- 0..9, do: :math.sin(i / 3.0 + j / 5.0) * 10)

Figure.new()
|> Figure.add_trace(Heatmap.new(z: z, colorscale: "Portland"))
|> Figure.update_layout(title: "Portland Colorscale Heatmap")
|> Plotly.show()