import json from datetime import datetime import sys import matplotlib.pyplot as plt data = json.loads(sys.stdin.read()) # Extracting datetime and stdout values datetimes = [] stdout_values = [] for entry in data: datetimes.append( datetime.strptime(entry['datetime'], "%Y-%m-%d %H:%M:%S %z")) stdout_values.append(int(entry['stdout'])) # Plotting plt.plot(datetimes, stdout_values, marker='o') plt.xlabel('Datetime') plt.ylabel('stdout') plt.title('stdout over Time') plt.xticks(rotation=45) plt.tight_layout() plt.show()