comparison larch_plot.py @ 2:59d0d15a40ef draft

planemo upload for repository https://github.com/MaterialsGalaxy/larch-tools/tree/main/larch_plot commit 0f66842e802430e887d1c6cb7be1cc5436408fd2
author muon-spectroscopy-computational-project
date Mon, 04 Mar 2024 11:43:46 +0000
parents 002c18a3e642
children 5b993aff09e3
comparison
equal deleted inserted replaced
1:002c18a3e642 2:59d0d15a40ef
32 plot_path = f"plots/{i}_{y_variable}.png" 32 plot_path = f"plots/{i}_{y_variable}.png"
33 plt.figure() 33 plt.figure()
34 34
35 for group in groups: 35 for group in groups:
36 params = group.athena_params 36 params = group.athena_params
37 label = params.annotation or params.file or params.id 37 annotation = getattr(params, "annotation", None)
38 file = getattr(params, "file", None)
39 params_id = getattr(params, "id", None)
40 label = annotation or file or params_id
38 if y_variable == "chir_mag": 41 if y_variable == "chir_mag":
39 x_variable = "distance" 42 x_variable = "distance"
40 x = group.r 43 x = group.r
41 else: 44 else:
42 x = group.energy 45 x = group.energy