class UnicodePlot::HeatmapGraphics

Overview

HeatmapGraphics renders a 2D color matrix using half-block characters (▄). Each display row combines two data rows: upper half (bg) and lower half (fg). This matches Julia's HeatmapCanvas layout.

Defined in:

unicode_plot/graphics/heatmap_graphics.cr

Constructors

Instance Method Summary

Instance methods inherited from class UnicodePlot::GraphicsArea

blank : Char blank, ncols : Int32 ncols, nrows : Int32 nrows, preprocess(io : IO) : GraphicsArea -> preprocess, print_row(io : IO, row : Int32, use_color : Bool) : Nil print_row, to_s(io : IO) : Nil to_s, visible? : Bool visible?

Constructor Detail

def self.new(data : Array(Array(Float64)), colormap_fn : Proc(Float64, Float64, Float64, UInt32), zmin : Float64, zmax : Float64, visible : Bool = true, yflip : Bool = false) #

[View source]

Instance Method Detail

def blank : Char #

[View source]
def colormap_fn : Proc(Float64, Float64, Float64, UInt32) #

[View source]
def data : Array(Array(Float64)) #

[View source]
def ncols : Int32 #

[View source]
def nrows : Int32 #

[View source]
def print_row(io : IO, row : Int32, use_color : Bool) : Nil #

Render one display row using two data rows packed as half-block characters. Row 1 = topmost display row. Each display row uses pixel rows 2r-1 and 2r (adjusted for odd char_height), matching Julia's HeatmapCanvas.print_row.


[View source]
def visible? : Bool #

[View source]
def yflip? : Bool #

[View source]
def zmax : Float64 #

[View source]
def zmin : Float64 #

[View source]