Skip to content

Commit

Permalink
remove code, doctest directives from cube module
Browse files Browse the repository at this point in the history
  • Loading branch information
mcflugen committed Dec 9, 2024
1 parent ba69c4a commit f085a87
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions deltametrics/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,16 +447,17 @@ def quick_show(self, var, idx=-1, axis=0, **kwargs):
--------
.. plot::
:include-source:
>>> golfcube = dm.sample_data.golf()
>>> golfstrat = dm.cube.StratigraphyCube.from_DataCube(
>>> import matplotlib.pyplot as plt
>>> from deltametrics.cube import StratigraphyCube
>>> from deltametrics.sample_data.sample_data import golf
>>> golfcube = golf()
>>> golfstrat = StratigraphyCube.from_DataCube(
... golfcube, dz=0.1)
...
>>> fig, ax = plt.subplots(2, 1)
>>> golfcube.quick_show('eta', ax=ax[0]) # a Planform (axis=0)
>>> golfstrat.quick_show('eta', idx=100, axis=2, ax=ax[1]) # a DipSection
>>> plt.show()
"""
if axis == 0:
# this is a planform slice
Expand Down Expand Up @@ -504,21 +505,20 @@ def show_cube(self, var, style="mesh", ve=200, ax=None):
The following code snippets are not set up to actually make the
plots in the documentation.
.. code::
>>> golfcube = dm.sample_data.golf()
>>> golfstrat = dm.cube.StratigraphyCube.from_DataCube(
... golfcube, dz=0.1)
...
>>> fig, ax = plt.subplots()
>>> golfstrat.show_cube('eta', ax=ax)
>>> import matplotlib.pyplot as plt
>>> from deltametrics.cube import StratigraphyCube
>>> from deltametrics.sample_data.sample_data import golf
.. code::
>>> golfcube = golf()
>>> golfstrat = StratigraphyCube.from_DataCube(
... golfcube, dz=0.1)
...
>>> fig, ax = plt.subplots()
>>> golfstrat.show_cube('eta', ax=ax) # doctest: +SKIP
>>> golfcube = dm.sample_data.golf()
...
>>> fig, ax = plt.subplots()
>>> golfcube.show_cube('velocity', style='fence', ax=ax)
>>> golfcube = golf()
>>> fig, ax = plt.subplots()
>>> golfcube.show_cube('velocity', style='fence', ax=ax) # doctest: +SKIP
"""
try:
import pyvista as pv
Expand Down Expand Up @@ -846,8 +846,11 @@ def from_DataCube(
--------
Create a stratigraphy cube from the example ``golf``:
>>> golfcube = dm.sample_data.golf()
>>> stratcube = dm.cube.StratigraphyCube.from_DataCube(golfcube, dz=0.05)
>>> from deltametrics.cube import StratigraphyCube
>>> from deltametrics.sample_data.sample_data import golf
>>> golfcube = golf()
>>> stratcube = StratigraphyCube.from_DataCube(golfcube, dz=0.05)
Parameters
----------
Expand Down

0 comments on commit f085a87

Please sign in to comment.