fix rane10-10 data, add overview plots
This commit is contained in:
@@ -133,18 +133,35 @@ def plotEdiagram():
|
||||
pp.show()
|
||||
|
||||
def plotPTdiagram():
|
||||
|
||||
plots = {i: pp.subplots(1, num=i) for i in ["E", "F", "R"]}
|
||||
|
||||
colors={"core": "tab:blue", "transition": "tab:orange", "rim": "tab:green"}
|
||||
|
||||
for label in data_ptdiagram.data:
|
||||
print(label)
|
||||
pp.figure(label)
|
||||
fig, ax = pp.subplots(1, num=label)
|
||||
for region in ["core", "transition", "rim"]:
|
||||
pp.plot(data_ptdiagram.data[label][region]["p"], data_ptdiagram.data[label][region]["t"], marker="o", linestyle="", label=region)
|
||||
pp.legend(frameon=False)
|
||||
pp.xlabel("p [kbar]")
|
||||
pp.ylabel("T [°C]")
|
||||
pp.title(label)
|
||||
pp.savefig(f"ptplot_{label}.png")
|
||||
pp.show()
|
||||
# individual sample plot
|
||||
ax.plot(data_ptdiagram.data[label][region]["t"], data_ptdiagram.data[label][region]["p"], marker="o", linestyle="", label=region)
|
||||
# overview plot
|
||||
plots[label[0]][1].plot(data_ptdiagram.data[label][region]["t"],
|
||||
data_ptdiagram.data[label][region]["p"],
|
||||
marker="o", linestyle="", color=colors[region])
|
||||
ax.legend(frameon=False)
|
||||
ax.set_ylabel("p [kbar]")
|
||||
ax.set_xlabel("T [°C]")
|
||||
ax.set_title(label)
|
||||
fig.savefig(f"ptplot_{label}.png")
|
||||
|
||||
names = {"E": "E11", "F": "Fro", "R": "Rane"}
|
||||
for plot in plots:
|
||||
plots[plot][1].set_ylabel("p [kbar]")
|
||||
plots[plot][1].set_xlabel("T [°C]")
|
||||
plots[plot][1].set_title(names[plot])
|
||||
plots[plot][0].savefig(f"ptplot_{plot}overview.png")
|
||||
|
||||
#pp.show()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user