Files
redux-scraper/sorbet/rbi/gems/unicode_plot@0.0.5.rbi
2025-07-10 19:24:41 +00:00

1223 lines
41 KiB
Ruby
Generated

# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `unicode_plot` gem.
# Please instead update this file by running `bin/tapioca gem unicode_plot`.
# source://unicode_plot//lib/unicode_plot/version.rb#1
module UnicodePlot
private
# @overload barplot
# @overload barplot
#
# source://unicode_plot//lib/unicode_plot/barplot.rb#123
def barplot(*args, width: T.unsafe(nil), color: T.unsafe(nil), symbol: T.unsafe(nil), border: T.unsafe(nil), xscale: T.unsafe(nil), xlabel: T.unsafe(nil), data: T.unsafe(nil), **kw); end
# @overload barplot!
# @overload barplot!
#
# source://unicode_plot//lib/unicode_plot/barplot.rb#177
def barplot!(plot, *args, data: T.unsafe(nil)); end
# source://unicode_plot//lib/unicode_plot/boxplot.rb#94
def boxplot(*args, data: T.unsafe(nil), border: T.unsafe(nil), color: T.unsafe(nil), width: T.unsafe(nil), xlim: T.unsafe(nil), **kw); end
# source://unicode_plot//lib/unicode_plot/boxplot.rb#157
def boxplot!(plot, *args, **kw); end
# source://unicode_plot//lib/unicode_plot/stairs.rb#63
def compute_stair_lines(x, y, style: T.unsafe(nil)); end
# source://unicode_plot//lib/unicode_plot/densityplot.rb#2
def densityplot(x, y, color: T.unsafe(nil), grid: T.unsafe(nil), name: T.unsafe(nil), **kw); end
# source://unicode_plot//lib/unicode_plot/densityplot.rb#7
def densityplot!(plot, x, y, **kw); end
# source://unicode_plot//lib/unicode_plot/histogram.rb#4
def histogram(x, nbins: T.unsafe(nil), closed: T.unsafe(nil), symbol: T.unsafe(nil), **kw); end
# @overload lineplot
#
# source://unicode_plot//lib/unicode_plot/lineplot.rb#33
def lineplot(*args, canvas: T.unsafe(nil), color: T.unsafe(nil), name: T.unsafe(nil), **kw); end
# @overload lineplot!
#
# source://unicode_plot//lib/unicode_plot/lineplot.rb#80
def lineplot!(plot, *args, color: T.unsafe(nil), name: T.unsafe(nil)); end
# source://unicode_plot//lib/unicode_plot/scatterplot.rb#5
def scatterplot(*args, canvas: T.unsafe(nil), color: T.unsafe(nil), name: T.unsafe(nil), **kw); end
# source://unicode_plot//lib/unicode_plot/scatterplot.rb#27
def scatterplot!(plot, *args, color: T.unsafe(nil), name: T.unsafe(nil)); end
# @overload stairs
#
# source://unicode_plot//lib/unicode_plot/stairs.rb#52
def stairs(xvec, yvec, style: T.unsafe(nil), **kw); end
# Similar to stairs, but takes an existing plot object as a first argument.
#
# source://unicode_plot//lib/unicode_plot/stairs.rb#58
def stairs!(plot, xvec, yvec, style: T.unsafe(nil), **kw); end
# Generates one or more {Stemplot} objects from the input data
# and prints a Single or Double stemplot using {stemplot1!} or {stemplot2!}
#
# @example Single sided stemplot
# >> UnicodePlot.stemplot(eighty_ints)
# 0 | 257
# 1 | 00335679
# 2 | 034455899
# 3 | 145588
# 4 | 0022223
# 5 | 0223399
# 6 | 012345568889
# 7 | 01133334466777888
# 8 | 013689
# 9 | 22667
# Key: 1|0 = 10
# The decimal is 1 digit(s) to the right of |
# @example Back-to-back stemplot
# >> UnicodePlot.stemplot(eighty_ints, another_eighty_ints)
# 752 | 0 | 1244457899
# 97653300 | 1 | 4799
# 998554430 | 2 | 015668
# 885541 | 3 | 0144557888899
# 3222200 | 4 | 00268
# 9933220 | 5 | 0234778
# 988865543210 | 6 | 122222357889
# 88877766443333110 | 7 | 134556689
# 986310 | 8 | 24589
# 76622 | 9 | 022234468
# Key: 1|0 = 10
# The decimal is 1 digit(s) to the right of |
# @see Stemplot
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#323
def stemplot(*args, scale: T.unsafe(nil), **kw); end
# Print a Single-Vector stemplot to STDOUT.
#
# - Stem data is printed on the left.
# - Leaf data is printed on the right.
# - Key is printed at the bottom.
#
# @param plt [Stemplot] Stemplot object
# @param scale [Integer] Scale, should be a power of 10
# @param divider [String] Divider character between stem and leaf
# @param padchar [String] Padding character
# @param trim [Boolean] Trim missing stems from the plot
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#233
def stemplot1!(plt, scale: T.unsafe(nil), divider: T.unsafe(nil), padchar: T.unsafe(nil), trim: T.unsafe(nil), **_kw); end
# Print a Back-to-Back Stemplot to STDOUT
#
# - +plt1+ Leaf data is printed on the left.
# - Common stem data is printed in the center.
# - +plt2+ Leaf data is printed on the right.
# - Key is printed at the bottom.
#
# @param plt1 [Stemplot] Stemplot object for the left side
# @param plt2 [Stemplot] Stemplot object for the right side
# @param scale [Integer] Scale, should be a power of 10
# @param divider [String] Divider character between stem and leaf
# @param padchar [String] Padding character
# @param trim [Boolean] Trim missing stems from the plot
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#265
def stemplot2!(plt1, plt2, scale: T.unsafe(nil), divider: T.unsafe(nil), padchar: T.unsafe(nil), trim: T.unsafe(nil), **_kw); end
class << self
# @overload barplot
# @overload barplot
#
# source://unicode_plot//lib/unicode_plot/barplot.rb#123
def barplot(*args, width: T.unsafe(nil), color: T.unsafe(nil), symbol: T.unsafe(nil), border: T.unsafe(nil), xscale: T.unsafe(nil), xlabel: T.unsafe(nil), data: T.unsafe(nil), **kw); end
# @overload barplot!
# @overload barplot!
#
# source://unicode_plot//lib/unicode_plot/barplot.rb#177
def barplot!(plot, *args, data: T.unsafe(nil)); end
# source://unicode_plot//lib/unicode_plot/renderer.rb#43
def border_types; end
# source://unicode_plot//lib/unicode_plot/boxplot.rb#94
def boxplot(*args, data: T.unsafe(nil), border: T.unsafe(nil), color: T.unsafe(nil), width: T.unsafe(nil), xlim: T.unsafe(nil), **kw); end
# source://unicode_plot//lib/unicode_plot/boxplot.rb#157
def boxplot!(plot, *args, **kw); end
# source://unicode_plot//lib/unicode_plot/canvas.rb#167
def canvas_types; end
# source://unicode_plot//lib/unicode_plot/stairs.rb#63
def compute_stair_lines(x, y, style: T.unsafe(nil)); end
# source://unicode_plot//lib/unicode_plot/densityplot.rb#2
def densityplot(x, y, color: T.unsafe(nil), grid: T.unsafe(nil), name: T.unsafe(nil), **kw); end
# source://unicode_plot//lib/unicode_plot/densityplot.rb#7
def densityplot!(plot, x, y, **kw); end
# source://unicode_plot//lib/unicode_plot/histogram.rb#4
def histogram(x, nbins: T.unsafe(nil), closed: T.unsafe(nil), symbol: T.unsafe(nil), **kw); end
# @overload lineplot
#
# source://unicode_plot//lib/unicode_plot/lineplot.rb#33
def lineplot(*args, canvas: T.unsafe(nil), color: T.unsafe(nil), name: T.unsafe(nil), **kw); end
# @overload lineplot!
#
# source://unicode_plot//lib/unicode_plot/lineplot.rb#80
def lineplot!(plot, *args, color: T.unsafe(nil), name: T.unsafe(nil)); end
# source://unicode_plot//lib/unicode_plot/scatterplot.rb#5
def scatterplot(*args, canvas: T.unsafe(nil), color: T.unsafe(nil), name: T.unsafe(nil), **kw); end
# source://unicode_plot//lib/unicode_plot/scatterplot.rb#27
def scatterplot!(plot, *args, color: T.unsafe(nil), name: T.unsafe(nil)); end
# @overload stairs
#
# source://unicode_plot//lib/unicode_plot/stairs.rb#52
def stairs(xvec, yvec, style: T.unsafe(nil), **kw); end
# Similar to stairs, but takes an existing plot object as a first argument.
#
# source://unicode_plot//lib/unicode_plot/stairs.rb#58
def stairs!(plot, xvec, yvec, style: T.unsafe(nil), **kw); end
# Generates one or more {Stemplot} objects from the input data
# and prints a Single or Double stemplot using {stemplot1!} or {stemplot2!}
#
# @example Single sided stemplot
# >> UnicodePlot.stemplot(eighty_ints)
# 0 | 257
# 1 | 00335679
# 2 | 034455899
# 3 | 145588
# 4 | 0022223
# 5 | 0223399
# 6 | 012345568889
# 7 | 01133334466777888
# 8 | 013689
# 9 | 22667
# Key: 1|0 = 10
# The decimal is 1 digit(s) to the right of |
# @example Back-to-back stemplot
# >> UnicodePlot.stemplot(eighty_ints, another_eighty_ints)
# 752 | 0 | 1244457899
# 97653300 | 1 | 4799
# 998554430 | 2 | 015668
# 885541 | 3 | 0144557888899
# 3222200 | 4 | 00268
# 9933220 | 5 | 0234778
# 988865543210 | 6 | 122222357889
# 88877766443333110 | 7 | 134556689
# 986310 | 8 | 24589
# 76622 | 9 | 022234468
# Key: 1|0 = 10
# The decimal is 1 digit(s) to the right of |
# @see Stemplot
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#323
def stemplot(*args, scale: T.unsafe(nil), **kw); end
# Print a Single-Vector stemplot to STDOUT.
#
# - Stem data is printed on the left.
# - Leaf data is printed on the right.
# - Key is printed at the bottom.
#
# @param plt [Stemplot] Stemplot object
# @param scale [Integer] Scale, should be a power of 10
# @param divider [String] Divider character between stem and leaf
# @param padchar [String] Padding character
# @param trim [Boolean] Trim missing stems from the plot
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#233
def stemplot1!(plt, scale: T.unsafe(nil), divider: T.unsafe(nil), padchar: T.unsafe(nil), trim: T.unsafe(nil), **_kw); end
# Print a Back-to-Back Stemplot to STDOUT
#
# - +plt1+ Leaf data is printed on the left.
# - Common stem data is printed in the center.
# - +plt2+ Leaf data is printed on the right.
# - Key is printed at the bottom.
#
# @param plt1 [Stemplot] Stemplot object for the left side
# @param plt2 [Stemplot] Stemplot object for the right side
# @param scale [Integer] Scale, should be a power of 10
# @param divider [String] Divider character between stem and leaf
# @param padchar [String] Padding character
# @param trim [Boolean] Trim missing stems from the plot
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#265
def stemplot2!(plt1, plt2, scale: T.unsafe(nil), divider: T.unsafe(nil), padchar: T.unsafe(nil), trim: T.unsafe(nil), **_kw); end
end
end
# source://unicode_plot//lib/unicode_plot/canvas/ascii_canvas.rb#4
class UnicodePlot::AsciiCanvas < ::UnicodePlot::LookupCanvas
# @return [AsciiCanvas] a new instance of AsciiCanvas
#
# source://unicode_plot//lib/unicode_plot/canvas/ascii_canvas.rb#110
def initialize(width, height, **kw); end
# source://unicode_plot//lib/unicode_plot/canvas/ascii_canvas.rb#120
def lookup_decode(code); end
# source://unicode_plot//lib/unicode_plot/canvas/ascii_canvas.rb#116
def lookup_encode(x, y); end
end
# source://unicode_plot//lib/unicode_plot/canvas/ascii_canvas.rb#99
UnicodePlot::AsciiCanvas::ASCII_DECODE = T.let(T.unsafe(nil), Array)
# source://unicode_plot//lib/unicode_plot/canvas/ascii_canvas.rb#13
UnicodePlot::AsciiCanvas::ASCII_LOOKUP = T.let(T.unsafe(nil), Hash)
# source://unicode_plot//lib/unicode_plot/canvas/ascii_canvas.rb#7
UnicodePlot::AsciiCanvas::ASCII_SIGNS = T.let(T.unsafe(nil), Array)
# source://unicode_plot//lib/unicode_plot/canvas/ascii_canvas.rb#108
UnicodePlot::AsciiCanvas::PIXEL_PER_CHAR = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/renderer.rb#37
UnicodePlot::BORDER_MAP = T.let(T.unsafe(nil), Hash)
# source://unicode_plot//lib/unicode_plot/barplot.rb#2
class UnicodePlot::Barplot < ::UnicodePlot::Plot
include ::UnicodePlot::ValueTransformer
# @return [Barplot] a new instance of Barplot
#
# source://unicode_plot//lib/unicode_plot/barplot.rb#9
def initialize(bars, width, color, symbol, transform, **kw); end
# source://unicode_plot//lib/unicode_plot/barplot.rb#36
def add_row!(bars); end
# Returns the value of attribute max_freq.
#
# source://unicode_plot//lib/unicode_plot/barplot.rb#24
def max_freq; end
# Returns the value of attribute max_len.
#
# source://unicode_plot//lib/unicode_plot/barplot.rb#25
def max_len; end
# source://unicode_plot//lib/unicode_plot/barplot.rb#32
def n_columns; end
# source://unicode_plot//lib/unicode_plot/barplot.rb#28
def n_rows; end
# source://unicode_plot//lib/unicode_plot/barplot.rb#42
def print_row(out, row_index); end
# Returns the value of attribute width.
#
# source://unicode_plot//lib/unicode_plot/barplot.rb#26
def width; end
private
# source://unicode_plot//lib/unicode_plot/barplot.rb#59
def find_max(values); end
end
# source://unicode_plot//lib/unicode_plot/barplot.rb#6
UnicodePlot::Barplot::DEFAULT_COLOR = T.let(T.unsafe(nil), Symbol)
# source://unicode_plot//lib/unicode_plot/barplot.rb#7
UnicodePlot::Barplot::DEFAULT_SYMBOL = T.let(T.unsafe(nil), String)
# source://unicode_plot//lib/unicode_plot/barplot.rb#5
UnicodePlot::Barplot::MIN_WIDTH = T.let(T.unsafe(nil), Integer)
# The `BlockCanvas` is also Unicode-based.
# It has half the resolution of the `BrailleCanvas`.
# In contrast to BrailleCanvas, the pixels don't
# have visible spacing between them.
# This canvas effectively turns every character
# into 4 pixels that can individually be manipulated
# using binary operations.
#
# source://unicode_plot//lib/unicode_plot/canvas/block_canvas.rb#9
class UnicodePlot::BlockCanvas < ::UnicodePlot::LookupCanvas
# @return [BlockCanvas] a new instance of BlockCanvas
#
# source://unicode_plot//lib/unicode_plot/canvas/block_canvas.rb#15
def initialize(width, height, fill_char = T.unsafe(nil), **kw); end
# source://unicode_plot//lib/unicode_plot/canvas/block_canvas.rb#36
def lookup_decode(x); end
# source://unicode_plot//lib/unicode_plot/canvas/block_canvas.rb#35
def lookup_encode(x, y); end
end
# source://unicode_plot//lib/unicode_plot/canvas/block_canvas.rb#28
UnicodePlot::BlockCanvas::BLOCK_DECODE = T.let(T.unsafe(nil), Array)
# source://unicode_plot//lib/unicode_plot/canvas/block_canvas.rb#23
UnicodePlot::BlockCanvas::BLOCK_SIGNS = T.let(T.unsafe(nil), Array)
# source://unicode_plot//lib/unicode_plot/canvas/block_canvas.rb#12
UnicodePlot::BlockCanvas::X_PIXEL_PER_CHAR = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/canvas/block_canvas.rb#13
UnicodePlot::BlockCanvas::Y_PIXEL_PER_CHAR = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/renderer.rb#2
module UnicodePlot::BorderMaps; end
# source://unicode_plot//lib/unicode_plot/renderer.rb#25
UnicodePlot::BorderMaps::BORDER_BARPLOT = T.let(T.unsafe(nil), Hash)
# source://unicode_plot//lib/unicode_plot/renderer.rb#14
UnicodePlot::BorderMaps::BORDER_CORNERS = T.let(T.unsafe(nil), Hash)
# source://unicode_plot//lib/unicode_plot/renderer.rb#3
UnicodePlot::BorderMaps::BORDER_SOLID = T.let(T.unsafe(nil), Hash)
# source://unicode_plot//lib/unicode_plot/renderer.rb#47
module UnicodePlot::BorderPrinter
include ::UnicodePlot::StyledPrinter
# source://unicode_plot//lib/unicode_plot/renderer.rb#56
def print_border_bottom(out, padding, length, border = T.unsafe(nil), color: T.unsafe(nil)); end
# source://unicode_plot//lib/unicode_plot/renderer.rb#50
def print_border_top(out, padding, length, border = T.unsafe(nil), color: T.unsafe(nil)); end
end
# source://unicode_plot//lib/unicode_plot/boxplot.rb#4
class UnicodePlot::Boxplot < ::UnicodePlot::Plot
# @return [Boxplot] a new instance of Boxplot
#
# source://unicode_plot//lib/unicode_plot/boxplot.rb#8
def initialize(data, width, color, min_x, max_x, **kw); end
# source://unicode_plot//lib/unicode_plot/boxplot.rb#37
def add_series!(data); end
# Returns the value of attribute max_x.
#
# source://unicode_plot//lib/unicode_plot/boxplot.rb#23
def max_x; end
# Returns the value of attribute min_x.
#
# source://unicode_plot//lib/unicode_plot/boxplot.rb#22
def min_x; end
# source://unicode_plot//lib/unicode_plot/boxplot.rb#33
def n_columns; end
# source://unicode_plot//lib/unicode_plot/boxplot.rb#25
def n_data; end
# source://unicode_plot//lib/unicode_plot/boxplot.rb#29
def n_rows; end
# source://unicode_plot//lib/unicode_plot/boxplot.rb#44
def print_row(out, row_index); end
private
# source://unicode_plot//lib/unicode_plot/boxplot.rb#86
def transform(values); end
end
# source://unicode_plot//lib/unicode_plot/boxplot.rb#6
UnicodePlot::Boxplot::DEFAULT_COLOR = T.let(T.unsafe(nil), Symbol)
# source://unicode_plot//lib/unicode_plot/boxplot.rb#5
UnicodePlot::Boxplot::MIN_WIDTH = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/canvas/braille_canvas.rb#2
class UnicodePlot::BrailleCanvas < ::UnicodePlot::Canvas
# @return [BrailleCanvas] a new instance of BrailleCanvas
#
# source://unicode_plot//lib/unicode_plot/canvas/braille_canvas.rb#23
def initialize(width, height, **kw); end
# source://unicode_plot//lib/unicode_plot/canvas/braille_canvas.rb#33
def pixel!(pixel_x, pixel_y, color); end
# source://unicode_plot//lib/unicode_plot/canvas/braille_canvas.rb#56
def print_row(out, row_index); end
end
# source://unicode_plot//lib/unicode_plot/canvas/braille_canvas.rb#8
UnicodePlot::BrailleCanvas::BRAILLE_SIGNS = T.let(T.unsafe(nil), Array)
# source://unicode_plot//lib/unicode_plot/canvas/braille_canvas.rb#5
UnicodePlot::BrailleCanvas::X_PIXEL_PER_CHAR = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/canvas/braille_canvas.rb#6
UnicodePlot::BrailleCanvas::Y_PIXEL_PER_CHAR = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/canvas.rb#2
class UnicodePlot::Canvas
include ::UnicodePlot::StyledPrinter
include ::UnicodePlot::BorderPrinter
# @return [Canvas] a new instance of Canvas
#
# source://unicode_plot//lib/unicode_plot/canvas.rb#17
def initialize(width, height, pixel_width, pixel_height, fill_char, origin_x: T.unsafe(nil), origin_y: T.unsafe(nil), plot_width: T.unsafe(nil), plot_height: T.unsafe(nil), x_pixel_per_char: T.unsafe(nil), y_pixel_per_char: T.unsafe(nil)); end
# source://unicode_plot//lib/unicode_plot/canvas.rb#71
def char_at(x, y); end
# source://unicode_plot//lib/unicode_plot/canvas.rb#75
def color_at(x, y); end
# Returns the value of attribute height.
#
# source://unicode_plot//lib/unicode_plot/canvas.rb#39
def height; end
# source://unicode_plot//lib/unicode_plot/canvas.rb#79
def index_at(x, y); end
# digital differential analyzer algorithm
#
# source://unicode_plot//lib/unicode_plot/canvas.rb#112
def line!(x1, y1, x2, y2, color); end
# source://unicode_plot//lib/unicode_plot/canvas.rb#149
def lines!(x, y, color = T.unsafe(nil)); end
# Returns the value of attribute origin_x.
#
# source://unicode_plot//lib/unicode_plot/canvas.rb#42
def origin_x; end
# Returns the value of attribute origin_y.
#
# source://unicode_plot//lib/unicode_plot/canvas.rb#43
def origin_y; end
# Returns the value of attribute pixel_height.
#
# source://unicode_plot//lib/unicode_plot/canvas.rb#41
def pixel_height; end
# Returns the value of attribute pixel_width.
#
# source://unicode_plot//lib/unicode_plot/canvas.rb#40
def pixel_width; end
# Returns the value of attribute plot_height.
#
# source://unicode_plot//lib/unicode_plot/canvas.rb#45
def plot_height; end
# Returns the value of attribute plot_width.
#
# source://unicode_plot//lib/unicode_plot/canvas.rb#44
def plot_width; end
# source://unicode_plot//lib/unicode_plot/canvas.rb#84
def point!(x, y, color); end
# source://unicode_plot//lib/unicode_plot/canvas.rb#99
def points!(x, y, color = T.unsafe(nil)); end
# source://unicode_plot//lib/unicode_plot/canvas.rb#64
def print(out); end
# source://unicode_plot//lib/unicode_plot/canvas.rb#49
def show(out); end
# Returns the value of attribute width.
#
# source://unicode_plot//lib/unicode_plot/canvas.rb#38
def width; end
# Returns the value of attribute x_pixel_per_char.
#
# source://unicode_plot//lib/unicode_plot/canvas.rb#46
def x_pixel_per_char; end
# Returns the value of attribute y_pixel_per_char.
#
# source://unicode_plot//lib/unicode_plot/canvas.rb#47
def y_pixel_per_char; end
private
# @raise [ArgumentError]
#
# source://unicode_plot//lib/unicode_plot/canvas.rb#161
def check_positive(value, name); end
class << self
# source://unicode_plot//lib/unicode_plot/canvas.rb#7
def create(canvas_type, width, height, **kw); end
end
end
# source://unicode_plot//lib/unicode_plot/canvas.rb#5
UnicodePlot::Canvas::CANVAS_CLASS_MAP = T.let(T.unsafe(nil), Hash)
# source://unicode_plot//lib/unicode_plot/canvas/density_canvas.rb#2
class UnicodePlot::DensityCanvas < ::UnicodePlot::Canvas
# @return [DensityCanvas] a new instance of DensityCanvas
#
# source://unicode_plot//lib/unicode_plot/canvas/density_canvas.rb#13
def initialize(width, height, **kw); end
# source://unicode_plot//lib/unicode_plot/canvas/density_canvas.rb#26
def pixel!(pixel_x, pixel_y, color); end
# source://unicode_plot//lib/unicode_plot/canvas/density_canvas.rb#45
def print_row(out, row_index); end
end
# source://unicode_plot//lib/unicode_plot/canvas/density_canvas.rb#5
UnicodePlot::DensityCanvas::DENSITY_SIGNS = T.let(T.unsafe(nil), Array)
# source://unicode_plot//lib/unicode_plot/canvas/density_canvas.rb#8
UnicodePlot::DensityCanvas::MIN_HEIGHT = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/canvas/density_canvas.rb#7
UnicodePlot::DensityCanvas::MIN_WIDTH = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/canvas/density_canvas.rb#10
UnicodePlot::DensityCanvas::X_PIXEL_PER_CHAR = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/canvas/density_canvas.rb#11
UnicodePlot::DensityCanvas::Y_PIXEL_PER_CHAR = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/canvas/dot_canvas.rb#2
class UnicodePlot::DotCanvas < ::UnicodePlot::LookupCanvas
# @return [DotCanvas] a new instance of DotCanvas
#
# source://unicode_plot//lib/unicode_plot/canvas/dot_canvas.rb#22
def initialize(width, height, **kw); end
# source://unicode_plot//lib/unicode_plot/canvas/dot_canvas.rb#32
def lookup_decode(code); end
# source://unicode_plot//lib/unicode_plot/canvas/dot_canvas.rb#28
def lookup_encode(x, y); end
end
# source://unicode_plot//lib/unicode_plot/canvas/dot_canvas.rb#12
UnicodePlot::DotCanvas::DOT_DECODE = T.let(T.unsafe(nil), Array)
# source://unicode_plot//lib/unicode_plot/canvas/dot_canvas.rb#5
UnicodePlot::DotCanvas::DOT_SIGNS = T.let(T.unsafe(nil), Array)
# source://unicode_plot//lib/unicode_plot/canvas/dot_canvas.rb#19
UnicodePlot::DotCanvas::X_PIXEL_PER_CHAR = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/canvas/dot_canvas.rb#20
UnicodePlot::DotCanvas::Y_PIXEL_PER_CHAR = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#2
class UnicodePlot::GridPlot < ::UnicodePlot::Plot
# @return [GridPlot] a new instance of GridPlot
#
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#7
def initialize(x, y, canvas, width: T.unsafe(nil), height: T.unsafe(nil), xlim: T.unsafe(nil), ylim: T.unsafe(nil), grid: T.unsafe(nil), **kw); end
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#92
def lines!(x, y, color); end
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#84
def n_columns; end
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#80
def n_rows; end
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#64
def origin_x; end
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#68
def origin_y; end
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#76
def plot_height; end
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#72
def plot_width; end
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#88
def points!(x, y, color); end
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#96
def print_row(out, row_index); end
end
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#5
UnicodePlot::GridPlot::DEFAULT_HEIGHT = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#4
UnicodePlot::GridPlot::MIN_HEIGHT = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/grid_plot.rb#3
UnicodePlot::GridPlot::MIN_WIDTH = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/io_context.rb#4
class UnicodePlot::IOContext
extend ::Forwardable
# @return [IOContext] a new instance of IOContext
#
# source://unicode_plot//lib/unicode_plot/io_context.rb#7
def initialize(io, color: T.unsafe(nil)); end
# @return [Boolean]
#
# source://unicode_plot//lib/unicode_plot/io_context.rb#14
def color?; end
# source://forwardable/1.3.3/forwardable.rb#231
def print(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def puts(*args, **_arg1, &block); end
private
# source://unicode_plot//lib/unicode_plot/io_context.rb#23
def check_color(color); end
end
# source://unicode_plot//lib/unicode_plot/lineplot.rb#4
class UnicodePlot::Lineplot < ::UnicodePlot::GridPlot; end
# source://unicode_plot//lib/unicode_plot/canvas/lookup_canvas.rb#2
class UnicodePlot::LookupCanvas < ::UnicodePlot::Canvas
# @return [LookupCanvas] a new instance of LookupCanvas
#
# source://unicode_plot//lib/unicode_plot/canvas/lookup_canvas.rb#3
def initialize(width, height, x_pixel_per_char, y_pixel_per_char, fill_char = T.unsafe(nil), **kw); end
# source://unicode_plot//lib/unicode_plot/canvas/lookup_canvas.rb#13
def pixel!(pixel_x, pixel_y, color); end
# source://unicode_plot//lib/unicode_plot/canvas/lookup_canvas.rb#36
def print_row(out, row_index); end
end
# source://unicode_plot//lib/unicode_plot/stemplot.rb#137
class UnicodePlot::NumericStemplot < ::UnicodePlot::Stemplot
# @return [NumericStemplot] a new instance of NumericStemplot
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#138
def initialize(vector, scale: T.unsafe(nil), **kw); end
# Print key to STDOUT
#
# @param scale [Integer] Scale, should be a power of 10
# @param divider [String] Divider character between stem and leaf
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#154
def print_key(scale, divider); end
class << self
# Used when we have stems from a back-to-back stemplot and a combined list of stems is given
#
# @param stems [Array] Concatenated list of stems from two plots
# @param all [Boolean] Return all stems if true, otherwise only return stems if a leaf exists for a stem
# @return [Array] Sorted list of stems
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#168
def sorted_stem_list(stems, all: T.unsafe(nil)); end
end
end
# source://unicode_plot//lib/unicode_plot/plot.rb#2
class UnicodePlot::Plot
include ::UnicodePlot::StyledPrinter
# @return [Plot] a new instance of Plot
#
# source://unicode_plot//lib/unicode_plot/plot.rb#10
def initialize(title: T.unsafe(nil), xlabel: T.unsafe(nil), ylabel: T.unsafe(nil), border: T.unsafe(nil), margin: T.unsafe(nil), padding: T.unsafe(nil), labels: T.unsafe(nil)); end
# source://unicode_plot//lib/unicode_plot/plot.rb#66
def annotate!(loc, value, color: T.unsafe(nil)); end
# source://unicode_plot//lib/unicode_plot/plot.rb#93
def annotate_row!(loc, row_index, value, color: T.unsafe(nil)); end
# Returns the value of attribute border.
#
# source://unicode_plot//lib/unicode_plot/plot.rb#36
def border; end
# Returns the value of attribute colors_deco.
#
# source://unicode_plot//lib/unicode_plot/plot.rb#44
def colors_deco; end
# Returns the value of attribute colors_left.
#
# source://unicode_plot//lib/unicode_plot/plot.rb#40
def colors_left; end
# Returns the value of attribute colors_right.
#
# source://unicode_plot//lib/unicode_plot/plot.rb#42
def colors_right; end
# Returns the value of attribute decorations.
#
# source://unicode_plot//lib/unicode_plot/plot.rb#43
def decorations; end
# Returns the value of attribute labels_left.
#
# source://unicode_plot//lib/unicode_plot/plot.rb#39
def labels_left; end
# Returns the value of attribute labels_right.
#
# source://unicode_plot//lib/unicode_plot/plot.rb#41
def labels_right; end
# Returns the value of attribute margin.
#
# source://unicode_plot//lib/unicode_plot/plot.rb#37
def margin; end
# source://unicode_plot//lib/unicode_plot/plot.rb#119
def next_color; end
# Returns the value of attribute padding.
#
# source://unicode_plot//lib/unicode_plot/plot.rb#38
def padding; end
# source://unicode_plot//lib/unicode_plot/plot.rb#106
def render(out = T.unsafe(nil), newline: T.unsafe(nil), color: T.unsafe(nil)); end
# @return [Boolean]
#
# source://unicode_plot//lib/unicode_plot/plot.rb#62
def show_labels?; end
# Returns the value of attribute title.
#
# source://unicode_plot//lib/unicode_plot/plot.rb#33
def title; end
# @return [Boolean]
#
# source://unicode_plot//lib/unicode_plot/plot.rb#46
def title_given?; end
# source://unicode_plot//lib/unicode_plot/plot.rb#125
def to_s; end
# Returns the value of attribute xlabel.
#
# source://unicode_plot//lib/unicode_plot/plot.rb#34
def xlabel; end
# @return [Boolean]
#
# source://unicode_plot//lib/unicode_plot/plot.rb#50
def xlabel_given?; end
# Returns the value of attribute ylabel.
#
# source://unicode_plot//lib/unicode_plot/plot.rb#35
def ylabel; end
# @return [Boolean]
#
# source://unicode_plot//lib/unicode_plot/plot.rb#54
def ylabel_given?; end
# source://unicode_plot//lib/unicode_plot/plot.rb#58
def ylabel_length; end
private
# @raise [ArgumentError]
#
# source://unicode_plot//lib/unicode_plot/plot.rb#146
def check_border(border); end
# source://unicode_plot//lib/unicode_plot/plot.rb#133
def check_margin(margin); end
# source://unicode_plot//lib/unicode_plot/plot.rb#140
def check_row_index(row_index); end
end
# source://unicode_plot//lib/unicode_plot/plot.rb#110
UnicodePlot::Plot::COLOR_CYCLE = T.let(T.unsafe(nil), Array)
# source://unicode_plot//lib/unicode_plot/plot.rb#6
UnicodePlot::Plot::DEFAULT_BORDER = T.let(T.unsafe(nil), Symbol)
# source://unicode_plot//lib/unicode_plot/plot.rb#7
UnicodePlot::Plot::DEFAULT_MARGIN = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/plot.rb#8
UnicodePlot::Plot::DEFAULT_PADDING = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/plot.rb#5
UnicodePlot::Plot::DEFAULT_WIDTH = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/renderer.rb#63
class UnicodePlot::Renderer
include ::UnicodePlot::StyledPrinter
include ::UnicodePlot::BorderPrinter
# @return [Renderer] a new instance of Renderer
#
# source://unicode_plot//lib/unicode_plot/renderer.rb#70
def initialize(plot); end
# Returns the value of attribute out.
#
# source://unicode_plot//lib/unicode_plot/renderer.rb#76
def out; end
# Returns the value of attribute plot.
#
# source://unicode_plot//lib/unicode_plot/renderer.rb#75
def plot; end
# source://unicode_plot//lib/unicode_plot/renderer.rb#78
def render(out, newline); end
private
# source://unicode_plot//lib/unicode_plot/renderer.rb#203
def init_render; end
# source://unicode_plot//lib/unicode_plot/renderer.rb#247
def nocolor_string(str); end
# source://unicode_plot//lib/unicode_plot/renderer.rb#239
def print(*args); end
# source://unicode_plot//lib/unicode_plot/renderer.rb#231
def print_title(padding, title, p_width: T.unsafe(nil), color: T.unsafe(nil)); end
# source://unicode_plot//lib/unicode_plot/renderer.rb#243
def puts(*args); end
# source://unicode_plot//lib/unicode_plot/renderer.rb#171
def render_bottom; end
# source://unicode_plot//lib/unicode_plot/renderer.rb#126
def render_row(row); end
# render all rows
#
# source://unicode_plot//lib/unicode_plot/renderer.rb#122
def render_rows; end
# source://unicode_plot//lib/unicode_plot/renderer.rb#90
def render_top; end
class << self
# source://unicode_plot//lib/unicode_plot/renderer.rb#66
def render(out, plot, newline); end
end
end
# source://unicode_plot//lib/unicode_plot/scatterplot.rb#2
class UnicodePlot::Scatterplot < ::UnicodePlot::GridPlot; end
# ## Description
#
# Draw a stem-leaf plot of the given vector +vec+.
#
# ```
# stemplot(vec, **kwargs)
# ```
#
# Draw a back-to-back stem-leaf plot of the given vectors +vec1+ and +vec2+.
#
# ```
# stemplot(vec1, vec2, **kwargs)
# ```
#
# The vectors can be any object that converts to an Array, e.g. an Array, Range, etc.
# If all elements of the vector are Numeric, the stem-leaf plot is classified as a
# {NumericStemplot}, otherwise it is classified as a {StringStemplot}. Back-to-back
# stem-leaf plots must be the same type, i.e. String and Numeric stem-leaf plots cannot
# be mixed in a back-to-back plot.
#
# ## Usage
#
# stemplot(vec, [vec2], scale:, divider:, padchar:, trim: )
#
# ## Arguments
#
# - +vec+: Vector for which the stem leaf plot should be computed.
# - +vec2+: Optional secondary vector, will be used to create a back-to-back stem-leaf plot.
# - +scale+: Set scale of plot. Default = 10. Scale is changed via orders of magnitude. Common values are 0.1, 1, and 10. For String stems, the default value of 10 is a one character stem, 100 is a two character stem.
# - +divider+: Character for break between stem and leaf. Default = "|"
# - +padchar+: Character(s) to separate stems, leaves and dividers. Default = " "
# - +trim+: Trims the stem labels when there are no leaves. This can be useful if your data is sparse. Default = +false+
# - +string_padchar+: Character used to replace missing position for input strings shorter than the stem-size. Default = "_"
#
# ## Result
# A plot of object type is sent to <tt>$stdout</tt>
#
# @example Examples using Numbers
# # Generate some numbers
# fifty_floats = 50.times.map { rand(-1000..1000)/350.0 }
# eighty_ints = 80.times.map { rand(1..100) }
# another_eighty_ints = 80.times.map { rand(1..100) }
# three_hundred_ints = 300.times.map { rand(-100..100) }
#
# # Single sided stem-plot
# UnicodePlot.stemplot(eighty_ints)
#
# # Single sided stem-plot with positive and negative values
# UnicodePlot.stemplot(three_hundred_ints)
#
# # Single sided stem-plot using floating point values, scaled
# UnicodePlot.stemplot(fifty_floats, scale: 1)
#
# # Single sided stem-plot using floating point values, scaled with new divider
# UnicodePlot.stemplot(fifty_floats, scale: 1, divider: "😄")
#
# # Back to back stem-plot
# UnicodePlot.stemplot(eighty_ints, another_eighty_ints)
# @example Examples using Strings
# # Generate some strings
# words_1 = %w[apple junk ant age bee bar baz dog egg a]
# words_2 = %w[ape flan can cat juice elf gnome child fruit]
#
# # Single sided stem-plot
# UnicodePlot.stemplot(words_1)
#
# # Back to back stem-plot
# UnicodePlot.stemplot(words_1, words_2)
#
# # Scaled stem plot using scale=100 (two letters for the stem) and trimmed stems
# UnicodePlot.stemplot(words_1, scale: 100, trim: true)
#
# # Above, but changing the string_padchar
# UnicodePlot.stemplot(words_1, scale: 100, trim: true, string_padchar: '?')
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#81
class UnicodePlot::Stemplot
# Use {factory} method -- should not be directly called.
#
# @return [Stemplot] a new instance of Stemplot
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#84
def initialize(*_args, **_kw); end
# Insert a stem and leaf
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#104
def insert(stem, leaf); end
# Returns a list of leaves for a given stem
#
# @param stem [Object] The stem
# @return [Array] Unsorted list of leaves
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#118
def leaves(stem); end
# Determines largest length of any stem
#
# @return [Integer] Length value
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#124
def max_stem_length; end
# Returns an unsorted list of stems
#
# @return [Array] Unsorted list of stems
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#111
def raw_stems; end
# Returns a sorted list of stems
#
# @param all [Boolean] Return all stems if true, otherwise only return stems if a leaf exists for a stem
# @return [Array] Sorted list of stems
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#131
def stems(all: T.unsafe(nil)); end
class << self
# Factory method to create a Stemplot, creates either a NumericStemplot
# or StringStemplot depending on input.
#
# @param vector [Array] An array of elements to stem-leaf plot
# @return [NumericStemplot] If all elements are Numeric
# @return [StringStemplot] If any elements are not Numeric
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#94
def factory(vector, **kw); end
end
end
# source://unicode_plot//lib/unicode_plot/stemplot.rb#184
class UnicodePlot::StringStemplot < ::UnicodePlot::Stemplot
# @raise [ArgumentError]
# @return [StringStemplot] a new instance of StringStemplot
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#186
def initialize(vector, scale: T.unsafe(nil), string_padchar: T.unsafe(nil), **_kw); end
# Function prototype to provide same interface as {NumericStemplot}.
# This function does not do anything.
#
# @return [false]
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#203
def print_key(_scale, _divider); end
class << self
# Used when we have stems from a back-to-back stemplot and a combined list of stems is given
#
# @param stems [Array] Concatenated list of stems from two plots
# @param all [Boolean] Return all stems if true, otherwise only return stems if a leaf exists for a stem
# @return [Array] Sorted list of stems
#
# source://unicode_plot//lib/unicode_plot/stemplot.rb#212
def sorted_stem_list(stems, all: T.unsafe(nil)); end
end
end
# source://unicode_plot//lib/unicode_plot/styled_printer.rb#2
module UnicodePlot::StyledPrinter
# source://unicode_plot//lib/unicode_plot/styled_printer.rb#82
def print_color(out, color, *args); end
# source://unicode_plot//lib/unicode_plot/styled_printer.rb#60
def print_styled(out, *args, bold: T.unsafe(nil), color: T.unsafe(nil)); end
end
# source://unicode_plot//lib/unicode_plot/styled_printer.rb#58
UnicodePlot::StyledPrinter::COLOR_DECODE = T.let(T.unsafe(nil), Hash)
# source://unicode_plot//lib/unicode_plot/styled_printer.rb#47
UnicodePlot::StyledPrinter::COLOR_ENCODE = T.let(T.unsafe(nil), Hash)
# source://unicode_plot//lib/unicode_plot/styled_printer.rb#36
UnicodePlot::StyledPrinter::DISABLE_TEXT_STYLE = T.let(T.unsafe(nil), Hash)
# source://unicode_plot//lib/unicode_plot/styled_printer.rb#3
UnicodePlot::StyledPrinter::TEXT_COLORS = T.let(T.unsafe(nil), Hash)
# source://unicode_plot//lib/unicode_plot/utils.rb#2
module UnicodePlot::Utils
private
# source://unicode_plot//lib/unicode_plot/utils.rb#59
def ceil_neg_log10(x); end
# source://unicode_plot//lib/unicode_plot/utils.rb#5
def extend_limits(values, limits); end
# source://unicode_plot//lib/unicode_plot/utils.rb#29
def float_round_log10(x, m); end
# source://unicode_plot//lib/unicode_plot/utils.rb#22
def plotting_range_narrow(xmin, xmax); end
# source://unicode_plot//lib/unicode_plot/utils.rb#49
def round_down_subtick(x, m); end
# source://unicode_plot//lib/unicode_plot/utils.rb#39
def round_up_subtick(x, m); end
# source://unicode_plot//lib/unicode_plot/utils.rb#70
def roundable?(x); end
class << self
# source://unicode_plot//lib/unicode_plot/utils.rb#59
def ceil_neg_log10(x); end
# source://unicode_plot//lib/unicode_plot/utils.rb#5
def extend_limits(values, limits); end
# source://unicode_plot//lib/unicode_plot/utils.rb#29
def float_round_log10(x, m); end
# source://unicode_plot//lib/unicode_plot/utils.rb#22
def plotting_range_narrow(xmin, xmax); end
# source://unicode_plot//lib/unicode_plot/utils.rb#49
def round_down_subtick(x, m); end
# source://unicode_plot//lib/unicode_plot/utils.rb#39
def round_up_subtick(x, m); end
# @return [Boolean]
#
# source://unicode_plot//lib/unicode_plot/utils.rb#70
def roundable?(x); end
end
end
# source://unicode_plot//lib/unicode_plot/utils.rb#68
UnicodePlot::Utils::INT64_MAX = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/utils.rb#67
UnicodePlot::Utils::INT64_MIN = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/version.rb#2
UnicodePlot::VERSION = T.let(T.unsafe(nil), String)
# source://unicode_plot//lib/unicode_plot/value_transformer.rb#2
module UnicodePlot::ValueTransformer
# source://unicode_plot//lib/unicode_plot/value_transformer.rb#12
def transform_values(func, values); end
private
# source://unicode_plot//lib/unicode_plot/value_transformer.rb#30
def transform_name(func, basename = T.unsafe(nil)); end
class << self
# source://unicode_plot//lib/unicode_plot/value_transformer.rb#30
def transform_name(func, basename = T.unsafe(nil)); end
end
end
# source://unicode_plot//lib/unicode_plot/value_transformer.rb#3
UnicodePlot::ValueTransformer::PREDEFINED_TRANSFORM_FUNCTIONS = T.let(T.unsafe(nil), Hash)
# source://unicode_plot//lib/unicode_plot/version.rb#4
module UnicodePlot::Version; end
# source://unicode_plot//lib/unicode_plot/version.rb#6
UnicodePlot::Version::MAJOR = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/version.rb#6
UnicodePlot::Version::MICRO = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/version.rb#6
UnicodePlot::Version::MINOR = T.let(T.unsafe(nil), Integer)
# source://unicode_plot//lib/unicode_plot/version.rb#7
UnicodePlot::Version::STRING = T.let(T.unsafe(nil), String)
# source://unicode_plot//lib/unicode_plot/version.rb#5
UnicodePlot::Version::TAG = T.let(T.unsafe(nil), T.untyped)