class
UnicodePlot::BarplotGraphics
- UnicodePlot::BarplotGraphics
- UnicodePlot::GraphicsArea
- Reference
- Object
Defined in:
unicode_plot/graphics/bar_graphics.crConstructors
Instance Method Summary
- #add_row!(bars : Array(Float64), color : Symbol | Int32 | UInt32 | Tuple(Int32, Int32, Int32) | Nil = nil) : self
- #add_row!(bar : Float64, color : Symbol | Int32 | UInt32 | Tuple(Int32, Int32, Int32) | Nil = nil) : self
- #bars : Array(Float64)
- #blank : Char
- #colors : Array(UInt32)
- #formatter : Proc(Float64, String)
- #max_len : Int32
- #max_len=(max_len : Int32)
-
#max_val : Float64
Computed per-render (set in preprocess, cleared in cleanup)
-
#max_val=(max_val : Float64)
Computed per-render (set in preprocess, cleared in cleanup)
- #maximum : Float64
- #ncols : Int32
- #nrows : Int32
-
#preprocess(io : IO) : GraphicsArea ->
Preprocessing hook (returns cleanup proc).
-
#print_row(io : IO, row : Int32, use_color : Bool) : Nil
Print a single row.
- #symbols : Array(Char)
- #visible? : Bool
- #xscale : Proc(Float64, Float64)
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(bars : Array(Float64), char_width : Int32, *, symbols : Array(Char) = ['■'], color : Symbol | Int32 | Tuple(Int32, Int32, Int32) | Array(Symbol) | Array(Int32) | Array(UInt32) | UInt32 = :green, maximum : Float64 | Nil = nil, formatter : Proc(Float64, String) | Nil = nil, visible : Bool = true, xscale : Symbol | Proc(Float64, Float64) = :identity)
#
Instance Method Detail
def add_row!(bars : Array(Float64), color : Symbol | Int32 | UInt32 | Tuple(Int32, Int32, Int32) | Nil = nil) : self
#
def add_row!(bar : Float64, color : Symbol | Int32 | UInt32 | Tuple(Int32, Int32, Int32) | Nil = nil) : self
#
def preprocess(io : IO) : GraphicsArea ->
#
Description copied from class UnicodePlot::GraphicsArea
Preprocessing hook (returns cleanup proc). Override in subclasses that need it.
def print_row(io : IO, row : Int32, use_color : Bool) : Nil
#
Description copied from class UnicodePlot::GraphicsArea
Print a single row. Implementations add ANSI color via use_color.