From 2db8f28f4cebe10867f9bd8ee1ebf5ed902d53b2 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 12 Jun 2023 16:37:36 +0800 Subject: [PATCH 1/8] Document the default CPT for GMT remote datasets --- pygmt/datasets/earth_age.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pygmt/datasets/earth_age.py b/pygmt/datasets/earth_age.py index 523bce64aa2..ae3fe67f0b9 100644 --- a/pygmt/datasets/earth_age.py +++ b/pygmt/datasets/earth_age.py @@ -26,6 +26,13 @@ def load_earth_age(resolution="01d", region=None, registration=None): registration type (**p** for pixel registration or **g** for gridline registration). + The default CPT for this dataset is *@earth_age.cpt*. It's implicitly used + when passing in the file name of the dataset to any grid plotting function + if no CPT is explicitly specified. When the dataset is loaded and plotted + as an :class:`xarray.DataArray` object, the default CPT is ignored and + GMT's default CPT (*turbo*) is used. To use the dataset-specific CPT, you + need to explicitly set ``cpt="@earth_age.cpt"``. + Refer to :gmt-datasets:`earth-age.html` for more details. Parameters From 78cea316008a5b91cece1b709964762ecd2ac2ce Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 12 Jun 2023 20:50:21 +0800 Subject: [PATCH 2/8] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- pygmt/datasets/earth_age.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/datasets/earth_age.py b/pygmt/datasets/earth_age.py index ae3fe67f0b9..ddb94326d36 100644 --- a/pygmt/datasets/earth_age.py +++ b/pygmt/datasets/earth_age.py @@ -26,12 +26,12 @@ def load_earth_age(resolution="01d", region=None, registration=None): registration type (**p** for pixel registration or **g** for gridline registration). - The default CPT for this dataset is *@earth_age.cpt*. It's implicitly used + The default color palette table (CPT) for this dataset is *@earth_age.cpt*. It's implicitly used when passing in the file name of the dataset to any grid plotting function if no CPT is explicitly specified. When the dataset is loaded and plotted as an :class:`xarray.DataArray` object, the default CPT is ignored and GMT's default CPT (*turbo*) is used. To use the dataset-specific CPT, you - need to explicitly set ``cpt="@earth_age.cpt"``. + need to explicitly set ``cmap="@earth_age.cpt"``. Refer to :gmt-datasets:`earth-age.html` for more details. From 79946780e42e95e6d77bfc309dbb00f50c9ed2cf Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 12 Jun 2023 22:26:33 +0800 Subject: [PATCH 3/8] Fix styling --- pygmt/datasets/earth_age.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pygmt/datasets/earth_age.py b/pygmt/datasets/earth_age.py index ddb94326d36..ab7197c36c0 100644 --- a/pygmt/datasets/earth_age.py +++ b/pygmt/datasets/earth_age.py @@ -26,12 +26,12 @@ def load_earth_age(resolution="01d", region=None, registration=None): registration type (**p** for pixel registration or **g** for gridline registration). - The default color palette table (CPT) for this dataset is *@earth_age.cpt*. It's implicitly used - when passing in the file name of the dataset to any grid plotting function - if no CPT is explicitly specified. When the dataset is loaded and plotted - as an :class:`xarray.DataArray` object, the default CPT is ignored and - GMT's default CPT (*turbo*) is used. To use the dataset-specific CPT, you - need to explicitly set ``cmap="@earth_age.cpt"``. + The default color palette table (CPT) for this dataset is *@earth_age.cpt*. + It's implicitly used when passing in the file name of the dataset to any + grid plotting function if no CPT is explicitly specified. When the dataset + is loaded and plotted as an :class:`xarray.DataArray` object, the default + CPT is ignored and GMT's default CPT (*turbo*) is used. To use the + dataset-specific CPT, you need to explicitly set ``cmap="@earth_age.cpt"``. Refer to :gmt-datasets:`earth-age.html` for more details. From a383357438a668763e38ed44458f12c518692abf Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 14 Jun 2023 07:04:09 +0800 Subject: [PATCH 4/8] Update pygmt/datasets/earth_age.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- pygmt/datasets/earth_age.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/datasets/earth_age.py b/pygmt/datasets/earth_age.py index ab7197c36c0..31590acbade 100644 --- a/pygmt/datasets/earth_age.py +++ b/pygmt/datasets/earth_age.py @@ -28,7 +28,7 @@ def load_earth_age(resolution="01d", region=None, registration=None): The default color palette table (CPT) for this dataset is *@earth_age.cpt*. It's implicitly used when passing in the file name of the dataset to any - grid plotting function if no CPT is explicitly specified. When the dataset + grid plotting method if no CPT is explicitly specified. When the dataset is loaded and plotted as an :class:`xarray.DataArray` object, the default CPT is ignored and GMT's default CPT (*turbo*) is used. To use the dataset-specific CPT, you need to explicitly set ``cmap="@earth_age.cpt"``. From 27b28e25c60610525abea6cf9665ad038d207313 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 14 Jun 2023 20:12:37 +0800 Subject: [PATCH 5/8] Update more datasets --- pygmt/datasets/earth_free_air_anomaly.py | 7 +++++++ pygmt/datasets/earth_magnetic_anomaly.py | 10 ++++++++++ pygmt/datasets/earth_relief.py | 7 +++++++ pygmt/datasets/earth_vertical_gravity_gradient.py | 7 +++++++ 4 files changed, 31 insertions(+) diff --git a/pygmt/datasets/earth_free_air_anomaly.py b/pygmt/datasets/earth_free_air_anomaly.py index 57d47f01b4d..54e67c3e885 100644 --- a/pygmt/datasets/earth_free_air_anomaly.py +++ b/pygmt/datasets/earth_free_air_anomaly.py @@ -26,6 +26,13 @@ def load_earth_free_air_anomaly(resolution="01d", region=None, registration=None registration type (**p** for pixel registration or **g** for gridline registration). + The default color palette table (CPT) for this dataset is *@earth_faa.cpt*. + It's implicitly used when passing in the file name of the dataset to any + grid plotting method if no CPT is explicitly specified. When the dataset + is loaded and plotted as an :class:`xarray.DataArray` object, the default + CPT is ignored and GMT's default CPT (*turbo*) is used. To use the + dataset-specific CPT, you need to explicitly set ``cmap="@earth_faa.cpt"``. + Refer to :gmt-datasets:`earth-faa.html` for more details. Parameters diff --git a/pygmt/datasets/earth_magnetic_anomaly.py b/pygmt/datasets/earth_magnetic_anomaly.py index d8641f26b45..baa3d4aa541 100644 --- a/pygmt/datasets/earth_magnetic_anomaly.py +++ b/pygmt/datasets/earth_magnetic_anomaly.py @@ -33,6 +33,16 @@ def load_earth_magnetic_anomaly( (see below), and *reg* is grid registration type (**p** for pixel registration or **g** for gridline registration). + The default color palette table (CPT) for this dataset is *@earth_mag.cpt* + for ``data_source="emag2"`` and ``data_source="emag2_4km"``, and + *@earth_wdmam.cpt* for ``data_source="wdmam"``. + It's implicitly used when passing in the file name of the dataset to any + grid plotting method if no CPT is explicitly specified. When the dataset + is loaded and plotted as an :class:`xarray.DataArray` object, the default + CPT is ignored and GMT's default CPT (*turbo*) is used. To use the + dataset-specific CPT, you need to explicitly set ``cmap="@earth_mag.cpt"`` + or ``cmap="@earth_wdmam.cpt"``. + Refer to :gmt-datasets:`earth-mag.html` and :gmt-datasets:`earth-wdmam.html` for more details. diff --git a/pygmt/datasets/earth_relief.py b/pygmt/datasets/earth_relief.py index a927e7492d1..a54acf4e233 100644 --- a/pygmt/datasets/earth_relief.py +++ b/pygmt/datasets/earth_relief.py @@ -37,6 +37,13 @@ def load_earth_relief( grid resolution (see below), and *reg* is grid registration type (**p** for pixel registration or **g** for gridline registration). + The default color palette table (CPT) for this dataset is *geo*. + It's implicitly used when passing in the file name of the dataset to any + grid plotting method if no CPT is explicitly specified. When the dataset + is loaded and plotted as an :class:`xarray.DataArray` object, the default + CPT is ignored and GMT's default CPT (*turbo*) is used. To use the + dataset-specific CPT, you need to explicitly set ``cmap="geo"``. + Refer to :gmt-datasets:`earth-relief.html` for more details about available datasets, including version information and references. diff --git a/pygmt/datasets/earth_vertical_gravity_gradient.py b/pygmt/datasets/earth_vertical_gravity_gradient.py index edfb79fbce7..530e4944cea 100644 --- a/pygmt/datasets/earth_vertical_gravity_gradient.py +++ b/pygmt/datasets/earth_vertical_gravity_gradient.py @@ -29,6 +29,13 @@ def load_earth_vertical_gravity_gradient( registration type (**p** for pixel registration or **g** for gridline registration). + The default color palette table (CPT) for this dataset is *@earth_vgg.cpt*. + It's implicitly used when passing in the file name of the dataset to any + grid plotting method if no CPT is explicitly specified. When the dataset + is loaded and plotted as an :class:`xarray.DataArray` object, the default + CPT is ignored and GMT's default CPT (*turbo*) is used. To use the + dataset-specific CPT, you need to explicitly set ``cmap="@earth_vgg.cpt"``. + Refer to :gmt-datasets:`earth-vgg.html` for more details. Parameters From eaed409395d5ac2c112ac8ae2f0173321bc1c97e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 19 Jun 2023 08:08:30 +0800 Subject: [PATCH 6/8] Update pygmt/datasets/earth_magnetic_anomaly.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- pygmt/datasets/earth_magnetic_anomaly.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/datasets/earth_magnetic_anomaly.py b/pygmt/datasets/earth_magnetic_anomaly.py index baa3d4aa541..867447d2e17 100644 --- a/pygmt/datasets/earth_magnetic_anomaly.py +++ b/pygmt/datasets/earth_magnetic_anomaly.py @@ -33,7 +33,7 @@ def load_earth_magnetic_anomaly( (see below), and *reg* is grid registration type (**p** for pixel registration or **g** for gridline registration). - The default color palette table (CPT) for this dataset is *@earth_mag.cpt* + The default color palette tables (CPTs) for this dataset are *@earth_mag.cpt* for ``data_source="emag2"`` and ``data_source="emag2_4km"``, and *@earth_wdmam.cpt* for ``data_source="wdmam"``. It's implicitly used when passing in the file name of the dataset to any From 9b2ef8394c59341346196c3680426332641b0ae0 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 19 Jun 2023 12:00:19 +0800 Subject: [PATCH 7/8] Fix style --- pygmt/datasets/earth_magnetic_anomaly.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pygmt/datasets/earth_magnetic_anomaly.py b/pygmt/datasets/earth_magnetic_anomaly.py index 867447d2e17..d80f06310f5 100644 --- a/pygmt/datasets/earth_magnetic_anomaly.py +++ b/pygmt/datasets/earth_magnetic_anomaly.py @@ -33,15 +33,15 @@ def load_earth_magnetic_anomaly( (see below), and *reg* is grid registration type (**p** for pixel registration or **g** for gridline registration). - The default color palette tables (CPTs) for this dataset are *@earth_mag.cpt* - for ``data_source="emag2"`` and ``data_source="emag2_4km"``, and - *@earth_wdmam.cpt* for ``data_source="wdmam"``. - It's implicitly used when passing in the file name of the dataset to any - grid plotting method if no CPT is explicitly specified. When the dataset - is loaded and plotted as an :class:`xarray.DataArray` object, the default - CPT is ignored and GMT's default CPT (*turbo*) is used. To use the - dataset-specific CPT, you need to explicitly set ``cmap="@earth_mag.cpt"`` - or ``cmap="@earth_wdmam.cpt"``. + The default color palette tables (CPTs) for this dataset are + *@earth_mag.cpt* for ``data_source="emag2"`` and + ``data_source="emag2_4km"``, and *@earth_wdmam.cpt* for + ``data_source="wdmam"``. It's implicitly used when passing in the file name + of the dataset to any grid plotting method if no CPT is explicitly + specified. When the dataset is loaded and plotted as an + :class:`xarray.DataArray` object, the default CPT is ignored and GMT's + default CPT (*turbo*) is used. To use the dataset-specific CPT, you need to + explicitly set ``cmap="@earth_mag.cpt"`` or ``cmap="@earth_wdmam.cpt"``. Refer to :gmt-datasets:`earth-mag.html` and :gmt-datasets:`earth-wdmam.html` for more details. From d498f31a45a718d34271d1a1be5d8c14dcc44f2d Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 3 Jul 2023 19:37:11 +0800 Subject: [PATCH 8/8] Update pygmt/datasets/earth_magnetic_anomaly.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- pygmt/datasets/earth_magnetic_anomaly.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pygmt/datasets/earth_magnetic_anomaly.py b/pygmt/datasets/earth_magnetic_anomaly.py index d80f06310f5..8ce7b50a0e9 100644 --- a/pygmt/datasets/earth_magnetic_anomaly.py +++ b/pygmt/datasets/earth_magnetic_anomaly.py @@ -36,9 +36,9 @@ def load_earth_magnetic_anomaly( The default color palette tables (CPTs) for this dataset are *@earth_mag.cpt* for ``data_source="emag2"`` and ``data_source="emag2_4km"``, and *@earth_wdmam.cpt* for - ``data_source="wdmam"``. It's implicitly used when passing in the file name - of the dataset to any grid plotting method if no CPT is explicitly - specified. When the dataset is loaded and plotted as an + ``data_source="wdmam"``. The dataset-specific CPT is implicitly used when + passing in the file name of the dataset to any grid plotting method if no + CPT is explicitly specified. When the dataset is loaded and plotted as an :class:`xarray.DataArray` object, the default CPT is ignored and GMT's default CPT (*turbo*) is used. To use the dataset-specific CPT, you need to explicitly set ``cmap="@earth_mag.cpt"`` or ``cmap="@earth_wdmam.cpt"``.