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

.. only:: html

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

        Click :ref:`here <sphx_glr_download_examples_Plotting_plot_tabular_from_netcdf.py>`
        to download the full example code

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

.. _sphx_glr_examples_Plotting_plot_tabular_from_netcdf.py:


Plot Tabular Examples
-------------------------
Dataset Reference:
Minsley, B.J., James, S.R., Bedrosian, P.A., Pace, M.D., Hoogenboom, B.E., and Burton, B.L., 2021, Airborne electromagnetic, magnetic, and radiometric survey of the Mississippi Alluvial Plain, November 2019 - March 2020: U.S. Geological Survey data release, https://doi.org/10.5066/P9E44CTQ.

.. GENERATED FROM PYTHON SOURCE LINES 9-17

.. code-block:: default

    import matplotlib.pyplot as plt
    import matplotlib.gridspec as gridspec
    from os.path import join
    import numpy as np
    from gspy import Survey
    import xarray as xr
    import pyproj








.. GENERATED FROM PYTHON SOURCE LINES 18-20

Read in Data & Plot
+++++++++++++++++++

.. GENERATED FROM PYTHON SOURCE LINES 20-34

.. code-block:: default


    # Path to example files
    data_path = '..//..//supplemental//'

    # Read in ASEG data file
    data_file = data_path + 'region//MAP//data//Tempest.nc'
    survey = Survey().read_netcdf(data_file)

    # Plot a map of the scattered data points
    plt.figure()
    gs=gridspec.GridSpec(1,1)
    gs.update(bottom=0.12, top=0.98, left=0.2, right=0.98)
    survey.tabular[0].gs_tabular.scatter('GPS_Elevation', ax=plt.subplot(gs[0,0]))




.. image-sg:: /examples/Plotting/images/sphx_glr_plot_tabular_from_netcdf_001.png
   :alt: plot tabular from netcdf
   :srcset: /examples/Plotting/images/sphx_glr_plot_tabular_from_netcdf_001.png
   :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none


    (<Axes: >, <matplotlib.collections.PathCollection object at 0x7f82d0df8340>)



.. GENERATED FROM PYTHON SOURCE LINES 35-44

.. code-block:: default


    # # Subset by line number
    # newld = survey.tabular[0].subset('Line', 225401)
    # # Plot the single line in map view
    # plt.figure()
    # gs=gridspec.GridSpec(1,1)
    # gs.update(bottom=0.12, top=0.98, left=0.2, right=0.98)
    # newld.scatter('GPS_Elevation', ax=plt.subplot(gs[0,0]))








.. GENERATED FROM PYTHON SOURCE LINES 45-46

Plotting

.. GENERATED FROM PYTHON SOURCE LINES 46-66

.. code-block:: default


    # # Plot data channels
    # fig = plt.figure(figsize=(8,6))
    # gs=gridspec.GridSpec(4,1)
    # gs.update(bottom=0.12, top=0.98, left=0.15, right=0.98, hspace=0.5)
    # ax0=plt.subplot(gs[0,0])
    # newld.plot('X_Powerline', color='b', label='X')
    # newld.plot('Z_Powerline', color='r', label='Z')
    # plt.ylabel('Powerline')
    # plt.legend(loc=2, ncol=2)

    # ax1=plt.subplot(gs[1,0])
    # newld.plot('RMI', color='limegreen')

    # ax2=plt.subplot(gs[2,0])
    # newld.plot('EMX_HPRG')

    # ax3=plt.subplot(gs[3,0])
    # newld.plot('EMZ_HPRG');

    plt.show()







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

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


.. _sphx_glr_download_examples_Plotting_plot_tabular_from_netcdf.py:

.. only:: html

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


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

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

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

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


.. only:: html

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

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