arundo / tsaug

A Python package for time series augmentation
https://tsaug.readthedocs.io
Apache License 2.0
347 stars 37 forks source link

Missing function calls in documentation #18

Open 15bubbles opened 2 years ago

15bubbles commented 2 years ago

Hi!

I noticed that documentation is actually missing few important notes.

For instance, first example contains such snippet:

>>> import numpy as np
>>> X = np.load("./X.npy")
>>> Y = np.load("./Y.npy")
>>> from tsaug.visualization import plot
>>> plot(X, Y)

and shows a chart which suggests that it is immediately rendered after calling plot function.

In configurations I've seen and worked on, plot function does not render any chart immediately. Instead it returns Tuple[matplotlib.figure.Figure, matplotlib.axes._axes.Axes]. This means that we need to take first element of returned tuple and call .show() on it, so this example should rather be:

>>> import numpy as np
>>> X = np.load("./X.npy")
>>> Y = np.load("./Y.npy")
>>> from tsaug.visualization import plot
>>> figure, _ = plot(X, Y)
>>> figure.show()

I can create a push request with such corrections if you're open for contribution