diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-10-21 12:35:59 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-10-21 12:35:59 +0200 |
commit | 993a3bae7f5c560d8c9c601c9a6b423e9f507785 (patch) | |
tree | aac250cd74e326f8ca88358725a00bc175253c46 /lib/plotter.py | |
parent | 7382103823962305df09b7ed1913597602a175e2 (diff) |
--plot-traces: use the correct time base for each backend
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: |