ggplotnim/ggplot_utils

Source   Edit  

Procs

proc calcRowsColumns(rows, columns: int; nPlots: int): (int, int) {....raises: [],
    tags: [].}
Calculates the desired rows and columns for # of nPlots given the user's input for rows and columns.
  • If no input is given, calculate the next possible rectangle of plots that favors columns over rows.
  • If either row or column is 0, sets this dimension to 1
  • If either row or column is -1, calculate square of nPlots for rows / cols
  • If both row and column is -1 or either -1 and the other 0, default back to the next possible square.
Source   Edit  
func font[T: SomeNumber](size: T = 12.0; color = color(0.0, 0.0, 0.0);
                         family = "sans-serif"; alignKind = taCenter;
                         bold = false; slant: FontSlant = fsNormal): Font
Source   Edit  

Templates

template unwrap[T](opt: Option[T]; raiseIfNil = true): untyped
Source   Edit