{ "cells": [ { "cell_type": "markdown", "id": "7ccb0344-f244-4a3c-80e4-7cb9f218f629", "metadata": {}, "source": [ "# Amphibole Classification Diagrams \n", "- This notebook shows how to plot Amphiboles on the Leake Calcic ampibole classification diagram\n", "- At present, we have only included the bottom figure from Leake et al. (1997) for the calcic amphiboles\n", "- If you really need other diagrams, please reach out to Penny and she can maybe add some of the other ones!\n", "- You can download the excel spreadsheet with data here:\n", "https://github.com/PennyWieser/Thermobar/blob/main/docs/Examples/Amphibole/Amphibole_Liquids.xlsx" ] }, { "cell_type": "code", "execution_count": 1, "id": "1d233b24-9085-48c1-bd75-4cf31140af63", "metadata": {}, "outputs": [], "source": [ "# Load in some import Python things, and Thermobar\n", "import numpy as np\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import Thermobar as pt\n", "pd.options.display.max_columns = None" ] }, { "cell_type": "markdown", "id": "22466eb8-407f-494c-8a66-85a3466d15fe", "metadata": { "tags": [] }, "source": [ "### You need to install Thermobar once on your machine, if you haven't done this yet, uncomment the line below (remove the #)" ] }, { "cell_type": "code", "execution_count": 10, "id": "a7876e27-fb53-4cc4-8243-ca0d08a6fadc", "metadata": {}, "outputs": [], "source": [ "#!pip install Thermobar" ] }, { "cell_type": "code", "execution_count": 2, "id": "9b422b3f-fc85-4a27-b456-f700ce8a93a4", "metadata": {}, "outputs": [], "source": [ "# Set some plotting parameters\n", "plt.rcParams[\"font.family\"] = 'arial'\n", "plt.rcParams[\"font.size\"] =12\n", "plt.rcParams[\"mathtext.default\"] = \"regular\"\n", "plt.rcParams[\"mathtext.fontset\"] = \"dejavusans\"\n", "plt.rcParams['patch.linewidth'] = 1\n", "plt.rcParams['axes.linewidth'] = 1\n", "plt.rcParams[\"xtick.direction\"] = \"in\"\n", "plt.rcParams[\"ytick.direction\"] = \"in\"\n", "plt.rcParams[\"ytick.direction\"] = \"in\"\n", "plt.rcParams[\"xtick.major.size\"] = 6 # Sets length of ticks\n", "plt.rcParams[\"ytick.major.size\"] = 4 # Sets length of ticks\n", "plt.rcParams[\"ytick.labelsize\"] = 12 # Sets size of numbers on tick marks\n", "plt.rcParams[\"xtick.labelsize\"] = 12 # Sets size of numbers on tick marks\n", "plt.rcParams[\"axes.titlesize\"] = 14 # Overall title\n", "plt.rcParams[\"axes.labelsize\"] = 14 # Axes labels" ] }, { "cell_type": "markdown", "id": "e8eefefe-55a6-487b-b7a7-c12e96547b52", "metadata": {}, "source": [ "## Import amphiboles and associated liquids\n", "- These amphiboles are from 2 units, unit 1 and unit 2" ] }, { "cell_type": "code", "execution_count": 3, "id": "9d203fa3-b620-474c-90ec-b5ed8c8a0945", "metadata": {}, "outputs": [], "source": [ "out=pt.import_excel('Amphibole_Liquids.xlsx', sheet_name=\"Amp_only_for_plotting\")\n", "my_input=out['my_input']\n", "Amps=out['Amps']" ] }, { "cell_type": "code", "execution_count": 4, "id": "5c681cfb-315a-492b-8241-713c8eb86b83", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | SiO2_Amp | \n", "TiO2_Amp | \n", "Al2O3_Amp | \n", "FeOt_Amp | \n", "MnO_Amp | \n", "MgO_Amp | \n", "CaO_Amp | \n", "Na2O_Amp | \n", "K2O_Amp | \n", "Cr2O3_Amp | \n", "F_Amp | \n", "Cl_Amp | \n", "Sample_ID_Amp | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "42.43 | \n", "2.50 | \n", "12.97 | \n", "7.80 | \n", "0.09 | \n", "15.56 | \n", "11.21 | \n", "2.41 | \n", "1.61 | \n", "0.31 | \n", "0 | \n", "0 | \n", "Unit1 | \n", "
1 | \n", "41.19 | \n", "2.62 | \n", "12.25 | \n", "9.44 | \n", "0.11 | \n", "15.67 | \n", "11.54 | \n", "2.44 | \n", "1.40 | \n", "0.10 | \n", "0 | \n", "0 | \n", "Unit1 | \n", "
2 | \n", "45.69 | \n", "1.44 | \n", "9.64 | \n", "13.37 | \n", "0.21 | \n", "14.57 | \n", "10.72 | \n", "1.76 | \n", "0.23 | \n", "0.00 | \n", "0 | \n", "0 | \n", "Unit1 | \n", "
3 | \n", "45.56 | \n", "1.43 | \n", "10.40 | \n", "12.27 | \n", "0.21 | \n", "15.15 | \n", "11.03 | \n", "1.89 | \n", "0.25 | \n", "0.00 | \n", "0 | \n", "0 | \n", "Unit1 | \n", "
4 | \n", "45.65 | \n", "1.55 | \n", "10.78 | \n", "13.30 | \n", "0.21 | \n", "14.21 | \n", "10.81 | \n", "1.89 | \n", "0.27 | \n", "0.00 | \n", "0 | \n", "0 | \n", "Unit1 | \n", "