Skip to content

Commit 1c6e3bc

Browse files
Remove QAP diagram from CIPW example (wt% vs vol% conflict)
1 parent a607594 commit 1c6e3bc

File tree

1 file changed

+0
-21
lines changed
  • docs/source/gallery/examples/geochem

1 file changed

+0
-21
lines changed

docs/source/gallery/examples/geochem/CIPW.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -205,27 +205,6 @@ def compare_NORMs(SINCLAS_outputs, NORM_outputs, name=""):
205205
fig, ax = compare_NORMs(df.loc[~volcanic_filter, :], NORM.loc[~volcanic_filter])
206206
plt.show()
207207
########################################################################################
208-
# These normative mineralogical components could be input into mineralogical
209-
# classifiers, as mentioned above. For example, the IUGS QAP classifier:
210-
#
211-
from pyrolite.util.classification import QAP
212-
213-
clf = QAP() # build a QAP classifier
214-
215-
qap_data = NORM.loc[:, ["quartz", "orthoclase"]] #
216-
qap_data["plagioclase"] = NORM.loc[:, ["albite", "anorthite"]].sum(axis=1)
217-
# predict which lithological class each mineralogical composiiton belongs in
218-
# we add a small value to zeros here to ensure points fit in polygons
219-
predicted_classes = clf.predict(qap_data.replace(0, 10e-6).values)
220-
predicted_classes.head()
221-
########################################################################################
222-
# We can use these predicted classes as a color index also, within the QAP diagram
223-
# or elsewhere:
224-
#
225-
ax = clf.add_to_axes()
226-
qap_data.pyroplot.scatter(ax=ax, c=predicted_classes, axlabels=False, cmap="tab20c")
227-
plt.show()
228-
########################################################################################
229208
# We could also compare how these mineralogical distinctions map into chemical ones
230209
# like the TAS diagram:
231210
#

0 commit comments

Comments
 (0)