Skip to content

Commit

Permalink
Merge pull request #19 from NicolasSoemer/master
Browse files Browse the repository at this point in the history
Added a Docstring to __init__.py, to make the use of cfg more intuitive
  • Loading branch information
kroitor authored May 12, 2019
2 parents 9212b53 + aec20b9 commit 06d1ef0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion asciichartpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
# -----------------------------------------------------------------------------

def plot(series, cfg={}):

""" Possible cfg parameters are 'offset', 'padding', 'height' and 'format'.
cfg is a dictionary, thus dictionary syntax has to be used.
Example: print(plot(series, { 'height' :10 }))
"""
minimum = cfg['minimum'] if 'minimum' in cfg else min(series)
maximum = cfg['maximum'] if 'maximum' in cfg else max(series)

Expand Down

0 comments on commit 06d1ef0

Please sign in to comment.