diff options
| -rwxr-xr-x | api_plotter.py | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/api_plotter.py b/api_plotter.py index 83d4f08..ba197e2 100755 --- a/api_plotter.py +++ b/api_plotter.py @@ -32,7 +32,9 @@ for timestamp in timestamps:      except KeyError:          d[nearest] = 1 +d_sorted = {k: v for k, v in sorted(d.items(), key=lambda x: x[0])} +  fig, ax = plt.subplots() -ax.plot(list(d.keys()), list(d.values())) +ax.plot(list(d_sorted.keys()), list(d_sorted.values()))  plt.show()
\ No newline at end of file  | 
