
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "examples/Interacting_With_GS_Files/plot_cross_section.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_examples_Interacting_With_GS_Files_plot_cross_section.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_examples_Interacting_With_GS_Files_plot_cross_section.py:


Plotting Cross Sections
-----------------------

.. GENERATED FROM PYTHON SOURCE LINES 6-14

.. code-block:: Python


    import numpy as np
    import matplotlib.pyplot as plt
    from os.path import join
    import gspy
    from gspy import Survey
    from pprint import pprint








.. GENERATED FROM PYTHON SOURCE LINES 15-16

First Create the Survey & Data Objects

.. GENERATED FROM PYTHON SOURCE LINES 16-20

.. code-block:: Python


    # Initialize the Survey
    survey = gspy.open_datatree("..//data_files//tempest_aseg//Tempest.nc")['survey']








.. GENERATED FROM PYTHON SOURCE LINES 21-31

.. code-block:: Python

    plt.figure()
    survey['models/inverted_models'].gs.plot_cross_section(line_number=225401.,
                                                            variable='conductivity',
                                                            hang_from=None,
                                                            axis='distance',
                                                            equalize=True,
                                                            log=10,
                                                            cmap='jet',
                                                            ylim=[-200, 10.0])




.. image-sg:: /examples/Interacting_With_GS_Files/images/sphx_glr_plot_cross_section_001.png
   :alt: plot cross section
   :srcset: /examples/Interacting_With_GS_Files/images/sphx_glr_plot_cross_section_001.png
   :class: sphx-glr-single-img





.. GENERATED FROM PYTHON SOURCE LINES 32-41

.. code-block:: Python

    plt.figure()
    survey['models/inverted_models'].gs.plot_cross_section(line_number=225401.,
                                                           variable='conductivity',
                                                           hang_from='elevation',
                                                           axis='distance',
                                                           equalize=True,
                                                           log=10,
                                                           cmap='jet',
                                                           ylim=[-450, 150.0])
    plt.show()


.. image-sg:: /examples/Interacting_With_GS_Files/images/sphx_glr_plot_cross_section_002.png
   :alt: plot cross section
   :srcset: /examples/Interacting_With_GS_Files/images/sphx_glr_plot_cross_section_002.png
   :class: sphx-glr-single-img






.. rst-class:: sphx-glr-timing

   **Total running time of the script:** (0 minutes 1.932 seconds)


.. _sphx_glr_download_examples_Interacting_With_GS_Files_plot_cross_section.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: plot_cross_section.ipynb <plot_cross_section.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: plot_cross_section.py <plot_cross_section.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: plot_cross_section.zip <plot_cross_section.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
