.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_paleomask.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_auto_examples_plot_paleomask.py: ============================================== Add paleogeography mask in scatter data plot ============================================== This example shows how to add paleogeography mask according to input age .. GENERATED FROM PYTHON SOURCE LINES 8-30 .. image-sg:: /auto_examples/images/sphx_glr_plot_paleomask_001.png :alt: plot paleomask :srcset: /auto_examples/images/sphx_glr_plot_paleomask_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/cgeniepy/envs/stable/lib/python3.12/site-packages/cgeniepy/plot.py:632: UserWarning: kind is not used for map plotting warnings.warn("kind is not used for map plotting") | .. code-block:: Python from cgeniepy.table import ScatterData import pandas as pd import numpy as np # Generate random data np.random.seed(1239124) # Set seed for reproducibility # Create random latitude, longitude, and variable values random_data = pd.DataFrame({ 'lat': np.random.uniform(-90, 90, 100), 'lon': np.random.uniform(-180, 180, 100), 'dummy_var': np.random.random(100) * 100 }) # Convert to ScatterData object random_data = ScatterData(random_data) # Set MultiIndex for the data random_data.set_index(['lat', 'lon']) # Plot with specified parameters random_data.plot(var='dummy_var', edgecolor='k', mask_age=100) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 7.171 seconds) .. _sphx_glr_download_auto_examples_plot_paleomask.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_paleomask.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_paleomask.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_paleomask.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_