diff --git a/img/signal-plot-1.png b/img/signal-plot-1.png index 0251e4b..8222c33 100644 Binary files a/img/signal-plot-1.png and b/img/signal-plot-1.png differ diff --git a/img/signal-plot-2.png b/img/signal-plot-2.png index da91f8f..efee1a5 100644 Binary files a/img/signal-plot-2.png and b/img/signal-plot-2.png differ diff --git a/readme-template.md b/readme-template.md index a81896f..d2d2be1 100644 --- a/readme-template.md +++ b/readme-template.md @@ -98,7 +98,8 @@ The `plot()` function provides a convenient way to plot pupil size over time as import time_series_test as tst from matplotlib import pyplot as plt -tst.plot(dm, dv='pupil', hue_factor='set_size', linestyle_factor='color_type') +tst.plot(dm, dv='pupil', hue_factor='set_size', linestyle_factor='color_type', + sampling_freq=100) plt.savefig('img/signal-plot-1.png') ``` @@ -144,7 +145,7 @@ We can pass the `results` to `plot()` to visualize the results: ```python plt.clf() tst.plot(dm, dv='pupil', hue_factor='set_size', linestyle_factor='color_type', - results=results) + results=results, sampling_freq=100) plt.savefig('img/signal-plot-2.png') ``` diff --git a/readme.md b/readme.md index 5cf2477..ab6dca4 100644 --- a/readme.md +++ b/readme.md @@ -104,7 +104,8 @@ The `plot()` function provides a convenient way to plot pupil size over time as import time_series_test as tst from matplotlib import pyplot as plt -tst.plot(dm, dv='pupil', hue_factor='set_size', linestyle_factor='color_type') +tst.plot(dm, dv='pupil', hue_factor='set_size', linestyle_factor='color_type', + sampling_freq=100) plt.savefig('img/signal-plot-1.png') ``` @@ -196,7 +197,7 @@ We can pass the `results` to `plot()` to visualize the results: ```python plt.clf() tst.plot(dm, dv='pupil', hue_factor='set_size', linestyle_factor='color_type', - results=results) + results=results, sampling_freq=100) plt.savefig('img/signal-plot-2.png') ``` @@ -387,7 +388,7 @@ Performs a sample-by-sample linear-mixed-effects analysis. See - `z`: the z value - `se`: the standard error -## time\_series\_test.plot_(dm, dv, hue\_factor, results=None, linestyle\_factor=None, hues=None, linestyles=None, alpha\_level=0.05, annotate\_intercept=False, annotation\_hues=None, annotation\_linestyle=':', legend\_kwargs=None, annotation\_legend\_kwargs=None)_ +## time\_series\_test.plot_(dm, dv, hue\_factor, results=None, linestyle\_factor=None, hues=None, linestyles=None, alpha\_level=0.05, annotate\_intercept=False, annotation\_hues=None, annotation\_linestyle=':', legend\_kwargs=None, annotation\_legend\_kwargs=None, x0=0, sampling\_freq=1)_ Visualizes a time series, where the signal is plotted as a function of sample number on the x-axis. One fixed effect is indicated by the hue @@ -457,6 +458,14 @@ annotated in the figure. Optional keywords to be passed to `plt.legend()` for the annotation legend. +* **x0: int, float** + + The starting value on the x-axis. + +* **sampling\_freq: int, float** + + The sampling frequency. + ## time\_series\_test.summarize_(results, detailed=False)_ Generates a string with a human-readable summary of a results `dict` as