.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "glr_examples/utils/plot_log.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_glr_examples_utils_plot_log.py: ================================================= Plot log ================================================= plots a collection of logging data. .. GENERATED FROM PYTHON SOURCE LINES 8-11 .. code-block:: Python # Author: L.Kouadio # Licence: BSD-3-clause .. GENERATED FROM PYTHON SOURCE LINES 12-19 Plot the logging data using the default behavior use the borehole `h2601`. Note that each logging data composes a column of data collected on the field. Note that can also plot anykind of data related that it contains numerical values. The function does not accept categorical data. If categorical data are given, they should be discarded. .. GENERATED FROM PYTHON SOURCE LINES 19-36 .. code-block:: Python from watex.datasets import load_hlogs from watex.utils.plotutils import plot_logging X0, y = load_hlogs (as_frame =True, key='h2601') # get the frame rather than object print(X0.columns ) print(y.columns ) #for demonstration we plot the following features features = ['depth_top', 'resistivity', 'gamma_gamma', 'sp', # spontaneous polarization ] X= X0[features ] # plot the default logging with Normalize =True wih only three features plot_logging (X, normalize =True) .. image-sg:: /glr_examples/utils/images/sphx_glr_plot_log_001.png :alt: resistivity, gamma_gamma, sp :srcset: /glr_examples/utils/images/sphx_glr_plot_log_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Index(['hole_id', 'depth_top', 'depth_bottom', 'strata_name', 'rock_name', 'layer_thickness', 'resistivity', 'gamma_gamma', 'natural_gamma', 'sp', 'short_distance_gamma', 'well_diameter'], dtype='object') Index(['aquifer_group', 'pumping_level', 'aquifer_thickness', 'hole_depth_before_pumping', 'hole_depth_after_pumping', 'hole_depth_loss', 'depth_starting_pumping', 'pumping_depth_at_the_end', 'pumping_depth', 'section_aperture', 'k', 'kp', 'r', 'rp', 'remark'], dtype='object') .. GENERATED FROM PYTHON SOURCE LINES 37-41 Plot log including the target placed at the first position with parameter `posiy=0`. The predictor :math:`X0` is systematically convert to `log10` is set to 'True'. Note that kp is the categorize k .. GENERATED FROM PYTHON SOURCE LINES 41-46 .. code-block:: Python plot_logging ( X, y = y.kp , posiy = 0, columns_to_skip=['sp'], # does not convert sp to log10 log10 =True, ) .. image-sg:: /glr_examples/utils/images/sphx_glr_plot_log_002.png :alt: kp, resistivity, gamma_gamma, sp :srcset: /glr_examples/utils/images/sphx_glr_plot_log_002.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 47-49 Plot can be customize , for instance, by setting the draw_spines with a depth limit from 0 to 700 m. .. GENERATED FROM PYTHON SOURCE LINES 49-53 .. code-block:: Python # draw spines and limit plot from (0, 700) m depth plot_logging (X[features[:-2]] , y= y.k, draw_spines =(0, 700), colors =["#9EB3DD", "#0A4CEE"] ) .. image-sg:: /glr_examples/utils/images/sphx_glr_plot_log_003.png :alt: resistivity, k :srcset: /glr_examples/utils/images/sphx_glr_plot_log_003.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.214 seconds) .. _sphx_glr_download_glr_examples_utils_plot_log.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/watex/watex/0.3.X?urlpath=lab/tree/notebooks/glr_examples/utils/plot_log.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_log.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_log.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_