diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-11-02 10:11:08 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-11-02 10:11:08 +0100 |
commit | c179546f74807882f4dff47c8a969741f2dba1a7 (patch) | |
tree | 946a068fc4fb4f705678895e405b3b27990a49d9 /lib/plotter.py | |
parent | 081247660357c8f63fdaaf363c29d1b95a86b842 (diff) | |
parent | dd33d9b36dd071d04ccba5a000e9562c2b6a4a31 (diff) |
Merge branch 'master' into merge-prep/janis
Diffstat (limited to 'lib/plotter.py')
-rwxr-xr-x | lib/plotter.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/plotter.py b/lib/plotter.py index 16c0145..929ceb9 100755 --- a/lib/plotter.py +++ b/lib/plotter.py @@ -136,7 +136,11 @@ def plot_xy(X, Y, xlabel=None, ylabel=None, title=None, output=None, family=Fals if family: cm = plt.get_cmap("brg", len(Y)) for i, YY in enumerate(Y): - plt.plot(np.arange(len(YY)), YY, "-", markersize=2, color=cm(i)) + if X: + XX = X[i] + else: + XX = np.arange(len(YY)) + plt.plot(XX, YY, "-", markersize=2, color=cm(i)) else: plt.plot(X, Y, "bo", markersize=2) if output: |