Package ascii_graph¶
-
class
ascii_graph.__init__.
Pyasciigraph
(line_length=79, min_graph_length=50, separator_length=2, graphsymbol=None, multivalue=True, human_readable=None)¶ Constructor of Pyasciigraph
Parameters: - line_length (int) – the max number of char on a line if any line cannot be shorter, it will go over this limit. Default: 79
- min_graph_length (int) – the min number of char used by the graph itself. Default: 50
- separator_length (int) – the length of field separator. Default: 2
- graphsymbol (str or unicode (length one)) – the symbol used for the graph bar. Default: ‘█’
- multivalue (boolean) – displays all the values if multivalued when True. displays only the max value if False Default: True
- human_readable (string (si, cs, none)) –
trigger human readable display (K, G, etc) Default: None (raw value display)
- ‘si’ for power of 1000
- ‘cs’ for power of 1024
- any other value for raw value display)
-
graph
(label=None, data=[])¶ function generating the graph
Parameters: - label (string) – the label of the graph
- data (iterable) – the data (list of tuple (info, value)) info must be “castable” to a unicode string value must be an int or a float
Return type: a list of strings (each lines of the graph)