{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Strata objects: Legend and Column\n", "\n", "Strata is stratigraphic data.\n", "\n", "The main object of `strata` submodule is `mplStrater.strata.Column` which represents the single stratigraphic column.\n", "This example shows the structure of the class and how to use it.\n", "\n", "First, import all required packages and load the example dataset." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The autoreload extension is already loaded. To reload it, use:\n", " %reload_ext autoreload\n" ] } ], "source": [ "%load_ext autoreload\n", "%autoreload 2\n", "from mplStrater.data import StrataFrame\n", "from mplStrater.strata import Column,Legend\n", "\n", "import pandas as pd\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | x | \n", "y | \n", "ID | \n", "from | \n", "to | \n", "fill | \n", "hatch | \n", "lbl1 | \n", "lbl2 | \n", "lbl3 | \n", "
---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "204026.93 | \n", "4973197.522 | \n", "SI01 | \n", "0.0 | \n", "0.6 | \n", "Riporto conforme | \n", "_ | \n", "_ | \n", "_ | \n", "-1 | \n", "
1 | \n", "204026.93 | \n", "4973197.522 | \n", "SI01 | \n", "0.6 | \n", "2.0 | \n", "Assenza campione | \n", "_ | \n", "_ | \n", "_ | \n", "-1 | \n", "
2 | \n", "204026.93 | \n", "4973197.522 | \n", "SI01 | \n", "2.0 | \n", "3.5 | \n", "Rifiuto | \n", "Pericoloso | \n", "IA | \n", "non rilevato | \n", "-1 | \n", "
3 | \n", "204026.93 | \n", "4973197.522 | \n", "SI01 | \n", "3.5 | \n", "5.2 | \n", "Assenza campione | \n", "_ | \n", "_ | \n", "_ | \n", "-1 | \n", "
4 | \n", "204026.93 | \n", "4973197.522 | \n", "SI01 | \n", "5.2 | \n", "6.2 | \n", "Rifiuto | \n", "Pericoloso | \n", "NP | \n", "non rilevato | \n", "-1 | \n", "
\n", " | ID | \n", "x | \n", "y | \n", "fill_list | \n", "layers | \n", "hatch_list | \n", "lbl1_list | \n", "lbl2_list | \n", "lbl3_list | \n", "scale | \n", "geometry | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "SI01 | \n", "204026.930 | \n", "4973197.522 | \n", "[Riporto conforme, Assenza campione, Rifiuto, ... | \n", "[0.0, 0.6, 2.0, 3.5, 5.2, 6.2, 8.0, 9.0, 10.0] | \n", "[_, _, Pericoloso, _, Pericoloso, _, _, _, _] | \n", "[_, _, IA, _, NP, _, _, _, _] | \n", "[_, _, non rilevato, _, non rilevato, _, _, _, _] | \n", "[-1, -1, -1, -1, -1, -1, -1, -1, -1] | \n", "10.0 | \n", "POINT (204026.930 4973197.522) | \n", "
1 | \n", "SI02 | \n", "204008.591 | \n", "4973148.940 | \n", "[Riporto non conforme, Assenza campione, Rifiu... | \n", "[0.0, 2.0, 3.0, 6.0, 6.6, 8.5] | \n", "[Non pericoloso, _, Non pericoloso, _, Non per... | \n", "[NP, _, NP, _, NP, NP] | \n", "[non rilevato, _, non rilevato, _, non rilevat... | \n", "[-1, -1, -1, -1, -1, -1] | \n", "8.5 | \n", "POINT (204008.591 4973148.940) | \n", "
2 | \n", "SI03 | \n", "204008.734 | \n", "4973122.605 | \n", "[Assenza campione, Riporto non conforme, Assen... | \n", "[0.0, 1.5, 3.4, 5.0, 6.0, 8.4, 8.5, 9.0] | \n", "[_, Non pericoloso, _, Non pericoloso, Non per... | \n", "[_, NP, _, NP, NP, _, _, _] | \n", "[_, non rilevato, _, non rilevato, non rilevat... | \n", "[-1, -1, -1, -1, -1, -1, -1, -1] | \n", "9.0 | \n", "POINT (204008.734 4973122.605) | \n", "