.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "sample_data/baja_bathymetry.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_sample_data_baja_bathymetry.py: [DEPRECATED] Bathymetry data from Baja California ================================================= .. warning:: All sample datasets in Verde are deprecated and will be **removed in Verde v2.0.0**. The tutorials/examples will transition to using `Ensaio `__ instead. We provide sample bathymetry data from Baja California to test the gridding methods. This is the ``@tut_ship.xyz`` sample data provided by `GMT `__ for their tutorials and gallery. The data is downloaded to a local directory if it's not there already. .. GENERATED FROM PYTHON SOURCE LINES 23-51 .. image-sg:: /sample_data/images/sphx_glr_baja_bathymetry_001.png :alt: Bathymetry from Baja California :srcset: /sample_data/images/sphx_glr_baja_bathymetry_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none longitude latitude bathymetry_m 0 245.00891 27.49555 -636.0 1 245.01201 27.49286 -655.0 2 245.01512 27.49016 -710.0 3 245.01822 27.48746 -695.0 4 245.02443 27.48206 -747.0 | .. code-block:: default import cartopy.crs as ccrs import matplotlib.pyplot as plt import verde as vd # The data are in a pandas.DataFrame data = vd.datasets.fetch_baja_bathymetry() print(data.head()) # Make a Mercator map of the data using Cartopy plt.figure(figsize=(7, 6)) ax = plt.axes(projection=ccrs.Mercator()) ax.set_title("Bathymetry from Baja California") # Plot the bathymetry as colored circles. Cartopy requires setting the # projection of the original data through the transform argument. Use # PlateCarree for geographic data. plt.scatter( data.longitude, data.latitude, c=data.bathymetry_m, s=0.1, transform=ccrs.PlateCarree(), ) plt.colorbar().set_label("meters") # Use an utility function to add tick labels and land and ocean features to the # map. vd.datasets.setup_baja_bathymetry_map(ax) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 1.217 seconds) .. _sphx_glr_download_sample_data_baja_bathymetry.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: baja_bathymetry.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: baja_bathymetry.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_