.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "tutorials/ch1_fundamentals/ch1_7_3d_visualization.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_tutorials_ch1_fundamentals_ch1_7_3d_visualization.py: 1.7: 3-D Visualization ====================== .. GENERATED FROM PYTHON SOURCE LINES 8-9 Importing GemPy .. GENERATED FROM PYTHON SOURCE LINES 9-15 .. code-block:: python3 import gempy as gp # Importing auxiliary libraries import numpy as np import matplotlib.pyplot as plt .. GENERATED FROM PYTHON SOURCE LINES 16-19 Loading an example geomodel ~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. GENERATED FROM PYTHON SOURCE LINES 21-45 .. code-block:: python3 data_path = 'https://raw.githubusercontent.com/cgre-aachen/gempy_data/master/' geo_model = gp.create_data('viz_3d', [0, 2000, 0, 2000, 0, 1600], [50, 50, 50], path_o=data_path + "data/input_data/lisa_models/foliations" + str( 7) + ".csv", path_i=data_path + "data/input_data/lisa_models/interfaces" + str( 7) + ".csv" ) gp.map_stack_to_surfaces( geo_model, {"Fault_1": 'Fault_1', "Fault_2": 'Fault_2', "Strat_Series": ('Sandstone', 'Siltstone', 'Shale', 'Sandstone_2', 'Schist', 'Gneiss')} ) geo_model.set_is_fault(['Fault_1', 'Fault_2']) geo_model.set_topography() gp.set_interpolator(geo_model) gp.compute_model(geo_model, compute_mesh=True) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Active grids: ['regular'] /home/miguel/miniconda3/envs/gempy/lib/python3.8/site-packages/pandas/core/arraylike.py:358: RuntimeWarning: invalid value encountered in arccos result = getattr(ufunc, method)(*inputs, **kwargs) /WorkSSD/PythonProjects/gempy/gempy/core/data_modules/geometric_data.py:537: UserWarning: If pole_vector and orientation are passed pole_vector is used/ warnings.warn('If pole_vector and orientation are passed pole_vector is used/') Fault colors changed. If you do not like this behavior, set change_color to False. [1280. 1600.] Active grids: ['regular' 'topography'] Setting kriging parameters to their default values. Compiling theano function... Level of Optimization: fast_compile Device: cpu Precision: float64 Number of faults: 2 Compilation Done! Kriging values: values range 3249.62 $C_o$ 251428.57 drift equations [3, 3, 3, 3] /WorkSSD/PythonProjects/gempy/gempy/core/solution.py:173: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. self.geological_map = np.array( Lithology ids [9. 9. 9. ... 3. 3. 3.] .. GENERATED FROM PYTHON SOURCE LINES 46-49 Basic plotting API ------------------ .. GENERATED FROM PYTHON SOURCE LINES 52-55 Data plot ~~~~~~~~~ .. GENERATED FROM PYTHON SOURCE LINES 57-59 .. code-block:: python3 gp.plot_3d(geo_model, show_surfaces=False, show_data=True, show_lith=False, image=False) .. image:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_7_3d_visualization_001.png :alt: ch1 7 3d visualization :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 60-63 Geomodel plot ~~~~~~~~~~~~~ .. GENERATED FROM PYTHON SOURCE LINES 65-67 .. code-block:: python3 gp.plot_3d(geo_model, image=False) .. image:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_7_3d_visualization_002.png :alt: ch1 7 3d visualization :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 68-78 .. code-block:: python3 # sphinx_gallery_thumbnail_number = 2 gpv = gp.plot.plot_3d(geo_model, plotter_type='basic', off_screen=False, show_topography=True, show_scalar=False, show_lith=True, kwargs_plot_structured_grid={'opacity': .5}) gp.save_model(geo_model) .. image:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_7_3d_visualization_003.png :alt: ch1 7 3d visualization :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none True .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 7.775 seconds) .. _sphx_glr_download_tutorials_ch1_fundamentals_ch1_7_3d_visualization.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: ch1_7_3d_visualization.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: ch1_7_3d_visualization.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_