Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def plot(argv=None):
import dufte
import matplotlib.pyplot as plt
plt.style.use(dufte.style)
parser = _get_parser_plot()
args = parser.parse_args(argv)
data = [yaml.load(f, Loader=yaml.SafeLoader) for f in args.infiles]
# actually plot it
fig = plt.figure()
ax1 = fig.add_subplot(1, 1, 1)
for d in data:
temperature_data = d["temperature"]
if args.delta_t:
temperature_data = []
zip_object = zip(d["temperature"], d["ambient"])
for d["temperature"], d["ambient"] in zip_object:
temperature_data.append(d["temperature"] - d["ambient"])