diff --git a/README.md b/README.md index 27ff281d..8840f4b2 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ plotter.add_mesh( ) plotter.add_base_layer(texture=gv.natural_earth_hypsometric()) plotter.add_coastlines(resolution="10m") -plotter.add_graticule(lon_step=45) +plotter.add_graticule() plotter.view_xy(negative=True) plotter.add_axes() plotter.show() @@ -260,7 +260,7 @@ sargs = {"title": f"{sample.name} / {sample.units}"} plotter.add_mesh(mesh, scalar_bar_args=sargs) plotter.add_coastlines() plotter.add_base_layer(texture=gv.natural_earth_hypsometric()) -plotter.add_graticule(lon_step=45) +plotter.add_graticule() plotter.add_axes() plotter.view_xy() plotter.show() @@ -304,7 +304,7 @@ sargs = {"title": f"{sample.name} / {sample.units}"} plotter.add_mesh(mesh, scalar_bar_args=sargs) plotter.add_coastlines() plotter.add_base_layer(texture=gv.natural_earth_hypsometric()) -plotter.add_graticule(lon_step=45) +plotter.add_graticule() plotter.add_axes() plotter.view_xy() plotter.show() diff --git a/src/geovista/examples/from_unstructured__icosahedral.py b/src/geovista/examples/from_unstructured__icosahedral.py index 53fe83f4..7ec89b56 100755 --- a/src/geovista/examples/from_unstructured__icosahedral.py +++ b/src/geovista/examples/from_unstructured__icosahedral.py @@ -23,7 +23,7 @@ def main() -> None: Circulation Model (GCM) part of Institut Pierre-Simon Laplace (IPSL-CM) Earth System Model. The data targets the mesh faces/cells. - Note that, Natural Earth coastlines are also rendered. + Note that, a graticule and Natural Earth coastlines are also rendered. """ # load the sample data @@ -40,6 +40,7 @@ def main() -> None: sargs = {"title": f"{sample.name} / {sample.units}", "shadow": True} plotter.add_mesh(mesh, scalar_bar_args=sargs) plotter.add_coastlines() + plotter.add_graticule() plotter.add_axes() plotter.add_text( "DYNAMICO Icosahedral (10m Coastlines)", diff --git a/src/geovista/examples/from_unstructured__icosahedral_poly.py b/src/geovista/examples/from_unstructured__icosahedral_poly.py index b60013fe..4d9dc431 100755 --- a/src/geovista/examples/from_unstructured__icosahedral_poly.py +++ b/src/geovista/examples/from_unstructured__icosahedral_poly.py @@ -23,8 +23,8 @@ def main() -> None: Circulation Model (GCM) part of Institut Pierre-Simon Laplace (IPSL-CM) Earth System Model. The data targets the mesh faces/cells. - Note that, Natural Earth coastlines are also rendered, and the mesh is transformed - to the Polyconic pseudo-conical projection. + Note that, a graticule and Natural Earth coastlines are rendered, and the + mesh is also transformed to the Polyconic pseudo-conical projection. """ # load the sample data @@ -41,6 +41,7 @@ def main() -> None: sargs = {"title": f"{sample.name} / {sample.units}", "shadow": True} plotter.add_mesh(mesh, scalar_bar_args=sargs) plotter.add_coastlines() + plotter.add_graticule() plotter.add_axes() plotter.add_text( f"DYNAMICO Icosahedral ({projection})", diff --git a/src/geovista/examples/from_unstructured__lfric_sst.py b/src/geovista/examples/from_unstructured__lfric_sst.py index afa428aa..022e08a9 100755 --- a/src/geovista/examples/from_unstructured__lfric_sst.py +++ b/src/geovista/examples/from_unstructured__lfric_sst.py @@ -22,8 +22,8 @@ def main() -> None: It uses an unstructured Met Office LFRic C48 cubed-sphere of surface temperature data located on the mesh faces/cells. - Note that, a threshold is also applied to remove land NaN cells, and a - Natural Earth base layer is rendered along with Natural Earth coastlines. + Note that, a threshold is also applied to remove land NaN cells. A Natural Earth + base layer is also rendered along with Natural Earth coastlines and a graticule. """ # load the sample data @@ -49,6 +49,7 @@ def main() -> None: plotter.add_mesh(mesh, show_edges=True, scalar_bar_args=sargs) plotter.add_base_layer(texture=gv.natural_earth_1()) plotter.add_coastlines() + plotter.add_graticule() plotter.add_axes() plotter.add_text( "LFRic C48 Unstructured Cube-Sphere (10m Coastlines)", diff --git a/src/geovista/examples/from_unstructured__lfric_sst_bonne.py b/src/geovista/examples/from_unstructured__lfric_sst_bonne.py index b9a8aeb1..2e3a3741 100755 --- a/src/geovista/examples/from_unstructured__lfric_sst_bonne.py +++ b/src/geovista/examples/from_unstructured__lfric_sst_bonne.py @@ -22,9 +22,9 @@ def main() -> None: It uses an unstructured Met Office LFRic C48 cubed-sphere of surface temperature data located on the mesh faces/cells. - Note that, a threshold is also applied to remove land NaN cells, and a - Natural Earth base layer is rendered along with Natural Earth coastlines. The mesh - is also transformed to the Bonne projection. + Note that, a threshold is also applied to remove land NaN cells. A Natural Earth + base layer is also rendered along with Natural Earth coastlines and a graticule. + The mesh is also transformed to the Bonne projection. """ # load the sample data @@ -45,11 +45,12 @@ def main() -> None: mesh = mesh.threshold() # plot the mesh - plotter = gv.GeoPlotter(crs=(projection := "+proj=bonne +lat_1=10")) + plotter = gv.GeoPlotter(crs=(projection := "+proj=bonne +lat_1=10 +lon_0=180")) sargs = {"title": f"{sample.name} / {sample.units}", "shadow": True} plotter.add_mesh(mesh, show_edges=True, scalar_bar_args=sargs) plotter.add_base_layer(texture=gv.natural_earth_1()) plotter.add_coastlines() + plotter.add_graticule() plotter.add_axes() plotter.add_text( f"LFRic C48 Unstructured Cube-Sphere ({projection})", diff --git a/src/geovista/gridlines.py b/src/geovista/gridlines.py index ec5ccb0d..06e8ced5 100644 --- a/src/geovista/gridlines.py +++ b/src/geovista/gridlines.py @@ -82,7 +82,7 @@ LONGITUDE_START: float = BASE #: The default step size between graticule meridians (degrees). -LONGITUDE_STEP: float = 30.0 +LONGITUDE_STEP: float = 45.0 #: The period or upper bound (degrees) for meridian step size. LONGITUDE_STEP_PERIOD: float = 180.0