.. 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 ` 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-34 .. code-block:: Python # Initialize the Survey data_path = '..//..//..//..//example_material//example_2/data' survey = gspy.open_datatree(join(data_path, "Tempest.nc"))['survey'] plt.figure() survey['models/inverted_models'].gs.plot_cross_section(line_number=212201, variable='conductivity', hang_from=None, axis='distance', equalize=True, log=10, cmap='jet', ylim=[-200, 100.0]) plt.figure() survey['models/inverted_models'].gs.plot_cross_section(line_number=212201, variable='conductivity', hang_from='elevation', axis='distance', equalize=True, log=10, cmap='jet', ylim=[-200, 100.0]) plt.show() .. rst-class:: sphx-glr-horizontal * .. 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-multi-img * .. 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-multi-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.906 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 ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_cross_section.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_cross_section.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_