Skip to content

Commit 346c50e

Browse files
committed
Some mior documentation
1 parent a810d6c commit 346c50e

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ In [3]: X = sorted(np.random.normal(size=1000))
3333
**Plot:**
3434
```python
3535
In [4]: plotille.plot?
36-
Signature: plot(X, Y, width=80, height=50, X_label='X', Y_label='Y', linesep='\n', interp='linear')
36+
Signature: plot(X, Y, width=80, height=50, X_label='X', Y_label='Y', linesep=os.linesep, interp='linear')
3737
Docstring:
3838
Create plot with X , Y values and linear interpolation between points
3939

@@ -56,10 +56,13 @@ In [5]: print(plotille.plot(X, np.sin(X), height=50))
5656
**Scatter:**
5757
```python
5858
In [6]: plotille.scatter?
59-
Signature: plotille.scatter(X, Y, width=80, height=50, X_label='X', Y_label='Y', linesep='\n')
59+
Signature: scatter(X, Y, width=80, height=50, X_label=u'X', Y_label=u'Y', linesep=os.linesep)
6060
Docstring:
6161
Create scatter plot with X , Y values
6262

63+
Basically plotting without interpolation:
64+
`plot(X, Y, ... , interp=None)`
65+
6366
Parameters:
6467
X: List[float] X values.
6568
Y: List[float] Y values. X and Y must have the same number of entries.
@@ -80,10 +83,13 @@ In [7]: print(plotille.scatter(X, np.sin(X), height=50))
8083
Inspired by [crappyhist](http://kevinastraight.x10host.com/2013/12/28/python-histograms-from-the-console/).
8184
```python
8285
In [8]: plotille.hist?
83-
Signature: plotille.hist(X, bins=50, width=80, log_scale=False, linesep='\n')
86+
Signature: hist(X, bins=50, width=80, log_scale=False, linesep=os.linesep)
8487
Docstring:
8588
Create histogram over `X`
8689

90+
The values on the left are the center of the bucket, i.e. `(bin[i] + bin[i+1]) / 2`.
91+
The values on the right are the total counts of this bucket.
92+
8793
Parameters:
8894
X: List[float] The items to count over.
8995
bins: int The number of bins to put X entries in (rows).

plotille.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
def hist(X, bins=50, width=80, log_scale=False, linesep=os.linesep): # noqa: N803
4343
'''Create histogram over `X`
4444
45+
The values on the left are the center of the bucket, i.e. `(bin[i] + bin[i+1]) / 2`.
46+
The values on the right are the total counts of this bucket.
47+
4548
Parameters:
4649
X: List[float] The items to count over.
4750
bins: int The number of bins to put X entries in (rows).
@@ -75,6 +78,9 @@ def _scale(a):
7578
def scatter(X, Y, width=80, height=50, X_label='X', Y_label='Y', linesep=os.linesep): # noqa: N803
7679
'''Create scatter plot with X , Y values
7780
81+
Basically plotting without interpolation:
82+
`plot(X, Y, ... , interp=None)`
83+
7884
Parameters:
7985
X: List[float] X values.
8086
Y: List[float] Y values. X and Y must have the same number of entries.

0 commit comments

Comments
 (0)