implement first idea of eplot
This commit is contained in:
@@ -3,6 +3,7 @@ import matplotlib.pyplot as pp
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import data_ternary
|
import data_ternary
|
||||||
import data_udiagram
|
import data_udiagram
|
||||||
|
import data_ediagram
|
||||||
|
|
||||||
def plotTdiagram():
|
def plotTdiagram():
|
||||||
scale = 100
|
scale = 100
|
||||||
@@ -147,10 +148,38 @@ def plotZdiagram():
|
|||||||
|
|
||||||
pp.show()
|
pp.show()
|
||||||
|
|
||||||
|
def plotEdiagram():
|
||||||
|
|
||||||
|
for dataset in data_ediagram.data:
|
||||||
|
#print(dataset)
|
||||||
|
firstname = dataset['labels'][0]
|
||||||
|
fig, ax = pp.subplots(1, num=firstname)
|
||||||
|
|
||||||
|
lens = list(map(len, dataset['al']))
|
||||||
|
for idx in range(len(lens)):
|
||||||
|
labelidx = sum(lens[:idx])
|
||||||
|
label = dataset['labels'][labelidx]
|
||||||
|
aldata = dataset['al'][idx]
|
||||||
|
fedata = dataset['fe'][idx]
|
||||||
|
|
||||||
|
ax.plot(aldata, fedata, linestyle="", marker="o", label=label)
|
||||||
|
|
||||||
|
ax.legend(frameon=False)
|
||||||
|
ax.set_xlabel("Al")
|
||||||
|
ax.set_ylabel("Fe+3")
|
||||||
|
|
||||||
|
fig.savefig(f"eplot_{firstname}")
|
||||||
|
pp.show()
|
||||||
|
|
||||||
|
|
||||||
|
exit()
|
||||||
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
pass
|
pass
|
||||||
|
|
||||||
#plotTdiagram()
|
#plotTdiagram()
|
||||||
plotUdiagram()
|
#plotUdiagram()
|
||||||
plotZdiagram()
|
#plotZdiagram()
|
||||||
|
plotEdiagram()
|
||||||
|
|||||||
Reference in New Issue
Block a user