Lampese/mathplotlib/scene/gridspec does not have a README file
pub(all) suberror LayoutError {
InvalidDimension
InvalidSpacing
InvalidRatios
InvalidBounds
CellOutOfBounds
}fn GridSpec::cell(self : GridSpec, row : Int, column : Int, figure_width : Int, figure_height : Int, margin : Int) -> Rect raise LayoutErrorfn GridSpec::cells(self : GridSpec, figure_width : Int, figure_height : Int, margin : Int) -> Array[Rect] raise LayoutErrorfn GridSpec::subplot(self : GridSpec, row_start : Int, row_end : Int, column_start : Int, column_end : Int) -> SubplotSpec raise LayoutErrorpub struct Rect {
x : Double
y : Double
width : Double
height : Double
}pub(all) enum ShareMode {
None
All
Row
Column
}pub struct SubplotSpec {
grid : GridSpec
row_start : Int
row_end : Int
column_start : Int
column_end : Int
}fn SubplotSpec::rect(self : SubplotSpec, figure_width : Int, figure_height : Int, margin : Int) -> Rectfn SubplotSpec::rect_with_bounds(self : SubplotSpec, figure_width : Int, figure_height : Int, left : Double, bottom : Double, right : Double, top : Double, wspace? : Double, hspace? : Double) -> Rectfn SubplotSpec::subgridspec(self : SubplotSpec, rows : Int, columns : Int, hspace? : Double, vspace? : Double, width_ratios? : Array[Double], height_ratios? : Array[Double]) -> GridSpec raise LayoutErrorfn gridspec(rows : Int, columns : Int, hspace? : Double, vspace? : Double, width_ratios? : Array[Double], height_ratios? : Array[Double]) -> GridSpec raise LayoutErrortest {
let bounds = @gridspec.rect(10.0, 20.0, 30.0, 40.0)
assert_eq((bounds.x(), bounds.y()), (10.0, 20.0))
assert_eq((bounds.width(), bounds.height()), (30.0, 40.0))
}