Skip to content

Commit bd497db

Browse files
committed
added docstrings
1 parent 34f5f9d commit bd497db

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

bashplotlib/histogram.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,18 @@ def run_demo():
5151
plot_hist('./data/exp.txt', height=35.0, bincount=40)
5252

5353
def plot_hist(f, height=20.0, bincount=None, pch="o", colour="white", title="", xlab=None, nosummary=True):
54-
"plot a histogram given a file of numbers"
54+
"""make a histogram
55+
56+
Keyword arguments:
57+
height -- the height of the histogram in # of lines
58+
bincount -- number of bins in the histogram
59+
pch -- shape of the bars in the plot
60+
colour -- colour of the bars in the terminal
61+
title -- title at the top of the plot
62+
xlab -- boolen value for whether or not to display x-axis labels
63+
nosummary -- boolean value for whether or not to display a summary
64+
"""
65+
5566
if pch is None:
5667
pch = "o"
5768

bashplotlib/scatterplot.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ def get_scale(series, is_y=False, steps=20):
2020
return scaled_series
2121

2222
def plot_scatter(f, xs, ys, size, pch, colour, title):
23+
"""Form a complex number.
24+
25+
Arguments:
26+
f -- comma delimited file w/ x,y coordinates
27+
xs -- if f not specified this is a file w/ x coordinates
28+
ys -- if f not specified this is a filew / y coordinates
29+
size -- size of the plot
30+
pch -- shape of the points (any character)
31+
colour -- colour of the points
32+
title -- title of the plot
33+
"""
34+
2335
if f:
2436
if isinstance(f, str):
2537
f = open(f)

examples/histogramhelp.png

39.5 KB
Loading

examples/scatterplothelp.png

26.7 KB
Loading

0 commit comments

Comments
 (0)