from Wieser et al. (2021b) from the 2018 eruption of Kilauea
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import Thermobar as pt
import ternary
plt.rcParams["font.family"] = 'arial'
plt.rcParams["font.size"] =12
plt.rcParams["mathtext.default"] = "regular"
plt.rcParams["mathtext.fontset"] = "dejavusans"
plt.rcParams['patch.linewidth'] = 1
plt.rcParams['axes.linewidth'] = 1
plt.rcParams["xtick.direction"] = "in"
plt.rcParams["ytick.direction"] = "in"
plt.rcParams["ytick.direction"] = "in"
plt.rcParams["xtick.major.size"] = 6 # Sets length of ticks
plt.rcParams["ytick.major.size"] = 4 # Sets length of ticks
plt.rcParams["ytick.labelsize"] = 12 # Sets size of numbers on tick marks
plt.rcParams["xtick.labelsize"] = 12 # Sets size of numbers on tick marks
plt.rcParams["axes.titlesize"] = 14 # Overall title
plt.rcParams["axes.labelsize"] = 14 # Axes labels
## Loading Plagioclases
Plag_dict=pt.import_excel('Plotting_inputs_Amp_Cpx_Ol_Fspar.xlsx', sheet_name='Plagioclase_F8')
Plag_Comps=Plag_dict['Plags']
tern_points=pt.tern_points_fspar(fspar_comps=Plag_Comps)
# make the figure with the classification lines as in the examples above.
fig, tax = pt.plot_fspar_classification(figsize=(6, 6), major_grid=True, ticks=False)
tax.scatter(
tern_points,
edgecolor="k",
marker="o",
s=50
)
<AxesSubplot:>
Plag_Comps['Sample_ID_Plag'].unique()
array(['LL5', 'LL3', 'LL6', 'LL2', 'LL9', 'LL11', 'LL1', 'LL12', 'LL10'], dtype=object)
Plag_Comps_LL5=tern_points[Plag_Comps['Sample_ID_Plag']=="LL5"]
Plag_Comps_LL3=tern_points[Plag_Comps['Sample_ID_Plag']=="LL3"]
Plag_Comps_LL1=tern_points[Plag_Comps['Sample_ID_Plag']=="LL1"]
Plag_Comps_LL9=tern_points[Plag_Comps['Sample_ID_Plag']=="LL9"]
Plag_Comps_LL11=tern_points[Plag_Comps['Sample_ID_Plag']=="LL11"]
Plag_Comps_LL12=tern_points[Plag_Comps['Sample_ID_Plag']=="LL12"]
Plag_Comps_LL10=tern_points[Plag_Comps['Sample_ID_Plag']=="LL8"]
Plag_Comps_LL6=tern_points[Plag_Comps['Sample_ID_Plag']=="LL6"]
Plag_Comps_LL2=tern_points[Plag_Comps['Sample_ID_Plag']=="LL2"]
# First, define the plot, e.g., here, we specify we want the grid, and labels
fig, tax = pt.plot_fspar_classification(figsize=(8, 8), fontsize_component_labels=12,
major_grid=True, minor_grid=True)
## Now feed in your data we calculated at the start in terms of ternary axes!
tax.scatter(
Plag_Comps_LL2,
edgecolor="k",
marker="d",
facecolor="grey",
label='Label1',
s=90
)
<AxesSubplot:>
Early_Samples=np.concatenate((Plag_Comps_LL10, Plag_Comps_LL9, Plag_Comps_LL12, Plag_Comps_LL11, Plag_Comps_LL6, Plag_Comps_LL3), axis=0)
# First, define the plot, e.g., here, we specify we want the grid, and labels
fig, tax = pt.plot_fspar_classification(figsize=(8, 8), fontsize_component_labels=12,
major_grid=True, minor_grid=True, ticks=False)
## Adding the dacitic sample as grey diamonds
tax.scatter(
Early_Samples,
edgecolor="k",
marker="o",
facecolor="green",
label='Early Phase 1',
s=50
)
tax.scatter(
Plag_Comps_LL2,
edgecolor="k",
marker="o",
facecolor="grey",
label='Fissure 17',
s=50
)
tax.scatter(
Plag_Comps_LL1,
edgecolor="k",
marker="o",
facecolor="cyan",
label='Fissure 13-Reactivated',
s=80
)
tax.scatter(
Plag_Comps_LL5,
edgecolor="k",
marker="o",
facecolor="blue",
label='Fissure 20',
s=80
)
tax.legend()