diff --git a/latest b/latest index 6ddc06173ac..045d7384f09 120000 --- a/latest +++ b/latest @@ -1 +1 @@ -v0.13.0 \ No newline at end of file +v0.14.0 \ No newline at end of file diff --git a/v0.14.0/.buildinfo b/v0.14.0/.buildinfo new file mode 100644 index 00000000000..f0e1b25b0bd --- /dev/null +++ b/v0.14.0/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 0cae6ce2c28fafe2a0bdbf7c7991337a +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/v0.14.0/_downloads/004f6d23a04369ca0db9c83de3b6182d/scalebar.ipynb b/v0.14.0/_downloads/004f6d23a04369ca0db9c83de3b6182d/scalebar.ipynb new file mode 100644 index 00000000000..7b8d99b8739 --- /dev/null +++ b/v0.14.0/_downloads/004f6d23a04369ca0db9c83de3b6182d/scalebar.ipynb @@ -0,0 +1,61 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Scale bar\n\nThe ``map_scale`` parameter of the :meth:`pygmt.Figure.basemap` and\n:meth:`pygmt.Figure.coast` methods is used to add a scale bar to a map.\nThis example shows how such a scale bar can be customized:\n\n - position: **g**\\|\\ **j**\\|\\ **J**\\|\\ **n**\\|\\ **x**. Set the position\n of the reference point. Choose from\n\n - **g**: Give map coordinates as *longitude*\\/\\ *latitude*.\n - **j**\\|\\ **J**: Specify a two-character (order independent) code.\n Choose from vertical **T**\\(op), **M**\\(iddle), or **B**\\(ottom) and\n horizontal **L**\\(eft), **C**\\(entre), or **R**\\(ight). Lower / upper\n case **j** / **J** mean inside / outside of the map bounding box.\n - **n**: Give normalized bounding box coordinates as *nx*\\/\\ *ny*.\n - **x**: Give plot coordinates as *x*\\/\\ *y*.\n\n - length: **+w**. Give a distance value, and, optionally a distance unit.\n Choose from **e** (meters), **f** (feet), **k** (kilometers) [Default],\n **M** (statute miles), **n** (nautical miles), or **u** (US survey feet).\n - origin: **+c**\\ [*slon*/]\\ *slat*. Control where on the map the scale bar\n applies. If **+c** is not given the reference point is used. If only\n **+c** is appended the middle of the map is used. Note that *slon* is only\n optional for projections with constant scale along parallels, e.g.,\n Mercator projection.\n - justify: **+j**. Set the anchor point. Specify a two-character (order\n independent) code. Choose from vertical **T**\\(op), **M**\\(iddle), or\n **B**\\(ottom) and horizontal **L**\\(eft), **C**\\(entre), or **R**\\(ight).\n - offset: **+o**\\ *offset* or **+o**\\ *xoffset*/\\ *yoffset*. Give either a\n common shift or individual shifts in x (longitude) and y (latitude)\n directions.\n - height: Use :gmt-term:`MAP_SCALE_HEIGHT` via :func:`pygmt.config`.\n - fancy style: **+f**. Get a scale bar that looks like train tracks.\n - unit: **+u**. Add the distance unit given via **+w** to the single\n distance values.\n - label: **+l**. Add the distance unit given via **+w** as label. Append\n text to get a customized label instead.\n - alignment: **+a**. Set the label alignment. Choose from **t**\\(op)\n [Default], **b**\\(ottom), **l**\\(eft), or **r**\\(ight).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\n# Create a new Figure instance\nfig = pygmt.Figure()\n\n# Mercator projection with 10 centimeters width\nfig.basemap(region=[-45, -25, -15, 0], projection=\"M0/0/10c\", frame=[\"WSne\", \"af\"])\n\n# -----------------------------------------------------------------------------\n# Top Left: Add a plain scale bar\n# It is placed based on geographic coordinates (g) 42\u00b0 West and 1\u00b0 South,\n# applies at the reference point (+c is not given), and represents a\n# length (+w) of 500 kilometers\nfig.basemap(map_scale=\"g-42/-1+w500k\")\n\n# -----------------------------------------------------------------------------\n# Top Right: Add a fancy scale bar\n# It is placed based on normalized bounding box coordinates (n)\n# Use a fancy style (+f) to get a scale bar that looks like train tracks\n# Add the distance unit (+u) to the single distance values\nfig.basemap(map_scale=\"n0.8/0.95+w500k+f+u\")\n\n# -----------------------------------------------------------------------------\n# Bottom Left: Add a thick scale bar\n# Adjust the GMT default parameter MAP_SCALE_HEIGHT locally (the change applies\n# only to the code within the \"with\" statement)\n# It applies (+c) at the middle of the map (no location is appended to +c)\n# Without appending text, +l adds the distance unit as label\nwith pygmt.config(MAP_SCALE_HEIGHT=\"10p\"):\n fig.basemap(map_scale=\"n0.2/0.15+c+w500k+f+l\")\n\n# -----------------------------------------------------------------------------\n# Bottom Right: Add a scale bar valid for a specific location\n# It is placed at BottomRight (j) using MiddleRight as anchor point (+j) with\n# an offset (+o) of 1 centimeter in both x and y directions\n# It applies (+c) at -7\u00b0 South, add a customized label by appending text to +l\nfig.basemap(map_scale=\"jBR+jMR+o1c/1c+c-7+w500k+f+u+lvalid at 7\u00b0 S\")\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The ``box`` parameter allows surrounding the scale bar. This can be useful\nwhen adding a scale bar to a colorful map. To fill the box, append **+g**\nwith the desired color (or pattern). The outline of the box can be adjusted\nby appending **+p** with the desired thickness, color, and style. To force\nrounded edges append **+r** with the desired radius.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Create a new Figure instance\nfig = pygmt.Figure()\n\nfig.coast(\n region=[-45, -25, -15, 0],\n projection=\"M10c\",\n land=\"tan\",\n water=\"steelblue\",\n frame=[\"WSne\", \"af\"],\n # Set the label alignment (+a) to right (r)\n map_scale=\"jBL+o1c/1c+c-7+w500k+f+lkm+ar\",\n # Fill the box in white with a transparency of 30 percent, add a solid\n # outline in darkgray (gray30) with a thickness of 0.5 points, and use\n # rounded edges with a radius of 3 points\n box=\"+gwhite@30+p0.5p,gray30,solid+r3p\",\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/011dc0cae17575719cab06d0e76a5649/patterns.py b/v0.14.0/_downloads/011dc0cae17575719cab06d0e76a5649/patterns.py new file mode 100644 index 00000000000..a518ac7f034 --- /dev/null +++ b/v0.14.0/_downloads/011dc0cae17575719cab06d0e76a5649/patterns.py @@ -0,0 +1,67 @@ +""" +Bit and hachure patterns +======================== + +In addition to colors, PyGMT also allows using bit and hachure patterns to fill +symbols, polygons, and other areas, via the ``fill`` parameter or similar parameters. + +Example method parameters that support bit and hachure patterns include: + +- :meth:`pygmt.Figure.coast`: Land and water masses via ``land`` and ``water`` +- :meth:`pygmt.Figure.histogram`: Histogram bars via ``fill`` +- :meth:`pygmt.Figure.meca`: Focal mechanisms via ``compressionfill`` and + ``extensionfill`` +- :meth:`pygmt.Figure.plot`: Symbols and polygons via ``fill`` +- :meth:`pygmt.Figure.rose`: Histogram sectors via ``fill`` +- :meth:`pygmt.Figure.solar`: Day-light terminators via ``fill`` +- :meth:`pygmt.Figure.ternary`: Symbols via ``fill`` +- :meth:`pygmt.Figure.velo`: Uncertainty wedges and velocity error ellipses via + ``uncertaintyfill`` +- :meth:`pygmt.Figure.wiggle`: Anomalies via ``fillpositive`` and ``fillnegative`` + +GMT provides 90 predefined patterns that can be used in PyGMT. The patterns are numbered +from 1 to 90, and can be colored and inverted. The resolution of the pattern +can be changed, and the background and foreground colors can be set. For a complete list +of available patterns and the full syntax to specify a pattern, refer to the +:doc:`/techref/patterns`. +""" + +# %% +import pygmt + +# A list of patterns that will be demonstrated. +# To use a pattern as fill append "p" and the number of the desired pattern. +# By default, the pattern is plotted in black and white with a resolution of 300 dpi. +patterns = [ + # Plot a hachted pattern via pattern number 8 + "p8", + # Plot a dotted pattern via pattern number 19 + "p19", + # Set the background color ("+b") to "red3" and the foreground color ("+f") to + # "lightgray" + "p19+bred3+flightbrown", + # Invert the pattern by using a capitalized "P" + "P19+bred3+flightbrown", + # Change the resolution ("+r") to 100 dpi + "p19+bred3+flightbrown+r100", + # Make the background transparent by not giving a color after "+b"; + # works analogous for the foreground + "p19+b+flightbrown+r100", +] + +fig = pygmt.Figure() +fig.basemap( + region=[0, 10, 0, 12], + projection="X10c", + frame="rlbt+glightgray+tBit and Hachure Patterns", +) + +y = 11 +for pattern in patterns: + # Plot a square with the pattern as fill. + # The square has a size of 2 centimeters with a 1 point thick, black outline. + fig.plot(x=2, y=y, style="s2c", pen="1p,black", fill=pattern) + # Add a description of the pattern. + fig.text(x=4, y=y, text=pattern, font="Courier-Bold", justify="ML") + y -= 2 +fig.show() diff --git a/v0.14.0/_downloads/020a0d3a1bf85b03399dbd49671e6702/regions.py b/v0.14.0/_downloads/020a0d3a1bf85b03399dbd49671e6702/regions.py new file mode 100644 index 00000000000..5306482502f --- /dev/null +++ b/v0.14.0/_downloads/020a0d3a1bf85b03399dbd49671e6702/regions.py @@ -0,0 +1,236 @@ +""" +Setting the region +================== + +Many of the plotting methods take the ``region`` parameter, which sets the +area that will be shown in the figure. This tutorial covers the different types +of inputs that it can accept. +""" + +# %% +import pygmt + +# %% +# Coordinates +# ----------- +# +# A string of coordinates can be passed to ``region``, in the form of +# *xmin*/*xmax*/*ymin*/*ymax*. + +fig = pygmt.Figure() +fig.coast( + # Set the x-range from 10E to 20E and the y-range to 35N to 45N + region="10/20/35/45", + # Set projection to Mercator, and the figure size to 15 centimeters + projection="M15c", + # Set the color of the land to light gray + land="lightgray", + # Set the color of the water to white + water="white", + # Display the national borders and set the pen thickness to 0.5p + borders="1/0.5p", + # Display the shorelines and set the pen thickness to 0.5p + shorelines="1/0.5p", + # Set the frame to display annotations and gridlines + frame="ag", +) +fig.show() + +# %% +# The coordinates can be passed to ``region`` as a list, in the form of +# [*xmin*, *xmax*, *ymin*, *ymax*]. + +fig = pygmt.Figure() +fig.coast( + # Set the x-range from 10E to 20E and the y-range to 35N to 45N + region=[10, 20, 35, 45], + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", +) +fig.show() + +# %% +# Instead of passing axes minima and maxima, the coordinates can be passed for +# the bottom-left and top-right corners. The string format takes the +# coordinates for the bottom-left and top-right coordinates. To specify corner +# coordinates, append **+r** at the end of the ``region`` string. + +fig = pygmt.Figure() +fig.coast( + # Set the bottom-left corner as 10E, 35N and the top-right corner as + # 20E, 45N + region="10/35/20/45+r", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", +) +fig.show() + + +# %% +# Global regions +# -------------- +# +# In addition to passing coordinates, the argument **d** can be passed to set +# the region to the entire globe. The range is 180W to 180E (-180, 180) and 90S +# to 90N (-90 to 90). With no parameters set for the projection, the figure +# defaults to be centered at the mid-point of both x- and y-axes. Using +# **d**\ , the figure is centered at (0, 0), or the intersection of the equator +# and prime meridian. + +fig = pygmt.Figure() +fig.coast( + region="d", + projection="Cyl_stere/12c", + land="darkgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", +) +fig.show() + +# %% +# The argument **g** can be passed, which encompasses the entire globe. The +# range is 0E to 360E (0, 360) and 90S to 90N (-90 to 90). With no parameters +# set for the projection, the figure is centered at (180, 0), or the +# intersection of the equator and International Date Line. + +fig = pygmt.Figure() +fig.coast( + region="g", + projection="Cyl_stere/12c", + land="darkgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", +) +fig.show() + + +# %% +# ISO code +# -------- +# +# The ``region`` can be set to include a specific area specified by the +# two-character ISO 3166-1 alpha-2 convention +# (for further information: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + +fig = pygmt.Figure() +fig.coast( + # Set the figure region to encompass Japan with the ISO code "JP" + region="JP", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", +) +fig.show() + +# %% +# The area encompassed by the ISO code can be expanded by appending +# **+r**\ *increment* to the ISO code. The *increment* unit is in degrees, and +# if only one value is added it expands the range of the region in all +# directions. Using **+r** expands the final region boundaries to be multiples +# of *increment* . + +fig = pygmt.Figure() +fig.coast( + # Expand the region boundaries to be multiples of 3 degrees in all + # directions + region="JP+r3", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", +) +fig.show() + +# %% +# Instead of expanding the range of the plot uniformly in all directions, two +# values can be passed to expand differently on each axis. The format is +# *xinc*/*yinc*. + +fig = pygmt.Figure() +fig.coast( + # Expand the region boundaries to be multiples of 3 degrees on the x-axis + # and 5 degrees on the y-axis. + region="JP+r3/5", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", +) +fig.show() + +# %% +# Instead of expanding the range of the plot uniformly in all directions, four +# values can be passed to expand differently in each direction. +# The format is *winc*/*einc*/*sinc*/*ninc*, which expands on the west, +# east, south, and north axes. + +fig = pygmt.Figure() +fig.coast( + # Expand the region boundaries to be multiples of 3 degrees to the west, 5 + # degrees to the east, 7 degrees to the south, and 9 degrees to the north. + region="JP+r3/5/7/9", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", +) +fig.show() + +# %% +# The ``region`` increment can be appended with **+R**, which adds the +# increment without rounding. + +fig = pygmt.Figure() +fig.coast( + # Expand the region setting outside the range of Japan by 3 degrees in all + # directions, without rounding to the nearest increment. + region="JP+R3", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", +) +fig.show() + +# %% +# The ``region`` increment can be appended with **+e**, which is like **+r** +# and expands the final region boundaries to be multiples of *increment*. +# However, it ensures that the bounding box extends by at least 0.25 times the +# increment. + +fig = pygmt.Figure() +fig.coast( + # Expand the region boundaries to be multiples of 3 degrees in all + # directions + region="JP+e3", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", +) +fig.show() diff --git a/v0.14.0/_downloads/043329be3aeb3845416fed7987596202/tilemaps.ipynb b/v0.14.0/_downloads/043329be3aeb3845416fed7987596202/tilemaps.ipynb new file mode 100644 index 00000000000..bf361dc5aba --- /dev/null +++ b/v0.14.0/_downloads/043329be3aeb3845416fed7987596202/tilemaps.ipynb @@ -0,0 +1,61 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Tile maps\n\nThe :meth:`pygmt.Figure.tilemap` method allows to plot\ntiles from a tile server or local file as a basemap or overlay.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import contextily\nimport pygmt\n\nfig = pygmt.Figure()\nfig.tilemap(\n region=[-157.84, -157.8, 21.255, 21.285],\n projection=\"M12c\",\n # Set level of details (0-22)\n # Higher levels mean a zoom level closer to the Earth's\n # surface with more tiles covering a smaller\n # geographic area and thus more details and vice versa\n # Please note, not all zoom levels are always available\n zoom=14,\n # Use tiles from OpenStreetMap tile server\n source=\"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\",\n frame=\"afg\",\n)\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It's also possible to use tiles provided via the\n[contextily](https://github.com/geopandas/contextily)_\nlibrary. See :doc:`Contextily providers `\nfor a list of possible tilemap options.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.tilemap(\n region=[-157.84, -157.8, 21.255, 21.285],\n projection=\"M12c\",\n # Use the CartoDB Positron option from contextily\n source=contextily.providers.CartoDB.Positron,\n frame=\"afg\",\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/04a27f4ee668c7dfab99171293a9b062/02_contour_map.py b/v0.14.0/_downloads/04a27f4ee668c7dfab99171293a9b062/02_contour_map.py new file mode 100644 index 00000000000..4a9062916be --- /dev/null +++ b/v0.14.0/_downloads/04a27f4ee668c7dfab99171293a9b062/02_contour_map.py @@ -0,0 +1,133 @@ +""" +2. Create a contour map +======================= + +This tutorial page covers the basics of creating a figure of the Earth relief, using a +remote dataset hosted by GMT, using the method :meth:`pygmt.datasets.load_earth_relief`. +It will use the :meth:`pygmt.Figure.grdimage`, :meth:`pygmt.Figure.grdcontour`, +:meth:`pygmt.Figure.colorbar`, and :meth:`pygmt.Figure.coast` methods for plotting. +""" + +# %% +import pygmt + +# %% +# Loading the Earth relief dataset +# -------------------------------- +# +# The first step is to use :meth:`pygmt.datasets.load_earth_relief`. The ``resolution`` +# parameter sets the resolution of the remote grid file, which will affect the +# resolution of the plot made later in the tutorial. The ``registration`` parameter +# determines the grid registration. +# +# This grid region covers the islands of Guam and Rota in the western Pacific Ocean. + +grid = pygmt.datasets.load_earth_relief( + resolution="30s", region=[144.5, 145.5, 13, 14.5], registration="gridline" +) + + +# %% +# Plotting Earth relief +# --------------------- +# +# To plot Earth relief data, the method :meth:`pygmt.Figure.grdimage` can be used to +# plot a color-coded figure to display the topography and bathymetry in the grid file. +# The ``grid`` parameter accepts the input grid, which in this case is the remote file +# downloaded in the previous step. If the ``region`` parameter is not set, the region +# boundaries of the input grid are used. +# +# The ``cmap`` parameter sets the color palette table (CPT) used for portraying the +# Earth relief. The :meth:`pygmt.Figure.grdimage` method uses the input grid to relate +# the Earth relief values to a specific color within the CPT. In this case, the CPT +# "oleron" is used; a full list of CPTs can be found at :gmt-docs:`reference/cpts.html`. + +fig = pygmt.Figure() +fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron") +fig.show() + + +# %% +# Adding a colorbar +# ----------------- +# +# To show how the plotted colors relate to the Earth relief, a colorbar can be added +# using the :meth:`pygmt.Figure.colorbar` method. +# +# To control the annotation and labels on the colorbar, a list is passed to the +# ``frame`` parameter. The value beginning with ``"a"`` sets the interval for the +# annotation on the colorbar, in this case every 1,000 meters. To set the label for an +# axis on the colorbar, the argument begins with either ``"x+l"`` (x-axis) or ``"y+l"`` +# (y-axis), followed by the intended label. +# +# By default, the CPT for the colorbar is the same as the one set in +# :meth:`pygmt.Figure.grdimage`. + +fig = pygmt.Figure() +fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron") +fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"]) +fig.show() + + +# %% +# Adding contour lines +# -------------------- +# +# To add contour lines to the color-coded figure, the :meth:`pygmt.Figure.grdcontour` +# method is used. The ``frame`` and ``projection`` are already set using +# :meth:`pygmt.Figure.grdimage` and are not needed again. However, the same input for +# ``grid`` (in this case, the variable named "grid") must be input again. The ``levels`` +# parameter sets the spacing between adjacent contour lines (in this case, 500 meters). +# The ``annotation`` parameter annotates the contour lines corresponding to the given +# interval (in this case, 1,000 meters) with the related values, here elevation or +# bathymetry. By default, these contour lines are drawn thicker. Optionally, the +# appearance (thickness, color, style) of the annotated and the not-annotated contour +# lines can be adjusted (separately) by specifying the desired ``pen``. + +fig = pygmt.Figure() +fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron") +fig.grdcontour(grid=grid, levels=500, annotation=1000) +fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"]) +fig.show() + + +# %% +# Color in land +# ------------- +# +# To make it clear where the islands are located, the :meth:`pygmt.Figure.coast` method +# can be used to color in the landmasses. The ``land`` is colored in as "lightgray", and +# the ``shorelines`` parameter draws a border around the islands. + +fig = pygmt.Figure() +fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron") +fig.grdcontour(grid=grid, levels=500, annotation=1000) +fig.coast(shorelines="2p", land="lightgray") +fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"]) +fig.show() + + +# %% +# Additional exercises +# -------------------- +# +# This is the end of the second tutorial. Here are some additional exercises for the +# concepts that were discussed: +# +# 1. Change the resolution of the grid file to either ``"01m"`` (1 arc-minute, a lower +# resolution) or ``"15s"`` (15 arc-seconds, a higher resolution). Note that higher +# resolution grids will have larger file sizes. Available resolutions can be found +# at :meth:`pygmt.datasets.load_earth_relief`. +# +# 2. Create a contour map of the area around Mt. Rainier. A suggestion for the +# ``region`` would be ``[-122, -121, 46.5, 47.5]``. Adjust the +# :meth:`pygmt.Figure.grdcontour` and :meth:`pygmt.Figure.colorbar` settings as +# needed to make the figure look good. +# +# 3. Create a contour map of São Miguel Island in the Azores; a suggested ``region`` is +# ``[-26, -25, 37.5, 38]``. Instead of coloring in ``land``, set ``water`` to +# "lightblue" to only display Earth relief information for the land. +# +# 4. Try other CPTs, such as "SCM/fes" or "geo". + +# sphinx_gallery_thumbnail_number = 4 diff --git a/v0.14.0/_downloads/04ea079531b896097081b26e6faf512b/cartesian_histograms.ipynb b/v0.14.0/_downloads/04ea079531b896097081b26e6faf512b/cartesian_histograms.ipynb new file mode 100644 index 00000000000..6ab4aa84b11 --- /dev/null +++ b/v0.14.0/_downloads/04ea079531b896097081b26e6faf512b/cartesian_histograms.ipynb @@ -0,0 +1,194 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Cartesian histograms\n\nCartesian histograms can be generated using the :meth:`pygmt.Figure.histogram` method.\nIn this tutorial, different histogram related aspects are addressed:\n\n- Using vertical and horizontal bars\n- Using stair-steps\n- Showing counts and frequency percent\n- Adding annotations to the bars\n- Showing cumulative values\n- Using color and pattern as fill for the bars\n- Using overlaid, stacked, and grouped bars\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Import the required packages\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Generate random data from a normal distribution:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "rng = np.random.default_rng(seed=100)\n\n# Mean of distribution\nmean = 100\n# Standard deviation of distribution\nstddev = 20\n\n# Create two data sets\ndata01 = rng.normal(loc=mean, scale=stddev, size=42)\ndata02 = rng.normal(loc=mean, scale=stddev * 2, size=42)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Vertical and horizontal bars\n\nTo define the width of the bins, the ``series`` parameter has to be specified. The\nbars can be filled via the ``fill`` parameter with either a color or a pattern (see\nlater in this tutorial). Use the ``pen`` parameter to adjust width, color, and style\nof the outlines. By default, a histogram with vertical bars is created. Horizontal\nbars can be achieved via ``horizontal=True``.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\n# Create histogram for data01 with vertical bars\nfig.histogram(\n # Define the plot range as a list of xmin, xmax, ymin, ymax\n # Let ymin and ymax determined automatically by setting both to the same value\n region=[0, 200, 0, 0],\n projection=\"X10c\", # Cartesian projection with a width of 10 centimeters\n # Add frame, annotations (\"a\"), ticks (\"f\"), and y-axis label (\"+l\") \"Counts\"; the\n # numbers give the steps of annotations and ticks\n frame=[\"WStr\", \"xaf10\", \"ya1f1+lCounts\"],\n data=data01,\n # Set the bin width via the \"series\" parameter\n series=10,\n # Fill the bars with color \"red3\"\n fill=\"red3\",\n # Draw a 1-point thick, solid outline in \"darkgray\" around the bars\n pen=\"1p,darkgray,solid\",\n # Choose counts via the \"histtype\" parameter\n histtype=0,\n)\n\n# Shift plot origin by the figure width (\"w\") plus 2 centimeters to the right\nfig.shift_origin(xshift=\"w+2c\")\n\n# Create histogram for data01 with horizontal bars\nfig.histogram(\n region=[0, 200, 0, 0],\n projection=\"X10c\",\n frame=[\"WStr\", \"xaf10\", \"ya1f1+lCounts\"],\n data=data01,\n series=10,\n fill=\"red3\",\n pen=\"1p,darkgray,solid\",\n histtype=0,\n # Use horizontal bars. Note that the x- and y-axis are flipped, with the x-axis\n # plotted vertically and the y-axis plotted horizontally.\n horizontal=True,\n)\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Stair-steps\n\nA stair-step diagram can be created by setting ``stairs=True``. Then only the\nouter outlines of the bars are drawn, and no internal bars are visible.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\n# Create histogram for data01\nfig.histogram(\n region=[0, 200, 0, 0],\n projection=\"X10c\",\n frame=[\"WSne\", \"xaf10\", \"ya1f1+lCounts\"],\n data=data01,\n series=10,\n # Draw a 1-point thick, dotted outline in \"red3\"\n pen=\"1p,red3,dotted\",\n histtype=0,\n # Draw stair-steps in stead of bars\n stairs=True,\n)\n\nfig.shift_origin(xshift=\"w+2c\")\n\n# Create histogram for data02\nfig.histogram(\n region=[0, 200, 0, 0],\n projection=\"X10c\",\n frame=[\"WSne\", \"xaf10\", \"ya1f1+lCounts\"],\n data=data02,\n series=10,\n # Draw a 1.5-points thick, dashed outline in \"orange\"\n pen=\"1.5p,orange,dashed\",\n histtype=0,\n stairs=True,\n)\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Counts and frequency percent\n\nBy default, a histogram showing the counts in each bin is created (``histtype=0``).\nTo show the frequency percent set the ``histtype`` parameter to ``1``. For further\noptions please have a look at the documentation of :meth:`pygmt.Figure.histogram`.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\n# Create histogram for data02 showing counts\nfig.histogram(\n region=[0, 200, 0, 0],\n projection=\"X10c\",\n frame=[\"WSnr\", \"xaf10\", \"ya1f1+lCounts\"],\n data=data02,\n series=10,\n fill=\"orange\",\n pen=\"1p,darkgray,solid\",\n # Choose counts via the \"histtype\" parameter\n histtype=0,\n)\n\nfig.shift_origin(xshift=\"w+1c\")\n\n# Create histogram for data02 showing frequency percent\nfig.histogram(\n region=[0, 200, 0, 0],\n projection=\"X10c\",\n # Add suffix % (+u)\n frame=[\"lSnE\", \"xaf10\", \"ya2f1+u%+lFrequency percent\"],\n data=data02,\n series=10,\n fill=\"orange\",\n pen=\"1p,darkgray,solid\",\n # Choose frequency percent via the \"histtype\" parameter\n histtype=1,\n)\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Cumulative values\n\nTo create a histogram showing the cumulative values set ``cumulative=True``. Here,\nthe bars of the cumulative histogram are filled with a pattern via the ``fill``\nparameter. Annotate each bar with the counts it represents using the ``annotate``\nparameter.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\n# Create histogram for data01 showing the counts per bin\nfig.histogram(\n region=[0, 200, 0, len(data01) + 1],\n projection=\"X10c\",\n frame=[\"WSne\", \"xaf10\", \"ya5f1+lCounts\"],\n data=data01,\n series=10,\n fill=\"red3\",\n pen=\"1p,darkgray,solid\",\n histtype=0,\n # Annotate each bar with the counts it represents\n annotate=True,\n)\n\nfig.shift_origin(xshift=\"w+1c\")\n\n# Create histogram for data01 showing the cumulative counts\nfig.histogram(\n region=[0, 200, 0, len(data01) + 1],\n projection=\"X10c\",\n frame=[\"wSnE\", \"xaf10\", \"ya5f1+lCumulative counts\"],\n data=data01,\n series=10,\n # Use pattern (\"p\") number 8 as fill for the bars\n # Set the background (\"+b\") to white [Default]\n # Set the foreground (\"+f\") to black [Default]\n fill=\"p8+bwhite+fblack\",\n pen=\"1p,darkgray,solid\",\n histtype=0,\n # Show cumulative counts\n cumulative=True,\n # Offset (\"+o\") the label by 10 points in negative y-direction\n annotate=\"+o-10p\",\n)\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Overlaid bars\n\nOverlaid or overlapping bars can be achieved by plotting two or several histograms,\neach for one data set, on top of each other. The legend entry can be specified via\nthe ``label`` parameter.\n\nLimitations of histograms with overlaid bars are:\n\n- Mixing of colors or/and patterns\n- Visually more colors or/and patterns than data sets\n- Visually a \"third histogram\" (or more in case of more than two data sets)\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\n# Create histogram for data01\nfig.histogram(\n region=[0, 200, 0, 0],\n projection=\"X10c\",\n frame=[\"WSne\", \"xaf10\", \"ya1f1+lCounts\"],\n data=data01,\n series=10,\n fill=\"red3\",\n pen=\"1p,darkgray,solid\",\n histtype=0,\n # Set legend entry\n label=\"data01\",\n)\n\n# Create histogram for data02\n# It is plotted on top of the histogram for data01\nfig.histogram(\n data=data02,\n series=10,\n # Fill bars with color \"orange\", use a transparency of 50% (\"@50\")\n fill=\"orange@50\",\n pen=\"1p,darkgray,solid\",\n histtype=0,\n label=\"data02\",\n)\n\n# Add legend\nfig.legend()\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Stacked bars\n\nHistograms with stacked bars are not directly supported by PyGMT. Thus, before\nplotting, combined data sets have to be created from the single data sets. Then,\nstacked bars can be achieved similar to overlaid bars via plotting two or several\nhistograms on top of each other.\n\nLimitations of histograms with stacked bars are:\n\n- No common baseline\n- Partly not directly clear whether overlaid or stacked bars\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Combine the two data sets to one data set\ndata_merge = np.concatenate((data01, data02), axis=None)\n\nfig = pygmt.Figure()\n\n# Create histogram for data02 by using the combined data set\nfig.histogram(\n region=[0, 200, 0, 0],\n projection=\"X10c\",\n frame=[\"WSne\", \"xaf10\", \"ya1f1+lCounts\"],\n data=data_merge,\n series=10,\n fill=\"orange\",\n pen=\"1p,darkgray,solid\",\n histtype=0,\n # The combined data set appears in the final histogram visually as data set data02\n label=\"data02\",\n)\n\n# Create histogram for data01\n# It is plotted on top of the histogram for data02\nfig.histogram(\n data=data01,\n series=10,\n fill=\"red3\",\n pen=\"1p,darkgray,solid\",\n histtype=0,\n label=\"data01\",\n)\n\n# Add legend\nfig.legend()\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Grouped bars\n\nBy setting the ``barwidth`` parameter in respect to the values passed to the\n``series`` parameter histograms with grouped bars can be created.\n\nLimitations of histograms with grouped bars are:\n\n- Careful setting width and position of the bars in respect to the bin width\n- Difficult to see the variations of the single data sets\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Width used for binning the data\nbinwidth = 10\n\nfig = pygmt.Figure()\n\n# Create histogram for data01\nfig.histogram(\n region=[0, 200, 0, 0],\n projection=\"X10c\",\n frame=[\"WSne\", \"xaf10g10\", \"ya1f1+lCounts\"],\n data=data01,\n series=binwidth,\n fill=\"red3\",\n pen=\"1p,darkgray,solid\",\n histtype=0,\n # Calculate the bar width in respect to the bin width, here for two data sets half\n # of the bin width\n # Offset (\"+o\") the bars to align each bar with the left limit of the corresponding\n # bin\n barwidth=f\"{binwidth/2}+o-{binwidth/4}\",\n label=\"data01\",\n)\n\n# Create histogram for data02\nfig.histogram(\n data=data02,\n series=binwidth,\n fill=\"orange\",\n pen=\"1p,darkgray,solid\",\n histtype=0,\n barwidth=f\"{binwidth/2}+o{binwidth/4}\",\n label=\"data02\",\n)\n\n# Add legend\nfig.legend()\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/0511f0ea20672dfb94a45be5bdc7a003/linestrings.ipynb b/v0.14.0/_downloads/0511f0ea20672dfb94a45be5bdc7a003/linestrings.ipynb new file mode 100644 index 00000000000..7afea683ec7 --- /dev/null +++ b/v0.14.0/_downloads/0511f0ea20672dfb94a45be5bdc7a003/linestrings.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# GeoPandas: Plotting lines with LineString or MultiLineString geometry\n\nThe :meth:`pygmt.Figure.plot` method allows us to plot geographical data such as lines\nwith LineString or MultiLineString geometry types stored in a\n:class:`geopandas.GeoDataFrame` object or any object that implements the\n[__geo_interface__](https://gist.github.com/sgillies/2217756)_ property.\n\nUse :func:`geopandas.read_file` to load data from any supported OGR format such as a\nshapefile (.shp), GeoJSON (.geojson), geopackage (.gpkg), etc. Then, pass the\n:class:`geopandas.GeoDataFrame` object as an argument to the ``data`` parameter of\n:meth:`pygmt.Figure.plot`, and style the lines using the ``pen`` parameter.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import geodatasets\nimport geopandas as gpd\nimport pygmt\n\n# Read a sample dataset provided by the geodatasets package.\n# The dataset contains large rivers in Europe, stored as LineString/MultiLineString\n# geometry types.\ngdf = gpd.read_file(geodatasets.get_path(\"eea large_rivers\"))\n\n# Convert object to EPSG 4326 coordinate system\ngdf = gdf.to_crs(\"EPSG:4326\")\nprint(gdf.head())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\nfig.coast(\n projection=\"M10c\",\n region=[-10, 30, 35, 57],\n resolution=\"l\",\n land=\"gray95\",\n shorelines=\"1/0.1p,gray50\",\n borders=\"1/0.1,gray30\",\n frame=True,\n)\n\n# Add rivers to map\nfig.plot(data=gdf, pen=\"1p,steelblue\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/05bae944eee53cf43d015fb73d926138/basic_symbols.py b/v0.14.0/_downloads/05bae944eee53cf43d015fb73d926138/basic_symbols.py new file mode 100644 index 00000000000..cad9d6aed4f --- /dev/null +++ b/v0.14.0/_downloads/05bae944eee53cf43d015fb73d926138/basic_symbols.py @@ -0,0 +1,109 @@ +""" +Basic geometric symbols +======================= + +The :meth:`pygmt.Figure.plot` method can plot individual geometric symbols +by passing the corresponding shortcuts to the ``style`` parameter. The 14 basic +geometric symbols are shown underneath their corresponding shortcut codes. +Four symbols (**-**, **+**, **x** and **y**) are line-symbols only for which we +can adjust the linewidth via the ``pen`` parameter. The point symbol (**p**) +only takes a color fill which we can define via the ``fill`` parameter. For +the remaining symbols we may define a linewidth as well as a color fill. + +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.basemap(region=[0, 8, 0, 3], projection="X12c/4c", frame=True) + +# define fontstlye for annotations +font = "15p,Helvetica-Bold" + +# upper row +y = 2 + +# use a dash in x direction (-) with a size of 0.9 cm, +# linewidth is set to 2p and the linecolor to "gray40" +fig.plot(x=1, y=y, style="-0.9c", pen="2p,gray40") +fig.text(x=1, y=y + 0.6, text="-", font=font) + +# use a plus (+) with a size of 0.9 cm, +# linewidth is set to 2p and the linecolor to "gray40" +fig.plot(x=2, y=y, style="+0.9c", pen="2p,gray40") +fig.text(x=2, y=y + 0.6, text="+", font=font) + +# use a star (a) with a size of 0.9 cm, +# linewidth is set to 1p, the linecolor to "black" (default) and the +# color fill to "darkorange" +fig.plot(x=3, y=y, style="a0.9c", pen="1p,black", fill="darkorange") +fig.text(x=3, y=y + 0.6, text="a", font=font) + +# use a circle (c) with a size of 0.9 cm, +# linewidth is set to 1p, the linecolor to "black" and the +# color fill to "darkred" +fig.plot(x=4, y=y, style="c0.9c", pen="1p,black", fill="darkred") +fig.text(x=4, y=y + 0.6, text="c", font=font) + +# use a diamond (d) with a size of 0.9 cm, +# linewidth is set to 1p, the linecolor to "black" and the +# color fill to "seagreen" +fig.plot(x=5, y=y, style="d0.9c", pen="1p,black", fill="seagreen") +fig.text(x=5, y=y + 0.6, text="d", font=font) + +# use a octagon (g) with a size of 0.9 cm, +# linewidth is set to 1p, the linecolor to "black" and the +# color fill to "dodgerblue4" +fig.plot(x=6, y=y, style="g0.9c", pen="1p,black", fill="dodgerblue4") +fig.text(x=6, y=y + 0.6, text="g", font=font) + +# use a hexagon (h) with a size of 0.9 cm, +# linewidth is set to 1p, the linecolor to "black" and the +# color fill to "lightgray" +fig.plot(x=7, y=y, style="h0.9c", pen="1p,black", fill="lightgray") +fig.text(x=7, y=y + 0.6, text="h", font=font) + +# lower row +y = 0.5 + +# use an inverted triangle (i) with a size of 0.9 cm, +# linewidth is set to 1p, the linecolor to "black" and the +# color fill to "tomato" +fig.plot(x=1, y=y, style="i0.9c", pen="1p,black", fill="tomato") +fig.text(x=1, y=y + 0.6, text="i", font=font) + +# use pentagon (n) with a size of 0.9 cm, +# linewidth is set to 1p, the linecolor to "black" and the +# color fill to "lightseagreen" +fig.plot(x=2, y=y, style="n0.9c", pen="1p,black", fill="lightseagreen") +fig.text(x=2, y=y + 0.6, text="n", font=font) + +# use a point (p) with a size of 0.9 cm, +# color fill is set to "lightseagreen" +fig.plot(x=3, y=y, style="p0.9c", fill="slateblue") +fig.text(x=3, y=y + 0.6, text="p", font=font) + +# use square (s) with a size of 0.9 cm, +# linewidth is set to 1p, the linecolor to "black" and the +# color fill to "gold2" +fig.plot(x=4, y=y, style="s0.9c", pen="1p,black", fill="gold2") +fig.text(x=4, y=y + 0.6, text="s", font=font) + +# use triangle (t) with a size of 0.9 cm, +# linewidth is set to 1p, the linecolor to "black" and the +# color fill to "magenta4" +fig.plot(x=5, y=y, style="t0.9c", pen="1p,black", fill="magenta4") +fig.text(x=5, y=y + 0.6, text="t", font=font) + +# use cross (x) with a size of 0.9 cm, +# linewidth is set to 2p and the linecolor to "gray40" +fig.plot(x=6, y=y, style="x0.9c", pen="2p,gray40") +fig.text(x=6, y=y + 0.6, text="x", font=font) + +# use a dash in y direction (y) with a size of 0.9 cm, +# linewidth is set to 2p and the linecolor to "gray40" +fig.plot(x=7, y=y, style="y0.9c", pen="2p,gray40") +fig.text(x=7, y=y + 0.6, text="y", font=font) + +fig.show() diff --git a/v0.14.0/_downloads/06138b8ef0f348c8ea4ec7ea6cd766b0/azim_general_perspective.ipynb b/v0.14.0/_downloads/06138b8ef0f348c8ea4ec7ea6cd766b0/azim_general_perspective.ipynb new file mode 100644 index 00000000000..7566816c910 --- /dev/null +++ b/v0.14.0/_downloads/06138b8ef0f348c8ea4ec7ea6cd766b0/azim_general_perspective.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Perspective projection\n\nThe perspective projection imitates the view of the Earth from a finite\npoint in space. In a full view of the earth one third of its surface area can\nbe seen.\n\n**g**\\ *lon0/lat0*\\ */scale*\\ [**+a**\\ *azimuth*]\\\n[**+t**\\ *tilt*]\\ [**+v**\\ *vwidth/vheight*]\\ [**+w**\\ *twist*]\\\n[**+z**\\ *altitude*] or **G**\\ *lon0/lat0*\\ */width*\\\n[**+a**\\ *azimuth*]\\ [**+t**\\ *tilt*]\\ [**+v**\\ *vwidth/vheight*]\\\n[**+w**\\ *twist*]\\ [**+z**\\ *altitude*]\n\nThe projection type is set with **g** or **G**. *lon0/lat0* specifies the\nprojection center and *scale* or *width* determine the size of the figure.\nWith **+a**\\ *azimuth* the direction (in degrees) in which you are looking is\nspecified, measured clockwise from north. **+t**\\ *tilt* is given in degrees\nand is the viewing angle relative to zenith. A tilt of 0\u00b0 is looking straight\ndown, 60\u00b0 is looking 30\u00b0 above horizon. The viewport angle in degrees is\ndescribed via **+v**\\ *vwidth/vheight* and **+w**\\ *twist* is the clockwise\nrotation of the image (in degrees). **+z**\\ *altitude* sets the height in km\nof the viewpoint above local sea level (If altitude is less than 10, then it is\nthe distance from the center of the earth to the viewpoint in earth radii).\n\nThe example shows the coast of Northern Europe viewed from 250 km above sea\nlevel looking 30\u00b0 from north at a tilt of 45\u00b0. The height and width of the\nviewing angle is both 60\u00b0, which imitates viewing with naked eye.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n region=\"g\",\n projection=\"G4/52/12c+a30+t45+v60/60+w0+z250\",\n frame=\"afg\",\n land=\"khaki\",\n water=\"white\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/07c438f7ea67f18fb2ae785888e59cda/cartesian_logarithmic.ipynb b/v0.14.0/_downloads/07c438f7ea67f18fb2ae785888e59cda/cartesian_logarithmic.ipynb new file mode 100644 index 00000000000..be9e684011a --- /dev/null +++ b/v0.14.0/_downloads/07c438f7ea67f18fb2ae785888e59cda/cartesian_logarithmic.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Cartesian logarithmic\n\n**X**\\ *width*\\ [**l**][/*height*\\ [**l**]] or\n**x**\\ *x-scale*\\ [**l**][/*y-scale*\\ [**l**]]\n\nGive the *width* of the figure and the optional *height*.\nThe lower-case version **x** is similar to **X** but expects\nan *x-scale* and an optional *y-scale*.\nEach axis with a logarithmic transformation requires **l** after\nits size argument.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Create a list of x-values 0-100\nxline = np.arange(0, 101)\n# Create a list of y-values that are the square root of the x-values\nyline = xline**0.5\n# Create a list of x-values for every 10 in 0-100\nxpoints = np.arange(0, 101, 10)\n# Create a list of y-values that are the square root of the x-values\nypoints = xpoints**0.5\n\nfig = pygmt.Figure()\nfig.basemap(\n region=[1, 100, 0, 10],\n # Set a logarithmic transformation on the x-axis\n projection=\"X15cl/10c\",\n # Set the figures frame and color as well as\n # annotations, ticks, and gridlines\n frame=[\"WSne+gbisque\", \"xa2g3\", \"ya2f1g2\"],\n)\n\n# Set the line thickness to \"2p\", the color to \"black\", and the style to \"dashed\"\nfig.plot(x=xline, y=yline, pen=\"2p,black,dashed\")\n\n# Plot the square root values on top of the line\n# Use squares with a size of 0.3 centimeters, an \"orange\" fill and a \"black\" outline\n# Symbols are not clipped if they go off the figure\nfig.plot(x=xpoints, y=ypoints, style=\"s0.3c\", fill=\"orange\", pen=\"black\", no_clip=True)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/08008eba784e3ce1d85b5189ba754e6e/grid_equalization.ipynb b/v0.14.0/_downloads/08008eba784e3ce1d85b5189ba754e6e/grid_equalization.ipynb new file mode 100644 index 00000000000..4b7dc836205 --- /dev/null +++ b/v0.14.0/_downloads/08008eba784e3ce1d85b5189ba754e6e/grid_equalization.ipynb @@ -0,0 +1,223 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Performing grid histogram equalization\n\nThe :meth:`pygmt.grdhisteq.equalize_grid` method creates a grid using\nstatistics based on a cumulative distribution function.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Load sample data\n\nLoad the sample Earth relief data for a region around Yosemite Valley\nand use :func:`pygmt.grd2xyz` to create a :class:`pandas.Series` with the\nz-values.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "grid = pygmt.datasets.load_earth_relief(\n resolution=\"03s\", region=[-119.825, -119.4, 37.6, 37.825]\n)\ngrid_dist = pygmt.grd2xyz(grid=grid, output_type=\"pandas\")[\"z\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plot the original digital elevation model and data distribution\n\nFor comparison, we will create a map of the original digital elevation\nmodel and a histogram showing the distribution of elevation data values.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Create an instance of the Figure class\nfig = pygmt.Figure()\n# Define figure configuration\npygmt.config(FORMAT_GEO_MAP=\"ddd.x\", MAP_FRAME_TYPE=\"plain\")\n# Define the colormap for the figure\npygmt.makecpt(series=[500, 3540], cmap=\"turku\")\n# Setup subplots with two panels\nwith fig.subplot(\n nrows=1, ncols=2, figsize=(\"13.5c\", \"4c\"), title=\"Digital Elevation Model\"\n):\n # Plot the original digital elevation model in the first panel\n with fig.set_panel(panel=0):\n fig.grdimage(grid=grid, projection=\"M?\", frame=\"WSne\", cmap=True)\n # Plot a histogram showing the z-value distribution in the original digital\n # elevation model\n with fig.set_panel(panel=1):\n fig.histogram(\n data=grid_dist,\n projection=\"X?\",\n region=[500, 3600, 0, 20],\n series=[500, 3600, 100],\n frame=[\"wnSE\", \"xaf+lElevation (m)\", \"yaf+lPercent frequency\"],\n cmap=True,\n histtype=1,\n pen=\"1p,black\",\n )\n fig.colorbar(position=\"JMR+o1.5c/0c+w3c/0.3c\", frame=True)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Equalize grid based on a linear distribution\n\nThe :meth:`pygmt.grdhisteq.equalize_grid` method creates a new grid with the\nz-values representing the position of the original z-values in a given\ncumulative distribution. By default, it computes the position in a linear\ndistribution. Here, we equalize the grid into nine divisions based on a\nlinear distribution and produce a :class:`pandas.Series` with the z-values\nfor the new grid.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "divisions = 9\nlinear = pygmt.grdhisteq.equalize_grid(grid=grid, divisions=divisions)\nlinear_dist = pygmt.grd2xyz(grid=linear, output_type=\"pandas\")[\"z\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Calculate the bins used for data transformation\n\nThe :meth:`pygmt.grdhisteq.compute_bins` method reports statistics about the\ngrid equalization. Here, we report the bins that would linearly divide the\noriginal data into 9 divisions with equal area. In our new grid produced by\n:meth:`pygmt.grdhisteq.equalize_grid`, all the grid cells with values between\n``start`` and ``stop`` of ``bin_id=0`` are assigned the value 0, all grid\ncells with values between ``start`` and ``stop`` of ``bin_id=1`` are assigned\nthe value 1, and so on.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "pygmt.grdhisteq.compute_bins(grid=grid, divisions=divisions)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plot the equally distributed data\n\nHere we create a map showing the grid that has been transformed to\nhave a linear distribution with nine divisions and a histogram of the data\nvalues.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Create an instance of the Figure class\nfig = pygmt.Figure()\n# Define figure configuration\npygmt.config(FORMAT_GEO_MAP=\"ddd.x\", MAP_FRAME_TYPE=\"plain\")\n# Define the colormap for the figure\npygmt.makecpt(series=[0, divisions, 1], cmap=\"lajolla\")\n# Setup subplots with two panels\nwith fig.subplot(\n nrows=1, ncols=2, figsize=(\"13.5c\", \"4c\"), title=\"Linear distribution\"\n):\n # Plot the grid with a linear distribution in the first panel\n with fig.set_panel(panel=0):\n fig.grdimage(grid=linear, projection=\"M?\", frame=\"WSne\", cmap=True)\n # Plot a histogram showing the linear z-value distribution\n with fig.set_panel(panel=1):\n fig.histogram(\n data=linear_dist,\n projection=\"X?\",\n region=[-1, divisions, 0, 40],\n series=[0, divisions, 1],\n frame=[\"wnSE\", \"xaf+lRelative elevation\", \"yaf+lPercent frequency\"],\n cmap=True,\n histtype=1,\n pen=\"1p,black\",\n center=True,\n )\n fig.colorbar(position=\"JMR+o1.5c/0c+w3c/0.3c\", frame=True)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Transform grid based on a normal distribution\n\nThe ``gaussian`` parameter of :meth:`pygmt.grdhisteq.equalize_grid` can be\nused to transform the z-values relative to their position in a normal\ndistribution rather than a linear distribution. In this case, the output\ndata are continuous rather than discrete.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "normal = pygmt.grdhisteq.equalize_grid(grid=grid, gaussian=True)\nnormal_dist = pygmt.grd2xyz(grid=normal, output_type=\"pandas\")[\"z\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plot the normally distributed data\n\nHere we create a map showing the grid that has been transformed to have\na normal distribution and a histogram of the data values.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Create an instance of the Figure class\nfig = pygmt.Figure()\n# Define figure configuration\npygmt.config(FORMAT_GEO_MAP=\"ddd.x\", MAP_FRAME_TYPE=\"plain\")\n# Define the colormap for the figure\npygmt.makecpt(series=[-4.5, 4.5], cmap=\"vik\")\n# Setup subplots with two panels\nwith fig.subplot(\n nrows=1, ncols=2, figsize=(\"13.5c\", \"4c\"), title=\"Normal distribution\"\n):\n # Plot the grid with a normal distribution in the first panel\n with fig.set_panel(panel=0):\n fig.grdimage(grid=normal, projection=\"M?\", frame=\"WSne\", cmap=True)\n # Plot a histogram showing the normal z-value distribution\n with fig.set_panel(panel=1):\n fig.histogram(\n data=normal_dist,\n projection=\"X?\",\n region=[-4.5, 4.5, 0, 20],\n series=[-4.5, 4.5, 0.2],\n frame=[\"wnSE\", \"xaf+lRelative elevation\", \"yaf+lPercent frequency\"],\n cmap=True,\n histtype=1,\n pen=\"1p,black\",\n )\n fig.colorbar(position=\"JMR+o1.5c/0c+w3c/0.3c\", frame=True)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Equalize grid based on a quadratic distribution\n\nThe ``quadratic`` parameter of :meth:`pygmt.grdhisteq.equalize_grid` can be\nused to transform the z-values relative to their position in a quadratic\ndistribution rather than a linear distribution. Here, we equalize the grid\ninto nine divisions based on a quadratic distribution and produce a\n:class:`pandas.Series` with the z-values for the new grid.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "quadratic = pygmt.grdhisteq.equalize_grid(\n grid=grid, quadratic=True, divisions=divisions\n)\nquadratic_dist = pygmt.grd2xyz(grid=quadratic, output_type=\"pandas\")[\"z\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Calculate the bins used for data transformation\n\nWe can also use the ``quadratic`` parameter of\n:meth:`pygmt.grdhisteq.compute_bins` to report the bins used for dividing\nthe grid into 9 divisions based on their position in a quadratic\ndistribution.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "pygmt.grdhisteq.compute_bins(grid=grid, divisions=divisions, quadratic=True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plot the quadratic distribution of data\n\nHere we create a map showing the grid that has been transformed to have\na quadratic distribution and a histogram of the data values.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Create an instance of the Figure class\nfig = pygmt.Figure()\n# Define figure configuration\npygmt.config(FORMAT_GEO_MAP=\"ddd.x\", MAP_FRAME_TYPE=\"plain\")\n# Define the colormap for the figure\npygmt.makecpt(series=[0, divisions, 1], cmap=\"lajolla\")\n# Setup subplots with two panels\nwith fig.subplot(\n nrows=1, ncols=2, figsize=(\"13.5c\", \"4c\"), title=\"Quadratic distribution\"\n):\n # Plot the grid with a quadratic distribution in the first panel\n with fig.set_panel(panel=0):\n fig.grdimage(grid=quadratic, projection=\"M?\", frame=\"WSne\", cmap=True)\n # Plot a histogram showing the quadratic z-value distribution\n with fig.set_panel(panel=1):\n fig.histogram(\n data=quadratic_dist,\n projection=\"X?\",\n region=[-1, divisions, 0, 40],\n series=[0, divisions, 1],\n frame=[\"wnSE\", \"xaf+lRelative elevation\", \"yaf+lPercent frequency\"],\n cmap=True,\n histtype=1,\n pen=\"1p,black\",\n center=True,\n )\n fig.colorbar(position=\"JMR+o1.5c/0c+w3c/0.3c\", frame=True)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/085961bd699c1be208482084335ab703/envelope.ipynb b/v0.14.0/_downloads/085961bd699c1be208482084335ab703/envelope.ipynb new file mode 100644 index 00000000000..25ed9c16637 --- /dev/null +++ b/v0.14.0/_downloads/085961bd699c1be208482084335ab703/envelope.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Envelope\n\nThe ``close`` parameter of the :meth:`pygmt.Figure.plot` method can be used to build a\nsymmetrical or an asymmetrical envelope. The user can give either the deviations or the\nbounds in y-direction. For the first case append ``\"+d\"`` or ``\"+D\"`` and for the latter\ncase ``\"+b\"``.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pandas as pd\nimport pygmt\n\n# Define a pandas.DataFrame with columns for x and y as well as the lower and upper\n# deviations\ndf_devi = pd.DataFrame(\n data={\n \"x\": [1, 3, 5, 7, 9],\n \"y\": [0.5, -0.7, 0.8, -0.3, 0.1],\n \"y_deviation_low\": [0.2, 0.2, 0.3, 0.4, 0.2],\n \"y_deviation_upp\": [0.1, 0.3, 0.2, 0.4, 0.1],\n }\n)\n\n# Define the same pandas.DataFrame but with lower and upper bounds\ndf_bound = pd.DataFrame(\n data={\n \"x\": [1, 3, 5, 7, 9],\n \"y\": [0.5, -0.7, 0.8, -0.3, 0.1],\n \"y_bound_low\": [0.3, -0.9, 0.5, -0.7, -0.1],\n \"y_bound_upp\": [0.6, -0.4, 1.1, 0.1, 0.2],\n }\n)\n\n\nfig = pygmt.Figure()\n\n# -----------------------------------------------------------------------------\n# Left\nfig.basemap(\n region=[0, 10, -1.5, 1.5],\n projection=\"X10c\",\n frame=[\"WSne+tsymmetric deviations +d\", \"xa2f1\", \"ya1f0.1\"],\n)\n\n# Plot a symmetrical envelope based on the deviations (\"+d\")\nfig.plot(\n data=df_devi,\n close=\"+d\",\n # Fill the envelope in gray color with a transparency of 50 %\n fill=\"gray@50\",\n pen=\"1p,gray30\",\n)\n\n# Plot the data points on top\nfig.plot(data=df_devi, style=\"c0.2c\", pen=\"1p,gray30\", fill=\"darkgray\")\n\n# Shift plot origin by the figure width (\"w\") plus 1 centimeter in x direction\nfig.shift_origin(xshift=\"w+1c\")\n\n# -----------------------------------------------------------------------------\n# Middle\nfig.basemap(\n region=[0, 10, -1.5, 1.5],\n projection=\"X10c\",\n frame=[\"WSne+tasymmetric deviations +D\", \"xa2f1\", \"yf0.1\"],\n)\n\n# Plot an asymmetrical envelope based on the deviations (\"+D\")\nfig.plot(\n data=df_devi,\n fill=\"gray@50\",\n # Add an outline around the envelope. Here, a dashed pen (\"+p\") with 0.5-points\n # thickness and \"gray30\" color is used\n close=\"+D+p0.5p,gray30,dashed\",\n pen=\"1p,gray30\",\n)\n\nfig.plot(data=df_devi, style=\"c0.2c\", pen=\"1p,gray30\", fill=\"darkgray\")\n\nfig.shift_origin(xshift=\"w+1c\")\n\n# -----------------------------------------------------------------------------\n# Right\nfig.basemap(\n region=[0, 10, -1.5, 1.5],\n projection=\"X10c\",\n # Use \"\\\\053\" to handle \"+b\" as a string not as a modifier\n frame=[\"wSnE+tbounds \\\\053b\", \"xa2f1\", \"ya1f0.1\"],\n)\n\n# Plot an envelope based on the bounds (\"+b\")\nfig.plot(data=df_bound, close=\"+b+p0.5p,gray30,dashed\", pen=\"1p,gray30\")\n\nfig.plot(data=df_bound, style=\"c0.2c\", pen=\"1p,gray30\", fill=\"darkgray\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/099123cf2369bc56b70d474b4f25331c/configuration.py b/v0.14.0/_downloads/099123cf2369bc56b70d474b4f25331c/configuration.py new file mode 100644 index 00000000000..f7d6b70c057 --- /dev/null +++ b/v0.14.0/_downloads/099123cf2369bc56b70d474b4f25331c/configuration.py @@ -0,0 +1,81 @@ +""" +Configuring PyGMT defaults +========================== + +Default GMT parameters can be set globally or locally using :class:`pygmt.config`. +""" + +# %% +import pygmt + +# %% +# Configuring default GMT parameters +# ---------------------------------- +# +# Users can override default parameters either temporarily (locally) or permanently +# (globally) using :class:`pygmt.config`. The full list of default parameters that can +# be changed can be found at :gmt-docs:`gmt.conf.html`. +# +# We demonstrate the usage of :class:`pygmt.config` by configuring a map plot. + +# Start with a basic figure with the default style +fig = pygmt.Figure() +fig.basemap(region=[115, 119.5, 4, 7.5], projection="M10c", frame=True) +fig.coast(land="black", water="skyblue") + +fig.show() + + +# %% +# Globally overriding defaults +# ---------------------------- +# +# The ``MAP_FRAME_TYPE`` parameter specifies the style of map frame to use, of which +# there are 5 options: ``fancy`` (default, see above), ``fancy+``, ``plain``, ``graph`` +# (which does not apply to geographical maps) and ``inside``. +# +# The ``FORMAT_GEO_MAP`` parameter controls the format of geographical tick annotations. +# The default uses degrees and minutes. Here we specify the ticks to be a decimal number +# of degrees. + +fig = pygmt.Figure() + +# Configuration for the 'current figure' +pygmt.config(MAP_FRAME_TYPE="plain") +pygmt.config(FORMAT_GEO_MAP="ddd.xx") + +fig.basemap(region=[115, 119.5, 4, 7.5], projection="M10c", frame=True) +fig.coast(land="black", water="skyblue") + +fig.show() + + +# %% +# Locally overriding defaults +# --------------------------- +# +# It is also possible to temporarily override the default parameters, which is very +# useful for limiting the scope of changes to a particular plot. :class:`pygmt.config` +# is implemented as a context manager, which handles the setup and teardown of a GMT +# session. Python users are likely familiar with the ``with open(...) as file:`` +# snippet, which returns a ``file`` context manager. In this way, it can be used to +# override a parameter for a single command, or a sequence of commands. An application +# of :class:`pygmt.config` as a context manager is shown below: + +fig = pygmt.Figure() + +# This will have a fancy+ frame +with pygmt.config(MAP_FRAME_TYPE="fancy+"): + fig.basemap(region=[115, 119.5, 4, 7.5], projection="M10c", frame=True) +fig.coast(land="black", water="skyblue") + +# Shift plot origin down by the height of the figure to plot another map +fig.shift_origin(yshift="-h") + +# This figure retains the default "fancy" frame +fig.basemap(region=[115, 119.5, 4, 7.5], projection="M10c", frame=True) +fig.coast(land="black", water="skyblue") + +fig.show() + +# sphinx_gallery_thumbnail_number = 3 diff --git a/v0.14.0/_downloads/0b32f299fede27f35e74e6f1a4e8525e/tilemaps.py b/v0.14.0/_downloads/0b32f299fede27f35e74e6f1a4e8525e/tilemaps.py new file mode 100644 index 00000000000..1bd83069026 --- /dev/null +++ b/v0.14.0/_downloads/0b32f299fede27f35e74e6f1a4e8525e/tilemaps.py @@ -0,0 +1,45 @@ +""" +Tile maps +========= + +The :meth:`pygmt.Figure.tilemap` method allows to plot +tiles from a tile server or local file as a basemap or overlay. +""" + +# %% +import contextily +import pygmt + +fig = pygmt.Figure() +fig.tilemap( + region=[-157.84, -157.8, 21.255, 21.285], + projection="M12c", + # Set level of details (0-22) + # Higher levels mean a zoom level closer to the Earth's + # surface with more tiles covering a smaller + # geographic area and thus more details and vice versa + # Please note, not all zoom levels are always available + zoom=14, + # Use tiles from OpenStreetMap tile server + source="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", + frame="afg", +) + +fig.show() + +# %% +# It's also possible to use tiles provided via the +# `contextily `__ +# library. See :doc:`Contextily providers ` +# for a list of possible tilemap options. + +fig = pygmt.Figure() +fig.tilemap( + region=[-157.84, -157.8, 21.255, 21.285], + projection="M12c", + # Use the CartoDB Positron option from contextily + source=contextily.providers.CartoDB.Positron, + frame="afg", +) + +fig.show() diff --git a/v0.14.0/_downloads/0b492f96720a3a456f75202059c91acb/decorated_lines.zip b/v0.14.0/_downloads/0b492f96720a3a456f75202059c91acb/decorated_lines.zip new file mode 100644 index 00000000000..9ded76f8990 Binary files /dev/null and b/v0.14.0/_downloads/0b492f96720a3a456f75202059c91acb/decorated_lines.zip differ diff --git a/v0.14.0/_downloads/0c945e86732f528ab720eb6eb270ec15/vector_heads_tails.ipynb b/v0.14.0/_downloads/0c945e86732f528ab720eb6eb270ec15/vector_heads_tails.ipynb new file mode 100644 index 00000000000..f3e463ce980 --- /dev/null +++ b/v0.14.0/_downloads/0c945e86732f528ab720eb6eb270ec15/vector_heads_tails.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Vector heads and tails\n\nMany methods in PyGMT allow plotting vectors with individual\nheads and tails. For this purpose, several modifiers may be appended to\nthe corresponding vector-producing parameters for specifying the placement\nof vector heads and tails, their shapes, and the justification of the vector.\n\nTo place a vector head at the beginning of the vector path\nsimply append **+b** to the vector-producing option (use **+e** to place\none at the end). Optionally, append **t** for a terminal line, **c** for a\ncircle, **a** for arrow (default), **i** for tail, **A** for plain open\narrow, and **I** for plain open tail. Further append **l** or **r** (e.g.\n``\"+bar\"``) to only draw the left or right half-sides of the selected head/tail\n(default is both sides) or use **+l** or **+r** to apply simultaneously to both\nbeginning and end. In this context left and right refer to the side of the\nvector line when viewed from the beginning point to the end point of a line\nsegment. The angle of the vector head apex can be set using **+a**\\ *angle*\n(default is 30). The shape of the vector head can be adjusted using\n**+h**\\ *shape* (e.g. ``\"+h0.5\"``).\n\nFor further modifiers see :gmt-docs:`plot.html#vector-attributes`.\n\nIn the following we use the :meth:`pygmt.Figure.plot` method to plot vectors\nwith individual heads and tails. We must specify the modifiers (together with\nthe vector type, here ``\"v\"`` for Cartesian vector, see also the\n:doc:`Vector types example `)\nby passing the corresponding shortcuts to the ``style`` parameter.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.basemap(\n region=[0, 10, 0, 15], projection=\"X15c/10c\", frame=\"+tVector heads and tails\"\n)\n\nx = 1\ny = 14\nangle = 0 # in degrees, measured counter-clockwise from horizontal\nlength = 7\n\nfor vecstyle in [\n # vector without head and tail (line)\n \"v0c\",\n # plain open arrow at beginning and end, angle of the vector head apex is\n # set to 50\n \"v0.6c+bA+eA+a50\",\n # plain open tail at beginning and end\n \"v0.4c+bI+eI\",\n # terminal line at beginning and end, angle of vector head apex is set\n # to 80\n \"v0.3c+bt+et+a80\",\n # arrow head at end\n \"v0.6c+e\",\n # circle at beginning and arrow head at end\n \"v0.6c+bc+ea\",\n # terminal line at beginning and arrow head at end\n \"v0.6c+bt+ea\",\n # arrow head at end, shape of vector head is set to 0.5\n \"v1c+e+h0.5\",\n # modified arrow heads at beginning and end\n \"v1c+b+e+h0.5\",\n # tail at beginning and arrow with modified vector head at end\n \"v1c+bi+ea+h0.5\",\n # half-sided arrow head (right side) at beginning and arrow at the end\n \"v1c+bar+ea+h0.8\",\n # half-sided arrow heads at beginning (right side) and end (left side)\n \"v1c+bar+eal+h0.5\",\n # half-sided tail at beginning and arrow at end (right side for both)\n \"v1c+bi+ea+r+h0.5+a45\",\n]:\n fig.plot(\n x=x, y=y, style=vecstyle, direction=([angle], [length]), pen=\"2p\", fill=\"red3\"\n )\n fig.text(\n x=6, y=y, text=vecstyle, font=\"Courier-Bold\", justify=\"ML\", offset=\"0.2c/0c\"\n )\n y -= 1 # move the next vector down\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/0d05823d390e6f328957beffde560316/misc_mollweide.ipynb b/v0.14.0/_downloads/0d05823d390e6f328957beffde560316/misc_mollweide.ipynb new file mode 100644 index 00000000000..45c0f991600 --- /dev/null +++ b/v0.14.0/_downloads/0d05823d390e6f328957beffde560316/misc_mollweide.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Mollweide projection\n\nThis pseudo-cylindrical, equal-area projection was developed by the German\nmathematician and astronomer Karl Brandan Mollweide in 1805. Parallels are\nunequally spaced straight lines with the meridians being equally spaced\nelliptical arcs. The scale is only true along latitudes 40\u00b044' north and south.\nThe projection is used mainly for global maps showing data distributions. It is\noccasionally referenced under the name homalographic projection.\n\n**w**\\ [*lon0/*]\\ *scale* or **W**\\ [*lon0/*]\\ *width*\n\nThe projection is set with **w** or **W**. The central meridian is set with the\noptional *lon0*, and the figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Use region \"d\" to specify global region (-180/180/-90/90)\nfig.coast(region=\"d\", projection=\"W12c\", frame=\"afg\", land=\"ivory\", water=\"bisque4\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/0d497d25181cac38ebb80f042bf33ee9/insets.zip b/v0.14.0/_downloads/0d497d25181cac38ebb80f042bf33ee9/insets.zip new file mode 100644 index 00000000000..8a9e09036c7 Binary files /dev/null and b/v0.14.0/_downloads/0d497d25181cac38ebb80f042bf33ee9/insets.zip differ diff --git a/v0.14.0/_downloads/0f92b102d0472c0a184b3e2f3808cb44/plot.ipynb b/v0.14.0/_downloads/0f92b102d0472c0a184b3e2f3808cb44/plot.ipynb new file mode 100644 index 00000000000..a82e33b7020 --- /dev/null +++ b/v0.14.0/_downloads/0f92b102d0472c0a184b3e2f3808cb44/plot.ipynb @@ -0,0 +1,115 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Plotting data points\n\nGMT shines when it comes to plotting data on a map. We can use some sample data\nthat is packaged with GMT to try this out. PyGMT provides access to these\ndatasets through the :mod:`pygmt.datasets` package. If you don't have the data\nfiles already, they are automatically downloaded and saved to a cache directory\nthe first time you use them (usually ``~/.gmt/cache``).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For example, let's load the sample dataset of tsunami generating earthquakes\naround Japan using :func:`pygmt.datasets.load_sample_data`.\nThe data are loaded as a :class:`pandas.DataFrame`.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "data = pygmt.datasets.load_sample_data(name=\"japan_quakes\")\n\n# Set the region for the plot to be slightly larger than the data bounds.\nregion = [\n data.longitude.min() - 1,\n data.longitude.max() + 1,\n data.latitude.min() - 1,\n data.latitude.max() + 1,\n]\n\nprint(region)\nprint(data.head())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We'll use the :meth:`pygmt.Figure.plot` method to plot circles on the\nearthquake epicenters.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=region, projection=\"M15c\", frame=True)\nfig.coast(land=\"black\", water=\"skyblue\")\nfig.plot(x=data.longitude, y=data.latitude, style=\"c0.3c\", fill=\"white\", pen=\"black\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We used the style ``c0.3c`` which means \"circles with a diameter of 0.3\ncentimeters\". The ``pen`` parameter controls the outline of the symbols and\nthe ``fill`` parameter controls the fill.\n\nWe can map the size of the circles to the earthquake magnitude by passing an\narray to the ``size`` parameter. Because the magnitude is on a logarithmic\nscale, it helps to show the differences by scaling the values using a power\nlaw.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=region, projection=\"M15c\", frame=True)\nfig.coast(land=\"black\", water=\"skyblue\")\nfig.plot(\n x=data.longitude,\n y=data.latitude,\n size=0.02 * (2**data.magnitude),\n style=\"cc\",\n fill=\"white\",\n pen=\"black\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Notice that we didn't include the size in the ``style`` parameter this time,\njust the symbol ``c`` (circles) and the unit ``c`` (centimeters). So in\nthis case, the size will be interpreted as being in centimeters.\n\nWe can also map the colors of the markers to the depths by passing an array\nto the ``fill`` parameter and providing a colormap name (``cmap``). We can\neven use the new matplotlib colormap \"viridis\". Here, we first create a\ncontinuous colormap ranging from the minimum depth to the maximum depth of\nthe earthquakes using :func:`pygmt.makecpt`, then set ``cmap=True`` in\n:meth:`pygmt.Figure.plot` to use the colormap. At the end of the plot, we\nalso plot a colorbar showing the colormap used in the plot.\n\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=region, projection=\"M15c\", frame=True)\nfig.coast(land=\"black\", water=\"skyblue\")\npygmt.makecpt(cmap=\"viridis\", series=[data.depth_km.min(), data.depth_km.max()])\nfig.plot(\n x=data.longitude,\n y=data.latitude,\n size=0.02 * 2**data.magnitude,\n fill=data.depth_km,\n cmap=True,\n style=\"cc\",\n pen=\"black\",\n)\nfig.colorbar(frame=\"xaf+lDepth (km)\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/0fdb67296f7572b78e9fadade9632c97/draping_on_3d_surface.py b/v0.14.0/_downloads/0fdb67296f7572b78e9fadade9632c97/draping_on_3d_surface.py new file mode 100644 index 00000000000..eaa85cd367e --- /dev/null +++ b/v0.14.0/_downloads/0fdb67296f7572b78e9fadade9632c97/draping_on_3d_surface.py @@ -0,0 +1,137 @@ +""" +Draping a dataset on top of a topographic surface +================================================== + +It can be visually appealing to "drape" a dataset over a topographic surface. This can +be accomplished using the ``drapegrid`` parameter of :meth:`pygmt.Figure.grdview`. + +This tutorial consists of two examples: + +1. Draping a grid + +2. Draping an image +""" + +# %% + +# Load the required packages +import pygmt +import rasterio +import xarray as xr + +# %% +# 1. Drapping a grid +# ------------------ +# +# In the first example, the seafloor crustal age is plotted with color-coding on top of +# the topographic map of an area of the Mid-Atlantic Ridge. + +# Define the study area in degrees East or North +region_2d = [-50, 0, 36, 70] # [lon_min, lon_max, lat_min, lat_max] + +# Download elevation and crustal age grids for the study region with a resolution of 10 +# arc-minutes and load them into xarray.DataArrays +grd_relief = pygmt.datasets.load_earth_relief(resolution="10m", region=region_2d) +grd_age = pygmt.datasets.load_earth_age(resolution="10m", region=region_2d) + +# Determine the 3-D region from the minimum and maximum values of the relief grid +region_3d = [*region_2d, grd_relief.min().to_numpy(), grd_relief.max().to_numpy()] + +# %% +# The topographic surface is created based on the grid passed to the ``grid`` parameter +# of :meth:`pygmt.Figure.grdview`; here we use a grid of the Earth relief. To add a +# color-coding based on *another* grid we have to pass a second grid to the +# ``drapegrid`` parameter; here we use a grid of the crustal age. In this case the +# colormap specified via the ``cmap`` parameter applies to the grid passed to +# ``drapegrid``, not to ``grid``. The azimuth and elevation of the 3-D plot are set via +# the ``perspective`` parameter. + +fig = pygmt.Figure() + +# Set up colormap for the crustal age +pygmt.config(COLOR_NAN="lightgray") +pygmt.makecpt(cmap="batlow", series=[0, 200, 1], reverse=True, overrule_bg=True) + +fig.grdview( + projection="M12c", # Mercator projection with a width of 12 centimeters + region=region_3d, + grid=grd_relief, # Use elevation grid for z values + drapegrid=grd_age, # Use crustal age grid for color-coding + cmap=True, # Use colormap created for the crustal age + surftype="i", # Create an image plot + # Use an illumination from the azimuthal directions 0° (north) and 270° + # (west) with a normalization via a cumulative Laplace distribution for + # the shading + shading="+a0/270+ne0.6", + perspective=[157.5, 30], # Azimuth and elevation for the 3-D plot + zsize="1.5c", + plane="+gdarkgray", + frame=True, +) + +# Add colorbar for the crustal age +fig.colorbar(frame=["x+lseafloor crustal age", "y+lMyr"], position="+n") + +fig.show() + + +# %% +# 2. Draping an image +# ------------------- +# +# In the second example, the flag of the European Union (EU) is plotted on top of a +# topographic map of northwest Europe. This example is modified from +# :gmt-docs:`GMT example 32 `. +# We have to consider the dimension of the image we want to drap. The image we will +# download in this example has 1000 x 667 pixels, i.e. an aspect ratio of 3 x 2. + +# Define the study area in degrees East or North, with an extend of 6 degrees for +# the longitude and 4 degrees for the latitude +region_2d = [3, 9, 50, 54] # [lon_min, lon_max, lat_min, lat_max] + +# Download elevation grid for the study region with a resolution of 30 arc-seconds and +# pixel registration and load it into an xarray.DataArray +grd_relief = pygmt.datasets.load_earth_relief(resolution="30s", region=region_2d) + +# Determine the 3-D region from the minimum and maximum values of the relief grid +region_3d = [*region_2d, grd_relief.min().to_numpy(), grd_relief.max().to_numpy()] + +# Download an PNG image of the flag of the EU using rasterio and load it into a +# xarray.DataArray +url_to_image = "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Flag_of_Europe.svg/1000px-Flag_of_Europe.svg.png" +with rasterio.open(url_to_image) as dataset: + data = dataset.read() + drapegrid = xr.DataArray(data, dims=("band", "y", "x")) + +# %% +# Again we create a 3-D plot with :meth:`pygmt.Figure.grdview` and pass an Earth relief +# grid to the ``grid`` parameter to create the topographic surface. But now we pass the +# PNG image which was loaded into an :class:`xarray.DataArray` to the ``drapgrid`` +# parameter. + +fig = pygmt.Figure() + +# Set up a colormap with two colors for the EU flag: blue (0/51/153) for the background +# (value 0 in the netCDF file -> lower half of 0-255 range) and yellow (255/204/0) for +# the stars (value 255 -> upper half) +pygmt.makecpt(cmap="0/51/153,255/204/0", series=[0, 256, 128]) + +fig.grdview( + projection="M12c", # Mercator projection with a width of 12 centimeters + region=region_3d, + grid=grd_relief, # Use elevation grid for z values + drapegrid=drapegrid, # Drap image grid for the EU flag on top + cmap=True, # Use colormap defined for the EU flag + surftype="i", # Create an image plot + # Use an illumination from the azimuthal directions 0° (north) and 270° (west) with + # a normalization via a cumulative Laplace distribution for the shading + shading="+a0/270+ne0.6", + perspective=[157.5, 30], # Define azimuth, elevation for the 3-D plot + zsize="1c", + plane="+gdarkgray", + frame=True, +) + +fig.show() + +# sphinx_gallery_thumbnail_number = 2 diff --git a/v0.14.0/_downloads/11c7b0646ad57fe77b919ca657f15433/linestrings.py b/v0.14.0/_downloads/11c7b0646ad57fe77b919ca657f15433/linestrings.py new file mode 100644 index 00000000000..d3793645c84 --- /dev/null +++ b/v0.14.0/_downloads/11c7b0646ad57fe77b919ca657f15433/linestrings.py @@ -0,0 +1,46 @@ +""" +GeoPandas: Plotting lines with LineString or MultiLineString geometry +===================================================================== + +The :meth:`pygmt.Figure.plot` method allows us to plot geographical data such as lines +with LineString or MultiLineString geometry types stored in a +:class:`geopandas.GeoDataFrame` object or any object that implements the +`__geo_interface__ `__ property. + +Use :func:`geopandas.read_file` to load data from any supported OGR format such as a +shapefile (.shp), GeoJSON (.geojson), geopackage (.gpkg), etc. Then, pass the +:class:`geopandas.GeoDataFrame` object as an argument to the ``data`` parameter of +:meth:`pygmt.Figure.plot`, and style the lines using the ``pen`` parameter. +""" + +# %% +import geodatasets +import geopandas as gpd +import pygmt + +# Read a sample dataset provided by the geodatasets package. +# The dataset contains large rivers in Europe, stored as LineString/MultiLineString +# geometry types. +gdf = gpd.read_file(geodatasets.get_path("eea large_rivers")) + +# Convert object to EPSG 4326 coordinate system +gdf = gdf.to_crs("EPSG:4326") +print(gdf.head()) + +# %% +fig = pygmt.Figure() + +fig.coast( + projection="M10c", + region=[-10, 30, 35, 57], + resolution="l", + land="gray95", + shorelines="1/0.1p,gray50", + borders="1/0.1,gray30", + frame=True, +) + +# Add rivers to map +fig.plot(data=gdf, pen="1p,steelblue") + +fig.show() diff --git a/v0.14.0/_downloads/120a7be7b845664f208e256f570dee0b/scalebar.zip b/v0.14.0/_downloads/120a7be7b845664f208e256f570dee0b/scalebar.zip new file mode 100644 index 00000000000..04f5819b077 Binary files /dev/null and b/v0.14.0/_downloads/120a7be7b845664f208e256f570dee0b/scalebar.zip differ diff --git a/v0.14.0/_downloads/1355099e27b7fbdc6ea202c053c03daa/cartesian_linear.py b/v0.14.0/_downloads/1355099e27b7fbdc6ea202c053c03daa/cartesian_linear.py new file mode 100644 index 00000000000..021d080ae94 --- /dev/null +++ b/v0.14.0/_downloads/1355099e27b7fbdc6ea202c053c03daa/cartesian_linear.py @@ -0,0 +1,30 @@ +r""" +Cartesian linear +================ + +**X**\ *width*\ [/*height*] or **x**\ *x-scale*\ [/*y-scale*] + +Give the *width* of the figure and the optional *height*. The lower-case version +**x** is similar to **X** but expects an *x-scale* and an optional *y-scale*. + +The Cartesian linear projection is primarily designed for regular floating point +data. To plot geographical data in a linear projection, see the upstream GMT +documentation :gmt-docs:`Geographic coordinates +`. +To make the linear plot using calendar date/time as input coordinates, see the +tutorial :doc:`Plotting datetime charts `. +GMT documentation :gmt-docs:`Calendar time coordinates +`. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# The region parameter is specified as x_min, x_max, y_min, y_max +fig.basemap(region=[0, 10, 0, 50], projection="X15c/10c", frame=["afg", "+gbisque"]) +fig.plot(x=[3, 9, 2], y=[4, 9, 37], pen="2p,black") +# Plot data points on top of the line +# Use squares with a size of 0.3 centimeters, an "orange" fill and a "black" outline +fig.plot(x=[3, 9, 2], y=[4, 9, 37], style="s0.3c", fill="orange", pen="black") +fig.show() diff --git a/v0.14.0/_downloads/13a6ddb0a21659136cf9d7908416314e/working_with_panel.zip b/v0.14.0/_downloads/13a6ddb0a21659136cf9d7908416314e/working_with_panel.zip new file mode 100644 index 00000000000..8cc4a7cc7bd Binary files /dev/null and b/v0.14.0/_downloads/13a6ddb0a21659136cf9d7908416314e/working_with_panel.zip differ diff --git a/v0.14.0/_downloads/13af3fb042a55ef92b7d3cbaed302fcf/azim_orthographic.py b/v0.14.0/_downloads/13af3fb042a55ef92b7d3cbaed302fcf/azim_orthographic.py new file mode 100644 index 00000000000..1986d31221a --- /dev/null +++ b/v0.14.0/_downloads/13af3fb042a55ef92b7d3cbaed302fcf/azim_orthographic.py @@ -0,0 +1,31 @@ +r""" +Orthographic projection +======================= + +This is a perspective projection like the general perspective, but with the +difference that the point of perspective lies in infinite distance. +It is therefore often used to give the appearance of a globe viewed from outer +space, were one hemisphere can be seen as a whole. It is neither conformal nor +equal-area and the distortion increases near the edges. + +**g**\ *lon0/lat0*\ [*/horizon*\ ]\ */scale* +or **G**\ *lon0/lat0*\ [*/horizon*\ ]\ */width* + +**g** or **G** specifies the projection type, *lon0/lat0* specifies the +projection center, the optional parameter *horizon* specifies the maximum +distance from projection center (in degrees, <= 90, default 90), and *scale* +and *width* set the figure size. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.coast( + region="g", + projection="G10/52/12c", + frame="afg", + land="khaki", + water="white", +) +fig.show() diff --git a/v0.14.0/_downloads/14bf5efed31d1ef2d72f869862efeeba/scalebar.py b/v0.14.0/_downloads/14bf5efed31d1ef2d72f869862efeeba/scalebar.py new file mode 100644 index 00000000000..bca7d0b9703 --- /dev/null +++ b/v0.14.0/_downloads/14bf5efed31d1ef2d72f869862efeeba/scalebar.py @@ -0,0 +1,112 @@ +r""" +Scale bar +========= + +The ``map_scale`` parameter of the :meth:`pygmt.Figure.basemap` and +:meth:`pygmt.Figure.coast` methods is used to add a scale bar to a map. +This example shows how such a scale bar can be customized: + + - position: **g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**. Set the position + of the reference point. Choose from + + - **g**: Give map coordinates as *longitude*\/\ *latitude*. + - **j**\|\ **J**: Specify a two-character (order independent) code. + Choose from vertical **T**\(op), **M**\(iddle), or **B**\(ottom) and + horizontal **L**\(eft), **C**\(entre), or **R**\(ight). Lower / upper + case **j** / **J** mean inside / outside of the map bounding box. + - **n**: Give normalized bounding box coordinates as *nx*\/\ *ny*. + - **x**: Give plot coordinates as *x*\/\ *y*. + + - length: **+w**. Give a distance value, and, optionally a distance unit. + Choose from **e** (meters), **f** (feet), **k** (kilometers) [Default], + **M** (statute miles), **n** (nautical miles), or **u** (US survey feet). + - origin: **+c**\ [*slon*/]\ *slat*. Control where on the map the scale bar + applies. If **+c** is not given the reference point is used. If only + **+c** is appended the middle of the map is used. Note that *slon* is only + optional for projections with constant scale along parallels, e.g., + Mercator projection. + - justify: **+j**. Set the anchor point. Specify a two-character (order + independent) code. Choose from vertical **T**\(op), **M**\(iddle), or + **B**\(ottom) and horizontal **L**\(eft), **C**\(entre), or **R**\(ight). + - offset: **+o**\ *offset* or **+o**\ *xoffset*/\ *yoffset*. Give either a + common shift or individual shifts in x (longitude) and y (latitude) + directions. + - height: Use :gmt-term:`MAP_SCALE_HEIGHT` via :func:`pygmt.config`. + - fancy style: **+f**. Get a scale bar that looks like train tracks. + - unit: **+u**. Add the distance unit given via **+w** to the single + distance values. + - label: **+l**. Add the distance unit given via **+w** as label. Append + text to get a customized label instead. + - alignment: **+a**. Set the label alignment. Choose from **t**\(op) + [Default], **b**\(ottom), **l**\(eft), or **r**\(ight). +""" + +# %% +import pygmt + +# Create a new Figure instance +fig = pygmt.Figure() + +# Mercator projection with 10 centimeters width +fig.basemap(region=[-45, -25, -15, 0], projection="M0/0/10c", frame=["WSne", "af"]) + +# ----------------------------------------------------------------------------- +# Top Left: Add a plain scale bar +# It is placed based on geographic coordinates (g) 42° West and 1° South, +# applies at the reference point (+c is not given), and represents a +# length (+w) of 500 kilometers +fig.basemap(map_scale="g-42/-1+w500k") + +# ----------------------------------------------------------------------------- +# Top Right: Add a fancy scale bar +# It is placed based on normalized bounding box coordinates (n) +# Use a fancy style (+f) to get a scale bar that looks like train tracks +# Add the distance unit (+u) to the single distance values +fig.basemap(map_scale="n0.8/0.95+w500k+f+u") + +# ----------------------------------------------------------------------------- +# Bottom Left: Add a thick scale bar +# Adjust the GMT default parameter MAP_SCALE_HEIGHT locally (the change applies +# only to the code within the "with" statement) +# It applies (+c) at the middle of the map (no location is appended to +c) +# Without appending text, +l adds the distance unit as label +with pygmt.config(MAP_SCALE_HEIGHT="10p"): + fig.basemap(map_scale="n0.2/0.15+c+w500k+f+l") + +# ----------------------------------------------------------------------------- +# Bottom Right: Add a scale bar valid for a specific location +# It is placed at BottomRight (j) using MiddleRight as anchor point (+j) with +# an offset (+o) of 1 centimeter in both x and y directions +# It applies (+c) at -7° South, add a customized label by appending text to +l +fig.basemap(map_scale="jBR+jMR+o1c/1c+c-7+w500k+f+u+lvalid at 7° S") + +fig.show() + + +# %% +# The ``box`` parameter allows surrounding the scale bar. This can be useful +# when adding a scale bar to a colorful map. To fill the box, append **+g** +# with the desired color (or pattern). The outline of the box can be adjusted +# by appending **+p** with the desired thickness, color, and style. To force +# rounded edges append **+r** with the desired radius. + +# Create a new Figure instance +fig = pygmt.Figure() + +fig.coast( + region=[-45, -25, -15, 0], + projection="M10c", + land="tan", + water="steelblue", + frame=["WSne", "af"], + # Set the label alignment (+a) to right (r) + map_scale="jBL+o1c/1c+c-7+w500k+f+lkm+ar", + # Fill the box in white with a transparency of 30 percent, add a solid + # outline in darkgray (gray30) with a thickness of 0.5 points, and use + # rounded edges with a radius of 3 points + box="+gwhite@30+p0.5p,gray30,solid+r3p", +) + +fig.show() + +# sphinx_gallery_thumbnail_number = 1 diff --git a/v0.14.0/_downloads/1531a9df00bb16391ab596ddc2b0de1c/azim_gnomonic.ipynb b/v0.14.0/_downloads/1531a9df00bb16391ab596ddc2b0de1c/azim_gnomonic.ipynb new file mode 100644 index 00000000000..a4732f30262 --- /dev/null +++ b/v0.14.0/_downloads/1531a9df00bb16391ab596ddc2b0de1c/azim_gnomonic.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Gnomonic projection\n\nThe point of perspective of the gnomonic projection lies at the center of the\nEarth. As a consequence great circles (orthodromes) on the surface of the Earth\nare displayed as straight lines, which makes it suitable for distance\nestimation for navigational purposes. It is neither conformal nor equal-area\nand the distortion increases greatly with distance to the projection center. It\nfollows that the scope of application is restricted to a small area around the\nprojection center (at a maximum of 60\u00b0).\n\n**f**\\ *lon0/lat0*\\ [*/horizon*\\ ]\\ */scale*\nor **F**\\ *lon0/lat0*\\ [*/horizon*\\ ]\\ */width*\n\n**f** or **F** specifies the projection type, *lon0/lat0* specifies the\nprojection center, the optional parameter *horizon* specifies the maximum\ndistance from projection center (in degrees, < 90, default 60), and *scale* or\n*width* sets the size of the figure.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n region=\"g\",\n projection=\"F-90/15/12c\",\n frame=\"afg\",\n land=\"khaki\",\n water=\"white\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/15fa3150b7681115cd6492d941640fa2/logo.ipynb b/v0.14.0/_downloads/15fa3150b7681115cd6492d941640fa2/logo.ipynb new file mode 100644 index 00000000000..55572e543e4 --- /dev/null +++ b/v0.14.0/_downloads/15fa3150b7681115cd6492d941640fa2/logo.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Logo\n\nThe :meth:`pygmt.Figure.logo` method allows to place the GMT logo on a map.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 2], projection=\"X6c\", frame=True)\n\n# Add the GMT logo in the Top Right (TR) corner of the current map,\n# scaled up to be 3 cm wide and offset by 0.3 cm in x direction\n# and 0.6 cm in y direction.\nfig.logo(position=\"jTR+o0.3c/0.6c+w3c\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/1608d4a2d719f51f583234498b8dda2d/points_transparency.py b/v0.14.0/_downloads/1608d4a2d719f51f583234498b8dda2d/points_transparency.py new file mode 100644 index 00000000000..8b6e8299e51 --- /dev/null +++ b/v0.14.0/_downloads/1608d4a2d719f51f583234498b8dda2d/points_transparency.py @@ -0,0 +1,26 @@ +""" +Points with varying transparency +================================ + +Points can be plotted with different transparency levels by passing in an array +argument to the ``transparency`` parameter of :meth:`pygmt.Figure.plot`. +""" + +# %% +import numpy as np +import pygmt + +# prepare the input x and y data +x = np.arange(0, 105, 5) +y = np.ones(x.size) +# transparency level in percentage from 0 (i.e., opaque) to 100 +transparency = x + +fig = pygmt.Figure() +fig.basemap( + region=[-5, 105, 0, 2], + frame=["xaf+lTransparency level+u%", "WSrt"], + projection="X15c/6c", +) +fig.plot(x=x, y=y, style="c0.6c", fill="blue", pen="1p,red", transparency=transparency) +fig.show() diff --git a/v0.14.0/_downloads/16f221978f914ef51c5769f3af3458ae/polyconic.ipynb b/v0.14.0/_downloads/16f221978f914ef51c5769f3af3458ae/polyconic.ipynb new file mode 100644 index 00000000000..7b08843da8a --- /dev/null +++ b/v0.14.0/_downloads/16f221978f914ef51c5769f3af3458ae/polyconic.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Polyconic projection\n\nThe polyconic projection, in Europe usually referred to as the American\npolyconic projection, was introduced shortly before 1820 by the Swiss-American\ncartographer Ferdinand Rodulph Hassler (1770-1843). As head of the Survey of\nthe Coast, he was looking for a projection that would give the least distortion\nfor mapping the coast of the United States. The projection acquired its name\nfrom the construction of each parallel, which is achieved by projecting the\nparallel onto the cone while it is rolled around the globe, along the central\nmeridian, tangent to that parallel. As a consequence, the projection involves\nmany cones rather than a single one used in regular conic projections.\n\nThe polyconic projection is neither equal-area, nor conformal. It is true to\nscale without distortion along the central meridian. Each parallel is true to\nscale as well, but the meridians are not as they get further away from the\ncentral meridian. As a consequence, no parallel is standard because conformity\nis lost with the lengthening of the meridians.\n\n**poly**/\\ [*lon0*/\\ [*lat0*/]]\\ *scale* or\n**Poly**/\\ [*lon0*/\\ [*lat0*/]]\\ *width*\n\nThe projection is set with **poly** or **Poly**. The figure size is set\nwith *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n region=[-180, -20, 0, 90],\n projection=\"Poly/12c\",\n frame=\"afg\",\n land=\"seagreen\",\n water=\"gray90\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/17af388415902dca44f9ba9bf6440bb0/wiggle.zip b/v0.14.0/_downloads/17af388415902dca44f9ba9bf6440bb0/wiggle.zip new file mode 100644 index 00000000000..80973b593c6 Binary files /dev/null and b/v0.14.0/_downloads/17af388415902dca44f9ba9bf6440bb0/wiggle.zip differ diff --git a/v0.14.0/_downloads/17d0e53490fc0a05fad40983ca42d596/01_first_figure.zip b/v0.14.0/_downloads/17d0e53490fc0a05fad40983ca42d596/01_first_figure.zip new file mode 100644 index 00000000000..b136f5b6b16 Binary files /dev/null and b/v0.14.0/_downloads/17d0e53490fc0a05fad40983ca42d596/01_first_figure.zip differ diff --git a/v0.14.0/_downloads/17da4f8964b11361de7d2cb382db3509/plot.zip b/v0.14.0/_downloads/17da4f8964b11361de7d2cb382db3509/plot.zip new file mode 100644 index 00000000000..757e6e3df56 Binary files /dev/null and b/v0.14.0/_downloads/17da4f8964b11361de7d2cb382db3509/plot.zip differ diff --git a/v0.14.0/_downloads/1a32f30b6831819bd95c8d81be044019/cyl_stereographic.zip b/v0.14.0/_downloads/1a32f30b6831819bd95c8d81be044019/cyl_stereographic.zip new file mode 100644 index 00000000000..af669c9101c Binary files /dev/null and b/v0.14.0/_downloads/1a32f30b6831819bd95c8d81be044019/cyl_stereographic.zip differ diff --git a/v0.14.0/_downloads/1ae6ae887f5e9bb4e53c0a45e61f5159/vector_heads_tails.zip b/v0.14.0/_downloads/1ae6ae887f5e9bb4e53c0a45e61f5159/vector_heads_tails.zip new file mode 100644 index 00000000000..2c94cc3607d Binary files /dev/null and b/v0.14.0/_downloads/1ae6ae887f5e9bb4e53c0a45e61f5159/vector_heads_tails.zip differ diff --git a/v0.14.0/_downloads/1b14aa68579f00ad9a8aa243bb6120ff/frames.py b/v0.14.0/_downloads/1b14aa68579f00ad9a8aa243bb6120ff/frames.py new file mode 100644 index 00000000000..56b4e9ac130 --- /dev/null +++ b/v0.14.0/_downloads/1b14aa68579f00ad9a8aa243bb6120ff/frames.py @@ -0,0 +1,115 @@ +""" +Frames, ticks, titles, and labels +================================= + +Setting frame, ticks, title, etc., of the plot is handled by the ``frame`` +parameter that most plotting methods of the :class:`pygmt.Figure` class +contain. +""" + +# %% +import pygmt + +# %% +# Plot frame +# ---------- +# +# By default, PyGMT does not add a frame to your plot. For example, we can plot +# the coastlines of the world with a Mercator projection: + +fig = pygmt.Figure() +fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c") +fig.show() + +# %% +# To add the default GMT frame style to the plot, use ``frame="f"`` in +# :meth:`pygmt.Figure.basemap` or another plotting method (which has the +# ``frame`` parameter, with the exception of :meth:`pygmt.Figure.colorbar`): + +fig = pygmt.Figure() +fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c") +fig.basemap(frame="f") +fig.show() + + +# %% +# Ticks and grid lines +# -------------------- +# +# The automatic frame (``frame=True`` or ``frame="af"``) adds the default GMT +# frame style and automatically determines tick labels from the plot region. +# In GMT the tick labels are called **a**\ nnotations. + +fig = pygmt.Figure() +fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c") +fig.basemap(frame="af") +fig.show() + +# %% +# Add automatic grid lines to the plot by passing ``g`` through the ``frame`` +# parameter: + +fig = pygmt.Figure() +fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c") +fig.basemap(frame="ag") +fig.show() + +# %% +# To adjust the step widths of annotations, frame, and grid lines we can +# add the desired step widths after ``a``, ``f``, or ``g``. In the example +# below, the step widths are set to 30°, 7.5°, and 15°, respectively. + +fig = pygmt.Figure() +fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c") +fig.basemap(frame="a30f7.5g15") +fig.show() + + +# %% +# Title +# ----- +# +# The figure title can be set by passing **+t**\ *title* to the ``frame`` +# parameter of :meth:`pygmt.Figure.basemap`. Passing multiple arguments to +# ``frame`` can be done by using a list, as shown in the example below. + +fig = pygmt.Figure() +# region="TT" specifies Trinidad and Tobago using the ISO country code +fig.coast(shorelines="1/0.5p", region="TT", projection="M25c") +fig.basemap(frame=["a", "+tTrinidad and Tobago"]) +fig.show() + + +# %% +# Axis labels +# ----------- +# +# Axis labels, in GMT simply called labels, can be set by passing +# **x+l**\ *label* (or starting with **y** if +# labeling the y-axis) to the ``frame`` parameter of +# :meth:`pygmt.Figure.basemap`. The map boundaries (or plot axes) are named as +# West/west/left (**W**, **w**, **l**), South/south/bottom +# (**S**, **s**, **b**), North/north/top (**N**, **n**, **t**), and +# East/east/right (**E**, **e**, **r**) sides of a figure. If an upper-case +# letter (**W**, **S**, **N**, **E**) is passed, the axis is plotted with +# tick marks and annotations. The lower-case version +# (**w**, **s**, **n**, **e**) plots the axis only with tick marks. +# To only plot the axis pass **l**, **b**, **t**, **r**. By default +# (``frame=True`` or ``frame="af"``), the West and the South axes are +# plotted with both tick marks and annotations. +# +# The example below uses a Cartesian projection, as GMT does not allow +# labels to be set for geographic maps. + +fig = pygmt.Figure() +fig.basemap( + region=[0, 10, 0, 20], + projection="X10c/8c", + # Plot axis with tick marks, annotations, and labels on the + # West and South axes + # Plot axis with tick marks on the north and east axes + frame=["WSne", "xaf+lx-axis", "yaf+ly-axis"], +) +fig.show() + +# sphinx_gallery_thumbnail_number = 4 diff --git a/v0.14.0/_downloads/1b57f5b87897e64419d1d3f25dc9d2d2/double_y_axes.zip b/v0.14.0/_downloads/1b57f5b87897e64419d1d3f25dc9d2d2/double_y_axes.zip new file mode 100644 index 00000000000..141a43b5d89 Binary files /dev/null and b/v0.14.0/_downloads/1b57f5b87897e64419d1d3f25dc9d2d2/double_y_axes.zip differ diff --git a/v0.14.0/_downloads/1c846ae94d831565031459decd77e961/choropleth_map.ipynb b/v0.14.0/_downloads/1c846ae94d831565031459decd77e961/choropleth_map.ipynb new file mode 100644 index 00000000000..a6ac0cb4dc6 --- /dev/null +++ b/v0.14.0/_downloads/1c846ae94d831565031459decd77e961/choropleth_map.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Choropleth map\n\nThe :meth:`pygmt.Figure.plot` method allows us to plot geographical data such as\npolygons which are stored in a :class:`geopandas.GeoDataFrame` object. Use\n:func:`geopandas.read_file` to load data from any supported OGR format such as a\nshapefile (.shp), GeoJSON (.geojson), geopackage (.gpkg), etc. You can also use a full\nURL pointing to your desired data source. Then, pass the class:`geopandas.GeoDataFrame`\nas an argument to the ``data`` parameter of :meth:`pygmt.Figure.plot`, and style the\ngeometry using the ``pen`` parameter. To fill the polygons based on a corresponding\ncolumn you need to set ``fill=\"+z\"`` as well as select the appropriate column using the\n``aspatial`` parameter as shown in the example below.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import geodatasets\nimport geopandas as gpd\nimport pygmt\n\n# Read the example dataset provided by geodatasets.\ngdf = gpd.read_file(geodatasets.get_path(\"geoda airbnb\"))\nprint(gdf)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\nfig.basemap(\n region=gdf.total_bounds[[0, 2, 1, 3]],\n projection=\"M6c\",\n frame=\"+tPopulation of Chicago\",\n)\n\n# The dataset contains different attributes, here we select the \"population\" column to\n# plot.\n\n# First, we define the colormap to fill the polygons based on the \"population\" column.\npygmt.makecpt(\n cmap=\"acton\",\n series=[gdf[\"population\"].min(), gdf[\"population\"].max(), 10],\n continuous=True,\n reverse=True,\n)\n\n# Next, we plot the polygons and fill them using the defined colormap. The target column\n# is defined by the aspatial parameter.\nfig.plot(\n data=gdf,\n pen=\"0.3p,gray10\",\n fill=\"+z\",\n cmap=True,\n aspatial=\"Z=population\",\n)\n\n# Add colorbar legend.\nfig.colorbar(frame=\"x+lPopulation\", position=\"jML+o-0.5c+w3.5c/0.2c\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/1cd4356b2c55d053bfeb91e9bce93f36/track_sampling.ipynb b/v0.14.0/_downloads/1cd4356b2c55d053bfeb91e9bce93f36/track_sampling.ipynb new file mode 100644 index 00000000000..fb16d018ce4 --- /dev/null +++ b/v0.14.0/_downloads/1cd4356b2c55d053bfeb91e9bce93f36/track_sampling.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Sampling along tracks\n\nThe :func:`pygmt.grdtrack` function samples a raster grid's value along\nspecified points. We will need to input a 2-D raster to ``grid`` which can be\nan :class:`xarray.DataArray`. The argument passed to the ``points`` parameter\ncan be a :class:`pandas.DataFrame` table where the first two columns are\nx and y (or longitude and latitude). Note also that there is a ``newcolname``\nparameter that will be used to name the new column of values sampled from the\ngrid.\n\nAlternatively, a netCDF file path can be passed to ``grid``. An ASCII file path\ncan also be accepted for ``points``. To save an output ASCII file, a file name\nargument needs to be passed to the ``outfile`` parameter.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\n# Load sample grid and point datasets\ngrid = pygmt.datasets.load_earth_relief()\npoints = pygmt.datasets.load_sample_data(name=\"ocean_ridge_points\")\n# Sample the bathymetry along the world's ocean ridges at specified track\n# points\ntrack = pygmt.grdtrack(points=points, grid=grid, newcolname=\"bathymetry\")\n\nfig = pygmt.Figure()\n# Plot the earth relief grid on Cylindrical Stereographic projection, masking\n# land areas\nfig.basemap(region=\"g\", projection=\"Cyl_stere/150/-20/15c\", frame=True)\nfig.grdimage(grid=grid, cmap=\"gray\")\nfig.coast(land=\"#666666\")\n# Plot the sampled bathymetry points using circles (c) of 0.15 cm size\n# Points are colored using elevation values (normalized for visual purposes)\nfig.plot(\n x=track.longitude,\n y=track.latitude,\n style=\"c0.15c\",\n cmap=\"terra\",\n fill=(track.bathymetry - track.bathymetry.mean()) / track.bathymetry.std(),\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/1d555e9d4f2a8e37875784906a68cb57/conic_equidistant.zip b/v0.14.0/_downloads/1d555e9d4f2a8e37875784906a68cb57/conic_equidistant.zip new file mode 100644 index 00000000000..0b1d210e168 Binary files /dev/null and b/v0.14.0/_downloads/1d555e9d4f2a8e37875784906a68cb57/conic_equidistant.zip differ diff --git a/v0.14.0/_downloads/1df0f8c44b320acd1f9e97de0bf941ce/cartesian_power.zip b/v0.14.0/_downloads/1df0f8c44b320acd1f9e97de0bf941ce/cartesian_power.zip new file mode 100644 index 00000000000..b3063447500 Binary files /dev/null and b/v0.14.0/_downloads/1df0f8c44b320acd1f9e97de0bf941ce/cartesian_power.zip differ diff --git a/v0.14.0/_downloads/1e3febb87a77ca5c69245390346b4f57/azim_lambert.zip b/v0.14.0/_downloads/1e3febb87a77ca5c69245390346b4f57/azim_lambert.zip new file mode 100644 index 00000000000..69e8ac8eb95 Binary files /dev/null and b/v0.14.0/_downloads/1e3febb87a77ca5c69245390346b4f57/azim_lambert.zip differ diff --git a/v0.14.0/_downloads/1ea3926fb71b8d68d420ad881f49479f/conic_albers.ipynb b/v0.14.0/_downloads/1ea3926fb71b8d68d420ad881f49479f/conic_albers.ipynb new file mode 100644 index 00000000000..3253b789df0 --- /dev/null +++ b/v0.14.0/_downloads/1ea3926fb71b8d68d420ad881f49479f/conic_albers.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Albers conic equal-area projection\n\nThis projection, developed by Heinrich C. Albers in 1805, is predominantly used\nto map regions of large east-west extent, in particular the United States. It\nis a conic, equal-area projection, in which parallels are unequally spaced arcs\nof concentric circles, more closely spaced at the north and south edges of the\nmap. Meridians, on the other hand, are equally spaced radii about a common\ncenter, and cut the parallels at right angles. Distortion in scale and shape\nvanishes along the two standard parallels. Between them, the scale along\nparallels is too small; beyond them it is too large. The opposite is true for\nthe scale along meridians.\n\n**b**\\ *lon0/lat0*\\ /\\ *lat1/lat2*\\ */scale*\nor **B**\\ *lon0/lat0*\\ /\\ *lat1/lat2*\\ */width*\n\nThe projection is set with **b** or **B**. The projection center is set by\n*lon0/lat0* and two standard parallels for the map are set with *lat1/lat2*.\nThe figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Use the ISO country code for Brazil and add a padding of 2 degrees (+R2)\nfig.coast(\n region=\"BR+R2\",\n projection=\"B-55/-15/-25/0/12c\",\n frame=\"afg\",\n land=\"seagreen\",\n water=\"gray90\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/1f478f1e0887119fc52122920bef1414/subplots.zip b/v0.14.0/_downloads/1f478f1e0887119fc52122920bef1414/subplots.zip new file mode 100644 index 00000000000..dedab6473e3 Binary files /dev/null and b/v0.14.0/_downloads/1f478f1e0887119fc52122920bef1414/subplots.zip differ diff --git a/v0.14.0/_downloads/1fc7a639ce6937c269641f6190730164/cross_section.zip b/v0.14.0/_downloads/1fc7a639ce6937c269641f6190730164/cross_section.zip new file mode 100644 index 00000000000..4919a7b7f72 Binary files /dev/null and b/v0.14.0/_downloads/1fc7a639ce6937c269641f6190730164/cross_section.zip differ diff --git a/v0.14.0/_downloads/1fd28053d3ce0eec303d9a10169cf5a8/azim_gnomonic.zip b/v0.14.0/_downloads/1fd28053d3ce0eec303d9a10169cf5a8/azim_gnomonic.zip new file mode 100644 index 00000000000..504392da259 Binary files /dev/null and b/v0.14.0/_downloads/1fd28053d3ce0eec303d9a10169cf5a8/azim_gnomonic.zip differ diff --git a/v0.14.0/_downloads/20d1dc72f87b41e11042b5e3f45aa960/tilemaps.zip b/v0.14.0/_downloads/20d1dc72f87b41e11042b5e3f45aa960/tilemaps.zip new file mode 100644 index 00000000000..70e4976d773 Binary files /dev/null and b/v0.14.0/_downloads/20d1dc72f87b41e11042b5e3f45aa960/tilemaps.zip differ diff --git a/v0.14.0/_downloads/21dffec70e692563857edd4cac214d36/meca.py b/v0.14.0/_downloads/21dffec70e692563857edd4cac214d36/meca.py new file mode 100644 index 00000000000..1866f1a79be --- /dev/null +++ b/v0.14.0/_downloads/21dffec70e692563857edd4cac214d36/meca.py @@ -0,0 +1,53 @@ +""" +Focal mechanisms +================ + +The :meth:`pygmt.Figure.meca` method can plot focal mechanisms or beachballs. +We can specify the focal mechanism nodal planes or moment tensor components +as a dictionary using the ``spec`` parameter (or they can be specified as a +1-D or 2-D array, or within a file). The size of the beachballs can be set +using the ``scale`` parameter. The compressive and extensive quadrants can +be filled either with a color or a pattern via the ``compressionfill`` and +``extensionfill`` parameters, respectively. Use the ``pen`` parameter to +adjust the outline of the beachballs. +""" + +# %% +import pygmt + +fig = pygmt.Figure() + +# Generate a map near Washington State showing land, water, and shorelines +fig.coast( + region=[-125, -122, 47, 49], + projection="M6c", + land="grey", + water="lightblue", + shorelines=True, + frame="a", +) + +# Store focal mechanism parameters in a dictionary based on the Aki & Richards +# convention +focal_mechanism = {"strike": 330, "dip": 30, "rake": 90, "magnitude": 3} + +# Pass the focal mechanism data through the spec parameter. In addition provide +# scale, event location, and event depth +fig.meca( + spec=focal_mechanism, + scale="1c", # in centimeters + longitude=-124.3, + latitude=48.1, + depth=12.0, + # Fill compressive quadrants with color "red" + # [Default is "black"] + compressionfill="red", + # Fill extensive quadrants with color "cornsilk" + # [Default is "white"] + extensionfill="cornsilk", + # Draw a 0.5 points thick dark gray ("gray30") solid outline via + # the pen parameter [Default is "0.25p,black,solid"] + pen="0.5p,gray30,solid", +) + +fig.show() diff --git a/v0.14.0/_downloads/21fcfe2acf05db8545d24de35dded39f/cyl_cassini.py b/v0.14.0/_downloads/21fcfe2acf05db8545d24de35dded39f/cyl_cassini.py new file mode 100644 index 00000000000..140911b4b0e --- /dev/null +++ b/v0.14.0/_downloads/21fcfe2acf05db8545d24de35dded39f/cyl_cassini.py @@ -0,0 +1,33 @@ +r""" +Cassini cylindrical projection +============================== + +This cylindrical projection was developed in 1745 by César-François Cassini de +Thury for the survey of France. It is occasionally called Cassini-Soldner since +the latter provided the more accurate mathematical analysis that led to the +development of the ellipsoidal formulae. The projection is neither conformal +nor equal-area, and behaves as a compromise between the two end-members. The +distortion is zero along the central meridian. It is best suited for mapping +regions of north-south extent. The central meridian, each meridian 90° away, +and equator are straight lines; all other meridians and parallels are complex +curves. + +**c**\ *lon0/lat0*\ */scale* or **C**\ *lon0/lat0*\ */width* + +The projection is set with **c** or **C**. The projection center is set by +*lon0/lat0*, and the figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Use the ISO code for Madagascar (MG) and pad it by 2 degrees (+R2) +fig.coast( + region="MG+R2", + projection="C47/-19/12c", + frame="afg", + land="gray80", + water="steelblue", +) +fig.show() diff --git a/v0.14.0/_downloads/22670d1b9eefc72d26e95710491e5349/borders.ipynb b/v0.14.0/_downloads/22670d1b9eefc72d26e95710491e5349/borders.ipynb new file mode 100644 index 00000000000..5991b0e571c --- /dev/null +++ b/v0.14.0/_downloads/22670d1b9eefc72d26e95710491e5349/borders.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Political boundaries\n\nThe ``borders`` parameter of :meth:`pygmt.Figure.coast` specifies levels of\npolitical boundaries to plot and the pen used to draw them. Choose from the\nlist of boundaries below:\n\n* **1** = National boundaries\n* **2** = State boundaries within the Americas\n* **3** = Marine boundaries\n* **a** = All boundaries (1-3)\n\nFor example, to draw national boundaries with a line thickness of 1 point and\nblack line color use ``borders=\"1/1p,black\"``. You can draw multiple boundaries\nby passing in a list to ``borders``.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Make a Sinusoidal projection map of the Americas with automatic annotations,\n# ticks and gridlines\nfig.basemap(region=[-150, -30, -60, 60], projection=\"I-90/15c\", frame=\"afg\")\n# Plot each level of the boundaries dataset with a different color.\nfig.coast(borders=[\"1/0.5p,black\", \"2/0.5p,red\", \"3/0.5p,blue\"], land=\"gray\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/22bd232ca2b38709d05c54aa6532aa8c/cyl_oblique_mercator.ipynb b/v0.14.0/_downloads/22bd232ca2b38709d05c54aa6532aa8c/cyl_oblique_mercator.ipynb new file mode 100644 index 00000000000..86df78d6a3a --- /dev/null +++ b/v0.14.0/_downloads/22bd232ca2b38709d05c54aa6532aa8c/cyl_oblique_mercator.ipynb @@ -0,0 +1,86 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Oblique Mercator projection\n\nOblique configurations of the cylinder give rise to the oblique Mercator projection.\nIt is particularly useful when mapping regions of large lateral extent in an oblique\ndirection. Both parallels and meridians are complex curves. The projection was\ndeveloped in the early 1900s by several workers.\n\nThe projection is set with **o** or **O**. There are three different specification\nways (**a**\\|\\ **A**, **b**\\|\\ **B**, **c**\\|\\ **C**) available. For all three\ndefinitions, the upper case letter mean the projection pole is set in the southern\nhemisphere [Default is northern hemisphere]. Align the y-axis with the optional\nmodifier **+v**. The figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 1. Using the origin and azimuth\n\n**oa**\\|\\ **oA**\\ *lon0/lat0/azimuth/scale*\\[**+v**] or\n**Oa**\\|\\ **OA**\\ *lon0/lat0/azimuth/width*\\[**+v**]\n\nThe central meridian is set by *lon0/lat0*. The oblique equator is set by *azimuth*.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n projection=\"Oa-120/25/-30/3c+v\",\n # Set bottom left and top right coordinates of the figure with \"+r\"\n region=\"-122/35/-107/22+r\",\n frame=\"afg\",\n land=\"gray80\",\n water=\"steelblue\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 2. Using two points\n\n**ob**\\|\\ **oB**\\ *lon0/lat0/lon1/lat1/scale*\\ [**+v**] or\n**Ob**\\|\\ **OB**\\ *lon0/lat0/lon1/lat1/width*\\ [**+v**]\n\nThe central meridian is set by *lon0/lat0*. The oblique equator is set by *lon1/lat1*.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n projection=\"Ob130/35/25/35/3c\",\n region=\"130/35/145/40+r\",\n frame=\"afg\",\n land=\"gray80\",\n water=\"steelblue\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 3. Using the origin and projection pole\n\n**oc**\\|\\ **oC**\\ *lon0/lat0/lonp/latp/scale*\\ [**+v**] or\n**Oc**\\|\\ **OC**\\ *lon0/lat0/lonp/latp/width*\\ [**+v**]\n\nThe central meridian is set by *lon0/lat0*. The projection pole is set by *lonp/latp*.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n projection=\"Oc280/25.5/22/69/4c\",\n region=\"270/20/305/25+r\",\n frame=\"afg\",\n land=\"gray80\",\n water=\"steelblue\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/22faaec03506c12ce90f543cc2861bdf/bars.ipynb b/v0.14.0/_downloads/22faaec03506c12ce90f543cc2861bdf/bars.ipynb new file mode 100644 index 00000000000..adec5aa3e32 --- /dev/null +++ b/v0.14.0/_downloads/22faaec03506c12ce90f543cc2861bdf/bars.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Vertical or horizontal bars\n\nThe :meth:`pygmt.Figure.plot` method can plot vertical (**b**) or\nhorizontal (**B**) bars by passing the corresponding shortcut to\nthe ``style`` parameter. By default, *base* = 0 meaning that the\nbar is starting from 0. Append **+b**\\[*base*] to change this\nvalue. To plot multi-band bars, please append\n**+v**\\|\\ **i**\\ *ny* (for verticals bars) or **+v**\\|\\ **i**\\ *nx*\n(for horizontal ones), where *ny* or *nx* indicate the total\nnumber of bands in the bar (and hence the number of values required\nto follow the *x,y* coordinate pair in the input). Here, **+i**\nmeans we must accumulate the bar values from the increments\n*dy* or *dx*, while **+v** means we get the complete values relative\nto base. Normally, the bands are plotted as sections of a final\nsingle bar. Use **+s** to instead split the bar into *ny* or *nx*\nside-by-side, individual and thinner bars. Multi-band bars require\n``cmap=True`` with one color per band.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n\npygmt.makecpt(cmap=\"roma\", series=[0, 4, 1])\n\nwith fig.subplot(\n nrows=2,\n ncols=2,\n subsize=(\"8c\", \"4c\"),\n frame=\"ag\",\n sharey=True,\n sharex=True,\n margins=[\"0.5c\", \"0.75c\"],\n):\n pen = \"1.5p\"\n with fig.set_panel(panel=0):\n fill = \"skyblue\"\n fig.basemap(region=[0, 4, 0, 3], frame=\"+tvertical bars\")\n fig.plot(x=1, y=2, style=\"b0.5c\", fill=fill, pen=pen)\n fig.plot(x=2, y=2.5, style=\"b1c\", fill=fill, pen=pen)\n # +b1 means that the bar is starting from y=1 here\n fig.plot(x=3, y=2.5, style=\"b0.75c+b1\", fill=fill, pen=pen)\n\n with fig.set_panel(panel=1):\n fill = \"tomato\"\n fig.basemap(region=[0, 4, 0, 3], frame=\"+thorizontal bars\")\n fig.plot(x=1.5, y=0.5, style=\"B0.75c\", fill=fill, pen=pen)\n fig.plot(x=3, y=1.5, style=\"B1c\", fill=fill, pen=pen)\n # +b2 means that the bar is starting from x=2 here\n fig.plot(x=3.5, y=2.5, style=\"B0.5c+b2\", fill=fill, pen=pen)\n\n # generate dictionary for plotting multi-band bars\n data = {\n \"x1\": [0.25, 1.25],\n \"y\": [1, 2],\n \"x2\": [0.65, 0.5],\n \"x3\": [0.4, 1.25],\n \"x4\": [2.25, 0.75],\n }\n\n with fig.set_panel(panel=2):\n fig.basemap(region=[0, 4, 0, 3], frame=\"+tstacked bars\")\n fig.plot(data=data, style=\"B0.75c+i4\", cmap=True, pen=pen)\n\n with fig.set_panel(panel=3):\n fig.basemap(region=[0, 4, 0, 3], frame=\"+tsplit bars\")\n fig.plot(data=data, style=\"B1c+v4+s\", cmap=True, pen=pen)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/23c046089b572e846186523db9de526a/datetime_inputs.ipynb b/v0.14.0/_downloads/23c046089b572e846186523db9de526a/datetime_inputs.ipynb new file mode 100644 index 00000000000..c13bc45e99e --- /dev/null +++ b/v0.14.0/_downloads/23c046089b572e846186523db9de526a/datetime_inputs.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Datetime inputs\n\nDatetime inputs of the following types are supported in PyGMT:\n\n- :class:`numpy.datetime64`\n- :class:`pandas.DatetimeIndex`\n- :class:`xarray.DataArray`: datetimes included in an *xarray.DataArray*\n- raw datetime strings in\n [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601)_ (e.g.\n ``\"YYYY-MM-DD\"``, ``\"YYYY-MM-DDTHH\"``, and ``\"YYYY-MM-DDTHH:MM:SS\"``)\n- Python built-in :class:`datetime.datetime` and :class:`datetime.date`\n\nWe can pass datetime inputs based on one of the types listed above directly to\nthe ``x`` and ``y`` parameters of e.g. the :meth:`pygmt.Figure.plot` method.\n\nThe ``region`` parameter has to include the $x$ and $y$ axis limits\nin the form [*date_min*, *date_max*, *ymin*, *ymax*]. Here *date_min* and\n*date_max* can be directly defined as datetime input.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import datetime\n\nimport numpy as np\nimport pandas as pd\nimport pygmt\nimport xarray as xr\n\nfig = pygmt.Figure()\n\n# create a basemap with limits of 2010-01-01 to 2020-06-01 on the x axis and\n# 0 to 10 on the y axis\nfig.basemap(\n projection=\"X15c/5c\",\n region=[datetime.date(2010, 1, 1), datetime.date(2020, 6, 1), 0, 10],\n frame=[\"WSen\", \"af\"],\n)\n\n# numpy.datetime64 types\nx = np.array(\n [\"2010-06-01\", \"2011-06-01T12\", \"2012-01-01T12:34:56\"], dtype=np.datetime64\n)\ny = [1, 2, 3]\nfig.plot(x=x, y=y, style=\"c0.4c\", pen=\"1p\", fill=\"red3\")\n\n# pandas.DatetimeIndex\nx = pd.date_range(\"2013\", periods=3, freq=\"YS\")\ny = [4, 5, 6]\nfig.plot(x=x, y=y, style=\"t0.4c\", pen=\"1p\", fill=\"gold\")\n\n# xarray.DataArray\nx = xr.DataArray(data=pd.date_range(start=\"2015-03\", periods=3, freq=\"QS\"))\ny = [7.5, 6, 4.5]\nfig.plot(x=x, y=y, style=\"s0.4c\", pen=\"1p\")\n\n# raw datetime strings\nx = [\"2016-02-01\", \"2016-06-04T14\", \"2016-10-04T00:00:15\"]\ny = [7, 8, 9]\nfig.plot(x=x, y=y, style=\"a0.4c\", pen=\"1p\", fill=\"dodgerblue\")\n\n# the Python built-in datetime and date\nx = [datetime.date(2018, 1, 1), datetime.datetime(2019, 6, 1, 20, 5, 45)]\ny = [6.5, 4.5]\nfig.plot(x=x, y=y, style=\"i0.4c\", pen=\"1p\", fill=\"seagreen\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/23c5f0182e128675274eda1c66e0bbd1/linestyles.ipynb b/v0.14.0/_downloads/23c5f0182e128675274eda1c66e0bbd1/linestyles.ipynb new file mode 100644 index 00000000000..3ee6de71e7c --- /dev/null +++ b/v0.14.0/_downloads/23c5f0182e128675274eda1c66e0bbd1/linestyles.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Line styles\n\nThe :meth:`pygmt.Figure.plot` method can plot lines in different styles.\nThe default line style is a 0.25-point wide, black, solid line, and can be\ncustomized with the ``pen`` parameter.\n\nA *pen* in GMT has three attributes: *width*, *color*, and *style*.\nThe *style* attribute controls the appearance of the line.\nGiving ``\"dotted\"`` or ``\".\"`` yields a dotted line, whereas a dashed pen is\nrequested with ``\"dashed\"`` or ``\"-\"``. Also combinations of dots and dashes,\nlike ``\".-\"`` for a dot-dashed line, are allowed.\n\nFor more advanced *pen* attributes, see the GMT Technical Reference\n:gmt-docs:`reference/features.html#wpen-attrib`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Generate a two-point line for plotting\nx = np.array([0, 7])\ny = np.array([9, 9])\n\nfig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 10], projection=\"X15c/8c\", frame=\"+tLine Styles\")\n\n# Plot the line using the default line style\nfig.plot(x=x, y=y)\nfig.text(x=x[-1], y=y[-1], text=\"solid (default)\", justify=\"ML\", offset=\"0.2c/0c\")\n\n# Plot the line using different line styles\nfor linestyle in [\n \"1p,red,-\", # dashed line\n \"1p,blue,.\", # dotted line\n \"1p,lightblue,-.\", # dash-dotted line\n \"2p,blue,..-\", # dot-dot-dashed line\n \"2p,tomato,--.\", # dash-dash-dotted line\n # A pattern of 4-point-long line segments and 2-point-long gaps between\n # segments, with pattern offset by 2 points from the origin\n \"2p,tomato,4_2:2p\",\n]:\n y -= 1 # Move the current line down\n fig.plot(x=x, y=y, pen=linestyle)\n fig.text(x=x[-1], y=y[-1], text=linestyle, justify=\"ML\", offset=\"0.2c/0c\")\n\n# Plot the line like a railway track (black/white).\n# The trick here is plotting the same line twice but with different line styles\ny -= 1 # move the current line down\nfig.plot(x=x, y=y, pen=\"5p,black\")\nfig.plot(x=x, y=y, pen=\"4p,white,20p_20p\")\nfig.text(x=x[-1], y=y[-1], text=\"5p,black\", justify=\"ML\", offset=\"0.2c/0.2c\")\nfig.text(x=x[-1], y=y[-1], text=\"4p,white,20p_20p\", justify=\"ML\", offset=\"0.2c/-0.2c\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/248a9f3a51a8555d27d5ce657f90f1f2/histogram.zip b/v0.14.0/_downloads/248a9f3a51a8555d27d5ce657f90f1f2/histogram.zip new file mode 100644 index 00000000000..aa135f99036 Binary files /dev/null and b/v0.14.0/_downloads/248a9f3a51a8555d27d5ce657f90f1f2/histogram.zip differ diff --git a/v0.14.0/_downloads/2781d849b64e1dbc5e3f68e987513f45/azim_general_stereographic.zip b/v0.14.0/_downloads/2781d849b64e1dbc5e3f68e987513f45/azim_general_stereographic.zip new file mode 100644 index 00000000000..efb554ac5b1 Binary files /dev/null and b/v0.14.0/_downloads/2781d849b64e1dbc5e3f68e987513f45/azim_general_stereographic.zip differ diff --git a/v0.14.0/_downloads/29ea8d0bf6fbe57cd57e12a636ee5dfc/azim_lambert.py b/v0.14.0/_downloads/29ea8d0bf6fbe57cd57e12a636ee5dfc/azim_lambert.py new file mode 100644 index 00000000000..3d797ecf31f --- /dev/null +++ b/v0.14.0/_downloads/29ea8d0bf6fbe57cd57e12a636ee5dfc/azim_lambert.py @@ -0,0 +1,30 @@ +r""" +Lambert azimuthal equal-area projection +======================================= + +This projection was developed by Johann Heinrich Lambert in 1772 and is +typically used for mapping large regions like continents and hemispheres. It is +an azimuthal, equal-area projection, but is not perspective. Distortion is zero +at the center of the projection, and increases radially away from this point. + +**a**\ *lon0/lat0*\ [*/horizon*\ ]\ */scale* +or **A**\ *lon0/lat0*\ [*/horizon*\ ]\ */width* + +**a** or **A** specifies the projection type, and *lon0/lat0* specifies the +projection center, *horizon* specifies the maximum distance from projection +center (in degrees, <= 180, default 90), and *scale* or *width* sets the size +of the figure. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.coast( + region="g", + projection="A30/-20/60/12c", + frame="afg", + land="khaki", + water="white", +) +fig.show() diff --git a/v0.14.0/_downloads/2a9f19492ec280ed5e77e23955db5342/misc_eckertIV.zip b/v0.14.0/_downloads/2a9f19492ec280ed5e77e23955db5342/misc_eckertIV.zip new file mode 100644 index 00000000000..d5ac7a70e92 Binary files /dev/null and b/v0.14.0/_downloads/2a9f19492ec280ed5e77e23955db5342/misc_eckertIV.zip differ diff --git a/v0.14.0/_downloads/2b5f9ff6b32d6612152473360ed5b04f/3d_perspective_image.py b/v0.14.0/_downloads/2b5f9ff6b32d6612152473360ed5b04f/3d_perspective_image.py new file mode 100644 index 00000000000..b278e638290 --- /dev/null +++ b/v0.14.0/_downloads/2b5f9ff6b32d6612152473360ed5b04f/3d_perspective_image.py @@ -0,0 +1,101 @@ +""" +Creating a 3-D perspective image +================================ + +Create 3-D perspective image or surface mesh from a grid +using :meth:`pygmt.Figure.grdview`. +""" + +# %% +import pygmt + +# Load sample earth relief data +grid = pygmt.datasets.load_earth_relief(resolution="10m", region=[-108, -103, 35, 40]) + +# %% +# The :meth:`pygmt.Figure.grdview` method takes the ``grid`` input. +# The ``perspective`` parameter changes the azimuth and elevation of the +# viewpoint; the default is [180, 90], which is looking directly down on the +# figure and north is "up". The ``zsize`` parameter sets how tall the +# three-dimensional portion appears. +# +# The default grid surface type is *mesh plot*. + +fig = pygmt.Figure() +fig.grdview( + grid=grid, + # Sets the view azimuth as 130 degrees, and the view elevation as 30 + # degrees + perspective=[130, 30], + # Sets the x- and y-axis labels, and annotates the west, south, and east + # axes + frame=["xa", "ya", "WSnE"], + # Sets a Mercator projection on a 15-centimeter figure + projection="M15c", + # Sets the height of the three-dimensional relief at 1.5 centimeters + zsize="1.5c", +) +fig.show() + +# %% +# The grid surface type can be set with the ``surftype`` parameter. +# The default CPT is *turbo* and can be customized with the ``cmap`` parameter. + +fig = pygmt.Figure() +fig.grdview( + grid=grid, + perspective=[130, 30], + frame=["xa", "yaf", "WSnE"], + projection="M15c", + zsize="1.5c", + # Set the surftype to "surface" + surftype="s", + # Set the CPT to "geo" + cmap="geo", +) +fig.show() + +# %% +# The ``plane`` parameter sets the elevation and color of a plane that provides +# a fill below the surface relief. + +fig = pygmt.Figure() +fig.grdview( + grid=grid, + perspective=[130, 30], + frame=["xa", "yaf", "WSnE"], + projection="M15c", + zsize="1.5c", + surftype="s", + cmap="geo", + # Set the plane elevation to 1,000 meters and make the fill "gray" + plane="1000+ggray", +) +fig.show() + +# %% +# The ``perspective`` azimuth can be changed to set the direction that is "up" +# in the figure. The ``contourpen`` parameter sets the pen used to draw contour +# lines on the surface. :meth:`pygmt.Figure.colorbar` can be used to add a +# color bar to the figure. The ``cmap`` parameter does not need to be passed +# again. To keep the color bar's alignment similar to the figure, use ``True`` +# as argument for the ``perspective`` parameter. + +fig = pygmt.Figure() +fig.grdview( + grid=grid, + # Set the azimuth to -130 (230) degrees and the elevation to 30 degrees + perspective=[-130, 30], + frame=["xaf", "yaf", "WSnE"], + projection="M15c", + zsize="1.5c", + surftype="s", + cmap="geo", + plane="1000+ggrey", + # Set the contour pen thickness to "0.1p" + contourpen="0.1p", +) +fig.colorbar(perspective=True, frame=["a500", "x+lElevation", "y+lm"]) +fig.show() + +# sphinx_gallery_thumbnail_number = 4 diff --git a/v0.14.0/_downloads/2b6497136df6e467283339e99a7deb0d/01_first_figure.py b/v0.14.0/_downloads/2b6497136df6e467283339e99a7deb0d/01_first_figure.py new file mode 100644 index 00000000000..c7d692514c4 --- /dev/null +++ b/v0.14.0/_downloads/2b6497136df6e467283339e99a7deb0d/01_first_figure.py @@ -0,0 +1,180 @@ +""" +1. Making your first figure +=========================== + +This tutorial covers the basics of creating a figure using PyGMT - a +Python wrapper for the Generic Mapping Tools (GMT). It will only use +the :meth:`pygmt.Figure.coast` method for plotting. Later tutorials will +address other PyGMT methods. +""" + +# %% +# Loading the library +# ------------------- +# +# The first step is to import :mod:`pygmt`. All methods and figure generation +# are accessible from the :mod:`pygmt` top level package. + +import pygmt + +# %% +# Creating a figure +# ----------------- +# +# All figure generation in PyGMT is handled by the :class:`pygmt.Figure` class. +# Start a new figure by creating an instance of this class: + +fig = pygmt.Figure() + +# %% +# To add elements to the figure instance or object (``fig`` in this example) +# different methods can be called on it. This example will use the +# :meth:`pygmt.Figure.coast` method, which can be used to create a map without +# any other methods or external data. The :meth:`pygmt.Figure.coast` +# method plots the coastlines, borders, and bodies of water using a database +# that is included in GMT. +# +# First, a region for the figure must be selected. This example will plot some +# of the coast of Maine in the northeastern US. A Python list can be passed to +# the ``region`` parameter with the minimum and maximum X-values (longitude) +# and the minimum and maximum Y-values (latitude). For this example, the +# minimum (bottom left) coordinates are (N43.75, W69) and the maximum (top +# right) coordinates are (N44.75, W68). Negative values can be passed for +# latitudes in the southern hemisphere or longitudes in the western hemisphere. +# +# In addition to the region, an argument needs to be passed to +# :meth:`pygmt.Figure.coast` to tell it what to plot. In this example, +# :meth:`pygmt.Figure.coast` will be told to plot the shorelines by passing the +# Boolean value ``True`` to the ``shorelines`` parameter. The ``shorelines`` +# parameter has other options for finer control, but setting it to ``True`` +# uses the default values. + +fig.coast(region=[-69, -68, 43.75, 44.75], shorelines=True) + +# %% +# To see the figure, call :meth:`pygmt.Figure.show`. + +fig.show() + + +# %% +# Color the land and water +# ------------------------ +# +# This figure plots all of the coastlines in the given region, but it does not +# indicate where the land and water are. Color values can be passed to ``land`` +# and ``water`` to set the colors on the figure. +# +# When plotting colors in PyGMT, there are multiple +# :gmt-docs:`color codes `, that can be used. This includes +# standard GMT color names (like ``"skyblue"``), R/G/B levels (like +# ``"0/0/255"``), a hex value (like ``"#333333"``), or a gray level (like +# ``"gray50"``). For this example, GMT color names are used. + +fig = pygmt.Figure() +fig.coast( + region=[-69, -68, 43.75, 44.75], + shorelines=True, + land="lightgreen", + water="lightblue", +) +fig.show() + + +# %% +# Set the projection +# ------------------ +# +# This figure now has its colors set. By default the projection and size +# of the map is set to ``"Q15c+du"``. Here, ``"Q"`` defines a +# cylindrical equidistant map projection, ``"15c+du"`` means setting +# the maximum (upper) map dimension to 15 cm. However, both of +# these values can be customized according to the requirements using +# the ``projection`` parameter. +# +# The appropriate projection varies for the type of map. The available +# projections are explained in the :doc:`projection ` +# gallery. For this example, the Mercator projection is set using ``"M"``. +# The width of the figure will be 10 centimeters, as set by ``"10c"``. +# The map size can also be set in inches using "i" (e.g. a 5-inch wide +# Mercator projection would use ``"M5i"``). + +fig = pygmt.Figure() +fig.coast( + region=[-69, -68, 43.75, 44.75], + shorelines=True, + land="lightgreen", + water="lightblue", + projection="M10c", +) +fig.show() + + +# %% +# Add a frame +# ----------- +# +# While the map's colors, projection, and size have been set, the region +# that is being displayed is not apparent. A frame can be added to +# annotate the latitude and longitude of the region. +# +# The ``frame`` parameter is used to add a frame to the figure. For now, it +# will be set to ``"a"`` to **a**\ nnotate the axes automatically. + +fig = pygmt.Figure() +fig.coast( + region=[-69, -68, 43.75, 44.75], + shorelines=True, + land="lightgreen", + water="lightblue", + projection="M10c", + frame="a", +) +fig.show() + + +# %% +# Add a title +# ----------- +# +# The ``frame`` parameter can be used to add a title to the figure. The title +# is set by passing ``"+t"`` followed by the title (e.g. setting the map +# title to "Title" would be ``"+tTitle"``). +# +# To pass multiple arguments to ``frame``, a list can be used, as shown in the +# example below. This format uses ``frame`` to set both the axes annotations +# and the figure title. + +fig = pygmt.Figure() +fig.coast( + region=[-69, -68, 43.75, 44.75], + shorelines=True, + land="lightgreen", + water="lightblue", + projection="M10c", + frame=["a", "+tMaine"], +) +fig.show() + + +# %% +# Additional exercises +# -------------------- +# +# This is the end of the first tutorial. Here are some additional exercises +# for the concepts that were discussed: +# +# 1. Make a map of Germany using its ISO country code ("DE"). Pass the ISO +# code as a Python string to the ``region`` parameter. +# +# 2. Change the color of the landmass to "khaki" and the water to "azure". +# +# 3. Change the color of the lakes (using the ``lakes`` parameter) to "red". +# +# 4. Create a global map. Set the region to "d" to center the map at the Prime +# Meridian or "g" to center the map at the International Date Line. When the +# region is set without using a list full of integers or floating numbers, +# the argument needs to be passed as a Python string. Create a map with a +# width of 15 centimeters using the Mollweide ("W") projection. + +# sphinx_gallery_thumbnail_number = 4 diff --git a/v0.14.0/_downloads/2b8a82d76c35416f3a74c64ff3f09f72/scatter.zip b/v0.14.0/_downloads/2b8a82d76c35416f3a74c64ff3f09f72/scatter.zip new file mode 100644 index 00000000000..1188dc98ab3 Binary files /dev/null and b/v0.14.0/_downloads/2b8a82d76c35416f3a74c64ff3f09f72/scatter.zip differ diff --git a/v0.14.0/_downloads/2b8b6053ecb8861eaa4976e5c41ee03f/cyl_mercator.zip b/v0.14.0/_downloads/2b8b6053ecb8861eaa4976e5c41ee03f/cyl_mercator.zip new file mode 100644 index 00000000000..48cac966619 Binary files /dev/null and b/v0.14.0/_downloads/2b8b6053ecb8861eaa4976e5c41ee03f/cyl_mercator.zip differ diff --git a/v0.14.0/_downloads/2bce6de666bf8cf98d11d6eb23cd1fbd/insets.py b/v0.14.0/_downloads/2bce6de666bf8cf98d11d6eb23cd1fbd/insets.py new file mode 100644 index 00000000000..5be807c78a9 --- /dev/null +++ b/v0.14.0/_downloads/2bce6de666bf8cf98d11d6eb23cd1fbd/insets.py @@ -0,0 +1,115 @@ +""" +Adding an inset to the figure +============================= + +To plot an inset figure inside another larger figure, we can use the +:meth:`pygmt.Figure.inset` method. After a large figure has been created, +call ``inset`` using a ``with`` statement, and new plot elements will be +added to the inset figure instead of the larger figure. +""" + +# %% +import pygmt + +# %% +# Prior to creating an inset figure, a larger figure must first be plotted. In +# the example below, :meth:`pygmt.Figure.coast` is used to create a map of the +# US state of Massachusetts. + +fig = pygmt.Figure() +fig.coast( + region=[-74, -69.5, 41, 43], # Set bounding box of the large figure + borders="2/thin", # Plot state boundaries with thin lines + shorelines="thin", # Plot coastline with thin lines + projection="M15c", # Set Mercator projection and size of 15 centimeter + land="lightyellow", # Color land areas light yellow + water="lightblue", # Color water areas light blue + frame="a", # Set frame with annotation and major tick spacing +) +fig.show() + +# %% +# The :meth:`pygmt.Figure.inset` method uses a context manager, and is called +# using a ``with`` statement. The ``position`` parameter, including the inset +# width, is required to plot the inset. Using the **j** modifier, the location +# of the inset is set to one of the 9 anchors (Top - Middle - Bottom and Left - +# Center - Right). In the example below, ``BL`` places the inset at the Bottom +# Left corner. The ``box`` parameter can set the fill and border of the inset. +# In the example below, ``+pblack`` sets the border color to black and +# ``+glightred`` sets the fill to light red. + +fig = pygmt.Figure() +fig.coast( + region=[-74, -69.5, 41, 43], + borders="2/thin", + shorelines="thin", + projection="M15c", + land="lightyellow", + water="lightblue", + frame="a", +) +with fig.inset(position="jBL+w3c", box="+pblack+glightred"): + # pass is used to exit the with statement as no plotting methods are + # called + pass +fig.show() + +# %% +# When using **j** to set the anchor of the inset, the default location is in +# contact with the nearby axis or axes. The offset of the inset can be set with +# **+o**, followed by the offsets along the x- and y-axis. If only one offset +# is passed, it is applied to both axes. Each offset can have its own unit. In +# the example below, the inset is shifted 0.5 centimeters on the x-axis and +# 0.2 centimeters on the y-axis. + +fig = pygmt.Figure() +fig.coast( + region=[-74, -69.5, 41, 43], + borders="2/thin", + shorelines="thin", + projection="M15c", + land="lightyellow", + water="lightblue", + frame="a", +) +with fig.inset(position="jBL+w3c+o0.5c/0.2c", box="+pblack+glightred"): + pass +fig.show() + +# %% +# Standard plotting methods can be called from within the ``inset`` context +# manager. The example below uses :meth:`pygmt.Figure.coast` to plot a zoomed +# out map that selectively paints the state of Massachusetts to show its +# location relative to other states. + +fig = pygmt.Figure() +fig.coast( + region=[-74, -69.5, 41, 43], + borders="2/thin", + shorelines="thin", + projection="M15c", + land="lightyellow", + water="lightblue", + frame="a", +) +# This does not include an inset fill as it is covered by the inset figure +# Inset width/height are determined by the ``region`` and ``projection`` +# parameters. +with fig.inset( + position="jBL+o0.5c/0.2c", + box="+pblack", + region=[-80, -65, 35, 50], + projection="M3c", +): + # Use a plotting method to create a figure inside the inset. + fig.coast( + land="gray", + borders=[1, 2], + shorelines="1/thin", + water="white", + # Use dcw to selectively highlight an area + dcw="US.MA+gred", + ) +fig.show() + +# sphinx_gallery_thumbnail_number = 4 diff --git a/v0.14.0/_downloads/2d252d210a4d44c1d34d47643b611e9d/contour_map.ipynb b/v0.14.0/_downloads/2d252d210a4d44c1d34d47643b611e9d/contour_map.ipynb new file mode 100644 index 00000000000..162d0aa35b3 --- /dev/null +++ b/v0.14.0/_downloads/2d252d210a4d44c1d34d47643b611e9d/contour_map.ipynb @@ -0,0 +1,133 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Creating a map with contour lines\n\nPlotting a contour map is handled by :meth:`pygmt.Figure.grdcontour`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\n# Load sample earth relief data\ngrid = pygmt.datasets.load_earth_relief(resolution=\"05m\", region=[-92.5, -82.5, -3, 7])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Create contour plot\n\nThe :meth:`pygmt.Figure.grdcontour` method takes the grid input. It plots annotated\ncontour lines, which are thicker and have the elevation/depth written on them, and\nunannotated contour lines. In the example below, the default contour line intervals\nare 500 meters, with an annotated contour line every 1,000 meters. By default, it\nplots the map with the equidistant cylindrical projection and with no frame.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdcontour(grid=grid)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Contour line settings\n\nUse the ``annotation`` and ``levels`` parameters to adjust contour line intervals. In\nthe example below, there are contour intervals every 250 meters and annotated contour\nlines every 1,000 meters.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdcontour(grid=grid, annotation=1000, levels=250)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Contour limits\n\nThe ``limit`` parameter sets the minimum and maximum values for the contour lines. The\nparameter takes the low and high values, and is either a list (as below) or a string\n``limit=\"-4000/-2000\"``.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdcontour(grid=grid, annotation=1000, levels=250, limit=[-4000, -2000])\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Map settings\n\nThe :meth:`pygmt.Figure.grdcontour` method accepts additional parameters, including\nsetting the projection and frame.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdcontour(\n grid=grid,\n annotation=1000,\n levels=250,\n limit=[-4000, -2000],\n projection=\"M10c\",\n frame=True,\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Adding a colormap\n\nThe :meth:`pygmt.Figure.grdimage` method can be used to add a colormap to the contour\nmap. It must be called prior to :meth:`pygmt.Figure.grdcontour` to keep the contour\nlines visible on the final map. If the ``projection`` parameter is specified in the\n:meth:`pygmt.Figure.grdimage` method, it does not need to be repeated in the\n:meth:`pygmt.Figure.grdcontour` method. Finally, a colorbar is added using the\n:meth:`pygmt.Figure.colorbar` method.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdimage(grid=grid, cmap=\"haxby\", projection=\"M10c\", frame=True)\nfig.grdcontour(grid=grid, annotation=1000, levels=250, limit=[-4000, -2000])\nfig.colorbar(frame=[\"x+lelevation\", \"y+lm\"])\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/2d8382947bea6fe60242316ba5af388e/linefronts.ipynb b/v0.14.0/_downloads/2d8382947bea6fe60242316ba5af388e/linefronts.ipynb new file mode 100644 index 00000000000..51ce58b4025 --- /dev/null +++ b/v0.14.0/_downloads/2d8382947bea6fe60242316ba5af388e/linefronts.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Line fronts\n\nUsing the :meth:`pygmt.Figure.plot` method you can draw a so-called\n*front* which allows to plot specific symbols distributed along a line\nor curve. Typical use cases are weather fronts, fault lines,\nsubduction zones, and more. To draw general symbols along a line or\ncurve, i.e., a so-called *decorated line*, see the\n:doc:`Decorated lines example `.\n\nA front can be drawn by passing **f**\\[\u00b1]\\ *gap*\\[/*size*] to the ``style``\nparameter where *gap* defines the distance gap between the symbols and\n*size* the symbol size. If *gap* is negative, it is interpreted to mean\nthe number of symbols along the front instead. If *gap* has a leading +\nthen we use the value exactly as given [Default will start and end each\nline with a symbol, hence the *gap* is adjusted to fit]. If *size* is\nmissing it is set to 30% of the *gap*, except when *gap* is negative\nand *size* is thus required. Append **+l** or **+r** to plot symbols on\nthe left or right side of the front [Default is centered]. Append\n**+**\\ *type* to specify which symbol to plot: **b**\\ ox, **c**\\ ircle,\n**f**\\ ault [Default], **s**\\ lip, or **t**\\ riangle. Slip means left-lateral\nor right-lateral strike-slip arrows (centered is not an option). The **+s**\nmodifier optionally accepts the angle used to draw the vector [Default is\n20 degrees]. Alternatively, use **+S** which draws arcuate arrow heads.\nAppend **+o**\\ *offset* to offset the first symbol from the beginning of\nthe front by that amount [Default is 0]. The chosen symbol is drawn with\nthe same pen as set for the line (i.e., via the ``pen`` parameter). To use\nan alternate pen, append **+p**\\ *pen*. To skip the outline, just use\n**+p** with no argument. To make the main front line invisible, add **+i**.\nFor modifying the main front line via the ``pen`` parameter, see the\n:doc:`Line styles example `.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Generate a two-point line for plotting\nx = np.array([1, 4])\ny = np.array([20, 20])\n\nfig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 20], projection=\"X15c/15c\", frame=\"+tLine Fronts\")\n\n# Plot the line using different front styles\nfor frontstyle in [\n # line with \"faults\" front style, same as +f [Default]\n \"f1c/0.25c\",\n # line with box front style\n \"f1c/0.25c+b\",\n # line with circle front style\n \"f1c/0.25c+c\",\n # line with triangle front style\n \"f1c/0.3c+t\",\n # line with left-lateral (\"+l\") slip (\"+s\") front style, angle is set to\n # 45 degrees and offset to 2.25 cm\n \"f5c/1c+l+s45+o2.25c\",\n # line with \"faults\" front style, symbols are plotted on the left side of\n # the front\n \"f1c/0.4c+l\",\n # line with box front style, symbols are plotted on the left side of the\n # front\n \"f1c/0.3c+l+b\",\n # line with circle front style, symbols are plotted on the right side of\n # the front\n \"f1c/0.4c+r+c\",\n # line with triangle front style, symbols are plotted on the left side of\n # the front\n \"f1c/0.3c+l+t\",\n # line with triangle front style, symbols are plotted on the right side of\n # the front, use other pen for the outline of the symbol\n \"f1c/0.4c+r+t+p1.5p,dodgerblue\",\n # line with triangle front style, symbols are plotted on the right side of\n # the front and offset is set to 0.3 cm, skip the outline\n \"f0.5c/0.3c+r+t+o0.3c+p\",\n # line with triangle front style, symbols are plotted on the right side of\n # the front and offset is set to 0.3 cm, skip the outline and make the main\n # front line invisible\n \"f0.5c/0.3c+r+t+o0.3c+p+i\",\n]:\n y -= 1 # move the current line down\n fig.plot(x=x, y=y, pen=\"1.25p\", style=frontstyle, fill=\"red3\")\n fig.text(\n x=x[-1],\n y=y[-1],\n text=frontstyle,\n font=\"Courier-Bold\",\n justify=\"ML\",\n offset=\"0.75c/0c\",\n )\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/2e8ca6e18fbe054c616c248ec9403902/grid_equalization.zip b/v0.14.0/_downloads/2e8ca6e18fbe054c616c248ec9403902/grid_equalization.zip new file mode 100644 index 00000000000..afc6ff426c4 Binary files /dev/null and b/v0.14.0/_downloads/2e8ca6e18fbe054c616c248ec9403902/grid_equalization.zip differ diff --git a/v0.14.0/_downloads/2fb2ed8414b2d729f8f6010cb9742d9f/rgb_image.py b/v0.14.0/_downloads/2fb2ed8414b2d729f8f6010cb9742d9f/rgb_image.py new file mode 100644 index 00000000000..56d7b9d2f70 --- /dev/null +++ b/v0.14.0/_downloads/2fb2ed8414b2d729f8f6010cb9742d9f/rgb_image.py @@ -0,0 +1,43 @@ +""" +RGB image +========= + +The :meth:`pygmt.Figure.grdimage` method can be used to plot Red, Green, Blue +(RGB) images, or any 3-band false color combination. Here, we'll use +:py:func:`rioxarray.open_rasterio` to read a GeoTIFF file into an +:class:`xarray.DataArray` format, and plot it on a map. + +The example below shows a Worldview 2 satellite image over +`Lāhainā, Hawaiʻi during the August 2023 wildfires +`_. +Data is sourced from a Cloud-Optimized GeoTIFF (COG) file hosted on +`OpenAerialMap `_ under a +`CC BY-NC 4.0 `_ license. +""" # noqa: RUF002 + +# %% +import pygmt +import rioxarray + +# %% +# Read 3-band data from GeoTIFF into an xarray.DataArray object: +with rioxarray.open_rasterio( + filename="https://oin-hotosm.s3.us-east-1.amazonaws.com/64d6a49a19cb3a000147a65b/0/64d6a49a19cb3a000147a65c.tif", + overview_level=5, +) as img: + # Subset to area of Lāhainā in EPSG:32604 coordinates + image = img.rio.clip_box(minx=738000, maxx=755000, miny=2300000, maxy=2318000) + image = image.load() # Force loading the DataArray into memory +image # noqa: B018 + +# %% +# Plot the RGB imagery: +fig = pygmt.Figure() +with pygmt.config(FONT_TITLE="Times-Roman"): # Set title font to Times-Roman + fig.grdimage( + grid=image, + # Use a map scale where 1 cm on the map equals 1 km on the ground + projection="x1:100000", + frame=[r"WSne+tL@!a¯hain@!a¯, Hawai`i on 9 Aug 2023", "af"], + ) +fig.show() diff --git a/v0.14.0/_downloads/3035e7ce1c236b401e3f2b739c07bf35/conic_equidistant.py b/v0.14.0/_downloads/3035e7ce1c236b401e3f2b739c07bf35/conic_equidistant.py new file mode 100644 index 00000000000..55769d4b9c4 --- /dev/null +++ b/v0.14.0/_downloads/3035e7ce1c236b401e3f2b739c07bf35/conic_equidistant.py @@ -0,0 +1,29 @@ +r""" +Equidistant conic projection +============================ + +The equidistant conic projection was described by the Greek philosopher +Claudius Ptolemy about A.D. 150. It is neither conformal or equal-area, but +serves as a compromise between them. The scale is true along all meridians and +the standard parallels. + +**d**\ *lon0/lat0*\ /\ *lat1/lat2*\ */scale* +or **D**\ *lon0/lat0*\ /\ *lat1/lat2*\ */width* + +The projection is set with **d** or **D**. The projection center is set by +*lon0/lat0* and two standard parallels for the map are set with *lat1/lat2*. +The figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.coast( + region=[-88, -70, 18, 24], + projection="D-79/21/19/23/12c", + frame="afg", + land="seagreen", + water="gray90", +) +fig.show() diff --git a/v0.14.0/_downloads/3232ffd3655da7b0dc117781326c5db2/working_with_panel.py b/v0.14.0/_downloads/3232ffd3655da7b0dc117781326c5db2/working_with_panel.py new file mode 100644 index 00000000000..cf0786c3b5e --- /dev/null +++ b/v0.14.0/_downloads/3232ffd3655da7b0dc117781326c5db2/working_with_panel.py @@ -0,0 +1,148 @@ +""" +Interactive data visualization using ``Panel`` +============================================== + +.. note:: + + Please run the following code examples in a notebook environment + otherwise the interactive parts of this tutorial will not work. You can + use the button "Download Jupyter notebook" at the bottom of this page + to download this script as a Jupyter notebook. + +The library `Panel `__ can be used to +create interactive dashboards by connecting user-defined widgets to plots. +``Panel`` can be used as an extension to Jupyter notebook/lab. + +This tutorial is split into three parts: + +- Make a static map +- Make an interactive map +- Add a grid for Earth relief +""" + +# %% +# Import the required packages +import numpy as np +import panel as pn +import pygmt + +pn.extension() + + +# %% +# Make a static map +# ----------------- +# +# The `Orthographic projection +# `__ +# can be used to show the Earth as a globe. Land and water masses are +# filled with colors via the ``land`` and ``water`` parameters of +# :meth:`pygmt.Figure.coast`, respectively. Coastlines are added using the +# ``shorelines`` parameter. + +# Create a new instance or object of the pygmt.Figure() class +fig = pygmt.Figure() +fig.coast( + # Orthographic projection (G) with projection center at 0° East and + # 15° North and a width of 12 centimeters + projection="G0/15/12c", + region="g", # global + frame="g30", # Add frame and gridlines in steps of 30 degrees on top + land="gray", # Color land masses in "gray" + water="lightblue", # Color water masses in "lightblue" + # Add coastlines with a 0.25 points thick pen in "gray50" + shorelines="1/0.25p,gray50", +) +fig.show() + + +# %% +# Make an interactive map +# ----------------------- +# +# To generate a rotation of the Earth around the vertical axis, the central +# longitude of the Orthographic projection is varied iteratively in steps of +# 10 degrees. The library ``Panel`` is used to create an interactive dashboard +# with a slider (works only in a notebook environment, e.g., Jupyter notebook). + +# Create a slider +slider_lon = pn.widgets.DiscreteSlider( + name="Central longitude", # Give name for quantity shown at the slider + options=list(np.arange(0, 361, 10)), # Range corresponding to longitude + value=0, # Set start value +) + + +@pn.depends(central_lon=slider_lon) +def view(central_lon): + """ + Define a function for plotting the single slices. + """ + # Create a new instance or object of the pygmt.Figure() class + fig = pygmt.Figure() + fig.coast( + # Vary the central longitude used for the Orthographic projection + projection=f"G{central_lon}/15/12c", + region="g", + frame="g30", + land="gray", + water="lightblue", + shorelines="1/0.25p,gray50", + ) + return fig + + +# Make an interactive dashboard +pn.Column(slider_lon, view) + + +# %% +# Add a grid for Earth relief +# --------------------------- +# +# Instead of using colors as fill for the land and water masses a grid can be +# displayed. Here, the Earth relief is shown by color-coding the elevation. + +# Download a grid for Earth relief with a resolution of 10 arc-minutes +grd_relief = pygmt.datasets.load_earth_relief(resolution="10m") + +# Create a slider +slider_lon = pn.widgets.DiscreteSlider( + name="Central longitude", + options=list(np.arange(0, 361, 10)), + value=0, +) + + +@pn.depends(central_lon=slider_lon) +def view(central_lon): + """ + Define a function for plotting the single slices. + """ + # Create a new instance or object of the pygmt.Figure() class + fig = pygmt.Figure() + # Set up a colormap for the elevation in meters + pygmt.makecpt( + cmap="oleron", + # minimum, maximum, step + series=[int(grd_relief.data.min()) - 1, int(grd_relief.data.max()) + 1, 100], + ) + # Plot the grid for the elevation + fig.grdimage( + projection=f"G{central_lon}/15/12c", + region="g", + grid=grd_relief, # Use grid downloaded above + cmap=True, # Use colormap defined above + frame="g30", + ) + # Add a horizontal colorbar for the elevation + # with annotations (a) in steps of 2000 and ticks (f) in steps of 1000 + # and labels (+l) at the x-axis "Elevation" and y-axis "m" (meters) + fig.colorbar(frame=["a2000f1000", "x+lElevation", "y+lm"]) + return fig + + +# Make an interactive dashboard +pn.Column(slider_lon, view) + +# sphinx_gallery_thumbnail_number = 1 diff --git a/v0.14.0/_downloads/3316ce27d3234eb0ef1f49d830b9de03/rose.zip b/v0.14.0/_downloads/3316ce27d3234eb0ef1f49d830b9de03/rose.zip new file mode 100644 index 00000000000..99767687f90 Binary files /dev/null and b/v0.14.0/_downloads/3316ce27d3234eb0ef1f49d830b9de03/rose.zip differ diff --git a/v0.14.0/_downloads/332901e705d8531feab99f7f72779ab9/configuration.ipynb b/v0.14.0/_downloads/332901e705d8531feab99f7f72779ab9/configuration.ipynb new file mode 100644 index 00000000000..19ae2dd62b0 --- /dev/null +++ b/v0.14.0/_downloads/332901e705d8531feab99f7f72779ab9/configuration.ipynb @@ -0,0 +1,97 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Configuring PyGMT defaults\n\nDefault GMT parameters can be set globally or locally using :class:`pygmt.config`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Configuring default GMT parameters\n\nUsers can override default parameters either temporarily (locally) or permanently\n(globally) using :class:`pygmt.config`. The full list of default parameters that can\nbe changed can be found at :gmt-docs:`gmt.conf.html`.\n\nWe demonstrate the usage of :class:`pygmt.config` by configuring a map plot.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Start with a basic figure with the default style\nfig = pygmt.Figure()\nfig.basemap(region=[115, 119.5, 4, 7.5], projection=\"M10c\", frame=True)\nfig.coast(land=\"black\", water=\"skyblue\")\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Globally overriding defaults\n\nThe ``MAP_FRAME_TYPE`` parameter specifies the style of map frame to use, of which\nthere are 5 options: ``fancy`` (default, see above), ``fancy+``, ``plain``, ``graph``\n(which does not apply to geographical maps) and ``inside``.\n\nThe ``FORMAT_GEO_MAP`` parameter controls the format of geographical tick annotations.\nThe default uses degrees and minutes. Here we specify the ticks to be a decimal number\nof degrees.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\n# Configuration for the 'current figure'\npygmt.config(MAP_FRAME_TYPE=\"plain\")\npygmt.config(FORMAT_GEO_MAP=\"ddd.xx\")\n\nfig.basemap(region=[115, 119.5, 4, 7.5], projection=\"M10c\", frame=True)\nfig.coast(land=\"black\", water=\"skyblue\")\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Locally overriding defaults\n\nIt is also possible to temporarily override the default parameters, which is very\nuseful for limiting the scope of changes to a particular plot. :class:`pygmt.config`\nis implemented as a context manager, which handles the setup and teardown of a GMT\nsession. Python users are likely familiar with the ``with open(...) as file:``\nsnippet, which returns a ``file`` context manager. In this way, it can be used to\noverride a parameter for a single command, or a sequence of commands. An application\nof :class:`pygmt.config` as a context manager is shown below:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\n# This will have a fancy+ frame\nwith pygmt.config(MAP_FRAME_TYPE=\"fancy+\"):\n fig.basemap(region=[115, 119.5, 4, 7.5], projection=\"M10c\", frame=True)\nfig.coast(land=\"black\", water=\"skyblue\")\n\n# Shift plot origin down by the height of the figure to plot another map\nfig.shift_origin(yshift=\"-h\")\n\n# This figure retains the default \"fancy\" frame\nfig.basemap(region=[115, 119.5, 4, 7.5], projection=\"M10c\", frame=True)\nfig.coast(land=\"black\", water=\"skyblue\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/344862b1b1da957d9e3e32aff8613803/country_polygons.py b/v0.14.0/_downloads/344862b1b1da957d9e3e32aff8613803/country_polygons.py new file mode 100644 index 00000000000..78064a00316 --- /dev/null +++ b/v0.14.0/_downloads/344862b1b1da957d9e3e32aff8613803/country_polygons.py @@ -0,0 +1,99 @@ +""" +Highlight country, continent and state polygons +=============================================== + +The :meth:`pygmt.Figure.coast` method can highlight country polygons +via the ``dcw`` parameter. It accepts the country code or full +country name and can draw its borders and add a color to its landmass. +It's also possible to define multiple countries at once by separating +the individual names with commas. +""" + +# %% +import pygmt + +fig = pygmt.Figure() + +fig.coast( + region=[-12, 32, 34, 72], + # Lambert Azimuthal Equal Area lon0/lat0/horizon/width + projection="A10/52/25/6c", + land="gray", + water="white", + frame="afg", + dcw=[ + # Great Britain (country code) with seagreen land + "GB+gseagreen", + # Italy with a red border + "IT+p0.5p,red3", + # Spain with a magenta dashed border + "ES+p0.5p,magenta4,-", + # Romania with a black dotted border + "RO+p0.75p,black,.", + # Germany with orange land and a blue border + "DE+gorange+p0.5p,dodgerblue4", + # France (full country name) with a steelblue border + "France+p0.5p,steelblue", + # Norway, Sweden and Finland (multiple countries) with pink + # land and pink3 borders + "Norway,Sweden,Finland+gpink+p0.2p,pink3", + ], +) + +fig.show() + +# %% +# Entire continents can also be highlighted by adding ``"="`` in +# front of the continent code to differentiate it from a country code. + +fig = pygmt.Figure() + +fig.coast( + region="d", + projection="H10c", + land="gray", + water="white", + frame="afg", + dcw=[ + # Europe + "=EU+gseagreen", + # Africa + "=AF+gred3", + # North America + "=NA+gmagenta4", + # South America + "=SA+gorange", + # Asia + "=AS+gdodgerblue4", + # Oceania + "=OC+gtomato", + # Antarctica + "=AN+ggray30", + ], +) + +fig.show() + +# %% +# If available, states/territories of a country can be highlighted, too. + +fig = pygmt.Figure() + +fig.coast( + region=[-130, -70, 24, 52], + projection="L-100/35/33/45/12c", + land="gray", + shorelines="1/0.5p,gray30", + borders=["1/0.8p,gray30", "2/0.2p,gray30"], + frame=True, + dcw=[ + # Texas with orange fill + "US.TX+gorange", + # Kentucky with blue outline + "US.KY+p1p,blue", + ], +) + +fig.show() + +# sphinx_gallery_thumbnail_number = 1 diff --git a/v0.14.0/_downloads/3457e2906b6f77dc3b21f398d4af0504/multi_parameter_symbols.zip b/v0.14.0/_downloads/3457e2906b6f77dc3b21f398d4af0504/multi_parameter_symbols.zip new file mode 100644 index 00000000000..308b237d0aa Binary files /dev/null and b/v0.14.0/_downloads/3457e2906b6f77dc3b21f398d4af0504/multi_parameter_symbols.zip differ diff --git a/v0.14.0/_downloads/34baec1cb1e4c12a571f072b1a839512/polygons.py b/v0.14.0/_downloads/34baec1cb1e4c12a571f072b1a839512/polygons.py new file mode 100644 index 00000000000..edd90fea6d8 --- /dev/null +++ b/v0.14.0/_downloads/34baec1cb1e4c12a571f072b1a839512/polygons.py @@ -0,0 +1,100 @@ +""" +Plotting polygons +================= + +Plotting polygons is handled by the :meth:`pygmt.Figure.plot` method. + +This tutorial focuses on input data given as NumPy arrays. Besides NumPy arrays, +array-like objects are supported. Here, a polygon is a closed shape defined by a series +of data points with x and y coordinates, connected by line segments, with the start and +end points being identical. For plotting a :class:`geopandas.GeoDataFrame` object with +polygon geometries, e.g., to create a choropleth map, see the gallery example +:doc:`Choropleth map `. +""" + +# %% +import numpy as np +import pygmt + +# %% +# Plot polygons +# ------------- +# +# Set up sample data points as NumPy arrays for the x and y values. + +x = np.array([-2, 1, 3, 0, -4, -2]) +y = np.array([-3, -1, 1, 3, 2, -3]) + +# %% +# Create a Cartesian plot via the :meth:`pygmt.Figure.basemap` method. Pass arrays to +# the ``x`` and ``y`` parameters of the :meth:`pygmt.Figure.plot` method. Without +# further adjustments, lines are drawn between the data points. By default, the lines +# are 0.25-points thick, black, and solid. In this example, the data points are chosen +# to make the lines form a polygon. + +fig = pygmt.Figure() +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) +fig.plot(x=x, y=y) +fig.show() + +# %% +# The ``pen`` parameter can be used to adjust the lines or outline of the polygon. The +# argument passed to ``pen`` is one string with the comma-separated optional values +# *width*,\ *color*,\ *style*. + +fig = pygmt.Figure() +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) +# Use a 2-points thick, darkred, dashed outline +fig.plot(x=x, y=y, pen="2p,darkred,dashed") +fig.show() + +# %% +# Use the ``fill`` parameter to fill the polygon with a color or +# :doc:`pattern `. Note, that there are no lines drawn between the +# data points by default if ``fill`` is used. Use the ``pen`` parameter to add an +# outline around the polygon. + +fig = pygmt.Figure() +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) +# Fill the polygon with color "orange" +fig.plot(x=x, y=y, fill="orange") +fig.show() + + +# %% +# Close polygons +# -------------- +# +# Set up sample data points as NumPy arrays for the x and y values. Now, the data points +# do not form a polygon. + +x = np.array([-2, 1, 3, 0, -4]) +y = np.array([-3, -1, 1, 3, 2]) + +# %% +# The ``close`` parameter can be used to force the polygon to be closed. + +fig = pygmt.Figure() +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) +fig.plot(x=x, y=y, pen=True) + +fig.shift_origin(xshift="w+1c") + +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) +fig.plot(x=x, y=y, pen=True, close=True) +fig.show() + +# %% +# When using the ``fill`` parameter, the polygon is automatically closed. + +fig = pygmt.Figure() +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) +fig.plot(x=x, y=y, pen=True) + +fig.shift_origin(xshift="w+1c") + +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) +fig.plot(x=x, y=y, pen=True, fill="orange") +fig.show() + +# sphinx_gallery_thumbnail_number = 5 diff --git a/v0.14.0/_downloads/351dc1bee8d417d319137b57bdf71bc3/text.zip b/v0.14.0/_downloads/351dc1bee8d417d319137b57bdf71bc3/text.zip new file mode 100644 index 00000000000..9b8eb8a4907 Binary files /dev/null and b/v0.14.0/_downloads/351dc1bee8d417d319137b57bdf71bc3/text.zip differ diff --git a/v0.14.0/_downloads/353ac7722f4506702a0255fb710d1dbf/points_categorical.zip b/v0.14.0/_downloads/353ac7722f4506702a0255fb710d1dbf/points_categorical.zip new file mode 100644 index 00000000000..70deb284b41 Binary files /dev/null and b/v0.14.0/_downloads/353ac7722f4506702a0255fb710d1dbf/points_categorical.zip differ diff --git a/v0.14.0/_downloads/357bdc82d493a207d0121890a6b2b9b6/cartesian_linear.ipynb b/v0.14.0/_downloads/357bdc82d493a207d0121890a6b2b9b6/cartesian_linear.ipynb new file mode 100644 index 00000000000..7ba0e5e67c4 --- /dev/null +++ b/v0.14.0/_downloads/357bdc82d493a207d0121890a6b2b9b6/cartesian_linear.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Cartesian linear\n\n**X**\\ *width*\\ [/*height*] or **x**\\ *x-scale*\\ [/*y-scale*]\n\nGive the *width* of the figure and the optional *height*. The lower-case version\n**x** is similar to **X** but expects an *x-scale* and an optional *y-scale*.\n\nThe Cartesian linear projection is primarily designed for regular floating point\ndata. To plot geographical data in a linear projection, see the upstream GMT\ndocumentation :gmt-docs:`Geographic coordinates\n`.\nTo make the linear plot using calendar date/time as input coordinates, see the\ntutorial :doc:`Plotting datetime charts `.\nGMT documentation :gmt-docs:`Calendar time coordinates\n`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# The region parameter is specified as x_min, x_max, y_min, y_max\nfig.basemap(region=[0, 10, 0, 50], projection=\"X15c/10c\", frame=[\"afg\", \"+gbisque\"])\nfig.plot(x=[3, 9, 2], y=[4, 9, 37], pen=\"2p,black\")\n# Plot data points on top of the line\n# Use squares with a size of 0.3 centimeters, an \"orange\" fill and a \"black\" outline\nfig.plot(x=[3, 9, 2], y=[4, 9, 37], style=\"s0.3c\", fill=\"orange\", pen=\"black\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/360582360661706ee4bf9ac5952e0d4e/timestamp.py b/v0.14.0/_downloads/360582360661706ee4bf9ac5952e0d4e/timestamp.py new file mode 100644 index 00000000000..f8a853b9b72 --- /dev/null +++ b/v0.14.0/_downloads/360582360661706ee4bf9ac5952e0d4e/timestamp.py @@ -0,0 +1,37 @@ +""" +Timestamp +========= + +The :meth:`pygmt.Figure.timestamp` method can draw the GMT timestamp logo on the plot. +The timestamp will always be shown relative to the Bottom Left (BL) corner of the plot. +By default, the ``offset`` and ``justify`` parameters are set to ``("-54p", "-54p")`` +(x, y directions) and ``"BL"`` (Bottom Left), respectively. +""" + +# %% +import os + +import pygmt + +fig = pygmt.Figure() +fig.basemap(region=[20, 30, -10, 10], projection="X10c/5c", frame=True) +fig.timestamp() +fig.show() + +# %% +# Additionally, a custom label can be added via the ``label`` parameter. The font can be +# defined via the ``font`` parameter and the timestamp string format via ``timefmt``. + +os.environ["TZ"] = "Pacific/Honolulu" # optionally set the time zone + +fig = pygmt.Figure() +fig.coast(region="d", projection="H10c", land="black", water="cornsilk", frame="afg") +fig.timestamp( + label="Powered by PyGMT", + justify="TL", + font="Times-Bold", + timefmt="%Y-%m-%dT%H:%M:%S%z", +) +fig.show() + +# sphinx_gallery_thumbnail_number = 2 diff --git a/v0.14.0/_downloads/3768df33f78ba75095ebc52337213213/cross_section.ipynb b/v0.14.0/_downloads/3768df33f78ba75095ebc52337213213/cross_section.ipynb new file mode 100644 index 00000000000..c1360679675 --- /dev/null +++ b/v0.14.0/_downloads/3768df33f78ba75095ebc52337213213/cross_section.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Cross-section along a transect\n\n:func:`pygmt.project` and :func:`pygmt.grdtrack` can be used to focus on a quantity and\nits variation along a desired survey line. In this example, the elevation is extracted\nfrom a grid provided via :func:`pygmt.datasets.load_earth_relief`. The figure consists\nof two parts, a map of the elevation in the study area showing the survey line and a\nCartesian plot showing the elevation along the survey line.\n\n*This example is orientated on an example in the GMT/China documentation*:\nhttps://docs.gmt-china.org/latest/examples/ex026/\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\n# Define region of study area\n# lon_min, lon_max, lat_min, lat_max in degrees East and North\nregion_map = [122, 149, 30, 49]\n\n# Create a new pygmt.Figure instance\nfig = pygmt.Figure()\n\n# ----------------------------------------------------------------------------\n# Bottom: Map of elevation in study area\n\n# Set up basic map using a Mercator projection with a width of 12 centimeters\nfig.basemap(region=region_map, projection=\"M12c\", frame=\"af\")\n\n# Download grid for Earth relief with a resolution of 10 arc-minutes and gridline\n# registration [Default]\ngrid_map = pygmt.datasets.load_earth_relief(resolution=\"10m\", region=region_map)\n\n# Plot the downloaded grid with color-coding based on the elevation\nfig.grdimage(grid=grid_map, cmap=\"oleron\")\n\n# Add a colorbar for the elevation\nfig.colorbar(\n # Place the colorbar inside the plot (lower-case \"j\") in the Bottom Right (BR)\n # corner with an offset (\"+o\") of 0.7 centimeters and 0.3 centimeters in x or y\n # directions, respectively; move the x label above the horizontal colorbar (\"+ml\")\n position=\"jBR+o0.7c/0.8c+h+w5c/0.3c+ml\",\n # Add a box around the colobar with a fill (\"+g\") in \"white\" color and a\n # transparency (\"@\") of 30 % and with a 0.8-points thick, black, outline (\"+p\")\n box=\"+gwhite@30+p0.8p,black\",\n # Add x and y labels (\"+l\")\n frame=[\"x+lElevation\", \"y+lm\"],\n)\n\n# Choose a survey line\nfig.plot(\n x=[126, 146], # Longitude in degrees East\n y=[42, 40], # Latitude in degrees North\n # Draw a 2-points thick, red, dashed line for the survey line\n pen=\"2p,red,dashed\",\n)\n\n# Add labels \"A\" and \"B\" for the start and end points of the survey line\nfig.text(\n x=[126, 146],\n y=[42, 40],\n text=[\"A\", \"B\"],\n offset=\"0c/0.2c\", # Move text 0.2 centimeters up (y direction)\n font=\"15p\", # Use a font size of 15 points\n)\n\n# ----------------------------------------------------------------------------\n# Top: Elevation along survey line\n\n# Shift plot origin to the top by the height of the map (\"+h\") plus 1.5 centimeters\nfig.shift_origin(yshift=\"h+1.5c\")\n\nfig.basemap(\n region=[0, 15, -8000, 6000], # x_min, x_max, y_min, y_max\n # Cartesian projection with a width of 12 centimeters and a height of 3 centimeters\n projection=\"X12c/3c\",\n # Add annotations (\"a\") and ticks (\"f\") as well as labels (\"+l\") at the west or\n # left and south or bottom sides (\"WSrt\")\n frame=[\"WSrt\", \"xa2f1+lDistance+u\u00b0\", \"ya4000+lElevation / m\"],\n)\n\n# Add labels \"A\" and \"B\" for the start and end points of the survey line\nfig.text(\n x=[0, 15],\n y=[7000, 7000],\n text=[\"A\", \"B\"],\n no_clip=True, # Do not clip text that fall outside the plot bounds\n font=\"10p\", # Use a font size of 10 points\n)\n\n# Generate points along a great circle corresponding to the survey line and store them\n# in a pandas.DataFrame\ntrack_df = pygmt.project(\n center=[126, 42], # Start point of survey line (longitude, latitude)\n endpoint=[146, 40], # End point of survey line (longitude, latitude)\n generate=0.1, # Output data in steps of 0.1 degrees\n)\n\n# Extract the elevation at the generated points from the downloaded grid and add it as\n# new column \"elevation\" to the pandas.DataFrame\ntrack_df = pygmt.grdtrack(grid=grid_map, points=track_df, newcolname=\"elevation\")\n\n# Plot water masses\nfig.plot(\n x=[0, 15],\n y=[0, 0],\n fill=\"lightblue\", # Fill the polygon in \"lightblue\"\n # Draw a 0.25-points thick, black, solid outline\n pen=\"0.25p,black,solid\",\n close=\"+y-8000\", # Force closed polygon\n)\n\n# Plot elevation along the survey line\nfig.plot(\n x=track_df.p,\n y=track_df.elevation,\n fill=\"gray\", # Fill the polygon in \"gray\"\n # Draw a 1-point thick, black, solid outline\n pen=\"1p,black,solid\",\n close=\"+y-8000\", # Force closed polygon\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/3787de5589b1e3589ccd7e23bebab332/custom_symbols.zip b/v0.14.0/_downloads/3787de5589b1e3589ccd7e23bebab332/custom_symbols.zip new file mode 100644 index 00000000000..dc53b9d21be Binary files /dev/null and b/v0.14.0/_downloads/3787de5589b1e3589ccd7e23bebab332/custom_symbols.zip differ diff --git a/v0.14.0/_downloads/37bbfd67d313fb487d8d7ab3e42dd351/grdgradient.py b/v0.14.0/_downloads/37bbfd67d313fb487d8d7ab3e42dd351/grdgradient.py new file mode 100644 index 00000000000..9ca438f1bd7 --- /dev/null +++ b/v0.14.0/_downloads/37bbfd67d313fb487d8d7ab3e42dd351/grdgradient.py @@ -0,0 +1,56 @@ +""" +Calculating grid gradient and radiance +====================================== + +The :func:`pygmt.grdgradient` function calculates the gradient of a grid file. +In the example shown below we will see how to calculate a hillshade map based +on a Data Elevation Model (DEM). As input :func:`pygmt.grdgradient` gets +an :class:`xarray.DataArray` object or a path string to a grid file, calculates +the respective gradient and returns it as an :class:`xarray.DataArray` object. +We will use the ``radiance`` parameter in order to set the illumination source +direction and altitude. +""" + +# %% +import pygmt + +# Define region of interest around Yosemite valley +region = [-119.825, -119.4, 37.6, 37.825] + +# Load sample grid (3 arc-seconds global relief) in target area +grid = pygmt.datasets.load_earth_relief(resolution="03s", region=region) + +# calculate the reflection of a light source projecting from west to east +# (azimuth of 270 degrees) and at a latitude of 30 degrees from the horizon +dgrid = pygmt.grdgradient(grid=grid, radiance=[270, 30]) + +fig = pygmt.Figure() +# define figure configuration +pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") + +# --------------- plotting the original Data Elevation Model ----------- + +pygmt.makecpt(cmap="gray", series=[200, 4000, 10]) +fig.grdimage( + grid=grid, + projection="M12c", + frame=["WSrt+tOriginal Data Elevation Model", "xa0.1", "ya0.1"], + cmap=True, +) + +fig.colorbar(position="JML+o1.4c/0c+w7c/0.5c", frame=["xa1000f500+lElevation", "y+lm"]) + +# --------------- plotting the hillshade map ----------- + +# Shift plot origin of the second map by 12.5 cm in x direction +fig.shift_origin(xshift="12.5c") + +pygmt.makecpt(cmap="gray", series=[-1.5, 0.3, 0.01]) +fig.grdimage( + grid=dgrid, + projection="M12c", + frame=["lSEt+tHillshade Map", "xa0.1", "ya0.1"], + cmap=True, +) + +fig.show() diff --git a/v0.14.0/_downloads/3892ab88349507ec8cff595ee737fbf3/connection_lines.zip b/v0.14.0/_downloads/3892ab88349507ec8cff595ee737fbf3/connection_lines.zip new file mode 100644 index 00000000000..780be9d2d12 Binary files /dev/null and b/v0.14.0/_downloads/3892ab88349507ec8cff595ee737fbf3/connection_lines.zip differ diff --git a/v0.14.0/_downloads/38c3d79827085b26f41051d26b8d2617/cyl_oblique_mercator.py b/v0.14.0/_downloads/38c3d79827085b26f41051d26b8d2617/cyl_oblique_mercator.py new file mode 100644 index 00000000000..17bf589d48b --- /dev/null +++ b/v0.14.0/_downloads/38c3d79827085b26f41051d26b8d2617/cyl_oblique_mercator.py @@ -0,0 +1,79 @@ +r""" +Oblique Mercator projection +=========================== + +Oblique configurations of the cylinder give rise to the oblique Mercator projection. +It is particularly useful when mapping regions of large lateral extent in an oblique +direction. Both parallels and meridians are complex curves. The projection was +developed in the early 1900s by several workers. + +The projection is set with **o** or **O**. There are three different specification +ways (**a**\|\ **A**, **b**\|\ **B**, **c**\|\ **C**) available. For all three +definitions, the upper case letter mean the projection pole is set in the southern +hemisphere [Default is northern hemisphere]. Align the y-axis with the optional +modifier **+v**. The figure size is set with *scale* or *width*. +""" + +# %% +# 1. Using the origin and azimuth +# ------------------------------- +# +# **oa**\|\ **oA**\ *lon0/lat0/azimuth/scale*\[**+v**] or +# **Oa**\|\ **OA**\ *lon0/lat0/azimuth/width*\[**+v**] +# +# The central meridian is set by *lon0/lat0*. The oblique equator is set by *azimuth*. + +import pygmt + +fig = pygmt.Figure() +fig.coast( + projection="Oa-120/25/-30/3c+v", + # Set bottom left and top right coordinates of the figure with "+r" + region="-122/35/-107/22+r", + frame="afg", + land="gray80", + water="steelblue", +) +fig.show() + + +# %% +# 2. Using two points +# ------------------- +# +# **ob**\|\ **oB**\ *lon0/lat0/lon1/lat1/scale*\ [**+v**] or +# **Ob**\|\ **OB**\ *lon0/lat0/lon1/lat1/width*\ [**+v**] +# +# The central meridian is set by *lon0/lat0*. The oblique equator is set by *lon1/lat1*. + +fig = pygmt.Figure() +fig.coast( + projection="Ob130/35/25/35/3c", + region="130/35/145/40+r", + frame="afg", + land="gray80", + water="steelblue", +) +fig.show() + + +# %% +# 3. Using the origin and projection pole +# --------------------------------------- +# +# **oc**\|\ **oC**\ *lon0/lat0/lonp/latp/scale*\ [**+v**] or +# **Oc**\|\ **OC**\ *lon0/lat0/lonp/latp/width*\ [**+v**] +# +# The central meridian is set by *lon0/lat0*. The projection pole is set by *lonp/latp*. + +fig = pygmt.Figure() +fig.coast( + projection="Oc280/25.5/22/69/4c", + region="270/20/305/25+r", + frame="afg", + land="gray80", + water="steelblue", +) +fig.show() + +# sphinx_gallery_thumbnail_number = 3 diff --git a/v0.14.0/_downloads/3a6edd038438f55cda5d15e6ecf59e68/azim_equidistant.ipynb b/v0.14.0/_downloads/3a6edd038438f55cda5d15e6ecf59e68/azim_equidistant.ipynb new file mode 100644 index 00000000000..fcd6775ebdf --- /dev/null +++ b/v0.14.0/_downloads/3a6edd038438f55cda5d15e6ecf59e68/azim_equidistant.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Azimuthal equidistant projection\n\nThe main advantage of this projection is that distances from the projection\ncenter are displayed in correct proportions. Also directions measured from the\nprojection center are correct. It is very useful for a global view on locations\nthat lie within a certain distance or for comparing distances of different\nlocations relative to the projection center.\n\n**e**\\ *lon0/lat0*\\ [*/horizon*]\\ */scale* or\n**E**\\ *lon0/lat0*\\ [*/horizon*]\\ */width*\n\nThe projection type is set with **e** or **E**. *lon0/lat0* specifies the\nprojection center, and the optional parameter *horizon* specifies the maximum\ndistance to the projection center (i.e. the visible portion of the rest of the\nworld map) in degrees <= 180\u00b0 (default 180\u00b0). The size of the figure is set by\n*scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n region=\"g\", projection=\"E-100/40/15c\", frame=\"afg\", land=\"khaki\", water=\"white\"\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/3a771bc6ca136517dbd9054ea380f76e/linefronts.py b/v0.14.0/_downloads/3a771bc6ca136517dbd9054ea380f76e/linefronts.py new file mode 100644 index 00000000000..8c85c9f09a0 --- /dev/null +++ b/v0.14.0/_downloads/3a771bc6ca136517dbd9054ea380f76e/linefronts.py @@ -0,0 +1,93 @@ +r""" +Line fronts +=========== + +Using the :meth:`pygmt.Figure.plot` method you can draw a so-called +*front* which allows to plot specific symbols distributed along a line +or curve. Typical use cases are weather fronts, fault lines, +subduction zones, and more. To draw general symbols along a line or +curve, i.e., a so-called *decorated line*, see the +:doc:`Decorated lines example `. + +A front can be drawn by passing **f**\[±]\ *gap*\[/*size*] to the ``style`` +parameter where *gap* defines the distance gap between the symbols and +*size* the symbol size. If *gap* is negative, it is interpreted to mean +the number of symbols along the front instead. If *gap* has a leading + +then we use the value exactly as given [Default will start and end each +line with a symbol, hence the *gap* is adjusted to fit]. If *size* is +missing it is set to 30% of the *gap*, except when *gap* is negative +and *size* is thus required. Append **+l** or **+r** to plot symbols on +the left or right side of the front [Default is centered]. Append +**+**\ *type* to specify which symbol to plot: **b**\ ox, **c**\ ircle, +**f**\ ault [Default], **s**\ lip, or **t**\ riangle. Slip means left-lateral +or right-lateral strike-slip arrows (centered is not an option). The **+s** +modifier optionally accepts the angle used to draw the vector [Default is +20 degrees]. Alternatively, use **+S** which draws arcuate arrow heads. +Append **+o**\ *offset* to offset the first symbol from the beginning of +the front by that amount [Default is 0]. The chosen symbol is drawn with +the same pen as set for the line (i.e., via the ``pen`` parameter). To use +an alternate pen, append **+p**\ *pen*. To skip the outline, just use +**+p** with no argument. To make the main front line invisible, add **+i**. +For modifying the main front line via the ``pen`` parameter, see the +:doc:`Line styles example `. +""" + +# %% +import numpy as np +import pygmt + +# Generate a two-point line for plotting +x = np.array([1, 4]) +y = np.array([20, 20]) + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 20], projection="X15c/15c", frame="+tLine Fronts") + +# Plot the line using different front styles +for frontstyle in [ + # line with "faults" front style, same as +f [Default] + "f1c/0.25c", + # line with box front style + "f1c/0.25c+b", + # line with circle front style + "f1c/0.25c+c", + # line with triangle front style + "f1c/0.3c+t", + # line with left-lateral ("+l") slip ("+s") front style, angle is set to + # 45 degrees and offset to 2.25 cm + "f5c/1c+l+s45+o2.25c", + # line with "faults" front style, symbols are plotted on the left side of + # the front + "f1c/0.4c+l", + # line with box front style, symbols are plotted on the left side of the + # front + "f1c/0.3c+l+b", + # line with circle front style, symbols are plotted on the right side of + # the front + "f1c/0.4c+r+c", + # line with triangle front style, symbols are plotted on the left side of + # the front + "f1c/0.3c+l+t", + # line with triangle front style, symbols are plotted on the right side of + # the front, use other pen for the outline of the symbol + "f1c/0.4c+r+t+p1.5p,dodgerblue", + # line with triangle front style, symbols are plotted on the right side of + # the front and offset is set to 0.3 cm, skip the outline + "f0.5c/0.3c+r+t+o0.3c+p", + # line with triangle front style, symbols are plotted on the right side of + # the front and offset is set to 0.3 cm, skip the outline and make the main + # front line invisible + "f0.5c/0.3c+r+t+o0.3c+p+i", +]: + y -= 1 # move the current line down + fig.plot(x=x, y=y, pen="1.25p", style=frontstyle, fill="red3") + fig.text( + x=x[-1], + y=y[-1], + text=frontstyle, + font="Courier-Bold", + justify="ML", + offset="0.75c/0c", + ) + +fig.show() diff --git a/v0.14.0/_downloads/3cf5b59a819671c01903e985d30a2a2a/cyl_stereographic.py b/v0.14.0/_downloads/3cf5b59a819671c01903e985d30a2a2a/cyl_stereographic.py new file mode 100644 index 00000000000..d1abd1bff52 --- /dev/null +++ b/v0.14.0/_downloads/3cf5b59a819671c01903e985d30a2a2a/cyl_stereographic.py @@ -0,0 +1,42 @@ +r""" +Cylindrical stereographic projection +==================================== + +The cylindrical stereographic projections are certainly not as notable as other +cylindrical projections, but are still used because of their relative +simplicity and their ability to overcome some of the downsides of other +cylindrical projections, like extreme distortions of the higher latitudes. The +stereographic projections are perspective projections, projecting the sphere +onto a cylinder in the direction of the antipodal point on the equator. The +cylinder crosses the sphere at two standard parallels, equidistant from the +equator. + +**cyl_stere**/\ [*lon0*/\ [*lat0*/]]\ *scale* or +**Cyl_stere**/\ [*lon0*/\ [*lat0*/]]\ *width* + +The projection is set with **cyl_stere** or **Cyl_stere**. The central meridian +is set by the optional *lon0*, and the figure size is set with *scale* or +*width*. + +The standard parallel is typically one of these (but can be any value): + +* 66.159467 - Miller's modified Gall +* 55 - Kamenetskiy's First +* 45 - Gall's Stereographic +* 30 - Bolshoi Sovietskii Atlas Mira or Kamenetskiy's Second +* 0 - Braun's Cylindrical + +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.coast( + region="g", + projection="Cyl_stere/30/-20/12c", + frame="afg", + land="gray80", + water="steelblue", +) +fig.show() diff --git a/v0.14.0/_downloads/3d4b23ebe4e65ccf7b18708c5890cba1/great_circles.py b/v0.14.0/_downloads/3d4b23ebe4e65ccf7b18708c5890cba1/great_circles.py new file mode 100644 index 00000000000..8ca800be4ae --- /dev/null +++ b/v0.14.0/_downloads/3d4b23ebe4e65ccf7b18708c5890cba1/great_circles.py @@ -0,0 +1,44 @@ +""" +Generate points along great circles +=================================== + +The :func:`pygmt.project` function can generate points along a great circle +whose center and end points can be defined via the ``center`` and ``endpoint`` +parameters, respectively. Using the ``generate`` parameter allows to generate +(*r*, *s*, *p*) points every *dist* units of *p* along a profile as +output. By default, all units (*r*, *s* and *p*) are set to degrees while +``unit=True`` allows to set the unit for *p* to km. +""" + +# %% +import pygmt + +fig = pygmt.Figure() + +# generate points every 10 degrees along a great circle from 10N,50W to 30N,5W +points1 = pygmt.project(center=[-50, 10], endpoint=[-5, 30], generate=10) +# generate points every 750 km along a great circle from 10N,50W to 57.5N,90W +points2 = pygmt.project(center=[-50, 10], endpoint=[-90, 57.5], generate=750, unit=True) +# generate points every 350 km along a great circle from 10N,50W to 68N,5W +points3 = pygmt.project(center=[-50, 10], endpoint=[-5, 68], generate=350, unit=True) + +# create a plot with coast and Mercator projection (M) +fig.basemap(region=[-100, 0, 0, 70], projection="M12c", frame=True) +fig.coast(shorelines=True, area_thresh=5000) + +# plot individual points of first great circle as seagreen line +fig.plot(x=points1.r, y=points1.s, pen="2p,seagreen") +# plot individual points as seagreen squares atop +fig.plot(x=points1.r, y=points1.s, style="s.45c", fill="seagreen", pen="1p") + +# plot individual points of second great circle as orange line +fig.plot(x=points2.r, y=points2.s, pen="2p,orange") +# plot individual points as orange inverted triangles atop +fig.plot(x=points2.r, y=points2.s, style="i.6c", fill="orange", pen="1p") + +# plot individual points of third great circle as red3 line +fig.plot(x=points3.r, y=points3.s, pen="2p,red3") +# plot individual points as red3 circles atop +fig.plot(x=points3.r, y=points3.s, style="c.3c", fill="red3", pen="1p") + +fig.show() diff --git a/v0.14.0/_downloads/3db93f67aa21f11cc37aafddb464c11b/points.ipynb b/v0.14.0/_downloads/3db93f67aa21f11cc37aafddb464c11b/points.ipynb new file mode 100644 index 00000000000..9b67c3e4ac6 --- /dev/null +++ b/v0.14.0/_downloads/3db93f67aa21f11cc37aafddb464c11b/points.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Points\n\nThe :meth:`pygmt.Figure.plot` method can plot data points. The symbol and\nsize are set with the ``style`` parameter.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Generate a random set of points to plot\nrng = np.random.default_rng(seed=42)\nregion = [150, 240, -10, 60]\nx = rng.uniform(low=region[0], high=region[1], size=100)\ny = rng.uniform(low=region[2], high=region[3], size=100)\n\n\nfig = pygmt.Figure()\n# Create a 15 cm x 15 cm basemap with a Cartesian projection (X) using the\n# data region\nfig.basemap(region=region, projection=\"X15c\", frame=True)\n# Plot using inverted triangles (i) of 0.5 cm size\nfig.plot(x=x, y=y, style=\"i0.5c\", fill=\"black\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/3e8a112e12acf3a70d1e3e1276e436eb/logo.py b/v0.14.0/_downloads/3e8a112e12acf3a70d1e3e1276e436eb/logo.py new file mode 100644 index 00000000000..fdddb817463 --- /dev/null +++ b/v0.14.0/_downloads/3e8a112e12acf3a70d1e3e1276e436eb/logo.py @@ -0,0 +1,19 @@ +""" +Logo +==== + +The :meth:`pygmt.Figure.logo` method allows to place the GMT logo on a map. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 2], projection="X6c", frame=True) + +# Add the GMT logo in the Top Right (TR) corner of the current map, +# scaled up to be 3 cm wide and offset by 0.3 cm in x direction +# and 0.6 cm in y direction. +fig.logo(position="jTR+o0.3c/0.6c+w3c") + +fig.show() diff --git a/v0.14.0/_downloads/40d071e44fa3d77768df6e1280410b77/colorbars_multiple.py b/v0.14.0/_downloads/40d071e44fa3d77768df6e1280410b77/colorbars_multiple.py new file mode 100644 index 00000000000..4a9b149ed11 --- /dev/null +++ b/v0.14.0/_downloads/40d071e44fa3d77768df6e1280410b77/colorbars_multiple.py @@ -0,0 +1,45 @@ +""" +Multiple colormaps +================== + +This gallery example shows how to create multiple colormaps for different +subplots. To better understand how GMT modern mode maintains several levels of +colormaps, please refer to +:gmt-docs:`reference/features.html#gmt-modern-mode-hierarchical-levels` for +details. +""" + +# %% +import pygmt + +fig = pygmt.Figure() + +# Load Earth relief data for the entire globe and a subset region +grid_globe = pygmt.datasets.load_earth_relief(resolution="01d") +subset_region = [-14, 30, 35, 60] +grid_subset = pygmt.datasets.load_earth_relief(resolution="10m", region=subset_region) + +# Define a 1-row, 2-column subplot layout. The overall figure dimensions are +# set to be 15 cm wide and 8 cm high. Each subplot is automatically labelled. +# The space between the subplots is set to be 0.5 cm. +with fig.subplot( + nrows=1, ncols=2, figsize=("15c", "8c"), autolabel=True, margins="0.5c" +): + # Activate the first panel so that the colormap created by the makecpt + # function is a panel-level CPT + with fig.set_panel(panel=0): + pygmt.makecpt(cmap="geo", series=[-8000, 8000]) + # "R?" means Winkel Tripel projection with map width automatically + # determined from the subplot width. + fig.grdimage(grid=grid_globe, projection="R?", region="g", frame="a") + fig.colorbar(frame=["a4000f2000", "x+lElevation", "y+lm"]) + # Activate the second panel so that the colormap created by the makecpt + # function is a panel-level CPT + with fig.set_panel(panel=1): + pygmt.makecpt(cmap="globe", series=[-6000, 3000]) + # "M?" means Mercator projection with map width also automatically + # determined from the subplot width. + fig.grdimage(grid=grid_subset, projection="M?", region=subset_region, frame="a") + fig.colorbar(frame=["a2000f1000", "x+lElevation", "y+lm"]) + +fig.show() diff --git a/v0.14.0/_downloads/4144da9c7d744c41d3bfb63e10acce46/grdclip.py b/v0.14.0/_downloads/4144da9c7d744c41d3bfb63e10acce46/grdclip.py new file mode 100644 index 00000000000..c225e2af595 --- /dev/null +++ b/v0.14.0/_downloads/4144da9c7d744c41d3bfb63e10acce46/grdclip.py @@ -0,0 +1,46 @@ +""" +Clipping grid values +==================== + +The :func:`pygmt.grdclip` function allows to clip defined ranges of grid +values. In the example shown below we set all elevation values (grid points) +smaller than 0 m (in general the bathymetric part of the grid) to a common +value of -2000 m via the ``below`` parameter. +""" + +# %% +import pygmt + +fig = pygmt.Figure() + +# Define region of interest around Iceland +region = [-28, -10, 62, 68] + +# Load sample grid (3 arc-minutes global relief) in target area +grid = pygmt.datasets.load_earth_relief(resolution="03m", region=region) + +# Plot original grid +fig.basemap( + region=region, + projection="M12c", + frame=["WSne+toriginal grid", "xa5f1", "ya2f1"], +) +fig.grdimage(grid=grid, cmap="oleron") + +# Shift plot origin of the second map by "width of the first map + 0.5 cm" +# in x direction +fig.shift_origin(xshift="w+0.5c") + +# Set all grid points < 0 m to a value of -2000 m. +grid = pygmt.grdclip(grid, below=[0, -2000]) + +# Plot clipped grid +fig.basemap( + region=region, + projection="M12c", + frame=["wSne+tclipped grid", "xa5f1", "ya2f1"], +) +fig.grdimage(grid=grid) +fig.colorbar(frame=["x+lElevation", "y+lm"], position="JMR+o0.5c/0c+w8c") + +fig.show() diff --git a/v0.14.0/_downloads/41af0833450ffd160cc785ca9d49a833/rgb_image.zip b/v0.14.0/_downloads/41af0833450ffd160cc785ca9d49a833/rgb_image.zip new file mode 100644 index 00000000000..5a36cbd4cf3 Binary files /dev/null and b/v0.14.0/_downloads/41af0833450ffd160cc785ca9d49a833/rgb_image.zip differ diff --git a/v0.14.0/_downloads/42383a6443e5a7433a91c47a8b78b95e/line_custom_cpt.zip b/v0.14.0/_downloads/42383a6443e5a7433a91c47a8b78b95e/line_custom_cpt.zip new file mode 100644 index 00000000000..208a9f217b0 Binary files /dev/null and b/v0.14.0/_downloads/42383a6443e5a7433a91c47a8b78b95e/line_custom_cpt.zip differ diff --git a/v0.14.0/_downloads/4250d6f1e671f50f6e4b62187ca1a568/datetime_inputs.zip b/v0.14.0/_downloads/4250d6f1e671f50f6e4b62187ca1a568/datetime_inputs.zip new file mode 100644 index 00000000000..df1da61e8da Binary files /dev/null and b/v0.14.0/_downloads/4250d6f1e671f50f6e4b62187ca1a568/datetime_inputs.zip differ diff --git a/v0.14.0/_downloads/4401c0ecca107e4222ff2d8ef6a4a9e5/line_custom_cpt.ipynb b/v0.14.0/_downloads/4401c0ecca107e4222ff2d8ef6a4a9e5/line_custom_cpt.ipynb new file mode 100644 index 00000000000..1a31187e993 --- /dev/null +++ b/v0.14.0/_downloads/4401c0ecca107e4222ff2d8ef6a4a9e5/line_custom_cpt.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Line colors with a custom CPT\n\nThe color of the lines made by :meth:`pygmt.Figure.plot` can be set according\nto a custom CPT and assigned with the ``pen`` parameter.\n\nThe custom CPT can be used by setting the plot command's ``cmap`` parameter to\n``True``. The ``zvalue`` parameter sets the z-value (color) to be used from the\ncustom CPT, and the line color is set as the z-value by using **+z** when\nsetting the ``pen`` color.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Create a list of values between 20 and 30 with 0.2 intervals\nx = np.arange(start=20, stop=30, step=0.2)\n\nfig = pygmt.Figure()\nfig.basemap(frame=[\"WSne\", \"af\"], region=[20, 30, -10, 10])\n\n# Create a custom CPT with the batlow CPT and 10 discrete z-values (colors),\n# use color_model=\"+c0-9\" to write the color palette in categorical format and\n# add labels (0) to (9) for the colorbar legend\npygmt.makecpt(cmap=\"batlow\", series=[0, 9, 1], color_model=\"+c0-9\")\n\n# Plot 10 lines and set a different z-value for each line\nfor zvalue in range(10):\n y = zvalue * np.sin(x)\n fig.plot(x=x, y=y, cmap=True, zvalue=zvalue, pen=\"thick,+z,-\")\n\n# Color bar to show the custom CPT and the associated z-values\nfig.colorbar()\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/44695c4bfbe70aea7b6e46202873909b/insets.ipynb b/v0.14.0/_downloads/44695c4bfbe70aea7b6e46202873909b/insets.ipynb new file mode 100644 index 00000000000..92c9aa59693 --- /dev/null +++ b/v0.14.0/_downloads/44695c4bfbe70aea7b6e46202873909b/insets.ipynb @@ -0,0 +1,115 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Adding an inset to the figure\n\nTo plot an inset figure inside another larger figure, we can use the\n:meth:`pygmt.Figure.inset` method. After a large figure has been created,\ncall ``inset`` using a ``with`` statement, and new plot elements will be\nadded to the inset figure instead of the larger figure.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Prior to creating an inset figure, a larger figure must first be plotted. In\nthe example below, :meth:`pygmt.Figure.coast` is used to create a map of the\nUS state of Massachusetts.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n region=[-74, -69.5, 41, 43], # Set bounding box of the large figure\n borders=\"2/thin\", # Plot state boundaries with thin lines\n shorelines=\"thin\", # Plot coastline with thin lines\n projection=\"M15c\", # Set Mercator projection and size of 15 centimeter\n land=\"lightyellow\", # Color land areas light yellow\n water=\"lightblue\", # Color water areas light blue\n frame=\"a\", # Set frame with annotation and major tick spacing\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The :meth:`pygmt.Figure.inset` method uses a context manager, and is called\nusing a ``with`` statement. The ``position`` parameter, including the inset\nwidth, is required to plot the inset. Using the **j** modifier, the location\nof the inset is set to one of the 9 anchors (Top - Middle - Bottom and Left -\nCenter - Right). In the example below, ``BL`` places the inset at the Bottom\nLeft corner. The ``box`` parameter can set the fill and border of the inset.\nIn the example below, ``+pblack`` sets the border color to black and\n``+glightred`` sets the fill to light red.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n region=[-74, -69.5, 41, 43],\n borders=\"2/thin\",\n shorelines=\"thin\",\n projection=\"M15c\",\n land=\"lightyellow\",\n water=\"lightblue\",\n frame=\"a\",\n)\nwith fig.inset(position=\"jBL+w3c\", box=\"+pblack+glightred\"):\n # pass is used to exit the with statement as no plotting methods are\n # called\n pass\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "When using **j** to set the anchor of the inset, the default location is in\ncontact with the nearby axis or axes. The offset of the inset can be set with\n**+o**, followed by the offsets along the x- and y-axis. If only one offset\nis passed, it is applied to both axes. Each offset can have its own unit. In\nthe example below, the inset is shifted 0.5 centimeters on the x-axis and\n0.2 centimeters on the y-axis.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n region=[-74, -69.5, 41, 43],\n borders=\"2/thin\",\n shorelines=\"thin\",\n projection=\"M15c\",\n land=\"lightyellow\",\n water=\"lightblue\",\n frame=\"a\",\n)\nwith fig.inset(position=\"jBL+w3c+o0.5c/0.2c\", box=\"+pblack+glightred\"):\n pass\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Standard plotting methods can be called from within the ``inset`` context\nmanager. The example below uses :meth:`pygmt.Figure.coast` to plot a zoomed\nout map that selectively paints the state of Massachusetts to show its\nlocation relative to other states.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n region=[-74, -69.5, 41, 43],\n borders=\"2/thin\",\n shorelines=\"thin\",\n projection=\"M15c\",\n land=\"lightyellow\",\n water=\"lightblue\",\n frame=\"a\",\n)\n# This does not include an inset fill as it is covered by the inset figure\n# Inset width/height are determined by the ``region`` and ``projection``\n# parameters.\nwith fig.inset(\n position=\"jBL+o0.5c/0.2c\",\n box=\"+pblack\",\n region=[-80, -65, 35, 50],\n projection=\"M3c\",\n):\n # Use a plotting method to create a figure inside the inset.\n fig.coast(\n land=\"gray\",\n borders=[1, 2],\n shorelines=\"1/thin\",\n water=\"white\",\n # Use dcw to selectively highlight an area\n dcw=\"US.MA+gred\",\n )\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/44f2f8886e62c9f3304375fbaf60a56f/inset.ipynb b/v0.14.0/_downloads/44f2f8886e62c9f3304375fbaf60a56f/inset.ipynb new file mode 100644 index 00000000000..aab226dd6da --- /dev/null +++ b/v0.14.0/_downloads/44f2f8886e62c9f3304375fbaf60a56f/inset.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Inset\n\nThe :meth:`pygmt.Figure.inset` method adds an inset figure inside a larger\nfigure. The method is called using a ``with`` statement, and its\n``position``, ``box``, ``offset``, and ``margin`` parameters are set. Plotting\nmethods called within the ``with`` statement are applied to the inset figure.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Create the primary figure, setting the region to Madagascar, the land color\n# to \"brown\", the water to \"lightblue\", the shorelines width to \"thin\", and\n# adding a frame\nfig.coast(region=\"MG+r2\", land=\"brown\", water=\"lightblue\", shorelines=\"thin\", frame=\"a\")\n# Create an inset, placing it in the Top Left (TL) corner with a width of 3.5 cm and\n# x- and y-offsets of 0.2 cm. The margin is set to 0, and the border is \"gold\" with a\n# pen size of 1.5 points.\nwith fig.inset(position=\"jTL+w3.5c+o0.2c\", margin=0, box=\"+p1.5p,gold\"):\n # Create a figure in the inset using coast. This example uses the azimuthal\n # orthogonal projection centered at 47E, 20S. The land color is set to\n # \"gray\" and Madagascar is highlighted in \"red3\".\n fig.coast(\n region=\"g\",\n projection=\"G47/-20/?\",\n land=\"gray\",\n water=\"white\",\n dcw=\"MG+gred3\",\n )\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/4580e8bc7ed946f7534ae1fe4700573d/inset.py b/v0.14.0/_downloads/4580e8bc7ed946f7534ae1fe4700573d/inset.py new file mode 100644 index 00000000000..dd2ba4f7631 --- /dev/null +++ b/v0.14.0/_downloads/4580e8bc7ed946f7534ae1fe4700573d/inset.py @@ -0,0 +1,33 @@ +""" +Inset +===== + +The :meth:`pygmt.Figure.inset` method adds an inset figure inside a larger +figure. The method is called using a ``with`` statement, and its +``position``, ``box``, ``offset``, and ``margin`` parameters are set. Plotting +methods called within the ``with`` statement are applied to the inset figure. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Create the primary figure, setting the region to Madagascar, the land color +# to "brown", the water to "lightblue", the shorelines width to "thin", and +# adding a frame +fig.coast(region="MG+r2", land="brown", water="lightblue", shorelines="thin", frame="a") +# Create an inset, placing it in the Top Left (TL) corner with a width of 3.5 cm and +# x- and y-offsets of 0.2 cm. The margin is set to 0, and the border is "gold" with a +# pen size of 1.5 points. +with fig.inset(position="jTL+w3.5c+o0.2c", margin=0, box="+p1.5p,gold"): + # Create a figure in the inset using coast. This example uses the azimuthal + # orthogonal projection centered at 47E, 20S. The land color is set to + # "gray" and Madagascar is highlighted in "red3". + fig.coast( + region="g", + projection="G47/-20/?", + land="gray", + water="white", + dcw="MG+gred3", + ) +fig.show() diff --git a/v0.14.0/_downloads/4753e1cbb6b35fc2d9d768f71db5a64c/image.py b/v0.14.0/_downloads/4753e1cbb6b35fc2d9d768f71db5a64c/image.py new file mode 100644 index 00000000000..1806ae55577 --- /dev/null +++ b/v0.14.0/_downloads/4753e1cbb6b35fc2d9d768f71db5a64c/image.py @@ -0,0 +1,33 @@ +""" +Images on figures +================= + +The :meth:`pygmt.Figure.image` method can be used to read and place an image +file in many formats (e.g., png, jpg, eps, pdf) on a figure. We must specify +the filename via the ``imagefile`` parameter or simply use the filename as +the first argument. You can also use a full URL pointing to your desired image. +The ``position`` parameter allows us to set a reference point on the map for +the image. +""" + +# %% +from pathlib import Path + +import pygmt + +fig = pygmt.Figure() +fig.basemap(region=[0, 2, 0, 2], projection="X10c", frame=True) + +# place and center the GMT logo from the GMT website to the position 1/1 +# on a basemap, scaled up to be 3 cm wide and draw a rectangular border +# around the image +fig.image( + imagefile="https://www.generic-mapping-tools.org/_static/gmt-logo.png", + position="g1/1+w3c+jCM", + box=True, +) + +# clean up the downloaded image in the current directory +Path("gmt-logo.png").unlink() + +fig.show() diff --git a/v0.14.0/_downloads/4773652fbe7159af64dd8e7b67d4d375/custom_symbols.py b/v0.14.0/_downloads/4773652fbe7159af64dd8e7b67d4d375/custom_symbols.py new file mode 100644 index 00000000000..5e2b5a001b2 --- /dev/null +++ b/v0.14.0/_downloads/4773652fbe7159af64dd8e7b67d4d375/custom_symbols.py @@ -0,0 +1,52 @@ +""" +Custom symbols +============== + +The :meth:`pygmt.Figure.plot` method can plot individual custom symbols by +passing the corresponding symbol name together with the **k** shortcut to the +``style`` parameter. + +In total 41 custom symbols are already included of which the following plot shows +five exemplary ones. The symbols are shown underneath their corresponding names. +For the remaining symbols see the GMT Technical Reference +:gmt-docs:`reference/custom-symbols.html`. + +Beside these built-in custom symbols GMT allows users to define their own custom +symbols. For this, a specific macro language is used. A detailed introduction can +be found at :gmt-docs:`reference/custom-symbols.html#the-macro-language`. After +defining such a symbol it can be used in the same way as a built-in custom symbol. + +*Please note*: Custom symbols can not be used in auto-legends yet. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.basemap(region=[0, 8, 0, 3], projection="X12c/4c", frame=True) + +# Define pen and fontstyle for annotations +pen = "1p,black" +font = "15p,Helvetica-Bold" + +# Use the volcano symbol with a size of 1.5c, fill color is set to "seagreen" +fig.plot(x=1, y=1.25, style="kvolcano/1.5c", pen=pen, fill="seagreen") +fig.text(x=1, y=2.5, text="volcano", font=font) + +# Use the astroid symbol with a size of 1.5c, fill color is set to "red3" +fig.plot(x=2.5, y=1.25, style="kastroid/1.5c", pen=pen, fill="red3") +fig.text(x=2.5, y=2.5, text="astroid", font=font) + +# Use the flash symbol with a size of 1.5c, fill color is set to "darkorange" +fig.plot(x=4, y=1.25, style="kflash/1.5c", pen=pen, fill="darkorange") +fig.text(x=4, y=2.5, text="flash", font=font) + +# Use the star4 symbol with a size of 1.5c, fill color is set to "dodgerblue4" +fig.plot(x=5.5, y=1.25, style="kstar4/1.5c", pen=pen, fill="dodgerblue4") +fig.text(x=5.5, y=2.5, text="star4", font=font) + +# Use the hurricane symbol with a size of 1.5c, fill color is set to "magenta4" +fig.plot(x=7, y=1.25, style="khurricane/1.5c", pen=pen, fill="magenta4") +fig.text(x=7, y=2.5, text="hurricane", font=font) + +fig.show() diff --git a/v0.14.0/_downloads/4849a0019962f0a3915a49c7c3295b5e/conic_lambert.py b/v0.14.0/_downloads/4849a0019962f0a3915a49c7c3295b5e/conic_lambert.py new file mode 100644 index 00000000000..e616a927598 --- /dev/null +++ b/v0.14.0/_downloads/4849a0019962f0a3915a49c7c3295b5e/conic_lambert.py @@ -0,0 +1,33 @@ +r""" +Lambert conic conformal projection +================================== + +This conic projection was designed by the Alsatian mathematician Johann +Heinrich Lambert (1772) and has been used extensively for mapping of regions +with predominantly east-west orientation, just like the Albers projection. +Unlike the Albers projection, Lambert's conformal projection is not equal-area. +The parallels are arcs of circles with a common origin, and meridians are the +equally spaced radii of these circles. As with Albers projection, it is only +the two standard parallels that are distortion-free. + +**l**\ *lon0/lat0*\ /\ *lat1/lat2*\ */scale* +or **L**\ *lon0/lat0*\ /\ *lat1/lat2*\ */width* + +The projection is set with **l** or **L**. The projection center is set by +*lon0/lat0* and two standard parallels for the map are set with *lat1/lat2*. +The figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.coast( + region=[-130, -70, 24, 52], + projection="L-100/35/33/45/12c", + frame="afg", + land="seagreen", + water="gray90", +) + +fig.show() diff --git a/v0.14.0/_downloads/49c77eb0e51cc152d80dcf33222c1d77/envelope.zip b/v0.14.0/_downloads/49c77eb0e51cc152d80dcf33222c1d77/envelope.zip new file mode 100644 index 00000000000..021c3eabcc6 Binary files /dev/null and b/v0.14.0/_downloads/49c77eb0e51cc152d80dcf33222c1d77/envelope.zip differ diff --git a/v0.14.0/_downloads/4a39bafc91b5f2bf95be7036b1ade168/scatter.py b/v0.14.0/_downloads/4a39bafc91b5f2bf95be7036b1ade168/scatter.py new file mode 100644 index 00000000000..c62575c4852 --- /dev/null +++ b/v0.14.0/_downloads/4a39bafc91b5f2bf95be7036b1ade168/scatter.py @@ -0,0 +1,46 @@ +""" +Scatter plots with a legend +=========================== + +To create a scatter plot with a legend one may use a loop and create one +scatter plot per item to appear in the legend and set the label accordingly. + +Modified from the matplotlib example: +https://matplotlib.org/stable/gallery/lines_bars_and_markers/scatter_with_legend.html +""" + +# %% +import numpy as np +import pygmt + +rng = np.random.default_rng(seed=19680801) +n = 200 # number of random data points + +fig = pygmt.Figure() +fig.basemap( + region=[-1, 1, -1, 1], + projection="X10c/10c", + frame=["xa0.5fg", "ya0.5fg", "WSrt"], +) +for fill in ["gray73", "darkorange", "slateblue"]: + # Generate standard normal distributions centered on 0 + # with standard deviations of 1 + x = rng.normal(loc=0, scale=0.5, size=n) # random x data + y = rng.normal(loc=0, scale=0.5, size=n) # random y data + size = rng.normal(loc=0, scale=0.5, size=n) * 0.5 # random size, in cm + + # plot data points as circles (style="c"), with different sizes + fig.plot( + x=x, + y=y, + style="c", + size=size, + fill=fill, + # Set the legend label, + # and set the symbol size to be 0.25 cm (+S0.25c) in legend + label=f"{fill}+S0.25c", + transparency=50, # set transparency level for all symbols + ) + +fig.legend(transparency=30) # set transparency level for legends +fig.show() diff --git a/v0.14.0/_downloads/4ba88a5a28ab8a51639c64f1e885a48c/earth_relief.py b/v0.14.0/_downloads/4ba88a5a28ab8a51639c64f1e885a48c/earth_relief.py new file mode 100644 index 00000000000..8c195f5d0d8 --- /dev/null +++ b/v0.14.0/_downloads/4ba88a5a28ab8a51639c64f1e885a48c/earth_relief.py @@ -0,0 +1,103 @@ +""" +Plotting Earth relief +===================== + +PyGMT provides the :func:`pygmt.datasets.load_earth_relief` function to download the +Earth relief data from the GMT remote server and load as an :class:`xarray.DataArray` +object. The data can then be plotted using the :meth:`pygmt.Figure.grdimage` method. +""" + +# %% +import pygmt + +# %% +# Load sample Earth relief data for the entire globe at a resolution of 1 arc-degree. +# Refer to :func:`pygmt.datasets.load_earth_relief` for the other available resolutions. +grid = pygmt.datasets.load_earth_relief(resolution="01d") + + +# %% +# Create a plot +# ------------- +# +# The :meth:`pygmt.Figure.grdimage` method takes the ``grid`` input to create a figure. +# It creates and applies a color palette to the figure based upon the z-values of the +# data. By default, it plots the map with the *turbo* CPT, an equidistant cylindrical +# projection, and with no frame. + +fig = pygmt.Figure() +fig.grdimage(grid=grid) +fig.show() + +# %% +# :meth:`pygmt.Figure.grdimage` can take the optional parameter ``projection`` for the +# map. In the example below, ``projection`` is set to ``"R12c"`` for a +# 12-centimeters-wide figure with a Winkel Tripel projection. For a list of available +# projections, see :doc:`/techref/projections`. + +fig = pygmt.Figure() +fig.grdimage(grid=grid, projection="R12c") +fig.show() + + +# %% +# Set a color map +# --------------- +# +# :meth:`pygmt.Figure.grdimage` takes the ``cmap`` parameter to set the CPT of the +# figure. Examples of common CPTs for Earth relief are shown below. A full list of CPTs +# can be found at :gmt-docs:`reference/cpts.html`. + +# %% +# Using the *geo* CPT: + +fig = pygmt.Figure() +fig.grdimage(grid=grid, projection="R12c", cmap="geo") +fig.show() + +# %% +# Using the *relief* CPT: + +fig = pygmt.Figure() +fig.grdimage(grid=grid, projection="R12c", cmap="relief") +fig.show() + + +# %% +# Add a color bar +# --------------- +# +# The :meth:`pygmt.Figure.colorbar` method displays the CPT and the associated z-values +# of the figure, and by default uses the same CPT set by the ``cmap`` parameter for +# :meth:`pygmt.Figure.grdimage`. The ``frame`` parameter for +# :meth:`pygmt.Figure.colorbar` can be used to set the axis intervals and labels. A list +# is used to pass multiple arguments to ``frame``. In the example below, ``"a2500"`` +# sets the axis interval to 2,500, ``"x+lElevation"`` sets the x-axis label, and +# ``"y+lm"`` sets the y-axis label. + +fig = pygmt.Figure() +fig.grdimage(grid=grid, projection="R12c", cmap="geo") +fig.colorbar(frame=["a2500", "x+lElevation", "y+lm"]) +fig.show() + + +# %% +# Create a region map +# ------------------- +# +# In addition to providing global data, the ``region`` parameter of +# :func:`pygmt.datasets.load_earth_relief` can be used to provide data for a specific +# area. The ``region`` parameter is required for resolutions at 5 arc-minutes or higher, +# and accepts a list in the form of [*xmin*, *xmax*, *ymin*, *ymax*]. +# +# The example below uses data with a 10 arc-minutes resolution, and plots it on a +# 15-centimeters-wide figure with a Mercator projection and a CPT set to *geo*. +# ``frame="a"`` is used to add a frame with annotations to the figure. + +grid = pygmt.datasets.load_earth_relief(resolution="10m", region=[-14, 30, 35, 60]) +fig = pygmt.Figure() +fig.grdimage(grid=grid, projection="M15c", frame="a", cmap="geo") +fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"]) +fig.show() + +# sphinx_gallery_thumbnail_number = 5 diff --git a/v0.14.0/_downloads/4bbc19d583cf32f49fef99abbd52d817/misc_van_der_grinten.ipynb b/v0.14.0/_downloads/4bbc19d583cf32f49fef99abbd52d817/misc_van_der_grinten.ipynb new file mode 100644 index 00000000000..71fd57cca7e --- /dev/null +++ b/v0.14.0/_downloads/4bbc19d583cf32f49fef99abbd52d817/misc_van_der_grinten.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Van der Grinten projection\n\nThe Van der Grinten projection, presented by Alphons J. van der Grinten in\n1904, is neither equal-area nor conformal. Central meridian and Equator are\nstraight lines; other meridians are arcs of circles. The scale is true along\nthe Equator only. Its main use is to show the entire world enclosed in a\ncircle.\n\n**v**\\ [*lon0/*]\\ *scale* or **V**\\ [*lon0/*]\\ *width*\n\nThe projection is set with **v** or **V**. The central meridian is set with the\noptional *lon0*, and the figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Use region \"d\" to specify global region (-180/180/-90/90)\nfig.coast(region=\"d\", projection=\"V12c\", frame=\"afg\", land=\"ivory\", water=\"bisque4\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/4cab1ef6841f1cf3696efc9345ec98d7/misc_eckertVI.ipynb b/v0.14.0/_downloads/4cab1ef6841f1cf3696efc9345ec98d7/misc_eckertVI.ipynb new file mode 100644 index 00000000000..9117159d820 --- /dev/null +++ b/v0.14.0/_downloads/4cab1ef6841f1cf3696efc9345ec98d7/misc_eckertVI.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Eckert VI equal-area projection\n\nThe Eckert VI projections, presented by the German cartographer Max\nEckert-Greiffendorff in 1906, is a pseudo-cylindrical equal-area projection.\nCentral meridian and all parallels are straight lines; other meridians are\nequally spaced sinusoids. The scale is true along latitude 49\u00b016'.\n\n\n**ks**\\ [*lon0/*]\\ *scale* or **Ks**\\ [*lon0/*]\\ *width*\n\nThe projection is set with **ks** or **Ks**. The central meridian is set with\nthe optional *lon0*, and the figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Use region \"d\" to specify global region (-180/180/-90/90)\nfig.coast(region=\"d\", projection=\"Ks12c\", frame=\"afg\", land=\"ivory\", water=\"bisque4\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/4d25cee04584b7011adb6f93e5be4117/grdlandmask.ipynb b/v0.14.0/_downloads/4d25cee04584b7011adb6f93e5be4117/grdlandmask.ipynb new file mode 100644 index 00000000000..14bc5f334bb --- /dev/null +++ b/v0.14.0/_downloads/4d25cee04584b7011adb6f93e5be4117/grdlandmask.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Create 'wet-dry' mask grid\n\nThe :func:`pygmt.grdlandmask` function allows setting all nodes on land\nor water to a specified value using the ``maskvalues`` parameter.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n\n# Define region of interest\nregion = [-65, -40, -40, -20]\n\n# Assign a value of 0 for all water masses and a value of 1 for all land\n# masses.\n# Use shoreline data with (l)ow resolution and set the grid spacing to\n# 5 arc-minutes in x and y direction.\ngrid = pygmt.grdlandmask(region=region, spacing=\"5m\", maskvalues=[0, 1], resolution=\"l\")\n\n# Plot clipped grid\nfig.basemap(region=region, projection=\"M12c\", frame=True)\n\n# Define a colormap to be used for two categories, define the range of the\n# new discrete CPT using series=(lowest_value, highest_value, interval),\n# use color_model=\"+cwater,land\" to write the discrete color palette\n# \"batlow\" in categorical format and add water/land as annotations for the\n# colorbar.\npygmt.makecpt(cmap=\"batlow\", series=(0, 1, 1), color_model=\"+cwater,land\")\n\nfig.grdimage(grid=grid, cmap=True)\nfig.colorbar(position=\"JMR+o0.5c/0c+w8c\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/4dfa99b469213f63647baeb0fd2768a1/timestamp.zip b/v0.14.0/_downloads/4dfa99b469213f63647baeb0fd2768a1/timestamp.zip new file mode 100644 index 00000000000..65dce56890f Binary files /dev/null and b/v0.14.0/_downloads/4dfa99b469213f63647baeb0fd2768a1/timestamp.zip differ diff --git a/v0.14.0/_downloads/4f2ed91211e31a6bde7f78022c6477c8/points.py b/v0.14.0/_downloads/4f2ed91211e31a6bde7f78022c6477c8/points.py new file mode 100644 index 00000000000..08042bcf089 --- /dev/null +++ b/v0.14.0/_downloads/4f2ed91211e31a6bde7f78022c6477c8/points.py @@ -0,0 +1,26 @@ +""" +Points +====== + +The :meth:`pygmt.Figure.plot` method can plot data points. The symbol and +size are set with the ``style`` parameter. +""" + +# %% +import numpy as np +import pygmt + +# Generate a random set of points to plot +rng = np.random.default_rng(seed=42) +region = [150, 240, -10, 60] +x = rng.uniform(low=region[0], high=region[1], size=100) +y = rng.uniform(low=region[2], high=region[3], size=100) + + +fig = pygmt.Figure() +# Create a 15 cm x 15 cm basemap with a Cartesian projection (X) using the +# data region +fig.basemap(region=region, projection="X15c", frame=True) +# Plot using inverted triangles (i) of 0.5 cm size +fig.plot(x=x, y=y, style="i0.5c", fill="black") +fig.show() diff --git a/v0.14.0/_downloads/50883ca8d99bdc8e7c9a00e42a80c9aa/cyl_transverse_mercator.ipynb b/v0.14.0/_downloads/50883ca8d99bdc8e7c9a00e42a80c9aa/cyl_transverse_mercator.ipynb new file mode 100644 index 00000000000..028b7f61581 --- /dev/null +++ b/v0.14.0/_downloads/50883ca8d99bdc8e7c9a00e42a80c9aa/cyl_transverse_mercator.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Transverse Mercator projection\n\nThe transverse Mercator was invented by Johann Heinrich Lambert in 1772. In\nthis projection the cylinder touches a meridian along which there is no\ndistortion. The distortion increases away from the central meridian and goes to\ninfinity at 90\u00b0 from center. The central meridian, each meridian 90\u00b0 away from\nthe center, and equator are straight lines; other parallels and meridians are\ncomplex curves.\n\n**t**\\ *lon0*\\ [/\\ *lat0*]/\\ *scale* or **T**\\ *lon0*\\ [/\\ *lat0*]/\\ *width*\n\nThe projection is set with **t** or **T**. The central meridian is set\nby *lon0*, the latitude of the origin is set by the optional *lat0*, and the\nfigure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n region=[20, 50, 30, 45],\n projection=\"T35/12c\",\n frame=\"afg\",\n land=\"gray80\",\n water=\"steelblue\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/50adabf0b491ac7d964ae964a8a2924d/misc_winkel_tripel.zip b/v0.14.0/_downloads/50adabf0b491ac7d964ae964a8a2924d/misc_winkel_tripel.zip new file mode 100644 index 00000000000..491763c6eab Binary files /dev/null and b/v0.14.0/_downloads/50adabf0b491ac7d964ae964a8a2924d/misc_winkel_tripel.zip differ diff --git a/v0.14.0/_downloads/514db94ad6b89b412203394794563a41/grdgradient_shading.py b/v0.14.0/_downloads/514db94ad6b89b412203394794563a41/grdgradient_shading.py new file mode 100644 index 00000000000..01efc1fa0d8 --- /dev/null +++ b/v0.14.0/_downloads/514db94ad6b89b412203394794563a41/grdgradient_shading.py @@ -0,0 +1,64 @@ +""" +Calculating grid gradient with custom ``azimuth`` and ``normalize`` parameters +============================================================================== + +The :func:`pygmt.grdgradient` function calculates the gradient of a grid file. +As input, :func:`pygmt.grdgradient` gets an :class:`xarray.DataArray` object +or a path string to a grid file. It then calculates the respective gradient +and returns an :class:`xarray.DataArray` object. The example below sets two +main parameters: + +- ``azimuth`` to set the illumination light source direction (0° is North, + 90° is East, 180° is South, 270° is West). +- ``normalize`` to enhance the three-dimensional sense of the topography. + +The ``normalize`` parameter calculates the azimuthal gradient of each point +along a certain azimuth angle, then adjusts the brightness value of the color +according to the positive/negative of the azimuthal gradient and the amplitude +of each point. +""" + +# %% +import pygmt + +# Load the 3 arc-minutes global relief grid in the target area around Caucasus +grid = pygmt.datasets.load_earth_relief(resolution="03m", region=[35, 50, 35, 45]) + +fig = pygmt.Figure() + +# Define a colormap to be used for topography +pygmt.makecpt(cmap="terra", series=[-7000, 7000]) + +# Define figure configuration +pygmt.config(FONT_TITLE="10p,5", MAP_TITLE_OFFSET="1p", MAP_FRAME_TYPE="plain") + +# Setup subplot panels with three rows and four columns +with fig.subplot( + nrows=3, + ncols=4, + figsize=("28c", "21c"), + sharex="b", + sharey="l", +): + # E.g. "0/90" illuminates light source from the North (top) and East + # (right), and so on + for azi in ["0/90", "0/300", "180/225"]: + # "e" and "t" are cumulative Laplace distribution and cumulative + # Cauchy distribution, respectively + # "amp" (e.g. 1 or 10) controls the brightness value of the color + for nor in ["t1", "e1", "t10", "e10"]: + # Making an intensity DataArray using azimuth and normalize + # parameters + shade = pygmt.grdgradient(grid=grid, azimuth=azi, normalize=nor) + fig.grdimage( + grid=grid, + shading=shade, + projection="M?", + frame=["a4f2", f"+tazimuth={azi}, normalize={nor}"], + cmap=True, + panel=True, + ) + +fig.colorbar(position="JBC+w10c/0.25c+h", frame="xa2000f500+lElevation (m)") + +fig.show() diff --git a/v0.14.0/_downloads/53343f38b1717e3f5118bc5f71e13619/regions.zip b/v0.14.0/_downloads/53343f38b1717e3f5118bc5f71e13619/regions.zip new file mode 100644 index 00000000000..076f1344f19 Binary files /dev/null and b/v0.14.0/_downloads/53343f38b1717e3f5118bc5f71e13619/regions.zip differ diff --git a/v0.14.0/_downloads/55454267a551755c46ce6703af5ffa3c/coastlines.ipynb b/v0.14.0/_downloads/55454267a551755c46ce6703af5ffa3c/coastlines.ipynb new file mode 100644 index 00000000000..f65c6dd5cdc --- /dev/null +++ b/v0.14.0/_downloads/55454267a551755c46ce6703af5ffa3c/coastlines.ipynb @@ -0,0 +1,133 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Coastlines and borders\n\nPlotting coastlines and borders is handled by :meth:`pygmt.Figure.coast`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Shorelines\n\nUse the ``shorelines`` parameter to plot only the shorelines:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=\"g\", projection=\"W15c\", frame=True)\nfig.coast(shorelines=True)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The shorelines are divided in 4 levels:\n\n1. coastline\n2. lakeshore\n3. island-in-lake shore\n4. lake-in-island-in-lake shore\n\nYou can specify which level you want to plot by passing the level number and\na GMT pen configuration. For example, to plot just the coastlines with 0.5p\nthickness and black lines:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=\"g\", projection=\"W15c\", frame=True)\nfig.coast(shorelines=\"1/0.5p,black\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You can specify multiple levels (with their own pens) by passing a list to\n``shorelines``:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=\"g\", projection=\"W15c\", frame=True)\nfig.coast(shorelines=[\"1/1p,black\", \"2/0.5p,red\"])\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Resolutions\n\nThe coastline database comes with 5 resolutions. The resolution drops by 80%\nbetween levels:\n\n1. ``\"c\"``: crude\n2. ``\"l\"``: low (default)\n3. ``\"i\"``: intermediate\n4. ``\"h\"``: high\n5. ``\"f\"``: full\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "oahu = [-158.3, -157.6, 21.2, 21.8]\nfig = pygmt.Figure()\nfor res in [\"c\", \"l\", \"i\", \"h\", \"f\"]:\n fig.coast(resolution=res, shorelines=\"1p\", region=oahu, projection=\"M5c\")\n fig.shift_origin(xshift=\"5c\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Land and water\n\nUse the ``land`` and ``water`` parameters to specify a fill color for land\nand water bodies. The colors can be given by name or hex codes (like the ones\nused in HTML and CSS):\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=\"g\", projection=\"W15c\", frame=True)\nfig.coast(land=\"#666666\", water=\"skyblue\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/55e44f9449633861ed4a6ff1a66394b0/04_table_inputs.zip b/v0.14.0/_downloads/55e44f9449633861ed4a6ff1a66394b0/04_table_inputs.zip new file mode 100644 index 00000000000..8c606a11cea Binary files /dev/null and b/v0.14.0/_downloads/55e44f9449633861ed4a6ff1a66394b0/04_table_inputs.zip differ diff --git a/v0.14.0/_downloads/570d302a92925f9e094273a775f967cb/cyl_miller.ipynb b/v0.14.0/_downloads/570d302a92925f9e094273a775f967cb/cyl_miller.ipynb new file mode 100644 index 00000000000..2a56dbe7385 --- /dev/null +++ b/v0.14.0/_downloads/570d302a92925f9e094273a775f967cb/cyl_miller.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Miller cylindrical projection\n\nThis cylindrical projection, presented by Osborn Maitland Miller of the\nAmerican Geographic Society in 1942, is neither equal nor conformal. All\nmeridians and parallels are straight lines. The projection was designed to be a\ncompromise between Mercator and other cylindrical projections. Specifically,\nMiller spaced the parallels by using Mercator's formula with 0.8 times the\nactual latitude, thus avoiding the singular poles; the result was then divided\nby 0.8.\n\n**j**\\ [*lon0/*]\\ */scale* or **J**\\ [*lon0/*]\\ */width*\n\nThe projection is set with **j** or **J**. The central meridian is set by the\noptional *lon0*, and the figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n region=[-180, 180, -80, 80],\n projection=\"J-65/12c\",\n frame=\"afg\",\n land=\"gray80\",\n water=\"steelblue\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/576682ce55f5658488163cac405df1d8/vector_styles.zip b/v0.14.0/_downloads/576682ce55f5658488163cac405df1d8/vector_styles.zip new file mode 100644 index 00000000000..b1a94bd548b Binary files /dev/null and b/v0.14.0/_downloads/576682ce55f5658488163cac405df1d8/vector_styles.zip differ diff --git a/v0.14.0/_downloads/58b941a964130bf352acec2e6ca816e6/plot.py b/v0.14.0/_downloads/58b941a964130bf352acec2e6ca816e6/plot.py new file mode 100644 index 00000000000..babfb60d771 --- /dev/null +++ b/v0.14.0/_downloads/58b941a964130bf352acec2e6ca816e6/plot.py @@ -0,0 +1,96 @@ +""" +Plotting data points +==================== + +GMT shines when it comes to plotting data on a map. We can use some sample data +that is packaged with GMT to try this out. PyGMT provides access to these +datasets through the :mod:`pygmt.datasets` package. If you don't have the data +files already, they are automatically downloaded and saved to a cache directory +the first time you use them (usually ``~/.gmt/cache``). +""" + +# %% +import pygmt + +# %% +# For example, let's load the sample dataset of tsunami generating earthquakes +# around Japan using :func:`pygmt.datasets.load_sample_data`. +# The data are loaded as a :class:`pandas.DataFrame`. + +data = pygmt.datasets.load_sample_data(name="japan_quakes") + +# Set the region for the plot to be slightly larger than the data bounds. +region = [ + data.longitude.min() - 1, + data.longitude.max() + 1, + data.latitude.min() - 1, + data.latitude.max() + 1, +] + +print(region) +print(data.head()) + +# %% +# We'll use the :meth:`pygmt.Figure.plot` method to plot circles on the +# earthquake epicenters. + +fig = pygmt.Figure() +fig.basemap(region=region, projection="M15c", frame=True) +fig.coast(land="black", water="skyblue") +fig.plot(x=data.longitude, y=data.latitude, style="c0.3c", fill="white", pen="black") +fig.show() + +# %% +# We used the style ``c0.3c`` which means "circles with a diameter of 0.3 +# centimeters". The ``pen`` parameter controls the outline of the symbols and +# the ``fill`` parameter controls the fill. +# +# We can map the size of the circles to the earthquake magnitude by passing an +# array to the ``size`` parameter. Because the magnitude is on a logarithmic +# scale, it helps to show the differences by scaling the values using a power +# law. + +fig = pygmt.Figure() +fig.basemap(region=region, projection="M15c", frame=True) +fig.coast(land="black", water="skyblue") +fig.plot( + x=data.longitude, + y=data.latitude, + size=0.02 * (2**data.magnitude), + style="cc", + fill="white", + pen="black", +) +fig.show() + +# %% +# Notice that we didn't include the size in the ``style`` parameter this time, +# just the symbol ``c`` (circles) and the unit ``c`` (centimeters). So in +# this case, the size will be interpreted as being in centimeters. +# +# We can also map the colors of the markers to the depths by passing an array +# to the ``fill`` parameter and providing a colormap name (``cmap``). We can +# even use the new matplotlib colormap "viridis". Here, we first create a +# continuous colormap ranging from the minimum depth to the maximum depth of +# the earthquakes using :func:`pygmt.makecpt`, then set ``cmap=True`` in +# :meth:`pygmt.Figure.plot` to use the colormap. At the end of the plot, we +# also plot a colorbar showing the colormap used in the plot. +# + +fig = pygmt.Figure() +fig.basemap(region=region, projection="M15c", frame=True) +fig.coast(land="black", water="skyblue") +pygmt.makecpt(cmap="viridis", series=[data.depth_km.min(), data.depth_km.max()]) +fig.plot( + x=data.longitude, + y=data.latitude, + size=0.02 * 2**data.magnitude, + fill=data.depth_km, + cmap=True, + style="cc", + pen="black", +) +fig.colorbar(frame="xaf+lDepth (km)") +fig.show() + +# sphinx_gallery_thumbnail_number = 3 diff --git a/v0.14.0/_downloads/5960352f445a0970de5fdeb998d05cb1/non_ascii_text.ipynb b/v0.14.0/_downloads/5960352f445a0970de5fdeb998d05cb1/non_ascii_text.ipynb new file mode 100644 index 00000000000..6d6de257bda --- /dev/null +++ b/v0.14.0/_downloads/5960352f445a0970de5fdeb998d05cb1/non_ascii_text.ipynb @@ -0,0 +1,50 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Typesetting non-ASCII text\n\nIn addition to ASCII printable characters, sometimes you may also want to typeset\nnon-ASCII characters on the plot, such as Greek letters, mathematical symbols, or\nspecial characters.\n\nDue to the limitations of the underlying PostScript language, PyGMT doesn't support\nall characters in the Unicode standard. Instead, PyGMT supports a limited set of\ncharacters in the \"Adobe Symbol\", \"Adobe ZapfDingbats\", \"Adobe ISOLatin1+\", and\n\"ISO-8859-*x*\" (*x* can be 1-11, 13-16) encodings. Refer to :doc:`/techref/encodings`\nfor the complete list of supported characters.\n\nIn PyGMT, the supported (ASCII and non-ASCII) characters can be directly used in the\n``text`` parameter of the :meth:`pygmt.Figure.text` method for typesetting text strings.\nThey can also be used in the arguments of other plotting functions (e.g., in the\n``frame`` parameter to set the labels or title).\n\nIn this example, we demonstrate how to typeset non-ASCII characters in PyGMT.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.basemap(\n region=[0, 5, 0, 6],\n projection=\"X14c/7c\",\n frame=[\"xaf+lDistance (\u00b0)\", \"yaf+lValue (\u2030)\", \"WSen+tTitle: \u03b1\u00b2 \u00b1 \u03b2\u00b2\"],\n)\n\nfig.text(\n x=[0.2] * 5,\n y=[5, 4, 3, 2, 1],\n text=[\"ASCII:\", \"ISOLatin1+:\", \"Symbol:\", \"ZapfDingbats:\", \"Mixed:\"],\n font=\"20p,Helvetica-Bold,red\",\n justify=\"LM\",\n)\nfig.text(\n x=[2] * 5,\n y=[5, 4, 3, 2, 1],\n text=[\n \"ABCDE12345!#$:;<=>?\", # ASCII only\n \"\u00b1\u00b0\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c8\u00cc\u00d2\u00d9\u00e0\u00e8\u00ec\u00f2\u00f9\", # Non-ASCII characters from Adobe ISOLatin1+\n \"\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u2297\u2295\u2205\u2283\u2287\u2284\u2282\u2286\", # Non-ASCII characters from Adobe Symbol\n \"\u2708\u2665\u2666\u2663\u2660\u275b\u275c\u275d\u275e\u2768\u2769\u276a\u276b\u276c\u276d\u276e\u276f\u2192\u2194\", # Non-ASCII characters from Adobe ZapfDingbats\n \"ABCD \u03b1\u03b2\u03b3\u03b4 \u2460\u2461\u2462 \u278a\u278b\u278c\", # Mix characters from ISOLatin1+, Symbol and ZapfDingbats\n ],\n font=\"18p,Helvetica\",\n justify=\"LM\",\n)\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Here are some important tips when using non-ASCII characters:\n\n- **Similar-looking characters**: Be cautious when using characters that appear\n visually similar but are distinct. For example, ``\u03a9`` (OHM SIGN) and ``\u2126`` (GREEK\n CAPITAL LETTER OMEGA) may look alike, but PyGMT only supports the latter. Using the\n incorrect character can lead to unexpected results. To avoid this, it's recommended\n to copy and paste characters from the :doc:`/techref/encodings` documentation.\n- **Mix characters from different encodings**: As shown in the example above, you can\n mix characters from different encodings in the same text string. However, due to the\n limitations of the underlying PostScript language, you cannot mix characters from\n the \"Adobe ISOLatin1+\" and \"ISO-8859-*x*\" encodings in the same text string. For\n example, you cannot mix characters from \"Adobe ISOLatin1+\" and \"ISO-8859-2\". If\n you need to use characters from different encodings, you can use them in different\n PyGMT function/method calls.\n- **Non-ASCII characters in text files**: Non-ASCII characters are not supported if\n you have them in a text file and pass it to :meth:`pygmt.Figure.text`. In this case,\n you may want to load the text file into :class:`pandas.DataFrame` and then pass it\n to the ``text`` parameter.\n\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/596b759f989cf3ead5feb16261721e2c/cyl_equal_area.zip b/v0.14.0/_downloads/596b759f989cf3ead5feb16261721e2c/cyl_equal_area.zip new file mode 100644 index 00000000000..4484cbc459c Binary files /dev/null and b/v0.14.0/_downloads/596b759f989cf3ead5feb16261721e2c/cyl_equal_area.zip differ diff --git a/v0.14.0/_downloads/5b115abd395df29687bbdca4aedd657e/solar.zip b/v0.14.0/_downloads/5b115abd395df29687bbdca4aedd657e/solar.zip new file mode 100644 index 00000000000..76507e1e462 Binary files /dev/null and b/v0.14.0/_downloads/5b115abd395df29687bbdca4aedd657e/solar.zip differ diff --git a/v0.14.0/_downloads/5bd8b5a0eec17763d656cbd7e8c040d6/line_segment_ends.zip b/v0.14.0/_downloads/5bd8b5a0eec17763d656cbd7e8c040d6/line_segment_ends.zip new file mode 100644 index 00000000000..8ef1ab3fb9a Binary files /dev/null and b/v0.14.0/_downloads/5bd8b5a0eec17763d656cbd7e8c040d6/line_segment_ends.zip differ diff --git a/v0.14.0/_downloads/5c7e0aea90c8c5ec02b1953ae3a8fc2e/inset.zip b/v0.14.0/_downloads/5c7e0aea90c8c5ec02b1953ae3a8fc2e/inset.zip new file mode 100644 index 00000000000..a942fe01c65 Binary files /dev/null and b/v0.14.0/_downloads/5c7e0aea90c8c5ec02b1953ae3a8fc2e/inset.zip differ diff --git a/v0.14.0/_downloads/5de8b89cdb245fd8efc64230406701cb/configuration.zip b/v0.14.0/_downloads/5de8b89cdb245fd8efc64230406701cb/configuration.zip new file mode 100644 index 00000000000..ce12bc6c4a0 Binary files /dev/null and b/v0.14.0/_downloads/5de8b89cdb245fd8efc64230406701cb/configuration.zip differ diff --git a/v0.14.0/_downloads/5e17e15b04cf954695a55dde55249b4b/points.zip b/v0.14.0/_downloads/5e17e15b04cf954695a55dde55249b4b/points.zip new file mode 100644 index 00000000000..5aefcaf62d4 Binary files /dev/null and b/v0.14.0/_downloads/5e17e15b04cf954695a55dde55249b4b/points.zip differ diff --git a/v0.14.0/_downloads/5fb3bfc93c599af4f81adf5fdf555e4e/azim_equidistant.py b/v0.14.0/_downloads/5fb3bfc93c599af4f81adf5fdf555e4e/azim_equidistant.py new file mode 100644 index 00000000000..1e8bb682234 --- /dev/null +++ b/v0.14.0/_downloads/5fb3bfc93c599af4f81adf5fdf555e4e/azim_equidistant.py @@ -0,0 +1,28 @@ +r""" +Azimuthal equidistant projection +================================ + +The main advantage of this projection is that distances from the projection +center are displayed in correct proportions. Also directions measured from the +projection center are correct. It is very useful for a global view on locations +that lie within a certain distance or for comparing distances of different +locations relative to the projection center. + +**e**\ *lon0/lat0*\ [*/horizon*]\ */scale* or +**E**\ *lon0/lat0*\ [*/horizon*]\ */width* + +The projection type is set with **e** or **E**. *lon0/lat0* specifies the +projection center, and the optional parameter *horizon* specifies the maximum +distance to the projection center (i.e. the visible portion of the rest of the +world map) in degrees <= 180° (default 180°). The size of the figure is set by +*scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.coast( + region="g", projection="E-100/40/15c", frame="afg", land="khaki", water="white" +) +fig.show() diff --git a/v0.14.0/_downloads/5ff6cd228313780677c91ba2874a1297/misc_sinusoidal.ipynb b/v0.14.0/_downloads/5ff6cd228313780677c91ba2874a1297/misc_sinusoidal.ipynb new file mode 100644 index 00000000000..df35bb2c998 --- /dev/null +++ b/v0.14.0/_downloads/5ff6cd228313780677c91ba2874a1297/misc_sinusoidal.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Sinusoidal projection\n\nThe sinusoidal projection is one of the oldest known projections, is\nequal-area, and has been used since the mid-16th century. It has also been\ncalled the \"Equal-area Mercator\" projection. The central meridian is a straight\nline; all other meridians are sinusoidal curves. Parallels are all equally\nspaced straight lines, with scale being true along all parallels (and central\nmeridian).\n\n**i**\\ [*lon0/*]\\ *scale* or **I**\\ [*lon0/*]\\ *width*\n\nThe projection is set with **i** or **I**. The central meridian is set with the\noptional *lon0*, and the figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Use region \"d\" to specify global region (-180/180/-90/90)\nfig.coast(region=\"d\", projection=\"I12c\", frame=\"afg\", land=\"ivory\", water=\"bisque4\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/60dd18f6360ae424d46bf75ab40caa3c/land_and_water.zip b/v0.14.0/_downloads/60dd18f6360ae424d46bf75ab40caa3c/land_and_water.zip new file mode 100644 index 00000000000..21a9995eae7 Binary files /dev/null and b/v0.14.0/_downloads/60dd18f6360ae424d46bf75ab40caa3c/land_and_water.zip differ diff --git a/v0.14.0/_downloads/632b22f22c9757823995900ae3b5c418/azim_general_perspective.py b/v0.14.0/_downloads/632b22f22c9757823995900ae3b5c418/azim_general_perspective.py new file mode 100644 index 00000000000..e0d3933b5d8 --- /dev/null +++ b/v0.14.0/_downloads/632b22f22c9757823995900ae3b5c418/azim_general_perspective.py @@ -0,0 +1,42 @@ +r""" +Perspective projection +====================== + +The perspective projection imitates the view of the Earth from a finite +point in space. In a full view of the earth one third of its surface area can +be seen. + +**g**\ *lon0/lat0*\ */scale*\ [**+a**\ *azimuth*]\ +[**+t**\ *tilt*]\ [**+v**\ *vwidth/vheight*]\ [**+w**\ *twist*]\ +[**+z**\ *altitude*] or **G**\ *lon0/lat0*\ */width*\ +[**+a**\ *azimuth*]\ [**+t**\ *tilt*]\ [**+v**\ *vwidth/vheight*]\ +[**+w**\ *twist*]\ [**+z**\ *altitude*] + +The projection type is set with **g** or **G**. *lon0/lat0* specifies the +projection center and *scale* or *width* determine the size of the figure. +With **+a**\ *azimuth* the direction (in degrees) in which you are looking is +specified, measured clockwise from north. **+t**\ *tilt* is given in degrees +and is the viewing angle relative to zenith. A tilt of 0° is looking straight +down, 60° is looking 30° above horizon. The viewport angle in degrees is +described via **+v**\ *vwidth/vheight* and **+w**\ *twist* is the clockwise +rotation of the image (in degrees). **+z**\ *altitude* sets the height in km +of the viewpoint above local sea level (If altitude is less than 10, then it is +the distance from the center of the earth to the viewpoint in earth radii). + +The example shows the coast of Northern Europe viewed from 250 km above sea +level looking 30° from north at a tilt of 45°. The height and width of the +viewing angle is both 60°, which imitates viewing with naked eye. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.coast( + region="g", + projection="G4/52/12c+a30+t45+v60/60+w0+z250", + frame="afg", + land="khaki", + water="white", +) +fig.show() diff --git a/v0.14.0/_downloads/63316010f4652c6a5b9ad8ea0992adc6/decorated_lines.py b/v0.14.0/_downloads/63316010f4652c6a5b9ad8ea0992adc6/decorated_lines.py new file mode 100644 index 00000000000..42ad5dc7be9 --- /dev/null +++ b/v0.14.0/_downloads/63316010f4652c6a5b9ad8ea0992adc6/decorated_lines.py @@ -0,0 +1,82 @@ +""" +Decorated lines +=============== + +To draw a so-called *decorated line*, i.e., symbols along a line or curve, use the +``style`` parameter of the :meth:`pygmt.Figure.plot` method with the argument ``"~"`` +and the desired modifiers. A colon (``":"``) is used to separate the algorithm +settings from the symbol information. This example shows how to adjust the symbols. +Beside the built-in symbols also custom symbols can be used. For modifying the main +decorated line via the ``pen`` parameter, see the +:doc:`Line styles example `. For details on the input data +see the upstream GMT documentation at :gmt-docs:`plot.html#s`. Furthermore, there are +so-called *line fronts*, which are often used to plot fault lines, subduction zones, +or weather fronts; for details see the +:doc:`Line fronts example `. +""" + +# %% +import numpy as np +import pygmt + +# Generate a two-point line for plotting +x = np.array([1, 4]) +y = np.array([24, 24]) + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 24], projection="X15c", frame="+tDecorated Lines") + +# Plot different decorated lines +for decoline in [ + # Line with circles ("c") of 0.5 centimeters radius in distance of 1 centimeter + "~d1c:+sc0.5c", + # Adjust thickness, color, and style of the outline via "+p" + # Here, we plot a 1-point thick, blue, dashed outline + "~d1c:+sc0.5c+p1p,blue,dashed", + # Add a fill color using "+g" with the desired color + "~d1c:+sc0.5c+glightblue", + # To use a pattern as fill append "p" and give the pattern number + "~d1c:+sc0.5c+gp8+p1p,blue", + # Line with triangles ("t") + "~d1c:+st0.5c+gtan+p1p,black", + # Rotate counter-clockwise from line-parallel ("+ap") by 30 degrees + "~d1c:+st0.5c+gtan+p1p,black+ap30", + # Line with inverse triangles with a size of 0.3 centimeters in a + # distance of 0.4 centimeters + "~d0.4c:+si0.3c+gtan+p1p,black", + # Line with squares ("s") with a size of 0.7 centimeters in a distance of + # 1 centimeter + "~d1c:+ss0.7c+gtan+p1p,black", + # Shift symbols using "+n" in x and y directions relative to the main decorated line + "~d1c:+sd0.5c+gtan+p1p,black+n-0.2c/0.1c", + # Give the number of equally spaced symbols by using "n" instead of "d" + "~n6:+sn0.5c+gtan+p1p,black", + # Use upper-case "N" to have symbols at the start and end of the line + "~N6:+sh0.5c+gtan+p1p,black", + # Suppress the main decorated line by appending "+i" + "~d1c:+sg0.5c+gtan+p1p,black+i", + # To only plot a symbol at the start of the line use "N-1" + "~N-1:+sp0.2c+gblack", + # To only plot a symbol at the end of the line use "N+1" + "~N+1:+sp0.2c+gblack", + # Line with stars ("a") + "~d1c:+sa0.5c+ggold+p1p,black", + # Line with crosses ("x") + "~d1c:+sx0.5c+p2p,red", + # Line with (vertical) lines or bars ("y") + "~d0.5c:+sy0.5c+p5p,brown", + # Use custom symbol ("k") "squaroid" with a size of 0.5 centimeters + "~d1c:+sksquaroid/0.5c+ggray+p1p,black", +]: + y = y - 1.2 # Move current line down + fig.plot(x=x, y=y, style=decoline, pen="1.25p,black") + fig.text( + x=x[-1], + y=y[-1], + text=decoline, + font="Courier-Bold", + justify="ML", + offset="0.75c/0c", + ) + +fig.show() diff --git a/v0.14.0/_downloads/64cd87364197b1ab190f7cecf8bc50e5/polygons.ipynb b/v0.14.0/_downloads/64cd87364197b1ab190f7cecf8bc50e5/polygons.ipynb new file mode 100644 index 00000000000..adea11b57ea --- /dev/null +++ b/v0.14.0/_downloads/64cd87364197b1ab190f7cecf8bc50e5/polygons.ipynb @@ -0,0 +1,169 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Plotting polygons\n\nPlotting polygons is handled by the :meth:`pygmt.Figure.plot` method.\n\nThis tutorial focuses on input data given as NumPy arrays. Besides NumPy arrays,\narray-like objects are supported. Here, a polygon is a closed shape defined by a series\nof data points with x and y coordinates, connected by line segments, with the start and\nend points being identical. For plotting a :class:`geopandas.GeoDataFrame` object with\npolygon geometries, e.g., to create a choropleth map, see the gallery example\n:doc:`Choropleth map `.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plot polygons\n\nSet up sample data points as NumPy arrays for the x and y values.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "x = np.array([-2, 1, 3, 0, -4, -2])\ny = np.array([-3, -1, 1, 3, 2, -3])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create a Cartesian plot via the :meth:`pygmt.Figure.basemap` method. Pass arrays to\nthe ``x`` and ``y`` parameters of the :meth:`pygmt.Figure.plot` method. Without\nfurther adjustments, lines are drawn between the data points. By default, the lines\nare 0.25-points thick, black, and solid. In this example, the data points are chosen\nto make the lines form a polygon.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X5c\", frame=True)\nfig.plot(x=x, y=y)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The ``pen`` parameter can be used to adjust the lines or outline of the polygon. The\nargument passed to ``pen`` is one string with the comma-separated optional values\n*width*,\\ *color*,\\ *style*.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X5c\", frame=True)\n# Use a 2-points thick, darkred, dashed outline\nfig.plot(x=x, y=y, pen=\"2p,darkred,dashed\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Use the ``fill`` parameter to fill the polygon with a color or\n:doc:`pattern `. Note, that there are no lines drawn between the\ndata points by default if ``fill`` is used. Use the ``pen`` parameter to add an\noutline around the polygon.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X5c\", frame=True)\n# Fill the polygon with color \"orange\"\nfig.plot(x=x, y=y, fill=\"orange\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Close polygons\n\nSet up sample data points as NumPy arrays for the x and y values. Now, the data points\ndo not form a polygon.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "x = np.array([-2, 1, 3, 0, -4])\ny = np.array([-3, -1, 1, 3, 2])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The ``close`` parameter can be used to force the polygon to be closed.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X5c\", frame=True)\nfig.plot(x=x, y=y, pen=True)\n\nfig.shift_origin(xshift=\"w+1c\")\n\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X5c\", frame=True)\nfig.plot(x=x, y=y, pen=True, close=True)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "When using the ``fill`` parameter, the polygon is automatically closed.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X5c\", frame=True)\nfig.plot(x=x, y=y, pen=True)\n\nfig.shift_origin(xshift=\"w+1c\")\n\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X5c\", frame=True)\nfig.plot(x=x, y=y, pen=True, fill=\"orange\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/64f4c8ad99864e0879265cc2c70045ca/line_segment_ends.ipynb b/v0.14.0/_downloads/64f4c8ad99864e0879265cc2c70045ca/line_segment_ends.ipynb new file mode 100644 index 00000000000..963f64b53fe --- /dev/null +++ b/v0.14.0/_downloads/64f4c8ad99864e0879265cc2c70045ca/line_segment_ends.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Line segment caps and joints\nPyGMT offers different appearances of line segment caps and joints. The desired\nappearance can be set via the GMT default parameters :gmt-term:`PS_LINE_CAP`\n(``\"butt\"``, ``\"round\"``, or ``\"square\"`` [Default]) as well as :gmt-term:`PS_LINE_JOIN`\n(``\"bevel\"``, ``\"round\"``, and ``\"miter\"`` [Default]) and :gmt-term:`PS_MITER_LIMIT`\n(limit on the angle at the mitered joint below which a bevel is applied).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Set up dictionary for colors\ndict_col = {\n \"round\": \"green4\",\n \"square\": \"steelblue\",\n \"butt\": \"orange\",\n \"miter\": \"steelblue\",\n \"bevel\": \"orange\",\n}\n\n# Create new Figure instance\nfig = pygmt.Figure()\n\n# -----------------------------------------------------------------------------\n# Top: PS_LINE_CAP\n\n# Create sample data\nx = np.array([30, 170])\ny = np.array([70, 70])\n\nfig.basemap(region=[0, 260, 0, 100], projection=\"x1p\", frame=\"rltb\")\n\nfor line_cap in [\"butt\", \"round\", \"square\"]:\n # Change GMT default locally\n with pygmt.config(PS_LINE_CAP=line_cap):\n color = dict_col[line_cap]\n # Draw a 10-point thick line with 20-point long segments and gaps\n # Use the local PS_LINE_CAP setting\n fig.plot(x=x, y=y, pen=f\"10p,{color},20_20\")\n\n # Draw a 1-point thick black solid line to highlight segment cap appearance\n fig.plot(x=x, y=y, pen=\"1p,black,solid\")\n # Plot data points as circles\n fig.plot(x=x, y=y, style=\"c0.1c\", fill=\"white\", pen=\"0.5p,\")\n # Add label for PS_LINE_CAP setting\n fig.text(text=line_cap, x=x[-1] + 20, y=y[-1], justify=\"LM\")\n\n y = y - 20\n\nfig.shift_origin(yshift=\"-h\")\n\n# -----------------------------------------------------------------------------\n# Bottom: PS_LINE_JOIN and PS_MITER_LIMIT\n\nx = np.array([5, 95, 65])\ny = np.array([10, 70, 10])\n\nfig.basemap(region=[0, 260, 0, 100], projection=\"x1p\", frame=\"rltb\")\n\nfor line_join in [\"bevel\", \"round\", \"miter\"]:\n with pygmt.config(PS_LINE_JOIN=line_join, PS_MITER_LIMIT=1):\n color = dict_col[line_join]\n # Draw a 7-point thick solid line\n # Use the local PS_LINE_JOIN and PS_MITER_LIMIT settings\n fig.plot(x=x, y=y, pen=f\"7p,{color},solid\")\n\n fig.plot(x=x, y=y, pen=\"1p,black,solid\")\n fig.plot(x=x, y=y, style=\"c0.1c\", fill=\"white\", pen=\"0.5p\")\n fig.text(text=line_join, x=x[1] - 10, y=y[1], justify=\"RB\")\n\n x = x + 75\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/6515d48d2d0eec40239c2a0d13fa81e3/grdlandmask.py b/v0.14.0/_downloads/6515d48d2d0eec40239c2a0d13fa81e3/grdlandmask.py new file mode 100644 index 00000000000..7576028091e --- /dev/null +++ b/v0.14.0/_downloads/6515d48d2d0eec40239c2a0d13fa81e3/grdlandmask.py @@ -0,0 +1,36 @@ +""" +Create 'wet-dry' mask grid +========================== + +The :func:`pygmt.grdlandmask` function allows setting all nodes on land +or water to a specified value using the ``maskvalues`` parameter. +""" + +# %% +import pygmt + +fig = pygmt.Figure() + +# Define region of interest +region = [-65, -40, -40, -20] + +# Assign a value of 0 for all water masses and a value of 1 for all land +# masses. +# Use shoreline data with (l)ow resolution and set the grid spacing to +# 5 arc-minutes in x and y direction. +grid = pygmt.grdlandmask(region=region, spacing="5m", maskvalues=[0, 1], resolution="l") + +# Plot clipped grid +fig.basemap(region=region, projection="M12c", frame=True) + +# Define a colormap to be used for two categories, define the range of the +# new discrete CPT using series=(lowest_value, highest_value, interval), +# use color_model="+cwater,land" to write the discrete color palette +# "batlow" in categorical format and add water/land as annotations for the +# colorbar. +pygmt.makecpt(cmap="batlow", series=(0, 1, 1), color_model="+cwater,land") + +fig.grdimage(grid=grid, cmap=True) +fig.colorbar(position="JMR+o0.5c/0c+w8c") + +fig.show() diff --git a/v0.14.0/_downloads/65c86d00e00ba27dd1a75042dffe37a4/misc_winkel_tripel.ipynb b/v0.14.0/_downloads/65c86d00e00ba27dd1a75042dffe37a4/misc_winkel_tripel.ipynb new file mode 100644 index 00000000000..e964e16cca8 --- /dev/null +++ b/v0.14.0/_downloads/65c86d00e00ba27dd1a75042dffe37a4/misc_winkel_tripel.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Winkel Tripel projection\n\nIn 1921, the German mathematician Oswald Winkel made a projection that was to\nstrike a compromise between the properties of three elements (area, angle and\ndistance). The German word \"tripel\" refers to this junction of where each of\nthese elements are least distorted when plotting global maps. The projection\nwas popularized when Bartholomew and Son started to use it in its\nworld-renowned \"The Times Atlas of the World\" in the mid-20th century. In 1998,\nthe National Geographic Society made the Winkel Tripel as its map projection of\nchoice for global maps.\n\nNaturally, this projection is neither conformal, nor equal-area. Central\nmeridian and equator are straight lines; other parallels and meridians are\ncurved. The projection is obtained by averaging the coordinates of the\nEquidistant Cylindrical and Aitoff (not Hammer-Aitoff) projections. The poles\nmap into straight lines 0.4 times the length of equator.\n\n**r**\\ [*lon0/*]\\ *scale* or **R**\\ [*lon0/*]\\ *width*\n\nThe projection is set with **r** or **R**. The central meridian is set with the\noptional *lon0*, and the figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Use region \"d\" to specify global region (-180/180/-90/90)\nfig.coast(region=\"d\", projection=\"R12c\", frame=\"afg\", land=\"ivory\", water=\"bisque4\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/65e0b77bcac14929bdfc483e3bb7496b/cross_section.py b/v0.14.0/_downloads/65e0b77bcac14929bdfc483e3bb7496b/cross_section.py new file mode 100644 index 00000000000..0f0cd8e352e --- /dev/null +++ b/v0.14.0/_downloads/65e0b77bcac14929bdfc483e3bb7496b/cross_section.py @@ -0,0 +1,124 @@ +""" +Cross-section along a transect +============================== + +:func:`pygmt.project` and :func:`pygmt.grdtrack` can be used to focus on a quantity and +its variation along a desired survey line. In this example, the elevation is extracted +from a grid provided via :func:`pygmt.datasets.load_earth_relief`. The figure consists +of two parts, a map of the elevation in the study area showing the survey line and a +Cartesian plot showing the elevation along the survey line. + +*This example is orientated on an example in the GMT/China documentation*: +https://docs.gmt-china.org/latest/examples/ex026/ +""" + +# %% +import pygmt + +# Define region of study area +# lon_min, lon_max, lat_min, lat_max in degrees East and North +region_map = [122, 149, 30, 49] + +# Create a new pygmt.Figure instance +fig = pygmt.Figure() + +# ---------------------------------------------------------------------------- +# Bottom: Map of elevation in study area + +# Set up basic map using a Mercator projection with a width of 12 centimeters +fig.basemap(region=region_map, projection="M12c", frame="af") + +# Download grid for Earth relief with a resolution of 10 arc-minutes and gridline +# registration [Default] +grid_map = pygmt.datasets.load_earth_relief(resolution="10m", region=region_map) + +# Plot the downloaded grid with color-coding based on the elevation +fig.grdimage(grid=grid_map, cmap="oleron") + +# Add a colorbar for the elevation +fig.colorbar( + # Place the colorbar inside the plot (lower-case "j") in the Bottom Right (BR) + # corner with an offset ("+o") of 0.7 centimeters and 0.3 centimeters in x or y + # directions, respectively; move the x label above the horizontal colorbar ("+ml") + position="jBR+o0.7c/0.8c+h+w5c/0.3c+ml", + # Add a box around the colobar with a fill ("+g") in "white" color and a + # transparency ("@") of 30 % and with a 0.8-points thick, black, outline ("+p") + box="+gwhite@30+p0.8p,black", + # Add x and y labels ("+l") + frame=["x+lElevation", "y+lm"], +) + +# Choose a survey line +fig.plot( + x=[126, 146], # Longitude in degrees East + y=[42, 40], # Latitude in degrees North + # Draw a 2-points thick, red, dashed line for the survey line + pen="2p,red,dashed", +) + +# Add labels "A" and "B" for the start and end points of the survey line +fig.text( + x=[126, 146], + y=[42, 40], + text=["A", "B"], + offset="0c/0.2c", # Move text 0.2 centimeters up (y direction) + font="15p", # Use a font size of 15 points +) + +# ---------------------------------------------------------------------------- +# Top: Elevation along survey line + +# Shift plot origin to the top by the height of the map ("+h") plus 1.5 centimeters +fig.shift_origin(yshift="h+1.5c") + +fig.basemap( + region=[0, 15, -8000, 6000], # x_min, x_max, y_min, y_max + # Cartesian projection with a width of 12 centimeters and a height of 3 centimeters + projection="X12c/3c", + # Add annotations ("a") and ticks ("f") as well as labels ("+l") at the west or + # left and south or bottom sides ("WSrt") + frame=["WSrt", "xa2f1+lDistance+u°", "ya4000+lElevation / m"], +) + +# Add labels "A" and "B" for the start and end points of the survey line +fig.text( + x=[0, 15], + y=[7000, 7000], + text=["A", "B"], + no_clip=True, # Do not clip text that fall outside the plot bounds + font="10p", # Use a font size of 10 points +) + +# Generate points along a great circle corresponding to the survey line and store them +# in a pandas.DataFrame +track_df = pygmt.project( + center=[126, 42], # Start point of survey line (longitude, latitude) + endpoint=[146, 40], # End point of survey line (longitude, latitude) + generate=0.1, # Output data in steps of 0.1 degrees +) + +# Extract the elevation at the generated points from the downloaded grid and add it as +# new column "elevation" to the pandas.DataFrame +track_df = pygmt.grdtrack(grid=grid_map, points=track_df, newcolname="elevation") + +# Plot water masses +fig.plot( + x=[0, 15], + y=[0, 0], + fill="lightblue", # Fill the polygon in "lightblue" + # Draw a 0.25-points thick, black, solid outline + pen="0.25p,black,solid", + close="+y-8000", # Force closed polygon +) + +# Plot elevation along the survey line +fig.plot( + x=track_df.p, + y=track_df.elevation, + fill="gray", # Fill the polygon in "gray" + # Draw a 1-point thick, black, solid outline + pen="1p,black,solid", + close="+y-8000", # Force closed polygon +) + +fig.show() diff --git a/v0.14.0/_downloads/661b511fb0ba938d4b9475b95262183d/polar.py b/v0.14.0/_downloads/661b511fb0ba938d4b9475b95262183d/polar.py new file mode 100644 index 00000000000..5c71e517c17 --- /dev/null +++ b/v0.14.0/_downloads/661b511fb0ba938d4b9475b95262183d/polar.py @@ -0,0 +1,152 @@ +r""" +Polar +===== + +Polar projections allow plotting polar coordinate data (e.g. angle :math:`\theta` and +radius *r*). + +The full syntax for polar projections is: + +**P**\ *width*\ [**+a**]\ [**+f**\ [**e**\|\ **p**\|\ *radius*]]\ +[**+r**\ *offset*][**+t**\ *origin*][**+z**\ [**p**\|\ *radius*]] + +Limits are set via the ``region`` parameter +([*theta_min*, *theta_max*, *radius_min*, *radius_max*]). When using **P**\ *width* you +have to give the *width* of the figure. The lower-case version **p** is similar to **P** +but expects a *scale* instead of a width (**p**\ *scale*). + +The following customizing modifiers are available: + +- **+a**: by default, :math:`\theta` refers to the angle that is equivalent to a + counterclockwise rotation with respect to the east direction (standard definition); + **+a** indicates that the input data are rotated clockwise relative to the north + direction (geographical azimuth angle). + +- **+r**\ *offset*: represents the offset of the r-axis. This modifier allows you to + offset the center of the circle from r=0. + +- **+t**\ *origin*: sets the angle corresponding to the east direction which is + equivalent to rotating the entire coordinate axis clockwise; if the **+a** modifier + is used, setting the angle corresponding to the north direction is equivalent to + rotating the entire coordinate axis counterclockwise. + +- **+f**: reverses the radial direction. + + - Append **e** to indicate that the r-axis is an elevation angle, and the range of the + r-axis should be between 0° and 90°. + - Appending **p** sets the current Earth radius (determined by + :gmt-term:`PROJ_ELLIPSOID`) to the maximum value of the r-axis when the r-axis is + reversed. + - Append *radius* to set the maximum value of the r-axis. + +- **+z**: indicates that the r-axis is marked as depth instead of radius (e.g., + *r = radius - z*). + + - Append **p** to set radius to the current Earth radius. + - Append *radius* to set the value of the radius. +""" + +# %% +import pygmt + +fig = pygmt.Figure() + +pygmt.config(FONT_TITLE="14p,Courier,black", FORMAT_GEO_MAP="+D") + +# ============ +# Top left +fig.basemap( + # Set map limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1 + region=[0, 360, 0, 1], + # Set map width to 5 cm + projection="P5c", + # Set the frame and title; @^ allows for a line break within the title + frame=["xa45f", "+gbisque+tprojection='P5c' @^ region=[0, 360, 0, 1]"], +) + +fig.shift_origin(xshift="w+3c") + +# ============ +# Top middle +fig.basemap( + # Set map limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1 + region=[0, 360, 0, 1], + # Set map width to 5 cm and interpret input data as geographic azimuth instead of + # standard angle + projection="P5c+a", + # Set the frame and title; @^ allows for a line break within the title + frame=["xa45f", "+gbisque+tprojection='P5c+a' @^ region=[0, 360, 0, 1]"], +) + +fig.shift_origin(xshift="w+3c") + +# ============ +# Top right +fig.basemap( + # Set map limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1 + region=[0, 90, 0, 1], + # Set map width to 5 cm and interpret input data as geographic azimuth instead of + # standard angle + projection="P5c+a", + # Set the frame and title; @^ allows for a line break within the title + frame=["xa45f", "ya0.2", "WNe+gbisque+tprojection='P5c+a' @^ region=[0, 90, 0, 1]"], +) + +fig.shift_origin(xshift="-2w-6c", yshift="-h-2c") + +# ============ +# Bottom left +fig.basemap( + # Set map limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1 + region=[0, 90, 0, 1], + # Set map width to 5 cm and interpret input data as geographic azimuth instead of + # standard angle, rotate coordinate system counterclockwise by 45 degrees + projection="P5c+a+t45", + # Set the frame and title; @^ allows for a line break within the title + frame=[ + "xa30f", + "ya0.2", + "WNe+gbisque+tprojection='P5c+a+t45' @^ region=[0, 90, 0, 1]", + ], +) + +fig.shift_origin(xshift="w+3c", yshift="1.3c") + +# ============ +# Bottom middle +fig.basemap( + # Set map limits to theta_min = 0, theta_max = 90, radius_min = 3480, + # radius_max = 6371 (Earth's radius) + region=[0, 90, 3480, 6371], + # Set map width to 5 cm and interpret input data as geographic azimuth instead of + # standard angle, rotate coordinate system counterclockwise by 45 degrees + projection="P5c+a+t45", + # Set the frame, and title; @^ allows for a line break within the title + frame=[ + "xa30f", + "ya", + "WNse+gbisque+tprojection='P5c+a+t45' @^ region=[0, 90, 3480, 6371]", + ], +) + +fig.shift_origin(xshift="w+3c") + +# ============ +# Bottom right +fig.basemap( + # Set map limits to theta_min = 0, theta_max = 90, radius_min = 3480, + # radius_max = 6371 (Earth's radius) + region=[0, 90, 3480, 6371], + # Set map width to 5 cm and interpret input data as geographic azimuth instead of + # standard angle, rotate coordinate system counterclockwise by 45 degrees, r-axis + # is marked as depth + projection="P5c+a+t45+z", + # Set the frame, and title; @^ allows for a line break within the title + frame=[ + "xa30f", + "ya", + "WNse+gbisque+tprojection='P5c+a+t45+\\z' @^ region=[0, 90, 3480, 6371]", + ], +) + +fig.show() diff --git a/v0.14.0/_downloads/664c15fbbd3e520417be6645ecd27303/track_sampling.zip b/v0.14.0/_downloads/664c15fbbd3e520417be6645ecd27303/track_sampling.zip new file mode 100644 index 00000000000..0d5436b91c5 Binary files /dev/null and b/v0.14.0/_downloads/664c15fbbd3e520417be6645ecd27303/track_sampling.zip differ diff --git a/v0.14.0/_downloads/66798387de23274f7e7a49091e649549/cyl_miller.py b/v0.14.0/_downloads/66798387de23274f7e7a49091e649549/cyl_miller.py new file mode 100644 index 00000000000..ab791b5fc8e --- /dev/null +++ b/v0.14.0/_downloads/66798387de23274f7e7a49091e649549/cyl_miller.py @@ -0,0 +1,30 @@ +r""" +Miller cylindrical projection +============================= + +This cylindrical projection, presented by Osborn Maitland Miller of the +American Geographic Society in 1942, is neither equal nor conformal. All +meridians and parallels are straight lines. The projection was designed to be a +compromise between Mercator and other cylindrical projections. Specifically, +Miller spaced the parallels by using Mercator's formula with 0.8 times the +actual latitude, thus avoiding the singular poles; the result was then divided +by 0.8. + +**j**\ [*lon0/*]\ */scale* or **J**\ [*lon0/*]\ */width* + +The projection is set with **j** or **J**. The central meridian is set by the +optional *lon0*, and the figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.coast( + region=[-180, 180, -80, 80], + projection="J-65/12c", + frame="afg", + land="gray80", + water="steelblue", +) +fig.show() diff --git a/v0.14.0/_downloads/674d711e688937b3ca63c0cecee55f8b/contour_map.zip b/v0.14.0/_downloads/674d711e688937b3ca63c0cecee55f8b/contour_map.zip new file mode 100644 index 00000000000..08a7c3f7abd Binary files /dev/null and b/v0.14.0/_downloads/674d711e688937b3ca63c0cecee55f8b/contour_map.zip differ diff --git a/v0.14.0/_downloads/67a4a8ba9595e93d017e899727e1038f/cartesian_histograms.py b/v0.14.0/_downloads/67a4a8ba9595e93d017e899727e1038f/cartesian_histograms.py new file mode 100644 index 00000000000..7191d18cbfd --- /dev/null +++ b/v0.14.0/_downloads/67a4a8ba9595e93d017e899727e1038f/cartesian_histograms.py @@ -0,0 +1,371 @@ +""" +Cartesian histograms +==================== + +Cartesian histograms can be generated using the :meth:`pygmt.Figure.histogram` method. +In this tutorial, different histogram related aspects are addressed: + +- Using vertical and horizontal bars +- Using stair-steps +- Showing counts and frequency percent +- Adding annotations to the bars +- Showing cumulative values +- Using color and pattern as fill for the bars +- Using overlaid, stacked, and grouped bars +""" + +# %% +# Import the required packages +import numpy as np +import pygmt + +# %% +# Generate random data from a normal distribution: + +rng = np.random.default_rng(seed=100) + +# Mean of distribution +mean = 100 +# Standard deviation of distribution +stddev = 20 + +# Create two data sets +data01 = rng.normal(loc=mean, scale=stddev, size=42) +data02 = rng.normal(loc=mean, scale=stddev * 2, size=42) + + +# %% +# Vertical and horizontal bars +# ---------------------------- +# +# To define the width of the bins, the ``series`` parameter has to be specified. The +# bars can be filled via the ``fill`` parameter with either a color or a pattern (see +# later in this tutorial). Use the ``pen`` parameter to adjust width, color, and style +# of the outlines. By default, a histogram with vertical bars is created. Horizontal +# bars can be achieved via ``horizontal=True``. + +fig = pygmt.Figure() + +# Create histogram for data01 with vertical bars +fig.histogram( + # Define the plot range as a list of xmin, xmax, ymin, ymax + # Let ymin and ymax determined automatically by setting both to the same value + region=[0, 200, 0, 0], + projection="X10c", # Cartesian projection with a width of 10 centimeters + # Add frame, annotations ("a"), ticks ("f"), and y-axis label ("+l") "Counts"; the + # numbers give the steps of annotations and ticks + frame=["WStr", "xaf10", "ya1f1+lCounts"], + data=data01, + # Set the bin width via the "series" parameter + series=10, + # Fill the bars with color "red3" + fill="red3", + # Draw a 1-point thick, solid outline in "darkgray" around the bars + pen="1p,darkgray,solid", + # Choose counts via the "histtype" parameter + histtype=0, +) + +# Shift plot origin by the figure width ("w") plus 2 centimeters to the right +fig.shift_origin(xshift="w+2c") + +# Create histogram for data01 with horizontal bars +fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WStr", "xaf10", "ya1f1+lCounts"], + data=data01, + series=10, + fill="red3", + pen="1p,darkgray,solid", + histtype=0, + # Use horizontal bars. Note that the x- and y-axis are flipped, with the x-axis + # plotted vertically and the y-axis plotted horizontally. + horizontal=True, +) + +fig.show() + + +# %% +# Stair-steps +# ----------- +# +# A stair-step diagram can be created by setting ``stairs=True``. Then only the +# outer outlines of the bars are drawn, and no internal bars are visible. + +fig = pygmt.Figure() + +# Create histogram for data01 +fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WSne", "xaf10", "ya1f1+lCounts"], + data=data01, + series=10, + # Draw a 1-point thick, dotted outline in "red3" + pen="1p,red3,dotted", + histtype=0, + # Draw stair-steps in stead of bars + stairs=True, +) + +fig.shift_origin(xshift="w+2c") + +# Create histogram for data02 +fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WSne", "xaf10", "ya1f1+lCounts"], + data=data02, + series=10, + # Draw a 1.5-points thick, dashed outline in "orange" + pen="1.5p,orange,dashed", + histtype=0, + stairs=True, +) + +fig.show() + + +# %% +# Counts and frequency percent +# ---------------------------- +# +# By default, a histogram showing the counts in each bin is created (``histtype=0``). +# To show the frequency percent set the ``histtype`` parameter to ``1``. For further +# options please have a look at the documentation of :meth:`pygmt.Figure.histogram`. + +fig = pygmt.Figure() + +# Create histogram for data02 showing counts +fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WSnr", "xaf10", "ya1f1+lCounts"], + data=data02, + series=10, + fill="orange", + pen="1p,darkgray,solid", + # Choose counts via the "histtype" parameter + histtype=0, +) + +fig.shift_origin(xshift="w+1c") + +# Create histogram for data02 showing frequency percent +fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + # Add suffix % (+u) + frame=["lSnE", "xaf10", "ya2f1+u%+lFrequency percent"], + data=data02, + series=10, + fill="orange", + pen="1p,darkgray,solid", + # Choose frequency percent via the "histtype" parameter + histtype=1, +) + +fig.show() + + +# %% +# Cumulative values +# ----------------- +# +# To create a histogram showing the cumulative values set ``cumulative=True``. Here, +# the bars of the cumulative histogram are filled with a pattern via the ``fill`` +# parameter. Annotate each bar with the counts it represents using the ``annotate`` +# parameter. + +fig = pygmt.Figure() + +# Create histogram for data01 showing the counts per bin +fig.histogram( + region=[0, 200, 0, len(data01) + 1], + projection="X10c", + frame=["WSne", "xaf10", "ya5f1+lCounts"], + data=data01, + series=10, + fill="red3", + pen="1p,darkgray,solid", + histtype=0, + # Annotate each bar with the counts it represents + annotate=True, +) + +fig.shift_origin(xshift="w+1c") + +# Create histogram for data01 showing the cumulative counts +fig.histogram( + region=[0, 200, 0, len(data01) + 1], + projection="X10c", + frame=["wSnE", "xaf10", "ya5f1+lCumulative counts"], + data=data01, + series=10, + # Use pattern ("p") number 8 as fill for the bars + # Set the background ("+b") to white [Default] + # Set the foreground ("+f") to black [Default] + fill="p8+bwhite+fblack", + pen="1p,darkgray,solid", + histtype=0, + # Show cumulative counts + cumulative=True, + # Offset ("+o") the label by 10 points in negative y-direction + annotate="+o-10p", +) + +fig.show() + + +# %% +# Overlaid bars +# ------------- +# +# Overlaid or overlapping bars can be achieved by plotting two or several histograms, +# each for one data set, on top of each other. The legend entry can be specified via +# the ``label`` parameter. +# +# Limitations of histograms with overlaid bars are: +# +# - Mixing of colors or/and patterns +# - Visually more colors or/and patterns than data sets +# - Visually a "third histogram" (or more in case of more than two data sets) + +fig = pygmt.Figure() + +# Create histogram for data01 +fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WSne", "xaf10", "ya1f1+lCounts"], + data=data01, + series=10, + fill="red3", + pen="1p,darkgray,solid", + histtype=0, + # Set legend entry + label="data01", +) + +# Create histogram for data02 +# It is plotted on top of the histogram for data01 +fig.histogram( + data=data02, + series=10, + # Fill bars with color "orange", use a transparency of 50% ("@50") + fill="orange@50", + pen="1p,darkgray,solid", + histtype=0, + label="data02", +) + +# Add legend +fig.legend() + +fig.show() + + +# %% +# Stacked bars +# ------------ +# +# Histograms with stacked bars are not directly supported by PyGMT. Thus, before +# plotting, combined data sets have to be created from the single data sets. Then, +# stacked bars can be achieved similar to overlaid bars via plotting two or several +# histograms on top of each other. +# +# Limitations of histograms with stacked bars are: +# +# - No common baseline +# - Partly not directly clear whether overlaid or stacked bars + +# Combine the two data sets to one data set +data_merge = np.concatenate((data01, data02), axis=None) + +fig = pygmt.Figure() + +# Create histogram for data02 by using the combined data set +fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WSne", "xaf10", "ya1f1+lCounts"], + data=data_merge, + series=10, + fill="orange", + pen="1p,darkgray,solid", + histtype=0, + # The combined data set appears in the final histogram visually as data set data02 + label="data02", +) + +# Create histogram for data01 +# It is plotted on top of the histogram for data02 +fig.histogram( + data=data01, + series=10, + fill="red3", + pen="1p,darkgray,solid", + histtype=0, + label="data01", +) + +# Add legend +fig.legend() + +fig.show() + + +# %% +# Grouped bars +# ------------ +# +# By setting the ``barwidth`` parameter in respect to the values passed to the +# ``series`` parameter histograms with grouped bars can be created. +# +# Limitations of histograms with grouped bars are: +# +# - Careful setting width and position of the bars in respect to the bin width +# - Difficult to see the variations of the single data sets + +# Width used for binning the data +binwidth = 10 + +fig = pygmt.Figure() + +# Create histogram for data01 +fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WSne", "xaf10g10", "ya1f1+lCounts"], + data=data01, + series=binwidth, + fill="red3", + pen="1p,darkgray,solid", + histtype=0, + # Calculate the bar width in respect to the bin width, here for two data sets half + # of the bin width + # Offset ("+o") the bars to align each bar with the left limit of the corresponding + # bin + barwidth=f"{binwidth/2}+o-{binwidth/4}", + label="data01", +) + +# Create histogram for data02 +fig.histogram( + data=data02, + series=binwidth, + fill="orange", + pen="1p,darkgray,solid", + histtype=0, + barwidth=f"{binwidth/2}+o{binwidth/4}", + label="data02", +) + +# Add legend +fig.legend() + +fig.show() + +# sphinx_gallery_thumbnail_number = 4 diff --git a/v0.14.0/_downloads/6931f666eb7195e270be5baff35932af/solar.py b/v0.14.0/_downloads/6931f666eb7195e270be5baff35932af/solar.py new file mode 100644 index 00000000000..ef5c93b5569 --- /dev/null +++ b/v0.14.0/_downloads/6931f666eb7195e270be5baff35932af/solar.py @@ -0,0 +1,53 @@ +""" +Day-night terminator line and twilights +======================================= + +Use :meth:`pygmt.Figure.solar` to show the different transition stages between +daytime and nighttime. The parameter ``terminator`` is used to set the twilight +stage, and can be either ``"day_night"`` (brightest), ``"civil"``, +``"nautical"``, or ``"astronomical"`` (darkest). +Refer to https://en.wikipedia.org/wiki/Twilight for more information. +""" + +# %% +import datetime + +import pygmt + +fig = pygmt.Figure() +# Create a figure showing the global region on a Mollweide projection +# Land color is set to dark green and water color is set to light blue +fig.coast(region="d", projection="W0/15c", land="darkgreen", water="lightblue") +# Set a time for the day-night terminator and twilights, 17:00 UTC on +# January 1, 2000 +terminator_datetime = datetime.datetime( + year=2000, month=1, day=1, hour=17, minute=0, second=0 +) +# Set the pen line to be 0.5 points thick +# Set the fill for the night area to be navy blue at different transparency +# levels +fig.solar( + terminator="day_night", + terminator_datetime=terminator_datetime, + fill="navyblue@95", + pen="0.5p", +) +fig.solar( + terminator="civil", + terminator_datetime=terminator_datetime, + fill="navyblue@85", + pen="0.5p", +) +fig.solar( + terminator="nautical", + terminator_datetime=terminator_datetime, + fill="navyblue@80", + pen="0.5p", +) +fig.solar( + terminator="astronomical", + terminator_datetime=terminator_datetime, + fill="navyblue@80", + pen="0.5p", +) +fig.show() diff --git a/v0.14.0/_downloads/69d967f3356b6b0eaf7857553352e12d/cyl_stereographic.ipynb b/v0.14.0/_downloads/69d967f3356b6b0eaf7857553352e12d/cyl_stereographic.ipynb new file mode 100644 index 00000000000..9485e643e59 --- /dev/null +++ b/v0.14.0/_downloads/69d967f3356b6b0eaf7857553352e12d/cyl_stereographic.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Cylindrical stereographic projection\n\nThe cylindrical stereographic projections are certainly not as notable as other\ncylindrical projections, but are still used because of their relative\nsimplicity and their ability to overcome some of the downsides of other\ncylindrical projections, like extreme distortions of the higher latitudes. The\nstereographic projections are perspective projections, projecting the sphere\nonto a cylinder in the direction of the antipodal point on the equator. The\ncylinder crosses the sphere at two standard parallels, equidistant from the\nequator.\n\n**cyl_stere**/\\ [*lon0*/\\ [*lat0*/]]\\ *scale* or\n**Cyl_stere**/\\ [*lon0*/\\ [*lat0*/]]\\ *width*\n\nThe projection is set with **cyl_stere** or **Cyl_stere**. The central meridian\nis set by the optional *lon0*, and the figure size is set with *scale* or\n*width*.\n\nThe standard parallel is typically one of these (but can be any value):\n\n* 66.159467 - Miller's modified Gall\n* 55 - Kamenetskiy's First\n* 45 - Gall's Stereographic\n* 30 - Bolshoi Sovietskii Atlas Mira or Kamenetskiy's Second\n* 0 - Braun's Cylindrical\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n region=\"g\",\n projection=\"Cyl_stere/30/-20/12c\",\n frame=\"afg\",\n land=\"gray80\",\n water=\"steelblue\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/69dfa74bd5b002998c373dd4d75f94b3/coastlines.py b/v0.14.0/_downloads/69dfa74bd5b002998c373dd4d75f94b3/coastlines.py new file mode 100644 index 00000000000..5e611b3e2d3 --- /dev/null +++ b/v0.14.0/_downloads/69dfa74bd5b002998c373dd4d75f94b3/coastlines.py @@ -0,0 +1,83 @@ +""" +Coastlines and borders +====================== + +Plotting coastlines and borders is handled by :meth:`pygmt.Figure.coast`. +""" + +# %% +import pygmt + +# %% +# Shorelines +# ---------- +# +# Use the ``shorelines`` parameter to plot only the shorelines: + +fig = pygmt.Figure() +fig.basemap(region="g", projection="W15c", frame=True) +fig.coast(shorelines=True) +fig.show() + +# %% +# The shorelines are divided in 4 levels: +# +# 1. coastline +# 2. lakeshore +# 3. island-in-lake shore +# 4. lake-in-island-in-lake shore +# +# You can specify which level you want to plot by passing the level number and +# a GMT pen configuration. For example, to plot just the coastlines with 0.5p +# thickness and black lines: + +fig = pygmt.Figure() +fig.basemap(region="g", projection="W15c", frame=True) +fig.coast(shorelines="1/0.5p,black") +fig.show() + +# %% +# You can specify multiple levels (with their own pens) by passing a list to +# ``shorelines``: + +fig = pygmt.Figure() +fig.basemap(region="g", projection="W15c", frame=True) +fig.coast(shorelines=["1/1p,black", "2/0.5p,red"]) +fig.show() + + +# %% +# Resolutions +# ----------- +# +# The coastline database comes with 5 resolutions. The resolution drops by 80% +# between levels: +# +# 1. ``"c"``: crude +# 2. ``"l"``: low (default) +# 3. ``"i"``: intermediate +# 4. ``"h"``: high +# 5. ``"f"``: full + +oahu = [-158.3, -157.6, 21.2, 21.8] +fig = pygmt.Figure() +for res in ["c", "l", "i", "h", "f"]: + fig.coast(resolution=res, shorelines="1p", region=oahu, projection="M5c") + fig.shift_origin(xshift="5c") +fig.show() + + +# %% +# Land and water +# -------------- +# +# Use the ``land`` and ``water`` parameters to specify a fill color for land +# and water bodies. The colors can be given by name or hex codes (like the ones +# used in HTML and CSS): + +fig = pygmt.Figure() +fig.basemap(region="g", projection="W15c", frame=True) +fig.coast(land="#666666", water="skyblue") +fig.show() + +# sphinx_gallery_thumbnail_number = 5 diff --git a/v0.14.0/_downloads/6a1d1b2ae027f23aee169a088feec9cd/cartesian_histograms.zip b/v0.14.0/_downloads/6a1d1b2ae027f23aee169a088feec9cd/cartesian_histograms.zip new file mode 100644 index 00000000000..272971d3b33 Binary files /dev/null and b/v0.14.0/_downloads/6a1d1b2ae027f23aee169a088feec9cd/cartesian_histograms.zip differ diff --git a/v0.14.0/_downloads/6a280b1f28841023a89c73d94456ae54/choropleth_map.py b/v0.14.0/_downloads/6a280b1f28841023a89c73d94456ae54/choropleth_map.py new file mode 100644 index 00000000000..19376f3c61c --- /dev/null +++ b/v0.14.0/_downloads/6a280b1f28841023a89c73d94456ae54/choropleth_map.py @@ -0,0 +1,58 @@ +""" +Choropleth map +============== + +The :meth:`pygmt.Figure.plot` method allows us to plot geographical data such as +polygons which are stored in a :class:`geopandas.GeoDataFrame` object. Use +:func:`geopandas.read_file` to load data from any supported OGR format such as a +shapefile (.shp), GeoJSON (.geojson), geopackage (.gpkg), etc. You can also use a full +URL pointing to your desired data source. Then, pass the class:`geopandas.GeoDataFrame` +as an argument to the ``data`` parameter of :meth:`pygmt.Figure.plot`, and style the +geometry using the ``pen`` parameter. To fill the polygons based on a corresponding +column you need to set ``fill="+z"`` as well as select the appropriate column using the +``aspatial`` parameter as shown in the example below. +""" + +# %% +import geodatasets +import geopandas as gpd +import pygmt + +# Read the example dataset provided by geodatasets. +gdf = gpd.read_file(geodatasets.get_path("geoda airbnb")) +print(gdf) + +# %% +fig = pygmt.Figure() + +fig.basemap( + region=gdf.total_bounds[[0, 2, 1, 3]], + projection="M6c", + frame="+tPopulation of Chicago", +) + +# The dataset contains different attributes, here we select the "population" column to +# plot. + +# First, we define the colormap to fill the polygons based on the "population" column. +pygmt.makecpt( + cmap="acton", + series=[gdf["population"].min(), gdf["population"].max(), 10], + continuous=True, + reverse=True, +) + +# Next, we plot the polygons and fill them using the defined colormap. The target column +# is defined by the aspatial parameter. +fig.plot( + data=gdf, + pen="0.3p,gray10", + fill="+z", + cmap=True, + aspatial="Z=population", +) + +# Add colorbar legend. +fig.colorbar(frame="x+lPopulation", position="jML+o-0.5c+w3.5c/0.2c") + +fig.show() diff --git a/v0.14.0/_downloads/6af3db79cb38914879640f85f3b8f4ca/vector_heads_tails.py b/v0.14.0/_downloads/6af3db79cb38914879640f85f3b8f4ca/vector_heads_tails.py new file mode 100644 index 00000000000..58f61a7dbbf --- /dev/null +++ b/v0.14.0/_downloads/6af3db79cb38914879640f85f3b8f4ca/vector_heads_tails.py @@ -0,0 +1,84 @@ +r""" +Vector heads and tails +====================== + +Many methods in PyGMT allow plotting vectors with individual +heads and tails. For this purpose, several modifiers may be appended to +the corresponding vector-producing parameters for specifying the placement +of vector heads and tails, their shapes, and the justification of the vector. + +To place a vector head at the beginning of the vector path +simply append **+b** to the vector-producing option (use **+e** to place +one at the end). Optionally, append **t** for a terminal line, **c** for a +circle, **a** for arrow (default), **i** for tail, **A** for plain open +arrow, and **I** for plain open tail. Further append **l** or **r** (e.g. +``"+bar"``) to only draw the left or right half-sides of the selected head/tail +(default is both sides) or use **+l** or **+r** to apply simultaneously to both +beginning and end. In this context left and right refer to the side of the +vector line when viewed from the beginning point to the end point of a line +segment. The angle of the vector head apex can be set using **+a**\ *angle* +(default is 30). The shape of the vector head can be adjusted using +**+h**\ *shape* (e.g. ``"+h0.5"``). + +For further modifiers see :gmt-docs:`plot.html#vector-attributes`. + +In the following we use the :meth:`pygmt.Figure.plot` method to plot vectors +with individual heads and tails. We must specify the modifiers (together with +the vector type, here ``"v"`` for Cartesian vector, see also the +:doc:`Vector types example `) +by passing the corresponding shortcuts to the ``style`` parameter. + +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.basemap( + region=[0, 10, 0, 15], projection="X15c/10c", frame="+tVector heads and tails" +) + +x = 1 +y = 14 +angle = 0 # in degrees, measured counter-clockwise from horizontal +length = 7 + +for vecstyle in [ + # vector without head and tail (line) + "v0c", + # plain open arrow at beginning and end, angle of the vector head apex is + # set to 50 + "v0.6c+bA+eA+a50", + # plain open tail at beginning and end + "v0.4c+bI+eI", + # terminal line at beginning and end, angle of vector head apex is set + # to 80 + "v0.3c+bt+et+a80", + # arrow head at end + "v0.6c+e", + # circle at beginning and arrow head at end + "v0.6c+bc+ea", + # terminal line at beginning and arrow head at end + "v0.6c+bt+ea", + # arrow head at end, shape of vector head is set to 0.5 + "v1c+e+h0.5", + # modified arrow heads at beginning and end + "v1c+b+e+h0.5", + # tail at beginning and arrow with modified vector head at end + "v1c+bi+ea+h0.5", + # half-sided arrow head (right side) at beginning and arrow at the end + "v1c+bar+ea+h0.8", + # half-sided arrow heads at beginning (right side) and end (left side) + "v1c+bar+eal+h0.5", + # half-sided tail at beginning and arrow at end (right side for both) + "v1c+bi+ea+r+h0.5+a45", +]: + fig.plot( + x=x, y=y, style=vecstyle, direction=([angle], [length]), pen="2p", fill="red3" + ) + fig.text( + x=6, y=y, text=vecstyle, font="Courier-Bold", justify="ML", offset="0.2c/0c" + ) + y -= 1 # move the next vector down + +fig.show() diff --git a/v0.14.0/_downloads/6b83cfb8d478c1614b9787c132e6a9c7/multi_parameter_symbols.ipynb b/v0.14.0/_downloads/6b83cfb8d478c1614b9787c132e6a9c7/multi_parameter_symbols.ipynb new file mode 100644 index 00000000000..05dfadb13f0 --- /dev/null +++ b/v0.14.0/_downloads/6b83cfb8d478c1614b9787c132e6a9c7/multi_parameter_symbols.ipynb @@ -0,0 +1,79 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Multi-parameter symbols\n\nThe :meth:`pygmt.Figure.plot` method can plot individual multi-parameter symbols by\npassing the corresponding shortcuts (**e**, **j**, **r**, **R**, **w**) to the ``style``\nparameter:\n\n- **e**: ellipse\n- **j**: rotated rectangle\n- **r**: rectangle\n- **R**: rounded rectangle\n- **w**: pie wedge\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can plot multi-parameter symbols using the same symbol style. We need to define\nlocations (lon, lat) via the ``x`` and ``y`` parameters (scalar for a single symbol or\n1-D list for several ones) and two or three symbol parameters after those shortcuts\nvia the ``style`` parameter.\n\nThe multi-parameter symbols in the ``style`` parameter are defined as:\n\n- **e**: ellipse, ``direction/major_axis/minor_axis``\n- **j**: rotated rectangle, ``direction/width/height``\n- **r**: rectangle, ``width/height``\n- **R**: rounded rectangle, ``width/height/radius``\n- **w**: pie wedge, ``diameter/startdir/stopdir``, the last two arguments are\n directions given in degrees counter-clockwise from horizontal. Append **+i** and the\n desired value to apply an inner diameter.\n\nUpper-case versions **E**, **J**, and **W** are similar to **e**, **j**, and **w**\nbut expect geographic azimuths and distances.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[0, 7, 0, 2], projection=\"x3c\", frame=True)\n\n# Ellipse\nfig.plot(x=0.5, y=1, style=\"e45/3/1\", fill=\"orange\", pen=\"2p,black\")\n# Rotated rectangle\nfig.plot(x=1.5, y=1, style=\"j120/5/0.5\", fill=\"red3\", pen=\"2p,black\")\n# Rectangle\nfig.plot(x=3, y=1, style=\"r4/1.5\", fill=\"dodgerblue\", pen=\"2p,black\")\n# Rounded rectangle\nfig.plot(x=4.5, y=1, style=\"R1.25/4/0.5\", fill=\"seagreen\", pen=\"2p,black\")\n# Pie wedge\nfig.plot(x=5.5, y=1, style=\"w2.5/45/330\", fill=\"lightgray\", pen=\"2p,black\")\n# Ring sector\nfig.plot(x=6.5, y=1, style=\"w2.5/45/330+i1\", fill=\"lightgray\", pen=\"2p,black\")\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can also plot symbols with varying parameters via defining those values in a 2-D\nlist or numpy array (``[[parameters]]`` for a single symbol or\n``[[parameters_1],[parameters_2],[parameters_i]]`` for several ones) or using an\nappropriately formatted input file and passing it to ``data``.\n\nThe symbol parameters in the 2-D list or numpy array are defined as:\n\n- **e**: ellipse, ``[[lon, lat, direction, major_axis, minor_axis]]``\n- **j**: rotated rectangle, ``[[lon, lat, direction, width, height]]``\n- **r**: rectangle, ``[[lon, lat, width, height]]``\n- **R**: rounded rectangle, ``[[lon, lat, width, height, radius]]``\n- **w**: pie wedge, ``[[lon, lat, diameter, startdir, stopdir]]``, the last two\n arguments are directions given in degrees counter-clockwise from horizontal\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[0, 7, 0, 4], projection=\"x3c\", frame=[\"xa1f0.2\", \"ya0.5f0.1\"])\n\n# Ellipse\ndata = [[0.5, 1, 45, 3, 1], [0.5, 3, 135, 2, 1]]\nfig.plot(data=data, style=\"e\", fill=\"orange\", pen=\"2p,black\")\n# Rotated rectangle\ndata = [[1.5, 1, 120, 5, 0.5], [1.5, 3, 50, 3, 0.5]]\nfig.plot(data=data, style=\"j\", fill=\"red3\", pen=\"2p,black\")\n# Rectangle\ndata = [[3, 1, 4, 1.5], [3, 3, 3, 1.5]]\nfig.plot(data=data, style=\"r\", fill=\"dodgerblue\", pen=\"2p,black\")\n# Rounded rectangle\ndata = [[4.5, 1, 1.25, 4, 0.5], [4.5, 3, 1.25, 2.0, 0.2]]\nfig.plot(data=data, style=\"R\", fill=\"seagreen\", pen=\"2p,black\")\n# Pie wedge\ndata = [[5.5, 1, 2.5, 45, 330], [5.5, 3, 1.5, 60, 300]]\nfig.plot(data=data, style=\"w\", fill=\"lightgray\", pen=\"2p,black\")\n# Ring sector\ndata = [[6.5, 1, 2.5, 45, 330], [6.5, 3, 1.5, 60, 300]]\nfig.plot(data=data, style=\"w+i1\", fill=\"lightgray\", pen=\"2p,black\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/6bc2acfce37acb414f9446f87e6e6833/misc_van_der_grinten.py b/v0.14.0/_downloads/6bc2acfce37acb414f9446f87e6e6833/misc_van_der_grinten.py new file mode 100644 index 00000000000..f7098ff6c5c --- /dev/null +++ b/v0.14.0/_downloads/6bc2acfce37acb414f9446f87e6e6833/misc_van_der_grinten.py @@ -0,0 +1,23 @@ +r""" +Van der Grinten projection +========================== + +The Van der Grinten projection, presented by Alphons J. van der Grinten in +1904, is neither equal-area nor conformal. Central meridian and Equator are +straight lines; other meridians are arcs of circles. The scale is true along +the Equator only. Its main use is to show the entire world enclosed in a +circle. + +**v**\ [*lon0/*]\ *scale* or **V**\ [*lon0/*]\ *width* + +The projection is set with **v** or **V**. The central meridian is set with the +optional *lon0*, and the figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Use region "d" to specify global region (-180/180/-90/90) +fig.coast(region="d", projection="V12c", frame="afg", land="ivory", water="bisque4") +fig.show() diff --git a/v0.14.0/_downloads/6bd357dc31326ee70b4c2e749bdc67b1/scatter3d.ipynb b/v0.14.0/_downloads/6bd357dc31326ee70b4c2e749bdc67b1/scatter3d.ipynb new file mode 100644 index 00000000000..2bc676c12a5 --- /dev/null +++ b/v0.14.0/_downloads/6bd357dc31326ee70b4c2e749bdc67b1/scatter3d.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# 3-D scatter plots\n\nThe :meth:`pygmt.Figure.plot3d` method can be used to plot symbols in 3-D.\nIn the example below, we show how the\n[Iris flower dataset](https://en.wikipedia.org/wiki/Iris_flower_data_set)_\ncan be visualized using a perspective 3-D plot. The ``region``\nparameter has to include the $x$, $y$, $z$ axis limits in the\nform of (xmin, xmax, ymin, ymax, zmin, zmax), which can be done automatically\nusing :func:`pygmt.info`. To plot the z-axis frame, set ``frame`` as a\nminimum to something like ``frame=[\"WsNeZ\", \"zaf\"]``. Use ``perspective`` to\ncontrol the azimuth and elevation angle of the view, and ``zscale`` to adjust\nthe vertical exaggeration factor.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pandas as pd\nimport pygmt\n\n# Load sample iris data\ndf = pd.read_csv(\"https://github.com/mwaskom/seaborn-data/raw/master/iris.csv\")\n\n# Convert 'species' column to categorical dtype\n# By default, pandas sorts the individual categories in an alphabetical order.\n# For a non-alphabetical order, you have to manually adjust the list of\n# categories. For handling and manipulating categorical data in pandas,\n# have a look at:\n# https://pandas.pydata.org/docs/user_guide/categorical.html\ndf.species = df.species.astype(dtype=\"category\")\n\n# Make a list of the individual categories of the 'species' column\n# ['setosa', 'versicolor', 'virginica']\n# They are (corresponding to the categorical number code) by default in\n# alphabetical order and later used for the colorbar labels\nlabels = list(df.species.cat.categories)\n\n# Use pygmt.info to get region bounds (xmin, xmax, ymin, ymax, zmin, zmax)\n# The below example will return a numpy array [0.0, 3.0, 4.0, 8.0, 1.0, 7.0]\nregion = pygmt.info(\n data=df[[\"petal_width\", \"sepal_length\", \"petal_length\"]], # x, y, z columns\n per_column=True, # Report the min/max values per column as a numpy array\n # Round the min/max values of the first three columns to the nearest\n # multiple of 1, 2 and 0.5, respectively\n spacing=(1, 2, 0.5),\n)\n\n# Make a 3-D scatter plot, coloring each of the 3 species differently\nfig = pygmt.Figure()\n\n# Define a colormap for three categories, define the range of the\n# new discrete CPT using series=(lowest_value, highest_value, interval),\n# use color_model=\"+csetosa,versicolor,virginica\" to write the discrete color\n# palette \"cubhelix\" in categorical format and add the species names as\n# annotations for the colorbar\npygmt.makecpt(\n cmap=\"cubhelix\",\n # Use the minimum and maximum of the categorical number code\n # to set the lowest_value and the highest_value of the CPT\n series=(df.species.cat.codes.min(), df.species.cat.codes.max(), 1),\n # Convert ['setosa', 'versicolor', 'virginica'] to\n # 'setosa,versicolor,virginica'\n color_model=\"+c\" + \",\".join(labels),\n)\n\nfig.plot3d(\n # Use petal width, sepal length, and petal length as x, y, and z\n # data input, respectively\n x=df.petal_width,\n y=df.sepal_length,\n z=df.petal_length,\n # Vary each symbol size according to the sepal width, scaled by 0.1\n size=0.1 * df.sepal_width,\n # Use 3-D cubes (\"u\") as symbols with size in centimeters (\"c\")\n style=\"uc\",\n # Points colored by categorical number code (refers to the species)\n fill=df.species.cat.codes.astype(int),\n # Use colormap created by makecpt\n cmap=True,\n # Set map dimensions (xmin, xmax, ymin, ymax, zmin, zmax)\n region=region,\n # Set frame parameters\n frame=[\n \"WsNeZ3+tIris flower data set\", # z axis label positioned on 3rd corner, add title\n \"xafg+lPetal Width (cm)\",\n \"yafg+lSepal Length (cm)\",\n \"zafg+lPetal Length (cm)\",\n ],\n # Set perspective to azimuth NorthWest (315\u00b0), at elevation 25\u00b0\n perspective=[315, 25],\n # Vertical exaggeration factor\n zscale=1.5,\n)\n\n# Shift plot origin in x direction\nfig.shift_origin(xshift=\"3.1c\")\n# Add colorbar legend\nfig.colorbar()\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/6bf411f0d7d0c7006b98ac79e4998bef/conic_albers.zip b/v0.14.0/_downloads/6bf411f0d7d0c7006b98ac79e4998bef/conic_albers.zip new file mode 100644 index 00000000000..30aa312e270 Binary files /dev/null and b/v0.14.0/_downloads/6bf411f0d7d0c7006b98ac79e4998bef/conic_albers.zip differ diff --git a/v0.14.0/_downloads/6c5cf6de187fff381e9c36fe8755d2a1/cyl_transverse_mercator.py b/v0.14.0/_downloads/6c5cf6de187fff381e9c36fe8755d2a1/cyl_transverse_mercator.py new file mode 100644 index 00000000000..d904df283f8 --- /dev/null +++ b/v0.14.0/_downloads/6c5cf6de187fff381e9c36fe8755d2a1/cyl_transverse_mercator.py @@ -0,0 +1,30 @@ +r""" +Transverse Mercator projection +============================== + +The transverse Mercator was invented by Johann Heinrich Lambert in 1772. In +this projection the cylinder touches a meridian along which there is no +distortion. The distortion increases away from the central meridian and goes to +infinity at 90° from center. The central meridian, each meridian 90° away from +the center, and equator are straight lines; other parallels and meridians are +complex curves. + +**t**\ *lon0*\ [/\ *lat0*]/\ *scale* or **T**\ *lon0*\ [/\ *lat0*]/\ *width* + +The projection is set with **t** or **T**. The central meridian is set +by *lon0*, the latitude of the origin is set by the optional *lat0*, and the +figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.coast( + region=[20, 50, 30, 45], + projection="T35/12c", + frame="afg", + land="gray80", + water="steelblue", +) +fig.show() diff --git a/v0.14.0/_downloads/6da20f92d2be294f606e9dd517533243/grdgradient.ipynb b/v0.14.0/_downloads/6da20f92d2be294f606e9dd517533243/grdgradient.ipynb new file mode 100644 index 00000000000..37f9b3ff941 --- /dev/null +++ b/v0.14.0/_downloads/6da20f92d2be294f606e9dd517533243/grdgradient.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Calculating grid gradient and radiance\n\nThe :func:`pygmt.grdgradient` function calculates the gradient of a grid file.\nIn the example shown below we will see how to calculate a hillshade map based\non a Data Elevation Model (DEM). As input :func:`pygmt.grdgradient` gets\nan :class:`xarray.DataArray` object or a path string to a grid file, calculates\nthe respective gradient and returns it as an :class:`xarray.DataArray` object.\nWe will use the ``radiance`` parameter in order to set the illumination source\ndirection and altitude.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\n# Define region of interest around Yosemite valley\nregion = [-119.825, -119.4, 37.6, 37.825]\n\n# Load sample grid (3 arc-seconds global relief) in target area\ngrid = pygmt.datasets.load_earth_relief(resolution=\"03s\", region=region)\n\n# calculate the reflection of a light source projecting from west to east\n# (azimuth of 270 degrees) and at a latitude of 30 degrees from the horizon\ndgrid = pygmt.grdgradient(grid=grid, radiance=[270, 30])\n\nfig = pygmt.Figure()\n# define figure configuration\npygmt.config(FORMAT_GEO_MAP=\"ddd.x\", MAP_FRAME_TYPE=\"plain\")\n\n# --------------- plotting the original Data Elevation Model -----------\n\npygmt.makecpt(cmap=\"gray\", series=[200, 4000, 10])\nfig.grdimage(\n grid=grid,\n projection=\"M12c\",\n frame=[\"WSrt+tOriginal Data Elevation Model\", \"xa0.1\", \"ya0.1\"],\n cmap=True,\n)\n\nfig.colorbar(position=\"JML+o1.4c/0c+w7c/0.5c\", frame=[\"xa1000f500+lElevation\", \"y+lm\"])\n\n# --------------- plotting the hillshade map -----------\n\n# Shift plot origin of the second map by 12.5 cm in x direction\nfig.shift_origin(xshift=\"12.5c\")\n\npygmt.makecpt(cmap=\"gray\", series=[-1.5, 0.3, 0.01])\nfig.grdimage(\n grid=dgrid,\n projection=\"M12c\",\n frame=[\"lSEt+tHillshade Map\", \"xa0.1\", \"ya0.1\"],\n cmap=True,\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/6de12119bb508638a133a6081c6d7b77/text_symbols.zip b/v0.14.0/_downloads/6de12119bb508638a133a6081c6d7b77/text_symbols.zip new file mode 100644 index 00000000000..04d0bf9cbf5 Binary files /dev/null and b/v0.14.0/_downloads/6de12119bb508638a133a6081c6d7b77/text_symbols.zip differ diff --git a/v0.14.0/_downloads/6e7f6bea33a42fc5673bb62173ae0ebd/cyl_miller.zip b/v0.14.0/_downloads/6e7f6bea33a42fc5673bb62173ae0ebd/cyl_miller.zip new file mode 100644 index 00000000000..58f21246b1c Binary files /dev/null and b/v0.14.0/_downloads/6e7f6bea33a42fc5673bb62173ae0ebd/cyl_miller.zip differ diff --git a/v0.14.0/_downloads/6ef0d9e15dd7547721a2378987ce444c/image.ipynb b/v0.14.0/_downloads/6ef0d9e15dd7547721a2378987ce444c/image.ipynb new file mode 100644 index 00000000000..75d54736ef2 --- /dev/null +++ b/v0.14.0/_downloads/6ef0d9e15dd7547721a2378987ce444c/image.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Images on figures\n\nThe :meth:`pygmt.Figure.image` method can be used to read and place an image\nfile in many formats (e.g., png, jpg, eps, pdf) on a figure. We must specify\nthe filename via the ``imagefile`` parameter or simply use the filename as\nthe first argument. You can also use a full URL pointing to your desired image.\nThe ``position`` parameter allows us to set a reference point on the map for\nthe image.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from pathlib import Path\n\nimport pygmt\n\nfig = pygmt.Figure()\nfig.basemap(region=[0, 2, 0, 2], projection=\"X10c\", frame=True)\n\n# place and center the GMT logo from the GMT website to the position 1/1\n# on a basemap, scaled up to be 3 cm wide and draw a rectangular border\n# around the image\nfig.image(\n imagefile=\"https://www.generic-mapping-tools.org/_static/gmt-logo.png\",\n position=\"g1/1+w3c+jCM\",\n box=True,\n)\n\n# clean up the downloaded image in the current directory\nPath(\"gmt-logo.png\").unlink()\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/6f6095db5fa29b4442e2fdf406ade8e1/linefronts.zip b/v0.14.0/_downloads/6f6095db5fa29b4442e2fdf406ade8e1/linefronts.zip new file mode 100644 index 00000000000..33ded30419b Binary files /dev/null and b/v0.14.0/_downloads/6f6095db5fa29b4442e2fdf406ade8e1/linefronts.zip differ diff --git a/v0.14.0/_downloads/6fd14bfce3a2c083f968ef58cc8db9b0/bars.zip b/v0.14.0/_downloads/6fd14bfce3a2c083f968ef58cc8db9b0/bars.zip new file mode 100644 index 00000000000..5a47804c863 Binary files /dev/null and b/v0.14.0/_downloads/6fd14bfce3a2c083f968ef58cc8db9b0/bars.zip differ diff --git a/v0.14.0/_downloads/7042bb2a0f97836ab62fc29615161593/legend.zip b/v0.14.0/_downloads/7042bb2a0f97836ab62fc29615161593/legend.zip new file mode 100644 index 00000000000..2f85ff10337 Binary files /dev/null and b/v0.14.0/_downloads/7042bb2a0f97836ab62fc29615161593/legend.zip differ diff --git a/v0.14.0/_downloads/70a447d88a2a75dba36f14545a12573f/cyl_mercator.ipynb b/v0.14.0/_downloads/70a447d88a2a75dba36f14545a12573f/cyl_mercator.ipynb new file mode 100644 index 00000000000..21f1135fa82 --- /dev/null +++ b/v0.14.0/_downloads/70a447d88a2a75dba36f14545a12573f/cyl_mercator.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Mercator projection\n\nThe Mercator projection takes its name from the Flemish cartographer Gheert\nCremer, better known as Gerardus Mercator, who presented it in 1569. The\nprojection is a cylindrical and conformal, with no distortion along the\nequator. A major navigational feature of the projection is that a line of\nconstant azimuth is straight. Such a line is called a rhumb line or loxodrome.\nThus, to sail from one point to another one only had to connect the points with\na straight line, determine the azimuth of the line, and keep this constant\ncourse for the entire voyage. The Mercator projection has been used extensively\nfor world maps in which the distortion towards the polar regions grows\nrather large.\n\n**m**\\ [*lon0*/\\ [*lat0*/]]\\ *scale* or **M**\\ [*lon0*/\\ [*lat0*/]]\\ *width*\n\nThe projection is set with **m** or **M**. The central meridian is set with the\noptional *lon0* and the standard parallel is set with the optional *lat0*.\nThe figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n region=[0, 360, -80, 80],\n projection=\"M0/0/12c\",\n frame=\"afg\",\n land=\"gray80\",\n water=\"steelblue\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/7119e91bd2a74019b1541bb3aefcfb5c/shorelines.zip b/v0.14.0/_downloads/7119e91bd2a74019b1541bb3aefcfb5c/shorelines.zip new file mode 100644 index 00000000000..386a7c186fe Binary files /dev/null and b/v0.14.0/_downloads/7119e91bd2a74019b1541bb3aefcfb5c/shorelines.zip differ diff --git a/v0.14.0/_downloads/72036bd60f8150bf6b6ce3f793293f6c/linestyles.zip b/v0.14.0/_downloads/72036bd60f8150bf6b6ce3f793293f6c/linestyles.zip new file mode 100644 index 00000000000..74754136ee0 Binary files /dev/null and b/v0.14.0/_downloads/72036bd60f8150bf6b6ce3f793293f6c/linestyles.zip differ diff --git a/v0.14.0/_downloads/72cc0f422d759e4013fd91b8c060bfe8/grdgradient_shading.ipynb b/v0.14.0/_downloads/72cc0f422d759e4013fd91b8c060bfe8/grdgradient_shading.ipynb new file mode 100644 index 00000000000..78fd414ea33 --- /dev/null +++ b/v0.14.0/_downloads/72cc0f422d759e4013fd91b8c060bfe8/grdgradient_shading.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Calculating grid gradient with custom ``azimuth`` and ``normalize`` parameters\n\nThe :func:`pygmt.grdgradient` function calculates the gradient of a grid file.\nAs input, :func:`pygmt.grdgradient` gets an :class:`xarray.DataArray` object\nor a path string to a grid file. It then calculates the respective gradient\nand returns an :class:`xarray.DataArray` object. The example below sets two\nmain parameters:\n\n- ``azimuth`` to set the illumination light source direction (0\u00b0 is North,\n 90\u00b0 is East, 180\u00b0 is South, 270\u00b0 is West).\n- ``normalize`` to enhance the three-dimensional sense of the topography.\n\nThe ``normalize`` parameter calculates the azimuthal gradient of each point\nalong a certain azimuth angle, then adjusts the brightness value of the color\naccording to the positive/negative of the azimuthal gradient and the amplitude\nof each point.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\n# Load the 3 arc-minutes global relief grid in the target area around Caucasus\ngrid = pygmt.datasets.load_earth_relief(resolution=\"03m\", region=[35, 50, 35, 45])\n\nfig = pygmt.Figure()\n\n# Define a colormap to be used for topography\npygmt.makecpt(cmap=\"terra\", series=[-7000, 7000])\n\n# Define figure configuration\npygmt.config(FONT_TITLE=\"10p,5\", MAP_TITLE_OFFSET=\"1p\", MAP_FRAME_TYPE=\"plain\")\n\n# Setup subplot panels with three rows and four columns\nwith fig.subplot(\n nrows=3,\n ncols=4,\n figsize=(\"28c\", \"21c\"),\n sharex=\"b\",\n sharey=\"l\",\n):\n # E.g. \"0/90\" illuminates light source from the North (top) and East\n # (right), and so on\n for azi in [\"0/90\", \"0/300\", \"180/225\"]:\n # \"e\" and \"t\" are cumulative Laplace distribution and cumulative\n # Cauchy distribution, respectively\n # \"amp\" (e.g. 1 or 10) controls the brightness value of the color\n for nor in [\"t1\", \"e1\", \"t10\", \"e10\"]:\n # Making an intensity DataArray using azimuth and normalize\n # parameters\n shade = pygmt.grdgradient(grid=grid, azimuth=azi, normalize=nor)\n fig.grdimage(\n grid=grid,\n shading=shade,\n projection=\"M?\",\n frame=[\"a4f2\", f\"+tazimuth={azi}, normalize={nor}\"],\n cmap=True,\n panel=True,\n )\n\nfig.colorbar(position=\"JBC+w10c/0.25c+h\", frame=\"xa2000f500+lElevation (m)\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/73e444f6b00eb44c749ba780bb32ecd7/cartesian_logarithmic.py b/v0.14.0/_downloads/73e444f6b00eb44c749ba780bb32ecd7/cartesian_logarithmic.py new file mode 100644 index 00000000000..ef354dba73f --- /dev/null +++ b/v0.14.0/_downloads/73e444f6b00eb44c749ba780bb32ecd7/cartesian_logarithmic.py @@ -0,0 +1,45 @@ +r""" +Cartesian logarithmic +===================== + +**X**\ *width*\ [**l**][/*height*\ [**l**]] or +**x**\ *x-scale*\ [**l**][/*y-scale*\ [**l**]] + +Give the *width* of the figure and the optional *height*. +The lower-case version **x** is similar to **X** but expects +an *x-scale* and an optional *y-scale*. +Each axis with a logarithmic transformation requires **l** after +its size argument. +""" + +# %% +import numpy as np +import pygmt + +# Create a list of x-values 0-100 +xline = np.arange(0, 101) +# Create a list of y-values that are the square root of the x-values +yline = xline**0.5 +# Create a list of x-values for every 10 in 0-100 +xpoints = np.arange(0, 101, 10) +# Create a list of y-values that are the square root of the x-values +ypoints = xpoints**0.5 + +fig = pygmt.Figure() +fig.basemap( + region=[1, 100, 0, 10], + # Set a logarithmic transformation on the x-axis + projection="X15cl/10c", + # Set the figures frame and color as well as + # annotations, ticks, and gridlines + frame=["WSne+gbisque", "xa2g3", "ya2f1g2"], +) + +# Set the line thickness to "2p", the color to "black", and the style to "dashed" +fig.plot(x=xline, y=yline, pen="2p,black,dashed") + +# Plot the square root values on top of the line +# Use squares with a size of 0.3 centimeters, an "orange" fill and a "black" outline +# Symbols are not clipped if they go off the figure +fig.plot(x=xpoints, y=ypoints, style="s0.3c", fill="orange", pen="black", no_clip=True) +fig.show() diff --git a/v0.14.0/_downloads/746a79d31f965fae170f0c181990312a/image.zip b/v0.14.0/_downloads/746a79d31f965fae170f0c181990312a/image.zip new file mode 100644 index 00000000000..b70931c64da Binary files /dev/null and b/v0.14.0/_downloads/746a79d31f965fae170f0c181990312a/image.zip differ diff --git a/v0.14.0/_downloads/75350e85fef4d6b5246c61e614ccee6e/grdgradient.zip b/v0.14.0/_downloads/75350e85fef4d6b5246c61e614ccee6e/grdgradient.zip new file mode 100644 index 00000000000..cc40ad4c5fc Binary files /dev/null and b/v0.14.0/_downloads/75350e85fef4d6b5246c61e614ccee6e/grdgradient.zip differ diff --git a/v0.14.0/_downloads/7799e5971b8f76a924cbdeeba65748d7/ternary.ipynb b/v0.14.0/_downloads/7799e5971b8f76a924cbdeeba65748d7/ternary.ipynb new file mode 100644 index 00000000000..6a973e31793 --- /dev/null +++ b/v0.14.0/_downloads/7799e5971b8f76a924cbdeeba65748d7/ternary.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Ternary diagram\n\nThe :meth:`pygmt.Figure.ternary` method can draw ternary diagrams. The example\nshows how to plot circles with a diameter of 0.1 centimeters\n(``style=\"c0.1c\"``) on a 10-centimeters-wide (``width=\"10c\"``) ternary diagram\nat the positions listed in the first three columns of the sample dataset\n``rock_compositions``, with default annotations and gridline spacings, using\nthe specified labeling defined via ``alabel``, ``blabel``, and ``clabel``.\nPoints are colored based on the values given in the fourth columns of the\nsample dataset via ``cmap=True``.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n\n# Load sample data\ndata = pygmt.datasets.load_sample_data(name=\"rock_compositions\")\n\n# Define a colormap to be used for the values given in the fourth column\n# of the input dataset\npygmt.makecpt(cmap=\"batlow\", series=[0, 80, 10])\n\nfig.ternary(\n data,\n region=[0, 100, 0, 100, 0, 100],\n width=\"10c\",\n style=\"c0.1c\",\n alabel=\"Limestone\",\n blabel=\"Water\",\n clabel=\"Air\",\n cmap=True,\n frame=[\n \"aafg+lLimestone component+u %\",\n \"bafg+lWater component+u %\",\n \"cafg+lAir component+u %\",\n ],\n)\n\n# Add a colorbar indicating the values given in the fourth column of\n# the input dataset\nfig.colorbar(position=\"JBC+o0c/1.5c\", frame=\"x+lPermittivity\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/78352b72d66ee416c1a6f6886a05fe7f/grdview_surface.py b/v0.14.0/_downloads/78352b72d66ee416c1a6f6886a05fe7f/grdview_surface.py new file mode 100644 index 00000000000..9b5bbdede1d --- /dev/null +++ b/v0.14.0/_downloads/78352b72d66ee416c1a6f6886a05fe7f/grdview_surface.py @@ -0,0 +1,66 @@ +""" +Plotting a surface +================== + +The :meth:`pygmt.Figure.grdview()` method can plot 3-D surfaces with +``surftype="s"``. Here, we supply the data as an :class:`xarray.DataArray` with +the coordinate vectors ``x`` and ``y`` defined. Note that the ``perspective`` +parameter here controls the azimuth and elevation angle of the view. We provide +a list of two arguments to ``frame`` - the first argument specifies the +:math:`x`- and :math:`y`-axes frame attributes and the second argument, +prepended with ``"z"``, specifies the :math:`z`-axis frame attributes. +Specifying the same scale for the ``projection`` and ``zscale`` parameters +ensures equal axis scaling. The ``shading`` parameter specifies illumination; +here we choose an azimuth of 45° with ``shading="+a45"``. +""" + +# %% +import numpy as np +import pygmt +import xarray as xr + + +# Define an interesting function of two variables, see: +# https://en.wikipedia.org/wiki/Ackley_function +def ackley(x, y): + """ + Ackley function. + """ + return ( + -20 * np.exp(-0.2 * np.sqrt(0.5 * (x**2 + y**2))) + - np.exp(0.5 * (np.cos(2 * np.pi * x) + np.cos(2 * np.pi * y))) + + np.exp(1) + + 20 + ) + + +# Create gridded data +INC = 0.05 +x = np.arange(-5, 5 + INC, INC) +y = np.arange(-5, 5 + INC, INC) +data = xr.DataArray(ackley(*np.meshgrid(x, y)), coords=(x, y)) + +fig = pygmt.Figure() + +# Plot grid as a 3-D surface +SCALE = 0.5 # in centimeters +fig.grdview( + data, + # Set annotations and gridlines in steps of five, and + # tick marks in steps of one + frame=["a5f1g5", "za5f1g5"], + projection=f"x{SCALE}c", + zscale=f"{SCALE}c", + surftype="s", + cmap="roma", + perspective=[135, 30], # Azimuth southeast (135°), at elevation 30° + shading="+a45", +) + +# Add colorbar for gridded data +fig.colorbar( + frame="a2f1", # Set annotations in steps of two, tick marks in steps of one + position="JMR", # Place colorbar in the Middle Right (MR) corner +) + +fig.show() diff --git a/v0.14.0/_downloads/78757fb7fa0e1b4d4b44a2685bb3e559/polar.ipynb b/v0.14.0/_downloads/78757fb7fa0e1b4d4b44a2685bb3e559/polar.ipynb new file mode 100644 index 00000000000..5f004ed6cfa --- /dev/null +++ b/v0.14.0/_downloads/78757fb7fa0e1b4d4b44a2685bb3e559/polar.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Polar\n\nPolar projections allow plotting polar coordinate data (e.g. angle $\\theta$ and\nradius *r*).\n\nThe full syntax for polar projections is:\n\n**P**\\ *width*\\ [**+a**]\\ [**+f**\\ [**e**\\|\\ **p**\\|\\ *radius*]]\\\n[**+r**\\ *offset*][**+t**\\ *origin*][**+z**\\ [**p**\\|\\ *radius*]]\n\nLimits are set via the ``region`` parameter\n([*theta_min*, *theta_max*, *radius_min*, *radius_max*]). When using **P**\\ *width* you\nhave to give the *width* of the figure. The lower-case version **p** is similar to **P**\nbut expects a *scale* instead of a width (**p**\\ *scale*).\n\nThe following customizing modifiers are available:\n\n- **+a**: by default, $\\theta$ refers to the angle that is equivalent to a\n counterclockwise rotation with respect to the east direction (standard definition);\n **+a** indicates that the input data are rotated clockwise relative to the north\n direction (geographical azimuth angle).\n\n- **+r**\\ *offset*: represents the offset of the r-axis. This modifier allows you to\n offset the center of the circle from r=0.\n\n- **+t**\\ *origin*: sets the angle corresponding to the east direction which is\n equivalent to rotating the entire coordinate axis clockwise; if the **+a** modifier\n is used, setting the angle corresponding to the north direction is equivalent to\n rotating the entire coordinate axis counterclockwise.\n\n- **+f**: reverses the radial direction.\n\n - Append **e** to indicate that the r-axis is an elevation angle, and the range of the\n r-axis should be between 0\u00b0 and 90\u00b0.\n - Appending **p** sets the current Earth radius (determined by\n :gmt-term:`PROJ_ELLIPSOID`) to the maximum value of the r-axis when the r-axis is\n reversed.\n - Append *radius* to set the maximum value of the r-axis.\n\n- **+z**: indicates that the r-axis is marked as depth instead of radius (e.g.,\n *r = radius - z*).\n\n - Append **p** to set radius to the current Earth radius.\n - Append *radius* to set the value of the radius.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n\npygmt.config(FONT_TITLE=\"14p,Courier,black\", FORMAT_GEO_MAP=\"+D\")\n\n# ============\n# Top left\nfig.basemap(\n # Set map limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1\n region=[0, 360, 0, 1],\n # Set map width to 5 cm\n projection=\"P5c\",\n # Set the frame and title; @^ allows for a line break within the title\n frame=[\"xa45f\", \"+gbisque+tprojection='P5c' @^ region=[0, 360, 0, 1]\"],\n)\n\nfig.shift_origin(xshift=\"w+3c\")\n\n# ============\n# Top middle\nfig.basemap(\n # Set map limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1\n region=[0, 360, 0, 1],\n # Set map width to 5 cm and interpret input data as geographic azimuth instead of\n # standard angle\n projection=\"P5c+a\",\n # Set the frame and title; @^ allows for a line break within the title\n frame=[\"xa45f\", \"+gbisque+tprojection='P5c+a' @^ region=[0, 360, 0, 1]\"],\n)\n\nfig.shift_origin(xshift=\"w+3c\")\n\n# ============\n# Top right\nfig.basemap(\n # Set map limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1\n region=[0, 90, 0, 1],\n # Set map width to 5 cm and interpret input data as geographic azimuth instead of\n # standard angle\n projection=\"P5c+a\",\n # Set the frame and title; @^ allows for a line break within the title\n frame=[\"xa45f\", \"ya0.2\", \"WNe+gbisque+tprojection='P5c+a' @^ region=[0, 90, 0, 1]\"],\n)\n\nfig.shift_origin(xshift=\"-2w-6c\", yshift=\"-h-2c\")\n\n# ============\n# Bottom left\nfig.basemap(\n # Set map limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1\n region=[0, 90, 0, 1],\n # Set map width to 5 cm and interpret input data as geographic azimuth instead of\n # standard angle, rotate coordinate system counterclockwise by 45 degrees\n projection=\"P5c+a+t45\",\n # Set the frame and title; @^ allows for a line break within the title\n frame=[\n \"xa30f\",\n \"ya0.2\",\n \"WNe+gbisque+tprojection='P5c+a+t45' @^ region=[0, 90, 0, 1]\",\n ],\n)\n\nfig.shift_origin(xshift=\"w+3c\", yshift=\"1.3c\")\n\n# ============\n# Bottom middle\nfig.basemap(\n # Set map limits to theta_min = 0, theta_max = 90, radius_min = 3480,\n # radius_max = 6371 (Earth's radius)\n region=[0, 90, 3480, 6371],\n # Set map width to 5 cm and interpret input data as geographic azimuth instead of\n # standard angle, rotate coordinate system counterclockwise by 45 degrees\n projection=\"P5c+a+t45\",\n # Set the frame, and title; @^ allows for a line break within the title\n frame=[\n \"xa30f\",\n \"ya\",\n \"WNse+gbisque+tprojection='P5c+a+t45' @^ region=[0, 90, 3480, 6371]\",\n ],\n)\n\nfig.shift_origin(xshift=\"w+3c\")\n\n# ============\n# Bottom right\nfig.basemap(\n # Set map limits to theta_min = 0, theta_max = 90, radius_min = 3480,\n # radius_max = 6371 (Earth's radius)\n region=[0, 90, 3480, 6371],\n # Set map width to 5 cm and interpret input data as geographic azimuth instead of\n # standard angle, rotate coordinate system counterclockwise by 45 degrees, r-axis\n # is marked as depth\n projection=\"P5c+a+t45+z\",\n # Set the frame, and title; @^ allows for a line break within the title\n frame=[\n \"xa30f\",\n \"ya\",\n \"WNse+gbisque+tprojection='P5c+a+t45+\\\\z' @^ region=[0, 90, 3480, 6371]\",\n ],\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/7a1a6cb39baa0ad3b6af336a62e88ee3/cyl_universal_transverse_mercator.zip b/v0.14.0/_downloads/7a1a6cb39baa0ad3b6af336a62e88ee3/cyl_universal_transverse_mercator.zip new file mode 100644 index 00000000000..5c9aea46a4a Binary files /dev/null and b/v0.14.0/_downloads/7a1a6cb39baa0ad3b6af336a62e88ee3/cyl_universal_transverse_mercator.zip differ diff --git a/v0.14.0/_downloads/7a30faf1c8f29acf302f168b374c3f34/velo_arrow_ellipse.zip b/v0.14.0/_downloads/7a30faf1c8f29acf302f168b374c3f34/velo_arrow_ellipse.zip new file mode 100644 index 00000000000..140742cec63 Binary files /dev/null and b/v0.14.0/_downloads/7a30faf1c8f29acf302f168b374c3f34/velo_arrow_ellipse.zip differ diff --git a/v0.14.0/_downloads/7bfbb7228c71b544ee387147c4c27615/bars.py b/v0.14.0/_downloads/7bfbb7228c71b544ee387147c4c27615/bars.py new file mode 100644 index 00000000000..4d90bf54771 --- /dev/null +++ b/v0.14.0/_downloads/7bfbb7228c71b544ee387147c4c27615/bars.py @@ -0,0 +1,72 @@ +r""" +Vertical or horizontal bars +=========================== + +The :meth:`pygmt.Figure.plot` method can plot vertical (**b**) or +horizontal (**B**) bars by passing the corresponding shortcut to +the ``style`` parameter. By default, *base* = 0 meaning that the +bar is starting from 0. Append **+b**\[*base*] to change this +value. To plot multi-band bars, please append +**+v**\|\ **i**\ *ny* (for verticals bars) or **+v**\|\ **i**\ *nx* +(for horizontal ones), where *ny* or *nx* indicate the total +number of bands in the bar (and hence the number of values required +to follow the *x,y* coordinate pair in the input). Here, **+i** +means we must accumulate the bar values from the increments +*dy* or *dx*, while **+v** means we get the complete values relative +to base. Normally, the bands are plotted as sections of a final +single bar. Use **+s** to instead split the bar into *ny* or *nx* +side-by-side, individual and thinner bars. Multi-band bars require +``cmap=True`` with one color per band. +""" + +# %% +import pygmt + +fig = pygmt.Figure() + +pygmt.makecpt(cmap="roma", series=[0, 4, 1]) + +with fig.subplot( + nrows=2, + ncols=2, + subsize=("8c", "4c"), + frame="ag", + sharey=True, + sharex=True, + margins=["0.5c", "0.75c"], +): + pen = "1.5p" + with fig.set_panel(panel=0): + fill = "skyblue" + fig.basemap(region=[0, 4, 0, 3], frame="+tvertical bars") + fig.plot(x=1, y=2, style="b0.5c", fill=fill, pen=pen) + fig.plot(x=2, y=2.5, style="b1c", fill=fill, pen=pen) + # +b1 means that the bar is starting from y=1 here + fig.plot(x=3, y=2.5, style="b0.75c+b1", fill=fill, pen=pen) + + with fig.set_panel(panel=1): + fill = "tomato" + fig.basemap(region=[0, 4, 0, 3], frame="+thorizontal bars") + fig.plot(x=1.5, y=0.5, style="B0.75c", fill=fill, pen=pen) + fig.plot(x=3, y=1.5, style="B1c", fill=fill, pen=pen) + # +b2 means that the bar is starting from x=2 here + fig.plot(x=3.5, y=2.5, style="B0.5c+b2", fill=fill, pen=pen) + + # generate dictionary for plotting multi-band bars + data = { + "x1": [0.25, 1.25], + "y": [1, 2], + "x2": [0.65, 0.5], + "x3": [0.4, 1.25], + "x4": [2.25, 0.75], + } + + with fig.set_panel(panel=2): + fig.basemap(region=[0, 4, 0, 3], frame="+tstacked bars") + fig.plot(data=data, style="B0.75c+i4", cmap=True, pen=pen) + + with fig.set_panel(panel=3): + fig.basemap(region=[0, 4, 0, 3], frame="+tsplit bars") + fig.plot(data=data, style="B1c+v4+s", cmap=True, pen=pen) + +fig.show() diff --git a/v0.14.0/_downloads/7c11a9823b195c3b370a8d39f2d774b5/linestyles.py b/v0.14.0/_downloads/7c11a9823b195c3b370a8d39f2d774b5/linestyles.py new file mode 100644 index 00000000000..9bfa664ff11 --- /dev/null +++ b/v0.14.0/_downloads/7c11a9823b195c3b370a8d39f2d774b5/linestyles.py @@ -0,0 +1,58 @@ +""" +Line styles +=========== + +The :meth:`pygmt.Figure.plot` method can plot lines in different styles. +The default line style is a 0.25-point wide, black, solid line, and can be +customized with the ``pen`` parameter. + +A *pen* in GMT has three attributes: *width*, *color*, and *style*. +The *style* attribute controls the appearance of the line. +Giving ``"dotted"`` or ``"."`` yields a dotted line, whereas a dashed pen is +requested with ``"dashed"`` or ``"-"``. Also combinations of dots and dashes, +like ``".-"`` for a dot-dashed line, are allowed. + +For more advanced *pen* attributes, see the GMT Technical Reference +:gmt-docs:`reference/features.html#wpen-attrib`. + +""" + +# %% +import numpy as np +import pygmt + +# Generate a two-point line for plotting +x = np.array([0, 7]) +y = np.array([9, 9]) + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 10], projection="X15c/8c", frame="+tLine Styles") + +# Plot the line using the default line style +fig.plot(x=x, y=y) +fig.text(x=x[-1], y=y[-1], text="solid (default)", justify="ML", offset="0.2c/0c") + +# Plot the line using different line styles +for linestyle in [ + "1p,red,-", # dashed line + "1p,blue,.", # dotted line + "1p,lightblue,-.", # dash-dotted line + "2p,blue,..-", # dot-dot-dashed line + "2p,tomato,--.", # dash-dash-dotted line + # A pattern of 4-point-long line segments and 2-point-long gaps between + # segments, with pattern offset by 2 points from the origin + "2p,tomato,4_2:2p", +]: + y -= 1 # Move the current line down + fig.plot(x=x, y=y, pen=linestyle) + fig.text(x=x[-1], y=y[-1], text=linestyle, justify="ML", offset="0.2c/0c") + +# Plot the line like a railway track (black/white). +# The trick here is plotting the same line twice but with different line styles +y -= 1 # move the current line down +fig.plot(x=x, y=y, pen="5p,black") +fig.plot(x=x, y=y, pen="4p,white,20p_20p") +fig.text(x=x[-1], y=y[-1], text="5p,black", justify="ML", offset="0.2c/0.2c") +fig.text(x=x[-1], y=y[-1], text="4p,white,20p_20p", justify="ML", offset="0.2c/-0.2c") + +fig.show() diff --git a/v0.14.0/_downloads/7cd8ec7232cc9b25806019a725190284/blockm.py b/v0.14.0/_downloads/7cd8ec7232cc9b25806019a725190284/blockm.py new file mode 100644 index 00000000000..9c1633150db --- /dev/null +++ b/v0.14.0/_downloads/7cd8ec7232cc9b25806019a725190284/blockm.py @@ -0,0 +1,61 @@ +""" +Blockmean +========= + +The :func:`pygmt.blockmean` function calculates different quantities +inside blocks/bins whose dimensions are defined via the ``spacing`` parameter. +The following examples show how to calculate the averages of the given values +inside each bin and how to report the number of points inside each bin. +""" + +# %% +import pygmt + +# Load sample data +data = pygmt.datasets.load_sample_data(name="japan_quakes") +# Select only needed columns +data = data[["longitude", "latitude", "depth_km"]] + +# Set the region for the plot +region = [130, 152.5, 32.5, 52.5] +# Define spacing in x and y direction (150x150 arc-minute blocks) +spacing = "150m" + +fig = pygmt.Figure() + +# Calculate mean depth in kilometers from all events within +# 150x150 arc-minute bins using blockmean +df = pygmt.blockmean(data=data, region=region, spacing=spacing) +# Convert to grid +grd = pygmt.xyz2grd(data=df, region=region, spacing=spacing) + +fig.grdimage( + grid=grd, + region=region, + frame=["af", "+tMean earthquake depth inside each block"], + cmap="batlow", +) +# Plot slightly transparent landmasses on top +fig.coast(land="darkgray", transparency=40) +# Plot original data points +fig.plot(x=data.longitude, y=data.latitude, style="c0.3c", fill="white", pen="1p,black") +fig.colorbar(frame="x+lkm") + +fig.shift_origin(xshift="w+5c") + +# Calculate number of total locations within 150x150 arc-minute bins +# with blockmean's summary parameter +df = pygmt.blockmean(data=data, region=region, spacing=spacing, summary="n") +grd = pygmt.xyz2grd(data=df, region=region, spacing=spacing) + +fig.grdimage( + grid=grd, + region=region, + frame=["af", "+tNumber of points inside each block"], + cmap="batlow", +) +fig.coast(land="darkgray", transparency=40) +fig.plot(x=data.longitude, y=data.latitude, style="c0.3c", fill="white", pen="1p,black") +fig.colorbar(frame="x+lcount") + +fig.show() diff --git a/v0.14.0/_downloads/7cfc8b1803b652afb4ccb04ae46fba41/03_figure_element.ipynb b/v0.14.0/_downloads/7cfc8b1803b652afb4ccb04ae46fba41/03_figure_element.ipynb new file mode 100644 index 00000000000..e901d2f34e2 --- /dev/null +++ b/v0.14.0/_downloads/7cfc8b1803b652afb4ccb04ae46fba41/03_figure_element.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# 3. Figure elements\n\nThe figure below shows the naming of figure elements in PyGMT.\n\n- :meth:`pygmt.Figure()`: having a number of plotting methods. Every new\n figure must start with the creation of a :meth:`pygmt.Figure()` instance\n- ``frame``: setting plot or map boundaries (a combination of the single\n letters of **WSNE**, **wsne**, or **lbtr**), adding annotations, ticks,\n gridlines (**afg**), axis labels (**+l**), and title (**+t**), e.g.,\n in :meth:`pygmt.Figure.basemap`. Detailed examples can be found at\n :doc:`frame and axes attributes `\n- :meth:`pygmt.Figure.plot`: plotting lines or symbols based on ``pen``\n or ``style`` parameters, respectively\n- :meth:`pygmt.Figure.text`: plotting text strings whereby the ``font``\n parameter adjusts fontsize, fontstyle, and color\n- :meth:`pygmt.Figure.legend`: showing the naming of lines or symbols while\n the ``label`` is given in :meth:`pygmt.Figure.plot`\n- :meth:`pygmt.Figure.show`: previewing the content added to the current\n figure instance\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n\nx = range(0, 11, 2)\ny_1 = [10, 11, 15, 8, 9, 13]\ny_2 = [4, 5, 6, 3, 5, 5]\n\nfig.basemap(\n region=[0, 10, 0, 20],\n projection=\"X10c/8c\",\n frame=[\"WStr+tTitle\", \"xa2f1g2+lxlabel\", \"ya5f1g5+lylabel\"],\n)\nfig.plot(x=x, y=y_1, style=\"t0.3c\", label=\"fig.plot (style)\")\nfig.plot(x=x, y=y_2, pen=\"1.5p,red\", label=\"fig.plot (pen)\")\n\nmainexplain = {\"font\": \"12p,2,darkblue\", \"justify\": \"TC\", \"no_clip\": True}\nminorexplain = {\"font\": \"10p,8\", \"justify\": \"TC\", \"no_clip\": True}\n# ============ Figure\nfig.text(x=12, y=22, text=\"Figure\", **mainexplain)\nfig.text(x=12, y=20.8, text=\"pygmt.Figure()\", **minorexplain)\n# ============ Title\nfig.text(x=7.5, y=22, text='frame=\"+tTitle\"', **minorexplain)\n# ============ xlabel\nfig.text(x=5, y=-3, text='frame=\"x+lxlabel\"', **minorexplain)\n# ============ ylabel\nfig.text(x=-1.7, y=10, text='frame=\"y+lylabel\"', angle=90, **minorexplain)\n# ============ x-majorticks\nfig.plot(x=10, y=-0.2, style=\"c1c\", pen=\"2p,darkblue\", no_clip=True)\nfig.text(x=10, y=-1.6, text=\"Annotation\", **mainexplain)\nfig.text(x=10, y=-2.8, text='frame=\"xa2\"', **minorexplain)\n# ============ y-majorticks\nfig.plot(x=-0.2, y=20, style=\"c1c\", pen=\"2p,darkblue\", no_clip=True)\nfig.text(x=0, y=23.4, text=\"Annotation\", **mainexplain)\nfig.text(x=0, y=22.2, text='frame=\"ya5\"', **minorexplain)\n# ============ x-minorticks\nfig.plot(x=1, y=-0.2, style=\"c0.7c\", pen=\"2p,darkblue\", no_clip=True)\nfig.text(x=1, y=-1.4, text=\"Frame\", **mainexplain)\nfig.text(x=1, y=-2.6, text='frame=\"xf1\"', **minorexplain)\n# ============ y-minorticks\nfig.plot(x=0, y=2, style=\"c0.7c\", pen=\"2p,darkblue\", no_clip=True)\nfig.text(x=-1.5, y=1, text='frame=\"yf1\"', **minorexplain)\n# ============ Grid\nfig.plot(x=2, y=15, style=\"c0.5c\", pen=\"2p,darkblue\")\nfig.text(x=2, y=17, text=\"Grid\", **mainexplain)\nfig.text(x=2.4, y=18, text='frame=[\"xg2\", \"yg5\"]', **minorexplain)\n# ============ Map Boundaries\nfig.plot(x=10, y=9, style=\"c0.5c\", pen=\"2p,darkblue\", no_clip=True)\nfig.text(x=11.5, y=8, text=\"Map Boundary\", **mainexplain)\nfig.text(x=11.5, y=6.8, text='frame=\"WStr\"', **minorexplain)\n# ============ fig.plot (style)\nfig.plot(x=6, y=8, style=\"c0.7c\", pen=\"2p,darkblue\")\nfig.text(x=7, y=6.5, text=\"fig.plot(style)\", **minorexplain)\n# ============ fig.plot (pen)\nfig.plot(x=4, y=6, style=\"c0.7c\", pen=\"2p,darkblue\")\nfig.text(x=3, y=4.5, text=\"fig.plot(pen)\", **minorexplain)\n# ============ Legend\nfig.legend()\nfig.text(x=8, y=16.9, text=\"Legend\", **mainexplain)\nfig.text(x=8, y=15.8, text=\"fig.legend()\", **minorexplain)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/7ddba3821245b456fdde82608ba2e214/blockm.zip b/v0.14.0/_downloads/7ddba3821245b456fdde82608ba2e214/blockm.zip new file mode 100644 index 00000000000..aae064174b3 Binary files /dev/null and b/v0.14.0/_downloads/7ddba3821245b456fdde82608ba2e214/blockm.zip differ diff --git a/v0.14.0/_downloads/7f176ee20197e3bcd262b88c96f43a8d/misc_eckertIV.ipynb b/v0.14.0/_downloads/7f176ee20197e3bcd262b88c96f43a8d/misc_eckertIV.ipynb new file mode 100644 index 00000000000..2d536306d34 --- /dev/null +++ b/v0.14.0/_downloads/7f176ee20197e3bcd262b88c96f43a8d/misc_eckertIV.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Eckert IV equal-area projection\n\nThe Eckert IV projection, presented by the German cartographer Max\nEckert-Greiffendorff in 1906, is a pseudo-cylindrical equal-area projection.\nCentral meridian and all parallels are straight lines; other meridians are\nequally spaced elliptical arcs. The scale is true along latitude 40\u00b030'.\n\n**kf**\\ [*lon0/*]\\ *scale* or **Kf**\\ [*lon0/*]\\ *width*\n\nThe projection is set with **kf** or **Kf**. The central meridian is set with\nthe optional *lon0*, and the figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Use region \"d\" to specify global region (-180/180/-90/90)\nfig.coast(region=\"d\", projection=\"Kf12c\", frame=\"afg\", land=\"ivory\", water=\"bisque4\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/80d329a84ca0d65c09ee87631542a96f/inset_rectangle_region.zip b/v0.14.0/_downloads/80d329a84ca0d65c09ee87631542a96f/inset_rectangle_region.zip new file mode 100644 index 00000000000..b6f63d6f300 Binary files /dev/null and b/v0.14.0/_downloads/80d329a84ca0d65c09ee87631542a96f/inset_rectangle_region.zip differ diff --git a/v0.14.0/_downloads/818c5174d0772ac928512be2284d2f8a/patterns.zip b/v0.14.0/_downloads/818c5174d0772ac928512be2284d2f8a/patterns.zip new file mode 100644 index 00000000000..ade922506b6 Binary files /dev/null and b/v0.14.0/_downloads/818c5174d0772ac928512be2284d2f8a/patterns.zip differ diff --git a/v0.14.0/_downloads/84643467dace94f99de80fbf43bf1cb7/shorelines.ipynb b/v0.14.0/_downloads/84643467dace94f99de80fbf43bf1cb7/shorelines.ipynb new file mode 100644 index 00000000000..af045fcc62f --- /dev/null +++ b/v0.14.0/_downloads/84643467dace94f99de80fbf43bf1cb7/shorelines.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Shorelines\n\nUse :meth:`pygmt.Figure.coast` to display shorelines as black lines.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Make a global Mollweide map with automatic ticks\nfig.basemap(region=\"g\", projection=\"W15c\", frame=True)\n# Display the shorelines as black lines with 0.5 point thickness\nfig.coast(shorelines=\"0.5p,black\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/85933d22aa11150108522652b4c6d70e/scatter.ipynb b/v0.14.0/_downloads/85933d22aa11150108522652b4c6d70e/scatter.ipynb new file mode 100644 index 00000000000..cb44e37b419 --- /dev/null +++ b/v0.14.0/_downloads/85933d22aa11150108522652b4c6d70e/scatter.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Scatter plots with a legend\n\nTo create a scatter plot with a legend one may use a loop and create one\nscatter plot per item to appear in the legend and set the label accordingly.\n\nModified from the matplotlib example:\nhttps://matplotlib.org/stable/gallery/lines_bars_and_markers/scatter_with_legend.html\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\nrng = np.random.default_rng(seed=19680801)\nn = 200 # number of random data points\n\nfig = pygmt.Figure()\nfig.basemap(\n region=[-1, 1, -1, 1],\n projection=\"X10c/10c\",\n frame=[\"xa0.5fg\", \"ya0.5fg\", \"WSrt\"],\n)\nfor fill in [\"gray73\", \"darkorange\", \"slateblue\"]:\n # Generate standard normal distributions centered on 0\n # with standard deviations of 1\n x = rng.normal(loc=0, scale=0.5, size=n) # random x data\n y = rng.normal(loc=0, scale=0.5, size=n) # random y data\n size = rng.normal(loc=0, scale=0.5, size=n) * 0.5 # random size, in cm\n\n # plot data points as circles (style=\"c\"), with different sizes\n fig.plot(\n x=x,\n y=y,\n style=\"c\",\n size=size,\n fill=fill,\n # Set the legend label,\n # and set the symbol size to be 0.25 cm (+S0.25c) in legend\n label=f\"{fill}+S0.25c\",\n transparency=50, # set transparency level for all symbols\n )\n\nfig.legend(transparency=30) # set transparency level for legends\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/85bd7795caf2775b21629621fe089c88/cyl_mercator.py b/v0.14.0/_downloads/85bd7795caf2775b21629621fe089c88/cyl_mercator.py new file mode 100644 index 00000000000..124af3b1ce2 --- /dev/null +++ b/v0.14.0/_downloads/85bd7795caf2775b21629621fe089c88/cyl_mercator.py @@ -0,0 +1,34 @@ +r""" +Mercator projection +=================== + +The Mercator projection takes its name from the Flemish cartographer Gheert +Cremer, better known as Gerardus Mercator, who presented it in 1569. The +projection is a cylindrical and conformal, with no distortion along the +equator. A major navigational feature of the projection is that a line of +constant azimuth is straight. Such a line is called a rhumb line or loxodrome. +Thus, to sail from one point to another one only had to connect the points with +a straight line, determine the azimuth of the line, and keep this constant +course for the entire voyage. The Mercator projection has been used extensively +for world maps in which the distortion towards the polar regions grows +rather large. + +**m**\ [*lon0*/\ [*lat0*/]]\ *scale* or **M**\ [*lon0*/\ [*lat0*/]]\ *width* + +The projection is set with **m** or **M**. The central meridian is set with the +optional *lon0* and the standard parallel is set with the optional *lat0*. +The figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.coast( + region=[0, 360, -80, 80], + projection="M0/0/12c", + frame="afg", + land="gray80", + water="steelblue", +) +fig.show() diff --git a/v0.14.0/_downloads/88ef39121e617ca0d43806fa0c89bfa5/contours.py b/v0.14.0/_downloads/88ef39121e617ca0d43806fa0c89bfa5/contours.py new file mode 100644 index 00000000000..8342202b8e9 --- /dev/null +++ b/v0.14.0/_downloads/88ef39121e617ca0d43806fa0c89bfa5/contours.py @@ -0,0 +1,48 @@ +""" +Contours +======== + +The :meth:`pygmt.Figure.contour` method can plot contour lines from a table of +points by direct triangulation. The data for the triangulation can be provided +using one of three methods: + +#. ``x``, ``y``, ``z`` 1-D :class:`numpy.ndarray` data columns. +#. ``data`` 2-D :class:`numpy.ndarray` data matrix with 3 columns corresponding + to ``x``, ``y``, ``z``. +#. ``data`` path string to a file containing the ``x``, ``y``, ``z`` in a + tabular format. + +The parameters ``levels`` and ``annotation`` set the intervals of the contours +and the annotation on the contours respectively. + +In this example we supply the data as 1-D :class:`numpy.ndarray` with the +``x``, ``y``, and ``z`` parameters and draw the contours using a 0.5p pen with +contours every 10 ``z`` values and annotations every 20 ``z`` values. +""" + +# %% +import numpy as np +import pygmt + +# build the contours underlying data with the function z = x^2 + y^2 +X, Y = np.meshgrid(np.linspace(-10, 10, 50), np.linspace(-10, 10, 50)) +Z = X**2 + Y**2 +x, y, z = X.flatten(), Y.flatten(), Z.flatten() + + +fig = pygmt.Figure() +fig.contour( + region=[-10, 10, -10, 10], + projection="X10c/10c", + frame="ag", + pen="0.5p", + # pass the data as 3 1-D data columns + x=x, + y=y, + z=z, + # set the contours z values intervals to 10 + levels=10, + # set the contours annotation intervals to 20 + annotation=20, +) +fig.show() diff --git a/v0.14.0/_downloads/8936234d1306bb34639e23f0f7373cd9/date_time_charts.py b/v0.14.0/_downloads/8936234d1306bb34639e23f0f7373cd9/date_time_charts.py new file mode 100644 index 00000000000..d198b3c7d70 --- /dev/null +++ b/v0.14.0/_downloads/8936234d1306bb34639e23f0f7373cd9/date_time_charts.py @@ -0,0 +1,356 @@ +""" +Plotting datetime charts +======================== + +PyGMT accepts a variety of datetime objects to plot data and create charts. Aside from +the built-in Python ``datetime`` module, PyGMT supports inputs containing ISO formatted +strings as well as objects generated with ``numpy``, ``pandas``, and ``xarray``. These +data types can be used to plot specific points as well as get passed into the ``region`` +parameter to create a range of the data on an axis. + +The following examples will demonstrate how to create plots using these different +datetime objects. +""" + +# %% +import datetime + +import numpy as np +import pandas as pd +import pygmt +import xarray as xr + +# %% +# Using Python's ``datetime`` +# --------------------------- +# +# In this example, Python's built-in ``datetime`` module is used to create data points +# stored in the list ``x``. Additionally, dates are passed into the ``region`` parameter +# in the format ``[x_start, x_end, y_start, y_end]``, where the date range is plotted on +# the x-axis. An additional notable parameter is ``style``, where it's specified that +# data points are plotted as circles with a diameter of 0.3 centimeters. + +x = [ + datetime.date(2010, 6, 1), + datetime.date(2011, 6, 1), + datetime.date(2012, 6, 1), + datetime.date(2013, 6, 1), +] +y = [1, 2, 3, 5] + +fig = pygmt.Figure() +fig.plot( + projection="X10c/5c", + region=[datetime.date(2010, 1, 1), datetime.date(2014, 12, 1), 0, 6], + frame=["WSen", "afg"], + x=x, + y=y, + style="c0.3c", + pen="1p", +) +fig.show() + +# %% +# In addition to specifying the date, ``datetime`` supports the time at which the data +# points were recorded. Using :meth:`datetime.datetime` the ``region`` parameter as well +# as data points can be created with both date and time information. +# +# Some notable differences to the previous example include: +# +# - Modifying ``frame`` to only include West (left) and South (bottom) borders, and +# removing grid lines +# - Using circles to plot data points defined by ``c`` in the argument passed through +# the ``style`` parameter + +x = [ + datetime.datetime(2021, 1, 1, 3, 45, 1), + datetime.datetime(2021, 1, 1, 6, 15, 1), + datetime.datetime(2021, 1, 1, 13, 30, 1), + datetime.datetime(2021, 1, 1, 20, 30, 1), +] +y = [5, 3, 1, 2] + +fig = pygmt.Figure() +fig.plot( + projection="X10c/5c", + region=[ + datetime.datetime(2021, 1, 1, 0, 0, 0), + datetime.datetime(2021, 1, 2, 0, 0, 0), + 0, + 6, + ], + frame=["WS", "af"], + x=x, + y=y, + style="c0.4c", + pen="1p", + fill="blue", +) +fig.show() + + +# %% +# Using ISO Format +# ---------------- +# +# In addition to Python's ``datetime`` module, PyGMT also supports passing dates in ISO +# format. Basic ISO strings are formatted as ``YYYY-MM-DD`` with each ``-`` delineated +# section marking the four-digit year value, two-digit month value, and two-digit day +# value, respectively. +# +# For including the time into an ISO string, the ``T`` character is used, as it can be +# seen in the following example. This character is immediately followed by a string +# formatted as ``hh:mm:ss`` where each ``:`` delineated section marking the two-digit +# hour value, two-digit minute value, and two-digit second value, respectively. The +# figure in the following example is plotted over a horizontal range of one year from +# 2016-01-01 to 2017-01-01. + +x = ["2016-02-01", "2016-06-04T14", "2016-10-04T00:00:15", "2016-12-01T05:00:15"] +y = [1, 3, 5, 2] + +fig = pygmt.Figure() +fig.plot( + projection="X10c/5c", + region=["2016-01-01", "2017-01-01", 0, 6], + frame=["WSen", "afg"], + x=x, + y=y, + style="a0.45c", + pen="1p", + fill="dodgerblue", +) +fig.show() + +# %% +# .. note:: +# +# PyGMT doesn't recognize non-ISO datetime strings like "Jun 05, 2018". If your data +# contain non-ISO datetime strings, you can convert them to a recognized format +# using :func:`pandas.to_datetime` and then pass it to PyGMT. + + +# %% +# Mixing and matching Python ``datetime`` and ISO dates +# ----------------------------------------------------- +# +# The following example provides context on how both ``datetime`` and ISO date data can +# be plotted using PyGMT. This can be helpful when dates and times are coming from +# different sources, meaning conversions do not need to take place between ISO and +# datetime in order to create valid plots. + +x = ["2020-02-01", "2020-06-04", "2020-10-04", datetime.datetime(2021, 1, 15)] +y = [1.3, 2.2, 4.1, 3] + +fig = pygmt.Figure() +fig.plot( + projection="X10c/5c", + region=[datetime.datetime(2020, 1, 1), datetime.datetime(2021, 3, 1), 0, 6], + frame=["WSen", "afg"], + x=x, + y=y, + style="i0.4c", + pen="1p", + fill="yellow", +) +fig.show() + + +# %% +# Using :meth:`pandas.date_range` +# ------------------------------- +# +# In the following example, :func:`pandas.date_range` produces a list of +# :class:`pandas.DatetimeIndex` objects, which is used to pass date data to the PyGMT +# figure. Specifically ``x`` contains 7 different :class:`pandas.DatetimeIndex` objects, +# with the number being manipulated by the ``periods`` parameter. Each period begins at +# the start of a business quarter as denoted by BQS when passed to the ``freq`` +# parameter. The initial date is the first argument that is passed to +# :func:`pandas.date_range` and it marks the first data point in the list ``x`` that +# will be plotted. + +x = pd.date_range("2018-03-01", periods=7, freq="BQS") +y = [4, 5, 6, 8, 6, 3, 5] + +fig = pygmt.Figure() +fig.plot( + projection="X10c/10c", + region=[datetime.datetime(2017, 12, 31), datetime.datetime(2019, 12, 31), 0, 10], + frame=["WSen", "ag"], + x=x, + y=y, + style="i0.4c", + pen="1p", + fill="purple", +) +fig.show() + + +# %% +# Using :class:`xarray.DataArray` +# ------------------------------- +# +# In this example, instead of using a list of :class:`pandas.DatetimeIndex` objects, +# ``x`` is initialized as an :class:`xarray.DataArray` object. This object provides a +# wrapper around numpy ndarrays. It also allows the data to have labeled dimensions +# while supporting operations that use various pieces of metadata. The following code +# uses :func:`pandas.date_range` to fill the DataArray with data, but this is not +# essential for the creation of a valid DataArray. + +x = xr.DataArray(data=pd.date_range(start="2020-01-01", periods=4, freq="QE")) +y = [4, 7, 5, 6] + +fig = pygmt.Figure() +fig.plot( + projection="X10c/10c", + region=[datetime.datetime(2020, 1, 1), datetime.datetime(2021, 4, 1), 0, 10], + frame=["WSen", "ag"], + x=x, + y=y, + style="n0.4c", + pen="1p", + fill="red", +) +fig.show() + + +# %% +# Using :class:`numpy.datetime64` +# ------------------------------- +# +# In this example, instead of using :func:`pd.date_range`, ``x`` is initialized as an +# ``np.array`` object. Similar to :class:`xarray.DataArray` this wraps the dataset +# before passing it as an argument. However, ``np.array`` objects use less memory and +# allow developers to specify data types. + +x = np.array( + ["2010-06-01", "2011-06-01T12", "2012-01-01T12:34:56"], dtype=np.datetime64 +) +y = [2, 7, 5] + +fig = pygmt.Figure() +fig.plot( + projection="X10c/10c", + region=[datetime.datetime(2010, 1, 1), datetime.datetime(2012, 6, 1), 0, 10], + frame=["WS", "ag"], + x=x, + y=y, + style="s0.5c", + pen="1p", + fill="blue", +) +fig.show() + + +# %% +# Generating an automatic region +# ------------------------------ +# +# Another way of creating charts involving datetime data can be done by automatically +# generating the region of the plot. This can be done by passing the DataFrame to +# :func:`pygmt.info`, which will find the maximum and minimum values for each column and +# create a list that could be passed as region. Additionally, the ``spacing`` parameter +# can be used to increase the range past the maximum and minimum data points. + +data = [ + ["20200712", 1000], + ["20200714", 1235], + ["20200716", 1336], + ["20200719", 1176], + ["20200721", 1573], + ["20200724", 1893], + ["20200729", 1634], +] +df = pd.DataFrame(data, columns=["Date", "Score"]) +df.Date = pd.to_datetime(df["Date"], format="%Y%m%d") +region = pygmt.info( + data=df[["Date", "Score"]], per_column=True, spacing=(700, 700), coltypes="T" +) + +fig = pygmt.Figure() +fig.plot( + region=region, + projection="X15c/10c", + frame=["WSen", "afg"], + x=df.Date, + y=df.Score, + style="c0.4c", + pen="1p", + fill="green3", +) +fig.show() + + +# %% +# Setting Primary and Secondary Time Axes +# --------------------------------------- +# +# This example focuses on annotating the axes and setting the interval in which the +# annotations should appear. All of these modifications are passed to the ``frame`` +# parameter and each item in that list modifies a specific aspect of the frame. +# +# Adding ``"WS"`` means that only the Western/Left (**W**) and Southern/Bottom (**S**) +# borders of the plot are annotated. For more information on this, please refer to the +# :doc:`Frames, ticks, titles, and labels tutorial `. +# +# Another important item in the list passed to ``frame`` is ``"sxa1Of1D"``. This string +# modifies the secondary annotation (**s**) of the x-axis (**x**). Specifically, it sets +# the main annotation and major tick spacing interval to one month (**a1O**) (capital +# letter O, not zero). Additionally, it sets the minor tick spacing interval to 1 day +# (**f1D**). To use the month name instead of its number set :gmt-term:`FORMAT_DATE_MAP` +# to **o**. More information on configuring date formats can be found at +# :gmt-term:`FORMAT_DATE_MAP`, :gmt-term:`FORMAT_DATE_IN`, and +# :gmt-term:`FORMAT_DATE_OUT`. + +x = pd.date_range("2013-05-02", periods=10, freq="2D") +y = [4, 5, 6, 8, 9, 5, 8, 9, 4, 2] + +fig = pygmt.Figure() +with pygmt.config(FORMAT_DATE_MAP="o"): + fig.plot( + projection="X15c/10c", + region=[datetime.datetime(2013, 5, 1), datetime.datetime(2013, 5, 25), 0, 10], + frame=["WS", "sxa1Of1D", "pxa5d", "sy+lLength", "pya1+ucm"], + x=x, + y=y, + style="c0.4c", + pen="1p", + fill="green3", + ) +fig.show() + +# %% +# The same concept shown above can be applied to smaller as well as larger intervals. In +# this example, data are plotted for different times throughout two days. The primary +# x-axis annotations are modified to repeat every 6 hours, and the secondary x-axis +# annotations repeat every day and show the day of the week. +# +# Another notable mention in this example is setting :gmt-term:`FORMAT_CLOCK_MAP` to +# **-hhAM** which specifies the format used for time. In this case, leading zeros are +# removed using (**-**), and only hours are displayed. Additionally, an AM/PM system is +# used instead of a 24-hour system. More information on configuring time formats can be +# found at :gmt-term:`FORMAT_CLOCK_MAP`, :gmt-term:`FORMAT_CLOCK_IN`, and +# :gmt-term:`FORMAT_CLOCK_OUT`. + +x = pd.date_range("2021-04-15", periods=8, freq="6h") +y = [2, 5, 3, 1, 5, 7, 9, 6] + +fig = pygmt.Figure() +with pygmt.config(FORMAT_CLOCK_MAP="-hhAM"): + fig.plot( + projection="X15c/10c", + region=[ + datetime.datetime(2021, 4, 14, 23, 0, 0), + datetime.datetime(2021, 4, 17), + 0, + 10, + ], + frame=["WS", "sxa1K", "pxa6H", "sy+lSpeed", "pya1+ukm/h"], + x=x, + y=y, + style="n0.4c", + pen="1p", + fill="lightseagreen", + ) +fig.show() + +# sphinx_gallery_thumbnail_number = 8 diff --git a/v0.14.0/_downloads/89a0144193ccaf2fb27f81e1e31c7d4f/grdview_surface.ipynb b/v0.14.0/_downloads/89a0144193ccaf2fb27f81e1e31c7d4f/grdview_surface.ipynb new file mode 100644 index 00000000000..26a36a74745 --- /dev/null +++ b/v0.14.0/_downloads/89a0144193ccaf2fb27f81e1e31c7d4f/grdview_surface.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Plotting a surface\n\nThe :meth:`pygmt.Figure.grdview()` method can plot 3-D surfaces with\n``surftype=\"s\"``. Here, we supply the data as an :class:`xarray.DataArray` with\nthe coordinate vectors ``x`` and ``y`` defined. Note that the ``perspective``\nparameter here controls the azimuth and elevation angle of the view. We provide\na list of two arguments to ``frame`` - the first argument specifies the\n$x$- and $y$-axes frame attributes and the second argument,\nprepended with ``\"z\"``, specifies the $z$-axis frame attributes.\nSpecifying the same scale for the ``projection`` and ``zscale`` parameters\nensures equal axis scaling. The ``shading`` parameter specifies illumination;\nhere we choose an azimuth of 45\u00b0 with ``shading=\"+a45\"``.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\nimport xarray as xr\n\n\n# Define an interesting function of two variables, see:\n# https://en.wikipedia.org/wiki/Ackley_function\ndef ackley(x, y):\n \"\"\"\n Ackley function.\n \"\"\"\n return (\n -20 * np.exp(-0.2 * np.sqrt(0.5 * (x**2 + y**2)))\n - np.exp(0.5 * (np.cos(2 * np.pi * x) + np.cos(2 * np.pi * y)))\n + np.exp(1)\n + 20\n )\n\n\n# Create gridded data\nINC = 0.05\nx = np.arange(-5, 5 + INC, INC)\ny = np.arange(-5, 5 + INC, INC)\ndata = xr.DataArray(ackley(*np.meshgrid(x, y)), coords=(x, y))\n\nfig = pygmt.Figure()\n\n# Plot grid as a 3-D surface\nSCALE = 0.5 # in centimeters\nfig.grdview(\n data,\n # Set annotations and gridlines in steps of five, and\n # tick marks in steps of one\n frame=[\"a5f1g5\", \"za5f1g5\"],\n projection=f\"x{SCALE}c\",\n zscale=f\"{SCALE}c\",\n surftype=\"s\",\n cmap=\"roma\",\n perspective=[135, 30], # Azimuth southeast (135\u00b0), at elevation 30\u00b0\n shading=\"+a45\",\n)\n\n# Add colorbar for gridded data\nfig.colorbar(\n frame=\"a2f1\", # Set annotations in steps of two, tick marks in steps of one\n position=\"JMR\", # Place colorbar in the Middle Right (MR) corner\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/89d9d092e8b5d884aaee4850622d0f57/azim_lambert.ipynb b/v0.14.0/_downloads/89d9d092e8b5d884aaee4850622d0f57/azim_lambert.ipynb new file mode 100644 index 00000000000..85ada0d24b4 --- /dev/null +++ b/v0.14.0/_downloads/89d9d092e8b5d884aaee4850622d0f57/azim_lambert.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Lambert azimuthal equal-area projection\n\nThis projection was developed by Johann Heinrich Lambert in 1772 and is\ntypically used for mapping large regions like continents and hemispheres. It is\nan azimuthal, equal-area projection, but is not perspective. Distortion is zero\nat the center of the projection, and increases radially away from this point.\n\n**a**\\ *lon0/lat0*\\ [*/horizon*\\ ]\\ */scale*\nor **A**\\ *lon0/lat0*\\ [*/horizon*\\ ]\\ */width*\n\n**a** or **A** specifies the projection type, and *lon0/lat0* specifies the\nprojection center, *horizon* specifies the maximum distance from projection\ncenter (in degrees, <= 180, default 90), and *scale* or *width* sets the size\nof the figure.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n region=\"g\",\n projection=\"A30/-20/60/12c\",\n frame=\"afg\",\n land=\"khaki\",\n water=\"white\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/8a080f6a74519f931b0fe9efbee08da5/misc_robinson.zip b/v0.14.0/_downloads/8a080f6a74519f931b0fe9efbee08da5/misc_robinson.zip new file mode 100644 index 00000000000..a22c90c9b25 Binary files /dev/null and b/v0.14.0/_downloads/8a080f6a74519f931b0fe9efbee08da5/misc_robinson.zip differ diff --git a/v0.14.0/_downloads/8a6f6b844718e8ba2dad2f7fff2c95de/custom_symbols.ipynb b/v0.14.0/_downloads/8a6f6b844718e8ba2dad2f7fff2c95de/custom_symbols.ipynb new file mode 100644 index 00000000000..0a5f2a92f26 --- /dev/null +++ b/v0.14.0/_downloads/8a6f6b844718e8ba2dad2f7fff2c95de/custom_symbols.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Custom symbols\n\nThe :meth:`pygmt.Figure.plot` method can plot individual custom symbols by\npassing the corresponding symbol name together with the **k** shortcut to the\n``style`` parameter.\n\nIn total 41 custom symbols are already included of which the following plot shows\nfive exemplary ones. The symbols are shown underneath their corresponding names.\nFor the remaining symbols see the GMT Technical Reference\n:gmt-docs:`reference/custom-symbols.html`.\n\nBeside these built-in custom symbols GMT allows users to define their own custom\nsymbols. For this, a specific macro language is used. A detailed introduction can\nbe found at :gmt-docs:`reference/custom-symbols.html#the-macro-language`. After\ndefining such a symbol it can be used in the same way as a built-in custom symbol.\n\n*Please note*: Custom symbols can not be used in auto-legends yet.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.basemap(region=[0, 8, 0, 3], projection=\"X12c/4c\", frame=True)\n\n# Define pen and fontstyle for annotations\npen = \"1p,black\"\nfont = \"15p,Helvetica-Bold\"\n\n# Use the volcano symbol with a size of 1.5c, fill color is set to \"seagreen\"\nfig.plot(x=1, y=1.25, style=\"kvolcano/1.5c\", pen=pen, fill=\"seagreen\")\nfig.text(x=1, y=2.5, text=\"volcano\", font=font)\n\n# Use the astroid symbol with a size of 1.5c, fill color is set to \"red3\"\nfig.plot(x=2.5, y=1.25, style=\"kastroid/1.5c\", pen=pen, fill=\"red3\")\nfig.text(x=2.5, y=2.5, text=\"astroid\", font=font)\n\n# Use the flash symbol with a size of 1.5c, fill color is set to \"darkorange\"\nfig.plot(x=4, y=1.25, style=\"kflash/1.5c\", pen=pen, fill=\"darkorange\")\nfig.text(x=4, y=2.5, text=\"flash\", font=font)\n\n# Use the star4 symbol with a size of 1.5c, fill color is set to \"dodgerblue4\"\nfig.plot(x=5.5, y=1.25, style=\"kstar4/1.5c\", pen=pen, fill=\"dodgerblue4\")\nfig.text(x=5.5, y=2.5, text=\"star4\", font=font)\n\n# Use the hurricane symbol with a size of 1.5c, fill color is set to \"magenta4\"\nfig.plot(x=7, y=1.25, style=\"khurricane/1.5c\", pen=pen, fill=\"magenta4\")\nfig.text(x=7, y=2.5, text=\"hurricane\", font=font)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/8a998ea7970b7cc7853db8048acd71c0/points_categorical.py b/v0.14.0/_downloads/8a998ea7970b7cc7853db8048acd71c0/points_categorical.py new file mode 100644 index 00000000000..f638e0d63af --- /dev/null +++ b/v0.14.0/_downloads/8a998ea7970b7cc7853db8048acd71c0/points_categorical.py @@ -0,0 +1,97 @@ +""" +Color points by categories +========================== + +The :meth:`pygmt.Figure.plot` method can be used to plot symbols which are +color-coded by categories. In the example below, we show how the +`Palmer Penguins dataset `__ +can be visualized. Here, we can pass the individual categories included in +the "species" column directly to the ``fill`` parameter via +``fill=df.species.cat.codes.astype(int)``. Additionally, we have to set +``cmap=True``. A desired colormap can be selected via the :func:`pygmt.makecpt` +function. +""" + +# %% +import pandas as pd +import pygmt + +# Load sample penguins data +df = pd.read_csv("https://github.com/mwaskom/seaborn-data/raw/master/penguins.csv") + +# Convert 'species' column to categorical dtype +# By default, pandas sorts the individual categories in an alphabetical order. +# For a non-alphabetical order, you have to manually adjust the list of +# categories. For handling and manipulating categorical data in pandas, +# have a look at: +# https://pandas.pydata.org/docs/user_guide/categorical.html +df.species = df.species.astype(dtype="category") + +# Make a list of the individual categories of the 'species' column +# ['Adelie', 'Chinstrap', 'Gentoo'] +# They are (corresponding to the categorical number code) by default in +# alphabetical order and later used for the colorbar annotations +cb_annots = list(df.species.cat.categories) + +# Use pygmt.info to get region bounds (xmin, xmax, ymin, ymax) +# The below example will return a numpy array like [30.0, 60.0, 12.0, 22.0] +region = pygmt.info( + data=df[["bill_length_mm", "bill_depth_mm"]], # x and y columns + per_column=True, # Report the min/max values per column as a numpy array + # Round the min/max values of the first two columns to the nearest multiple + # of 3 and 2, respectively + spacing=(3, 2), +) + +# Make a 2-D categorical scatter plot, coloring each of the 3 species +# differently +fig = pygmt.Figure() + +# Generate a basemap of 10 cm x 10 cm size +fig.basemap( + region=region, + projection="X10c/10c", + frame=[ + "xafg+lBill length (mm)", + "yafg+lBill depth (mm)", + "WSen+tPenguin size at Palmer Station", + ], +) + +# Define a colormap for three categories, define the range of the +# new discrete CPT using series=(lowest_value, highest_value, interval), +# use color_model="+cAdelie,Chinstrap,Gentoo" to write the discrete color +# palette "inferno" in categorical format and add the species names as +# annotations for the colorbar +pygmt.makecpt( + cmap="inferno", + # Use the minimum and maximum of the categorical number code + # to set the lowest_value and the highest_value of the CPT + series=(df.species.cat.codes.min(), df.species.cat.codes.max(), 1), + # Convert ['Adelie', 'Chinstrap', 'Gentoo'] to 'Adelie,Chinstrap,Gentoo' + color_model="+c" + ",".join(cb_annots), +) + +fig.plot( + # Use bill length and bill depth as x and y data input, respectively + x=df.bill_length_mm, + y=df.bill_depth_mm, + # Vary symbol size according to the body mass, scaled by 7.5e-5 + size=df.body_mass_g * 7.5e-5, + # Points colored by categorical number code (refers to the species) + fill=df.species.cat.codes.astype(int), + # Use colormap created by makecpt + cmap=True, + # Do not clip symbols that fall close to the plot bounds + no_clip=True, + # Use circles as symbols (the first "c") with diameter in + # centimeters (the second "c") + style="cc", + # Set transparency level for all symbols to deal with overplotting + transparency=40, +) + +# Add colorbar legend +fig.colorbar() + +fig.show() diff --git a/v0.14.0/_downloads/8aabe9da1941250aa3df727c5e877460/country_polygons.ipynb b/v0.14.0/_downloads/8aabe9da1941250aa3df727c5e877460/country_polygons.ipynb new file mode 100644 index 00000000000..46a34b26b67 --- /dev/null +++ b/v0.14.0/_downloads/8aabe9da1941250aa3df727c5e877460/country_polygons.ipynb @@ -0,0 +1,79 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Highlight country, continent and state polygons\n\nThe :meth:`pygmt.Figure.coast` method can highlight country polygons\nvia the ``dcw`` parameter. It accepts the country code or full\ncountry name and can draw its borders and add a color to its landmass.\nIt's also possible to define multiple countries at once by separating\nthe individual names with commas.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n\nfig.coast(\n region=[-12, 32, 34, 72],\n # Lambert Azimuthal Equal Area lon0/lat0/horizon/width\n projection=\"A10/52/25/6c\",\n land=\"gray\",\n water=\"white\",\n frame=\"afg\",\n dcw=[\n # Great Britain (country code) with seagreen land\n \"GB+gseagreen\",\n # Italy with a red border\n \"IT+p0.5p,red3\",\n # Spain with a magenta dashed border\n \"ES+p0.5p,magenta4,-\",\n # Romania with a black dotted border\n \"RO+p0.75p,black,.\",\n # Germany with orange land and a blue border\n \"DE+gorange+p0.5p,dodgerblue4\",\n # France (full country name) with a steelblue border\n \"France+p0.5p,steelblue\",\n # Norway, Sweden and Finland (multiple countries) with pink\n # land and pink3 borders\n \"Norway,Sweden,Finland+gpink+p0.2p,pink3\",\n ],\n)\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Entire continents can also be highlighted by adding ``\"=\"`` in\nfront of the continent code to differentiate it from a country code.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\nfig.coast(\n region=\"d\",\n projection=\"H10c\",\n land=\"gray\",\n water=\"white\",\n frame=\"afg\",\n dcw=[\n # Europe\n \"=EU+gseagreen\",\n # Africa\n \"=AF+gred3\",\n # North America\n \"=NA+gmagenta4\",\n # South America\n \"=SA+gorange\",\n # Asia\n \"=AS+gdodgerblue4\",\n # Oceania\n \"=OC+gtomato\",\n # Antarctica\n \"=AN+ggray30\",\n ],\n)\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If available, states/territories of a country can be highlighted, too.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\nfig.coast(\n region=[-130, -70, 24, 52],\n projection=\"L-100/35/33/45/12c\",\n land=\"gray\",\n shorelines=\"1/0.5p,gray30\",\n borders=[\"1/0.8p,gray30\", \"2/0.2p,gray30\"],\n frame=True,\n dcw=[\n # Texas with orange fill\n \"US.TX+gorange\",\n # Kentucky with blue outline\n \"US.KY+p1p,blue\",\n ],\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/8b038563ddc0a72f79df33a0a813d9b4/misc_hammer.py b/v0.14.0/_downloads/8b038563ddc0a72f79df33a0a813d9b4/misc_hammer.py new file mode 100644 index 00000000000..4ba55d0f428 --- /dev/null +++ b/v0.14.0/_downloads/8b038563ddc0a72f79df33a0a813d9b4/misc_hammer.py @@ -0,0 +1,23 @@ +r""" +Hammer projection +================= + +The equal-area Hammer projection, first presented by the German mathematician +Ernst von Hammer in 1892, is also known as Hammer-Aitoff (the Aitoff projection +looks similar, but is not equal-area). The border is an ellipse, equator and +central meridian are straight lines, while other parallels and meridians are +complex curves. + +**h**\ [*lon0/*]\ *scale* or **H**\ [*lon0/*]\ *width* + +The projection is set with **h** or **H**. The central meridian is set with the +optional *lon0*, and the figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Use region "d" to specify global region (-180/180/-90/90) +fig.coast(region="d", projection="H12c", frame="afg", land="ivory", water="bisque4") +fig.show() diff --git a/v0.14.0/_downloads/8b3becabc55adca68dc1a699d6438433/polar.zip b/v0.14.0/_downloads/8b3becabc55adca68dc1a699d6438433/polar.zip new file mode 100644 index 00000000000..c684a0edb5a Binary files /dev/null and b/v0.14.0/_downloads/8b3becabc55adca68dc1a699d6438433/polar.zip differ diff --git a/v0.14.0/_downloads/8b77f8a17ab01b9252b5d135d26ff6fe/histogram.ipynb b/v0.14.0/_downloads/8b77f8a17ab01b9252b5d135d26ff6fe/histogram.ipynb new file mode 100644 index 00000000000..997bd00ea4b --- /dev/null +++ b/v0.14.0/_downloads/8b77f8a17ab01b9252b5d135d26ff6fe/histogram.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Histogram\n\nThe :meth:`pygmt.Figure.histogram` method can plot regular histograms.\nUsing the ``series`` parameter allows to set the interval for the width of\neach bar. The type of the histogram (frequency count or percentage) can be\nselected via the ``histtype`` parameter.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Generate random elevation data from a normal distribution\nrng = np.random.default_rng(seed=100)\nmean = 100 # mean of distribution\nstddev = 25 # standard deviation of distribution\ndata = rng.normal(loc=mean, scale=stddev, size=521)\n\n\nfig = pygmt.Figure()\n\nfig.histogram(\n data=data,\n # Define the frame, add a title, and set the background color to\n # \"lightgray\". Add labels to the x-axis and y-axis\n frame=[\"WSne+tHistogram+glightgray\", \"x+lElevation (m)\", \"y+lCounts\"],\n # Generate evenly spaced bins by increments of 5\n series=5,\n # Use \"red3\" as color fill for the bars\n fill=\"red3\",\n # Use the pen parameter to draw the outlines with a width of 1 point\n pen=\"1p\",\n # Choose histogram type 0, i.e., counts [Default]\n histtype=0,\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/8c09b8277d7bb12c3c0ca4fe48597ab7/shorelines.py b/v0.14.0/_downloads/8c09b8277d7bb12c3c0ca4fe48597ab7/shorelines.py new file mode 100644 index 00000000000..ed97f85c8b5 --- /dev/null +++ b/v0.14.0/_downloads/8c09b8277d7bb12c3c0ca4fe48597ab7/shorelines.py @@ -0,0 +1,16 @@ +""" +Shorelines +========== + +Use :meth:`pygmt.Figure.coast` to display shorelines as black lines. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Make a global Mollweide map with automatic ticks +fig.basemap(region="g", projection="W15c", frame=True) +# Display the shorelines as black lines with 0.5 point thickness +fig.coast(shorelines="0.5p,black") +fig.show() diff --git a/v0.14.0/_downloads/8c70e54562701a06d45c7e68c9819804/points_transparency.ipynb b/v0.14.0/_downloads/8c70e54562701a06d45c7e68c9819804/points_transparency.ipynb new file mode 100644 index 00000000000..b2687c10b8a --- /dev/null +++ b/v0.14.0/_downloads/8c70e54562701a06d45c7e68c9819804/points_transparency.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Points with varying transparency\n\nPoints can be plotted with different transparency levels by passing in an array\nargument to the ``transparency`` parameter of :meth:`pygmt.Figure.plot`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# prepare the input x and y data\nx = np.arange(0, 105, 5)\ny = np.ones(x.size)\n# transparency level in percentage from 0 (i.e., opaque) to 100\ntransparency = x\n\nfig = pygmt.Figure()\nfig.basemap(\n region=[-5, 105, 0, 2],\n frame=[\"xaf+lTransparency level+u%\", \"WSrt\"],\n projection=\"X15c/6c\",\n)\nfig.plot(x=x, y=y, style=\"c0.6c\", fill=\"blue\", pen=\"1p,red\", transparency=transparency)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/9027c72dec983594b92ded20ea74b3c6/cyl_transverse_mercator.zip b/v0.14.0/_downloads/9027c72dec983594b92ded20ea74b3c6/cyl_transverse_mercator.zip new file mode 100644 index 00000000000..6b497ee1481 Binary files /dev/null and b/v0.14.0/_downloads/9027c72dec983594b92ded20ea74b3c6/cyl_transverse_mercator.zip differ diff --git a/v0.14.0/_downloads/90325d6220135dba2cd0b0bb5850ba9e/misc_hammer.zip b/v0.14.0/_downloads/90325d6220135dba2cd0b0bb5850ba9e/misc_hammer.zip new file mode 100644 index 00000000000..7f05c92f058 Binary files /dev/null and b/v0.14.0/_downloads/90325d6220135dba2cd0b0bb5850ba9e/misc_hammer.zip differ diff --git a/v0.14.0/_downloads/90ced4c104c04281e98e273f89793f60/draping_on_3d_surface.zip b/v0.14.0/_downloads/90ced4c104c04281e98e273f89793f60/draping_on_3d_surface.zip new file mode 100644 index 00000000000..10f6801a167 Binary files /dev/null and b/v0.14.0/_downloads/90ced4c104c04281e98e273f89793f60/draping_on_3d_surface.zip differ diff --git a/v0.14.0/_downloads/9247dc7d0a3c7072ab714516f3109333/grdlandmask.zip b/v0.14.0/_downloads/9247dc7d0a3c7072ab714516f3109333/grdlandmask.zip new file mode 100644 index 00000000000..15048aeb594 Binary files /dev/null and b/v0.14.0/_downloads/9247dc7d0a3c7072ab714516f3109333/grdlandmask.zip differ diff --git a/v0.14.0/_downloads/944513fba577b442fb7db77f276b6d94/inset_rectangle_region.ipynb b/v0.14.0/_downloads/944513fba577b442fb7db77f276b6d94/inset_rectangle_region.ipynb new file mode 100644 index 00000000000..4af35552123 --- /dev/null +++ b/v0.14.0/_downloads/944513fba577b442fb7db77f276b6d94/inset_rectangle_region.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Inset map showing a rectangular region\n\nThe :meth:`pygmt.Figure.inset` method adds an inset figure inside a larger\nfigure. The method is called using a ``with`` statement, and its\n``position``, ``box``, ``offset``, and ``margin`` can be customized. Plotting\nmethods called within the ``with`` statement plot into the inset figure.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\n# Set the region of the main figure\nregion = [137.5, 141, 34, 37]\n\nfig = pygmt.Figure()\n\n# Plot the base map of the main figure. Universal Transverse Mercator (UTM)\n# projection is used and the UTM zone is set to be \"54S\".\nfig.basemap(region=region, projection=\"U54S/12c\", frame=[\"WSne\", \"af\"])\n\n# Set the land color to \"lightbrown\", the water color to \"azure1\", the\n# shoreline width to \"2p\", and the area threshold to 1000 km^2 for the main\n# figure\nfig.coast(land=\"lightbrown\", water=\"azure1\", shorelines=\"2p\", area_thresh=1000)\n\n# Create an inset map, placing it in the Bottom Right (BR) corner with x- and\n# y-offsets of 0.1 cm, respectively.\n# The inset map contains the Japan main land. \"U54S/3c\" means UTM projection\n# with a map width of 3 cm. The inset width and height are automatically\n# calculated from the specified ``region`` and ``projection`` parameters.\n# Draws a rectangular box around the inset with a fill color of \"white\" and\n# a pen of \"1p\".\nwith fig.inset(\n position=\"jBR+o0.1c\",\n box=\"+gwhite+p1p\",\n region=[129, 146, 30, 46],\n projection=\"U54S/3c\",\n):\n # Highlight the Japan area in \"lightbrown\"\n # and draw its outline with a pen of \"0.2p\".\n fig.coast(\n dcw=\"JP+glightbrown+p0.2p\",\n area_thresh=10000,\n )\n # Plot a rectangle (\"r\") in the inset map to show the area of the main\n # figure. \"+s\" means that the first two columns are the longitude and\n # latitude of the bottom left corner of the rectangle, and the last two\n # columns the longitude and latitude of the upper right corner.\n rectangle = [[region[0], region[2], region[1], region[3]]]\n fig.plot(data=rectangle, style=\"r+s\", pen=\"2p,blue\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/948fa4f085ddc92fd873f4e25d2a14af/non_ascii_text.zip b/v0.14.0/_downloads/948fa4f085ddc92fd873f4e25d2a14af/non_ascii_text.zip new file mode 100644 index 00000000000..601bea57723 Binary files /dev/null and b/v0.14.0/_downloads/948fa4f085ddc92fd873f4e25d2a14af/non_ascii_text.zip differ diff --git a/v0.14.0/_downloads/96049f53ea1a3aed881e518c21f1ff7a/misc_eckertIV.py b/v0.14.0/_downloads/96049f53ea1a3aed881e518c21f1ff7a/misc_eckertIV.py new file mode 100644 index 00000000000..b13c9833405 --- /dev/null +++ b/v0.14.0/_downloads/96049f53ea1a3aed881e518c21f1ff7a/misc_eckertIV.py @@ -0,0 +1,22 @@ +r""" +Eckert IV equal-area projection +=============================== + +The Eckert IV projection, presented by the German cartographer Max +Eckert-Greiffendorff in 1906, is a pseudo-cylindrical equal-area projection. +Central meridian and all parallels are straight lines; other meridians are +equally spaced elliptical arcs. The scale is true along latitude 40°30'. + +**kf**\ [*lon0/*]\ *scale* or **Kf**\ [*lon0/*]\ *width* + +The projection is set with **kf** or **Kf**. The central meridian is set with +the optional *lon0*, and the figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Use region "d" to specify global region (-180/180/-90/90) +fig.coast(region="d", projection="Kf12c", frame="afg", land="ivory", water="bisque4") +fig.show() diff --git a/v0.14.0/_downloads/9607cce8c2a328be63cfb98745cd1baf/working_with_panel.ipynb b/v0.14.0/_downloads/9607cce8c2a328be63cfb98745cd1baf/working_with_panel.ipynb new file mode 100644 index 00000000000..79763837a9c --- /dev/null +++ b/v0.14.0/_downloads/9607cce8c2a328be63cfb98745cd1baf/working_with_panel.ipynb @@ -0,0 +1,104 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Interactive data visualization using ``Panel``\n\n

Note

Please run the following code examples in a notebook environment\n otherwise the interactive parts of this tutorial will not work. You can\n use the button \"Download Jupyter notebook\" at the bottom of this page\n to download this script as a Jupyter notebook.

\n\nThe library [Panel](https://panel.holoviz.org/index.html)_ can be used to\ncreate interactive dashboards by connecting user-defined widgets to plots.\n``Panel`` can be used as an extension to Jupyter notebook/lab.\n\nThis tutorial is split into three parts:\n\n- Make a static map\n- Make an interactive map\n- Add a grid for Earth relief\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Import the required packages\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport panel as pn\nimport pygmt\n\npn.extension()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Make a static map\n\nThe [Orthographic projection](https://www.pygmt.org/dev/projections/azim/azim_orthographic.html)_\ncan be used to show the Earth as a globe. Land and water masses are\nfilled with colors via the ``land`` and ``water`` parameters of\n:meth:`pygmt.Figure.coast`, respectively. Coastlines are added using the\n``shorelines`` parameter.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Create a new instance or object of the pygmt.Figure() class\nfig = pygmt.Figure()\nfig.coast(\n # Orthographic projection (G) with projection center at 0\u00b0 East and\n # 15\u00b0 North and a width of 12 centimeters\n projection=\"G0/15/12c\",\n region=\"g\", # global\n frame=\"g30\", # Add frame and gridlines in steps of 30 degrees on top\n land=\"gray\", # Color land masses in \"gray\"\n water=\"lightblue\", # Color water masses in \"lightblue\"\n # Add coastlines with a 0.25 points thick pen in \"gray50\"\n shorelines=\"1/0.25p,gray50\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Make an interactive map\n\nTo generate a rotation of the Earth around the vertical axis, the central\nlongitude of the Orthographic projection is varied iteratively in steps of\n10 degrees. The library ``Panel`` is used to create an interactive dashboard\nwith a slider (works only in a notebook environment, e.g., Jupyter notebook).\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Create a slider\nslider_lon = pn.widgets.DiscreteSlider(\n name=\"Central longitude\", # Give name for quantity shown at the slider\n options=list(np.arange(0, 361, 10)), # Range corresponding to longitude\n value=0, # Set start value\n)\n\n\n@pn.depends(central_lon=slider_lon)\ndef view(central_lon):\n \"\"\"\n Define a function for plotting the single slices.\n \"\"\"\n # Create a new instance or object of the pygmt.Figure() class\n fig = pygmt.Figure()\n fig.coast(\n # Vary the central longitude used for the Orthographic projection\n projection=f\"G{central_lon}/15/12c\",\n region=\"g\",\n frame=\"g30\",\n land=\"gray\",\n water=\"lightblue\",\n shorelines=\"1/0.25p,gray50\",\n )\n return fig\n\n\n# Make an interactive dashboard\npn.Column(slider_lon, view)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Add a grid for Earth relief\n\nInstead of using colors as fill for the land and water masses a grid can be\ndisplayed. Here, the Earth relief is shown by color-coding the elevation.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Download a grid for Earth relief with a resolution of 10 arc-minutes\ngrd_relief = pygmt.datasets.load_earth_relief(resolution=\"10m\")\n\n# Create a slider\nslider_lon = pn.widgets.DiscreteSlider(\n name=\"Central longitude\",\n options=list(np.arange(0, 361, 10)),\n value=0,\n)\n\n\n@pn.depends(central_lon=slider_lon)\ndef view(central_lon):\n \"\"\"\n Define a function for plotting the single slices.\n \"\"\"\n # Create a new instance or object of the pygmt.Figure() class\n fig = pygmt.Figure()\n # Set up a colormap for the elevation in meters\n pygmt.makecpt(\n cmap=\"oleron\",\n # minimum, maximum, step\n series=[int(grd_relief.data.min()) - 1, int(grd_relief.data.max()) + 1, 100],\n )\n # Plot the grid for the elevation\n fig.grdimage(\n projection=f\"G{central_lon}/15/12c\",\n region=\"g\",\n grid=grd_relief, # Use grid downloaded above\n cmap=True, # Use colormap defined above\n frame=\"g30\",\n )\n # Add a horizontal colorbar for the elevation\n # with annotations (a) in steps of 2000 and ticks (f) in steps of 1000\n # and labels (+l) at the x-axis \"Elevation\" and y-axis \"m\" (meters)\n fig.colorbar(frame=[\"a2000f1000\", \"x+lElevation\", \"y+lm\"])\n return fig\n\n\n# Make an interactive dashboard\npn.Column(slider_lon, view)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/9612cd394e23204ac5d11a602be31197/04_table_inputs.py b/v0.14.0/_downloads/9612cd394e23204ac5d11a602be31197/04_table_inputs.py new file mode 100644 index 00000000000..541a7057711 --- /dev/null +++ b/v0.14.0/_downloads/9612cd394e23204ac5d11a602be31197/04_table_inputs.py @@ -0,0 +1,147 @@ +""" +4. PyGMT I/O: Table inputs +========================== + +Generally, PyGMT accepts two different types of data inputs: tables and grids. + +- A table is a 2-D array with rows and columns. Each column represents a different + variable (e.g., *x*, *y* and *z*) and each row represents a different record. +- A grid is a 2-D array of data that is regularly spaced in the x and y directions (or + longitude and latitude). + +In this tutorial, we'll focus on working with table inputs, and cover grid inputs in a +separate tutorial. + +PyGMT supports a variety of table input types that allow you to work with data in a +format that suits your needs. In this tutorial, we'll explore the different table input +types available in PyGMT and provide examples for each. By understanding the different +table input types, you can choose the one that best fits your data and analysis needs, +and work more efficiently with PyGMT. +""" + +# %% +from pathlib import Path + +import geopandas as gpd +import numpy as np +import pandas as pd +import pygmt + +# %% +# ASCII table file +# ---------------- +# +# Most PyGMT functions/methods that accept table input data have a ``data`` parameter. +# The easiest way to provide table input data to PyGMT is by specifying the file name of +# an ASCII table (e.g., ``data="input_data.dat"``). This is useful when your data is +# stored in a separate text file. + +# Create an example file with 3 rows and 2 columns +data = np.array([[1.0, 2.0], [5.0, 4.0], [8.0, 3.0]]) +np.savetxt("input_data.dat", data, fmt="%f") + +# Pass the file name to the data parameter +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True) +fig.plot(data="input_data.dat", style="p0.2c", fill="blue") +fig.show() + +# Now let's delete the example file +Path("input_data.dat").unlink() + +# %% +# Besides a plain string to a table file, the following variants are also accepted: +# +# - A :class:`pathlib.Path` object. +# - A full URL. PyGMT will download the file to the current directory first. +# - A file name prefixed with ``@`` (e.g., ``data="@input_data.dat"``), which is a +# special syntax in GMT to indicate that the file is a remote file hosted on the GMT +# data server. +# +# Additionally, PyGMT also supports a list of file names, :class:`pathlib.Path` objects, +# URLs, or remote files, to provide more flexibility in specifying input files. + +# %% +# 2-D array: `list`, `numpy.ndarray`, and `pandas.DataFrame` +# ---------------------------------------------------------- +# +# The ``data`` parameter also accepts a 2-D array, e.g., +# +# - A 2-D :class:`list` (i.e., a list of lists) +# - A :class:`numpy.ndarray` object with with a dimension of 2 +# - A :class:`pandas.DataFrame` object +# +# This is useful when you want to plot data that is already in memory. + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True) + +# Pass a 2-D list to the 'data' parameter +fig.plot(data=[[1.0, 2.0], [3.0, 4.0]], style="c0.2c", fill="black") + +# Pass a 2-D numpy array to the 'data' parameter +fig.plot(data=np.array([[4.0, 2.0], [6.0, 4.0]]), style="t0.2c", fill="red") + +# Pass a pandas.DataFrame to the 'data' parameter +df = pd.DataFrame(np.array([[7.0, 3.0], [9.0, 2.0]]), columns=["x", "y"]) +fig.plot(data=df, style="a0.2c", fill="blue") + +fig.show() + +# %% +# :class:`geopandas.GeoDataFrame` +# ------------------------------- +# +# If you're working with geospatial data, you can read your data as a +# :class:`geopandas.GeoDataFrame` object and pass it to the ``data`` parameter. This is +# useful if your data is stored in a geospatial data format (e.g., GeoJSON, etc.) that +# GMT and PyGMT do not support natively. + +# Example GeoDataFrame +gdf = gpd.GeoDataFrame( + { + "geometry": gpd.points_from_xy([2, 5, 9], [2, 3, 4]), + "value": [10, 20, 30], + } +) + +# Use the GeoDataFrame to specify the 'data' parameter +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True) +fig.plot(data=gdf, style="c0.2c", fill="purple") +fig.show() + +# %% +# Scalar values or 1-D arrays +# --------------------------- +# +# In addition to the ``data`` parameter, some PyGMT functions/methods also provide +# individual parameters (e.g., ``x`` and ``y`` for data coordinates) which allow you to +# specify the data. These parameters accept individual scalar values or 1-D arrays +# (lists or 1-D numpy arrays). + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True) + +# Pass scalar values to plot a single data point +fig.plot(x=1.0, y=2.0, style="a0.2c", fill="blue") + +# Pass 1-D lists to plot multiple data points +fig.plot(x=[5.0, 5.0, 5.0], y=[2.0, 3.0, 4.0], style="t0.2c", fill="green") + +# Pass 1-D numpy arrays to plot multiple data points +fig.plot( + x=np.array([8.0, 8.0, 8.0]), y=np.array([2.0, 3.0, 4.0]), style="c0.2c", fill="red" +) + +fig.show() + +# %% +# Conclusion +# ---------- +# +# In PyGMT, you have the flexibility to provide data in various table input types, +# including file names, 2-D arrays (2-D :class:`list`, :class:`numpy.ndarray`, +# :class:`pandas.DataFrames`), scalar values or a series of 1-D arrays, and +# :class:`geopandas.GeoDataFrame`. Choose the input type that best suits your data +# source and analysis requirements. diff --git a/v0.14.0/_downloads/965290cd60c381cf97b4af9f079872b2/meca.zip b/v0.14.0/_downloads/965290cd60c381cf97b4af9f079872b2/meca.zip new file mode 100644 index 00000000000..13429d02d6f Binary files /dev/null and b/v0.14.0/_downloads/965290cd60c381cf97b4af9f079872b2/meca.zip differ diff --git a/v0.14.0/_downloads/9668bd23976992b31979e6a67cf4b858/conic_lambert.zip b/v0.14.0/_downloads/9668bd23976992b31979e6a67cf4b858/conic_lambert.zip new file mode 100644 index 00000000000..30f7b8a3972 Binary files /dev/null and b/v0.14.0/_downloads/9668bd23976992b31979e6a67cf4b858/conic_lambert.zip differ diff --git a/v0.14.0/_downloads/9682a5b78ad0eabc6ccb1eccfa3d9a71/datetime_inputs.py b/v0.14.0/_downloads/9682a5b78ad0eabc6ccb1eccfa3d9a71/datetime_inputs.py new file mode 100644 index 00000000000..939e90ccf1d --- /dev/null +++ b/v0.14.0/_downloads/9682a5b78ad0eabc6ccb1eccfa3d9a71/datetime_inputs.py @@ -0,0 +1,69 @@ +""" +Datetime inputs +=============== + +Datetime inputs of the following types are supported in PyGMT: + +- :class:`numpy.datetime64` +- :class:`pandas.DatetimeIndex` +- :class:`xarray.DataArray`: datetimes included in an *xarray.DataArray* +- raw datetime strings in + `ISO 8601 format `__ (e.g. + ``"YYYY-MM-DD"``, ``"YYYY-MM-DDTHH"``, and ``"YYYY-MM-DDTHH:MM:SS"``) +- Python built-in :class:`datetime.datetime` and :class:`datetime.date` + +We can pass datetime inputs based on one of the types listed above directly to +the ``x`` and ``y`` parameters of e.g. the :meth:`pygmt.Figure.plot` method. + +The ``region`` parameter has to include the :math:`x` and :math:`y` axis limits +in the form [*date_min*, *date_max*, *ymin*, *ymax*]. Here *date_min* and +*date_max* can be directly defined as datetime input. + +""" + +# %% +import datetime + +import numpy as np +import pandas as pd +import pygmt +import xarray as xr + +fig = pygmt.Figure() + +# create a basemap with limits of 2010-01-01 to 2020-06-01 on the x axis and +# 0 to 10 on the y axis +fig.basemap( + projection="X15c/5c", + region=[datetime.date(2010, 1, 1), datetime.date(2020, 6, 1), 0, 10], + frame=["WSen", "af"], +) + +# numpy.datetime64 types +x = np.array( + ["2010-06-01", "2011-06-01T12", "2012-01-01T12:34:56"], dtype=np.datetime64 +) +y = [1, 2, 3] +fig.plot(x=x, y=y, style="c0.4c", pen="1p", fill="red3") + +# pandas.DatetimeIndex +x = pd.date_range("2013", periods=3, freq="YS") +y = [4, 5, 6] +fig.plot(x=x, y=y, style="t0.4c", pen="1p", fill="gold") + +# xarray.DataArray +x = xr.DataArray(data=pd.date_range(start="2015-03", periods=3, freq="QS")) +y = [7.5, 6, 4.5] +fig.plot(x=x, y=y, style="s0.4c", pen="1p") + +# raw datetime strings +x = ["2016-02-01", "2016-06-04T14", "2016-10-04T00:00:15"] +y = [7, 8, 9] +fig.plot(x=x, y=y, style="a0.4c", pen="1p", fill="dodgerblue") + +# the Python built-in datetime and date +x = [datetime.date(2018, 1, 1), datetime.datetime(2019, 6, 1, 20, 5, 45)] +y = [6.5, 4.5] +fig.plot(x=x, y=y, style="i0.4c", pen="1p", fill="seagreen") + +fig.show() diff --git a/v0.14.0/_downloads/993b9f04df2c6f466a4e3df1d358e4a6/coastlines.zip b/v0.14.0/_downloads/993b9f04df2c6f466a4e3df1d358e4a6/coastlines.zip new file mode 100644 index 00000000000..1ea6479b11e Binary files /dev/null and b/v0.14.0/_downloads/993b9f04df2c6f466a4e3df1d358e4a6/coastlines.zip differ diff --git a/v0.14.0/_downloads/9b909195fc9238b70d8a9df63b512099/logo.zip b/v0.14.0/_downloads/9b909195fc9238b70d8a9df63b512099/logo.zip new file mode 100644 index 00000000000..1bf6478896a Binary files /dev/null and b/v0.14.0/_downloads/9b909195fc9238b70d8a9df63b512099/logo.zip differ diff --git a/v0.14.0/_downloads/9bdf9772dea51f64c044bbfb94271c3b/line_custom_cpt.py b/v0.14.0/_downloads/9bdf9772dea51f64c044bbfb94271c3b/line_custom_cpt.py new file mode 100644 index 00000000000..cbb1d1b505a --- /dev/null +++ b/v0.14.0/_downloads/9bdf9772dea51f64c044bbfb94271c3b/line_custom_cpt.py @@ -0,0 +1,37 @@ +""" +Line colors with a custom CPT +============================= + +The color of the lines made by :meth:`pygmt.Figure.plot` can be set according +to a custom CPT and assigned with the ``pen`` parameter. + +The custom CPT can be used by setting the plot command's ``cmap`` parameter to +``True``. The ``zvalue`` parameter sets the z-value (color) to be used from the +custom CPT, and the line color is set as the z-value by using **+z** when +setting the ``pen`` color. + +""" + +# %% +import numpy as np +import pygmt + +# Create a list of values between 20 and 30 with 0.2 intervals +x = np.arange(start=20, stop=30, step=0.2) + +fig = pygmt.Figure() +fig.basemap(frame=["WSne", "af"], region=[20, 30, -10, 10]) + +# Create a custom CPT with the batlow CPT and 10 discrete z-values (colors), +# use color_model="+c0-9" to write the color palette in categorical format and +# add labels (0) to (9) for the colorbar legend +pygmt.makecpt(cmap="batlow", series=[0, 9, 1], color_model="+c0-9") + +# Plot 10 lines and set a different z-value for each line +for zvalue in range(10): + y = zvalue * np.sin(x) + fig.plot(x=x, y=y, cmap=True, zvalue=zvalue, pen="thick,+z,-") + +# Color bar to show the custom CPT and the associated z-values +fig.colorbar() +fig.show() diff --git a/v0.14.0/_downloads/9cc3627bf1f863c52e9986442daf9bf5/wiggle.py b/v0.14.0/_downloads/9cc3627bf1f863c52e9986442daf9bf5/wiggle.py new file mode 100644 index 00000000000..82f7f2c5ab8 --- /dev/null +++ b/v0.14.0/_downloads/9cc3627bf1f863c52e9986442daf9bf5/wiggle.py @@ -0,0 +1,42 @@ +""" +Wiggle along tracks +=================== + +The :meth:`pygmt.Figure.wiggle` method can plot z = f(x,y) anomalies along +tracks. ``x``, ``y``, ``z`` can be specified as 1-D arrays or within a +specified file. The ``scale`` parameter can be used to set the scale of the +anomaly in data/distance units. The positive and/or negative areas can be +filled with color by setting the ``fillpositive`` and/or ``fillnegative`` +parameters. +""" + +# %% +import numpy as np +import pygmt + +# Create (x, y, z) triplets +x = np.arange(-7, 7, 0.1) +y = np.zeros(x.size) +z = 50 * np.exp(-((x / 3) ** 2)) * np.cos(2 * np.pi * x) + +fig = pygmt.Figure() +fig.basemap(region=[-8, 12, -1, 1], projection="X10c", frame=["Snlr", "xa2f1"]) +fig.wiggle( + x=x, + y=y, + z=z, + # Set anomaly scale to 20 centimeters + scale="20c", + # Fill positive areas red + fillpositive="red", + # Fill negative areas gray + fillnegative="gray", + # Set the outline width to 1.0 point + pen="1.0p", + # Draw a blue track with a width of 0.5 points + track="0.5p,blue", + # Plot a vertical scale bar at Middle Right (MR). The bar length (+w) + # is 100 in data (z) units. Set the z unit label (+l) to "nT". + position="jMR+w100+lnT", +) +fig.show() diff --git a/v0.14.0/_downloads/9d5d5b226afb606ce920e6dc09abc754/land_and_water.ipynb b/v0.14.0/_downloads/9d5d5b226afb606ce920e6dc09abc754/land_and_water.ipynb new file mode 100644 index 00000000000..61d6b767f9f --- /dev/null +++ b/v0.14.0/_downloads/9d5d5b226afb606ce920e6dc09abc754/land_and_water.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Color land and water\n\nThe ``land`` and ``water`` parameters of :meth:`pygmt.Figure.coast` specify\na color to fill in the land and water masses, respectively. There are many\n:gmt-docs:`color codes in GMT `, including standard GMT color\nnames (like ``\"skyblue\"``), R/G/B levels (like ``\"0/0/255\"``), a hex value\n(like ``\"#333333\"``), and a gray level (like ``\"gray50\"``).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Make a global Mollweide map with automatic ticks\nfig.basemap(region=\"g\", projection=\"W15c\", frame=True)\n# Plot the land as light gray, and the water as sky blue\nfig.coast(land=\"#666666\", water=\"skyblue\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/9dd6f94f9962656384275c873896adf3/misc_eckertVI.zip b/v0.14.0/_downloads/9dd6f94f9962656384275c873896adf3/misc_eckertVI.zip new file mode 100644 index 00000000000..2b34ca5219d Binary files /dev/null and b/v0.14.0/_downloads/9dd6f94f9962656384275c873896adf3/misc_eckertVI.zip differ diff --git a/v0.14.0/_downloads/9e0562b9f55c6740d9f53686b02bf219/cyl_oblique_mercator.zip b/v0.14.0/_downloads/9e0562b9f55c6740d9f53686b02bf219/cyl_oblique_mercator.zip new file mode 100644 index 00000000000..3354d394403 Binary files /dev/null and b/v0.14.0/_downloads/9e0562b9f55c6740d9f53686b02bf219/cyl_oblique_mercator.zip differ diff --git a/v0.14.0/_downloads/9e96967816c2790ac5d06b9c9dfd88fd/misc_sinusoidal.py b/v0.14.0/_downloads/9e96967816c2790ac5d06b9c9dfd88fd/misc_sinusoidal.py new file mode 100644 index 00000000000..ca6389fdc9e --- /dev/null +++ b/v0.14.0/_downloads/9e96967816c2790ac5d06b9c9dfd88fd/misc_sinusoidal.py @@ -0,0 +1,24 @@ +r""" +Sinusoidal projection +===================== + +The sinusoidal projection is one of the oldest known projections, is +equal-area, and has been used since the mid-16th century. It has also been +called the "Equal-area Mercator" projection. The central meridian is a straight +line; all other meridians are sinusoidal curves. Parallels are all equally +spaced straight lines, with scale being true along all parallels (and central +meridian). + +**i**\ [*lon0/*]\ *scale* or **I**\ [*lon0/*]\ *width* + +The projection is set with **i** or **I**. The central meridian is set with the +optional *lon0*, and the figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Use region "d" to specify global region (-180/180/-90/90) +fig.coast(region="d", projection="I12c", frame="afg", land="ivory", water="bisque4") +fig.show() diff --git a/v0.14.0/_downloads/9edc8639b700ce6897f04e7e1ed1c04c/misc_sinusoidal.zip b/v0.14.0/_downloads/9edc8639b700ce6897f04e7e1ed1c04c/misc_sinusoidal.zip new file mode 100644 index 00000000000..ef0b8cc5c4a Binary files /dev/null and b/v0.14.0/_downloads/9edc8639b700ce6897f04e7e1ed1c04c/misc_sinusoidal.zip differ diff --git a/v0.14.0/_downloads/a00df384c13852bb0f7768ea5ca00308/cyl_universal_transverse_mercator.ipynb b/v0.14.0/_downloads/a00df384c13852bb0f7768ea5ca00308/cyl_universal_transverse_mercator.ipynb new file mode 100644 index 00000000000..e287a1cd353 --- /dev/null +++ b/v0.14.0/_downloads/a00df384c13852bb0f7768ea5ca00308/cyl_universal_transverse_mercator.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Universal Transverse Mercator projection\n\nA particular subset of the\n:doc:`transverse Merctor `\nis the Universal Transverse Mercator (UTM) which was adopted by the US Army\nfor large-scale military maps. Here, the globe is divided into 60 zones\nbetween 84\u00b0S and 84\u00b0N, most of which are 6\u00b0 (in longitude) wide.\nEach of these UTM zones have their unique central meridian.\nFurthermore, each zone is divided into latitude bands but these are\nnot needed to specify the projection for most cases. See Figure\n`Universal Transverse Mercator ` for all zone designations.\n\n\n.. figure:: https://docs.generic-mapping-tools.org/latest/_images/GMT_utm_zones.png\n :width: 700 px\n :align: center\n\n Universal Transverse Mercator zone layout.\n\nIn order to minimize the distortion in any given zone, a scale factor of 0.9996\nhas been factored into the formulae (although a standard, you can change this\nwith :gmt-term:`PROJ_SCALE_FACTOR`). This makes the UTM projection a *secant*\nprojection and not a *tangent* projection like the\n:doc:`transverse Merctor `.\nThe scale only varies by 1 part in 1,000 from true scale at equator. The\nellipsoidal projection expressions are accurate for map areas that extend\nless than 10\u00b0 away from the central meridian. For larger regions we use the\nconformal latitude in the general spherical formulae instead.\n\n**u**\\ *zone/scale* or **U**\\ *zone/width*\n\nThe projection is set with **u** or **U**. *zone* sets the zone for the figure,\nand the figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# UTM Zone is set to 52R\nfig.coast(\n region=[127.5, 128.5, 26, 27],\n projection=\"U52R/12c\",\n frame=\"afg\",\n land=\"gray80\",\n water=\"steelblue\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/a141091f21451d1e499799b5e8bf23a9/cyl_equal_area.ipynb b/v0.14.0/_downloads/a141091f21451d1e499799b5e8bf23a9/cyl_equal_area.ipynb new file mode 100644 index 00000000000..6fc7eb274a7 --- /dev/null +++ b/v0.14.0/_downloads/a141091f21451d1e499799b5e8bf23a9/cyl_equal_area.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Cylindrical equal-area projection\n\nThis cylindrical projection is actually several projections, depending on what\nlatitude is selected as the standard parallel. However, they are all equal area\nand hence non-conformal. All meridians and parallels are straight lines.\n\n**y**\\ *lon0/lat0*\\ */scale* or **Y**\\ *lon0/lat0*\\ */width*\n\nThe projection is set with **y** or **Y**. The projection center is set by\n*lon0/lat0*, and the figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Use region \"d\" to specify global region (-180/180/-90/90)\nfig.coast(\n region=\"d\",\n projection=\"Y35/30/12c\",\n frame=\"afg\",\n land=\"gray80\",\n water=\"steelblue\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/a2b63055fd3d9f92ea8060873e4fa4cd/vector_styles.py b/v0.14.0/_downloads/a2b63055fd3d9f92ea8060873e4fa4cd/vector_styles.py new file mode 100644 index 00000000000..a1882df105b --- /dev/null +++ b/v0.14.0/_downloads/a2b63055fd3d9f92ea8060873e4fa4cd/vector_styles.py @@ -0,0 +1,65 @@ +""" +Cartesian, circular, and geographic vectors +=========================================== + +The :meth:`pygmt.Figure.plot` method can plot Cartesian, circular, and geographic +vectors. The ``style`` parameter controls vector attributes. See also the +:doc:`Vector attributes example `. +""" + +# %% +import numpy as np +import pygmt + +# Create a plot with coast, Mercator projection (M) over the continental US +fig = pygmt.Figure() +fig.coast( + region=[-127, -64, 24, 53], + projection="M15c", + frame=True, + borders=1, + area_thresh=4000, + shorelines="0.25p,black", +) + + +# Left: plot 12 Cartesian vectors with different lengths +x = np.linspace(-116, -116, 12) # x vector coordinates +y = np.linspace(33.5, 42.5, 12) # y vector coordinates +direction = np.zeros(x.shape) # direction of vectors +length = np.linspace(0.5, 2.4, 12) # length of vectors +# Cartesian vectors (v) with red fill and pen (+g, +p), vector head at the end (+e), and +# 40 degree angle (+a) with no indentation for the vector head (+h) +style = "v0.2c+e+a40+gred+h0+p1p,red" +fig.plot(x=x, y=y, style=style, pen="1p,red", direction=[direction, length]) +fig.text(text="CARTESIAN", x=-112, y=44.2, font="13p,Helvetica-Bold,red", fill="white") + + +# Middle: plot 7 math angle arcs with different radii +num = 7 +x = np.full(num, -95) # x coordinates of the center +y = np.full(num, 37) # y coordinates of the center +radius = 1.8 - 0.2 * np.arange(0, num) # radius +startdir = np.full(num, 90) # start direction in degrees +stopdir = 180 + 40 * np.arange(0, num) # stop direction in degrees +# data for circular vectors +data = np.column_stack([x, y, radius, startdir, stopdir]) +arcstyle = "m0.5c+ea" # Circular vector (m) with an arrow at the end +fig.plot(data=data, style=arcstyle, fill="red3", pen="1.5p,black") +fig.text(text="CIRCULAR", x=-95, y=44.2, font="13p,Helvetica-Bold,black", fill="white") + + +# Right: plot geographic vectors using endpoints +NYC = [-74.0060, 40.7128] +CHI = [-87.6298, 41.8781] +SEA = [-122.3321, 47.6062] +NO = [-90.0715, 29.9511] +# '=' means geographic vectors. With the modifier '+s', the input data should contain +# coordinates of start and end points +style = "=0.5c+s+e+a30+gblue+h0.5+p1p,blue" +data = np.array([NYC + CHI, NYC + SEA, NYC + NO]) +fig.plot(data=data, style=style, pen="1.0p,blue") +fig.text( + text="GEOGRAPHIC", x=-74.5, y=44.2, font="13p,Helvetica-Bold,blue", fill="white" +) +fig.show() diff --git a/v0.14.0/_downloads/a2ec22a4eb80b72ea2bfe4b0868e1aba/cyl_equidistant.zip b/v0.14.0/_downloads/a2ec22a4eb80b72ea2bfe4b0868e1aba/cyl_equidistant.zip new file mode 100644 index 00000000000..2a870056dc1 Binary files /dev/null and b/v0.14.0/_downloads/a2ec22a4eb80b72ea2bfe4b0868e1aba/cyl_equidistant.zip differ diff --git a/v0.14.0/_downloads/a5212ae838cbd28233356cbaafb4950c/rose.py b/v0.14.0/_downloads/a5212ae838cbd28233356cbaafb4950c/rose.py new file mode 100644 index 00000000000..92223659e00 --- /dev/null +++ b/v0.14.0/_downloads/a5212ae838cbd28233356cbaafb4950c/rose.py @@ -0,0 +1,46 @@ +""" +Rose diagram +============ + +The :meth:`pygmt.Figure.rose` method can plot windrose diagrams or polar +histograms. +""" + +# %% +import pygmt + +# Load sample compilation of fracture lengths and azimuth as +# hypothetically digitized from geological maps +data = pygmt.datasets.load_sample_data(name="fractures") + +fig = pygmt.Figure() + +fig.rose( + # use columns of the sample dataset as input for the length and azimuth + # parameters + length=data.length, + azimuth=data.azimuth, + # specify the "region" of interest in the (r,azimuth) space + # [r0, r1, az0, az1], here, r0 is 0 and r1 is 1, for azimuth, az0 is 0 and + # az1 is 360 which means we plot a full circle between 0 and 360 degrees + region=[0, 1, 0, 360], + # set the diameter of the rose diagram to 7.5 cm + diameter="7.5c", + # define the sector width in degrees, we append +r here to draw a rose + # diagram instead of a sector diagram + sector="10+r", + # normalize bin counts by the largest value so all bin counts range from + # 0 to 1 + norm=True, + # use red3 as color fill for the sectors + fill="red3", + # define the frame with ticks and gridlines every 0.2 + # length unit in radial direction and every 30 degrees + # in azimuthal direction, set background color to + # lightgray + frame=["x0.2g0.2", "y30g30", "+glightgray"], + # use a pen size of 1p to draw the outlines + pen="1p", +) + +fig.show() diff --git a/v0.14.0/_downloads/a6814ea8c10c4c0ac301f6afe26df0cb/subplots.py b/v0.14.0/_downloads/a6814ea8c10c4c0ac301f6afe26df0cb/subplots.py new file mode 100644 index 00000000000..1fb43fc02a4 --- /dev/null +++ b/v0.14.0/_downloads/a6814ea8c10c4c0ac301f6afe26df0cb/subplots.py @@ -0,0 +1,242 @@ +""" +Making subplots +=============== + +When you're preparing a figure for a paper, there will often be times when +you'll need to put many individual plots into one large figure, and label them +'abcd'. These individual plots are called subplots. + +There are two main ways to create subplots in GMT: + +- Use :meth:`pygmt.Figure.shift_origin` to manually move each individual plot + to the right position. +- Use :meth:`pygmt.Figure.subplot` to define the layout of the subplots. + +The first method is easier to use and should handle simple cases involving a +couple of subplots. For more advanced subplot layouts, however, we recommend +the use of :meth:`pygmt.Figure.subplot` which offers finer grained control, and +this is what the tutorial below will cover. +""" + +# %% +import pygmt + +# %% +# Let's start by initializing a :class:`pygmt.Figure` instance. + +fig = pygmt.Figure() + + +# %% +# Define subplot layout +# --------------------- +# +# The :meth:`pygmt.Figure.subplot` method is used to set up the layout, size, +# and other attributes of the figure. It divides the whole canvas into regular +# grid areas with *n* rows and *m* columns. Each grid area can contain an +# individual subplot. For example: + +# %% +# .. code-block:: default +# +# with fig.subplot(nrows=2, ncols=3, figsize=("15c", "6c"), frame="lrtb"): +# ... + +# %% +# will define our figure to have a 2 row and 3 column grid layout. +# ``figsize=("15c", "6c")`` defines the overall size of the figure to be 15 cm +# wide by 6 cm high. Using ``frame="lrtb"`` allows us to customize the map +# frame for all subplots instead of setting them individually. The figure +# layout will look like the following: + +with fig.subplot(nrows=2, ncols=3, figsize=("15c", "6c"), frame="lrtb"): + for i in range(2): # row number starting from 0 + for j in range(3): # column number starting from 0 + index = i * 3 + j # index number starting from 0 + with fig.set_panel(panel=index): # sets the current panel + fig.text( + position="MC", + text=f"index: {index}; row: {i}, col: {j}", + region=[0, 1, 0, 1], + ) +fig.show() + +# %% +# The :meth:`pygmt.Figure.set_panel` method activates a specified subplot, +# and all subsequent plotting methods will take place in that subplot panel. +# This is similar to matplotlib's ``plt.sca`` method. In order to specify a +# subplot, you will need to provide the identifier for that subplot via the +# ``panel`` parameter. Pass in either the *index* number, or a tuple/list like +# (*row*, *col*) to ``panel``. + +# %% +# .. note:: +# +# The row and column numbering starts from 0. So for a subplot layout with +# N rows and M columns, row numbers will go from 0 to N-1, and column +# numbers will go from 0 to M-1. + +# %% +# For example, to activate the subplot on the top right corner (index: 2) at +# *row*\=0 and *col*\=2, so that all subsequent plotting commands happen +# there, you can use the following command: + +# %% +# .. code-block:: default +# +# with fig.set_panel(panel=[0, 2]): +# ... + + +# %% +# Making your first subplot +# ------------------------- +# +# Next, let's use what we learned above to make a 2 row by 2 column subplot +# figure. We'll also pick up on some new parameters to configure our subplot. + +fig = pygmt.Figure() +with fig.subplot( + nrows=2, + ncols=2, + figsize=("15c", "6c"), + autolabel=True, + frame=["af", "WSne"], + margins=["0.1c", "0.2c"], + title="My Subplot Heading", +): + fig.basemap(region=[0, 10, 0, 10], projection="X?", panel=[0, 0]) + fig.basemap(region=[0, 20, 0, 10], projection="X?", panel=[0, 1]) + fig.basemap(region=[0, 10, 0, 20], projection="X?", panel=[1, 0]) + fig.basemap(region=[0, 20, 0, 20], projection="X?", panel=[1, 1]) +fig.show() + +# %% +# In this example, we define a 2-row, 2-column (2x2) subplot layout using +# :meth:`pygmt.Figure.subplot`. The overall figure dimensions is set to be +# 15 cm wide and 6 cm high (``figsize=["15c", "6c"]``). In addition, we use +# some optional parameters to fine-tune some details of the figure creation: +# +# - ``autolabel=True``: Each subplot is automatically labelled 'abcd'. +# - ``margins=["0.1c", "0.2c"]``: Adjusts the space between adjacent subplots. +# In this case, it is set as 0.1 cm in the x-direction and 0.2 cm in the +# y-direction. +# - ``title="My Subplot Heading"``: Adds a title on top of the whole figure. +# +# Notice that each subplot was set to use a linear projection ``"X?"``. +# Usually, we need to specify the width and height of the map frame, but it is +# also possible to use a question mark ``"?"`` to let GMT decide automatically +# on what is the most appropriate width/height for each subplot's map frame. + +# %% +# .. tip:: +# +# In the above example, we used the following commands to activate the +# four subplots explicitly one after another:: +# +# fig.basemap(..., panel=[0, 0]) +# fig.basemap(..., panel=[0, 1]) +# fig.basemap(..., panel=[1, 0]) +# fig.basemap(..., panel=[1, 1]) +# +# In fact, we can just use ``fig.basemap(..., panel=True)`` without +# specifying any subplot index number, and GMT will automatically activate +# the next subplot panel. + +# %% +# .. note:: +# +# All plotting methods (e.g. :meth:`pygmt.Figure.coast`, +# :meth:`pygmt.Figure.text`, etc) are able to use ``panel`` parameter when +# in subplot mode. Once a panel is activated using ``panel`` or +# :meth:`pygmt.Figure.set_panel`, subsequent plotting commands that don't +# set a ``panel`` will have their elements added to the same panel as +# before. + + +# %% +# Shared x- and y-axes +# -------------------- +# +# In the example above with the four subplots, the two subplots for each row +# have the same y-axis range, and the two subplots for each column have the +# same x-axis range. You can use the ``sharex``/``sharey`` parameters to set a +# common x- and/or y-axis between subplots. + +fig = pygmt.Figure() +with fig.subplot( + nrows=2, + ncols=2, + figsize=("15c", "6c"), # width of 15 cm, height of 6 cm + autolabel=True, + margins=["0.3c", "0.2c"], # horizontal 0.3 cm and vertical 0.2 cm margins + title="My Subplot Heading", + sharex="b", # shared x-axis on the bottom side + sharey="l", # shared y-axis on the left side + frame="WSrt", +): + fig.basemap(region=[0, 10, 0, 10], projection="X?", panel=True) + fig.basemap(region=[0, 20, 0, 10], projection="X?", panel=True) + fig.basemap(region=[0, 10, 0, 20], projection="X?", panel=True) + fig.basemap(region=[0, 20, 0, 20], projection="X?", panel=True) +fig.show() + +# %% +# ``sharex="b"`` indicates that subplots in a column will share the x-axis, and +# only the **b**\ ottom axis is displayed. ``sharey="l"`` indicates that +# subplots within a row will share the y-axis, and only the **l**\ eft axis is +# displayed. +# +# Of course, instead of using the ``sharex``/``sharey`` parameters, you can +# also set a different ``frame`` for each subplot to control the axis +# properties individually for each subplot. + + +# %% +# Advanced subplot layouts +# ------------------------ +# +# Nested subplots are currently not supported. If you want to create more +# complex subplot layouts, some manual adjustments are needed. +# +# The following example draws three subplots in a 2-row, 2-column layout, with +# the first subplot occupying the first row. + +fig = pygmt.Figure() +# Bottom row, two subplots +with fig.subplot(nrows=1, ncols=2, figsize=("15c", "3c"), autolabel="b)"): + fig.basemap( + region=[0, 5, 0, 5], projection="X?", frame=["af", "WSne"], panel=[0, 0] + ) + fig.basemap( + region=[0, 5, 0, 5], projection="X?", frame=["af", "WSne"], panel=[0, 1] + ) +# Move plot origin by 1 cm above the height of the entire figure +fig.shift_origin(yshift="h+1c") +# Top row, one subplot +with fig.subplot(nrows=1, ncols=1, figsize=("15c", "3c"), autolabel="a)"): + fig.basemap( + region=[0, 10, 0, 10], projection="X?", frame=["af", "WSne"], panel=[0, 0] + ) + fig.text(text="TEXT", x=5, y=5) + +fig.show() + +# %% +# We start by drawing the bottom two subplots, setting ``autolabel="b)"`` so +# that the subplots are labelled 'b)' and 'c)'. Next, we use +# :meth:`pygmt.Figure.shift_origin` to move the plot origin 1 cm above the +# **h**\ eight of the entire figure that is currently plotted (i.e. the bottom +# row subplots). A single subplot is then plotted on the top row. You may need +# to adjust the ``yshift`` parameter to make your plot look nice. This top row +# uses ``autolabel="a)"``, and we also plotted some text inside. Note that +# ``projection="X?"`` was used to let GMT automatically determine the size of +# the subplot according to the size of the subplot area. + +# %% +# You can also manually override the ``autolabel`` for each subplot using for +# example, ``fig.set_panel(..., fixedlabel="b) Panel 2")`` which would allow +# you to manually label a single subplot as you wish. This can be useful for +# adding a more descriptive subtitle to individual subplots. + +# sphinx_gallery_thumbnail_number = 3 diff --git a/v0.14.0/_downloads/a77720ba4c74abe6edb60ce9bfb9ddd5/earth_relief.zip b/v0.14.0/_downloads/a77720ba4c74abe6edb60ce9bfb9ddd5/earth_relief.zip new file mode 100644 index 00000000000..a778bfbff36 Binary files /dev/null and b/v0.14.0/_downloads/a77720ba4c74abe6edb60ce9bfb9ddd5/earth_relief.zip differ diff --git a/v0.14.0/_downloads/a89051a98eae8285dad5a8f02c7c1209/frames.ipynb b/v0.14.0/_downloads/a89051a98eae8285dad5a8f02c7c1209/frames.ipynb new file mode 100644 index 00000000000..abd35e9a119 --- /dev/null +++ b/v0.14.0/_downloads/a89051a98eae8285dad5a8f02c7c1209/frames.ipynb @@ -0,0 +1,169 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Frames, ticks, titles, and labels\n\nSetting frame, ticks, title, etc., of the plot is handled by the ``frame``\nparameter that most plotting methods of the :class:`pygmt.Figure` class\ncontain.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plot frame\n\nBy default, PyGMT does not add a frame to your plot. For example, we can plot\nthe coastlines of the world with a Mercator projection:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(shorelines=\"1/0.5p\", region=[-180, 180, -60, 60], projection=\"M25c\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To add the default GMT frame style to the plot, use ``frame=\"f\"`` in\n:meth:`pygmt.Figure.basemap` or another plotting method (which has the\n``frame`` parameter, with the exception of :meth:`pygmt.Figure.colorbar`):\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(shorelines=\"1/0.5p\", region=[-180, 180, -60, 60], projection=\"M25c\")\nfig.basemap(frame=\"f\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ticks and grid lines\n\nThe automatic frame (``frame=True`` or ``frame=\"af\"``) adds the default GMT\nframe style and automatically determines tick labels from the plot region.\nIn GMT the tick labels are called **a**\\ nnotations.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(shorelines=\"1/0.5p\", region=[-180, 180, -60, 60], projection=\"M25c\")\nfig.basemap(frame=\"af\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Add automatic grid lines to the plot by passing ``g`` through the ``frame``\nparameter:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(shorelines=\"1/0.5p\", region=[-180, 180, -60, 60], projection=\"M25c\")\nfig.basemap(frame=\"ag\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To adjust the step widths of annotations, frame, and grid lines we can\nadd the desired step widths after ``a``, ``f``, or ``g``. In the example\nbelow, the step widths are set to 30\u00b0, 7.5\u00b0, and 15\u00b0, respectively.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(shorelines=\"1/0.5p\", region=[-180, 180, -60, 60], projection=\"M25c\")\nfig.basemap(frame=\"a30f7.5g15\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Title\n\nThe figure title can be set by passing **+t**\\ *title* to the ``frame``\nparameter of :meth:`pygmt.Figure.basemap`. Passing multiple arguments to\n``frame`` can be done by using a list, as shown in the example below.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n# region=\"TT\" specifies Trinidad and Tobago using the ISO country code\nfig.coast(shorelines=\"1/0.5p\", region=\"TT\", projection=\"M25c\")\nfig.basemap(frame=[\"a\", \"+tTrinidad and Tobago\"])\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Axis labels\n\nAxis labels, in GMT simply called labels, can be set by passing\n**x+l**\\ *label* (or starting with **y** if\nlabeling the y-axis) to the ``frame`` parameter of\n:meth:`pygmt.Figure.basemap`. The map boundaries (or plot axes) are named as\nWest/west/left (**W**, **w**, **l**), South/south/bottom\n(**S**, **s**, **b**), North/north/top (**N**, **n**, **t**), and\nEast/east/right (**E**, **e**, **r**) sides of a figure. If an upper-case\nletter (**W**, **S**, **N**, **E**) is passed, the axis is plotted with\ntick marks and annotations. The lower-case version\n(**w**, **s**, **n**, **e**) plots the axis only with tick marks.\nTo only plot the axis pass **l**, **b**, **t**, **r**. By default\n(``frame=True`` or ``frame=\"af\"``), the West and the South axes are\nplotted with both tick marks and annotations.\n\nThe example below uses a Cartesian projection, as GMT does not allow\nlabels to be set for geographic maps.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(\n region=[0, 10, 0, 20],\n projection=\"X10c/8c\",\n # Plot axis with tick marks, annotations, and labels on the\n # West and South axes\n # Plot axis with tick marks on the north and east axes\n frame=[\"WSne\", \"xaf+lx-axis\", \"yaf+ly-axis\"],\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/a909548a3d09923b626767cd032b88e3/text.ipynb b/v0.14.0/_downloads/a909548a3d09923b626767cd032b88e3/text.ipynb new file mode 100644 index 00000000000..9790eecc00f --- /dev/null +++ b/v0.14.0/_downloads/a909548a3d09923b626767cd032b88e3/text.ipynb @@ -0,0 +1,158 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Plotting text\n\nIt is often useful to add text annotations to a plot or map. This is handled by the\n:meth:`pygmt.Figure.text` method of the :class:`pygmt.Figure` class.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from pathlib import Path\n\nimport pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Adding a single text label\n\nTo add a single text label to a plot, use the ``text`` and ``x`` and ``y`` parameters\nto specify the text and position.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X5c\", frame=True)\nfig.text(x=0, y=0, text=\"My text\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Adjusting the text label\n\nThere are several optional parameters to adjust the text label:\n\n* ``font``: Sets the size, family/weight, and color of the font for the text.\n A list of all recognized fonts can be found at :doc:`/techref/fonts`.\n For details of how to use non-default fonts, refer to\n :gmt-docs:`PostScript Fonts Used by GMT `.\n* ``angle``: Specifies the rotation of the text. It is measured counter-clockwise\n from the horizontal in degrees.\n* ``justify``: Defines the anchor point of the bounding box for the text. It is\n specified by a two-letter (order independent) code, chosen from:\n\n * Vertical: **T**\\(op), **M**\\(iddle), **B**\\(ottom)\n * Horizontal: **L**\\(eft), **C**\\(entre), **R**\\(ight)\n\n* ``offset``: Shifts the text relatively to the reference point.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\n# -----------------------------------------------------------------------------\n# Left: \"font\", \"angle\", and \"offset\" parameters\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X5c\", frame=\"rtlb\")\n\n# Change font size, family/weight, color of the text\nfig.text(x=0, y=3, text=\"my text\", font=\"12p,Helvetica-Bold,blue\")\n\n# Rotate the text by 30 degrees counter-clockwise from the horizontal\nfig.text(x=0, y=0, text=\"my text\", angle=30)\n\n# Plot marker and text label for reference\nfig.plot(x=0, y=-3, style=\"s0.2c\", fill=\"darkorange\", pen=\"0.7p,darkgray\")\nfig.text(x=0, y=-3, text=\"my text\")\n# Shift the text label relatively to the position given via the x and y parameters\n# by 1 centimeter to the right (positive x direction) and 0.5 centimeters down\n# (negative y direction)\nfig.text(x=0, y=-3, text=\"my text\", offset=\"1c/-0.5c\")\n\nfig.shift_origin(xshift=\"w+0.5c\")\n\n# -----------------------------------------------------------------------------\n# Right: \"justify\" parameter\nfig.basemap(region=[-1, 1, -1, 1], projection=\"X5c\", frame=\"rtlb\")\n\n# Plot markers for reference\nfig.plot(\n x=[-0.5, 0, 0.5, -0.5, 0, 0.5, -0.5, 0, 0.5],\n y=[0.5, 0.5, 0.5, 0, 0, 0, -0.5, -0.5, -0.5],\n style=\"s0.2c\",\n fill=\"darkorange\",\n pen=\"0.7p,darkgray\",\n)\n\n# Plot text labels at the x and y positions of the markers while varying the anchor\n# point via the justify parameter\nfig.text(x=-0.5, y=0.5, text=\"TL\", justify=\"TL\") # TopLeft\nfig.text(x=0, y=0.5, text=\"TC\", justify=\"TC\") # TopCenter\nfig.text(x=0.5, y=0.5, text=\"TR\", justify=\"TR\") # TopRight\nfig.text(x=-0.5, y=0, text=\"ML\", justify=\"ML\") # MiddleLeft\nfig.text(x=0, y=0, text=\"MC\", justify=\"MC\") # MiddleCenter\nfig.text(x=0.5, y=0, text=\"MR\", justify=\"MR\") # MiddleRight\nfig.text(x=-0.5, y=-0.5, text=\"BL\", justify=\"BL\") # BottomLeft\nfig.text(x=0, y=-0.5, text=\"BC\", justify=\"BC\") # BottomCenter\nfig.text(x=0.5, y=-0.5, text=\"BR\", justify=\"BR\") # BottomRight\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Adding a text box\n\nThere are different optional parameters to add and customize a text box:\n\n* ``fill``: Fills the text box with a color.\n* ``pen``: Outlines the text box.\n* ``clearance``: Adds margins in x and y directions between the text and the outline\n of the text box. Can be used to get a text box with rounded edges.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X5c\", frame=\"rtlb\")\n\n# Add a box with a fill in green color\nfig.text(x=0, y=3, text=\"My text\", fill=\"green\")\n\n# Add box with a seagreen, 1-point thick, solid outline\nfig.text(x=0, y=1, text=\"My text\", pen=\"1p,seagreen,solid\")\n\n# Add margins between the text and the outline of the text box of 0.1\n# centimeters in x direction and 0.2 centimeters in y direction\nfig.text(x=0, y=-1, text=\"My text\", pen=\"1p,seagreen,dashed\", clearance=\"0.1c/0.2c\")\n\n# Get rounded edges by passing \"+tO\" to the \"clearance\" parameter\nfig.text(x=0, y=-3, text=\"My text\", pen=\"1p,seagreen,solid\", clearance=\"0.2c/0.2c+tO\")\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Adding multiple text labels with individual configurations\n\nTo add multiple text labels with individual ``font``, ``angle``, and ``justify``,\none can provide lists with the corresponding arguments.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X5c\", frame=True)\n\nfig.text(\n x=[0, 0, 0],\n y=[3, 2, -2],\n font=[\"5p,Helvetica,black\", \"5p,Helvetica,blue\", \"6p,Courier-Bold,red\"],\n angle=[0, 0, 30],\n justify=[\"CM\", \"LT\", \"CM\"],\n text=[\n \"black text with justify='CM'\",\n \"blue text with justify='LT'\",\n \"red text with angle=30\",\n ],\n)\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Using an external input file\n\nIt is also possible to add text labels via an external input file containing ``x``,\n``y``, and ``text`` columns. Addionaly, columns to set the ``angle``, ``front``,\nand ``justify`` parameters can be provided. Here, we give a complete example.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[108, 121, -5, 8], projection=\"M10c\", frame=\"a2f1\")\nfig.coast(land=\"darkgray\", water=\"steelblue\", shorelines=\"1/0.1p,gray30\")\n\n# Create space-delimited file with region / sea names:\n# - longitude (x) and latitude (y) coordinates are in the first two columns\n# - angle, font, and justify muss be present in this order in the next three columns\n# - the text to be printed is given in the last column\nwith Path.open(\"examples.txt\", \"w\") as f:\n f.write(\"114.00 0.50 0 15p,Helvetica-Bold,white CM BORNEO\\n\")\n f.write(\"119.00 3.25 0 8p,Helvetica-Bold,black CM CELEBES SEA\\n\")\n f.write(\"112.00 -4.60 0 8p,Helvetica-Bold,black CM JAVA SEA\\n\")\n f.write(\"112.00 6.00 40 8p,Helvetica-Bold,black CM SOUTH CHINA SEA\\n\")\n f.write(\"119.12 7.25 -40 8p,Helvetica-Bold,black CM SULU SEA\\n\")\n f.write(\"118.40 -1.00 65 8p,Helvetica-Bold,black CM MAKASSAR STRAIT\\n\")\n\n# Setting the angle, font, and justify parameters to True indicates that those columns\n# are present in the text file\nfig.text(textfiles=\"examples.txt\", angle=True, font=True, justify=True)\n\n# Cleanups\nPath(\"examples.txt\").unlink()\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Using the position parameter\n\nInstead of using the ``x`` and ``y`` parameters, the ``position`` parameter can be\nspecified to set the reference point for the text on the plot. As for the ``justify``\nparameter, the ``position`` parameter is specified by a two-letter (order independent)\ncode, chosen from:\n\n* Vertical: **T**\\(op), **M**\\(iddle), **B**\\(ottom)\n* Horizontal: **L**\\(eft), **C**\\(entre), **R**\\(ight)\n\nThis can be helpful to add a tag to a subplot or text labels out of the plot or map\nframe, e.g., for depth slices.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\n# -----------------------------------------------------------------------------\n# Left: Add a tag to a subplot\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X5c\", frame=[\"WStr\", \"af\"])\n\nfig.text(\n text=\"(a)\",\n position=\"TL\", # Top Left\n justify=\"TL\", # Top Left\n offset=\"0.1c/-0.1c\",\n)\n\nfig.shift_origin(xshift=\"w+1c\")\n\n# -----------------------------------------------------------------------------\n# Right: Add a text label outside of the plot or map frame\nfig.basemap(region=[-30, 30, 10, 60], projection=\"L0/35/23/47/5c\", frame=[\"wSnE\", \"af\"])\n\nfig.text(\n text=\"@@100 km\", # \"@@\" gives \"@\" in GMT or PyGMT\n position=\"TC\", # Top Center\n justify=\"MC\", # Middle Center\n offset=\"0c/0.2c\",\n no_clip=True, # Allow plotting outside of the map or plot frame\n)\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Advanced configuration\n\nFor crafting more advanced styles, including using special symbols and other character\nsets, be sure to check out the GMT documentation at :gmt-docs:`text.html` and also the\nTechnical References at :gmt-docs:`reference/features.html#placement-of-text`. Good\nluck!\n\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/a9e17da640464983176b4dbce0bf6c87/great_circles.zip b/v0.14.0/_downloads/a9e17da640464983176b4dbce0bf6c87/great_circles.zip new file mode 100644 index 00000000000..27a56abfddf Binary files /dev/null and b/v0.14.0/_downloads/a9e17da640464983176b4dbce0bf6c87/great_circles.zip differ diff --git a/v0.14.0/_downloads/aa02a23b73ef057de4a94734d06c3934/grdgradient_shading.zip b/v0.14.0/_downloads/aa02a23b73ef057de4a94734d06c3934/grdgradient_shading.zip new file mode 100644 index 00000000000..c4dcc2b10e5 Binary files /dev/null and b/v0.14.0/_downloads/aa02a23b73ef057de4a94734d06c3934/grdgradient_shading.zip differ diff --git a/v0.14.0/_downloads/ad50949d28d517a0a868d00de37fb8da/cyl_universal_transverse_mercator.py b/v0.14.0/_downloads/ad50949d28d517a0a868d00de37fb8da/cyl_universal_transverse_mercator.py new file mode 100644 index 00000000000..51a296451bf --- /dev/null +++ b/v0.14.0/_downloads/ad50949d28d517a0a868d00de37fb8da/cyl_universal_transverse_mercator.py @@ -0,0 +1,51 @@ +r""" +Universal Transverse Mercator projection +======================================== + +A particular subset of the +:doc:`transverse Merctor ` +is the Universal Transverse Mercator (UTM) which was adopted by the US Army +for large-scale military maps. Here, the globe is divided into 60 zones +between 84°S and 84°N, most of which are 6° (in longitude) wide. +Each of these UTM zones have their unique central meridian. +Furthermore, each zone is divided into latitude bands but these are +not needed to specify the projection for most cases. See Figure +:ref:`Universal Transverse Mercator ` for all zone designations. + +.. _GMT_utm_zones: + +.. figure:: https://docs.generic-mapping-tools.org/latest/_images/GMT_utm_zones.png + :width: 700 px + :align: center + + Universal Transverse Mercator zone layout. + +In order to minimize the distortion in any given zone, a scale factor of 0.9996 +has been factored into the formulae (although a standard, you can change this +with :gmt-term:`PROJ_SCALE_FACTOR`). This makes the UTM projection a *secant* +projection and not a *tangent* projection like the +:doc:`transverse Merctor `. +The scale only varies by 1 part in 1,000 from true scale at equator. The +ellipsoidal projection expressions are accurate for map areas that extend +less than 10° away from the central meridian. For larger regions we use the +conformal latitude in the general spherical formulae instead. + +**u**\ *zone/scale* or **U**\ *zone/width* + +The projection is set with **u** or **U**. *zone* sets the zone for the figure, +and the figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# UTM Zone is set to 52R +fig.coast( + region=[127.5, 128.5, 26, 27], + projection="U52R/12c", + frame="afg", + land="gray80", + water="steelblue", +) +fig.show() diff --git a/v0.14.0/_downloads/ad762c542a1901935670d8767c0fa1cf/misc_hammer.ipynb b/v0.14.0/_downloads/ad762c542a1901935670d8767c0fa1cf/misc_hammer.ipynb new file mode 100644 index 00000000000..b7ba5f0dd0f --- /dev/null +++ b/v0.14.0/_downloads/ad762c542a1901935670d8767c0fa1cf/misc_hammer.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Hammer projection\n\nThe equal-area Hammer projection, first presented by the German mathematician\nErnst von Hammer in 1892, is also known as Hammer-Aitoff (the Aitoff projection\nlooks similar, but is not equal-area). The border is an ellipse, equator and\ncentral meridian are straight lines, while other parallels and meridians are\ncomplex curves.\n\n**h**\\ [*lon0/*]\\ *scale* or **H**\\ [*lon0/*]\\ *width*\n\nThe projection is set with **h** or **H**. The central meridian is set with the\noptional *lon0*, and the figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Use region \"d\" to specify global region (-180/180/-90/90)\nfig.coast(region=\"d\", projection=\"H12c\", frame=\"afg\", land=\"ivory\", water=\"bisque4\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/afab58cb0532464ba030f144f63848df/lines.py b/v0.14.0/_downloads/afab58cb0532464ba030f144f63848df/lines.py new file mode 100644 index 00000000000..c0cbabbdd75 --- /dev/null +++ b/v0.14.0/_downloads/afab58cb0532464ba030f144f63848df/lines.py @@ -0,0 +1,104 @@ +""" +Plotting lines +============== + +Plotting lines is handled by the :meth:`pygmt.Figure.plot` method. +""" + +# %% +import pygmt + +# %% +# Plot lines +# ---------- +# +# Create a Cartesian figure using the :meth:`pygmt.Figure.basemap` method. Pass lists +# containing two values to the ``x`` and ``y`` parameters of the +# :meth:`pygmt.Figure.plot` method. By default, a 0.25-points thick, black, solid +# line is drawn between these two data points. + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + +fig.plot(x=[1, 5], y=[5, 9]) + +fig.show() + +# %% +# Additional line segments can be added by including more data points in the lists +# passed to ``x`` and ``y``. + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + +fig.plot(x=[1, 5, 8], y=[5, 9, 4]) + +fig.show() + +# %% +# To plot multiple lines, :meth:`pygmt.Figure.plot` needs to be used for each line +# separately. + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + +fig.plot(x=[1, 5, 8], y=[5, 9, 4]) +fig.plot(x=[2, 4, 9], y=[3, 7, 5]) + +fig.show() + + +# %% +# Change line attributes +# ---------------------- +# +# The line attributes can be set by the ``pen`` parameter which takes a string +# argument with the optional values *width*,\ *color*,\ *style*. + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + +# Set the pen width to "5p" (5 points), and use the default color "black" and the +# default style "solid" +fig.plot(x=[1, 8], y=[3, 9], pen="5p") + +fig.show() + +# %% +# The line color can be set and is added after the line width to the ``pen`` +# parameter. + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + +# Set the line color to "red", use the default style "solid" +fig.plot(x=[1, 8], y=[3, 9], pen="5p,red") + +fig.show() + +# %% +# The line style can be set and is added after the line width or color to the +# ``pen`` parameter. + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + +# Set the line style to "..-" (dot dot dash), use the default color "black" +fig.plot(x=[1, 8], y=[3, 9], pen="5p,..-") + +fig.show() + +# %% +# The line width, color, and style can all be set in the same ``pen`` parameter. +# For a gallery example showing other ``pen`` settings, see +# :doc:`/gallery/lines/linestyles`. + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + +# Draw a 7-points thick, green line with style "-.-" (dash dot dash) +fig.plot(x=[1, 8], y=[3, 9], pen="7p,green,-.-") + +fig.show() + +# sphinx_gallery_thumbnail_number = 6 diff --git a/v0.14.0/_downloads/b1f1965bfa7aaaf39234510dcdff17dc/cartesian_linear.zip b/v0.14.0/_downloads/b1f1965bfa7aaaf39234510dcdff17dc/cartesian_linear.zip new file mode 100644 index 00000000000..2a52b675ba3 Binary files /dev/null and b/v0.14.0/_downloads/b1f1965bfa7aaaf39234510dcdff17dc/cartesian_linear.zip differ diff --git a/v0.14.0/_downloads/b335e2cbfa96119fccae777d8f260e98/linestrings.zip b/v0.14.0/_downloads/b335e2cbfa96119fccae777d8f260e98/linestrings.zip new file mode 100644 index 00000000000..8d806437006 Binary files /dev/null and b/v0.14.0/_downloads/b335e2cbfa96119fccae777d8f260e98/linestrings.zip differ diff --git a/v0.14.0/_downloads/b3c3948a42fb7dea3c0018d0c4d8551a/rgb_image.ipynb b/v0.14.0/_downloads/b3c3948a42fb7dea3c0018d0c4d8551a/rgb_image.ipynb new file mode 100644 index 00000000000..0f1c7a69033 --- /dev/null +++ b/v0.14.0/_downloads/b3c3948a42fb7dea3c0018d0c4d8551a/rgb_image.ipynb @@ -0,0 +1,79 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RGB image\n\nThe :meth:`pygmt.Figure.grdimage` method can be used to plot Red, Green, Blue\n(RGB) images, or any 3-band false color combination. Here, we'll use\n:py:func:`rioxarray.open_rasterio` to read a GeoTIFF file into an\n:class:`xarray.DataArray` format, and plot it on a map.\n\nThe example below shows a Worldview 2 satellite image over\n[L\u0101hain\u0101, Hawai\u02bbi during the August 2023 wildfires](https://en.wikipedia.org/wiki/2023_Hawaii_wildfires#L%C4%81hain%C4%81).\nData is sourced from a Cloud-Optimized GeoTIFF (COG) file hosted on\n[OpenAerialMap](https://map.openaerialmap.org) under a\n[CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) license.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\nimport rioxarray" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Read 3-band data from GeoTIFF into an xarray.DataArray object:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "with rioxarray.open_rasterio(\n filename=\"https://oin-hotosm.s3.us-east-1.amazonaws.com/64d6a49a19cb3a000147a65b/0/64d6a49a19cb3a000147a65c.tif\",\n overview_level=5,\n) as img:\n # Subset to area of L\u0101hain\u0101 in EPSG:32604 coordinates\n image = img.rio.clip_box(minx=738000, maxx=755000, miny=2300000, maxy=2318000)\n image = image.load() # Force loading the DataArray into memory\nimage # noqa: B018" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Plot the RGB imagery:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nwith pygmt.config(FONT_TITLE=\"Times-Roman\"): # Set title font to Times-Roman\n fig.grdimage(\n grid=image,\n # Use a map scale where 1 cm on the map equals 1 km on the ground\n projection=\"x1:100000\",\n frame=[r\"WSne+tL@!a\u00afhain@!a\u00af, Hawai`i on 9 Aug 2023\", \"af\"],\n )\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/b43833f86c2f912c249b38caeda4c1e6/decorated_lines.ipynb b/v0.14.0/_downloads/b43833f86c2f912c249b38caeda4c1e6/decorated_lines.ipynb new file mode 100644 index 00000000000..ef42a38c1fe --- /dev/null +++ b/v0.14.0/_downloads/b43833f86c2f912c249b38caeda4c1e6/decorated_lines.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Decorated lines\n\nTo draw a so-called *decorated line*, i.e., symbols along a line or curve, use the\n``style`` parameter of the :meth:`pygmt.Figure.plot` method with the argument ``\"~\"``\nand the desired modifiers. A colon (``\":\"``) is used to separate the algorithm\nsettings from the symbol information. This example shows how to adjust the symbols.\nBeside the built-in symbols also custom symbols can be used. For modifying the main\ndecorated line via the ``pen`` parameter, see the\n:doc:`Line styles example `. For details on the input data\nsee the upstream GMT documentation at :gmt-docs:`plot.html#s`. Furthermore, there are\nso-called *line fronts*, which are often used to plot fault lines, subduction zones,\nor weather fronts; for details see the\n:doc:`Line fronts example `.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Generate a two-point line for plotting\nx = np.array([1, 4])\ny = np.array([24, 24])\n\nfig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 24], projection=\"X15c\", frame=\"+tDecorated Lines\")\n\n# Plot different decorated lines\nfor decoline in [\n # Line with circles (\"c\") of 0.5 centimeters radius in distance of 1 centimeter\n \"~d1c:+sc0.5c\",\n # Adjust thickness, color, and style of the outline via \"+p\"\n # Here, we plot a 1-point thick, blue, dashed outline\n \"~d1c:+sc0.5c+p1p,blue,dashed\",\n # Add a fill color using \"+g\" with the desired color\n \"~d1c:+sc0.5c+glightblue\",\n # To use a pattern as fill append \"p\" and give the pattern number\n \"~d1c:+sc0.5c+gp8+p1p,blue\",\n # Line with triangles (\"t\")\n \"~d1c:+st0.5c+gtan+p1p,black\",\n # Rotate counter-clockwise from line-parallel (\"+ap\") by 30 degrees\n \"~d1c:+st0.5c+gtan+p1p,black+ap30\",\n # Line with inverse triangles with a size of 0.3 centimeters in a\n # distance of 0.4 centimeters\n \"~d0.4c:+si0.3c+gtan+p1p,black\",\n # Line with squares (\"s\") with a size of 0.7 centimeters in a distance of\n # 1 centimeter\n \"~d1c:+ss0.7c+gtan+p1p,black\",\n # Shift symbols using \"+n\" in x and y directions relative to the main decorated line\n \"~d1c:+sd0.5c+gtan+p1p,black+n-0.2c/0.1c\",\n # Give the number of equally spaced symbols by using \"n\" instead of \"d\"\n \"~n6:+sn0.5c+gtan+p1p,black\",\n # Use upper-case \"N\" to have symbols at the start and end of the line\n \"~N6:+sh0.5c+gtan+p1p,black\",\n # Suppress the main decorated line by appending \"+i\"\n \"~d1c:+sg0.5c+gtan+p1p,black+i\",\n # To only plot a symbol at the start of the line use \"N-1\"\n \"~N-1:+sp0.2c+gblack\",\n # To only plot a symbol at the end of the line use \"N+1\"\n \"~N+1:+sp0.2c+gblack\",\n # Line with stars (\"a\")\n \"~d1c:+sa0.5c+ggold+p1p,black\",\n # Line with crosses (\"x\")\n \"~d1c:+sx0.5c+p2p,red\",\n # Line with (vertical) lines or bars (\"y\")\n \"~d0.5c:+sy0.5c+p5p,brown\",\n # Use custom symbol (\"k\") \"squaroid\" with a size of 0.5 centimeters\n \"~d1c:+sksquaroid/0.5c+ggray+p1p,black\",\n]:\n y = y - 1.2 # Move current line down\n fig.plot(x=x, y=y, style=decoline, pen=\"1.25p,black\")\n fig.text(\n x=x[-1],\n y=y[-1],\n text=decoline,\n font=\"Courier-Bold\",\n justify=\"ML\",\n offset=\"0.75c/0c\",\n )\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/b4e05f5cc9879317a35605598b0e3237/borders.zip b/v0.14.0/_downloads/b4e05f5cc9879317a35605598b0e3237/borders.zip new file mode 100644 index 00000000000..fa5047ffd1b Binary files /dev/null and b/v0.14.0/_downloads/b4e05f5cc9879317a35605598b0e3237/borders.zip differ diff --git a/v0.14.0/_downloads/b51636b8f654f8d8a4d779de230f5d16/borders.py b/v0.14.0/_downloads/b51636b8f654f8d8a4d779de230f5d16/borders.py new file mode 100644 index 00000000000..52203f8cc81 --- /dev/null +++ b/v0.14.0/_downloads/b51636b8f654f8d8a4d779de230f5d16/borders.py @@ -0,0 +1,28 @@ +""" +Political boundaries +==================== + +The ``borders`` parameter of :meth:`pygmt.Figure.coast` specifies levels of +political boundaries to plot and the pen used to draw them. Choose from the +list of boundaries below: + +* **1** = National boundaries +* **2** = State boundaries within the Americas +* **3** = Marine boundaries +* **a** = All boundaries (1-3) + +For example, to draw national boundaries with a line thickness of 1 point and +black line color use ``borders="1/1p,black"``. You can draw multiple boundaries +by passing in a list to ``borders``. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Make a Sinusoidal projection map of the Americas with automatic annotations, +# ticks and gridlines +fig.basemap(region=[-150, -30, -60, 60], projection="I-90/15c", frame="afg") +# Plot each level of the boundaries dataset with a different color. +fig.coast(borders=["1/0.5p,black", "2/0.5p,red", "3/0.5p,blue"], land="gray") +fig.show() diff --git a/v0.14.0/_downloads/b53c78e0f6981d1dc895291f3990c268/01_first_figure.ipynb b/v0.14.0/_downloads/b53c78e0f6981d1dc895291f3990c268/01_first_figure.ipynb new file mode 100644 index 00000000000..dea2b190cfc --- /dev/null +++ b/v0.14.0/_downloads/b53c78e0f6981d1dc895291f3990c268/01_first_figure.ipynb @@ -0,0 +1,183 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# 1. Making your first figure\n\nThis tutorial covers the basics of creating a figure using PyGMT - a\nPython wrapper for the Generic Mapping Tools (GMT). It will only use\nthe :meth:`pygmt.Figure.coast` method for plotting. Later tutorials will\naddress other PyGMT methods.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Loading the library\n\nThe first step is to import :mod:`pygmt`. All methods and figure generation\nare accessible from the :mod:`pygmt` top level package.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Creating a figure\n\nAll figure generation in PyGMT is handled by the :class:`pygmt.Figure` class.\nStart a new figure by creating an instance of this class:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To add elements to the figure instance or object (``fig`` in this example)\ndifferent methods can be called on it. This example will use the\n:meth:`pygmt.Figure.coast` method, which can be used to create a map without\nany other methods or external data. The :meth:`pygmt.Figure.coast`\nmethod plots the coastlines, borders, and bodies of water using a database\nthat is included in GMT.\n\nFirst, a region for the figure must be selected. This example will plot some\nof the coast of Maine in the northeastern US. A Python list can be passed to\nthe ``region`` parameter with the minimum and maximum X-values (longitude)\nand the minimum and maximum Y-values (latitude). For this example, the\nminimum (bottom left) coordinates are (N43.75, W69) and the maximum (top\nright) coordinates are (N44.75, W68). Negative values can be passed for\nlatitudes in the southern hemisphere or longitudes in the western hemisphere.\n\nIn addition to the region, an argument needs to be passed to\n:meth:`pygmt.Figure.coast` to tell it what to plot. In this example,\n:meth:`pygmt.Figure.coast` will be told to plot the shorelines by passing the\nBoolean value ``True`` to the ``shorelines`` parameter. The ``shorelines``\nparameter has other options for finer control, but setting it to ``True``\nuses the default values.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig.coast(region=[-69, -68, 43.75, 44.75], shorelines=True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To see the figure, call :meth:`pygmt.Figure.show`.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Color the land and water\n\nThis figure plots all of the coastlines in the given region, but it does not\nindicate where the land and water are. Color values can be passed to ``land``\nand ``water`` to set the colors on the figure.\n\nWhen plotting colors in PyGMT, there are multiple\n:gmt-docs:`color codes `, that can be used. This includes\nstandard GMT color names (like ``\"skyblue\"``), R/G/B levels (like\n``\"0/0/255\"``), a hex value (like ``\"#333333\"``), or a gray level (like\n``\"gray50\"``). For this example, GMT color names are used.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n region=[-69, -68, 43.75, 44.75],\n shorelines=True,\n land=\"lightgreen\",\n water=\"lightblue\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Set the projection\n\nThis figure now has its colors set. By default the projection and size\nof the map is set to ``\"Q15c+du\"``. Here, ``\"Q\"`` defines a\ncylindrical equidistant map projection, ``\"15c+du\"`` means setting\nthe maximum (upper) map dimension to 15 cm. However, both of\nthese values can be customized according to the requirements using\nthe ``projection`` parameter.\n\nThe appropriate projection varies for the type of map. The available\nprojections are explained in the :doc:`projection `\ngallery. For this example, the Mercator projection is set using ``\"M\"``.\nThe width of the figure will be 10 centimeters, as set by ``\"10c\"``.\nThe map size can also be set in inches using \"i\" (e.g. a 5-inch wide\nMercator projection would use ``\"M5i\"``).\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n region=[-69, -68, 43.75, 44.75],\n shorelines=True,\n land=\"lightgreen\",\n water=\"lightblue\",\n projection=\"M10c\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Add a frame\n\nWhile the map's colors, projection, and size have been set, the region\nthat is being displayed is not apparent. A frame can be added to\nannotate the latitude and longitude of the region.\n\nThe ``frame`` parameter is used to add a frame to the figure. For now, it\nwill be set to ``\"a\"`` to **a**\\ nnotate the axes automatically.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n region=[-69, -68, 43.75, 44.75],\n shorelines=True,\n land=\"lightgreen\",\n water=\"lightblue\",\n projection=\"M10c\",\n frame=\"a\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Add a title\n\nThe ``frame`` parameter can be used to add a title to the figure. The title\nis set by passing ``\"+t\"`` followed by the title (e.g. setting the map\ntitle to \"Title\" would be ``\"+tTitle\"``).\n\nTo pass multiple arguments to ``frame``, a list can be used, as shown in the\nexample below. This format uses ``frame`` to set both the axes annotations\nand the figure title.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n region=[-69, -68, 43.75, 44.75],\n shorelines=True,\n land=\"lightgreen\",\n water=\"lightblue\",\n projection=\"M10c\",\n frame=[\"a\", \"+tMaine\"],\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Additional exercises\n\nThis is the end of the first tutorial. Here are some additional exercises\nfor the concepts that were discussed:\n\n1. Make a map of Germany using its ISO country code (\"DE\"). Pass the ISO\n code as a Python string to the ``region`` parameter.\n\n2. Change the color of the landmass to \"khaki\" and the water to \"azure\".\n\n3. Change the color of the lakes (using the ``lakes`` parameter) to \"red\".\n\n4. Create a global map. Set the region to \"d\" to center the map at the Prime\n Meridian or \"g\" to center the map at the International Date Line. When the\n region is set without using a list full of integers or floating numbers,\n the argument needs to be passed as a Python string. Create a map with a\n width of 15 centimeters using the Mollweide (\"W\") projection.\n\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/b6ebfb1a62ea12aa7952fc796c28c0e7/contours.ipynb b/v0.14.0/_downloads/b6ebfb1a62ea12aa7952fc796c28c0e7/contours.ipynb new file mode 100644 index 00000000000..f9870e28b3b --- /dev/null +++ b/v0.14.0/_downloads/b6ebfb1a62ea12aa7952fc796c28c0e7/contours.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Contours\n\nThe :meth:`pygmt.Figure.contour` method can plot contour lines from a table of\npoints by direct triangulation. The data for the triangulation can be provided\nusing one of three methods:\n\n#. ``x``, ``y``, ``z`` 1-D :class:`numpy.ndarray` data columns.\n#. ``data`` 2-D :class:`numpy.ndarray` data matrix with 3 columns corresponding\n to ``x``, ``y``, ``z``.\n#. ``data`` path string to a file containing the ``x``, ``y``, ``z`` in a\n tabular format.\n\nThe parameters ``levels`` and ``annotation`` set the intervals of the contours\nand the annotation on the contours respectively.\n\nIn this example we supply the data as 1-D :class:`numpy.ndarray` with the\n``x``, ``y``, and ``z`` parameters and draw the contours using a 0.5p pen with\ncontours every 10 ``z`` values and annotations every 20 ``z`` values.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# build the contours underlying data with the function z = x^2 + y^2\nX, Y = np.meshgrid(np.linspace(-10, 10, 50), np.linspace(-10, 10, 50))\nZ = X**2 + Y**2\nx, y, z = X.flatten(), Y.flatten(), Z.flatten()\n\n\nfig = pygmt.Figure()\nfig.contour(\n region=[-10, 10, -10, 10],\n projection=\"X10c/10c\",\n frame=\"ag\",\n pen=\"0.5p\",\n # pass the data as 3 1-D data columns\n x=x,\n y=y,\n z=z,\n # set the contours z values intervals to 10\n levels=10,\n # set the contours annotation intervals to 20\n annotation=20,\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/b7a28a22e1ff599930e8c785736f9eaf/text_symbols.py b/v0.14.0/_downloads/b7a28a22e1ff599930e8c785736f9eaf/text_symbols.py new file mode 100644 index 00000000000..98d92fa6627 --- /dev/null +++ b/v0.14.0/_downloads/b7a28a22e1ff599930e8c785736f9eaf/text_symbols.py @@ -0,0 +1,41 @@ +r""" +Text symbols +============ + +The :meth:`pygmt.Figure.plot` method allows to plot text symbols. Text is normally +placed with the :meth:`pygmt.Figure.text` method but there are times we wish to treat a +character or even a string as a plottable symbol. A text symbol can be drawn by passing +**l**\ *size*\ **+t**\ *string* to the ``style`` parameter where *size* defines the size +of the text symbol (note: the size is only approximate; no individual scaling is done +for different characters) and *string* can be a letter or a text string (less than 256 +characters). Optionally, you can append **+f**\ *font,outlinecolor* to select a +particular font [Default is :gmt-term:`FONT_ANNOT_PRIMARY`] and outline color [Default +is black] as well as **+j**\ *justify* to change the justification [Default is CM]. For +all supported fonts see :doc:`/techref/fonts`. The fill color of the text symbols can be +set with the ``fill`` parameter, and the outline width can be customized with the +``pen`` parameter. +""" + +# %% +import pygmt + +fig = pygmt.Figure() + +fig.basemap(region=[0, 8, 0, 3], projection="X12c/4c", frame=True) + +pen = "1.5p" +# plot an uppercase "A" of size 3.5c, color fill is set to "dodgerblue3" +fig.plot(x=1, y=1.5, style="l3.5c+tA", fill="dodgerblue3", pen=pen) +# plot an "asterisk" of size 3.5c, color fill is set to "red3" +fig.plot(x=2.5, y=1, style="l3.5c+t*", fill="red3", pen=pen) +# plot an uppercase "Z" of size 3.5c and use the "Courier-Bold" font, +# color fill is set to "seagreen" +fig.plot(x=4, y=1.5, style="l3.5c+tZ+fCourier-Bold", fill="seagreen", pen=pen) +# plot a lowercase "s" of size 3.5c and use the "Times-Italic" font, +# color fill is set to "gold" +fig.plot(x=5.5, y=1.5, style="l3.5c+ts+fTimes-Italic", fill="gold", pen=pen) +# plot the pi symbol of size 3.5c, the outline color of the symbol is set to +# "darkorange", the color fill is set to "magenta4" +fig.plot(x=7, y=1.5, style="l3.5c+tπ+fdarkorange", fill="magenta4", pen=pen) + +fig.show() diff --git a/v0.14.0/_downloads/b84743d53f4c84986e5286de01cf63c2/wiggle.ipynb b/v0.14.0/_downloads/b84743d53f4c84986e5286de01cf63c2/wiggle.ipynb new file mode 100644 index 00000000000..ebe55105629 --- /dev/null +++ b/v0.14.0/_downloads/b84743d53f4c84986e5286de01cf63c2/wiggle.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Wiggle along tracks\n\nThe :meth:`pygmt.Figure.wiggle` method can plot z = f(x,y) anomalies along\ntracks. ``x``, ``y``, ``z`` can be specified as 1-D arrays or within a\nspecified file. The ``scale`` parameter can be used to set the scale of the\nanomaly in data/distance units. The positive and/or negative areas can be\nfilled with color by setting the ``fillpositive`` and/or ``fillnegative``\nparameters.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Create (x, y, z) triplets\nx = np.arange(-7, 7, 0.1)\ny = np.zeros(x.size)\nz = 50 * np.exp(-((x / 3) ** 2)) * np.cos(2 * np.pi * x)\n\nfig = pygmt.Figure()\nfig.basemap(region=[-8, 12, -1, 1], projection=\"X10c\", frame=[\"Snlr\", \"xa2f1\"])\nfig.wiggle(\n x=x,\n y=y,\n z=z,\n # Set anomaly scale to 20 centimeters\n scale=\"20c\",\n # Fill positive areas red\n fillpositive=\"red\",\n # Fill negative areas gray\n fillnegative=\"gray\",\n # Set the outline width to 1.0 point\n pen=\"1.0p\",\n # Draw a blue track with a width of 0.5 points\n track=\"0.5p,blue\",\n # Plot a vertical scale bar at Middle Right (MR). The bar length (+w)\n # is 100 in data (z) units. Set the z unit label (+l) to \"nT\".\n position=\"jMR+w100+lnT\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/b9223152269a18676262bb3d34d36531/polyconic.py b/v0.14.0/_downloads/b9223152269a18676262bb3d34d36531/polyconic.py new file mode 100644 index 00000000000..4d6b19b76f9 --- /dev/null +++ b/v0.14.0/_downloads/b9223152269a18676262bb3d34d36531/polyconic.py @@ -0,0 +1,39 @@ +r""" +Polyconic projection +==================== + +The polyconic projection, in Europe usually referred to as the American +polyconic projection, was introduced shortly before 1820 by the Swiss-American +cartographer Ferdinand Rodulph Hassler (1770-1843). As head of the Survey of +the Coast, he was looking for a projection that would give the least distortion +for mapping the coast of the United States. The projection acquired its name +from the construction of each parallel, which is achieved by projecting the +parallel onto the cone while it is rolled around the globe, along the central +meridian, tangent to that parallel. As a consequence, the projection involves +many cones rather than a single one used in regular conic projections. + +The polyconic projection is neither equal-area, nor conformal. It is true to +scale without distortion along the central meridian. Each parallel is true to +scale as well, but the meridians are not as they get further away from the +central meridian. As a consequence, no parallel is standard because conformity +is lost with the lengthening of the meridians. + +**poly**/\ [*lon0*/\ [*lat0*/]]\ *scale* or +**Poly**/\ [*lon0*/\ [*lat0*/]]\ *width* + +The projection is set with **poly** or **Poly**. The figure size is set +with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.coast( + region=[-180, -20, 0, 90], + projection="Poly/12c", + frame="afg", + land="seagreen", + water="gray90", +) +fig.show() diff --git a/v0.14.0/_downloads/b9f433660cc269b6adb0319ea97ea2a0/cyl_equidistant.ipynb b/v0.14.0/_downloads/b9f433660cc269b6adb0319ea97ea2a0/cyl_equidistant.ipynb new file mode 100644 index 00000000000..39c18623d40 --- /dev/null +++ b/v0.14.0/_downloads/b9f433660cc269b6adb0319ea97ea2a0/cyl_equidistant.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Cylindrical equidistant projection\n\nThis simple cylindrical projection is really a linear scaling of longitudes and\nlatitudes. The most common form is the Plate Carr\u00e9e projection, where the\nscaling of longitudes and latitudes is the same. All meridians and parallels\nare straight lines.\n\n**q**\\ [*lon0*/\\ [*lat0*/]]\\ *scale* or **Q**\\ [*lon0*/\\ [*lat0*/]]\\ *width*\n\nThe projection is set with **q** or **Q**, and the figure size is set with\n*scale* or *width*. Optionally, the central meridian can be set with *lon0*\n[Default is the middle of the map]. Optionally, the standard parallel can\nbe set with *lat0* [Default is the equator]. When supplied, the central\nmeridian must be supplied as well.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Use region \"d\" to specify global region (-180/180/-90/90)\nfig.coast(\n region=\"d\",\n projection=\"Q12c\",\n frame=\"afg\",\n land=\"gray80\",\n water=\"steelblue\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/ba5cc970efc36ed4c8a309cc94f94a4c/earth_relief.ipynb b/v0.14.0/_downloads/ba5cc970efc36ed4c8a309cc94f94a4c/earth_relief.ipynb new file mode 100644 index 00000000000..2df126c24f2 --- /dev/null +++ b/v0.14.0/_downloads/ba5cc970efc36ed4c8a309cc94f94a4c/earth_relief.ipynb @@ -0,0 +1,176 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Plotting Earth relief\n\nPyGMT provides the :func:`pygmt.datasets.load_earth_relief` function to download the\nEarth relief data from the GMT remote server and load as an :class:`xarray.DataArray`\nobject. The data can then be plotted using the :meth:`pygmt.Figure.grdimage` method.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Load sample Earth relief data for the entire globe at a resolution of 1 arc-degree.\nRefer to :func:`pygmt.datasets.load_earth_relief` for the other available resolutions.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "grid = pygmt.datasets.load_earth_relief(resolution=\"01d\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Create a plot\n\nThe :meth:`pygmt.Figure.grdimage` method takes the ``grid`` input to create a figure.\nIt creates and applies a color palette to the figure based upon the z-values of the\ndata. By default, it plots the map with the *turbo* CPT, an equidistant cylindrical\nprojection, and with no frame.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdimage(grid=grid)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + ":meth:`pygmt.Figure.grdimage` can take the optional parameter ``projection`` for the\nmap. In the example below, ``projection`` is set to ``\"R12c\"`` for a\n12-centimeters-wide figure with a Winkel Tripel projection. For a list of available\nprojections, see :doc:`/techref/projections`.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdimage(grid=grid, projection=\"R12c\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Set a color map\n\n:meth:`pygmt.Figure.grdimage` takes the ``cmap`` parameter to set the CPT of the\nfigure. Examples of common CPTs for Earth relief are shown below. A full list of CPTs\ncan be found at :gmt-docs:`reference/cpts.html`.\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Using the *geo* CPT:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdimage(grid=grid, projection=\"R12c\", cmap=\"geo\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Using the *relief* CPT:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdimage(grid=grid, projection=\"R12c\", cmap=\"relief\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Add a color bar\n\nThe :meth:`pygmt.Figure.colorbar` method displays the CPT and the associated z-values\nof the figure, and by default uses the same CPT set by the ``cmap`` parameter for\n:meth:`pygmt.Figure.grdimage`. The ``frame`` parameter for\n:meth:`pygmt.Figure.colorbar` can be used to set the axis intervals and labels. A list\nis used to pass multiple arguments to ``frame``. In the example below, ``\"a2500\"``\nsets the axis interval to 2,500, ``\"x+lElevation\"`` sets the x-axis label, and\n``\"y+lm\"`` sets the y-axis label.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdimage(grid=grid, projection=\"R12c\", cmap=\"geo\")\nfig.colorbar(frame=[\"a2500\", \"x+lElevation\", \"y+lm\"])\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Create a region map\n\nIn addition to providing global data, the ``region`` parameter of\n:func:`pygmt.datasets.load_earth_relief` can be used to provide data for a specific\narea. The ``region`` parameter is required for resolutions at 5 arc-minutes or higher,\nand accepts a list in the form of [*xmin*, *xmax*, *ymin*, *ymax*].\n\nThe example below uses data with a 10 arc-minutes resolution, and plots it on a\n15-centimeters-wide figure with a Mercator projection and a CPT set to *geo*.\n``frame=\"a\"`` is used to add a frame with annotations to the figure.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "grid = pygmt.datasets.load_earth_relief(resolution=\"10m\", region=[-14, 30, 35, 60])\nfig = pygmt.Figure()\nfig.grdimage(grid=grid, projection=\"M15c\", frame=\"a\", cmap=\"geo\")\nfig.colorbar(frame=[\"a1000\", \"x+lElevation\", \"y+lm\"])\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/baa66d0a5fda1f9f85cd272488777bd1/ternary.zip b/v0.14.0/_downloads/baa66d0a5fda1f9f85cd272488777bd1/ternary.zip new file mode 100644 index 00000000000..88359a4cba3 Binary files /dev/null and b/v0.14.0/_downloads/baa66d0a5fda1f9f85cd272488777bd1/ternary.zip differ diff --git a/v0.14.0/_downloads/bae16a535cb155c1adb5b9ab87bd8c2a/legend.py b/v0.14.0/_downloads/bae16a535cb155c1adb5b9ab87bd8c2a/legend.py new file mode 100644 index 00000000000..76cf852b028 --- /dev/null +++ b/v0.14.0/_downloads/bae16a535cb155c1adb5b9ab87bd8c2a/legend.py @@ -0,0 +1,62 @@ +""" +Legend +====== + +The :meth:`pygmt.Figure.legend` method can automatically create a legend for +symbols plotted using :meth:`pygmt.Figure.plot`. A legend entry is only added +when the ``label`` parameter is used to state the desired text. Optionally, +to adjust the legend, users can append different modifiers. A list of all +available modifiers can be found at :gmt-docs:`gmt.html#l-full`. To create a +multiple-column legend **+N** is used with the desired number of columns. +For more complicated legends, users may want to write an ASCII file with +instructions for the layout of the legend items and pass it to the ``spec`` +parameter of :meth:`pygmt.Figure.legend`. For details on how to set up such a +file, please see the GMT documentation at :gmt-docs:`legend.html#legend-codes`. +""" + +# %% +import numpy as np +import pygmt + +# Set up some test data +x = np.arange(-10, 10.2, 0.2) +y1 = np.sin(x) + 1.1 +y2 = np.cos(x) + 1.1 +y3 = np.sin(x / 2) - 1.1 +y4 = np.cos(x / 2) - 1.1 + +# Create new Figure() object +fig = pygmt.Figure() + +fig.basemap( + projection="X10c/7c", + region=[-10, 10, -3.5, 3.5], + frame=["WSne", "xaf+lx", "ya1f0.5+ly"], +) + +# ----------------------------------------------------------------------------- +# Top: Vertical legend (one column, default) + +# Use the label parameter to state the text label for the legend entry +fig.plot(x=x, y=y1, pen="1p,green3", label="sin(x)+1.1") + +fig.plot(x=x, y=y2, style="c0.07c", fill="dodgerblue", label="cos(x)+1.1") + +# Add a legend to the plot; place it within the plot bounding box with both +# reference ("J") and anchor ("+j") points being the Top Right (TR) corner and an +# offset of 0.2 centimeters in x and y directions; surround the legend with a box +fig.legend(position="JTR+jTR+o0.2c", box=True) + +# ----------------------------------------------------------------------------- +# Bottom: Horizontal legend (here two columns) + +# +N sets the number of columns corresponding to the given number, here 2 +fig.plot(x=x, y=y3, pen="1p,darkred,-", label="sin(x/2)-1.1+N2") + +fig.plot(x=x, y=y4, style="s0.07c", fill="orange", label="cos(x/2)-1.1") + +# For a multi-column legend, users have to provide the width via "+w", here it is +# set to 6 centimeters; reference and anchor points are the Bottom Right (BR) corner +fig.legend(position="JBR+jBR+o0.2c+w6c", box=True) + +fig.show() diff --git a/v0.14.0/_downloads/bbdfab3794c0f8cdc681e1c1b26a0ab2/scatter_and_histograms.py b/v0.14.0/_downloads/bbdfab3794c0f8cdc681e1c1b26a0ab2/scatter_and_histograms.py new file mode 100644 index 00000000000..7f740452cd9 --- /dev/null +++ b/v0.14.0/_downloads/bbdfab3794c0f8cdc681e1c1b26a0ab2/scatter_and_histograms.py @@ -0,0 +1,76 @@ +""" +Scatter plot with histograms +============================ + +To create a scatter plot with histograms at the sides of the plot one can use +:meth:`pygmt.Figure.plot` in combination with :meth:`pygmt.Figure.histogram`. The +positions of the histograms are plotted by offsetting them from the main scatter plot +using :meth:`pygmt.Figure.shift_origin`. +""" + +# %% +import numpy as np +import pygmt + +# Generate random x, y coordinates from a standard normal distribution. +# x values are centered on 0 with a standard deviation of 1, and y values are centered +# on 30 with a standard deviation of 2. +rng = np.random.default_rng() +x = rng.normal(loc=0, scale=1, size=1000) +y = rng.normal(loc=30, scale=2, size=1000) + +# Get axis limits from the data limits. Extend the limits by 0.5 to add some margin. +xmin = np.floor(x.min()) - 0.5 +xmax = np.ceil(x.max()) + 0.5 +ymin = np.floor(y.min()) - 0.5 +ymax = np.ceil(y.max()) + 0.5 + +# Set fill color for symbols and bars. +fill = "seagreen" + +# Set the dimensions of the scatter plot. +width, height = 10, 8 + +fig = pygmt.Figure() +fig.basemap( + region=[xmin, xmax, ymin, ymax], + projection=f"X{width}/{height}", + frame=["WSrt", "af"], +) + +# Plot data points as circles with a diameter of 0.15 centimeters and set transparency +# level for all circles to deal with overplotting. +fig.plot(x=x, y=y, style="c0.15c", fill=fill, transparency=50) + +# Shift the plot origin and add top margin histogram. +fig.shift_origin(yshift=height + 0.25) + +fig.histogram( + projection=f"X{width}/3", + frame=["Wsrt", "xf", "yaf+lCounts"], + # Give the same value for ymin and ymax to have them calculated automatically. + region=[xmin, xmax, 0, 0], + data=x, + fill=fill, + pen="0.1p,white", + histtype=0, + series=0.2, +) + +# Shift the plot origin and add right margin histogram. +fig.shift_origin(yshift=-height - 0.25, xshift=width + 0.25) + +# Plot the horizontal histogram. +fig.histogram( + horizontal=True, + projection=f"X3/{height}", + # Note that the x- and y-axis are flipped, with the y-axis plotted horizontally. + frame=["wSrt", "xf", "yaf+lCounts"], + region=[ymin, ymax, 0, 0], + data=y, + fill=fill, + pen="0.1p,white", + histtype=0, + series=0.2, +) +fig.show() diff --git a/v0.14.0/_downloads/bc4b83bc11e3949f149129331c20e59b/misc_robinson.py b/v0.14.0/_downloads/bc4b83bc11e3949f149129331c20e59b/misc_robinson.py new file mode 100644 index 00000000000..4e7514f7ee4 --- /dev/null +++ b/v0.14.0/_downloads/bc4b83bc11e3949f149129331c20e59b/misc_robinson.py @@ -0,0 +1,34 @@ +r""" +Robinson projection +=================== + +The Robinson projection, presented by the American geographer and cartographer +Arthur H. Robinson in 1963, is a modified cylindrical projection that is +neither conformal nor equal-area. Central meridian and all parallels are +straight lines; other meridians are curved. It uses lookup tables rather than +analytic expressions to make the world map "look" right [#f1]_. +The scale is true along latitudes 38° north and south. The projection was +originally developed for use by Rand McNally and is currently used by the +National Geographic Society. + +**n**\ [*lon0/*]\ *scale* or **N**\ [*lon0/*]\ *width* + +The projection is set with **n** or **N**. The central meridian is set with the +optional *lon0*, and the figure size is set with *scale* or *width*. + +.. rubric:: Footnotes + +.. [#f1] Robinson provided a table of y-coordinates for latitudes every 5°. + To project values for intermediate latitudes one must interpolate + the table. Different interpolants may result in slightly different + maps. GMT uses the interpolant selected by the parameter + :gmt-term:`GMT_INTERPOLANT` in the gmt.conf file. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Use region "d" to specify global region (-180/180/-90/90) +fig.coast(region="d", projection="N12c", frame="afg", land="ivory", water="bisque4") +fig.show() diff --git a/v0.14.0/_downloads/bce1630e9a5205a0fa859d7e1094ed1b/03_figure_element.py b/v0.14.0/_downloads/bce1630e9a5205a0fa859d7e1094ed1b/03_figure_element.py new file mode 100644 index 00000000000..48fb21013e6 --- /dev/null +++ b/v0.14.0/_downloads/bce1630e9a5205a0fa859d7e1094ed1b/03_figure_element.py @@ -0,0 +1,86 @@ +""" +3. Figure elements +================== + +The figure below shows the naming of figure elements in PyGMT. + +- :meth:`pygmt.Figure()`: having a number of plotting methods. Every new + figure must start with the creation of a :meth:`pygmt.Figure()` instance +- ``frame``: setting plot or map boundaries (a combination of the single + letters of **WSNE**, **wsne**, or **lbtr**), adding annotations, ticks, + gridlines (**afg**), axis labels (**+l**), and title (**+t**), e.g., + in :meth:`pygmt.Figure.basemap`. Detailed examples can be found at + :doc:`frame and axes attributes ` +- :meth:`pygmt.Figure.plot`: plotting lines or symbols based on ``pen`` + or ``style`` parameters, respectively +- :meth:`pygmt.Figure.text`: plotting text strings whereby the ``font`` + parameter adjusts fontsize, fontstyle, and color +- :meth:`pygmt.Figure.legend`: showing the naming of lines or symbols while + the ``label`` is given in :meth:`pygmt.Figure.plot` +- :meth:`pygmt.Figure.show`: previewing the content added to the current + figure instance +""" + +# %% +import pygmt + +fig = pygmt.Figure() + +x = range(0, 11, 2) +y_1 = [10, 11, 15, 8, 9, 13] +y_2 = [4, 5, 6, 3, 5, 5] + +fig.basemap( + region=[0, 10, 0, 20], + projection="X10c/8c", + frame=["WStr+tTitle", "xa2f1g2+lxlabel", "ya5f1g5+lylabel"], +) +fig.plot(x=x, y=y_1, style="t0.3c", label="fig.plot (style)") +fig.plot(x=x, y=y_2, pen="1.5p,red", label="fig.plot (pen)") + +mainexplain = {"font": "12p,2,darkblue", "justify": "TC", "no_clip": True} +minorexplain = {"font": "10p,8", "justify": "TC", "no_clip": True} +# ============ Figure +fig.text(x=12, y=22, text="Figure", **mainexplain) +fig.text(x=12, y=20.8, text="pygmt.Figure()", **minorexplain) +# ============ Title +fig.text(x=7.5, y=22, text='frame="+tTitle"', **minorexplain) +# ============ xlabel +fig.text(x=5, y=-3, text='frame="x+lxlabel"', **minorexplain) +# ============ ylabel +fig.text(x=-1.7, y=10, text='frame="y+lylabel"', angle=90, **minorexplain) +# ============ x-majorticks +fig.plot(x=10, y=-0.2, style="c1c", pen="2p,darkblue", no_clip=True) +fig.text(x=10, y=-1.6, text="Annotation", **mainexplain) +fig.text(x=10, y=-2.8, text='frame="xa2"', **minorexplain) +# ============ y-majorticks +fig.plot(x=-0.2, y=20, style="c1c", pen="2p,darkblue", no_clip=True) +fig.text(x=0, y=23.4, text="Annotation", **mainexplain) +fig.text(x=0, y=22.2, text='frame="ya5"', **minorexplain) +# ============ x-minorticks +fig.plot(x=1, y=-0.2, style="c0.7c", pen="2p,darkblue", no_clip=True) +fig.text(x=1, y=-1.4, text="Frame", **mainexplain) +fig.text(x=1, y=-2.6, text='frame="xf1"', **minorexplain) +# ============ y-minorticks +fig.plot(x=0, y=2, style="c0.7c", pen="2p,darkblue", no_clip=True) +fig.text(x=-1.5, y=1, text='frame="yf1"', **minorexplain) +# ============ Grid +fig.plot(x=2, y=15, style="c0.5c", pen="2p,darkblue") +fig.text(x=2, y=17, text="Grid", **mainexplain) +fig.text(x=2.4, y=18, text='frame=["xg2", "yg5"]', **minorexplain) +# ============ Map Boundaries +fig.plot(x=10, y=9, style="c0.5c", pen="2p,darkblue", no_clip=True) +fig.text(x=11.5, y=8, text="Map Boundary", **mainexplain) +fig.text(x=11.5, y=6.8, text='frame="WStr"', **minorexplain) +# ============ fig.plot (style) +fig.plot(x=6, y=8, style="c0.7c", pen="2p,darkblue") +fig.text(x=7, y=6.5, text="fig.plot(style)", **minorexplain) +# ============ fig.plot (pen) +fig.plot(x=4, y=6, style="c0.7c", pen="2p,darkblue") +fig.text(x=3, y=4.5, text="fig.plot(pen)", **minorexplain) +# ============ Legend +fig.legend() +fig.text(x=8, y=16.9, text="Legend", **mainexplain) +fig.text(x=8, y=15.8, text="fig.legend()", **minorexplain) + +fig.show() diff --git a/v0.14.0/_downloads/bd6644e223bbe375ae75272910fdac8e/azim_equidistant.zip b/v0.14.0/_downloads/bd6644e223bbe375ae75272910fdac8e/azim_equidistant.zip new file mode 100644 index 00000000000..6c3f82c714a Binary files /dev/null and b/v0.14.0/_downloads/bd6644e223bbe375ae75272910fdac8e/azim_equidistant.zip differ diff --git a/v0.14.0/_downloads/bedffbc3da9c4faaf43127f3e1456200/grid_equalization.py b/v0.14.0/_downloads/bedffbc3da9c4faaf43127f3e1456200/grid_equalization.py new file mode 100644 index 00000000000..1370ff3ab3e --- /dev/null +++ b/v0.14.0/_downloads/bedffbc3da9c4faaf43127f3e1456200/grid_equalization.py @@ -0,0 +1,245 @@ +""" +Performing grid histogram equalization +====================================== + +The :meth:`pygmt.grdhisteq.equalize_grid` method creates a grid using +statistics based on a cumulative distribution function. +""" + +# %% +import pygmt + +# %% +# Load sample data +# ---------------- +# +# Load the sample Earth relief data for a region around Yosemite Valley +# and use :func:`pygmt.grd2xyz` to create a :class:`pandas.Series` with the +# z-values. + +grid = pygmt.datasets.load_earth_relief( + resolution="03s", region=[-119.825, -119.4, 37.6, 37.825] +) +grid_dist = pygmt.grd2xyz(grid=grid, output_type="pandas")["z"] + + +# %% +# Plot the original digital elevation model and data distribution +# --------------------------------------------------------------- +# +# For comparison, we will create a map of the original digital elevation +# model and a histogram showing the distribution of elevation data values. + +# Create an instance of the Figure class +fig = pygmt.Figure() +# Define figure configuration +pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") +# Define the colormap for the figure +pygmt.makecpt(series=[500, 3540], cmap="turku") +# Setup subplots with two panels +with fig.subplot( + nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Digital Elevation Model" +): + # Plot the original digital elevation model in the first panel + with fig.set_panel(panel=0): + fig.grdimage(grid=grid, projection="M?", frame="WSne", cmap=True) + # Plot a histogram showing the z-value distribution in the original digital + # elevation model + with fig.set_panel(panel=1): + fig.histogram( + data=grid_dist, + projection="X?", + region=[500, 3600, 0, 20], + series=[500, 3600, 100], + frame=["wnSE", "xaf+lElevation (m)", "yaf+lPercent frequency"], + cmap=True, + histtype=1, + pen="1p,black", + ) + fig.colorbar(position="JMR+o1.5c/0c+w3c/0.3c", frame=True) +fig.show() + + +# %% +# Equalize grid based on a linear distribution +# -------------------------------------------- +# +# The :meth:`pygmt.grdhisteq.equalize_grid` method creates a new grid with the +# z-values representing the position of the original z-values in a given +# cumulative distribution. By default, it computes the position in a linear +# distribution. Here, we equalize the grid into nine divisions based on a +# linear distribution and produce a :class:`pandas.Series` with the z-values +# for the new grid. + +divisions = 9 +linear = pygmt.grdhisteq.equalize_grid(grid=grid, divisions=divisions) +linear_dist = pygmt.grd2xyz(grid=linear, output_type="pandas")["z"] + + +# %% +# Calculate the bins used for data transformation +# ----------------------------------------------- +# +# The :meth:`pygmt.grdhisteq.compute_bins` method reports statistics about the +# grid equalization. Here, we report the bins that would linearly divide the +# original data into 9 divisions with equal area. In our new grid produced by +# :meth:`pygmt.grdhisteq.equalize_grid`, all the grid cells with values between +# ``start`` and ``stop`` of ``bin_id=0`` are assigned the value 0, all grid +# cells with values between ``start`` and ``stop`` of ``bin_id=1`` are assigned +# the value 1, and so on. + +pygmt.grdhisteq.compute_bins(grid=grid, divisions=divisions) + + +# %% +# Plot the equally distributed data +# --------------------------------- +# +# Here we create a map showing the grid that has been transformed to +# have a linear distribution with nine divisions and a histogram of the data +# values. + +# Create an instance of the Figure class +fig = pygmt.Figure() +# Define figure configuration +pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") +# Define the colormap for the figure +pygmt.makecpt(series=[0, divisions, 1], cmap="lajolla") +# Setup subplots with two panels +with fig.subplot( + nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Linear distribution" +): + # Plot the grid with a linear distribution in the first panel + with fig.set_panel(panel=0): + fig.grdimage(grid=linear, projection="M?", frame="WSne", cmap=True) + # Plot a histogram showing the linear z-value distribution + with fig.set_panel(panel=1): + fig.histogram( + data=linear_dist, + projection="X?", + region=[-1, divisions, 0, 40], + series=[0, divisions, 1], + frame=["wnSE", "xaf+lRelative elevation", "yaf+lPercent frequency"], + cmap=True, + histtype=1, + pen="1p,black", + center=True, + ) + fig.colorbar(position="JMR+o1.5c/0c+w3c/0.3c", frame=True) +fig.show() + + +# %% +# Transform grid based on a normal distribution +# --------------------------------------------- +# +# The ``gaussian`` parameter of :meth:`pygmt.grdhisteq.equalize_grid` can be +# used to transform the z-values relative to their position in a normal +# distribution rather than a linear distribution. In this case, the output +# data are continuous rather than discrete. + +normal = pygmt.grdhisteq.equalize_grid(grid=grid, gaussian=True) +normal_dist = pygmt.grd2xyz(grid=normal, output_type="pandas")["z"] + + +# %% +# Plot the normally distributed data +# ---------------------------------- +# +# Here we create a map showing the grid that has been transformed to have +# a normal distribution and a histogram of the data values. + +# Create an instance of the Figure class +fig = pygmt.Figure() +# Define figure configuration +pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") +# Define the colormap for the figure +pygmt.makecpt(series=[-4.5, 4.5], cmap="vik") +# Setup subplots with two panels +with fig.subplot( + nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Normal distribution" +): + # Plot the grid with a normal distribution in the first panel + with fig.set_panel(panel=0): + fig.grdimage(grid=normal, projection="M?", frame="WSne", cmap=True) + # Plot a histogram showing the normal z-value distribution + with fig.set_panel(panel=1): + fig.histogram( + data=normal_dist, + projection="X?", + region=[-4.5, 4.5, 0, 20], + series=[-4.5, 4.5, 0.2], + frame=["wnSE", "xaf+lRelative elevation", "yaf+lPercent frequency"], + cmap=True, + histtype=1, + pen="1p,black", + ) + fig.colorbar(position="JMR+o1.5c/0c+w3c/0.3c", frame=True) +fig.show() + + +# %% +# Equalize grid based on a quadratic distribution +# ----------------------------------------------- +# +# The ``quadratic`` parameter of :meth:`pygmt.grdhisteq.equalize_grid` can be +# used to transform the z-values relative to their position in a quadratic +# distribution rather than a linear distribution. Here, we equalize the grid +# into nine divisions based on a quadratic distribution and produce a +# :class:`pandas.Series` with the z-values for the new grid. + +quadratic = pygmt.grdhisteq.equalize_grid( + grid=grid, quadratic=True, divisions=divisions +) +quadratic_dist = pygmt.grd2xyz(grid=quadratic, output_type="pandas")["z"] + + +# %% +# Calculate the bins used for data transformation +# ----------------------------------------------- +# +# We can also use the ``quadratic`` parameter of +# :meth:`pygmt.grdhisteq.compute_bins` to report the bins used for dividing +# the grid into 9 divisions based on their position in a quadratic +# distribution. + +pygmt.grdhisteq.compute_bins(grid=grid, divisions=divisions, quadratic=True) + + +# %% +# Plot the quadratic distribution of data +# --------------------------------------- +# +# Here we create a map showing the grid that has been transformed to have +# a quadratic distribution and a histogram of the data values. + +# Create an instance of the Figure class +fig = pygmt.Figure() +# Define figure configuration +pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") +# Define the colormap for the figure +pygmt.makecpt(series=[0, divisions, 1], cmap="lajolla") +# Setup subplots with two panels +with fig.subplot( + nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Quadratic distribution" +): + # Plot the grid with a quadratic distribution in the first panel + with fig.set_panel(panel=0): + fig.grdimage(grid=quadratic, projection="M?", frame="WSne", cmap=True) + # Plot a histogram showing the quadratic z-value distribution + with fig.set_panel(panel=1): + fig.histogram( + data=quadratic_dist, + projection="X?", + region=[-1, divisions, 0, 40], + series=[0, divisions, 1], + frame=["wnSE", "xaf+lRelative elevation", "yaf+lPercent frequency"], + cmap=True, + histtype=1, + pen="1p,black", + center=True, + ) + fig.colorbar(position="JMR+o1.5c/0c+w3c/0.3c", frame=True) +fig.show() + +# sphinx_gallery_thumbnail_number = 3 diff --git a/v0.14.0/_downloads/c04fefa3c8d4696e942330f80d1940d1/land_and_water.py b/v0.14.0/_downloads/c04fefa3c8d4696e942330f80d1940d1/land_and_water.py new file mode 100644 index 00000000000..c35eef63948 --- /dev/null +++ b/v0.14.0/_downloads/c04fefa3c8d4696e942330f80d1940d1/land_and_water.py @@ -0,0 +1,20 @@ +""" +Color land and water +==================== + +The ``land`` and ``water`` parameters of :meth:`pygmt.Figure.coast` specify +a color to fill in the land and water masses, respectively. There are many +:gmt-docs:`color codes in GMT `, including standard GMT color +names (like ``"skyblue"``), R/G/B levels (like ``"0/0/255"``), a hex value +(like ``"#333333"``), and a gray level (like ``"gray50"``). +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Make a global Mollweide map with automatic ticks +fig.basemap(region="g", projection="W15c", frame=True) +# Plot the land as light gray, and the water as sky blue +fig.coast(land="#666666", water="skyblue") +fig.show() diff --git a/v0.14.0/_downloads/c0acb66ec2bf0a446e1cf03e8cdcc076/scatter_and_histograms.ipynb b/v0.14.0/_downloads/c0acb66ec2bf0a446e1cf03e8cdcc076/scatter_and_histograms.ipynb new file mode 100644 index 00000000000..0b14921c2eb --- /dev/null +++ b/v0.14.0/_downloads/c0acb66ec2bf0a446e1cf03e8cdcc076/scatter_and_histograms.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Scatter plot with histograms\n\nTo create a scatter plot with histograms at the sides of the plot one can use\n:meth:`pygmt.Figure.plot` in combination with :meth:`pygmt.Figure.histogram`. The\npositions of the histograms are plotted by offsetting them from the main scatter plot\nusing :meth:`pygmt.Figure.shift_origin`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Generate random x, y coordinates from a standard normal distribution.\n# x values are centered on 0 with a standard deviation of 1, and y values are centered\n# on 30 with a standard deviation of 2.\nrng = np.random.default_rng()\nx = rng.normal(loc=0, scale=1, size=1000)\ny = rng.normal(loc=30, scale=2, size=1000)\n\n# Get axis limits from the data limits. Extend the limits by 0.5 to add some margin.\nxmin = np.floor(x.min()) - 0.5\nxmax = np.ceil(x.max()) + 0.5\nymin = np.floor(y.min()) - 0.5\nymax = np.ceil(y.max()) + 0.5\n\n# Set fill color for symbols and bars.\nfill = \"seagreen\"\n\n# Set the dimensions of the scatter plot.\nwidth, height = 10, 8\n\nfig = pygmt.Figure()\nfig.basemap(\n region=[xmin, xmax, ymin, ymax],\n projection=f\"X{width}/{height}\",\n frame=[\"WSrt\", \"af\"],\n)\n\n# Plot data points as circles with a diameter of 0.15 centimeters and set transparency\n# level for all circles to deal with overplotting.\nfig.plot(x=x, y=y, style=\"c0.15c\", fill=fill, transparency=50)\n\n# Shift the plot origin and add top margin histogram.\nfig.shift_origin(yshift=height + 0.25)\n\nfig.histogram(\n projection=f\"X{width}/3\",\n frame=[\"Wsrt\", \"xf\", \"yaf+lCounts\"],\n # Give the same value for ymin and ymax to have them calculated automatically.\n region=[xmin, xmax, 0, 0],\n data=x,\n fill=fill,\n pen=\"0.1p,white\",\n histtype=0,\n series=0.2,\n)\n\n# Shift the plot origin and add right margin histogram.\nfig.shift_origin(yshift=-height - 0.25, xshift=width + 0.25)\n\n# Plot the horizontal histogram.\nfig.histogram(\n horizontal=True,\n projection=f\"X3/{height}\",\n # Note that the x- and y-axis are flipped, with the y-axis plotted horizontally.\n frame=[\"wSrt\", \"xf\", \"yaf+lCounts\"],\n region=[ymin, ymax, 0, 0],\n data=y,\n fill=fill,\n pen=\"0.1p,white\",\n histtype=0,\n series=0.2,\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/c179f34f57f1fa1f1f93a5e81c245870/conic_lambert.ipynb b/v0.14.0/_downloads/c179f34f57f1fa1f1f93a5e81c245870/conic_lambert.ipynb new file mode 100644 index 00000000000..4012912cdb9 --- /dev/null +++ b/v0.14.0/_downloads/c179f34f57f1fa1f1f93a5e81c245870/conic_lambert.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Lambert conic conformal projection\n\nThis conic projection was designed by the Alsatian mathematician Johann\nHeinrich Lambert (1772) and has been used extensively for mapping of regions\nwith predominantly east-west orientation, just like the Albers projection.\nUnlike the Albers projection, Lambert's conformal projection is not equal-area.\nThe parallels are arcs of circles with a common origin, and meridians are the\nequally spaced radii of these circles. As with Albers projection, it is only\nthe two standard parallels that are distortion-free.\n\n**l**\\ *lon0/lat0*\\ /\\ *lat1/lat2*\\ */scale*\nor **L**\\ *lon0/lat0*\\ /\\ *lat1/lat2*\\ */width*\n\nThe projection is set with **l** or **L**. The projection center is set by\n*lon0/lat0* and two standard parallels for the map are set with *lat1/lat2*.\nThe figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n region=[-130, -70, 24, 52],\n projection=\"L-100/35/33/45/12c\",\n frame=\"afg\",\n land=\"seagreen\",\n water=\"gray90\",\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/c196a7ecca2cae2e966ba2dd4a21c656/inset_rectangle_region.py b/v0.14.0/_downloads/c196a7ecca2cae2e966ba2dd4a21c656/inset_rectangle_region.py new file mode 100644 index 00000000000..e646182e6b4 --- /dev/null +++ b/v0.14.0/_downloads/c196a7ecca2cae2e966ba2dd4a21c656/inset_rectangle_region.py @@ -0,0 +1,54 @@ +""" +Inset map showing a rectangular region +====================================== + +The :meth:`pygmt.Figure.inset` method adds an inset figure inside a larger +figure. The method is called using a ``with`` statement, and its +``position``, ``box``, ``offset``, and ``margin`` can be customized. Plotting +methods called within the ``with`` statement plot into the inset figure. +""" + +# %% +import pygmt + +# Set the region of the main figure +region = [137.5, 141, 34, 37] + +fig = pygmt.Figure() + +# Plot the base map of the main figure. Universal Transverse Mercator (UTM) +# projection is used and the UTM zone is set to be "54S". +fig.basemap(region=region, projection="U54S/12c", frame=["WSne", "af"]) + +# Set the land color to "lightbrown", the water color to "azure1", the +# shoreline width to "2p", and the area threshold to 1000 km^2 for the main +# figure +fig.coast(land="lightbrown", water="azure1", shorelines="2p", area_thresh=1000) + +# Create an inset map, placing it in the Bottom Right (BR) corner with x- and +# y-offsets of 0.1 cm, respectively. +# The inset map contains the Japan main land. "U54S/3c" means UTM projection +# with a map width of 3 cm. The inset width and height are automatically +# calculated from the specified ``region`` and ``projection`` parameters. +# Draws a rectangular box around the inset with a fill color of "white" and +# a pen of "1p". +with fig.inset( + position="jBR+o0.1c", + box="+gwhite+p1p", + region=[129, 146, 30, 46], + projection="U54S/3c", +): + # Highlight the Japan area in "lightbrown" + # and draw its outline with a pen of "0.2p". + fig.coast( + dcw="JP+glightbrown+p0.2p", + area_thresh=10000, + ) + # Plot a rectangle ("r") in the inset map to show the area of the main + # figure. "+s" means that the first two columns are the longitude and + # latitude of the bottom left corner of the rectangle, and the last two + # columns the longitude and latitude of the upper right corner. + rectangle = [[region[0], region[2], region[1], region[3]]] + fig.plot(data=rectangle, style="r+s", pen="2p,blue") + +fig.show() diff --git a/v0.14.0/_downloads/c376f0dd36989c6daa1537e6ec26ba82/02_contour_map.ipynb b/v0.14.0/_downloads/c376f0dd36989c6daa1537e6ec26ba82/02_contour_map.ipynb new file mode 100644 index 00000000000..c114ef11874 --- /dev/null +++ b/v0.14.0/_downloads/c376f0dd36989c6daa1537e6ec26ba82/02_contour_map.ipynb @@ -0,0 +1,140 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# 2. Create a contour map\n\nThis tutorial page covers the basics of creating a figure of the Earth relief, using a\nremote dataset hosted by GMT, using the method :meth:`pygmt.datasets.load_earth_relief`.\nIt will use the :meth:`pygmt.Figure.grdimage`, :meth:`pygmt.Figure.grdcontour`,\n:meth:`pygmt.Figure.colorbar`, and :meth:`pygmt.Figure.coast` methods for plotting.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Loading the Earth relief dataset\n\nThe first step is to use :meth:`pygmt.datasets.load_earth_relief`. The ``resolution``\nparameter sets the resolution of the remote grid file, which will affect the\nresolution of the plot made later in the tutorial. The ``registration`` parameter\ndetermines the grid registration.\n\nThis grid region covers the islands of Guam and Rota in the western Pacific Ocean.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "grid = pygmt.datasets.load_earth_relief(\n resolution=\"30s\", region=[144.5, 145.5, 13, 14.5], registration=\"gridline\"\n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plotting Earth relief\n\nTo plot Earth relief data, the method :meth:`pygmt.Figure.grdimage` can be used to\nplot a color-coded figure to display the topography and bathymetry in the grid file.\nThe ``grid`` parameter accepts the input grid, which in this case is the remote file\ndownloaded in the previous step. If the ``region`` parameter is not set, the region\nboundaries of the input grid are used.\n\nThe ``cmap`` parameter sets the color palette table (CPT) used for portraying the\nEarth relief. The :meth:`pygmt.Figure.grdimage` method uses the input grid to relate\nthe Earth relief values to a specific color within the CPT. In this case, the CPT\n\"oleron\" is used; a full list of CPTs can be found at :gmt-docs:`reference/cpts.html`.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdimage(grid=grid, frame=\"a\", projection=\"M10c\", cmap=\"oleron\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Adding a colorbar\n\nTo show how the plotted colors relate to the Earth relief, a colorbar can be added\nusing the :meth:`pygmt.Figure.colorbar` method.\n\nTo control the annotation and labels on the colorbar, a list is passed to the\n``frame`` parameter. The value beginning with ``\"a\"`` sets the interval for the\nannotation on the colorbar, in this case every 1,000 meters. To set the label for an\naxis on the colorbar, the argument begins with either ``\"x+l\"`` (x-axis) or ``\"y+l\"``\n(y-axis), followed by the intended label.\n\nBy default, the CPT for the colorbar is the same as the one set in\n:meth:`pygmt.Figure.grdimage`.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdimage(grid=grid, frame=\"a\", projection=\"M10c\", cmap=\"oleron\")\nfig.colorbar(frame=[\"a1000\", \"x+lElevation\", \"y+lm\"])\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Adding contour lines\n\nTo add contour lines to the color-coded figure, the :meth:`pygmt.Figure.grdcontour`\nmethod is used. The ``frame`` and ``projection`` are already set using\n:meth:`pygmt.Figure.grdimage` and are not needed again. However, the same input for\n``grid`` (in this case, the variable named \"grid\") must be input again. The ``levels``\nparameter sets the spacing between adjacent contour lines (in this case, 500 meters).\nThe ``annotation`` parameter annotates the contour lines corresponding to the given\ninterval (in this case, 1,000 meters) with the related values, here elevation or\nbathymetry. By default, these contour lines are drawn thicker. Optionally, the\nappearance (thickness, color, style) of the annotated and the not-annotated contour\nlines can be adjusted (separately) by specifying the desired ``pen``.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdimage(grid=grid, frame=\"a\", projection=\"M10c\", cmap=\"oleron\")\nfig.grdcontour(grid=grid, levels=500, annotation=1000)\nfig.colorbar(frame=[\"a1000\", \"x+lElevation\", \"y+lm\"])\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Color in land\n\nTo make it clear where the islands are located, the :meth:`pygmt.Figure.coast` method\ncan be used to color in the landmasses. The ``land`` is colored in as \"lightgray\", and\nthe ``shorelines`` parameter draws a border around the islands.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdimage(grid=grid, frame=\"a\", projection=\"M10c\", cmap=\"oleron\")\nfig.grdcontour(grid=grid, levels=500, annotation=1000)\nfig.coast(shorelines=\"2p\", land=\"lightgray\")\nfig.colorbar(frame=[\"a1000\", \"x+lElevation\", \"y+lm\"])\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Additional exercises\n\nThis is the end of the second tutorial. Here are some additional exercises for the\nconcepts that were discussed:\n\n1. Change the resolution of the grid file to either ``\"01m\"`` (1 arc-minute, a lower\n resolution) or ``\"15s\"`` (15 arc-seconds, a higher resolution). Note that higher\n resolution grids will have larger file sizes. Available resolutions can be found\n at :meth:`pygmt.datasets.load_earth_relief`.\n\n2. Create a contour map of the area around Mt. Rainier. A suggestion for the\n ``region`` would be ``[-122, -121, 46.5, 47.5]``. Adjust the\n :meth:`pygmt.Figure.grdcontour` and :meth:`pygmt.Figure.colorbar` settings as\n needed to make the figure look good.\n\n3. Create a contour map of S\u00e3o Miguel Island in the Azores; a suggested ``region`` is\n ``[-26, -25, 37.5, 38]``. Instead of coloring in ``land``, set ``water`` to\n \"lightblue\" to only display Earth relief information for the land.\n\n4. Try other CPTs, such as \"SCM/fes\" or \"geo\".\n\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/c39d142abb6724ce7ace0b15c061b0b7/scatter3d.zip b/v0.14.0/_downloads/c39d142abb6724ce7ace0b15c061b0b7/scatter3d.zip new file mode 100644 index 00000000000..cf34e0102d3 Binary files /dev/null and b/v0.14.0/_downloads/c39d142abb6724ce7ace0b15c061b0b7/scatter3d.zip differ diff --git a/v0.14.0/_downloads/c472a4c12dbe1e9af13f8910604fb940/connection_lines.py b/v0.14.0/_downloads/c472a4c12dbe1e9af13f8910604fb940/connection_lines.py new file mode 100644 index 00000000000..41c2a761863 --- /dev/null +++ b/v0.14.0/_downloads/c472a4c12dbe1e9af13f8910604fb940/connection_lines.py @@ -0,0 +1,55 @@ +""" +Connection lines +================ + +The ``connection`` parameter of the :meth:`pygmt.Figure.plot` method allows to plot +connection lines between a set of data points. Width, color, and style of the lines +can be adjusted via the ``pen`` parameter. The data points must be plotted separately +using the ``style`` parameter, with adjustments for the symbol fill and outline via +the ``fill`` and ``pen`` parameters, respectively. +""" + +# %% +import pygmt + +# Set up same sample data +x = [2.2, 3.3, -3.1, -3.7, -0.1] +y = [1.8, -1.2, -0.9, -4.5, 4.5] + +# Create new Figure instance +fig = pygmt.Figure() + +# ----------------------------------------------------------------------------- +# Left: record order +fig.basemap(region=[-5, 5, -5, 5], projection="X6c", frame=["WSne", "af"]) + +# Connect data points based on the record order [Default connection=None] +fig.plot(x=x, y=y, pen="1.5p,dodgerblue") +# Plot data points +fig.plot(x=x, y=y, style="c0.2c", fill="green3", pen="1.5p") + +fig.shift_origin(xshift="w+0.5c") + +# ----------------------------------------------------------------------------- +# Middle: network +fig.basemap(region=[-5, 5, -5, 5], projection="X6c", frame=["wSne", "af"]) + +# Connect data points as network +fig.plot(x=x, y=y, pen="1.5p,dodgerblue", connection="n") +# Plot data points +fig.plot(x=x, y=y, style="c0.2c", fill="green3", pen="1.5p") + +fig.shift_origin(xshift="w+0.5c") + +# ----------------------------------------------------------------------------- +# Right: reference point +fig.basemap(region=[-5, 5, -5, 5], projection="X6c", frame=["wSne", "af"]) + +# Connect data points with the reference point (0,0) +fig.plot(x=x, y=y, pen="1.5p,dodgerblue", connection="p0/0") +# Plot data points +fig.plot(x=x, y=y, style="c0.2c", fill="green3", pen="1.5p") +# Plot reference point +fig.plot(x=0, y=0, style="s0.3c", fill="gold", pen="1.5p") + +fig.show() diff --git a/v0.14.0/_downloads/c4f213ff804cf51e08ad1e8ae0d7ec4c/cyl_equal_area.py b/v0.14.0/_downloads/c4f213ff804cf51e08ad1e8ae0d7ec4c/cyl_equal_area.py new file mode 100644 index 00000000000..ee0efd6b012 --- /dev/null +++ b/v0.14.0/_downloads/c4f213ff804cf51e08ad1e8ae0d7ec4c/cyl_equal_area.py @@ -0,0 +1,27 @@ +r""" +Cylindrical equal-area projection +================================= + +This cylindrical projection is actually several projections, depending on what +latitude is selected as the standard parallel. However, they are all equal area +and hence non-conformal. All meridians and parallels are straight lines. + +**y**\ *lon0/lat0*\ */scale* or **Y**\ *lon0/lat0*\ */width* + +The projection is set with **y** or **Y**. The projection center is set by +*lon0/lat0*, and the figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Use region "d" to specify global region (-180/180/-90/90) +fig.coast( + region="d", + projection="Y35/30/12c", + frame="afg", + land="gray80", + water="steelblue", +) +fig.show() diff --git a/v0.14.0/_downloads/c4f5933c23f8a9e5dbb370ffb916a644/azim_general_stereographic.py b/v0.14.0/_downloads/c4f5933c23f8a9e5dbb370ffb916a644/azim_general_stereographic.py new file mode 100644 index 00000000000..5c001429289 --- /dev/null +++ b/v0.14.0/_downloads/c4f5933c23f8a9e5dbb370ffb916a644/azim_general_stereographic.py @@ -0,0 +1,32 @@ +r""" +General stereographic projection +================================ + +This map projection is a conformal, azimuthal projection. It is mainly used +with a projection center in one of the poles. Then meridians appear as straight +lines and cross latitudes at a right angle. Unlike the azimuthal equidistant +projection, the distances in this projection are not displayed in correct +proportions. It is often used as a hemisphere map like the Lambert Azimuthal +Equal Area projection. + +**s**\ *lon0/lat0*\ [*/horizon*]\ */scale* +or **S**\ *lon0/lat0*\ [*/horizon*\]\ */width* + +The projection type is set with **s** or **S**. *lon0/lat0* specifies the +projection center, the optional *horizon* parameter specifies the maximum +distance from projection center (in degrees, < 180, default 90), and the +*scale* or *width* sets the size of the figure. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.coast( + region=[4, 14, 52, 57], + projection="S0/90/12c", + frame="afg", + land="khaki", + water="white", +) +fig.show() diff --git a/v0.14.0/_downloads/c5047820f3922d81d50b5f4699dc6814/basic_symbols.zip b/v0.14.0/_downloads/c5047820f3922d81d50b5f4699dc6814/basic_symbols.zip new file mode 100644 index 00000000000..b383b8af864 Binary files /dev/null and b/v0.14.0/_downloads/c5047820f3922d81d50b5f4699dc6814/basic_symbols.zip differ diff --git a/v0.14.0/_downloads/c532e75e8edabe1b91fdc81616ca48a9/colorbar.zip b/v0.14.0/_downloads/c532e75e8edabe1b91fdc81616ca48a9/colorbar.zip new file mode 100644 index 00000000000..6a187a35c74 Binary files /dev/null and b/v0.14.0/_downloads/c532e75e8edabe1b91fdc81616ca48a9/colorbar.zip differ diff --git a/v0.14.0/_downloads/c63a43df548318f91e219a29369b743d/quoted_lines.py b/v0.14.0/_downloads/c63a43df548318f91e219a29369b743d/quoted_lines.py new file mode 100644 index 00000000000..9e70ec15c4a --- /dev/null +++ b/v0.14.0/_downloads/c63a43df548318f91e219a29369b743d/quoted_lines.py @@ -0,0 +1,97 @@ +""" +Quoted lines +============ + +To plot a so-called *quoted line*, i.e., labels along a line +or curve, use the ``style`` parameter of the +:meth:`pygmt.Figure.plot` method with the argument ``"q"`` and the +desired modifiers. A colon (``":"``) is used to separate the +algorithm settings from the label information. +This example shows how to adjust the labels. +For modifying the main quoted line via the ``pen`` parameter, +see the :doc:`Line styles example `. +For details on the input data see the upstream GMT documentation +at :gmt-docs:`plot.html#s`. +""" + +# %% +import numpy as np +import pygmt + +# Generate a two-point line for plotting +x = np.array([1, 4]) +y = np.array([20, 20]) + +fig = pygmt.Figure() +fig.basemap(region=[0, 10, 0, 20], projection="X15c/15c", frame="+tQuoted Lines") + +# Plot different quoted lines +for quotedline in [ + # Line with labels ("+l") "text" in distance ("d") of 1 centimeter + "qd1c:+ltext", + # Suppress the main quoted line by appending "+i" + "qd1c:+ltext+i", + # Give the number of equally spaced labels by using "n" instead of "d" + "qn5:+ltext", + # Use upper-case "N" to have labels at the start and end of the line + "qN5:+ltext", + # To only plot a label at the start of the line use "N-1" + "qN-1:+ltext", + # To only plot a label at the end of the line use "N+1" + "qN+1:+ltext", + # Adjust the justification of the labels via "+j", here Top Center + "qd1c:+ltext+jTC", + # Shift labels using "+n" in x and y directions relative to the main + # quoted line + "qd1c:+ltext+n-0.5c/0.1c", + # Rotate labels via "+a" (counter-clockwise from horizontal) + "qd1c:+ltext+a20", + # Adjust size, type, and color of the font via "+f" + "qd1c:+ltext+f12p,Times-Bold,red", + # Add a box around the label via "+p" + "qd1c:+ltext+p", + # Adjust thickness, color, and style of the outline + "qd1c:+ltext+p0.5p,blue,dashed", + # Append "+o" to get a box with rounded edges + "qd1c:+ltext+p0.5p,blue+o", + # Adjust the space between label and box in x and y directions via "+c" + "qd1c:+ltext+p0.5p,blue+o+c0.1c/0.1c", + # Give a fill of the box via "+g" together with the desired color + "qd1c:+ltext+gdodgerblue", +]: + y -= 1 # Move current line down + fig.plot(x=x, y=y, pen="1.25p", style=quotedline) + fig.text( + x=x[-1], + y=y[-1], + text=quotedline, + font="Courier-Bold", + justify="ML", + offset="0.75c/0c", + ) + +fig.show() + +# %% +# For curved labels following the line, append ``"+v"`` to the argument passed +# to the ``style`` parameter. + +# Generate sine curve +x = np.arange(0, 10 * np.pi, 0.1) +y = np.sin(0.8 * x) + +fig = pygmt.Figure() + +fig.basemap(region=[0, 30, -4, 4], projection="X10c/5c", frame=True) + +fig.plot(x=x, y=y + 2, style="qd1.2c:+lstraight text+f5p", pen="1p,blue") + +fig.plot( + x=x, + y=y - 2, + # Append "+v" to force curved labels + style="qd1.2c:+lcurved text+f5p+v", + pen="1p,blue", +) + +fig.show() diff --git a/v0.14.0/_downloads/c6d45e0258df2f4834325bd1714c6217/rose.ipynb b/v0.14.0/_downloads/c6d45e0258df2f4834325bd1714c6217/rose.ipynb new file mode 100644 index 00000000000..3cadd2f6c87 --- /dev/null +++ b/v0.14.0/_downloads/c6d45e0258df2f4834325bd1714c6217/rose.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Rose diagram\n\nThe :meth:`pygmt.Figure.rose` method can plot windrose diagrams or polar\nhistograms.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\n# Load sample compilation of fracture lengths and azimuth as\n# hypothetically digitized from geological maps\ndata = pygmt.datasets.load_sample_data(name=\"fractures\")\n\nfig = pygmt.Figure()\n\nfig.rose(\n # use columns of the sample dataset as input for the length and azimuth\n # parameters\n length=data.length,\n azimuth=data.azimuth,\n # specify the \"region\" of interest in the (r,azimuth) space\n # [r0, r1, az0, az1], here, r0 is 0 and r1 is 1, for azimuth, az0 is 0 and\n # az1 is 360 which means we plot a full circle between 0 and 360 degrees\n region=[0, 1, 0, 360],\n # set the diameter of the rose diagram to 7.5 cm\n diameter=\"7.5c\",\n # define the sector width in degrees, we append +r here to draw a rose\n # diagram instead of a sector diagram\n sector=\"10+r\",\n # normalize bin counts by the largest value so all bin counts range from\n # 0 to 1\n norm=True,\n # use red3 as color fill for the sectors\n fill=\"red3\",\n # define the frame with ticks and gridlines every 0.2\n # length unit in radial direction and every 30 degrees\n # in azimuthal direction, set background color to\n # lightgray\n frame=[\"x0.2g0.2\", \"y30g30\", \"+glightgray\"],\n # use a pen size of 1p to draw the outlines\n pen=\"1p\",\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/c708765bed917ba5ea5ba822b5c7032e/connection_lines.ipynb b/v0.14.0/_downloads/c708765bed917ba5ea5ba822b5c7032e/connection_lines.ipynb new file mode 100644 index 00000000000..d28347e6f52 --- /dev/null +++ b/v0.14.0/_downloads/c708765bed917ba5ea5ba822b5c7032e/connection_lines.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Connection lines\n\nThe ``connection`` parameter of the :meth:`pygmt.Figure.plot` method allows to plot\nconnection lines between a set of data points. Width, color, and style of the lines\ncan be adjusted via the ``pen`` parameter. The data points must be plotted separately\nusing the ``style`` parameter, with adjustments for the symbol fill and outline via\nthe ``fill`` and ``pen`` parameters, respectively.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\n# Set up same sample data\nx = [2.2, 3.3, -3.1, -3.7, -0.1]\ny = [1.8, -1.2, -0.9, -4.5, 4.5]\n\n# Create new Figure instance\nfig = pygmt.Figure()\n\n# -----------------------------------------------------------------------------\n# Left: record order\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X6c\", frame=[\"WSne\", \"af\"])\n\n# Connect data points based on the record order [Default connection=None]\nfig.plot(x=x, y=y, pen=\"1.5p,dodgerblue\")\n# Plot data points\nfig.plot(x=x, y=y, style=\"c0.2c\", fill=\"green3\", pen=\"1.5p\")\n\nfig.shift_origin(xshift=\"w+0.5c\")\n\n# -----------------------------------------------------------------------------\n# Middle: network\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X6c\", frame=[\"wSne\", \"af\"])\n\n# Connect data points as network\nfig.plot(x=x, y=y, pen=\"1.5p,dodgerblue\", connection=\"n\")\n# Plot data points\nfig.plot(x=x, y=y, style=\"c0.2c\", fill=\"green3\", pen=\"1.5p\")\n\nfig.shift_origin(xshift=\"w+0.5c\")\n\n# -----------------------------------------------------------------------------\n# Right: reference point\nfig.basemap(region=[-5, 5, -5, 5], projection=\"X6c\", frame=[\"wSne\", \"af\"])\n\n# Connect data points with the reference point (0,0)\nfig.plot(x=x, y=y, pen=\"1.5p,dodgerblue\", connection=\"p0/0\")\n# Plot data points\nfig.plot(x=x, y=y, style=\"c0.2c\", fill=\"green3\", pen=\"1.5p\")\n# Plot reference point\nfig.plot(x=0, y=0, style=\"s0.3c\", fill=\"gold\", pen=\"1.5p\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/c797eaeff023e168f1e4e6c10b25f3f7/legend.ipynb b/v0.14.0/_downloads/c797eaeff023e168f1e4e6c10b25f3f7/legend.ipynb new file mode 100644 index 00000000000..fad88d14f6d --- /dev/null +++ b/v0.14.0/_downloads/c797eaeff023e168f1e4e6c10b25f3f7/legend.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Legend\n\nThe :meth:`pygmt.Figure.legend` method can automatically create a legend for\nsymbols plotted using :meth:`pygmt.Figure.plot`. A legend entry is only added\nwhen the ``label`` parameter is used to state the desired text. Optionally,\nto adjust the legend, users can append different modifiers. A list of all\navailable modifiers can be found at :gmt-docs:`gmt.html#l-full`. To create a\nmultiple-column legend **+N** is used with the desired number of columns.\nFor more complicated legends, users may want to write an ASCII file with\ninstructions for the layout of the legend items and pass it to the ``spec``\nparameter of :meth:`pygmt.Figure.legend`. For details on how to set up such a\nfile, please see the GMT documentation at :gmt-docs:`legend.html#legend-codes`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Set up some test data\nx = np.arange(-10, 10.2, 0.2)\ny1 = np.sin(x) + 1.1\ny2 = np.cos(x) + 1.1\ny3 = np.sin(x / 2) - 1.1\ny4 = np.cos(x / 2) - 1.1\n\n# Create new Figure() object\nfig = pygmt.Figure()\n\nfig.basemap(\n projection=\"X10c/7c\",\n region=[-10, 10, -3.5, 3.5],\n frame=[\"WSne\", \"xaf+lx\", \"ya1f0.5+ly\"],\n)\n\n# -----------------------------------------------------------------------------\n# Top: Vertical legend (one column, default)\n\n# Use the label parameter to state the text label for the legend entry\nfig.plot(x=x, y=y1, pen=\"1p,green3\", label=\"sin(x)+1.1\")\n\nfig.plot(x=x, y=y2, style=\"c0.07c\", fill=\"dodgerblue\", label=\"cos(x)+1.1\")\n\n# Add a legend to the plot; place it within the plot bounding box with both\n# reference (\"J\") and anchor (\"+j\") points being the Top Right (TR) corner and an\n# offset of 0.2 centimeters in x and y directions; surround the legend with a box\nfig.legend(position=\"JTR+jTR+o0.2c\", box=True)\n\n# -----------------------------------------------------------------------------\n# Bottom: Horizontal legend (here two columns)\n\n# +N sets the number of columns corresponding to the given number, here 2\nfig.plot(x=x, y=y3, pen=\"1p,darkred,-\", label=\"sin(x/2)-1.1+N2\")\n\nfig.plot(x=x, y=y4, style=\"s0.07c\", fill=\"orange\", label=\"cos(x/2)-1.1\")\n\n# For a multi-column legend, users have to provide the width via \"+w\", here it is\n# set to 6 centimeters; reference and anchor points are the Bottom Right (BR) corner\nfig.legend(position=\"JBR+jBR+o0.2c+w6c\", box=True)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/c7d704cd235621e1f1541486cc4a928c/vectors.zip b/v0.14.0/_downloads/c7d704cd235621e1f1541486cc4a928c/vectors.zip new file mode 100644 index 00000000000..1f16c3e2071 Binary files /dev/null and b/v0.14.0/_downloads/c7d704cd235621e1f1541486cc4a928c/vectors.zip differ diff --git a/v0.14.0/_downloads/c8536cd92e4f123b2f357a512b5281c7/azim_general_perspective.zip b/v0.14.0/_downloads/c8536cd92e4f123b2f357a512b5281c7/azim_general_perspective.zip new file mode 100644 index 00000000000..c17b49065bb Binary files /dev/null and b/v0.14.0/_downloads/c8536cd92e4f123b2f357a512b5281c7/azim_general_perspective.zip differ diff --git a/v0.14.0/_downloads/c95cd5d833cb26eeb78680acc9de26ec/grdclip.zip b/v0.14.0/_downloads/c95cd5d833cb26eeb78680acc9de26ec/grdclip.zip new file mode 100644 index 00000000000..99e171cbe11 Binary files /dev/null and b/v0.14.0/_downloads/c95cd5d833cb26eeb78680acc9de26ec/grdclip.zip differ diff --git a/v0.14.0/_downloads/c98d6f7d0201915545bd219e27456ffa/great_circles.ipynb b/v0.14.0/_downloads/c98d6f7d0201915545bd219e27456ffa/great_circles.ipynb new file mode 100644 index 00000000000..705868a7608 --- /dev/null +++ b/v0.14.0/_downloads/c98d6f7d0201915545bd219e27456ffa/great_circles.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Generate points along great circles\n\nThe :func:`pygmt.project` function can generate points along a great circle\nwhose center and end points can be defined via the ``center`` and ``endpoint``\nparameters, respectively. Using the ``generate`` parameter allows to generate\n(*r*, *s*, *p*) points every *dist* units of *p* along a profile as\noutput. By default, all units (*r*, *s* and *p*) are set to degrees while\n``unit=True`` allows to set the unit for *p* to km.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n\n# generate points every 10 degrees along a great circle from 10N,50W to 30N,5W\npoints1 = pygmt.project(center=[-50, 10], endpoint=[-5, 30], generate=10)\n# generate points every 750 km along a great circle from 10N,50W to 57.5N,90W\npoints2 = pygmt.project(center=[-50, 10], endpoint=[-90, 57.5], generate=750, unit=True)\n# generate points every 350 km along a great circle from 10N,50W to 68N,5W\npoints3 = pygmt.project(center=[-50, 10], endpoint=[-5, 68], generate=350, unit=True)\n\n# create a plot with coast and Mercator projection (M)\nfig.basemap(region=[-100, 0, 0, 70], projection=\"M12c\", frame=True)\nfig.coast(shorelines=True, area_thresh=5000)\n\n# plot individual points of first great circle as seagreen line\nfig.plot(x=points1.r, y=points1.s, pen=\"2p,seagreen\")\n# plot individual points as seagreen squares atop\nfig.plot(x=points1.r, y=points1.s, style=\"s.45c\", fill=\"seagreen\", pen=\"1p\")\n\n# plot individual points of second great circle as orange line\nfig.plot(x=points2.r, y=points2.s, pen=\"2p,orange\")\n# plot individual points as orange inverted triangles atop\nfig.plot(x=points2.r, y=points2.s, style=\"i.6c\", fill=\"orange\", pen=\"1p\")\n\n# plot individual points of third great circle as red3 line\nfig.plot(x=points3.r, y=points3.s, pen=\"2p,red3\")\n# plot individual points as red3 circles atop\nfig.plot(x=points3.r, y=points3.s, style=\"c.3c\", fill=\"red3\", pen=\"1p\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/cbbf6cd1cab627f6da78eae96e458a31/colorbars_multiple.ipynb b/v0.14.0/_downloads/cbbf6cd1cab627f6da78eae96e458a31/colorbars_multiple.ipynb new file mode 100644 index 00000000000..579557163ac --- /dev/null +++ b/v0.14.0/_downloads/cbbf6cd1cab627f6da78eae96e458a31/colorbars_multiple.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Multiple colormaps\n\nThis gallery example shows how to create multiple colormaps for different\nsubplots. To better understand how GMT modern mode maintains several levels of\ncolormaps, please refer to\n:gmt-docs:`reference/features.html#gmt-modern-mode-hierarchical-levels` for\ndetails.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n\n# Load Earth relief data for the entire globe and a subset region\ngrid_globe = pygmt.datasets.load_earth_relief(resolution=\"01d\")\nsubset_region = [-14, 30, 35, 60]\ngrid_subset = pygmt.datasets.load_earth_relief(resolution=\"10m\", region=subset_region)\n\n# Define a 1-row, 2-column subplot layout. The overall figure dimensions are\n# set to be 15 cm wide and 8 cm high. Each subplot is automatically labelled.\n# The space between the subplots is set to be 0.5 cm.\nwith fig.subplot(\n nrows=1, ncols=2, figsize=(\"15c\", \"8c\"), autolabel=True, margins=\"0.5c\"\n):\n # Activate the first panel so that the colormap created by the makecpt\n # function is a panel-level CPT\n with fig.set_panel(panel=0):\n pygmt.makecpt(cmap=\"geo\", series=[-8000, 8000])\n # \"R?\" means Winkel Tripel projection with map width automatically\n # determined from the subplot width.\n fig.grdimage(grid=grid_globe, projection=\"R?\", region=\"g\", frame=\"a\")\n fig.colorbar(frame=[\"a4000f2000\", \"x+lElevation\", \"y+lm\"])\n # Activate the second panel so that the colormap created by the makecpt\n # function is a panel-level CPT\n with fig.set_panel(panel=1):\n pygmt.makecpt(cmap=\"globe\", series=[-6000, 3000])\n # \"M?\" means Mercator projection with map width also automatically\n # determined from the subplot width.\n fig.grdimage(grid=grid_subset, projection=\"M?\", region=subset_region, frame=\"a\")\n fig.colorbar(frame=[\"a2000f1000\", \"x+lElevation\", \"y+lm\"])\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/cc146aaae6e2f6f4197cb6c1322061ef/choropleth_map.zip b/v0.14.0/_downloads/cc146aaae6e2f6f4197cb6c1322061ef/choropleth_map.zip new file mode 100644 index 00000000000..792a11f5583 Binary files /dev/null and b/v0.14.0/_downloads/cc146aaae6e2f6f4197cb6c1322061ef/choropleth_map.zip differ diff --git a/v0.14.0/_downloads/cd4f993584ee58b9a78ea05f0a52ee57/blockm.ipynb b/v0.14.0/_downloads/cd4f993584ee58b9a78ea05f0a52ee57/blockm.ipynb new file mode 100644 index 00000000000..8ed0e2e9990 --- /dev/null +++ b/v0.14.0/_downloads/cd4f993584ee58b9a78ea05f0a52ee57/blockm.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Blockmean\n\nThe :func:`pygmt.blockmean` function calculates different quantities\ninside blocks/bins whose dimensions are defined via the ``spacing`` parameter.\nThe following examples show how to calculate the averages of the given values\ninside each bin and how to report the number of points inside each bin.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\n# Load sample data\ndata = pygmt.datasets.load_sample_data(name=\"japan_quakes\")\n# Select only needed columns\ndata = data[[\"longitude\", \"latitude\", \"depth_km\"]]\n\n# Set the region for the plot\nregion = [130, 152.5, 32.5, 52.5]\n# Define spacing in x and y direction (150x150 arc-minute blocks)\nspacing = \"150m\"\n\nfig = pygmt.Figure()\n\n# Calculate mean depth in kilometers from all events within\n# 150x150 arc-minute bins using blockmean\ndf = pygmt.blockmean(data=data, region=region, spacing=spacing)\n# Convert to grid\ngrd = pygmt.xyz2grd(data=df, region=region, spacing=spacing)\n\nfig.grdimage(\n grid=grd,\n region=region,\n frame=[\"af\", \"+tMean earthquake depth inside each block\"],\n cmap=\"batlow\",\n)\n# Plot slightly transparent landmasses on top\nfig.coast(land=\"darkgray\", transparency=40)\n# Plot original data points\nfig.plot(x=data.longitude, y=data.latitude, style=\"c0.3c\", fill=\"white\", pen=\"1p,black\")\nfig.colorbar(frame=\"x+lkm\")\n\nfig.shift_origin(xshift=\"w+5c\")\n\n# Calculate number of total locations within 150x150 arc-minute bins\n# with blockmean's summary parameter\ndf = pygmt.blockmean(data=data, region=region, spacing=spacing, summary=\"n\")\ngrd = pygmt.xyz2grd(data=df, region=region, spacing=spacing)\n\nfig.grdimage(\n grid=grd,\n region=region,\n frame=[\"af\", \"+tNumber of points inside each block\"],\n cmap=\"batlow\",\n)\nfig.coast(land=\"darkgray\", transparency=40)\nfig.plot(x=data.longitude, y=data.latitude, style=\"c0.3c\", fill=\"white\", pen=\"1p,black\")\nfig.colorbar(frame=\"x+lcount\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/cd7b225858612df3a30e21400b3bed45/text.py b/v0.14.0/_downloads/cd7b225858612df3a30e21400b3bed45/text.py new file mode 100644 index 00000000000..782b27a9f82 --- /dev/null +++ b/v0.14.0/_downloads/cd7b225858612df3a30e21400b3bed45/text.py @@ -0,0 +1,242 @@ +""" +Plotting text +============= + +It is often useful to add text annotations to a plot or map. This is handled by the +:meth:`pygmt.Figure.text` method of the :class:`pygmt.Figure` class. +""" + +# %% +from pathlib import Path + +import pygmt + +# %% +# Adding a single text label +# -------------------------- +# +# To add a single text label to a plot, use the ``text`` and ``x`` and ``y`` parameters +# to specify the text and position. + +fig = pygmt.Figure() +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) +fig.text(x=0, y=0, text="My text") +fig.show() + + +# %% +# Adjusting the text label +# ------------------------ +# +# There are several optional parameters to adjust the text label: +# +# * ``font``: Sets the size, family/weight, and color of the font for the text. +# A list of all recognized fonts can be found at :doc:`/techref/fonts`. +# For details of how to use non-default fonts, refer to +# :gmt-docs:`PostScript Fonts Used by GMT `. +# * ``angle``: Specifies the rotation of the text. It is measured counter-clockwise +# from the horizontal in degrees. +# * ``justify``: Defines the anchor point of the bounding box for the text. It is +# specified by a two-letter (order independent) code, chosen from: +# +# * Vertical: **T**\(op), **M**\(iddle), **B**\(ottom) +# * Horizontal: **L**\(eft), **C**\(entre), **R**\(ight) +# +# * ``offset``: Shifts the text relatively to the reference point. + +fig = pygmt.Figure() + +# ----------------------------------------------------------------------------- +# Left: "font", "angle", and "offset" parameters +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame="rtlb") + +# Change font size, family/weight, color of the text +fig.text(x=0, y=3, text="my text", font="12p,Helvetica-Bold,blue") + +# Rotate the text by 30 degrees counter-clockwise from the horizontal +fig.text(x=0, y=0, text="my text", angle=30) + +# Plot marker and text label for reference +fig.plot(x=0, y=-3, style="s0.2c", fill="darkorange", pen="0.7p,darkgray") +fig.text(x=0, y=-3, text="my text") +# Shift the text label relatively to the position given via the x and y parameters +# by 1 centimeter to the right (positive x direction) and 0.5 centimeters down +# (negative y direction) +fig.text(x=0, y=-3, text="my text", offset="1c/-0.5c") + +fig.shift_origin(xshift="w+0.5c") + +# ----------------------------------------------------------------------------- +# Right: "justify" parameter +fig.basemap(region=[-1, 1, -1, 1], projection="X5c", frame="rtlb") + +# Plot markers for reference +fig.plot( + x=[-0.5, 0, 0.5, -0.5, 0, 0.5, -0.5, 0, 0.5], + y=[0.5, 0.5, 0.5, 0, 0, 0, -0.5, -0.5, -0.5], + style="s0.2c", + fill="darkorange", + pen="0.7p,darkgray", +) + +# Plot text labels at the x and y positions of the markers while varying the anchor +# point via the justify parameter +fig.text(x=-0.5, y=0.5, text="TL", justify="TL") # TopLeft +fig.text(x=0, y=0.5, text="TC", justify="TC") # TopCenter +fig.text(x=0.5, y=0.5, text="TR", justify="TR") # TopRight +fig.text(x=-0.5, y=0, text="ML", justify="ML") # MiddleLeft +fig.text(x=0, y=0, text="MC", justify="MC") # MiddleCenter +fig.text(x=0.5, y=0, text="MR", justify="MR") # MiddleRight +fig.text(x=-0.5, y=-0.5, text="BL", justify="BL") # BottomLeft +fig.text(x=0, y=-0.5, text="BC", justify="BC") # BottomCenter +fig.text(x=0.5, y=-0.5, text="BR", justify="BR") # BottomRight + +fig.show() + + +# %% +# Adding a text box +# ----------------- +# +# There are different optional parameters to add and customize a text box: +# +# * ``fill``: Fills the text box with a color. +# * ``pen``: Outlines the text box. +# * ``clearance``: Adds margins in x and y directions between the text and the outline +# of the text box. Can be used to get a text box with rounded edges. + +fig = pygmt.Figure() + +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame="rtlb") + +# Add a box with a fill in green color +fig.text(x=0, y=3, text="My text", fill="green") + +# Add box with a seagreen, 1-point thick, solid outline +fig.text(x=0, y=1, text="My text", pen="1p,seagreen,solid") + +# Add margins between the text and the outline of the text box of 0.1 +# centimeters in x direction and 0.2 centimeters in y direction +fig.text(x=0, y=-1, text="My text", pen="1p,seagreen,dashed", clearance="0.1c/0.2c") + +# Get rounded edges by passing "+tO" to the "clearance" parameter +fig.text(x=0, y=-3, text="My text", pen="1p,seagreen,solid", clearance="0.2c/0.2c+tO") + +fig.show() + + +# %% +# Adding multiple text labels with individual configurations +# ---------------------------------------------------------- +# +# To add multiple text labels with individual ``font``, ``angle``, and ``justify``, +# one can provide lists with the corresponding arguments. + +fig = pygmt.Figure() +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) + +fig.text( + x=[0, 0, 0], + y=[3, 2, -2], + font=["5p,Helvetica,black", "5p,Helvetica,blue", "6p,Courier-Bold,red"], + angle=[0, 0, 30], + justify=["CM", "LT", "CM"], + text=[ + "black text with justify='CM'", + "blue text with justify='LT'", + "red text with angle=30", + ], +) + +fig.show() + + +# %% +# Using an external input file +# ---------------------------- +# +# It is also possible to add text labels via an external input file containing ``x``, +# ``y``, and ``text`` columns. Addionaly, columns to set the ``angle``, ``front``, +# and ``justify`` parameters can be provided. Here, we give a complete example. + +fig = pygmt.Figure() +fig.basemap(region=[108, 121, -5, 8], projection="M10c", frame="a2f1") +fig.coast(land="darkgray", water="steelblue", shorelines="1/0.1p,gray30") + +# Create space-delimited file with region / sea names: +# - longitude (x) and latitude (y) coordinates are in the first two columns +# - angle, font, and justify muss be present in this order in the next three columns +# - the text to be printed is given in the last column +with Path.open("examples.txt", "w") as f: + f.write("114.00 0.50 0 15p,Helvetica-Bold,white CM BORNEO\n") + f.write("119.00 3.25 0 8p,Helvetica-Bold,black CM CELEBES SEA\n") + f.write("112.00 -4.60 0 8p,Helvetica-Bold,black CM JAVA SEA\n") + f.write("112.00 6.00 40 8p,Helvetica-Bold,black CM SOUTH CHINA SEA\n") + f.write("119.12 7.25 -40 8p,Helvetica-Bold,black CM SULU SEA\n") + f.write("118.40 -1.00 65 8p,Helvetica-Bold,black CM MAKASSAR STRAIT\n") + +# Setting the angle, font, and justify parameters to True indicates that those columns +# are present in the text file +fig.text(textfiles="examples.txt", angle=True, font=True, justify=True) + +# Cleanups +Path("examples.txt").unlink() + +fig.show() + + +# %% +# Using the position parameter +# ---------------------------- +# +# Instead of using the ``x`` and ``y`` parameters, the ``position`` parameter can be +# specified to set the reference point for the text on the plot. As for the ``justify`` +# parameter, the ``position`` parameter is specified by a two-letter (order independent) +# code, chosen from: +# +# * Vertical: **T**\(op), **M**\(iddle), **B**\(ottom) +# * Horizontal: **L**\(eft), **C**\(entre), **R**\(ight) +# +# This can be helpful to add a tag to a subplot or text labels out of the plot or map +# frame, e.g., for depth slices. + +fig = pygmt.Figure() + +# ----------------------------------------------------------------------------- +# Left: Add a tag to a subplot +fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=["WStr", "af"]) + +fig.text( + text="(a)", + position="TL", # Top Left + justify="TL", # Top Left + offset="0.1c/-0.1c", +) + +fig.shift_origin(xshift="w+1c") + +# ----------------------------------------------------------------------------- +# Right: Add a text label outside of the plot or map frame +fig.basemap(region=[-30, 30, 10, 60], projection="L0/35/23/47/5c", frame=["wSnE", "af"]) + +fig.text( + text="@@100 km", # "@@" gives "@" in GMT or PyGMT + position="TC", # Top Center + justify="MC", # Middle Center + offset="0c/0.2c", + no_clip=True, # Allow plotting outside of the map or plot frame +) + +fig.show() + + +# %% +# Advanced configuration +# ---------------------- +# +# For crafting more advanced styles, including using special symbols and other character +# sets, be sure to check out the GMT documentation at :gmt-docs:`text.html` and also the +# Technical References at :gmt-docs:`reference/features.html#placement-of-text`. Good +# luck! + +# sphinx_gallery_thumbnail_number = 4 diff --git a/v0.14.0/_downloads/cdb17994766fa505d0697716931a6fb3/azim_general_stereographic.ipynb b/v0.14.0/_downloads/cdb17994766fa505d0697716931a6fb3/azim_general_stereographic.ipynb new file mode 100644 index 00000000000..7ffabf90ae1 --- /dev/null +++ b/v0.14.0/_downloads/cdb17994766fa505d0697716931a6fb3/azim_general_stereographic.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# General stereographic projection\n\nThis map projection is a conformal, azimuthal projection. It is mainly used\nwith a projection center in one of the poles. Then meridians appear as straight\nlines and cross latitudes at a right angle. Unlike the azimuthal equidistant\nprojection, the distances in this projection are not displayed in correct\nproportions. It is often used as a hemisphere map like the Lambert Azimuthal\nEqual Area projection.\n\n**s**\\ *lon0/lat0*\\ [*/horizon*]\\ */scale*\nor **S**\\ *lon0/lat0*\\ [*/horizon*\\]\\ */width*\n\nThe projection type is set with **s** or **S**. *lon0/lat0* specifies the\nprojection center, the optional *horizon* parameter specifies the maximum\ndistance from projection center (in degrees, < 180, default 90), and the\n*scale* or *width* sets the size of the figure.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n region=[4, 14, 52, 57],\n projection=\"S0/90/12c\",\n frame=\"afg\",\n land=\"khaki\",\n water=\"white\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/cdc26887266d53cc230bff938d819921/cyl_equidistant.py b/v0.14.0/_downloads/cdc26887266d53cc230bff938d819921/cyl_equidistant.py new file mode 100644 index 00000000000..7cdc239f852 --- /dev/null +++ b/v0.14.0/_downloads/cdc26887266d53cc230bff938d819921/cyl_equidistant.py @@ -0,0 +1,31 @@ +r""" +Cylindrical equidistant projection +================================== + +This simple cylindrical projection is really a linear scaling of longitudes and +latitudes. The most common form is the Plate Carrée projection, where the +scaling of longitudes and latitudes is the same. All meridians and parallels +are straight lines. + +**q**\ [*lon0*/\ [*lat0*/]]\ *scale* or **Q**\ [*lon0*/\ [*lat0*/]]\ *width* + +The projection is set with **q** or **Q**, and the figure size is set with +*scale* or *width*. Optionally, the central meridian can be set with *lon0* +[Default is the middle of the map]. Optionally, the standard parallel can +be set with *lat0* [Default is the equator]. When supplied, the central +meridian must be supplied as well. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Use region "d" to specify global region (-180/180/-90/90) +fig.coast( + region="d", + projection="Q12c", + frame="afg", + land="gray80", + water="steelblue", +) +fig.show() diff --git a/v0.14.0/_downloads/ce09448f39b10d545342502a18948233/cartesian_power.py b/v0.14.0/_downloads/ce09448f39b10d545342502a18948233/cartesian_power.py new file mode 100644 index 00000000000..862ceba8595 --- /dev/null +++ b/v0.14.0/_downloads/ce09448f39b10d545342502a18948233/cartesian_power.py @@ -0,0 +1,42 @@ +r""" +Cartesian power +=============== + +**X**\ *width*\ [**p**\ *pvalue*][/*height*\ [**p**\ *pvalue*]] or +**x**\ *x-scale*\ [**p**\ *pvalue*][/*y-scale*\ [**p**\ *pvalue*]] + +Give the *width* of the figure and the optional argument *height*. +The lower-case version **x** is similar to **X** but expects +an *x-scale* and an optional *y-scale*. +Each axis with a power transformation requires **p** and the exponent +for that axis after its size argument. +""" + +# %% +import numpy as np +import pygmt + +# Create a list of y-values 0-10 +yvalues = np.arange(0, 11) +# Create a list of x-values that are the square of the y-values +xvalues = yvalues**2 + +fig = pygmt.Figure() +fig.basemap( + region=[0, 100, 0, 10], + # Set the power transformation of the x-axis, with a power of 0.5 + projection="X15cp0.5/10c", + # Set the figures frame as well as annotations and ticks + # The "p" forces to show only square numbers as annotations of the x-axis + frame=["WSne+gbisque", "xfga1p", "ya2f1g"], +) + +# Set the line thickness to "thick" (equals "1p", i.e. 1 point) +# Use as color "black" (default) and as style "solid" (default) +fig.plot(x=xvalues, y=yvalues, pen="thick,black,solid") + +# Plot the data points on top of the line +# Use circles with 0.3 centimeters diameter, with an "orange" fill and a "black" outline +# Symbols are not clipped if they go off the figure +fig.plot(x=xvalues, y=yvalues, style="c0.3c", fill="orange", pen="black", no_clip=True) +fig.show() diff --git a/v0.14.0/_downloads/ce82c322966fbdc815d1c920e745a571/vectors.py b/v0.14.0/_downloads/ce82c322966fbdc815d1c920e745a571/vectors.py new file mode 100644 index 00000000000..94053a58225 --- /dev/null +++ b/v0.14.0/_downloads/ce82c322966fbdc815d1c920e745a571/vectors.py @@ -0,0 +1,451 @@ +""" +Plotting vectors +================ + +Plotting vectors is handled by :meth:`pygmt.Figure.plot`. +""" + +# %% +import numpy as np +import pygmt + +# %% +# Plot Cartesian Vectors +# ---------------------- +# +# Create a simple Cartesian vector using a start point through +# ``x``, ``y``, and ``direction`` parameters. +# On the shown figure, the plot is projected on a 10cm X 10cm region, +# which is specified by the ``projection`` parameter. +# The direction is specified +# by a list of two 1-D arrays structured as ``[[angle_in_degrees], [length]]``. +# The angle is measured in degrees and moves counter-clockwise from the +# horizontal. +# The length of the vector uses centimeters by default but +# could be changed using :class:`pygmt.config` +# (Check the next examples for unit changes). +# +# Notice that the ``v`` in the ``style`` parameter stands for +# vector; it distinguishes it from regular lines and allows for +# different customization. ``0c`` is used to specify the size +# of the arrow head which explains why there is no arrow on either +# side of the vector. + +fig = pygmt.Figure() +fig.plot( + region=[0, 10, 0, 10], + projection="X10c/10c", + frame="ag", + x=2, + y=8, + style="v0c", + direction=[[-45], [6]], +) +fig.show() + +# %% +# In this example, we apply the same concept shown previously to plot multiple +# vectors. Notice that instead of passing int/float to ``x`` and ``y``, a list +# of all x and y coordinates will be passed. Similarly, the length of direction +# list will increase accordingly. +# +# Additionally, we change the style of the vector to include a red +# arrow head at the end (**+e**) of the vector and increase the +# thickness (``pen="2p"``) of the vector stem. A list of different +# styling attributes can be found in +# :doc:`Vector heads and tails `. + +fig = pygmt.Figure() +fig.plot( + region=[0, 10, 0, 10], + projection="X10c/10c", + frame="ag", + x=[2, 4], + y=[8, 1], + style="v0.6c+e", + direction=[[-45, 23], [6, 3]], + pen="2p", + fill="red3", +) +fig.show() + +# %% +# The default unit of vector length is centimeters, +# however, this can be changed to inches or points. Note that, in PyGMT, +# one point is defined as 1/72 inch. +# +# In this example, the graphed region is 5in X 5in, but +# the length of the first vector is still graphed in centimeters. +# Using ``pygmt.config(PROJ_LENGTH_UNIT="i")``, the default unit +# can be changed to inches in the second plotted vector. + +fig = pygmt.Figure() +# Vector 1 with default unit as cm +fig.plot( + region=[0, 10, 0, 10], + projection="X5i/5i", + frame="ag", + x=2, + y=8, + style="v1c+e", + direction=[[0], [3]], + pen="2p", + fill="red3", +) +# Vector 2 after changing default unit to inches +with pygmt.config(PROJ_LENGTH_UNIT="i"): + fig.plot( + x=2, + y=7, + direction=[[0], [3]], + style="v1c+e", + pen="2p", + fill="red3", + ) +fig.show() + +# %% +# Vectors can also be plotted by including all the information +# about a vector in a single list. However, this requires creating +# a 2-D list or numpy array containing all vectors. +# Each vector list contains the information structured as: +# ``[x_start, y_start, direction_degrees, length]``. +# +# If this approach is chosen, the ``data`` parameter must be +# used instead of ``x``, ``y``, and ``direction``. + +# Create a list of lists that include each vector information +vectors = [[2, 3, 45, 4]] + +fig = pygmt.Figure() +fig.plot( + region=[0, 10, 0, 10], + projection="X10c/10c", + frame="ag", + data=vectors, + style="v0.6c+e", + pen="2p", + fill="red3", +) +fig.show() + +# %% +# Using the functionality mentioned in the previous example, +# multiple vectors can be plotted at the same time. Another +# vector could be simply added to the 2-D list or numpy +# array object and passed using ``data`` parameter. + +# Vector specifications structured as: +# [x_start, y_start, direction_degrees, length] +vector_1 = [2, 3, 45, 4] +vector_2 = [7.5, 8.3, -120.5, 7.2] +# Create a list of lists that include each vector information +vectors = [vector_1, vector_2] +# Vectors structure: [[2, 3, 45, 4], [7.5, 8.3, -120.5, 7.2]] + +fig = pygmt.Figure() +fig.plot( + region=[0, 10, 0, 10], + projection="X10c/10c", + frame="ag", + data=vectors, + style="v0.6c+e", + pen="2p", + fill="red3", +) +fig.show() + +# %% +# In this example, Cartesian vectors are plotted over a Mercator +# projection of the continental US. The x values represent the +# longitude and y values represent the latitude where the vector starts. +# +# This example also shows some of the styles a vector supports. +# The beginning point of the vector (**+b**) +# should take the shape of a circle (**c**). Similarly, the end +# point of the vector (**+e**) should have an arrow shape (**a**) +# (to draw a plain arrow, use **A** instead). Lastly, the **+a** +# specifies the angle of the vector head apex (30 degrees in +# this example). + +# Create a plot with coast, Mercator projection (M) over the continental US +fig = pygmt.Figure() +fig.coast( + region=[-127, -64, 24, 53], + projection="M10c", + frame="ag", + borders=1, + shorelines="0.25p,black", + area_thresh=4000, + land="grey", + water="lightblue", +) + +# Plot a vector using the x, y, direction parameters +style = "v0.4c+bc+ea+a30" +fig.plot( + x=-110, + y=40, + style=style, + direction=[[-25], [3]], + pen="1p", + fill="red3", +) + +# vector specifications structured as: +# [x_start, y_start, direction_degrees, length] +vector_2 = [-82, 40.5, 138, 2.5] +vector_3 = [-71.2, 45, -115.7, 4] +# Create a list of lists that include each vector information +vectors = [vector_2, vector_3] + +# Plot vectors using the data parameter. +fig.plot( + data=vectors, + style=style, + pen="1p", + fill="yellow", +) +fig.show() + +# %% +# Another example of plotting Cartesian vectors over a coast plot. This time a +# Transverse Mercator projection is used. Additionally, :func:`numpy.linspace` +# is used to create 5 vectors with equal stops. + +x = np.linspace(36, 42, 5) # x values = [36. 37.5 39. 40.5 42. ] +y = np.linspace(39, 39, 5) # y values = [39. 39. 39. 39.] +direction = np.linspace(-90, -90, 5) # direction values = [-90. -90. -90. -90.] +length = np.linspace(1.5, 1.5, 5) # length values = [1.5 1.5 1.5 1.5] + +# Create a plot with coast, +# Transverse Mercator projection (T) over Turkey and Syria +fig = pygmt.Figure() +fig.coast( + region=[20, 50, 30, 45], + projection="T35/10c", + frame=True, + borders=1, + shorelines="0.25p,black", + area_thresh=4000, + land="lightbrown", + water="lightblue", +) + +fig.plot( + x=x, + y=y, + style="v0.4c+ea+bc", + direction=[direction, length], + pen="0.6p", + fill="red3", +) + +fig.show() + + +# %% +# Plot Circular Vectors +# --------------------- +# +# When plotting circular vectors, all of the information for a single vector is +# to be stored in a list. Each circular vector list is structured as: +# ``[x_start, y_start, radius, degree_start, degree_stop]``. The first two +# values in the vector list represent the origin of the circle that will be +# plotted. The next value is the radius which is represented on the plot in cm. +# +# The last two values in the vector list represent the degree at which the plot +# will start and stop. These values are measured counter-clockwise from the +# horizontal axis. In this example, the result shown is the left half of a +# circle as the plot starts at 90 degrees and goes until 270. Notice that the +# ``m`` in the ``style`` parameter stands for circular vectors. + +fig = pygmt.Figure() + +circular_vector_1 = [0, 0, 2, 90, 270] +data = [circular_vector_1] +fig.plot( + region=[-5, 5, -5, 5], + projection="X10c", + frame="ag", + data=data, + style="m0.5c+ea", + pen="2p", + fill="red3", +) + +# Another example using np.array() +circular_vector_2 = [0, 0, 4, -90, 90] +data = np.array([circular_vector_2]) + +fig.plot( + data=data, + style="m0.5c+ea", + pen="2p", + fill="red3", +) +fig.show() + +# %% +# When plotting multiple circular vectors, a two dimensional array or numpy +# array object should be passed as the ``data`` parameter. In this example, +# :func:`numpy.column_stack` is used to generate this two dimensional array. +# Other numpy objects are used to generate linear values for the ``radius`` +# parameter and random values for the ``degree_stop`` parameter discussed in +# the previous example. This is the reason in which each vector has a different +# appearance on the projection. + +vector_num = 5 +radius = 3 - (0.5 * np.arange(0, vector_num)) +startdir = np.full(vector_num, 90) +stopdir = 180 + (50 * np.arange(0, vector_num)) +data = np.column_stack( + [np.full(vector_num, 0), np.full(vector_num, 0), radius, startdir, stopdir] +) + +fig = pygmt.Figure() +fig.plot( + region=[-5, 5, -5, 5], + projection="X10c", + frame="ag", + data=data, + style="m0.5c+ea", + pen="2p", + fill="red3", +) +fig.show() + +# %% +# Much like when plotting Cartesian vectors, the default unit used is +# centimeters. When this is changed to inches, the size of the plot appears +# larger when the projection units do not change. Below is an example of two +# circular vectors. One is plotted using the default unit, and the second is +# plotted using inches. Despite using the same list to plot the vectors, a +# different measurement unit causes one to be larger than the other. + +circular_vector = [6, 5, 1, 90, 270] + +fig = pygmt.Figure() +fig.plot( + region=[0, 10, 0, 10], + projection="X10c", + frame="ag", + data=[circular_vector], + style="m0.5c+ea", + pen="2p", + fill="red3", +) + +with pygmt.config(PROJ_LENGTH_UNIT="i"): + fig.plot( + data=[circular_vector], + style="m0.5c+ea", + pen="2p", + fill="red3", + ) +fig.show() + + +# %% +# Plot Geographic Vectors +# ----------------------- +# +# On this map, +# ``point_1`` and ``point_2`` are coordinate pairs used to set the +# start and end points of the geographic vector. +# The geographical vector is going from Idaho to +# Chicago. To style geographic +# vectors, use ``=`` at the beginning of the ``style`` parameter. +# Other styling features such as vector stem thickness and head color +# can be passed into the ``pen`` and ``fill`` parameters. +# +# Note that the **+s** is added to use a start point and an end point +# to represent the vector instead of input angle and length. + +point_1 = [-114.7420, 44.0682] +point_2 = [-87.6298, 41.8781] +data = np.array([point_1 + point_2]) + +fig = pygmt.Figure() +fig.coast( + region=[-127, -64, 24, 53], + projection="M10c", + frame=True, + borders=1, + shorelines="0.25p,black", + area_thresh=4000, +) +fig.plot( + data=data, + style="=0.5c+ea+s", + pen="2p", + fill="red3", +) +fig.show() + +# %% +# Using the same technique shown in the previous example, +# multiple vectors can be plotted in a chain where the end point +# of one is the start point of another. This can be done +# by adding the coordinate lists together to create this structure: +# ``[[start_latitude, start_longitude, end_latitude, end_longitude]]``. +# Each list within the 2-D list contains the start and end information +# for each vector. + +# Coordinate pairs for all the locations used +ME = [-69.4455, 45.2538] +CHI = [-87.6298, 41.8781] +SEA = [-122.3321, 47.6062] +NO = [-90.0715, 29.9511] +KC = [-94.5786, 39.0997] +CA = [-119.4179, 36.7783] + +# Add array to piece together the vectors +data = [ME + CHI, CHI + SEA, SEA + KC, KC + NO, NO + CA] + +fig = pygmt.Figure() +fig.coast( + region=[-127, -64, 24, 53], + projection="M10c", + frame=True, + borders=1, + shorelines="0.25p,black", + area_thresh=4000, +) +fig.plot( + data=data, + style="=0.5c+ea+s", + pen="2p", + fill="red3", +) +fig.show() + +# %% +# This example plots vectors over a Mercator projection. The start points +# are located at SA which is South Africa and going to four different +# locations. + +SA = [22.9375, -30.5595] +EUR = [15.2551, 54.5260] +ME = [-69.4455, 45.2538] +AS = [100.6197, 34.0479] +NM = [-105.8701, 34.5199] +data = np.array([SA + EUR, SA + ME, SA + AS, SA + NM]) + +fig = pygmt.Figure() +fig.coast( + region=[-180, 180, -80, 80], + projection="M0/0/12c", + frame="afg", + land="lightbrown", + water="lightblue", +) +fig.plot( + data=data, + style="=0.5c+ea+s", + pen="2p", + fill="red3", +) +fig.show() + +# sphinx_gallery_thumbnail_number = 6 diff --git a/v0.14.0/_downloads/d29a2bd54665d33b92d0a07109fefb25/polygons.zip b/v0.14.0/_downloads/d29a2bd54665d33b92d0a07109fefb25/polygons.zip new file mode 100644 index 00000000000..6d595e1c894 Binary files /dev/null and b/v0.14.0/_downloads/d29a2bd54665d33b92d0a07109fefb25/polygons.zip differ diff --git a/v0.14.0/_downloads/d352252c12a69ca51550e43134017e37/conic_equidistant.ipynb b/v0.14.0/_downloads/d352252c12a69ca51550e43134017e37/conic_equidistant.ipynb new file mode 100644 index 00000000000..d5bf20f8c65 --- /dev/null +++ b/v0.14.0/_downloads/d352252c12a69ca51550e43134017e37/conic_equidistant.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Equidistant conic projection\n\nThe equidistant conic projection was described by the Greek philosopher\nClaudius Ptolemy about A.D. 150. It is neither conformal or equal-area, but\nserves as a compromise between them. The scale is true along all meridians and\nthe standard parallels.\n\n**d**\\ *lon0/lat0*\\ /\\ *lat1/lat2*\\ */scale*\nor **D**\\ *lon0/lat0*\\ /\\ *lat1/lat2*\\ */width*\n\nThe projection is set with **d** or **D**. The projection center is set by\n*lon0/lat0* and two standard parallels for the map are set with *lat1/lat2*.\nThe figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n region=[-88, -70, 18, 24],\n projection=\"D-79/21/19/23/12c\",\n frame=\"afg\",\n land=\"seagreen\",\n water=\"gray90\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/d3c2e3b51323e746062f7981cd254e1f/misc_mollweide.zip b/v0.14.0/_downloads/d3c2e3b51323e746062f7981cd254e1f/misc_mollweide.zip new file mode 100644 index 00000000000..09912679205 Binary files /dev/null and b/v0.14.0/_downloads/d3c2e3b51323e746062f7981cd254e1f/misc_mollweide.zip differ diff --git a/v0.14.0/_downloads/d40b9c61ef0fb5c121ba98f771cf4d8c/histogram.py b/v0.14.0/_downloads/d40b9c61ef0fb5c121ba98f771cf4d8c/histogram.py new file mode 100644 index 00000000000..e6f69add4c8 --- /dev/null +++ b/v0.14.0/_downloads/d40b9c61ef0fb5c121ba98f771cf4d8c/histogram.py @@ -0,0 +1,39 @@ +""" +Histogram +========= + +The :meth:`pygmt.Figure.histogram` method can plot regular histograms. +Using the ``series`` parameter allows to set the interval for the width of +each bar. The type of the histogram (frequency count or percentage) can be +selected via the ``histtype`` parameter. +""" + +# %% +import numpy as np +import pygmt + +# Generate random elevation data from a normal distribution +rng = np.random.default_rng(seed=100) +mean = 100 # mean of distribution +stddev = 25 # standard deviation of distribution +data = rng.normal(loc=mean, scale=stddev, size=521) + + +fig = pygmt.Figure() + +fig.histogram( + data=data, + # Define the frame, add a title, and set the background color to + # "lightgray". Add labels to the x-axis and y-axis + frame=["WSne+tHistogram+glightgray", "x+lElevation (m)", "y+lCounts"], + # Generate evenly spaced bins by increments of 5 + series=5, + # Use "red3" as color fill for the bars + fill="red3", + # Use the pen parameter to draw the outlines with a width of 1 point + pen="1p", + # Choose histogram type 0, i.e., counts [Default] + histtype=0, +) + +fig.show() diff --git a/v0.14.0/_downloads/d50f48345c8918d003ec060c53fca706/envelope.py b/v0.14.0/_downloads/d50f48345c8918d003ec060c53fca706/envelope.py new file mode 100644 index 00000000000..c5d7e578f9c --- /dev/null +++ b/v0.14.0/_downloads/d50f48345c8918d003ec060c53fca706/envelope.py @@ -0,0 +1,98 @@ +""" +Envelope +======== + +The ``close`` parameter of the :meth:`pygmt.Figure.plot` method can be used to build a +symmetrical or an asymmetrical envelope. The user can give either the deviations or the +bounds in y-direction. For the first case append ``"+d"`` or ``"+D"`` and for the latter +case ``"+b"``. +""" + +# %% +import pandas as pd +import pygmt + +# Define a pandas.DataFrame with columns for x and y as well as the lower and upper +# deviations +df_devi = pd.DataFrame( + data={ + "x": [1, 3, 5, 7, 9], + "y": [0.5, -0.7, 0.8, -0.3, 0.1], + "y_deviation_low": [0.2, 0.2, 0.3, 0.4, 0.2], + "y_deviation_upp": [0.1, 0.3, 0.2, 0.4, 0.1], + } +) + +# Define the same pandas.DataFrame but with lower and upper bounds +df_bound = pd.DataFrame( + data={ + "x": [1, 3, 5, 7, 9], + "y": [0.5, -0.7, 0.8, -0.3, 0.1], + "y_bound_low": [0.3, -0.9, 0.5, -0.7, -0.1], + "y_bound_upp": [0.6, -0.4, 1.1, 0.1, 0.2], + } +) + + +fig = pygmt.Figure() + +# ----------------------------------------------------------------------------- +# Left +fig.basemap( + region=[0, 10, -1.5, 1.5], + projection="X10c", + frame=["WSne+tsymmetric deviations +d", "xa2f1", "ya1f0.1"], +) + +# Plot a symmetrical envelope based on the deviations ("+d") +fig.plot( + data=df_devi, + close="+d", + # Fill the envelope in gray color with a transparency of 50 % + fill="gray@50", + pen="1p,gray30", +) + +# Plot the data points on top +fig.plot(data=df_devi, style="c0.2c", pen="1p,gray30", fill="darkgray") + +# Shift plot origin by the figure width ("w") plus 1 centimeter in x direction +fig.shift_origin(xshift="w+1c") + +# ----------------------------------------------------------------------------- +# Middle +fig.basemap( + region=[0, 10, -1.5, 1.5], + projection="X10c", + frame=["WSne+tasymmetric deviations +D", "xa2f1", "yf0.1"], +) + +# Plot an asymmetrical envelope based on the deviations ("+D") +fig.plot( + data=df_devi, + fill="gray@50", + # Add an outline around the envelope. Here, a dashed pen ("+p") with 0.5-points + # thickness and "gray30" color is used + close="+D+p0.5p,gray30,dashed", + pen="1p,gray30", +) + +fig.plot(data=df_devi, style="c0.2c", pen="1p,gray30", fill="darkgray") + +fig.shift_origin(xshift="w+1c") + +# ----------------------------------------------------------------------------- +# Right +fig.basemap( + region=[0, 10, -1.5, 1.5], + projection="X10c", + # Use "\\053" to handle "+b" as a string not as a modifier + frame=["wSnE+tbounds \\053b", "xa2f1", "ya1f0.1"], +) + +# Plot an envelope based on the bounds ("+b") +fig.plot(data=df_bound, close="+b+p0.5p,gray30,dashed", pen="1p,gray30") + +fig.plot(data=df_bound, style="c0.2c", pen="1p,gray30", fill="darkgray") + +fig.show() diff --git a/v0.14.0/_downloads/d6898c911a108b9ab370974c1c772ce9/draping_on_3d_surface.ipynb b/v0.14.0/_downloads/d6898c911a108b9ab370974c1c772ce9/draping_on_3d_surface.ipynb new file mode 100644 index 00000000000..515255ffc3e --- /dev/null +++ b/v0.14.0/_downloads/d6898c911a108b9ab370974c1c772ce9/draping_on_3d_surface.ipynb @@ -0,0 +1,115 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Draping a dataset on top of a topographic surface\n\nIt can be visually appealing to \"drape\" a dataset over a topographic surface. This can\nbe accomplished using the ``drapegrid`` parameter of :meth:`pygmt.Figure.grdview`.\n\nThis tutorial consists of two examples:\n\n1. Draping a grid\n\n2. Draping an image\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Load the required packages\nimport pygmt\nimport rasterio\nimport xarray as xr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 1. Drapping a grid\n\nIn the first example, the seafloor crustal age is plotted with color-coding on top of\nthe topographic map of an area of the Mid-Atlantic Ridge.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Define the study area in degrees East or North\nregion_2d = [-50, 0, 36, 70] # [lon_min, lon_max, lat_min, lat_max]\n\n# Download elevation and crustal age grids for the study region with a resolution of 10\n# arc-minutes and load them into xarray.DataArrays\ngrd_relief = pygmt.datasets.load_earth_relief(resolution=\"10m\", region=region_2d)\ngrd_age = pygmt.datasets.load_earth_age(resolution=\"10m\", region=region_2d)\n\n# Determine the 3-D region from the minimum and maximum values of the relief grid\nregion_3d = [*region_2d, grd_relief.min().to_numpy(), grd_relief.max().to_numpy()]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The topographic surface is created based on the grid passed to the ``grid`` parameter\nof :meth:`pygmt.Figure.grdview`; here we use a grid of the Earth relief. To add a\ncolor-coding based on *another* grid we have to pass a second grid to the\n``drapegrid`` parameter; here we use a grid of the crustal age. In this case the\ncolormap specified via the ``cmap`` parameter applies to the grid passed to\n``drapegrid``, not to ``grid``. The azimuth and elevation of the 3-D plot are set via\nthe ``perspective`` parameter.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\n# Set up colormap for the crustal age\npygmt.config(COLOR_NAN=\"lightgray\")\npygmt.makecpt(cmap=\"batlow\", series=[0, 200, 1], reverse=True, overrule_bg=True)\n\nfig.grdview(\n projection=\"M12c\", # Mercator projection with a width of 12 centimeters\n region=region_3d,\n grid=grd_relief, # Use elevation grid for z values\n drapegrid=grd_age, # Use crustal age grid for color-coding\n cmap=True, # Use colormap created for the crustal age\n surftype=\"i\", # Create an image plot\n # Use an illumination from the azimuthal directions 0\u00b0 (north) and 270\u00b0\n # (west) with a normalization via a cumulative Laplace distribution for\n # the shading\n shading=\"+a0/270+ne0.6\",\n perspective=[157.5, 30], # Azimuth and elevation for the 3-D plot\n zsize=\"1.5c\",\n plane=\"+gdarkgray\",\n frame=True,\n)\n\n# Add colorbar for the crustal age\nfig.colorbar(frame=[\"x+lseafloor crustal age\", \"y+lMyr\"], position=\"+n\")\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 2. Draping an image\n\nIn the second example, the flag of the European Union (EU) is plotted on top of a\ntopographic map of northwest Europe. This example is modified from\n:gmt-docs:`GMT example 32 `.\nWe have to consider the dimension of the image we want to drap. The image we will\ndownload in this example has 1000 x 667 pixels, i.e. an aspect ratio of 3 x 2.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Define the study area in degrees East or North, with an extend of 6 degrees for\n# the longitude and 4 degrees for the latitude\nregion_2d = [3, 9, 50, 54] # [lon_min, lon_max, lat_min, lat_max]\n\n# Download elevation grid for the study region with a resolution of 30 arc-seconds and\n# pixel registration and load it into an xarray.DataArray\ngrd_relief = pygmt.datasets.load_earth_relief(resolution=\"30s\", region=region_2d)\n\n# Determine the 3-D region from the minimum and maximum values of the relief grid\nregion_3d = [*region_2d, grd_relief.min().to_numpy(), grd_relief.max().to_numpy()]\n\n# Download an PNG image of the flag of the EU using rasterio and load it into a\n# xarray.DataArray\nurl_to_image = \"https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Flag_of_Europe.svg/1000px-Flag_of_Europe.svg.png\"\nwith rasterio.open(url_to_image) as dataset:\n data = dataset.read()\n drapegrid = xr.DataArray(data, dims=(\"band\", \"y\", \"x\"))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Again we create a 3-D plot with :meth:`pygmt.Figure.grdview` and pass an Earth relief\ngrid to the ``grid`` parameter to create the topographic surface. But now we pass the\nPNG image which was loaded into an :class:`xarray.DataArray` to the ``drapgrid``\nparameter.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\n# Set up a colormap with two colors for the EU flag: blue (0/51/153) for the background\n# (value 0 in the netCDF file -> lower half of 0-255 range) and yellow (255/204/0) for\n# the stars (value 255 -> upper half)\npygmt.makecpt(cmap=\"0/51/153,255/204/0\", series=[0, 256, 128])\n\nfig.grdview(\n projection=\"M12c\", # Mercator projection with a width of 12 centimeters\n region=region_3d,\n grid=grd_relief, # Use elevation grid for z values\n drapegrid=drapegrid, # Drap image grid for the EU flag on top\n cmap=True, # Use colormap defined for the EU flag\n surftype=\"i\", # Create an image plot\n # Use an illumination from the azimuthal directions 0\u00b0 (north) and 270\u00b0 (west) with\n # a normalization via a cumulative Laplace distribution for the shading\n shading=\"+a0/270+ne0.6\",\n perspective=[157.5, 30], # Define azimuth, elevation for the 3-D plot\n zsize=\"1c\",\n plane=\"+gdarkgray\",\n frame=True,\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/d6c2137e689f89baa8674d31d064c309/polyconic.zip b/v0.14.0/_downloads/d6c2137e689f89baa8674d31d064c309/polyconic.zip new file mode 100644 index 00000000000..fa0aeda09ee Binary files /dev/null and b/v0.14.0/_downloads/d6c2137e689f89baa8674d31d064c309/polyconic.zip differ diff --git a/v0.14.0/_downloads/d7628dfa5663bc8d0ed82cdda809cd53/misc_mollweide.py b/v0.14.0/_downloads/d7628dfa5663bc8d0ed82cdda809cd53/misc_mollweide.py new file mode 100644 index 00000000000..ee5f33777c0 --- /dev/null +++ b/v0.14.0/_downloads/d7628dfa5663bc8d0ed82cdda809cd53/misc_mollweide.py @@ -0,0 +1,24 @@ +r""" +Mollweide projection +==================== + +This pseudo-cylindrical, equal-area projection was developed by the German +mathematician and astronomer Karl Brandan Mollweide in 1805. Parallels are +unequally spaced straight lines with the meridians being equally spaced +elliptical arcs. The scale is only true along latitudes 40°44' north and south. +The projection is used mainly for global maps showing data distributions. It is +occasionally referenced under the name homalographic projection. + +**w**\ [*lon0/*]\ *scale* or **W**\ [*lon0/*]\ *width* + +The projection is set with **w** or **W**. The central meridian is set with the +optional *lon0*, and the figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Use region "d" to specify global region (-180/180/-90/90) +fig.coast(region="d", projection="W12c", frame="afg", land="ivory", water="bisque4") +fig.show() diff --git a/v0.14.0/_downloads/d96271a0579db8a36a8ce52ae8b24dfc/misc_robinson.ipynb b/v0.14.0/_downloads/d96271a0579db8a36a8ce52ae8b24dfc/misc_robinson.ipynb new file mode 100644 index 00000000000..d5a61bc6656 --- /dev/null +++ b/v0.14.0/_downloads/d96271a0579db8a36a8ce52ae8b24dfc/misc_robinson.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Robinson projection\n\nThe Robinson projection, presented by the American geographer and cartographer\nArthur H. Robinson in 1963, is a modified cylindrical projection that is\nneither conformal nor equal-area. Central meridian and all parallels are\nstraight lines; other meridians are curved. It uses lookup tables rather than\nanalytic expressions to make the world map \"look\" right [#f1]_.\nThe scale is true along latitudes 38\u00b0 north and south. The projection was\noriginally developed for use by Rand McNally and is currently used by the\nNational Geographic Society.\n\n**n**\\ [*lon0/*]\\ *scale* or **N**\\ [*lon0/*]\\ *width*\n\nThe projection is set with **n** or **N**. The central meridian is set with the\noptional *lon0*, and the figure size is set with *scale* or *width*.\n\n.. rubric:: Footnotes\n\n.. [#f1] Robinson provided a table of y-coordinates for latitudes every 5\u00b0.\n To project values for intermediate latitudes one must interpolate\n the table. Different interpolants may result in slightly different\n maps. GMT uses the interpolant selected by the parameter\n :gmt-term:`GMT_INTERPOLANT` in the gmt.conf file.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Use region \"d\" to specify global region (-180/180/-90/90)\nfig.coast(region=\"d\", projection=\"N12c\", frame=\"afg\", land=\"ivory\", water=\"bisque4\")\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/d99c122b2fad1384ab5bf5be5d8c62d5/scatter3d.py b/v0.14.0/_downloads/d99c122b2fad1384ab5bf5be5d8c62d5/scatter3d.py new file mode 100644 index 00000000000..0f6a6d1609c --- /dev/null +++ b/v0.14.0/_downloads/d99c122b2fad1384ab5bf5be5d8c62d5/scatter3d.py @@ -0,0 +1,100 @@ +""" +3-D scatter plots +================= + +The :meth:`pygmt.Figure.plot3d` method can be used to plot symbols in 3-D. +In the example below, we show how the +`Iris flower dataset `__ +can be visualized using a perspective 3-D plot. The ``region`` +parameter has to include the :math:`x`, :math:`y`, :math:`z` axis limits in the +form of (xmin, xmax, ymin, ymax, zmin, zmax), which can be done automatically +using :func:`pygmt.info`. To plot the z-axis frame, set ``frame`` as a +minimum to something like ``frame=["WsNeZ", "zaf"]``. Use ``perspective`` to +control the azimuth and elevation angle of the view, and ``zscale`` to adjust +the vertical exaggeration factor. +""" + +# %% +import pandas as pd +import pygmt + +# Load sample iris data +df = pd.read_csv("https://github.com/mwaskom/seaborn-data/raw/master/iris.csv") + +# Convert 'species' column to categorical dtype +# By default, pandas sorts the individual categories in an alphabetical order. +# For a non-alphabetical order, you have to manually adjust the list of +# categories. For handling and manipulating categorical data in pandas, +# have a look at: +# https://pandas.pydata.org/docs/user_guide/categorical.html +df.species = df.species.astype(dtype="category") + +# Make a list of the individual categories of the 'species' column +# ['setosa', 'versicolor', 'virginica'] +# They are (corresponding to the categorical number code) by default in +# alphabetical order and later used for the colorbar labels +labels = list(df.species.cat.categories) + +# Use pygmt.info to get region bounds (xmin, xmax, ymin, ymax, zmin, zmax) +# The below example will return a numpy array [0.0, 3.0, 4.0, 8.0, 1.0, 7.0] +region = pygmt.info( + data=df[["petal_width", "sepal_length", "petal_length"]], # x, y, z columns + per_column=True, # Report the min/max values per column as a numpy array + # Round the min/max values of the first three columns to the nearest + # multiple of 1, 2 and 0.5, respectively + spacing=(1, 2, 0.5), +) + +# Make a 3-D scatter plot, coloring each of the 3 species differently +fig = pygmt.Figure() + +# Define a colormap for three categories, define the range of the +# new discrete CPT using series=(lowest_value, highest_value, interval), +# use color_model="+csetosa,versicolor,virginica" to write the discrete color +# palette "cubhelix" in categorical format and add the species names as +# annotations for the colorbar +pygmt.makecpt( + cmap="cubhelix", + # Use the minimum and maximum of the categorical number code + # to set the lowest_value and the highest_value of the CPT + series=(df.species.cat.codes.min(), df.species.cat.codes.max(), 1), + # Convert ['setosa', 'versicolor', 'virginica'] to + # 'setosa,versicolor,virginica' + color_model="+c" + ",".join(labels), +) + +fig.plot3d( + # Use petal width, sepal length, and petal length as x, y, and z + # data input, respectively + x=df.petal_width, + y=df.sepal_length, + z=df.petal_length, + # Vary each symbol size according to the sepal width, scaled by 0.1 + size=0.1 * df.sepal_width, + # Use 3-D cubes ("u") as symbols with size in centimeters ("c") + style="uc", + # Points colored by categorical number code (refers to the species) + fill=df.species.cat.codes.astype(int), + # Use colormap created by makecpt + cmap=True, + # Set map dimensions (xmin, xmax, ymin, ymax, zmin, zmax) + region=region, + # Set frame parameters + frame=[ + "WsNeZ3+tIris flower data set", # z axis label positioned on 3rd corner, add title + "xafg+lPetal Width (cm)", + "yafg+lSepal Length (cm)", + "zafg+lPetal Length (cm)", + ], + # Set perspective to azimuth NorthWest (315°), at elevation 25° + perspective=[315, 25], + # Vertical exaggeration factor + zscale=1.5, +) + +# Shift plot origin in x direction +fig.shift_origin(xshift="3.1c") +# Add colorbar legend +fig.colorbar() + +fig.show() diff --git a/v0.14.0/_downloads/da0f1137f2c3abc47713e232ffc3df1a/points_transparency.zip b/v0.14.0/_downloads/da0f1137f2c3abc47713e232ffc3df1a/points_transparency.zip new file mode 100644 index 00000000000..7574afde46d Binary files /dev/null and b/v0.14.0/_downloads/da0f1137f2c3abc47713e232ffc3df1a/points_transparency.zip differ diff --git a/v0.14.0/_downloads/da130767478db6f302310ed3547b5ed2/regions.ipynb b/v0.14.0/_downloads/da130767478db6f302310ed3547b5ed2/regions.ipynb new file mode 100644 index 00000000000..651b761671e --- /dev/null +++ b/v0.14.0/_downloads/da130767478db6f302310ed3547b5ed2/regions.ipynb @@ -0,0 +1,241 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Setting the region\n\nMany of the plotting methods take the ``region`` parameter, which sets the\narea that will be shown in the figure. This tutorial covers the different types\nof inputs that it can accept.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Coordinates\n\nA string of coordinates can be passed to ``region``, in the form of\n*xmin*/*xmax*/*ymin*/*ymax*.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n # Set the x-range from 10E to 20E and the y-range to 35N to 45N\n region=\"10/20/35/45\",\n # Set projection to Mercator, and the figure size to 15 centimeters\n projection=\"M15c\",\n # Set the color of the land to light gray\n land=\"lightgray\",\n # Set the color of the water to white\n water=\"white\",\n # Display the national borders and set the pen thickness to 0.5p\n borders=\"1/0.5p\",\n # Display the shorelines and set the pen thickness to 0.5p\n shorelines=\"1/0.5p\",\n # Set the frame to display annotations and gridlines\n frame=\"ag\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The coordinates can be passed to ``region`` as a list, in the form of\n[*xmin*, *xmax*, *ymin*, *ymax*].\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n # Set the x-range from 10E to 20E and the y-range to 35N to 45N\n region=[10, 20, 35, 45],\n projection=\"M12c\",\n land=\"lightgray\",\n water=\"white\",\n borders=\"1/0.5p\",\n shorelines=\"1/0.5p\",\n frame=\"ag\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Instead of passing axes minima and maxima, the coordinates can be passed for\nthe bottom-left and top-right corners. The string format takes the\ncoordinates for the bottom-left and top-right coordinates. To specify corner\ncoordinates, append **+r** at the end of the ``region`` string.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n # Set the bottom-left corner as 10E, 35N and the top-right corner as\n # 20E, 45N\n region=\"10/35/20/45+r\",\n projection=\"M12c\",\n land=\"lightgray\",\n water=\"white\",\n borders=\"1/0.5p\",\n shorelines=\"1/0.5p\",\n frame=\"ag\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Global regions\n\nIn addition to passing coordinates, the argument **d** can be passed to set\nthe region to the entire globe. The range is 180W to 180E (-180, 180) and 90S\nto 90N (-90 to 90). With no parameters set for the projection, the figure\ndefaults to be centered at the mid-point of both x- and y-axes. Using\n**d**\\ , the figure is centered at (0, 0), or the intersection of the equator\nand prime meridian.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n region=\"d\",\n projection=\"Cyl_stere/12c\",\n land=\"darkgray\",\n water=\"white\",\n borders=\"1/0.5p\",\n shorelines=\"1/0.5p\",\n frame=\"ag\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The argument **g** can be passed, which encompasses the entire globe. The\nrange is 0E to 360E (0, 360) and 90S to 90N (-90 to 90). With no parameters\nset for the projection, the figure is centered at (180, 0), or the\nintersection of the equator and International Date Line.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n region=\"g\",\n projection=\"Cyl_stere/12c\",\n land=\"darkgray\",\n water=\"white\",\n borders=\"1/0.5p\",\n shorelines=\"1/0.5p\",\n frame=\"ag\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## ISO code\n\nThe ``region`` can be set to include a specific area specified by the\ntwo-character ISO 3166-1 alpha-2 convention\n(for further information: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n # Set the figure region to encompass Japan with the ISO code \"JP\"\n region=\"JP\",\n projection=\"M12c\",\n land=\"lightgray\",\n water=\"white\",\n borders=\"1/0.5p\",\n shorelines=\"1/0.5p\",\n frame=\"ag\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The area encompassed by the ISO code can be expanded by appending\n**+r**\\ *increment* to the ISO code. The *increment* unit is in degrees, and\nif only one value is added it expands the range of the region in all\ndirections. Using **+r** expands the final region boundaries to be multiples\nof *increment* .\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n # Expand the region boundaries to be multiples of 3 degrees in all\n # directions\n region=\"JP+r3\",\n projection=\"M12c\",\n land=\"lightgray\",\n water=\"white\",\n borders=\"1/0.5p\",\n shorelines=\"1/0.5p\",\n frame=\"ag\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Instead of expanding the range of the plot uniformly in all directions, two\nvalues can be passed to expand differently on each axis. The format is\n*xinc*/*yinc*.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n # Expand the region boundaries to be multiples of 3 degrees on the x-axis\n # and 5 degrees on the y-axis.\n region=\"JP+r3/5\",\n projection=\"M12c\",\n land=\"lightgray\",\n water=\"white\",\n borders=\"1/0.5p\",\n shorelines=\"1/0.5p\",\n frame=\"ag\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Instead of expanding the range of the plot uniformly in all directions, four\nvalues can be passed to expand differently in each direction.\nThe format is *winc*/*einc*/*sinc*/*ninc*, which expands on the west,\neast, south, and north axes.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n # Expand the region boundaries to be multiples of 3 degrees to the west, 5\n # degrees to the east, 7 degrees to the south, and 9 degrees to the north.\n region=\"JP+r3/5/7/9\",\n projection=\"M12c\",\n land=\"lightgray\",\n water=\"white\",\n borders=\"1/0.5p\",\n shorelines=\"1/0.5p\",\n frame=\"ag\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The ``region`` increment can be appended with **+R**, which adds the\nincrement without rounding.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n # Expand the region setting outside the range of Japan by 3 degrees in all\n # directions, without rounding to the nearest increment.\n region=\"JP+R3\",\n projection=\"M12c\",\n land=\"lightgray\",\n water=\"white\",\n borders=\"1/0.5p\",\n shorelines=\"1/0.5p\",\n frame=\"ag\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The ``region`` increment can be appended with **+e**, which is like **+r**\nand expands the final region boundaries to be multiples of *increment*.\nHowever, it ensures that the bounding box extends by at least 0.25 times the\nincrement.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.coast(\n # Expand the region boundaries to be multiples of 3 degrees in all\n # directions\n region=\"JP+e3\",\n projection=\"M12c\",\n land=\"lightgray\",\n water=\"white\",\n borders=\"1/0.5p\",\n shorelines=\"1/0.5p\",\n frame=\"ag\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/da5a3265d2384e5306b1175ba57cf6c6/02_contour_map.zip b/v0.14.0/_downloads/da5a3265d2384e5306b1175ba57cf6c6/02_contour_map.zip new file mode 100644 index 00000000000..6b9f3134ebb Binary files /dev/null and b/v0.14.0/_downloads/da5a3265d2384e5306b1175ba57cf6c6/02_contour_map.zip differ diff --git a/v0.14.0/_downloads/da9e50096234630ead4f2ba7c22d7fad/multi_parameter_symbols.py b/v0.14.0/_downloads/da9e50096234630ead4f2ba7c22d7fad/multi_parameter_symbols.py new file mode 100644 index 00000000000..6baa607f1c5 --- /dev/null +++ b/v0.14.0/_downloads/da9e50096234630ead4f2ba7c22d7fad/multi_parameter_symbols.py @@ -0,0 +1,96 @@ +""" +Multi-parameter symbols +======================= + +The :meth:`pygmt.Figure.plot` method can plot individual multi-parameter symbols by +passing the corresponding shortcuts (**e**, **j**, **r**, **R**, **w**) to the ``style`` +parameter: + +- **e**: ellipse +- **j**: rotated rectangle +- **r**: rectangle +- **R**: rounded rectangle +- **w**: pie wedge + +""" + +# %% +import pygmt + +# %% +# We can plot multi-parameter symbols using the same symbol style. We need to define +# locations (lon, lat) via the ``x`` and ``y`` parameters (scalar for a single symbol or +# 1-D list for several ones) and two or three symbol parameters after those shortcuts +# via the ``style`` parameter. +# +# The multi-parameter symbols in the ``style`` parameter are defined as: +# +# - **e**: ellipse, ``direction/major_axis/minor_axis`` +# - **j**: rotated rectangle, ``direction/width/height`` +# - **r**: rectangle, ``width/height`` +# - **R**: rounded rectangle, ``width/height/radius`` +# - **w**: pie wedge, ``diameter/startdir/stopdir``, the last two arguments are +# directions given in degrees counter-clockwise from horizontal. Append **+i** and the +# desired value to apply an inner diameter. +# +# Upper-case versions **E**, **J**, and **W** are similar to **e**, **j**, and **w** +# but expect geographic azimuths and distances. + +fig = pygmt.Figure() +fig.basemap(region=[0, 7, 0, 2], projection="x3c", frame=True) + +# Ellipse +fig.plot(x=0.5, y=1, style="e45/3/1", fill="orange", pen="2p,black") +# Rotated rectangle +fig.plot(x=1.5, y=1, style="j120/5/0.5", fill="red3", pen="2p,black") +# Rectangle +fig.plot(x=3, y=1, style="r4/1.5", fill="dodgerblue", pen="2p,black") +# Rounded rectangle +fig.plot(x=4.5, y=1, style="R1.25/4/0.5", fill="seagreen", pen="2p,black") +# Pie wedge +fig.plot(x=5.5, y=1, style="w2.5/45/330", fill="lightgray", pen="2p,black") +# Ring sector +fig.plot(x=6.5, y=1, style="w2.5/45/330+i1", fill="lightgray", pen="2p,black") + +fig.show() + +# %% +# We can also plot symbols with varying parameters via defining those values in a 2-D +# list or numpy array (``[[parameters]]`` for a single symbol or +# ``[[parameters_1],[parameters_2],[parameters_i]]`` for several ones) or using an +# appropriately formatted input file and passing it to ``data``. +# +# The symbol parameters in the 2-D list or numpy array are defined as: +# +# - **e**: ellipse, ``[[lon, lat, direction, major_axis, minor_axis]]`` +# - **j**: rotated rectangle, ``[[lon, lat, direction, width, height]]`` +# - **r**: rectangle, ``[[lon, lat, width, height]]`` +# - **R**: rounded rectangle, ``[[lon, lat, width, height, radius]]`` +# - **w**: pie wedge, ``[[lon, lat, diameter, startdir, stopdir]]``, the last two +# arguments are directions given in degrees counter-clockwise from horizontal + +fig = pygmt.Figure() +fig.basemap(region=[0, 7, 0, 4], projection="x3c", frame=["xa1f0.2", "ya0.5f0.1"]) + +# Ellipse +data = [[0.5, 1, 45, 3, 1], [0.5, 3, 135, 2, 1]] +fig.plot(data=data, style="e", fill="orange", pen="2p,black") +# Rotated rectangle +data = [[1.5, 1, 120, 5, 0.5], [1.5, 3, 50, 3, 0.5]] +fig.plot(data=data, style="j", fill="red3", pen="2p,black") +# Rectangle +data = [[3, 1, 4, 1.5], [3, 3, 3, 1.5]] +fig.plot(data=data, style="r", fill="dodgerblue", pen="2p,black") +# Rounded rectangle +data = [[4.5, 1, 1.25, 4, 0.5], [4.5, 3, 1.25, 2.0, 0.2]] +fig.plot(data=data, style="R", fill="seagreen", pen="2p,black") +# Pie wedge +data = [[5.5, 1, 2.5, 45, 330], [5.5, 3, 1.5, 60, 300]] +fig.plot(data=data, style="w", fill="lightgray", pen="2p,black") +# Ring sector +data = [[6.5, 1, 2.5, 45, 330], [6.5, 3, 1.5, 60, 300]] +fig.plot(data=data, style="w+i1", fill="lightgray", pen="2p,black") + +fig.show() + +# sphinx_gallery_thumbnail_number = 2 diff --git a/v0.14.0/_downloads/dac7a4a38853bb18bed56d9cf7db79e0/grdview_surface.zip b/v0.14.0/_downloads/dac7a4a38853bb18bed56d9cf7db79e0/grdview_surface.zip new file mode 100644 index 00000000000..e7016871a6d Binary files /dev/null and b/v0.14.0/_downloads/dac7a4a38853bb18bed56d9cf7db79e0/grdview_surface.zip differ diff --git a/v0.14.0/_downloads/dad6f71f3ea676a580e0baf5b3a6727e/cyl_cassini.ipynb b/v0.14.0/_downloads/dad6f71f3ea676a580e0baf5b3a6727e/cyl_cassini.ipynb new file mode 100644 index 00000000000..354ef9e28a7 --- /dev/null +++ b/v0.14.0/_downloads/dad6f71f3ea676a580e0baf5b3a6727e/cyl_cassini.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Cassini cylindrical projection\n\nThis cylindrical projection was developed in 1745 by C\u00e9sar-Fran\u00e7ois Cassini de\nThury for the survey of France. It is occasionally called Cassini-Soldner since\nthe latter provided the more accurate mathematical analysis that led to the\ndevelopment of the ellipsoidal formulae. The projection is neither conformal\nnor equal-area, and behaves as a compromise between the two end-members. The\ndistortion is zero along the central meridian. It is best suited for mapping\nregions of north-south extent. The central meridian, each meridian 90\u00b0 away,\nand equator are straight lines; all other meridians and parallels are complex\ncurves.\n\n**c**\\ *lon0/lat0*\\ */scale* or **C**\\ *lon0/lat0*\\ */width*\n\nThe projection is set with **c** or **C**. The projection center is set by\n*lon0/lat0*, and the figure size is set with *scale* or *width*.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n# Use the ISO code for Madagascar (MG) and pad it by 2 degrees (+R2)\nfig.coast(\n region=\"MG+R2\",\n projection=\"C47/-19/12c\",\n frame=\"afg\",\n land=\"gray80\",\n water=\"steelblue\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/dbb2ee519dd2c61d76bc79a8c8965c8e/misc_eckertVI.py b/v0.14.0/_downloads/dbb2ee519dd2c61d76bc79a8c8965c8e/misc_eckertVI.py new file mode 100644 index 00000000000..a4c4f0f4291 --- /dev/null +++ b/v0.14.0/_downloads/dbb2ee519dd2c61d76bc79a8c8965c8e/misc_eckertVI.py @@ -0,0 +1,23 @@ +r""" +Eckert VI equal-area projection +=============================== + +The Eckert VI projections, presented by the German cartographer Max +Eckert-Greiffendorff in 1906, is a pseudo-cylindrical equal-area projection. +Central meridian and all parallels are straight lines; other meridians are +equally spaced sinusoids. The scale is true along latitude 49°16'. + + +**ks**\ [*lon0/*]\ *scale* or **Ks**\ [*lon0/*]\ *width* + +The projection is set with **ks** or **Ks**. The central meridian is set with +the optional *lon0*, and the figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Use region "d" to specify global region (-180/180/-90/90) +fig.coast(region="d", projection="Ks12c", frame="afg", land="ivory", water="bisque4") +fig.show() diff --git a/v0.14.0/_downloads/dc16489ce7ea59db2d2255ab2b8a93ad/date_time_charts.ipynb b/v0.14.0/_downloads/dc16489ce7ea59db2d2255ab2b8a93ad/date_time_charts.ipynb new file mode 100644 index 00000000000..45657b26586 --- /dev/null +++ b/v0.14.0/_downloads/dc16489ce7ea59db2d2255ab2b8a93ad/date_time_charts.ipynb @@ -0,0 +1,230 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Plotting datetime charts\n\nPyGMT accepts a variety of datetime objects to plot data and create charts. Aside from\nthe built-in Python ``datetime`` module, PyGMT supports inputs containing ISO formatted\nstrings as well as objects generated with ``numpy``, ``pandas``, and ``xarray``. These\ndata types can be used to plot specific points as well as get passed into the ``region``\nparameter to create a range of the data on an axis.\n\nThe following examples will demonstrate how to create plots using these different\ndatetime objects.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import datetime\n\nimport numpy as np\nimport pandas as pd\nimport pygmt\nimport xarray as xr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Using Python's ``datetime``\n\nIn this example, Python's built-in ``datetime`` module is used to create data points\nstored in the list ``x``. Additionally, dates are passed into the ``region`` parameter\nin the format ``[x_start, x_end, y_start, y_end]``, where the date range is plotted on\nthe x-axis. An additional notable parameter is ``style``, where it's specified that\ndata points are plotted as circles with a diameter of 0.3 centimeters.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "x = [\n datetime.date(2010, 6, 1),\n datetime.date(2011, 6, 1),\n datetime.date(2012, 6, 1),\n datetime.date(2013, 6, 1),\n]\ny = [1, 2, 3, 5]\n\nfig = pygmt.Figure()\nfig.plot(\n projection=\"X10c/5c\",\n region=[datetime.date(2010, 1, 1), datetime.date(2014, 12, 1), 0, 6],\n frame=[\"WSen\", \"afg\"],\n x=x,\n y=y,\n style=\"c0.3c\",\n pen=\"1p\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In addition to specifying the date, ``datetime`` supports the time at which the data\npoints were recorded. Using :meth:`datetime.datetime` the ``region`` parameter as well\nas data points can be created with both date and time information.\n\nSome notable differences to the previous example include:\n\n- Modifying ``frame`` to only include West (left) and South (bottom) borders, and\n removing grid lines\n- Using circles to plot data points defined by ``c`` in the argument passed through\n the ``style`` parameter\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "x = [\n datetime.datetime(2021, 1, 1, 3, 45, 1),\n datetime.datetime(2021, 1, 1, 6, 15, 1),\n datetime.datetime(2021, 1, 1, 13, 30, 1),\n datetime.datetime(2021, 1, 1, 20, 30, 1),\n]\ny = [5, 3, 1, 2]\n\nfig = pygmt.Figure()\nfig.plot(\n projection=\"X10c/5c\",\n region=[\n datetime.datetime(2021, 1, 1, 0, 0, 0),\n datetime.datetime(2021, 1, 2, 0, 0, 0),\n 0,\n 6,\n ],\n frame=[\"WS\", \"af\"],\n x=x,\n y=y,\n style=\"c0.4c\",\n pen=\"1p\",\n fill=\"blue\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Using ISO Format\n\nIn addition to Python's ``datetime`` module, PyGMT also supports passing dates in ISO\nformat. Basic ISO strings are formatted as ``YYYY-MM-DD`` with each ``-`` delineated\nsection marking the four-digit year value, two-digit month value, and two-digit day\nvalue, respectively.\n\nFor including the time into an ISO string, the ``T`` character is used, as it can be\nseen in the following example. This character is immediately followed by a string\nformatted as ``hh:mm:ss`` where each ``:`` delineated section marking the two-digit\nhour value, two-digit minute value, and two-digit second value, respectively. The\nfigure in the following example is plotted over a horizontal range of one year from\n2016-01-01 to 2017-01-01.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "x = [\"2016-02-01\", \"2016-06-04T14\", \"2016-10-04T00:00:15\", \"2016-12-01T05:00:15\"]\ny = [1, 3, 5, 2]\n\nfig = pygmt.Figure()\nfig.plot(\n projection=\"X10c/5c\",\n region=[\"2016-01-01\", \"2017-01-01\", 0, 6],\n frame=[\"WSen\", \"afg\"],\n x=x,\n y=y,\n style=\"a0.45c\",\n pen=\"1p\",\n fill=\"dodgerblue\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Note

PyGMT doesn't recognize non-ISO datetime strings like \"Jun 05, 2018\". If your data\n contain non-ISO datetime strings, you can convert them to a recognized format\n using :func:`pandas.to_datetime` and then pass it to PyGMT.

\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Mixing and matching Python ``datetime`` and ISO dates\n\nThe following example provides context on how both ``datetime`` and ISO date data can\nbe plotted using PyGMT. This can be helpful when dates and times are coming from\ndifferent sources, meaning conversions do not need to take place between ISO and\ndatetime in order to create valid plots.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "x = [\"2020-02-01\", \"2020-06-04\", \"2020-10-04\", datetime.datetime(2021, 1, 15)]\ny = [1.3, 2.2, 4.1, 3]\n\nfig = pygmt.Figure()\nfig.plot(\n projection=\"X10c/5c\",\n region=[datetime.datetime(2020, 1, 1), datetime.datetime(2021, 3, 1), 0, 6],\n frame=[\"WSen\", \"afg\"],\n x=x,\n y=y,\n style=\"i0.4c\",\n pen=\"1p\",\n fill=\"yellow\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Using :meth:`pandas.date_range`\n\nIn the following example, :func:`pandas.date_range` produces a list of\n:class:`pandas.DatetimeIndex` objects, which is used to pass date data to the PyGMT\nfigure. Specifically ``x`` contains 7 different :class:`pandas.DatetimeIndex` objects,\nwith the number being manipulated by the ``periods`` parameter. Each period begins at\nthe start of a business quarter as denoted by BQS when passed to the ``freq``\nparameter. The initial date is the first argument that is passed to\n:func:`pandas.date_range` and it marks the first data point in the list ``x`` that\nwill be plotted.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "x = pd.date_range(\"2018-03-01\", periods=7, freq=\"BQS\")\ny = [4, 5, 6, 8, 6, 3, 5]\n\nfig = pygmt.Figure()\nfig.plot(\n projection=\"X10c/10c\",\n region=[datetime.datetime(2017, 12, 31), datetime.datetime(2019, 12, 31), 0, 10],\n frame=[\"WSen\", \"ag\"],\n x=x,\n y=y,\n style=\"i0.4c\",\n pen=\"1p\",\n fill=\"purple\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Using :class:`xarray.DataArray`\n\nIn this example, instead of using a list of :class:`pandas.DatetimeIndex` objects,\n``x`` is initialized as an :class:`xarray.DataArray` object. This object provides a\nwrapper around numpy ndarrays. It also allows the data to have labeled dimensions\nwhile supporting operations that use various pieces of metadata. The following code\nuses :func:`pandas.date_range` to fill the DataArray with data, but this is not\nessential for the creation of a valid DataArray.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "x = xr.DataArray(data=pd.date_range(start=\"2020-01-01\", periods=4, freq=\"QE\"))\ny = [4, 7, 5, 6]\n\nfig = pygmt.Figure()\nfig.plot(\n projection=\"X10c/10c\",\n region=[datetime.datetime(2020, 1, 1), datetime.datetime(2021, 4, 1), 0, 10],\n frame=[\"WSen\", \"ag\"],\n x=x,\n y=y,\n style=\"n0.4c\",\n pen=\"1p\",\n fill=\"red\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Using :class:`numpy.datetime64`\n\nIn this example, instead of using :func:`pd.date_range`, ``x`` is initialized as an\n``np.array`` object. Similar to :class:`xarray.DataArray` this wraps the dataset\nbefore passing it as an argument. However, ``np.array`` objects use less memory and\nallow developers to specify data types.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "x = np.array(\n [\"2010-06-01\", \"2011-06-01T12\", \"2012-01-01T12:34:56\"], dtype=np.datetime64\n)\ny = [2, 7, 5]\n\nfig = pygmt.Figure()\nfig.plot(\n projection=\"X10c/10c\",\n region=[datetime.datetime(2010, 1, 1), datetime.datetime(2012, 6, 1), 0, 10],\n frame=[\"WS\", \"ag\"],\n x=x,\n y=y,\n style=\"s0.5c\",\n pen=\"1p\",\n fill=\"blue\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Generating an automatic region\n\nAnother way of creating charts involving datetime data can be done by automatically\ngenerating the region of the plot. This can be done by passing the DataFrame to\n:func:`pygmt.info`, which will find the maximum and minimum values for each column and\ncreate a list that could be passed as region. Additionally, the ``spacing`` parameter\ncan be used to increase the range past the maximum and minimum data points.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "data = [\n [\"20200712\", 1000],\n [\"20200714\", 1235],\n [\"20200716\", 1336],\n [\"20200719\", 1176],\n [\"20200721\", 1573],\n [\"20200724\", 1893],\n [\"20200729\", 1634],\n]\ndf = pd.DataFrame(data, columns=[\"Date\", \"Score\"])\ndf.Date = pd.to_datetime(df[\"Date\"], format=\"%Y%m%d\")\nregion = pygmt.info(\n data=df[[\"Date\", \"Score\"]], per_column=True, spacing=(700, 700), coltypes=\"T\"\n)\n\nfig = pygmt.Figure()\nfig.plot(\n region=region,\n projection=\"X15c/10c\",\n frame=[\"WSen\", \"afg\"],\n x=df.Date,\n y=df.Score,\n style=\"c0.4c\",\n pen=\"1p\",\n fill=\"green3\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Setting Primary and Secondary Time Axes\n\nThis example focuses on annotating the axes and setting the interval in which the\nannotations should appear. All of these modifications are passed to the ``frame``\nparameter and each item in that list modifies a specific aspect of the frame.\n\nAdding ``\"WS\"`` means that only the Western/Left (**W**) and Southern/Bottom (**S**)\nborders of the plot are annotated. For more information on this, please refer to the\n:doc:`Frames, ticks, titles, and labels tutorial `.\n\nAnother important item in the list passed to ``frame`` is ``\"sxa1Of1D\"``. This string\nmodifies the secondary annotation (**s**) of the x-axis (**x**). Specifically, it sets\nthe main annotation and major tick spacing interval to one month (**a1O**) (capital\nletter O, not zero). Additionally, it sets the minor tick spacing interval to 1 day\n(**f1D**). To use the month name instead of its number set :gmt-term:`FORMAT_DATE_MAP`\nto **o**. More information on configuring date formats can be found at\n:gmt-term:`FORMAT_DATE_MAP`, :gmt-term:`FORMAT_DATE_IN`, and\n:gmt-term:`FORMAT_DATE_OUT`.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "x = pd.date_range(\"2013-05-02\", periods=10, freq=\"2D\")\ny = [4, 5, 6, 8, 9, 5, 8, 9, 4, 2]\n\nfig = pygmt.Figure()\nwith pygmt.config(FORMAT_DATE_MAP=\"o\"):\n fig.plot(\n projection=\"X15c/10c\",\n region=[datetime.datetime(2013, 5, 1), datetime.datetime(2013, 5, 25), 0, 10],\n frame=[\"WS\", \"sxa1Of1D\", \"pxa5d\", \"sy+lLength\", \"pya1+ucm\"],\n x=x,\n y=y,\n style=\"c0.4c\",\n pen=\"1p\",\n fill=\"green3\",\n )\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The same concept shown above can be applied to smaller as well as larger intervals. In\nthis example, data are plotted for different times throughout two days. The primary\nx-axis annotations are modified to repeat every 6 hours, and the secondary x-axis\nannotations repeat every day and show the day of the week.\n\nAnother notable mention in this example is setting :gmt-term:`FORMAT_CLOCK_MAP` to\n**-hhAM** which specifies the format used for time. In this case, leading zeros are\nremoved using (**-**), and only hours are displayed. Additionally, an AM/PM system is\nused instead of a 24-hour system. More information on configuring time formats can be\nfound at :gmt-term:`FORMAT_CLOCK_MAP`, :gmt-term:`FORMAT_CLOCK_IN`, and\n:gmt-term:`FORMAT_CLOCK_OUT`.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "x = pd.date_range(\"2021-04-15\", periods=8, freq=\"6h\")\ny = [2, 5, 3, 1, 5, 7, 9, 6]\n\nfig = pygmt.Figure()\nwith pygmt.config(FORMAT_CLOCK_MAP=\"-hhAM\"):\n fig.plot(\n projection=\"X15c/10c\",\n region=[\n datetime.datetime(2021, 4, 14, 23, 0, 0),\n datetime.datetime(2021, 4, 17),\n 0,\n 10,\n ],\n frame=[\"WS\", \"sxa1K\", \"pxa6H\", \"sy+lSpeed\", \"pya1+ukm/h\"],\n x=x,\n y=y,\n style=\"n0.4c\",\n pen=\"1p\",\n fill=\"lightseagreen\",\n )\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/dc9e057426099cc28de6448aae3660a3/track_sampling.py b/v0.14.0/_downloads/dc9e057426099cc28de6448aae3660a3/track_sampling.py new file mode 100644 index 00000000000..c7cb87fdabb --- /dev/null +++ b/v0.14.0/_downloads/dc9e057426099cc28de6448aae3660a3/track_sampling.py @@ -0,0 +1,43 @@ +""" +Sampling along tracks +===================== + +The :func:`pygmt.grdtrack` function samples a raster grid's value along +specified points. We will need to input a 2-D raster to ``grid`` which can be +an :class:`xarray.DataArray`. The argument passed to the ``points`` parameter +can be a :class:`pandas.DataFrame` table where the first two columns are +x and y (or longitude and latitude). Note also that there is a ``newcolname`` +parameter that will be used to name the new column of values sampled from the +grid. + +Alternatively, a netCDF file path can be passed to ``grid``. An ASCII file path +can also be accepted for ``points``. To save an output ASCII file, a file name +argument needs to be passed to the ``outfile`` parameter. +""" + +# %% +import pygmt + +# Load sample grid and point datasets +grid = pygmt.datasets.load_earth_relief() +points = pygmt.datasets.load_sample_data(name="ocean_ridge_points") +# Sample the bathymetry along the world's ocean ridges at specified track +# points +track = pygmt.grdtrack(points=points, grid=grid, newcolname="bathymetry") + +fig = pygmt.Figure() +# Plot the earth relief grid on Cylindrical Stereographic projection, masking +# land areas +fig.basemap(region="g", projection="Cyl_stere/150/-20/15c", frame=True) +fig.grdimage(grid=grid, cmap="gray") +fig.coast(land="#666666") +# Plot the sampled bathymetry points using circles (c) of 0.15 cm size +# Points are colored using elevation values (normalized for visual purposes) +fig.plot( + x=track.longitude, + y=track.latitude, + style="c0.15c", + cmap="terra", + fill=(track.bathymetry - track.bathymetry.mean()) / track.bathymetry.std(), +) +fig.show() diff --git a/v0.14.0/_downloads/dce901a6aace2e54dbe085f9ed66c0a3/meca.ipynb b/v0.14.0/_downloads/dce901a6aace2e54dbe085f9ed66c0a3/meca.ipynb new file mode 100644 index 00000000000..0832acbf946 --- /dev/null +++ b/v0.14.0/_downloads/dce901a6aace2e54dbe085f9ed66c0a3/meca.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Focal mechanisms\n\nThe :meth:`pygmt.Figure.meca` method can plot focal mechanisms or beachballs.\nWe can specify the focal mechanism nodal planes or moment tensor components\nas a dictionary using the ``spec`` parameter (or they can be specified as a\n1-D or 2-D array, or within a file). The size of the beachballs can be set\nusing the ``scale`` parameter. The compressive and extensive quadrants can\nbe filled either with a color or a pattern via the ``compressionfill`` and\n``extensionfill`` parameters, respectively. Use the ``pen`` parameter to\nadjust the outline of the beachballs.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n\n# Generate a map near Washington State showing land, water, and shorelines\nfig.coast(\n region=[-125, -122, 47, 49],\n projection=\"M6c\",\n land=\"grey\",\n water=\"lightblue\",\n shorelines=True,\n frame=\"a\",\n)\n\n# Store focal mechanism parameters in a dictionary based on the Aki & Richards\n# convention\nfocal_mechanism = {\"strike\": 330, \"dip\": 30, \"rake\": 90, \"magnitude\": 3}\n\n# Pass the focal mechanism data through the spec parameter. In addition provide\n# scale, event location, and event depth\nfig.meca(\n spec=focal_mechanism,\n scale=\"1c\", # in centimeters\n longitude=-124.3,\n latitude=48.1,\n depth=12.0,\n # Fill compressive quadrants with color \"red\"\n # [Default is \"black\"]\n compressionfill=\"red\",\n # Fill extensive quadrants with color \"cornsilk\"\n # [Default is \"white\"]\n extensionfill=\"cornsilk\",\n # Draw a 0.5 points thick dark gray (\"gray30\") solid outline via\n # the pen parameter [Default is \"0.25p,black,solid\"]\n pen=\"0.5p,gray30,solid\",\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/dd5ea3e0c6b2a1a62fb2ddc0ea0ab7a5/azim_gnomonic.py b/v0.14.0/_downloads/dd5ea3e0c6b2a1a62fb2ddc0ea0ab7a5/azim_gnomonic.py new file mode 100644 index 00000000000..e89c106240d --- /dev/null +++ b/v0.14.0/_downloads/dd5ea3e0c6b2a1a62fb2ddc0ea0ab7a5/azim_gnomonic.py @@ -0,0 +1,33 @@ +r""" +Gnomonic projection +=================== + +The point of perspective of the gnomonic projection lies at the center of the +Earth. As a consequence great circles (orthodromes) on the surface of the Earth +are displayed as straight lines, which makes it suitable for distance +estimation for navigational purposes. It is neither conformal nor equal-area +and the distortion increases greatly with distance to the projection center. It +follows that the scope of application is restricted to a small area around the +projection center (at a maximum of 60°). + +**f**\ *lon0/lat0*\ [*/horizon*\ ]\ */scale* +or **F**\ *lon0/lat0*\ [*/horizon*\ ]\ */width* + +**f** or **F** specifies the projection type, *lon0/lat0* specifies the +projection center, the optional parameter *horizon* specifies the maximum +distance from projection center (in degrees, < 90, default 60), and *scale* or +*width* sets the size of the figure. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.coast( + region="g", + projection="F-90/15/12c", + frame="afg", + land="khaki", + water="white", +) +fig.show() diff --git a/v0.14.0/_downloads/dd82764576886feebe00e3c3714c00cb/non_ascii_text.py b/v0.14.0/_downloads/dd82764576886feebe00e3c3714c00cb/non_ascii_text.py new file mode 100644 index 00000000000..fb88c50e46f --- /dev/null +++ b/v0.14.0/_downloads/dd82764576886feebe00e3c3714c00cb/non_ascii_text.py @@ -0,0 +1,77 @@ +# ruff: noqa: RUF001,RUF003 +""" +Typesetting non-ASCII text +-------------------------- + +In addition to ASCII printable characters, sometimes you may also want to typeset +non-ASCII characters on the plot, such as Greek letters, mathematical symbols, or +special characters. + +Due to the limitations of the underlying PostScript language, PyGMT doesn't support +all characters in the Unicode standard. Instead, PyGMT supports a limited set of +characters in the "Adobe Symbol", "Adobe ZapfDingbats", "Adobe ISOLatin1+", and +"ISO-8859-*x*" (*x* can be 1-11, 13-16) encodings. Refer to :doc:`/techref/encodings` +for the complete list of supported characters. + +In PyGMT, the supported (ASCII and non-ASCII) characters can be directly used in the +``text`` parameter of the :meth:`pygmt.Figure.text` method for typesetting text strings. +They can also be used in the arguments of other plotting functions (e.g., in the +``frame`` parameter to set the labels or title). + +In this example, we demonstrate how to typeset non-ASCII characters in PyGMT. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.basemap( + region=[0, 5, 0, 6], + projection="X14c/7c", + frame=["xaf+lDistance (°)", "yaf+lValue (‰)", "WSen+tTitle: α² ± β²"], +) + +fig.text( + x=[0.2] * 5, + y=[5, 4, 3, 2, 1], + text=["ASCII:", "ISOLatin1+:", "Symbol:", "ZapfDingbats:", "Mixed:"], + font="20p,Helvetica-Bold,red", + justify="LM", +) +fig.text( + x=[2] * 5, + y=[5, 4, 3, 2, 1], + text=[ + "ABCDE12345!#$:;<=>?", # ASCII only + "±°ÀÁÂÃÄÅÈÌÒÙàèìòù", # Non-ASCII characters from Adobe ISOLatin1+ + "αβγδεζηθ⊗⊕∅⊃⊇⊄⊂⊆", # Non-ASCII characters from Adobe Symbol + "✈♥♦♣♠❛❜❝❞❨❩❪❫❬❭❮❯→↔", # Non-ASCII characters from Adobe ZapfDingbats + "ABCD αβγδ ①②③ ➊➋➌", # Mix characters from ISOLatin1+, Symbol and ZapfDingbats + ], + font="18p,Helvetica", + justify="LM", +) + +fig.show() + +# %% +# Here are some important tips when using non-ASCII characters: +# +# - **Similar-looking characters**: Be cautious when using characters that appear +# visually similar but are distinct. For example, ``Ω`` (OHM SIGN) and ``Ω`` (GREEK +# CAPITAL LETTER OMEGA) may look alike, but PyGMT only supports the latter. Using the +# incorrect character can lead to unexpected results. To avoid this, it's recommended +# to copy and paste characters from the :doc:`/techref/encodings` documentation. +# - **Mix characters from different encodings**: As shown in the example above, you can +# mix characters from different encodings in the same text string. However, due to the +# limitations of the underlying PostScript language, you cannot mix characters from +# the "Adobe ISOLatin1+" and "ISO-8859-*x*" encodings in the same text string. For +# example, you cannot mix characters from "Adobe ISOLatin1+" and "ISO-8859-2". If +# you need to use characters from different encodings, you can use them in different +# PyGMT function/method calls. +# - **Non-ASCII characters in text files**: Non-ASCII characters are not supported if +# you have them in a text file and pass it to :meth:`pygmt.Figure.text`. In this case, +# you may want to load the text file into :class:`pandas.DataFrame` and then pass it +# to the ``text`` parameter. + +# sphinx_gallery_thumbnail_number = 1 diff --git a/v0.14.0/_downloads/ddc2f3b6f82bf166b08777c61c342c8d/lines.ipynb b/v0.14.0/_downloads/ddc2f3b6f82bf166b08777c61c342c8d/lines.ipynb new file mode 100644 index 00000000000..41c91ae5d1f --- /dev/null +++ b/v0.14.0/_downloads/ddc2f3b6f82bf166b08777c61c342c8d/lines.ipynb @@ -0,0 +1,169 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Plotting lines\n\nPlotting lines is handled by the :meth:`pygmt.Figure.plot` method.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plot lines\n\nCreate a Cartesian figure using the :meth:`pygmt.Figure.basemap` method. Pass lists\ncontaining two values to the ``x`` and ``y`` parameters of the\n:meth:`pygmt.Figure.plot` method. By default, a 0.25-points thick, black, solid\nline is drawn between these two data points.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 10], projection=\"X15c/10c\", frame=True)\n\nfig.plot(x=[1, 5], y=[5, 9])\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Additional line segments can be added by including more data points in the lists\npassed to ``x`` and ``y``.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 10], projection=\"X15c/10c\", frame=True)\n\nfig.plot(x=[1, 5, 8], y=[5, 9, 4])\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To plot multiple lines, :meth:`pygmt.Figure.plot` needs to be used for each line\nseparately.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 10], projection=\"X15c/10c\", frame=True)\n\nfig.plot(x=[1, 5, 8], y=[5, 9, 4])\nfig.plot(x=[2, 4, 9], y=[3, 7, 5])\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Change line attributes\n\nThe line attributes can be set by the ``pen`` parameter which takes a string\nargument with the optional values *width*,\\ *color*,\\ *style*.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 10], projection=\"X15c/10c\", frame=True)\n\n# Set the pen width to \"5p\" (5 points), and use the default color \"black\" and the\n# default style \"solid\"\nfig.plot(x=[1, 8], y=[3, 9], pen=\"5p\")\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The line color can be set and is added after the line width to the ``pen``\nparameter.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 10], projection=\"X15c/10c\", frame=True)\n\n# Set the line color to \"red\", use the default style \"solid\"\nfig.plot(x=[1, 8], y=[3, 9], pen=\"5p,red\")\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The line style can be set and is added after the line width or color to the\n``pen`` parameter.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 10], projection=\"X15c/10c\", frame=True)\n\n# Set the line style to \"..-\" (dot dot dash), use the default color \"black\"\nfig.plot(x=[1, 8], y=[3, 9], pen=\"5p,..-\")\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The line width, color, and style can all be set in the same ``pen`` parameter.\nFor a gallery example showing other ``pen`` settings, see\n:doc:`/gallery/lines/linestyles`.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 10], projection=\"X15c/10c\", frame=True)\n\n# Draw a 7-points thick, green line with style \"-.-\" (dash dot dash)\nfig.plot(x=[1, 8], y=[3, 9], pen=\"7p,green,-.-\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/de503e52d484746bfd1110324b6343fe/quoted_lines.zip b/v0.14.0/_downloads/de503e52d484746bfd1110324b6343fe/quoted_lines.zip new file mode 100644 index 00000000000..a9b9e73f64f Binary files /dev/null and b/v0.14.0/_downloads/de503e52d484746bfd1110324b6343fe/quoted_lines.zip differ diff --git a/v0.14.0/_downloads/df0180e14304bba21a26cf3bb975dd28/velo_arrow_ellipse.py b/v0.14.0/_downloads/df0180e14304bba21a26cf3bb975dd28/velo_arrow_ellipse.py new file mode 100644 index 00000000000..e6e7030ea2b --- /dev/null +++ b/v0.14.0/_downloads/df0180e14304bba21a26cf3bb975dd28/velo_arrow_ellipse.py @@ -0,0 +1,42 @@ +""" +Velocity arrows and confidence ellipses +======================================= + +The :meth:`pygmt.Figure.velo` method can be used to plot mean velocity arrows and +confidence ellipses. The example below plots red velocity arrows with lightblue +confidence ellipses outlined in red with the east_velocity x north_velocity used for +the station names. Note that the velocity arrows are scaled by 0.2 and the 39% +confidence limit will give an ellipse which fits inside a rectangle of dimension +east_sigma by north_sigma. +""" + +# %% +import pandas as pd +import pygmt + +fig = pygmt.Figure() +df = pd.DataFrame( + data={ + "x": [0, -8, 0, -5, 5, 0], + "y": [-8, 5, 0, -5, 0, -5], + "east_velocity": [0, 3, 4, 6, -6, 6], + "north_velocity": [0, 3, 6, 4, 4, -4], + "east_sigma": [4, 0, 4, 6, 6, 6], + "north_sigma": [6, 0, 6, 4, 4, 4], + "correlation_EN": [0.5, 0.5, 0.5, 0.5, -0.5, -0.5], + "SITE": ["0x0", "3x3", "4x6", "6x4", "-6x4", "6x-4"], + } +) +fig.velo( + data=df, + region=[-10, 8, -10, 6], + projection="x0.8c", + frame=["WSne", "2g2f"], + spec="e0.2/0.39+f18", + uncertaintyfill="lightblue1", + pen="0.6p,red", + line=True, + vector="0.3c+p1p+e+gred", +) + +fig.show() diff --git a/v0.14.0/_downloads/e0362f71073357cf26373171f1c54b10/country_polygons.zip b/v0.14.0/_downloads/e0362f71073357cf26373171f1c54b10/country_polygons.zip new file mode 100644 index 00000000000..6ccb430241f Binary files /dev/null and b/v0.14.0/_downloads/e0362f71073357cf26373171f1c54b10/country_polygons.zip differ diff --git a/v0.14.0/_downloads/e0a3db070b77d751d3187b078650e42e/contour_map.py b/v0.14.0/_downloads/e0a3db070b77d751d3187b078650e42e/contour_map.py new file mode 100644 index 00000000000..7e6e6361c62 --- /dev/null +++ b/v0.14.0/_downloads/e0a3db070b77d751d3187b078650e42e/contour_map.py @@ -0,0 +1,92 @@ +""" +Creating a map with contour lines +================================= + +Plotting a contour map is handled by :meth:`pygmt.Figure.grdcontour`. +""" + +# %% +import pygmt + +# Load sample earth relief data +grid = pygmt.datasets.load_earth_relief(resolution="05m", region=[-92.5, -82.5, -3, 7]) + + +# %% +# Create contour plot +# ------------------- +# +# The :meth:`pygmt.Figure.grdcontour` method takes the grid input. It plots annotated +# contour lines, which are thicker and have the elevation/depth written on them, and +# unannotated contour lines. In the example below, the default contour line intervals +# are 500 meters, with an annotated contour line every 1,000 meters. By default, it +# plots the map with the equidistant cylindrical projection and with no frame. + +fig = pygmt.Figure() +fig.grdcontour(grid=grid) +fig.show() + + +# %% +# Contour line settings +# --------------------- +# +# Use the ``annotation`` and ``levels`` parameters to adjust contour line intervals. In +# the example below, there are contour intervals every 250 meters and annotated contour +# lines every 1,000 meters. + +fig = pygmt.Figure() +fig.grdcontour(grid=grid, annotation=1000, levels=250) +fig.show() + + +# %% +# Contour limits +# -------------- +# +# The ``limit`` parameter sets the minimum and maximum values for the contour lines. The +# parameter takes the low and high values, and is either a list (as below) or a string +# ``limit="-4000/-2000"``. + +fig = pygmt.Figure() +fig.grdcontour(grid=grid, annotation=1000, levels=250, limit=[-4000, -2000]) +fig.show() + + +# %% +# Map settings +# ------------ +# +# The :meth:`pygmt.Figure.grdcontour` method accepts additional parameters, including +# setting the projection and frame. + +fig = pygmt.Figure() +fig.grdcontour( + grid=grid, + annotation=1000, + levels=250, + limit=[-4000, -2000], + projection="M10c", + frame=True, +) +fig.show() + + +# %% +# Adding a colormap +# ----------------- +# +# The :meth:`pygmt.Figure.grdimage` method can be used to add a colormap to the contour +# map. It must be called prior to :meth:`pygmt.Figure.grdcontour` to keep the contour +# lines visible on the final map. If the ``projection`` parameter is specified in the +# :meth:`pygmt.Figure.grdimage` method, it does not need to be repeated in the +# :meth:`pygmt.Figure.grdcontour` method. Finally, a colorbar is added using the +# :meth:`pygmt.Figure.colorbar` method. + +fig = pygmt.Figure() +fig.grdimage(grid=grid, cmap="haxby", projection="M10c", frame=True) +fig.grdcontour(grid=grid, annotation=1000, levels=250, limit=[-4000, -2000]) +fig.colorbar(frame=["x+lelevation", "y+lm"]) +fig.show() + +# sphinx_gallery_thumbnail_number = 5 diff --git a/v0.14.0/_downloads/e18f82174becc647118483d1060d0f4f/cyl_cassini.zip b/v0.14.0/_downloads/e18f82174becc647118483d1060d0f4f/cyl_cassini.zip new file mode 100644 index 00000000000..55df36202ae Binary files /dev/null and b/v0.14.0/_downloads/e18f82174becc647118483d1060d0f4f/cyl_cassini.zip differ diff --git a/v0.14.0/_downloads/e2f629e3d978b1df6b6bb6f677463e3f/vectors.ipynb b/v0.14.0/_downloads/e2f629e3d978b1df6b6bb6f677463e3f/vectors.ipynb new file mode 100644 index 00000000000..be942a523de --- /dev/null +++ b/v0.14.0/_downloads/e2f629e3d978b1df6b6bb6f677463e3f/vectors.ipynb @@ -0,0 +1,277 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Plotting vectors\n\nPlotting vectors is handled by :meth:`pygmt.Figure.plot`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plot Cartesian Vectors\n\nCreate a simple Cartesian vector using a start point through\n``x``, ``y``, and ``direction`` parameters.\nOn the shown figure, the plot is projected on a 10cm X 10cm region,\nwhich is specified by the ``projection`` parameter.\nThe direction is specified\nby a list of two 1-D arrays structured as ``[[angle_in_degrees], [length]]``.\nThe angle is measured in degrees and moves counter-clockwise from the\nhorizontal.\nThe length of the vector uses centimeters by default but\ncould be changed using :class:`pygmt.config`\n(Check the next examples for unit changes).\n\nNotice that the ``v`` in the ``style`` parameter stands for\nvector; it distinguishes it from regular lines and allows for\ndifferent customization. ``0c`` is used to specify the size\nof the arrow head which explains why there is no arrow on either\nside of the vector.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.plot(\n region=[0, 10, 0, 10],\n projection=\"X10c/10c\",\n frame=\"ag\",\n x=2,\n y=8,\n style=\"v0c\",\n direction=[[-45], [6]],\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In this example, we apply the same concept shown previously to plot multiple\nvectors. Notice that instead of passing int/float to ``x`` and ``y``, a list\nof all x and y coordinates will be passed. Similarly, the length of direction\nlist will increase accordingly.\n\nAdditionally, we change the style of the vector to include a red\narrow head at the end (**+e**) of the vector and increase the\nthickness (``pen=\"2p\"``) of the vector stem. A list of different\nstyling attributes can be found in\n:doc:`Vector heads and tails `.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.plot(\n region=[0, 10, 0, 10],\n projection=\"X10c/10c\",\n frame=\"ag\",\n x=[2, 4],\n y=[8, 1],\n style=\"v0.6c+e\",\n direction=[[-45, 23], [6, 3]],\n pen=\"2p\",\n fill=\"red3\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The default unit of vector length is centimeters,\nhowever, this can be changed to inches or points. Note that, in PyGMT,\none point is defined as 1/72 inch.\n\nIn this example, the graphed region is 5in X 5in, but\nthe length of the first vector is still graphed in centimeters.\nUsing ``pygmt.config(PROJ_LENGTH_UNIT=\"i\")``, the default unit\ncan be changed to inches in the second plotted vector.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n# Vector 1 with default unit as cm\nfig.plot(\n region=[0, 10, 0, 10],\n projection=\"X5i/5i\",\n frame=\"ag\",\n x=2,\n y=8,\n style=\"v1c+e\",\n direction=[[0], [3]],\n pen=\"2p\",\n fill=\"red3\",\n)\n# Vector 2 after changing default unit to inches\nwith pygmt.config(PROJ_LENGTH_UNIT=\"i\"):\n fig.plot(\n x=2,\n y=7,\n direction=[[0], [3]],\n style=\"v1c+e\",\n pen=\"2p\",\n fill=\"red3\",\n )\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Vectors can also be plotted by including all the information\nabout a vector in a single list. However, this requires creating\na 2-D list or numpy array containing all vectors.\nEach vector list contains the information structured as:\n``[x_start, y_start, direction_degrees, length]``.\n\nIf this approach is chosen, the ``data`` parameter must be\nused instead of ``x``, ``y``, and ``direction``.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Create a list of lists that include each vector information\nvectors = [[2, 3, 45, 4]]\n\nfig = pygmt.Figure()\nfig.plot(\n region=[0, 10, 0, 10],\n projection=\"X10c/10c\",\n frame=\"ag\",\n data=vectors,\n style=\"v0.6c+e\",\n pen=\"2p\",\n fill=\"red3\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Using the functionality mentioned in the previous example,\nmultiple vectors can be plotted at the same time. Another\nvector could be simply added to the 2-D list or numpy\narray object and passed using ``data`` parameter.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Vector specifications structured as:\n# [x_start, y_start, direction_degrees, length]\nvector_1 = [2, 3, 45, 4]\nvector_2 = [7.5, 8.3, -120.5, 7.2]\n# Create a list of lists that include each vector information\nvectors = [vector_1, vector_2]\n# Vectors structure: [[2, 3, 45, 4], [7.5, 8.3, -120.5, 7.2]]\n\nfig = pygmt.Figure()\nfig.plot(\n region=[0, 10, 0, 10],\n projection=\"X10c/10c\",\n frame=\"ag\",\n data=vectors,\n style=\"v0.6c+e\",\n pen=\"2p\",\n fill=\"red3\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In this example, Cartesian vectors are plotted over a Mercator\nprojection of the continental US. The x values represent the\nlongitude and y values represent the latitude where the vector starts.\n\nThis example also shows some of the styles a vector supports.\nThe beginning point of the vector (**+b**)\nshould take the shape of a circle (**c**). Similarly, the end\npoint of the vector (**+e**) should have an arrow shape (**a**)\n(to draw a plain arrow, use **A** instead). Lastly, the **+a**\nspecifies the angle of the vector head apex (30 degrees in\nthis example).\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Create a plot with coast, Mercator projection (M) over the continental US\nfig = pygmt.Figure()\nfig.coast(\n region=[-127, -64, 24, 53],\n projection=\"M10c\",\n frame=\"ag\",\n borders=1,\n shorelines=\"0.25p,black\",\n area_thresh=4000,\n land=\"grey\",\n water=\"lightblue\",\n)\n\n# Plot a vector using the x, y, direction parameters\nstyle = \"v0.4c+bc+ea+a30\"\nfig.plot(\n x=-110,\n y=40,\n style=style,\n direction=[[-25], [3]],\n pen=\"1p\",\n fill=\"red3\",\n)\n\n# vector specifications structured as:\n# [x_start, y_start, direction_degrees, length]\nvector_2 = [-82, 40.5, 138, 2.5]\nvector_3 = [-71.2, 45, -115.7, 4]\n# Create a list of lists that include each vector information\nvectors = [vector_2, vector_3]\n\n# Plot vectors using the data parameter.\nfig.plot(\n data=vectors,\n style=style,\n pen=\"1p\",\n fill=\"yellow\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Another example of plotting Cartesian vectors over a coast plot. This time a\nTransverse Mercator projection is used. Additionally, :func:`numpy.linspace`\nis used to create 5 vectors with equal stops.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "x = np.linspace(36, 42, 5) # x values = [36. 37.5 39. 40.5 42. ]\ny = np.linspace(39, 39, 5) # y values = [39. 39. 39. 39.]\ndirection = np.linspace(-90, -90, 5) # direction values = [-90. -90. -90. -90.]\nlength = np.linspace(1.5, 1.5, 5) # length values = [1.5 1.5 1.5 1.5]\n\n# Create a plot with coast,\n# Transverse Mercator projection (T) over Turkey and Syria\nfig = pygmt.Figure()\nfig.coast(\n region=[20, 50, 30, 45],\n projection=\"T35/10c\",\n frame=True,\n borders=1,\n shorelines=\"0.25p,black\",\n area_thresh=4000,\n land=\"lightbrown\",\n water=\"lightblue\",\n)\n\nfig.plot(\n x=x,\n y=y,\n style=\"v0.4c+ea+bc\",\n direction=[direction, length],\n pen=\"0.6p\",\n fill=\"red3\",\n)\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plot Circular Vectors\n\nWhen plotting circular vectors, all of the information for a single vector is\nto be stored in a list. Each circular vector list is structured as:\n``[x_start, y_start, radius, degree_start, degree_stop]``. The first two\nvalues in the vector list represent the origin of the circle that will be\nplotted. The next value is the radius which is represented on the plot in cm.\n\nThe last two values in the vector list represent the degree at which the plot\nwill start and stop. These values are measured counter-clockwise from the\nhorizontal axis. In this example, the result shown is the left half of a\ncircle as the plot starts at 90 degrees and goes until 270. Notice that the\n``m`` in the ``style`` parameter stands for circular vectors.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n\ncircular_vector_1 = [0, 0, 2, 90, 270]\ndata = [circular_vector_1]\nfig.plot(\n region=[-5, 5, -5, 5],\n projection=\"X10c\",\n frame=\"ag\",\n data=data,\n style=\"m0.5c+ea\",\n pen=\"2p\",\n fill=\"red3\",\n)\n\n# Another example using np.array()\ncircular_vector_2 = [0, 0, 4, -90, 90]\ndata = np.array([circular_vector_2])\n\nfig.plot(\n data=data,\n style=\"m0.5c+ea\",\n pen=\"2p\",\n fill=\"red3\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "When plotting multiple circular vectors, a two dimensional array or numpy\narray object should be passed as the ``data`` parameter. In this example,\n:func:`numpy.column_stack` is used to generate this two dimensional array.\nOther numpy objects are used to generate linear values for the ``radius``\nparameter and random values for the ``degree_stop`` parameter discussed in\nthe previous example. This is the reason in which each vector has a different\nappearance on the projection.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "vector_num = 5\nradius = 3 - (0.5 * np.arange(0, vector_num))\nstartdir = np.full(vector_num, 90)\nstopdir = 180 + (50 * np.arange(0, vector_num))\ndata = np.column_stack(\n [np.full(vector_num, 0), np.full(vector_num, 0), radius, startdir, stopdir]\n)\n\nfig = pygmt.Figure()\nfig.plot(\n region=[-5, 5, -5, 5],\n projection=\"X10c\",\n frame=\"ag\",\n data=data,\n style=\"m0.5c+ea\",\n pen=\"2p\",\n fill=\"red3\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Much like when plotting Cartesian vectors, the default unit used is\ncentimeters. When this is changed to inches, the size of the plot appears\nlarger when the projection units do not change. Below is an example of two\ncircular vectors. One is plotted using the default unit, and the second is\nplotted using inches. Despite using the same list to plot the vectors, a\ndifferent measurement unit causes one to be larger than the other.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "circular_vector = [6, 5, 1, 90, 270]\n\nfig = pygmt.Figure()\nfig.plot(\n region=[0, 10, 0, 10],\n projection=\"X10c\",\n frame=\"ag\",\n data=[circular_vector],\n style=\"m0.5c+ea\",\n pen=\"2p\",\n fill=\"red3\",\n)\n\nwith pygmt.config(PROJ_LENGTH_UNIT=\"i\"):\n fig.plot(\n data=[circular_vector],\n style=\"m0.5c+ea\",\n pen=\"2p\",\n fill=\"red3\",\n )\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plot Geographic Vectors\n\nOn this map,\n``point_1`` and ``point_2`` are coordinate pairs used to set the\nstart and end points of the geographic vector.\nThe geographical vector is going from Idaho to\nChicago. To style geographic\nvectors, use ``=`` at the beginning of the ``style`` parameter.\nOther styling features such as vector stem thickness and head color\ncan be passed into the ``pen`` and ``fill`` parameters.\n\nNote that the **+s** is added to use a start point and an end point\nto represent the vector instead of input angle and length.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "point_1 = [-114.7420, 44.0682]\npoint_2 = [-87.6298, 41.8781]\ndata = np.array([point_1 + point_2])\n\nfig = pygmt.Figure()\nfig.coast(\n region=[-127, -64, 24, 53],\n projection=\"M10c\",\n frame=True,\n borders=1,\n shorelines=\"0.25p,black\",\n area_thresh=4000,\n)\nfig.plot(\n data=data,\n style=\"=0.5c+ea+s\",\n pen=\"2p\",\n fill=\"red3\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Using the same technique shown in the previous example,\nmultiple vectors can be plotted in a chain where the end point\nof one is the start point of another. This can be done\nby adding the coordinate lists together to create this structure:\n``[[start_latitude, start_longitude, end_latitude, end_longitude]]``.\nEach list within the 2-D list contains the start and end information\nfor each vector.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Coordinate pairs for all the locations used\nME = [-69.4455, 45.2538]\nCHI = [-87.6298, 41.8781]\nSEA = [-122.3321, 47.6062]\nNO = [-90.0715, 29.9511]\nKC = [-94.5786, 39.0997]\nCA = [-119.4179, 36.7783]\n\n# Add array to piece together the vectors\ndata = [ME + CHI, CHI + SEA, SEA + KC, KC + NO, NO + CA]\n\nfig = pygmt.Figure()\nfig.coast(\n region=[-127, -64, 24, 53],\n projection=\"M10c\",\n frame=True,\n borders=1,\n shorelines=\"0.25p,black\",\n area_thresh=4000,\n)\nfig.plot(\n data=data,\n style=\"=0.5c+ea+s\",\n pen=\"2p\",\n fill=\"red3\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This example plots vectors over a Mercator projection. The start points\nare located at SA which is South Africa and going to four different\nlocations.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "SA = [22.9375, -30.5595]\nEUR = [15.2551, 54.5260]\nME = [-69.4455, 45.2538]\nAS = [100.6197, 34.0479]\nNM = [-105.8701, 34.5199]\ndata = np.array([SA + EUR, SA + ME, SA + AS, SA + NM])\n\nfig = pygmt.Figure()\nfig.coast(\n region=[-180, 180, -80, 80],\n projection=\"M0/0/12c\",\n frame=\"afg\",\n land=\"lightbrown\",\n water=\"lightblue\",\n)\nfig.plot(\n data=data,\n style=\"=0.5c+ea+s\",\n pen=\"2p\",\n fill=\"red3\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/e3d91c8910904b963a5087be18fb721d/points_categorical.ipynb b/v0.14.0/_downloads/e3d91c8910904b963a5087be18fb721d/points_categorical.ipynb new file mode 100644 index 00000000000..428225f4668 --- /dev/null +++ b/v0.14.0/_downloads/e3d91c8910904b963a5087be18fb721d/points_categorical.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Color points by categories\n\nThe :meth:`pygmt.Figure.plot` method can be used to plot symbols which are\ncolor-coded by categories. In the example below, we show how the\n[Palmer Penguins dataset](https://github.com/allisonhorst/palmerpenguins)_\ncan be visualized. Here, we can pass the individual categories included in\nthe \"species\" column directly to the ``fill`` parameter via\n``fill=df.species.cat.codes.astype(int)``. Additionally, we have to set\n``cmap=True``. A desired colormap can be selected via the :func:`pygmt.makecpt`\nfunction.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pandas as pd\nimport pygmt\n\n# Load sample penguins data\ndf = pd.read_csv(\"https://github.com/mwaskom/seaborn-data/raw/master/penguins.csv\")\n\n# Convert 'species' column to categorical dtype\n# By default, pandas sorts the individual categories in an alphabetical order.\n# For a non-alphabetical order, you have to manually adjust the list of\n# categories. For handling and manipulating categorical data in pandas,\n# have a look at:\n# https://pandas.pydata.org/docs/user_guide/categorical.html\ndf.species = df.species.astype(dtype=\"category\")\n\n# Make a list of the individual categories of the 'species' column\n# ['Adelie', 'Chinstrap', 'Gentoo']\n# They are (corresponding to the categorical number code) by default in\n# alphabetical order and later used for the colorbar annotations\ncb_annots = list(df.species.cat.categories)\n\n# Use pygmt.info to get region bounds (xmin, xmax, ymin, ymax)\n# The below example will return a numpy array like [30.0, 60.0, 12.0, 22.0]\nregion = pygmt.info(\n data=df[[\"bill_length_mm\", \"bill_depth_mm\"]], # x and y columns\n per_column=True, # Report the min/max values per column as a numpy array\n # Round the min/max values of the first two columns to the nearest multiple\n # of 3 and 2, respectively\n spacing=(3, 2),\n)\n\n# Make a 2-D categorical scatter plot, coloring each of the 3 species\n# differently\nfig = pygmt.Figure()\n\n# Generate a basemap of 10 cm x 10 cm size\nfig.basemap(\n region=region,\n projection=\"X10c/10c\",\n frame=[\n \"xafg+lBill length (mm)\",\n \"yafg+lBill depth (mm)\",\n \"WSen+tPenguin size at Palmer Station\",\n ],\n)\n\n# Define a colormap for three categories, define the range of the\n# new discrete CPT using series=(lowest_value, highest_value, interval),\n# use color_model=\"+cAdelie,Chinstrap,Gentoo\" to write the discrete color\n# palette \"inferno\" in categorical format and add the species names as\n# annotations for the colorbar\npygmt.makecpt(\n cmap=\"inferno\",\n # Use the minimum and maximum of the categorical number code\n # to set the lowest_value and the highest_value of the CPT\n series=(df.species.cat.codes.min(), df.species.cat.codes.max(), 1),\n # Convert ['Adelie', 'Chinstrap', 'Gentoo'] to 'Adelie,Chinstrap,Gentoo'\n color_model=\"+c\" + \",\".join(cb_annots),\n)\n\nfig.plot(\n # Use bill length and bill depth as x and y data input, respectively\n x=df.bill_length_mm,\n y=df.bill_depth_mm,\n # Vary symbol size according to the body mass, scaled by 7.5e-5\n size=df.body_mass_g * 7.5e-5,\n # Points colored by categorical number code (refers to the species)\n fill=df.species.cat.codes.astype(int),\n # Use colormap created by makecpt\n cmap=True,\n # Do not clip symbols that fall close to the plot bounds\n no_clip=True,\n # Use circles as symbols (the first \"c\") with diameter in\n # centimeters (the second \"c\")\n style=\"cc\",\n # Set transparency level for all symbols to deal with overplotting\n transparency=40,\n)\n\n# Add colorbar legend\nfig.colorbar()\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/e419eb0e87599ad7c3031670c5cc849f/basic_symbols.ipynb b/v0.14.0/_downloads/e419eb0e87599ad7c3031670c5cc849f/basic_symbols.ipynb new file mode 100644 index 00000000000..09bc7ecf0a4 --- /dev/null +++ b/v0.14.0/_downloads/e419eb0e87599ad7c3031670c5cc849f/basic_symbols.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Basic geometric symbols\n\nThe :meth:`pygmt.Figure.plot` method can plot individual geometric symbols\nby passing the corresponding shortcuts to the ``style`` parameter. The 14 basic\ngeometric symbols are shown underneath their corresponding shortcut codes.\nFour symbols (**-**, **+**, **x** and **y**) are line-symbols only for which we\ncan adjust the linewidth via the ``pen`` parameter. The point symbol (**p**)\nonly takes a color fill which we can define via the ``fill`` parameter. For\nthe remaining symbols we may define a linewidth as well as a color fill.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.basemap(region=[0, 8, 0, 3], projection=\"X12c/4c\", frame=True)\n\n# define fontstlye for annotations\nfont = \"15p,Helvetica-Bold\"\n\n# upper row\ny = 2\n\n# use a dash in x direction (-) with a size of 0.9 cm,\n# linewidth is set to 2p and the linecolor to \"gray40\"\nfig.plot(x=1, y=y, style=\"-0.9c\", pen=\"2p,gray40\")\nfig.text(x=1, y=y + 0.6, text=\"-\", font=font)\n\n# use a plus (+) with a size of 0.9 cm,\n# linewidth is set to 2p and the linecolor to \"gray40\"\nfig.plot(x=2, y=y, style=\"+0.9c\", pen=\"2p,gray40\")\nfig.text(x=2, y=y + 0.6, text=\"+\", font=font)\n\n# use a star (a) with a size of 0.9 cm,\n# linewidth is set to 1p, the linecolor to \"black\" (default) and the\n# color fill to \"darkorange\"\nfig.plot(x=3, y=y, style=\"a0.9c\", pen=\"1p,black\", fill=\"darkorange\")\nfig.text(x=3, y=y + 0.6, text=\"a\", font=font)\n\n# use a circle (c) with a size of 0.9 cm,\n# linewidth is set to 1p, the linecolor to \"black\" and the\n# color fill to \"darkred\"\nfig.plot(x=4, y=y, style=\"c0.9c\", pen=\"1p,black\", fill=\"darkred\")\nfig.text(x=4, y=y + 0.6, text=\"c\", font=font)\n\n# use a diamond (d) with a size of 0.9 cm,\n# linewidth is set to 1p, the linecolor to \"black\" and the\n# color fill to \"seagreen\"\nfig.plot(x=5, y=y, style=\"d0.9c\", pen=\"1p,black\", fill=\"seagreen\")\nfig.text(x=5, y=y + 0.6, text=\"d\", font=font)\n\n# use a octagon (g) with a size of 0.9 cm,\n# linewidth is set to 1p, the linecolor to \"black\" and the\n# color fill to \"dodgerblue4\"\nfig.plot(x=6, y=y, style=\"g0.9c\", pen=\"1p,black\", fill=\"dodgerblue4\")\nfig.text(x=6, y=y + 0.6, text=\"g\", font=font)\n\n# use a hexagon (h) with a size of 0.9 cm,\n# linewidth is set to 1p, the linecolor to \"black\" and the\n# color fill to \"lightgray\"\nfig.plot(x=7, y=y, style=\"h0.9c\", pen=\"1p,black\", fill=\"lightgray\")\nfig.text(x=7, y=y + 0.6, text=\"h\", font=font)\n\n# lower row\ny = 0.5\n\n# use an inverted triangle (i) with a size of 0.9 cm,\n# linewidth is set to 1p, the linecolor to \"black\" and the\n# color fill to \"tomato\"\nfig.plot(x=1, y=y, style=\"i0.9c\", pen=\"1p,black\", fill=\"tomato\")\nfig.text(x=1, y=y + 0.6, text=\"i\", font=font)\n\n# use pentagon (n) with a size of 0.9 cm,\n# linewidth is set to 1p, the linecolor to \"black\" and the\n# color fill to \"lightseagreen\"\nfig.plot(x=2, y=y, style=\"n0.9c\", pen=\"1p,black\", fill=\"lightseagreen\")\nfig.text(x=2, y=y + 0.6, text=\"n\", font=font)\n\n# use a point (p) with a size of 0.9 cm,\n# color fill is set to \"lightseagreen\"\nfig.plot(x=3, y=y, style=\"p0.9c\", fill=\"slateblue\")\nfig.text(x=3, y=y + 0.6, text=\"p\", font=font)\n\n# use square (s) with a size of 0.9 cm,\n# linewidth is set to 1p, the linecolor to \"black\" and the\n# color fill to \"gold2\"\nfig.plot(x=4, y=y, style=\"s0.9c\", pen=\"1p,black\", fill=\"gold2\")\nfig.text(x=4, y=y + 0.6, text=\"s\", font=font)\n\n# use triangle (t) with a size of 0.9 cm,\n# linewidth is set to 1p, the linecolor to \"black\" and the\n# color fill to \"magenta4\"\nfig.plot(x=5, y=y, style=\"t0.9c\", pen=\"1p,black\", fill=\"magenta4\")\nfig.text(x=5, y=y + 0.6, text=\"t\", font=font)\n\n# use cross (x) with a size of 0.9 cm,\n# linewidth is set to 2p and the linecolor to \"gray40\"\nfig.plot(x=6, y=y, style=\"x0.9c\", pen=\"2p,gray40\")\nfig.text(x=6, y=y + 0.6, text=\"x\", font=font)\n\n# use a dash in y direction (y) with a size of 0.9 cm,\n# linewidth is set to 2p and the linecolor to \"gray40\"\nfig.plot(x=7, y=y, style=\"y0.9c\", pen=\"2p,gray40\")\nfig.text(x=7, y=y + 0.6, text=\"y\", font=font)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/e4bc68a1efee26952be9a669f3e3ae4d/grdclip.ipynb b/v0.14.0/_downloads/e4bc68a1efee26952be9a669f3e3ae4d/grdclip.ipynb new file mode 100644 index 00000000000..5b13feaeffc --- /dev/null +++ b/v0.14.0/_downloads/e4bc68a1efee26952be9a669f3e3ae4d/grdclip.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Clipping grid values\n\nThe :func:`pygmt.grdclip` function allows to clip defined ranges of grid\nvalues. In the example shown below we set all elevation values (grid points)\nsmaller than 0 m (in general the bathymetric part of the grid) to a common\nvalue of -2000 m via the ``below`` parameter.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n\n# Define region of interest around Iceland\nregion = [-28, -10, 62, 68]\n\n# Load sample grid (3 arc-minutes global relief) in target area\ngrid = pygmt.datasets.load_earth_relief(resolution=\"03m\", region=region)\n\n# Plot original grid\nfig.basemap(\n region=region,\n projection=\"M12c\",\n frame=[\"WSne+toriginal grid\", \"xa5f1\", \"ya2f1\"],\n)\nfig.grdimage(grid=grid, cmap=\"oleron\")\n\n# Shift plot origin of the second map by \"width of the first map + 0.5 cm\"\n# in x direction\nfig.shift_origin(xshift=\"w+0.5c\")\n\n# Set all grid points < 0 m to a value of -2000 m.\ngrid = pygmt.grdclip(grid, below=[0, -2000])\n\n# Plot clipped grid\nfig.basemap(\n region=region,\n projection=\"M12c\",\n frame=[\"wSne+tclipped grid\", \"xa5f1\", \"ya2f1\"],\n)\nfig.grdimage(grid=grid)\nfig.colorbar(frame=[\"x+lElevation\", \"y+lm\"], position=\"JMR+o0.5c/0c+w8c\")\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/e54c4af3c9e8dea26183210794026896/3d_perspective_image.ipynb b/v0.14.0/_downloads/e54c4af3c9e8dea26183210794026896/3d_perspective_image.ipynb new file mode 100644 index 00000000000..d5be5eb9718 --- /dev/null +++ b/v0.14.0/_downloads/e54c4af3c9e8dea26183210794026896/3d_perspective_image.ipynb @@ -0,0 +1,115 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Creating a 3-D perspective image\n\nCreate 3-D perspective image or surface mesh from a grid\nusing :meth:`pygmt.Figure.grdview`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\n# Load sample earth relief data\ngrid = pygmt.datasets.load_earth_relief(resolution=\"10m\", region=[-108, -103, 35, 40])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The :meth:`pygmt.Figure.grdview` method takes the ``grid`` input.\nThe ``perspective`` parameter changes the azimuth and elevation of the\nviewpoint; the default is [180, 90], which is looking directly down on the\nfigure and north is \"up\". The ``zsize`` parameter sets how tall the\nthree-dimensional portion appears.\n\nThe default grid surface type is *mesh plot*.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdview(\n grid=grid,\n # Sets the view azimuth as 130 degrees, and the view elevation as 30\n # degrees\n perspective=[130, 30],\n # Sets the x- and y-axis labels, and annotates the west, south, and east\n # axes\n frame=[\"xa\", \"ya\", \"WSnE\"],\n # Sets a Mercator projection on a 15-centimeter figure\n projection=\"M15c\",\n # Sets the height of the three-dimensional relief at 1.5 centimeters\n zsize=\"1.5c\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The grid surface type can be set with the ``surftype`` parameter.\nThe default CPT is *turbo* and can be customized with the ``cmap`` parameter.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdview(\n grid=grid,\n perspective=[130, 30],\n frame=[\"xa\", \"yaf\", \"WSnE\"],\n projection=\"M15c\",\n zsize=\"1.5c\",\n # Set the surftype to \"surface\"\n surftype=\"s\",\n # Set the CPT to \"geo\"\n cmap=\"geo\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The ``plane`` parameter sets the elevation and color of a plane that provides\na fill below the surface relief.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdview(\n grid=grid,\n perspective=[130, 30],\n frame=[\"xa\", \"yaf\", \"WSnE\"],\n projection=\"M15c\",\n zsize=\"1.5c\",\n surftype=\"s\",\n cmap=\"geo\",\n # Set the plane elevation to 1,000 meters and make the fill \"gray\"\n plane=\"1000+ggray\",\n)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The ``perspective`` azimuth can be changed to set the direction that is \"up\"\nin the figure. The ``contourpen`` parameter sets the pen used to draw contour\nlines on the surface. :meth:`pygmt.Figure.colorbar` can be used to add a\ncolor bar to the figure. The ``cmap`` parameter does not need to be passed\nagain. To keep the color bar's alignment similar to the figure, use ``True``\nas argument for the ``perspective`` parameter.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.grdview(\n grid=grid,\n # Set the azimuth to -130 (230) degrees and the elevation to 30 degrees\n perspective=[-130, 30],\n frame=[\"xaf\", \"yaf\", \"WSnE\"],\n projection=\"M15c\",\n zsize=\"1.5c\",\n surftype=\"s\",\n cmap=\"geo\",\n plane=\"1000+ggrey\",\n # Set the contour pen thickness to \"0.1p\"\n contourpen=\"0.1p\",\n)\nfig.colorbar(perspective=True, frame=[\"a500\", \"x+lElevation\", \"y+lm\"])\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/e642b2456a284703e079ee9813a14c33/timestamp.ipynb b/v0.14.0/_downloads/e642b2456a284703e079ee9813a14c33/timestamp.ipynb new file mode 100644 index 00000000000..25ac4b03219 --- /dev/null +++ b/v0.14.0/_downloads/e642b2456a284703e079ee9813a14c33/timestamp.ipynb @@ -0,0 +1,61 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Timestamp\n\nThe :meth:`pygmt.Figure.timestamp` method can draw the GMT timestamp logo on the plot.\nThe timestamp will always be shown relative to the Bottom Left (BL) corner of the plot.\nBy default, the ``offset`` and ``justify`` parameters are set to ``(\"-54p\", \"-54p\")``\n(x, y directions) and ``\"BL\"`` (Bottom Left), respectively.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\n\nimport pygmt\n\nfig = pygmt.Figure()\nfig.basemap(region=[20, 30, -10, 10], projection=\"X10c/5c\", frame=True)\nfig.timestamp()\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Additionally, a custom label can be added via the ``label`` parameter. The font can be\ndefined via the ``font`` parameter and the timestamp string format via ``timefmt``.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "os.environ[\"TZ\"] = \"Pacific/Honolulu\" # optionally set the time zone\n\nfig = pygmt.Figure()\nfig.coast(region=\"d\", projection=\"H10c\", land=\"black\", water=\"cornsilk\", frame=\"afg\")\nfig.timestamp(\n label=\"Powered by PyGMT\",\n justify=\"TL\",\n font=\"Times-Bold\",\n timefmt=\"%Y-%m-%dT%H:%M:%S%z\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/e6825486f2bbba8625a4e7d7941c614a/text_symbols.ipynb b/v0.14.0/_downloads/e6825486f2bbba8625a4e7d7941c614a/text_symbols.ipynb new file mode 100644 index 00000000000..4bd37f90750 --- /dev/null +++ b/v0.14.0/_downloads/e6825486f2bbba8625a4e7d7941c614a/text_symbols.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Text symbols\n\nThe :meth:`pygmt.Figure.plot` method allows to plot text symbols. Text is normally\nplaced with the :meth:`pygmt.Figure.text` method but there are times we wish to treat a\ncharacter or even a string as a plottable symbol. A text symbol can be drawn by passing\n**l**\\ *size*\\ **+t**\\ *string* to the ``style`` parameter where *size* defines the size\nof the text symbol (note: the size is only approximate; no individual scaling is done\nfor different characters) and *string* can be a letter or a text string (less than 256\ncharacters). Optionally, you can append **+f**\\ *font,outlinecolor* to select a\nparticular font [Default is :gmt-term:`FONT_ANNOT_PRIMARY`] and outline color [Default\nis black] as well as **+j**\\ *justify* to change the justification [Default is CM]. For\nall supported fonts see :doc:`/techref/fonts`. The fill color of the text symbols can be\nset with the ``fill`` parameter, and the outline width can be customized with the\n``pen`` parameter.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\n\nfig.basemap(region=[0, 8, 0, 3], projection=\"X12c/4c\", frame=True)\n\npen = \"1.5p\"\n# plot an uppercase \"A\" of size 3.5c, color fill is set to \"dodgerblue3\"\nfig.plot(x=1, y=1.5, style=\"l3.5c+tA\", fill=\"dodgerblue3\", pen=pen)\n# plot an \"asterisk\" of size 3.5c, color fill is set to \"red3\"\nfig.plot(x=2.5, y=1, style=\"l3.5c+t*\", fill=\"red3\", pen=pen)\n# plot an uppercase \"Z\" of size 3.5c and use the \"Courier-Bold\" font,\n# color fill is set to \"seagreen\"\nfig.plot(x=4, y=1.5, style=\"l3.5c+tZ+fCourier-Bold\", fill=\"seagreen\", pen=pen)\n# plot a lowercase \"s\" of size 3.5c and use the \"Times-Italic\" font,\n# color fill is set to \"gold\"\nfig.plot(x=5.5, y=1.5, style=\"l3.5c+ts+fTimes-Italic\", fill=\"gold\", pen=pen)\n# plot the pi symbol of size 3.5c, the outline color of the symbol is set to\n# \"darkorange\", the color fill is set to \"magenta4\"\nfig.plot(x=7, y=1.5, style=\"l3.5c+t\u03c0+fdarkorange\", fill=\"magenta4\", pen=pen)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/e722111a5e81e33567c2f4d2b21b45c2/3d_perspective_image.zip b/v0.14.0/_downloads/e722111a5e81e33567c2f4d2b21b45c2/3d_perspective_image.zip new file mode 100644 index 00000000000..4e1827eb018 Binary files /dev/null and b/v0.14.0/_downloads/e722111a5e81e33567c2f4d2b21b45c2/3d_perspective_image.zip differ diff --git a/v0.14.0/_downloads/e7a05a71bbb8801b482b6d65cf3f1426/solar.ipynb b/v0.14.0/_downloads/e7a05a71bbb8801b482b6d65cf3f1426/solar.ipynb new file mode 100644 index 00000000000..27478fd8808 --- /dev/null +++ b/v0.14.0/_downloads/e7a05a71bbb8801b482b6d65cf3f1426/solar.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Day-night terminator line and twilights\n\nUse :meth:`pygmt.Figure.solar` to show the different transition stages between\ndaytime and nighttime. The parameter ``terminator`` is used to set the twilight\nstage, and can be either ``\"day_night\"`` (brightest), ``\"civil\"``,\n``\"nautical\"``, or ``\"astronomical\"`` (darkest).\nRefer to https://en.wikipedia.org/wiki/Twilight for more information.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import datetime\n\nimport pygmt\n\nfig = pygmt.Figure()\n# Create a figure showing the global region on a Mollweide projection\n# Land color is set to dark green and water color is set to light blue\nfig.coast(region=\"d\", projection=\"W0/15c\", land=\"darkgreen\", water=\"lightblue\")\n# Set a time for the day-night terminator and twilights, 17:00 UTC on\n# January 1, 2000\nterminator_datetime = datetime.datetime(\n year=2000, month=1, day=1, hour=17, minute=0, second=0\n)\n# Set the pen line to be 0.5 points thick\n# Set the fill for the night area to be navy blue at different transparency\n# levels\nfig.solar(\n terminator=\"day_night\",\n terminator_datetime=terminator_datetime,\n fill=\"navyblue@95\",\n pen=\"0.5p\",\n)\nfig.solar(\n terminator=\"civil\",\n terminator_datetime=terminator_datetime,\n fill=\"navyblue@85\",\n pen=\"0.5p\",\n)\nfig.solar(\n terminator=\"nautical\",\n terminator_datetime=terminator_datetime,\n fill=\"navyblue@80\",\n pen=\"0.5p\",\n)\nfig.solar(\n terminator=\"astronomical\",\n terminator_datetime=terminator_datetime,\n fill=\"navyblue@80\",\n pen=\"0.5p\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/eaa7f98d001909ce1c172be36972c3c1/line_segment_ends.py b/v0.14.0/_downloads/eaa7f98d001909ce1c172be36972c3c1/line_segment_ends.py new file mode 100644 index 00000000000..dd4f2b4fc1a --- /dev/null +++ b/v0.14.0/_downloads/eaa7f98d001909ce1c172be36972c3c1/line_segment_ends.py @@ -0,0 +1,76 @@ +""" +Line segment caps and joints +============================ +PyGMT offers different appearances of line segment caps and joints. The desired +appearance can be set via the GMT default parameters :gmt-term:`PS_LINE_CAP` +(``"butt"``, ``"round"``, or ``"square"`` [Default]) as well as :gmt-term:`PS_LINE_JOIN` +(``"bevel"``, ``"round"``, and ``"miter"`` [Default]) and :gmt-term:`PS_MITER_LIMIT` +(limit on the angle at the mitered joint below which a bevel is applied). +""" + +# %% +import numpy as np +import pygmt + +# Set up dictionary for colors +dict_col = { + "round": "green4", + "square": "steelblue", + "butt": "orange", + "miter": "steelblue", + "bevel": "orange", +} + +# Create new Figure instance +fig = pygmt.Figure() + +# ----------------------------------------------------------------------------- +# Top: PS_LINE_CAP + +# Create sample data +x = np.array([30, 170]) +y = np.array([70, 70]) + +fig.basemap(region=[0, 260, 0, 100], projection="x1p", frame="rltb") + +for line_cap in ["butt", "round", "square"]: + # Change GMT default locally + with pygmt.config(PS_LINE_CAP=line_cap): + color = dict_col[line_cap] + # Draw a 10-point thick line with 20-point long segments and gaps + # Use the local PS_LINE_CAP setting + fig.plot(x=x, y=y, pen=f"10p,{color},20_20") + + # Draw a 1-point thick black solid line to highlight segment cap appearance + fig.plot(x=x, y=y, pen="1p,black,solid") + # Plot data points as circles + fig.plot(x=x, y=y, style="c0.1c", fill="white", pen="0.5p,") + # Add label for PS_LINE_CAP setting + fig.text(text=line_cap, x=x[-1] + 20, y=y[-1], justify="LM") + + y = y - 20 + +fig.shift_origin(yshift="-h") + +# ----------------------------------------------------------------------------- +# Bottom: PS_LINE_JOIN and PS_MITER_LIMIT + +x = np.array([5, 95, 65]) +y = np.array([10, 70, 10]) + +fig.basemap(region=[0, 260, 0, 100], projection="x1p", frame="rltb") + +for line_join in ["bevel", "round", "miter"]: + with pygmt.config(PS_LINE_JOIN=line_join, PS_MITER_LIMIT=1): + color = dict_col[line_join] + # Draw a 7-point thick solid line + # Use the local PS_LINE_JOIN and PS_MITER_LIMIT settings + fig.plot(x=x, y=y, pen=f"7p,{color},solid") + + fig.plot(x=x, y=y, pen="1p,black,solid") + fig.plot(x=x, y=y, style="c0.1c", fill="white", pen="0.5p") + fig.text(text=line_join, x=x[1] - 10, y=y[1], justify="RB") + + x = x + 75 + +fig.show() diff --git a/v0.14.0/_downloads/ead6ea89935168634081830c39b49fe1/ternary.py b/v0.14.0/_downloads/ead6ea89935168634081830c39b49fe1/ternary.py new file mode 100644 index 00000000000..8ad9031f406 --- /dev/null +++ b/v0.14.0/_downloads/ead6ea89935168634081830c39b49fe1/ternary.py @@ -0,0 +1,46 @@ +""" +Ternary diagram +=============== + +The :meth:`pygmt.Figure.ternary` method can draw ternary diagrams. The example +shows how to plot circles with a diameter of 0.1 centimeters +(``style="c0.1c"``) on a 10-centimeters-wide (``width="10c"``) ternary diagram +at the positions listed in the first three columns of the sample dataset +``rock_compositions``, with default annotations and gridline spacings, using +the specified labeling defined via ``alabel``, ``blabel``, and ``clabel``. +Points are colored based on the values given in the fourth columns of the +sample dataset via ``cmap=True``. +""" + +# %% +import pygmt + +fig = pygmt.Figure() + +# Load sample data +data = pygmt.datasets.load_sample_data(name="rock_compositions") + +# Define a colormap to be used for the values given in the fourth column +# of the input dataset +pygmt.makecpt(cmap="batlow", series=[0, 80, 10]) + +fig.ternary( + data, + region=[0, 100, 0, 100, 0, 100], + width="10c", + style="c0.1c", + alabel="Limestone", + blabel="Water", + clabel="Air", + cmap=True, + frame=[ + "aafg+lLimestone component+u %", + "bafg+lWater component+u %", + "cafg+lAir component+u %", + ], +) + +# Add a colorbar indicating the values given in the fourth column of +# the input dataset +fig.colorbar(position="JBC+o0c/1.5c", frame="x+lPermittivity") +fig.show() diff --git a/v0.14.0/_downloads/eb192158ded529e75c2c8bf213f5dc68/azim_orthographic.zip b/v0.14.0/_downloads/eb192158ded529e75c2c8bf213f5dc68/azim_orthographic.zip new file mode 100644 index 00000000000..e2b015317c2 Binary files /dev/null and b/v0.14.0/_downloads/eb192158ded529e75c2c8bf213f5dc68/azim_orthographic.zip differ diff --git a/v0.14.0/_downloads/eb874fd76f1d5822aa4487916c1cc537/04_table_inputs.ipynb b/v0.14.0/_downloads/eb874fd76f1d5822aa4487916c1cc537/04_table_inputs.ipynb new file mode 100644 index 00000000000..89936d25e44 --- /dev/null +++ b/v0.14.0/_downloads/eb874fd76f1d5822aa4487916c1cc537/04_table_inputs.ipynb @@ -0,0 +1,129 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# 4. PyGMT I/O: Table inputs\n\nGenerally, PyGMT accepts two different types of data inputs: tables and grids.\n\n- A table is a 2-D array with rows and columns. Each column represents a different\n variable (e.g., *x*, *y* and *z*) and each row represents a different record.\n- A grid is a 2-D array of data that is regularly spaced in the x and y directions (or\n longitude and latitude).\n\nIn this tutorial, we'll focus on working with table inputs, and cover grid inputs in a\nseparate tutorial.\n\nPyGMT supports a variety of table input types that allow you to work with data in a\nformat that suits your needs. In this tutorial, we'll explore the different table input\ntypes available in PyGMT and provide examples for each. By understanding the different\ntable input types, you can choose the one that best fits your data and analysis needs,\nand work more efficiently with PyGMT.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from pathlib import Path\n\nimport geopandas as gpd\nimport numpy as np\nimport pandas as pd\nimport pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## ASCII table file\n\nMost PyGMT functions/methods that accept table input data have a ``data`` parameter.\nThe easiest way to provide table input data to PyGMT is by specifying the file name of\nan ASCII table (e.g., ``data=\"input_data.dat\"``). This is useful when your data is\nstored in a separate text file.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Create an example file with 3 rows and 2 columns\ndata = np.array([[1.0, 2.0], [5.0, 4.0], [8.0, 3.0]])\nnp.savetxt(\"input_data.dat\", data, fmt=\"%f\")\n\n# Pass the file name to the data parameter\nfig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 5], projection=\"X10c/5c\", frame=True)\nfig.plot(data=\"input_data.dat\", style=\"p0.2c\", fill=\"blue\")\nfig.show()\n\n# Now let's delete the example file\nPath(\"input_data.dat\").unlink()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Besides a plain string to a table file, the following variants are also accepted:\n\n- A :class:`pathlib.Path` object.\n- A full URL. PyGMT will download the file to the current directory first.\n- A file name prefixed with ``@`` (e.g., ``data=\"@input_data.dat\"``), which is a\n special syntax in GMT to indicate that the file is a remote file hosted on the GMT\n data server.\n\nAdditionally, PyGMT also supports a list of file names, :class:`pathlib.Path` objects,\nURLs, or remote files, to provide more flexibility in specifying input files.\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 2-D array: `list`, `numpy.ndarray`, and `pandas.DataFrame`\n\nThe ``data`` parameter also accepts a 2-D array, e.g.,\n\n- A 2-D :class:`list` (i.e., a list of lists)\n- A :class:`numpy.ndarray` object with with a dimension of 2\n- A :class:`pandas.DataFrame` object\n\nThis is useful when you want to plot data that is already in memory.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 5], projection=\"X10c/5c\", frame=True)\n\n# Pass a 2-D list to the 'data' parameter\nfig.plot(data=[[1.0, 2.0], [3.0, 4.0]], style=\"c0.2c\", fill=\"black\")\n\n# Pass a 2-D numpy array to the 'data' parameter\nfig.plot(data=np.array([[4.0, 2.0], [6.0, 4.0]]), style=\"t0.2c\", fill=\"red\")\n\n# Pass a pandas.DataFrame to the 'data' parameter\ndf = pd.DataFrame(np.array([[7.0, 3.0], [9.0, 2.0]]), columns=[\"x\", \"y\"])\nfig.plot(data=df, style=\"a0.2c\", fill=\"blue\")\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## :class:`geopandas.GeoDataFrame`\n\nIf you're working with geospatial data, you can read your data as a\n:class:`geopandas.GeoDataFrame` object and pass it to the ``data`` parameter. This is\nuseful if your data is stored in a geospatial data format (e.g., GeoJSON, etc.) that\nGMT and PyGMT do not support natively.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Example GeoDataFrame\ngdf = gpd.GeoDataFrame(\n {\n \"geometry\": gpd.points_from_xy([2, 5, 9], [2, 3, 4]),\n \"value\": [10, 20, 30],\n }\n)\n\n# Use the GeoDataFrame to specify the 'data' parameter\nfig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 5], projection=\"X10c/5c\", frame=True)\nfig.plot(data=gdf, style=\"c0.2c\", fill=\"purple\")\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Scalar values or 1-D arrays\n\nIn addition to the ``data`` parameter, some PyGMT functions/methods also provide\nindividual parameters (e.g., ``x`` and ``y`` for data coordinates) which allow you to\nspecify the data. These parameters accept individual scalar values or 1-D arrays\n(lists or 1-D numpy arrays).\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 5], projection=\"X10c/5c\", frame=True)\n\n# Pass scalar values to plot a single data point\nfig.plot(x=1.0, y=2.0, style=\"a0.2c\", fill=\"blue\")\n\n# Pass 1-D lists to plot multiple data points\nfig.plot(x=[5.0, 5.0, 5.0], y=[2.0, 3.0, 4.0], style=\"t0.2c\", fill=\"green\")\n\n# Pass 1-D numpy arrays to plot multiple data points\nfig.plot(\n x=np.array([8.0, 8.0, 8.0]), y=np.array([2.0, 3.0, 4.0]), style=\"c0.2c\", fill=\"red\"\n)\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Conclusion\n\nIn PyGMT, you have the flexibility to provide data in various table input types,\nincluding file names, 2-D arrays (2-D :class:`list`, :class:`numpy.ndarray`,\n:class:`pandas.DataFrames`), scalar values or a series of 1-D arrays, and\n:class:`geopandas.GeoDataFrame`. Choose the input type that best suits your data\nsource and analysis requirements.\n\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/ecdd52e334cd759b423e94cb5a1435d8/03_figure_element.zip b/v0.14.0/_downloads/ecdd52e334cd759b423e94cb5a1435d8/03_figure_element.zip new file mode 100644 index 00000000000..9ffe4407611 Binary files /dev/null and b/v0.14.0/_downloads/ecdd52e334cd759b423e94cb5a1435d8/03_figure_element.zip differ diff --git a/v0.14.0/_downloads/edde4aea350db87cb8d0905915a07294/lines.zip b/v0.14.0/_downloads/edde4aea350db87cb8d0905915a07294/lines.zip new file mode 100644 index 00000000000..bb9bab507cd Binary files /dev/null and b/v0.14.0/_downloads/edde4aea350db87cb8d0905915a07294/lines.zip differ diff --git a/v0.14.0/_downloads/edef33eec4c45691a58d918ed356bec2/colorbar.py b/v0.14.0/_downloads/edef33eec4c45691a58d918ed356bec2/colorbar.py new file mode 100644 index 00000000000..84010591e4a --- /dev/null +++ b/v0.14.0/_downloads/edef33eec4c45691a58d918ed356bec2/colorbar.py @@ -0,0 +1,89 @@ +r""" +Colorbar +======== + +The :meth:`pygmt.Figure.colorbar` method creates a color scalebar. +The colormap is set via the ``cmap`` parameter. A full list of available +color palette tables can be found at :gmt-docs:`reference/cpts.html`. +Use the ``frame`` parameter to add labels to the **x** and **y** axes +of the colorbar by appending **+l** followed by the desired text. To add +and adjust the annotations (**a**) and ticks (**f**) append the letter +followed by the desired interval. The placement of the colorbar is set +via the ``position`` parameter. There are the following options: + +- **j/J**: placed inside/outside the plot bounding box using any 2-character + combination of vertical (**T**\ op, **M**\ iddle, **B**\ ottom) and + horizontal (**L**\ eft, **C**\ enter, **R**\ ight) alignment codes, e.g. + ``position="jTR"`` for Top Right. +- **g**: using map coordinates, e.g. ``position="g170/-45"`` for longitude + 170° East, latitude 45° South. +- **x**: using paper coordinates, e.g. ``position="x5c/7c"`` for 5 cm, 7 cm + from anchor point. +- **n**: using normalized (0-1) coordinates, e.g. ``position="n0.4/0.8"``. + +Note that the anchor point defaults to Bottom Left (**BL**). Append ``+h`` to +``position`` to get a horizontal colorbar instead of a vertical one (``+v``). +""" + +# %% +import pygmt + +fig = pygmt.Figure() +fig.basemap(region=[0, 3, 6, 9], projection="x3c", frame=["af", "WSne+tColorbars"]) + +# ============ +# Create a colorbar designed for seismic tomography - roma +# Colorbar is placed at Bottom Center (BC) by default if no position is given +# Add quantity and unit as labels ("+l") to the x and y axes +# Add annotations ("+a") in steps of 0.5 and ticks ("+f") in steps of 0.1 +fig.colorbar(cmap="roma", frame=["xa0.5f0.1+lVelocity", "y+lm/s"]) + +# ============ +# Create a colorbar showing the scientific rainbow - batlow +fig.colorbar( + cmap="batlow", + # Colorbar positioned at map coordinates (g) longitude/latitude 0.3/8.7, + # with a length/width (+w) of 4 cm by 0.5 cm, and plotted horizontally (+h) + position="g0.3/8.7+w4c/0.5c+h", + box=True, + frame=["x+lTemperature", "y+l°C"], + scale=100, +) + +# ============ +# Create a colorbar suitable for surface topography - oleron +fig.colorbar( + cmap="oleron", + # Colorbar placed outside the plot bounding box (J) at Middle Right (MR), + # offset (+o) by 1 cm horizontally and 0 cm vertically from anchor point, + # with a length/width (+w) of 7 cm by 0.5 cm and a box for NaN values (+n) + position="JMR+o1c/0c+w7c/0.5c+n+mc", + # Note that the label 'Elevation' is moved to the opposite side and plotted + # vertically as a column of text using '+mc' in the position parameter + # above + frame=["x+lElevation", "y+lm"], + scale=10, +) + +# ============ +# Create a colorbar suitable for categorical data - hawaii +# Set up the colormap +pygmt.makecpt( + cmap="hawaii", + series=[0, 3, 1], + # Comma-separated string for the annotations of the colorbar + color_model="+cA,B,C,D", +) +# Plot the colorbar +fig.colorbar( + cmap=True, # Use colormap set up above + # Colorbar placed inside the plot bounding box (j) in the Bottom Left (BL) corner, + # with an offset (+o) by 0.5 cm horizontally and 0.8 cm vertically from the anchor + # point, and plotted horizontally (+h) + position="jBL+o0.5c/0.8c+h", + box=True, + # Divide colorbar into equal-sized rectangles + equalsize=0.5, +) + +fig.show() diff --git a/v0.14.0/_downloads/ee3f26fc5a31f670581877f9beff9a7e/cartesian_logarithmic.zip b/v0.14.0/_downloads/ee3f26fc5a31f670581877f9beff9a7e/cartesian_logarithmic.zip new file mode 100644 index 00000000000..c7803537d4e Binary files /dev/null and b/v0.14.0/_downloads/ee3f26fc5a31f670581877f9beff9a7e/cartesian_logarithmic.zip differ diff --git a/v0.14.0/_downloads/ee7cc1e8e814499052554a64ebcb57c2/vector_styles.ipynb b/v0.14.0/_downloads/ee7cc1e8e814499052554a64ebcb57c2/vector_styles.ipynb new file mode 100644 index 00000000000..9711d96db6c --- /dev/null +++ b/v0.14.0/_downloads/ee7cc1e8e814499052554a64ebcb57c2/vector_styles.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Cartesian, circular, and geographic vectors\n\nThe :meth:`pygmt.Figure.plot` method can plot Cartesian, circular, and geographic\nvectors. The ``style`` parameter controls vector attributes. See also the\n:doc:`Vector attributes example `.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Create a plot with coast, Mercator projection (M) over the continental US\nfig = pygmt.Figure()\nfig.coast(\n region=[-127, -64, 24, 53],\n projection=\"M15c\",\n frame=True,\n borders=1,\n area_thresh=4000,\n shorelines=\"0.25p,black\",\n)\n\n\n# Left: plot 12 Cartesian vectors with different lengths\nx = np.linspace(-116, -116, 12) # x vector coordinates\ny = np.linspace(33.5, 42.5, 12) # y vector coordinates\ndirection = np.zeros(x.shape) # direction of vectors\nlength = np.linspace(0.5, 2.4, 12) # length of vectors\n# Cartesian vectors (v) with red fill and pen (+g, +p), vector head at the end (+e), and\n# 40 degree angle (+a) with no indentation for the vector head (+h)\nstyle = \"v0.2c+e+a40+gred+h0+p1p,red\"\nfig.plot(x=x, y=y, style=style, pen=\"1p,red\", direction=[direction, length])\nfig.text(text=\"CARTESIAN\", x=-112, y=44.2, font=\"13p,Helvetica-Bold,red\", fill=\"white\")\n\n\n# Middle: plot 7 math angle arcs with different radii\nnum = 7\nx = np.full(num, -95) # x coordinates of the center\ny = np.full(num, 37) # y coordinates of the center\nradius = 1.8 - 0.2 * np.arange(0, num) # radius\nstartdir = np.full(num, 90) # start direction in degrees\nstopdir = 180 + 40 * np.arange(0, num) # stop direction in degrees\n# data for circular vectors\ndata = np.column_stack([x, y, radius, startdir, stopdir])\narcstyle = \"m0.5c+ea\" # Circular vector (m) with an arrow at the end\nfig.plot(data=data, style=arcstyle, fill=\"red3\", pen=\"1.5p,black\")\nfig.text(text=\"CIRCULAR\", x=-95, y=44.2, font=\"13p,Helvetica-Bold,black\", fill=\"white\")\n\n\n# Right: plot geographic vectors using endpoints\nNYC = [-74.0060, 40.7128]\nCHI = [-87.6298, 41.8781]\nSEA = [-122.3321, 47.6062]\nNO = [-90.0715, 29.9511]\n# '=' means geographic vectors. With the modifier '+s', the input data should contain\n# coordinates of start and end points\nstyle = \"=0.5c+s+e+a30+gblue+h0.5+p1p,blue\"\ndata = np.array([NYC + CHI, NYC + SEA, NYC + NO])\nfig.plot(data=data, style=style, pen=\"1.0p,blue\")\nfig.text(\n text=\"GEOGRAPHIC\", x=-74.5, y=44.2, font=\"13p,Helvetica-Bold,blue\", fill=\"white\"\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/ef6bc1f26c32366408d403de81db1e34/colorbar.ipynb b/v0.14.0/_downloads/ef6bc1f26c32366408d403de81db1e34/colorbar.ipynb new file mode 100644 index 00000000000..16dd29e04bc --- /dev/null +++ b/v0.14.0/_downloads/ef6bc1f26c32366408d403de81db1e34/colorbar.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Colorbar\n\nThe :meth:`pygmt.Figure.colorbar` method creates a color scalebar.\nThe colormap is set via the ``cmap`` parameter. A full list of available\ncolor palette tables can be found at :gmt-docs:`reference/cpts.html`.\nUse the ``frame`` parameter to add labels to the **x** and **y** axes\nof the colorbar by appending **+l** followed by the desired text. To add\nand adjust the annotations (**a**) and ticks (**f**) append the letter\nfollowed by the desired interval. The placement of the colorbar is set\nvia the ``position`` parameter. There are the following options:\n\n- **j/J**: placed inside/outside the plot bounding box using any 2-character\n combination of vertical (**T**\\ op, **M**\\ iddle, **B**\\ ottom) and\n horizontal (**L**\\ eft, **C**\\ enter, **R**\\ ight) alignment codes, e.g.\n ``position=\"jTR\"`` for Top Right.\n- **g**: using map coordinates, e.g. ``position=\"g170/-45\"`` for longitude\n 170\u00b0 East, latitude 45\u00b0 South.\n- **x**: using paper coordinates, e.g. ``position=\"x5c/7c\"`` for 5 cm, 7 cm\n from anchor point.\n- **n**: using normalized (0-1) coordinates, e.g. ``position=\"n0.4/0.8\"``.\n\nNote that the anchor point defaults to Bottom Left (**BL**). Append ``+h`` to\n``position`` to get a horizontal colorbar instead of a vertical one (``+v``).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.basemap(region=[0, 3, 6, 9], projection=\"x3c\", frame=[\"af\", \"WSne+tColorbars\"])\n\n# ============\n# Create a colorbar designed for seismic tomography - roma\n# Colorbar is placed at Bottom Center (BC) by default if no position is given\n# Add quantity and unit as labels (\"+l\") to the x and y axes\n# Add annotations (\"+a\") in steps of 0.5 and ticks (\"+f\") in steps of 0.1\nfig.colorbar(cmap=\"roma\", frame=[\"xa0.5f0.1+lVelocity\", \"y+lm/s\"])\n\n# ============\n# Create a colorbar showing the scientific rainbow - batlow\nfig.colorbar(\n cmap=\"batlow\",\n # Colorbar positioned at map coordinates (g) longitude/latitude 0.3/8.7,\n # with a length/width (+w) of 4 cm by 0.5 cm, and plotted horizontally (+h)\n position=\"g0.3/8.7+w4c/0.5c+h\",\n box=True,\n frame=[\"x+lTemperature\", \"y+l\u00b0C\"],\n scale=100,\n)\n\n# ============\n# Create a colorbar suitable for surface topography - oleron\nfig.colorbar(\n cmap=\"oleron\",\n # Colorbar placed outside the plot bounding box (J) at Middle Right (MR),\n # offset (+o) by 1 cm horizontally and 0 cm vertically from anchor point,\n # with a length/width (+w) of 7 cm by 0.5 cm and a box for NaN values (+n)\n position=\"JMR+o1c/0c+w7c/0.5c+n+mc\",\n # Note that the label 'Elevation' is moved to the opposite side and plotted\n # vertically as a column of text using '+mc' in the position parameter\n # above\n frame=[\"x+lElevation\", \"y+lm\"],\n scale=10,\n)\n\n# ============\n# Create a colorbar suitable for categorical data - hawaii\n# Set up the colormap\npygmt.makecpt(\n cmap=\"hawaii\",\n series=[0, 3, 1],\n # Comma-separated string for the annotations of the colorbar\n color_model=\"+cA,B,C,D\",\n)\n# Plot the colorbar\nfig.colorbar(\n cmap=True, # Use colormap set up above\n # Colorbar placed inside the plot bounding box (j) in the Bottom Left (BL) corner,\n # with an offset (+o) by 0.5 cm horizontally and 0.8 cm vertically from the anchor\n # point, and plotted horizontally (+h)\n position=\"jBL+o0.5c/0.8c+h\",\n box=True,\n # Divide colorbar into equal-sized rectangles\n equalsize=0.5,\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/f0502c003b4111f3ef83f527adf9b3e8/patterns.ipynb b/v0.14.0/_downloads/f0502c003b4111f3ef83f527adf9b3e8/patterns.ipynb new file mode 100644 index 00000000000..51fec3ccc7a --- /dev/null +++ b/v0.14.0/_downloads/f0502c003b4111f3ef83f527adf9b3e8/patterns.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Bit and hachure patterns\n\nIn addition to colors, PyGMT also allows using bit and hachure patterns to fill\nsymbols, polygons, and other areas, via the ``fill`` parameter or similar parameters.\n\nExample method parameters that support bit and hachure patterns include:\n\n- :meth:`pygmt.Figure.coast`: Land and water masses via ``land`` and ``water``\n- :meth:`pygmt.Figure.histogram`: Histogram bars via ``fill``\n- :meth:`pygmt.Figure.meca`: Focal mechanisms via ``compressionfill`` and\n ``extensionfill``\n- :meth:`pygmt.Figure.plot`: Symbols and polygons via ``fill``\n- :meth:`pygmt.Figure.rose`: Histogram sectors via ``fill``\n- :meth:`pygmt.Figure.solar`: Day-light terminators via ``fill``\n- :meth:`pygmt.Figure.ternary`: Symbols via ``fill``\n- :meth:`pygmt.Figure.velo`: Uncertainty wedges and velocity error ellipses via\n ``uncertaintyfill``\n- :meth:`pygmt.Figure.wiggle`: Anomalies via ``fillpositive`` and ``fillnegative``\n\nGMT provides 90 predefined patterns that can be used in PyGMT. The patterns are numbered\nfrom 1 to 90, and can be colored and inverted. The resolution of the pattern\ncan be changed, and the background and foreground colors can be set. For a complete list\nof available patterns and the full syntax to specify a pattern, refer to the\n:doc:`/techref/patterns`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\n# A list of patterns that will be demonstrated.\n# To use a pattern as fill append \"p\" and the number of the desired pattern.\n# By default, the pattern is plotted in black and white with a resolution of 300 dpi.\npatterns = [\n # Plot a hachted pattern via pattern number 8\n \"p8\",\n # Plot a dotted pattern via pattern number 19\n \"p19\",\n # Set the background color (\"+b\") to \"red3\" and the foreground color (\"+f\") to\n # \"lightgray\"\n \"p19+bred3+flightbrown\",\n # Invert the pattern by using a capitalized \"P\"\n \"P19+bred3+flightbrown\",\n # Change the resolution (\"+r\") to 100 dpi\n \"p19+bred3+flightbrown+r100\",\n # Make the background transparent by not giving a color after \"+b\";\n # works analogous for the foreground\n \"p19+b+flightbrown+r100\",\n]\n\nfig = pygmt.Figure()\nfig.basemap(\n region=[0, 10, 0, 12],\n projection=\"X10c\",\n frame=\"rlbt+glightgray+tBit and Hachure Patterns\",\n)\n\ny = 11\nfor pattern in patterns:\n # Plot a square with the pattern as fill.\n # The square has a size of 2 centimeters with a 1 point thick, black outline.\n fig.plot(x=2, y=y, style=\"s2c\", pen=\"1p,black\", fill=pattern)\n # Add a description of the pattern.\n fig.text(x=4, y=y, text=pattern, font=\"Courier-Bold\", justify=\"ML\")\n y -= 2\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/f1a4b40c237f2c9268e928ec511db7fd/misc_winkel_tripel.py b/v0.14.0/_downloads/f1a4b40c237f2c9268e928ec511db7fd/misc_winkel_tripel.py new file mode 100644 index 00000000000..51c9d741745 --- /dev/null +++ b/v0.14.0/_downloads/f1a4b40c237f2c9268e928ec511db7fd/misc_winkel_tripel.py @@ -0,0 +1,32 @@ +r""" +Winkel Tripel projection +======================== + +In 1921, the German mathematician Oswald Winkel made a projection that was to +strike a compromise between the properties of three elements (area, angle and +distance). The German word "tripel" refers to this junction of where each of +these elements are least distorted when plotting global maps. The projection +was popularized when Bartholomew and Son started to use it in its +world-renowned "The Times Atlas of the World" in the mid-20th century. In 1998, +the National Geographic Society made the Winkel Tripel as its map projection of +choice for global maps. + +Naturally, this projection is neither conformal, nor equal-area. Central +meridian and equator are straight lines; other parallels and meridians are +curved. The projection is obtained by averaging the coordinates of the +Equidistant Cylindrical and Aitoff (not Hammer-Aitoff) projections. The poles +map into straight lines 0.4 times the length of equator. + +**r**\ [*lon0/*]\ *scale* or **R**\ [*lon0/*]\ *width* + +The projection is set with **r** or **R**. The central meridian is set with the +optional *lon0*, and the figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Use region "d" to specify global region (-180/180/-90/90) +fig.coast(region="d", projection="R12c", frame="afg", land="ivory", water="bisque4") +fig.show() diff --git a/v0.14.0/_downloads/f1fdc30144320fad7dffc87599d1a091/azim_orthographic.ipynb b/v0.14.0/_downloads/f1fdc30144320fad7dffc87599d1a091/azim_orthographic.ipynb new file mode 100644 index 00000000000..ec983da4813 --- /dev/null +++ b/v0.14.0/_downloads/f1fdc30144320fad7dffc87599d1a091/azim_orthographic.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Orthographic projection\n\nThis is a perspective projection like the general perspective, but with the\ndifference that the point of perspective lies in infinite distance.\nIt is therefore often used to give the appearance of a globe viewed from outer\nspace, were one hemisphere can be seen as a whole. It is neither conformal nor\nequal-area and the distortion increases near the edges.\n\n**g**\\ *lon0/lat0*\\ [*/horizon*\\ ]\\ */scale*\nor **G**\\ *lon0/lat0*\\ [*/horizon*\\ ]\\ */width*\n\n**g** or **G** specifies the projection type, *lon0/lat0* specifies the\nprojection center, the optional parameter *horizon* specifies the maximum\ndistance from projection center (in degrees, <= 90, default 90), and *scale*\nand *width* set the figure size.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt\n\nfig = pygmt.Figure()\nfig.coast(\n region=\"g\",\n projection=\"G10/52/12c\",\n frame=\"afg\",\n land=\"khaki\",\n water=\"white\",\n)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/f446f085a6647fc75715fcaedb755d36/velo_arrow_ellipse.ipynb b/v0.14.0/_downloads/f446f085a6647fc75715fcaedb755d36/velo_arrow_ellipse.ipynb new file mode 100644 index 00000000000..73c23f2cb93 --- /dev/null +++ b/v0.14.0/_downloads/f446f085a6647fc75715fcaedb755d36/velo_arrow_ellipse.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Velocity arrows and confidence ellipses\n\nThe :meth:`pygmt.Figure.velo` method can be used to plot mean velocity arrows and\nconfidence ellipses. The example below plots red velocity arrows with lightblue\nconfidence ellipses outlined in red with the east_velocity x north_velocity used for\nthe station names. Note that the velocity arrows are scaled by 0.2 and the 39%\nconfidence limit will give an ellipse which fits inside a rectangle of dimension\neast_sigma by north_sigma.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pandas as pd\nimport pygmt\n\nfig = pygmt.Figure()\ndf = pd.DataFrame(\n data={\n \"x\": [0, -8, 0, -5, 5, 0],\n \"y\": [-8, 5, 0, -5, 0, -5],\n \"east_velocity\": [0, 3, 4, 6, -6, 6],\n \"north_velocity\": [0, 3, 6, 4, 4, -4],\n \"east_sigma\": [4, 0, 4, 6, 6, 6],\n \"north_sigma\": [6, 0, 6, 4, 4, 4],\n \"correlation_EN\": [0.5, 0.5, 0.5, 0.5, -0.5, -0.5],\n \"SITE\": [\"0x0\", \"3x3\", \"4x6\", \"6x4\", \"-6x4\", \"6x-4\"],\n }\n)\nfig.velo(\n data=df,\n region=[-10, 8, -10, 6],\n projection=\"x0.8c\",\n frame=[\"WSne\", \"2g2f\"],\n spec=\"e0.2/0.39+f18\",\n uncertaintyfill=\"lightblue1\",\n pen=\"0.6p,red\",\n line=True,\n vector=\"0.3c+p1p+e+gred\",\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/f4ac6319c61583b30c09bf7048bfbb28/quoted_lines.ipynb b/v0.14.0/_downloads/f4ac6319c61583b30c09bf7048bfbb28/quoted_lines.ipynb new file mode 100644 index 00000000000..a01be864866 --- /dev/null +++ b/v0.14.0/_downloads/f4ac6319c61583b30c09bf7048bfbb28/quoted_lines.ipynb @@ -0,0 +1,61 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Quoted lines\n\nTo plot a so-called *quoted line*, i.e., labels along a line\nor curve, use the ``style`` parameter of the\n:meth:`pygmt.Figure.plot` method with the argument ``\"q\"`` and the\ndesired modifiers. A colon (``\":\"``) is used to separate the\nalgorithm settings from the label information.\nThis example shows how to adjust the labels.\nFor modifying the main quoted line via the ``pen`` parameter,\nsee the :doc:`Line styles example `.\nFor details on the input data see the upstream GMT documentation\nat :gmt-docs:`plot.html#s`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Generate a two-point line for plotting\nx = np.array([1, 4])\ny = np.array([20, 20])\n\nfig = pygmt.Figure()\nfig.basemap(region=[0, 10, 0, 20], projection=\"X15c/15c\", frame=\"+tQuoted Lines\")\n\n# Plot different quoted lines\nfor quotedline in [\n # Line with labels (\"+l\") \"text\" in distance (\"d\") of 1 centimeter\n \"qd1c:+ltext\",\n # Suppress the main quoted line by appending \"+i\"\n \"qd1c:+ltext+i\",\n # Give the number of equally spaced labels by using \"n\" instead of \"d\"\n \"qn5:+ltext\",\n # Use upper-case \"N\" to have labels at the start and end of the line\n \"qN5:+ltext\",\n # To only plot a label at the start of the line use \"N-1\"\n \"qN-1:+ltext\",\n # To only plot a label at the end of the line use \"N+1\"\n \"qN+1:+ltext\",\n # Adjust the justification of the labels via \"+j\", here Top Center\n \"qd1c:+ltext+jTC\",\n # Shift labels using \"+n\" in x and y directions relative to the main\n # quoted line\n \"qd1c:+ltext+n-0.5c/0.1c\",\n # Rotate labels via \"+a\" (counter-clockwise from horizontal)\n \"qd1c:+ltext+a20\",\n # Adjust size, type, and color of the font via \"+f\"\n \"qd1c:+ltext+f12p,Times-Bold,red\",\n # Add a box around the label via \"+p\"\n \"qd1c:+ltext+p\",\n # Adjust thickness, color, and style of the outline\n \"qd1c:+ltext+p0.5p,blue,dashed\",\n # Append \"+o\" to get a box with rounded edges\n \"qd1c:+ltext+p0.5p,blue+o\",\n # Adjust the space between label and box in x and y directions via \"+c\"\n \"qd1c:+ltext+p0.5p,blue+o+c0.1c/0.1c\",\n # Give a fill of the box via \"+g\" together with the desired color\n \"qd1c:+ltext+gdodgerblue\",\n]:\n y -= 1 # Move current line down\n fig.plot(x=x, y=y, pen=\"1.25p\", style=quotedline)\n fig.text(\n x=x[-1],\n y=y[-1],\n text=quotedline,\n font=\"Courier-Bold\",\n justify=\"ML\",\n offset=\"0.75c/0c\",\n )\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For curved labels following the line, append ``\"+v\"`` to the argument passed\nto the ``style`` parameter.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Generate sine curve\nx = np.arange(0, 10 * np.pi, 0.1)\ny = np.sin(0.8 * x)\n\nfig = pygmt.Figure()\n\nfig.basemap(region=[0, 30, -4, 4], projection=\"X10c/5c\", frame=True)\n\nfig.plot(x=x, y=y + 2, style=\"qd1.2c:+lstraight text+f5p\", pen=\"1p,blue\")\n\nfig.plot(\n x=x,\n y=y - 2,\n # Append \"+v\" to force curved labels\n style=\"qd1.2c:+lcurved text+f5p+v\",\n pen=\"1p,blue\",\n)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/f54bcce86166269d8114eb54b9040402/subplots.ipynb b/v0.14.0/_downloads/f54bcce86166269d8114eb54b9040402/subplots.ipynb new file mode 100644 index 00000000000..ac7210fe905 --- /dev/null +++ b/v0.14.0/_downloads/f54bcce86166269d8114eb54b9040402/subplots.ipynb @@ -0,0 +1,217 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Making subplots\n\nWhen you're preparing a figure for a paper, there will often be times when\nyou'll need to put many individual plots into one large figure, and label them\n'abcd'. These individual plots are called subplots.\n\nThere are two main ways to create subplots in GMT:\n\n- Use :meth:`pygmt.Figure.shift_origin` to manually move each individual plot\n to the right position.\n- Use :meth:`pygmt.Figure.subplot` to define the layout of the subplots.\n\nThe first method is easier to use and should handle simple cases involving a\ncouple of subplots. For more advanced subplot layouts, however, we recommend\nthe use of :meth:`pygmt.Figure.subplot` which offers finer grained control, and\nthis is what the tutorial below will cover.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import pygmt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's start by initializing a :class:`pygmt.Figure` instance.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Define subplot layout\n\nThe :meth:`pygmt.Figure.subplot` method is used to set up the layout, size,\nand other attributes of the figure. It divides the whole canvas into regular\ngrid areas with *n* rows and *m* columns. Each grid area can contain an\nindividual subplot. For example:\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "```default\nwith fig.subplot(nrows=2, ncols=3, figsize=(\"15c\", \"6c\"), frame=\"lrtb\"):\n ...\n```\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "will define our figure to have a 2 row and 3 column grid layout.\n``figsize=(\"15c\", \"6c\")`` defines the overall size of the figure to be 15 cm\nwide by 6 cm high. Using ``frame=\"lrtb\"`` allows us to customize the map\nframe for all subplots instead of setting them individually. The figure\nlayout will look like the following:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "with fig.subplot(nrows=2, ncols=3, figsize=(\"15c\", \"6c\"), frame=\"lrtb\"):\n for i in range(2): # row number starting from 0\n for j in range(3): # column number starting from 0\n index = i * 3 + j # index number starting from 0\n with fig.set_panel(panel=index): # sets the current panel\n fig.text(\n position=\"MC\",\n text=f\"index: {index}; row: {i}, col: {j}\",\n region=[0, 1, 0, 1],\n )\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The :meth:`pygmt.Figure.set_panel` method activates a specified subplot,\nand all subsequent plotting methods will take place in that subplot panel.\nThis is similar to matplotlib's ``plt.sca`` method. In order to specify a\nsubplot, you will need to provide the identifier for that subplot via the\n``panel`` parameter. Pass in either the *index* number, or a tuple/list like\n(*row*, *col*) to ``panel``.\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Note

The row and column numbering starts from 0. So for a subplot layout with\n N rows and M columns, row numbers will go from 0 to N-1, and column\n numbers will go from 0 to M-1.

\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For example, to activate the subplot on the top right corner (index: 2) at\n*row*\\=0 and *col*\\=2, so that all subsequent plotting commands happen\nthere, you can use the following command:\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "```default\nwith fig.set_panel(panel=[0, 2]):\n ...\n```\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Making your first subplot\n\nNext, let's use what we learned above to make a 2 row by 2 column subplot\nfigure. We'll also pick up on some new parameters to configure our subplot.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nwith fig.subplot(\n nrows=2,\n ncols=2,\n figsize=(\"15c\", \"6c\"),\n autolabel=True,\n frame=[\"af\", \"WSne\"],\n margins=[\"0.1c\", \"0.2c\"],\n title=\"My Subplot Heading\",\n):\n fig.basemap(region=[0, 10, 0, 10], projection=\"X?\", panel=[0, 0])\n fig.basemap(region=[0, 20, 0, 10], projection=\"X?\", panel=[0, 1])\n fig.basemap(region=[0, 10, 0, 20], projection=\"X?\", panel=[1, 0])\n fig.basemap(region=[0, 20, 0, 20], projection=\"X?\", panel=[1, 1])\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In this example, we define a 2-row, 2-column (2x2) subplot layout using\n:meth:`pygmt.Figure.subplot`. The overall figure dimensions is set to be\n15 cm wide and 6 cm high (``figsize=[\"15c\", \"6c\"]``). In addition, we use\nsome optional parameters to fine-tune some details of the figure creation:\n\n- ``autolabel=True``: Each subplot is automatically labelled 'abcd'.\n- ``margins=[\"0.1c\", \"0.2c\"]``: Adjusts the space between adjacent subplots.\n In this case, it is set as 0.1 cm in the x-direction and 0.2 cm in the\n y-direction.\n- ``title=\"My Subplot Heading\"``: Adds a title on top of the whole figure.\n\nNotice that each subplot was set to use a linear projection ``\"X?\"``.\nUsually, we need to specify the width and height of the map frame, but it is\nalso possible to use a question mark ``\"?\"`` to let GMT decide automatically\non what is the most appropriate width/height for each subplot's map frame.\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + ".. tip::\n\n In the above example, we used the following commands to activate the\n four subplots explicitly one after another::\n\n fig.basemap(..., panel=[0, 0])\n fig.basemap(..., panel=[0, 1])\n fig.basemap(..., panel=[1, 0])\n fig.basemap(..., panel=[1, 1])\n\n In fact, we can just use ``fig.basemap(..., panel=True)`` without\n specifying any subplot index number, and GMT will automatically activate\n the next subplot panel.\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Note

All plotting methods (e.g. :meth:`pygmt.Figure.coast`,\n :meth:`pygmt.Figure.text`, etc) are able to use ``panel`` parameter when\n in subplot mode. Once a panel is activated using ``panel`` or\n :meth:`pygmt.Figure.set_panel`, subsequent plotting commands that don't\n set a ``panel`` will have their elements added to the same panel as\n before.

\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Shared x- and y-axes\n\nIn the example above with the four subplots, the two subplots for each row\nhave the same y-axis range, and the two subplots for each column have the\nsame x-axis range. You can use the ``sharex``/``sharey`` parameters to set a\ncommon x- and/or y-axis between subplots.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\nwith fig.subplot(\n nrows=2,\n ncols=2,\n figsize=(\"15c\", \"6c\"), # width of 15 cm, height of 6 cm\n autolabel=True,\n margins=[\"0.3c\", \"0.2c\"], # horizontal 0.3 cm and vertical 0.2 cm margins\n title=\"My Subplot Heading\",\n sharex=\"b\", # shared x-axis on the bottom side\n sharey=\"l\", # shared y-axis on the left side\n frame=\"WSrt\",\n):\n fig.basemap(region=[0, 10, 0, 10], projection=\"X?\", panel=True)\n fig.basemap(region=[0, 20, 0, 10], projection=\"X?\", panel=True)\n fig.basemap(region=[0, 10, 0, 20], projection=\"X?\", panel=True)\n fig.basemap(region=[0, 20, 0, 20], projection=\"X?\", panel=True)\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "``sharex=\"b\"`` indicates that subplots in a column will share the x-axis, and\nonly the **b**\\ ottom axis is displayed. ``sharey=\"l\"`` indicates that\nsubplots within a row will share the y-axis, and only the **l**\\ eft axis is\ndisplayed.\n\nOf course, instead of using the ``sharex``/``sharey`` parameters, you can\nalso set a different ``frame`` for each subplot to control the axis\nproperties individually for each subplot.\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Advanced subplot layouts\n\nNested subplots are currently not supported. If you want to create more\ncomplex subplot layouts, some manual adjustments are needed.\n\nThe following example draws three subplots in a 2-row, 2-column layout, with\nthe first subplot occupying the first row.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = pygmt.Figure()\n# Bottom row, two subplots\nwith fig.subplot(nrows=1, ncols=2, figsize=(\"15c\", \"3c\"), autolabel=\"b)\"):\n fig.basemap(\n region=[0, 5, 0, 5], projection=\"X?\", frame=[\"af\", \"WSne\"], panel=[0, 0]\n )\n fig.basemap(\n region=[0, 5, 0, 5], projection=\"X?\", frame=[\"af\", \"WSne\"], panel=[0, 1]\n )\n# Move plot origin by 1 cm above the height of the entire figure\nfig.shift_origin(yshift=\"h+1c\")\n# Top row, one subplot\nwith fig.subplot(nrows=1, ncols=1, figsize=(\"15c\", \"3c\"), autolabel=\"a)\"):\n fig.basemap(\n region=[0, 10, 0, 10], projection=\"X?\", frame=[\"af\", \"WSne\"], panel=[0, 0]\n )\n fig.text(text=\"TEXT\", x=5, y=5)\n\nfig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We start by drawing the bottom two subplots, setting ``autolabel=\"b)\"`` so\nthat the subplots are labelled 'b)' and 'c)'. Next, we use\n:meth:`pygmt.Figure.shift_origin` to move the plot origin 1 cm above the\n**h**\\ eight of the entire figure that is currently plotted (i.e. the bottom\nrow subplots). A single subplot is then plotted on the top row. You may need\nto adjust the ``yshift`` parameter to make your plot look nice. This top row\nuses ``autolabel=\"a)\"``, and we also plotted some text inside. Note that\n``projection=\"X?\"`` was used to let GMT automatically determine the size of\nthe subplot according to the size of the subplot area.\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You can also manually override the ``autolabel`` for each subplot using for\nexample, ``fig.set_panel(..., fixedlabel=\"b) Panel 2\")`` which would allow\nyou to manually label a single subplot as you wish. This can be useful for\nadding a more descriptive subtitle to individual subplots.\n\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/f770416fe9213e990139e6c643aad4ac/frames.zip b/v0.14.0/_downloads/f770416fe9213e990139e6c643aad4ac/frames.zip new file mode 100644 index 00000000000..be45d0caac5 Binary files /dev/null and b/v0.14.0/_downloads/f770416fe9213e990139e6c643aad4ac/frames.zip differ diff --git a/v0.14.0/_downloads/f816670ec38f522b49a7acbad0f2bdc6/colorbars_multiple.zip b/v0.14.0/_downloads/f816670ec38f522b49a7acbad0f2bdc6/colorbars_multiple.zip new file mode 100644 index 00000000000..d5ce5b116fc Binary files /dev/null and b/v0.14.0/_downloads/f816670ec38f522b49a7acbad0f2bdc6/colorbars_multiple.zip differ diff --git a/v0.14.0/_downloads/fa2673373a3d041d6a3d32e769a4687e/conic_albers.py b/v0.14.0/_downloads/fa2673373a3d041d6a3d32e769a4687e/conic_albers.py new file mode 100644 index 00000000000..bad5f03e380 --- /dev/null +++ b/v0.14.0/_downloads/fa2673373a3d041d6a3d32e769a4687e/conic_albers.py @@ -0,0 +1,35 @@ +r""" +Albers conic equal-area projection +================================== + +This projection, developed by Heinrich C. Albers in 1805, is predominantly used +to map regions of large east-west extent, in particular the United States. It +is a conic, equal-area projection, in which parallels are unequally spaced arcs +of concentric circles, more closely spaced at the north and south edges of the +map. Meridians, on the other hand, are equally spaced radii about a common +center, and cut the parallels at right angles. Distortion in scale and shape +vanishes along the two standard parallels. Between them, the scale along +parallels is too small; beyond them it is too large. The opposite is true for +the scale along meridians. + +**b**\ *lon0/lat0*\ /\ *lat1/lat2*\ */scale* +or **B**\ *lon0/lat0*\ /\ *lat1/lat2*\ */width* + +The projection is set with **b** or **B**. The projection center is set by +*lon0/lat0* and two standard parallels for the map are set with *lat1/lat2*. +The figure size is set with *scale* or *width*. +""" + +# %% +import pygmt + +fig = pygmt.Figure() +# Use the ISO country code for Brazil and add a padding of 2 degrees (+R2) +fig.coast( + region="BR+R2", + projection="B-55/-15/-25/0/12c", + frame="afg", + land="seagreen", + water="gray90", +) +fig.show() diff --git a/v0.14.0/_downloads/fb621df1d3f404f7fa83c9d66c4a7fd1/date_time_charts.zip b/v0.14.0/_downloads/fb621df1d3f404f7fa83c9d66c4a7fd1/date_time_charts.zip new file mode 100644 index 00000000000..535a82ccf63 Binary files /dev/null and b/v0.14.0/_downloads/fb621df1d3f404f7fa83c9d66c4a7fd1/date_time_charts.zip differ diff --git a/v0.14.0/_downloads/fbef9da290a64c1bfae4a6113478f28d/cartesian_power.ipynb b/v0.14.0/_downloads/fbef9da290a64c1bfae4a6113478f28d/cartesian_power.ipynb new file mode 100644 index 00000000000..ddaf3d5fd62 --- /dev/null +++ b/v0.14.0/_downloads/fbef9da290a64c1bfae4a6113478f28d/cartesian_power.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Cartesian power\n\n**X**\\ *width*\\ [**p**\\ *pvalue*][/*height*\\ [**p**\\ *pvalue*]] or\n**x**\\ *x-scale*\\ [**p**\\ *pvalue*][/*y-scale*\\ [**p**\\ *pvalue*]]\n\nGive the *width* of the figure and the optional argument *height*.\nThe lower-case version **x** is similar to **X** but expects\nan *x-scale* and an optional *y-scale*.\nEach axis with a power transformation requires **p** and the exponent\nfor that axis after its size argument.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Create a list of y-values 0-10\nyvalues = np.arange(0, 11)\n# Create a list of x-values that are the square of the y-values\nxvalues = yvalues**2\n\nfig = pygmt.Figure()\nfig.basemap(\n region=[0, 100, 0, 10],\n # Set the power transformation of the x-axis, with a power of 0.5\n projection=\"X15cp0.5/10c\",\n # Set the figures frame as well as annotations and ticks\n # The \"p\" forces to show only square numbers as annotations of the x-axis\n frame=[\"WSne+gbisque\", \"xfga1p\", \"ya2f1g\"],\n)\n\n# Set the line thickness to \"thick\" (equals \"1p\", i.e. 1 point)\n# Use as color \"black\" (default) and as style \"solid\" (default)\nfig.plot(x=xvalues, y=yvalues, pen=\"thick,black,solid\")\n\n# Plot the data points on top of the line\n# Use circles with 0.3 centimeters diameter, with an \"orange\" fill and a \"black\" outline\n# Symbols are not clipped if they go off the figure\nfig.plot(x=xvalues, y=yvalues, style=\"c0.3c\", fill=\"orange\", pen=\"black\", no_clip=True)\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/fcb799663adf8ffe9f88e1b6d076326f/contours.zip b/v0.14.0/_downloads/fcb799663adf8ffe9f88e1b6d076326f/contours.zip new file mode 100644 index 00000000000..4ad233b3473 Binary files /dev/null and b/v0.14.0/_downloads/fcb799663adf8ffe9f88e1b6d076326f/contours.zip differ diff --git a/v0.14.0/_downloads/fd5290a478b39b6e70f563ad7bdc92b9/double_y_axes.ipynb b/v0.14.0/_downloads/fd5290a478b39b6e70f563ad7bdc92b9/double_y_axes.ipynb new file mode 100644 index 00000000000..310efdcd2c7 --- /dev/null +++ b/v0.14.0/_downloads/fd5290a478b39b6e70f563ad7bdc92b9/double_y_axes.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Double Y-axes graph\n\nThe ``frame`` parameter of the plotting methods of the :class:`pygmt.Figure`\nclass can control which axes should be plotted and optionally show annotations,\ntick marks, and gridlines. By default, all 4 axes are plotted, along with\nannotations and tick marks (denoted **W**, **S**, **E**, **N**). Lower case\nversions (**w**, **s**, **e**, **n**) can be used to denote to only plot the\naxes with tick marks. We can also only plot the axes without annotations and\ntick marks using **l** (left axis), **r** (right axis), **t** (top axis),\n**b** (bottom axis). When ``frame`` is used to change the frame settings, any\naxes that are not defined using one of these three options are not drawn.\n\nTo plot a double Y-axes graph using PyGMT, we need to plot at least two base\nmaps separately. The base maps should share the same projection parameter and\nx-axis limits, but different y-axis limits.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\nimport pygmt\n\n# Generate two sample Y data from one common X data\nx = np.linspace(1.0, 9.0, num=9)\ny1 = x\ny2 = x**2 + 110\n\nfig = pygmt.Figure()\n\n# Plot the common X axes\n# The bottom axis (S) is plotted with annotations and tick marks\n# The top axis (t) is plotted without annotations and tick marks\n# The left and right axes are not drawn\nfig.basemap(region=[0, 10, 0, 10], projection=\"X15c/15c\", frame=[\"St\", \"xaf+lx\"])\n\n# Plot the Y axis for y1 data\n# The left axis (W) is plotted with blue annotations, ticks, and label\nwith pygmt.config(\n MAP_FRAME_PEN=\"blue\",\n MAP_TICK_PEN=\"blue\",\n FONT_ANNOT_PRIMARY=\"blue\",\n FONT_LABEL=\"blue\",\n):\n fig.basemap(frame=[\"W\", \"yaf+ly1\"])\n\n# Plot the line for y1 data\nfig.plot(x=x, y=y1, pen=\"1p,blue\")\n# Plot points for y1 data\nfig.plot(x=x, y=y1, style=\"c0.2c\", fill=\"blue\", label=\"y1\")\n\n# Plot the Y axis for y2 data\n# The right axis (E) is plotted with red annotations, ticks, and label\nwith pygmt.config(\n MAP_FRAME_PEN=\"red\",\n MAP_TICK_PEN=\"red\",\n FONT_ANNOT_PRIMARY=\"red\",\n FONT_LABEL=\"red\",\n):\n fig.basemap(region=[0, 10, 100, 200], frame=[\"E\", \"yaf+ly2\"])\n# Plot the line for y2 data\nfig.plot(x=x, y=y2, pen=\"1p,red\")\n# Plot points for y2 data\nfig.plot(x=x, y=y2, style=\"s0.28c\", fill=\"red\", label=\"y2\")\n\n# Create a legend in the Top Left (TL) corner of the plot with an\n# offset of 0.1 centimeters\nfig.legend(position=\"jTL+o0.1c\", box=True)\n\nfig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/v0.14.0/_downloads/fd52e7f12dd059a4485a8f5313138fa9/misc_van_der_grinten.zip b/v0.14.0/_downloads/fd52e7f12dd059a4485a8f5313138fa9/misc_van_der_grinten.zip new file mode 100644 index 00000000000..a2b57574941 Binary files /dev/null and b/v0.14.0/_downloads/fd52e7f12dd059a4485a8f5313138fa9/misc_van_der_grinten.zip differ diff --git a/v0.14.0/_downloads/ff25a0a3c8434f0002fad3ff2c2c5336/scatter_and_histograms.zip b/v0.14.0/_downloads/ff25a0a3c8434f0002fad3ff2c2c5336/scatter_and_histograms.zip new file mode 100644 index 00000000000..ebad64a5103 Binary files /dev/null and b/v0.14.0/_downloads/ff25a0a3c8434f0002fad3ff2c2c5336/scatter_and_histograms.zip differ diff --git a/v0.14.0/_downloads/ffcd50fe6cef7c9a4f9986b7194b83fc/double_y_axes.py b/v0.14.0/_downloads/ffcd50fe6cef7c9a4f9986b7194b83fc/double_y_axes.py new file mode 100644 index 00000000000..aa8ba8a6815 --- /dev/null +++ b/v0.14.0/_downloads/ffcd50fe6cef7c9a4f9986b7194b83fc/double_y_axes.py @@ -0,0 +1,70 @@ +""" +Double Y-axes graph +=================== + +The ``frame`` parameter of the plotting methods of the :class:`pygmt.Figure` +class can control which axes should be plotted and optionally show annotations, +tick marks, and gridlines. By default, all 4 axes are plotted, along with +annotations and tick marks (denoted **W**, **S**, **E**, **N**). Lower case +versions (**w**, **s**, **e**, **n**) can be used to denote to only plot the +axes with tick marks. We can also only plot the axes without annotations and +tick marks using **l** (left axis), **r** (right axis), **t** (top axis), +**b** (bottom axis). When ``frame`` is used to change the frame settings, any +axes that are not defined using one of these three options are not drawn. + +To plot a double Y-axes graph using PyGMT, we need to plot at least two base +maps separately. The base maps should share the same projection parameter and +x-axis limits, but different y-axis limits. +""" + +# %% +import numpy as np +import pygmt + +# Generate two sample Y data from one common X data +x = np.linspace(1.0, 9.0, num=9) +y1 = x +y2 = x**2 + 110 + +fig = pygmt.Figure() + +# Plot the common X axes +# The bottom axis (S) is plotted with annotations and tick marks +# The top axis (t) is plotted without annotations and tick marks +# The left and right axes are not drawn +fig.basemap(region=[0, 10, 0, 10], projection="X15c/15c", frame=["St", "xaf+lx"]) + +# Plot the Y axis for y1 data +# The left axis (W) is plotted with blue annotations, ticks, and label +with pygmt.config( + MAP_FRAME_PEN="blue", + MAP_TICK_PEN="blue", + FONT_ANNOT_PRIMARY="blue", + FONT_LABEL="blue", +): + fig.basemap(frame=["W", "yaf+ly1"]) + +# Plot the line for y1 data +fig.plot(x=x, y=y1, pen="1p,blue") +# Plot points for y1 data +fig.plot(x=x, y=y1, style="c0.2c", fill="blue", label="y1") + +# Plot the Y axis for y2 data +# The right axis (E) is plotted with red annotations, ticks, and label +with pygmt.config( + MAP_FRAME_PEN="red", + MAP_TICK_PEN="red", + FONT_ANNOT_PRIMARY="red", + FONT_LABEL="red", +): + fig.basemap(region=[0, 10, 100, 200], frame=["E", "yaf+ly2"]) +# Plot the line for y2 data +fig.plot(x=x, y=y2, pen="1p,red") +# Plot points for y2 data +fig.plot(x=x, y=y2, style="s0.28c", fill="red", label="y2") + +# Create a legend in the Top Left (TL) corner of the plot with an +# offset of 0.1 centimeters +fig.legend(position="jTL+o0.1c", box=True) + +fig.show() diff --git a/v0.14.0/_images/9196824ac766e9fbf9254a4bb45977e8cd5426b0904ea50106ec1ecda201873a.png b/v0.14.0/_images/9196824ac766e9fbf9254a4bb45977e8cd5426b0904ea50106ec1ecda201873a.png new file mode 100644 index 00000000000..77273a41597 Binary files /dev/null and b/v0.14.0/_images/9196824ac766e9fbf9254a4bb45977e8cd5426b0904ea50106ec1ecda201873a.png differ diff --git a/v0.14.0/_images/a9bb1433fed9d9d76328850660ff89d8093e2996d8363e267481ceb0f94fb8ca.png b/v0.14.0/_images/a9bb1433fed9d9d76328850660ff89d8093e2996d8363e267481ceb0f94fb8ca.png new file mode 100644 index 00000000000..97000b56ba2 Binary files /dev/null and b/v0.14.0/_images/a9bb1433fed9d9d76328850660ff89d8093e2996d8363e267481ceb0f94fb8ca.png differ diff --git a/v0.14.0/_images/agu2017-poster.jpg b/v0.14.0/_images/agu2017-poster.jpg new file mode 100644 index 00000000000..fbbccf7d68f Binary files /dev/null and b/v0.14.0/_images/agu2017-poster.jpg differ diff --git a/v0.14.0/_images/agu2019-poster.jpg b/v0.14.0/_images/agu2019-poster.jpg new file mode 100644 index 00000000000..64ff56fb99e Binary files /dev/null and b/v0.14.0/_images/agu2019-poster.jpg differ diff --git a/v0.14.0/_images/aogs2018-poster.jpg b/v0.14.0/_images/aogs2018-poster.jpg new file mode 100644 index 00000000000..b1ae2208f94 Binary files /dev/null and b/v0.14.0/_images/aogs2018-poster.jpg differ diff --git a/v0.14.0/_images/scipy2017-youtube-thumbnail.png b/v0.14.0/_images/scipy2017-youtube-thumbnail.png new file mode 100644 index 00000000000..adf37ef9819 Binary files /dev/null and b/v0.14.0/_images/scipy2017-youtube-thumbnail.png differ diff --git a/v0.14.0/_images/scipy2018-youtube-thumbnail.png b/v0.14.0/_images/scipy2018-youtube-thumbnail.png new file mode 100644 index 00000000000..7e331663ae6 Binary files /dev/null and b/v0.14.0/_images/scipy2018-youtube-thumbnail.png differ diff --git a/v0.14.0/_images/scipy2022-youtube-thumbnail.jpg b/v0.14.0/_images/scipy2022-youtube-thumbnail.jpg new file mode 100644 index 00000000000..3570f3250cc Binary files /dev/null and b/v0.14.0/_images/scipy2022-youtube-thumbnail.jpg differ diff --git a/v0.14.0/_images/scipy2022-youtube-thumbnail1.jpg b/v0.14.0/_images/scipy2022-youtube-thumbnail1.jpg new file mode 100644 index 00000000000..3570f3250cc Binary files /dev/null and b/v0.14.0/_images/scipy2022-youtube-thumbnail1.jpg differ diff --git a/v0.14.0/_images/sphx_glr_01_first_figure_001.png b/v0.14.0/_images/sphx_glr_01_first_figure_001.png new file mode 100644 index 00000000000..554a1b15c00 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_01_first_figure_001.png differ diff --git a/v0.14.0/_images/sphx_glr_01_first_figure_002.png b/v0.14.0/_images/sphx_glr_01_first_figure_002.png new file mode 100644 index 00000000000..f44e5ba750d Binary files /dev/null and b/v0.14.0/_images/sphx_glr_01_first_figure_002.png differ diff --git a/v0.14.0/_images/sphx_glr_01_first_figure_003.png b/v0.14.0/_images/sphx_glr_01_first_figure_003.png new file mode 100644 index 00000000000..a96897a46ab Binary files /dev/null and b/v0.14.0/_images/sphx_glr_01_first_figure_003.png differ diff --git a/v0.14.0/_images/sphx_glr_01_first_figure_004.png b/v0.14.0/_images/sphx_glr_01_first_figure_004.png new file mode 100644 index 00000000000..e538c3a9208 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_01_first_figure_004.png differ diff --git a/v0.14.0/_images/sphx_glr_01_first_figure_005.png b/v0.14.0/_images/sphx_glr_01_first_figure_005.png new file mode 100644 index 00000000000..5f7888f0b9c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_01_first_figure_005.png differ diff --git a/v0.14.0/_images/sphx_glr_01_first_figure_thumb.png b/v0.14.0/_images/sphx_glr_01_first_figure_thumb.png new file mode 100644 index 00000000000..cf7cc17528b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_01_first_figure_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_02_contour_map_001.png b/v0.14.0/_images/sphx_glr_02_contour_map_001.png new file mode 100644 index 00000000000..74726582e14 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_02_contour_map_001.png differ diff --git a/v0.14.0/_images/sphx_glr_02_contour_map_002.png b/v0.14.0/_images/sphx_glr_02_contour_map_002.png new file mode 100644 index 00000000000..ba753002766 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_02_contour_map_002.png differ diff --git a/v0.14.0/_images/sphx_glr_02_contour_map_003.png b/v0.14.0/_images/sphx_glr_02_contour_map_003.png new file mode 100644 index 00000000000..8beaad780c9 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_02_contour_map_003.png differ diff --git a/v0.14.0/_images/sphx_glr_02_contour_map_004.png b/v0.14.0/_images/sphx_glr_02_contour_map_004.png new file mode 100644 index 00000000000..8e727e9463c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_02_contour_map_004.png differ diff --git a/v0.14.0/_images/sphx_glr_02_contour_map_thumb.png b/v0.14.0/_images/sphx_glr_02_contour_map_thumb.png new file mode 100644 index 00000000000..dff2f0dccf4 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_02_contour_map_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_03_figure_element_001.png b/v0.14.0/_images/sphx_glr_03_figure_element_001.png new file mode 100644 index 00000000000..a00e3c48288 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_03_figure_element_001.png differ diff --git a/v0.14.0/_images/sphx_glr_03_figure_element_thumb.png b/v0.14.0/_images/sphx_glr_03_figure_element_thumb.png new file mode 100644 index 00000000000..8de0ab6f8f0 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_03_figure_element_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_04_table_inputs_001.png b/v0.14.0/_images/sphx_glr_04_table_inputs_001.png new file mode 100644 index 00000000000..0c7407ef1fa Binary files /dev/null and b/v0.14.0/_images/sphx_glr_04_table_inputs_001.png differ diff --git a/v0.14.0/_images/sphx_glr_04_table_inputs_002.png b/v0.14.0/_images/sphx_glr_04_table_inputs_002.png new file mode 100644 index 00000000000..7f4ca29afbd Binary files /dev/null and b/v0.14.0/_images/sphx_glr_04_table_inputs_002.png differ diff --git a/v0.14.0/_images/sphx_glr_04_table_inputs_003.png b/v0.14.0/_images/sphx_glr_04_table_inputs_003.png new file mode 100644 index 00000000000..78f1982fdb3 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_04_table_inputs_003.png differ diff --git a/v0.14.0/_images/sphx_glr_04_table_inputs_004.png b/v0.14.0/_images/sphx_glr_04_table_inputs_004.png new file mode 100644 index 00000000000..08ef3783411 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_04_table_inputs_004.png differ diff --git a/v0.14.0/_images/sphx_glr_04_table_inputs_thumb.png b/v0.14.0/_images/sphx_glr_04_table_inputs_thumb.png new file mode 100644 index 00000000000..8be082d11be Binary files /dev/null and b/v0.14.0/_images/sphx_glr_04_table_inputs_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_3d_perspective_image_001.png b/v0.14.0/_images/sphx_glr_3d_perspective_image_001.png new file mode 100644 index 00000000000..81e7b00f68c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_3d_perspective_image_001.png differ diff --git a/v0.14.0/_images/sphx_glr_3d_perspective_image_002.png b/v0.14.0/_images/sphx_glr_3d_perspective_image_002.png new file mode 100644 index 00000000000..a82fda144f6 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_3d_perspective_image_002.png differ diff --git a/v0.14.0/_images/sphx_glr_3d_perspective_image_003.png b/v0.14.0/_images/sphx_glr_3d_perspective_image_003.png new file mode 100644 index 00000000000..73c3229b8af Binary files /dev/null and b/v0.14.0/_images/sphx_glr_3d_perspective_image_003.png differ diff --git a/v0.14.0/_images/sphx_glr_3d_perspective_image_004.png b/v0.14.0/_images/sphx_glr_3d_perspective_image_004.png new file mode 100644 index 00000000000..05c8438b208 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_3d_perspective_image_004.png differ diff --git a/v0.14.0/_images/sphx_glr_3d_perspective_image_thumb.png b/v0.14.0/_images/sphx_glr_3d_perspective_image_thumb.png new file mode 100644 index 00000000000..3a97587f330 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_3d_perspective_image_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_azim_equidistant_001.png b/v0.14.0/_images/sphx_glr_azim_equidistant_001.png new file mode 100644 index 00000000000..f1a0456da12 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_azim_equidistant_001.png differ diff --git a/v0.14.0/_images/sphx_glr_azim_equidistant_thumb.png b/v0.14.0/_images/sphx_glr_azim_equidistant_thumb.png new file mode 100644 index 00000000000..d3044ddee97 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_azim_equidistant_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_azim_general_perspective_001.png b/v0.14.0/_images/sphx_glr_azim_general_perspective_001.png new file mode 100644 index 00000000000..96e38979e05 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_azim_general_perspective_001.png differ diff --git a/v0.14.0/_images/sphx_glr_azim_general_perspective_thumb.png b/v0.14.0/_images/sphx_glr_azim_general_perspective_thumb.png new file mode 100644 index 00000000000..e7a851c9222 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_azim_general_perspective_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_azim_general_stereographic_001.png b/v0.14.0/_images/sphx_glr_azim_general_stereographic_001.png new file mode 100644 index 00000000000..e7a18bb4e7f Binary files /dev/null and b/v0.14.0/_images/sphx_glr_azim_general_stereographic_001.png differ diff --git a/v0.14.0/_images/sphx_glr_azim_general_stereographic_thumb.png b/v0.14.0/_images/sphx_glr_azim_general_stereographic_thumb.png new file mode 100644 index 00000000000..553c895c582 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_azim_general_stereographic_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_azim_gnomonic_001.png b/v0.14.0/_images/sphx_glr_azim_gnomonic_001.png new file mode 100644 index 00000000000..28826dc0195 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_azim_gnomonic_001.png differ diff --git a/v0.14.0/_images/sphx_glr_azim_gnomonic_thumb.png b/v0.14.0/_images/sphx_glr_azim_gnomonic_thumb.png new file mode 100644 index 00000000000..7c6768fd0b9 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_azim_gnomonic_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_azim_lambert_001.png b/v0.14.0/_images/sphx_glr_azim_lambert_001.png new file mode 100644 index 00000000000..55a6eab81aa Binary files /dev/null and b/v0.14.0/_images/sphx_glr_azim_lambert_001.png differ diff --git a/v0.14.0/_images/sphx_glr_azim_lambert_thumb.png b/v0.14.0/_images/sphx_glr_azim_lambert_thumb.png new file mode 100644 index 00000000000..ac4c7e9f4b7 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_azim_lambert_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_azim_orthographic_001.png b/v0.14.0/_images/sphx_glr_azim_orthographic_001.png new file mode 100644 index 00000000000..0a9f14d3a6a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_azim_orthographic_001.png differ diff --git a/v0.14.0/_images/sphx_glr_azim_orthographic_thumb.png b/v0.14.0/_images/sphx_glr_azim_orthographic_thumb.png new file mode 100644 index 00000000000..5d42a9365b2 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_azim_orthographic_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_bars_001.png b/v0.14.0/_images/sphx_glr_bars_001.png new file mode 100644 index 00000000000..4fe950dd5e6 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_bars_001.png differ diff --git a/v0.14.0/_images/sphx_glr_bars_thumb.png b/v0.14.0/_images/sphx_glr_bars_thumb.png new file mode 100644 index 00000000000..db082cf383f Binary files /dev/null and b/v0.14.0/_images/sphx_glr_bars_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_basic_symbols_001.png b/v0.14.0/_images/sphx_glr_basic_symbols_001.png new file mode 100644 index 00000000000..b72bd7f4f7e Binary files /dev/null and b/v0.14.0/_images/sphx_glr_basic_symbols_001.png differ diff --git a/v0.14.0/_images/sphx_glr_basic_symbols_thumb.png b/v0.14.0/_images/sphx_glr_basic_symbols_thumb.png new file mode 100644 index 00000000000..edc2a42345b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_basic_symbols_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_blockm_001.png b/v0.14.0/_images/sphx_glr_blockm_001.png new file mode 100644 index 00000000000..d7b8a24438d Binary files /dev/null and b/v0.14.0/_images/sphx_glr_blockm_001.png differ diff --git a/v0.14.0/_images/sphx_glr_blockm_thumb.png b/v0.14.0/_images/sphx_glr_blockm_thumb.png new file mode 100644 index 00000000000..8899475c7c9 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_blockm_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_borders_001.png b/v0.14.0/_images/sphx_glr_borders_001.png new file mode 100644 index 00000000000..a6fa08ebed3 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_borders_001.png differ diff --git a/v0.14.0/_images/sphx_glr_borders_thumb.png b/v0.14.0/_images/sphx_glr_borders_thumb.png new file mode 100644 index 00000000000..c2dc2a69f86 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_borders_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_histograms_001.png b/v0.14.0/_images/sphx_glr_cartesian_histograms_001.png new file mode 100644 index 00000000000..c9fcf842dea Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_histograms_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_histograms_002.png b/v0.14.0/_images/sphx_glr_cartesian_histograms_002.png new file mode 100644 index 00000000000..f785d7ecbdd Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_histograms_002.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_histograms_003.png b/v0.14.0/_images/sphx_glr_cartesian_histograms_003.png new file mode 100644 index 00000000000..0bcc2035dac Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_histograms_003.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_histograms_004.png b/v0.14.0/_images/sphx_glr_cartesian_histograms_004.png new file mode 100644 index 00000000000..730a1eed533 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_histograms_004.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_histograms_005.png b/v0.14.0/_images/sphx_glr_cartesian_histograms_005.png new file mode 100644 index 00000000000..f0441a7b193 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_histograms_005.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_histograms_006.png b/v0.14.0/_images/sphx_glr_cartesian_histograms_006.png new file mode 100644 index 00000000000..f8c77e554c2 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_histograms_006.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_histograms_007.png b/v0.14.0/_images/sphx_glr_cartesian_histograms_007.png new file mode 100644 index 00000000000..32ff9487e4a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_histograms_007.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_histograms_thumb.png b/v0.14.0/_images/sphx_glr_cartesian_histograms_thumb.png new file mode 100644 index 00000000000..7fe17336f83 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_histograms_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_linear_001.png b/v0.14.0/_images/sphx_glr_cartesian_linear_001.png new file mode 100644 index 00000000000..f88628e8289 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_linear_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_linear_thumb.png b/v0.14.0/_images/sphx_glr_cartesian_linear_thumb.png new file mode 100644 index 00000000000..9ea84d1ca53 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_linear_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_logarithmic_001.png b/v0.14.0/_images/sphx_glr_cartesian_logarithmic_001.png new file mode 100644 index 00000000000..ece2d9c1ae5 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_logarithmic_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_logarithmic_thumb.png b/v0.14.0/_images/sphx_glr_cartesian_logarithmic_thumb.png new file mode 100644 index 00000000000..190af334828 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_logarithmic_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_power_001.png b/v0.14.0/_images/sphx_glr_cartesian_power_001.png new file mode 100644 index 00000000000..ed96167d39a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_power_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cartesian_power_thumb.png b/v0.14.0/_images/sphx_glr_cartesian_power_thumb.png new file mode 100644 index 00000000000..30d72656a06 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cartesian_power_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_choropleth_map_001.png b/v0.14.0/_images/sphx_glr_choropleth_map_001.png new file mode 100644 index 00000000000..4072618bb5b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_choropleth_map_001.png differ diff --git a/v0.14.0/_images/sphx_glr_choropleth_map_thumb.png b/v0.14.0/_images/sphx_glr_choropleth_map_thumb.png new file mode 100644 index 00000000000..d49f275c22f Binary files /dev/null and b/v0.14.0/_images/sphx_glr_choropleth_map_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_coastlines_001.png b/v0.14.0/_images/sphx_glr_coastlines_001.png new file mode 100644 index 00000000000..ec00dda88b4 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_coastlines_001.png differ diff --git a/v0.14.0/_images/sphx_glr_coastlines_002.png b/v0.14.0/_images/sphx_glr_coastlines_002.png new file mode 100644 index 00000000000..4871be793ea Binary files /dev/null and b/v0.14.0/_images/sphx_glr_coastlines_002.png differ diff --git a/v0.14.0/_images/sphx_glr_coastlines_003.png b/v0.14.0/_images/sphx_glr_coastlines_003.png new file mode 100644 index 00000000000..a961dd38579 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_coastlines_003.png differ diff --git a/v0.14.0/_images/sphx_glr_coastlines_004.png b/v0.14.0/_images/sphx_glr_coastlines_004.png new file mode 100644 index 00000000000..d19be8c10f3 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_coastlines_004.png differ diff --git a/v0.14.0/_images/sphx_glr_coastlines_005.png b/v0.14.0/_images/sphx_glr_coastlines_005.png new file mode 100644 index 00000000000..0a507be9ddd Binary files /dev/null and b/v0.14.0/_images/sphx_glr_coastlines_005.png differ diff --git a/v0.14.0/_images/sphx_glr_coastlines_thumb.png b/v0.14.0/_images/sphx_glr_coastlines_thumb.png new file mode 100644 index 00000000000..f39c96c2246 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_coastlines_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_colorbar_001.png b/v0.14.0/_images/sphx_glr_colorbar_001.png new file mode 100644 index 00000000000..b4c38f2a00f Binary files /dev/null and b/v0.14.0/_images/sphx_glr_colorbar_001.png differ diff --git a/v0.14.0/_images/sphx_glr_colorbar_thumb.png b/v0.14.0/_images/sphx_glr_colorbar_thumb.png new file mode 100644 index 00000000000..2b9ba926522 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_colorbar_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_colorbars_multiple_001.png b/v0.14.0/_images/sphx_glr_colorbars_multiple_001.png new file mode 100644 index 00000000000..4f7cdf1216c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_colorbars_multiple_001.png differ diff --git a/v0.14.0/_images/sphx_glr_colorbars_multiple_thumb.png b/v0.14.0/_images/sphx_glr_colorbars_multiple_thumb.png new file mode 100644 index 00000000000..3d1f4ab747b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_colorbars_multiple_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_configuration_001.png b/v0.14.0/_images/sphx_glr_configuration_001.png new file mode 100644 index 00000000000..897eb2f01ad Binary files /dev/null and b/v0.14.0/_images/sphx_glr_configuration_001.png differ diff --git a/v0.14.0/_images/sphx_glr_configuration_002.png b/v0.14.0/_images/sphx_glr_configuration_002.png new file mode 100644 index 00000000000..4a693bffae0 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_configuration_002.png differ diff --git a/v0.14.0/_images/sphx_glr_configuration_003.png b/v0.14.0/_images/sphx_glr_configuration_003.png new file mode 100644 index 00000000000..1fd5dce13da Binary files /dev/null and b/v0.14.0/_images/sphx_glr_configuration_003.png differ diff --git a/v0.14.0/_images/sphx_glr_configuration_thumb.png b/v0.14.0/_images/sphx_glr_configuration_thumb.png new file mode 100644 index 00000000000..63dc9eb1474 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_configuration_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_conic_albers_001.png b/v0.14.0/_images/sphx_glr_conic_albers_001.png new file mode 100644 index 00000000000..f529308e385 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_conic_albers_001.png differ diff --git a/v0.14.0/_images/sphx_glr_conic_albers_thumb.png b/v0.14.0/_images/sphx_glr_conic_albers_thumb.png new file mode 100644 index 00000000000..70b9f75b64d Binary files /dev/null and b/v0.14.0/_images/sphx_glr_conic_albers_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_conic_equidistant_001.png b/v0.14.0/_images/sphx_glr_conic_equidistant_001.png new file mode 100644 index 00000000000..d15db86d6c9 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_conic_equidistant_001.png differ diff --git a/v0.14.0/_images/sphx_glr_conic_equidistant_thumb.png b/v0.14.0/_images/sphx_glr_conic_equidistant_thumb.png new file mode 100644 index 00000000000..6e9944c1578 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_conic_equidistant_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_conic_lambert_001.png b/v0.14.0/_images/sphx_glr_conic_lambert_001.png new file mode 100644 index 00000000000..7c895b22e4a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_conic_lambert_001.png differ diff --git a/v0.14.0/_images/sphx_glr_conic_lambert_thumb.png b/v0.14.0/_images/sphx_glr_conic_lambert_thumb.png new file mode 100644 index 00000000000..dc435041b69 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_conic_lambert_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_connection_lines_001.png b/v0.14.0/_images/sphx_glr_connection_lines_001.png new file mode 100644 index 00000000000..0724b70eacf Binary files /dev/null and b/v0.14.0/_images/sphx_glr_connection_lines_001.png differ diff --git a/v0.14.0/_images/sphx_glr_connection_lines_thumb.png b/v0.14.0/_images/sphx_glr_connection_lines_thumb.png new file mode 100644 index 00000000000..48f7af0e8f1 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_connection_lines_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_contour_map_001.png b/v0.14.0/_images/sphx_glr_contour_map_001.png new file mode 100644 index 00000000000..3c1422e3493 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_contour_map_001.png differ diff --git a/v0.14.0/_images/sphx_glr_contour_map_002.png b/v0.14.0/_images/sphx_glr_contour_map_002.png new file mode 100644 index 00000000000..21fab462274 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_contour_map_002.png differ diff --git a/v0.14.0/_images/sphx_glr_contour_map_003.png b/v0.14.0/_images/sphx_glr_contour_map_003.png new file mode 100644 index 00000000000..1912733f5ec Binary files /dev/null and b/v0.14.0/_images/sphx_glr_contour_map_003.png differ diff --git a/v0.14.0/_images/sphx_glr_contour_map_004.png b/v0.14.0/_images/sphx_glr_contour_map_004.png new file mode 100644 index 00000000000..31c198b230e Binary files /dev/null and b/v0.14.0/_images/sphx_glr_contour_map_004.png differ diff --git a/v0.14.0/_images/sphx_glr_contour_map_005.png b/v0.14.0/_images/sphx_glr_contour_map_005.png new file mode 100644 index 00000000000..3bc3d7628be Binary files /dev/null and b/v0.14.0/_images/sphx_glr_contour_map_005.png differ diff --git a/v0.14.0/_images/sphx_glr_contour_map_thumb.png b/v0.14.0/_images/sphx_glr_contour_map_thumb.png new file mode 100644 index 00000000000..24014626393 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_contour_map_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_contours_001.png b/v0.14.0/_images/sphx_glr_contours_001.png new file mode 100644 index 00000000000..8231de131a1 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_contours_001.png differ diff --git a/v0.14.0/_images/sphx_glr_contours_thumb.png b/v0.14.0/_images/sphx_glr_contours_thumb.png new file mode 100644 index 00000000000..5af67bf306b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_contours_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_country_polygons_001.png b/v0.14.0/_images/sphx_glr_country_polygons_001.png new file mode 100644 index 00000000000..ede40aa8118 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_country_polygons_001.png differ diff --git a/v0.14.0/_images/sphx_glr_country_polygons_002.png b/v0.14.0/_images/sphx_glr_country_polygons_002.png new file mode 100644 index 00000000000..06026c04091 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_country_polygons_002.png differ diff --git a/v0.14.0/_images/sphx_glr_country_polygons_003.png b/v0.14.0/_images/sphx_glr_country_polygons_003.png new file mode 100644 index 00000000000..9c7f3a36a98 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_country_polygons_003.png differ diff --git a/v0.14.0/_images/sphx_glr_country_polygons_thumb.png b/v0.14.0/_images/sphx_glr_country_polygons_thumb.png new file mode 100644 index 00000000000..d2c9a21e811 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_country_polygons_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cross_section_001.png b/v0.14.0/_images/sphx_glr_cross_section_001.png new file mode 100644 index 00000000000..5f68ad818ac Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cross_section_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cross_section_thumb.png b/v0.14.0/_images/sphx_glr_cross_section_thumb.png new file mode 100644 index 00000000000..ef810e5d5b5 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cross_section_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_custom_symbols_001.png b/v0.14.0/_images/sphx_glr_custom_symbols_001.png new file mode 100644 index 00000000000..c27dacea9a1 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_custom_symbols_001.png differ diff --git a/v0.14.0/_images/sphx_glr_custom_symbols_thumb.png b/v0.14.0/_images/sphx_glr_custom_symbols_thumb.png new file mode 100644 index 00000000000..bf6944a6858 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_custom_symbols_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_cassini_001.png b/v0.14.0/_images/sphx_glr_cyl_cassini_001.png new file mode 100644 index 00000000000..2440eabea52 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_cassini_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_cassini_thumb.png b/v0.14.0/_images/sphx_glr_cyl_cassini_thumb.png new file mode 100644 index 00000000000..382b980baf2 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_cassini_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_equal_area_001.png b/v0.14.0/_images/sphx_glr_cyl_equal_area_001.png new file mode 100644 index 00000000000..b4251b32ffd Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_equal_area_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_equal_area_thumb.png b/v0.14.0/_images/sphx_glr_cyl_equal_area_thumb.png new file mode 100644 index 00000000000..058e236f0d6 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_equal_area_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_equidistant_001.png b/v0.14.0/_images/sphx_glr_cyl_equidistant_001.png new file mode 100644 index 00000000000..c5cc17e45f4 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_equidistant_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_equidistant_thumb.png b/v0.14.0/_images/sphx_glr_cyl_equidistant_thumb.png new file mode 100644 index 00000000000..0f566421280 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_equidistant_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_mercator_001.png b/v0.14.0/_images/sphx_glr_cyl_mercator_001.png new file mode 100644 index 00000000000..14dcb931641 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_mercator_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_mercator_thumb.png b/v0.14.0/_images/sphx_glr_cyl_mercator_thumb.png new file mode 100644 index 00000000000..fccc6cce534 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_mercator_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_miller_001.png b/v0.14.0/_images/sphx_glr_cyl_miller_001.png new file mode 100644 index 00000000000..c49ba6f0665 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_miller_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_miller_thumb.png b/v0.14.0/_images/sphx_glr_cyl_miller_thumb.png new file mode 100644 index 00000000000..499d3d711f8 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_miller_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_oblique_mercator_001.png b/v0.14.0/_images/sphx_glr_cyl_oblique_mercator_001.png new file mode 100644 index 00000000000..230a4a222f1 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_oblique_mercator_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_oblique_mercator_002.png b/v0.14.0/_images/sphx_glr_cyl_oblique_mercator_002.png new file mode 100644 index 00000000000..6e9dc0fae8d Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_oblique_mercator_002.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_oblique_mercator_003.png b/v0.14.0/_images/sphx_glr_cyl_oblique_mercator_003.png new file mode 100644 index 00000000000..044e363d1ac Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_oblique_mercator_003.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_oblique_mercator_thumb.png b/v0.14.0/_images/sphx_glr_cyl_oblique_mercator_thumb.png new file mode 100644 index 00000000000..759175e2154 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_oblique_mercator_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_stereographic_001.png b/v0.14.0/_images/sphx_glr_cyl_stereographic_001.png new file mode 100644 index 00000000000..bbc87345a2d Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_stereographic_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_stereographic_thumb.png b/v0.14.0/_images/sphx_glr_cyl_stereographic_thumb.png new file mode 100644 index 00000000000..71494b8e487 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_stereographic_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_transverse_mercator_001.png b/v0.14.0/_images/sphx_glr_cyl_transverse_mercator_001.png new file mode 100644 index 00000000000..ab057d3022e Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_transverse_mercator_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_transverse_mercator_thumb.png b/v0.14.0/_images/sphx_glr_cyl_transverse_mercator_thumb.png new file mode 100644 index 00000000000..ae6f7610734 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_transverse_mercator_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_universal_transverse_mercator_001.png b/v0.14.0/_images/sphx_glr_cyl_universal_transverse_mercator_001.png new file mode 100644 index 00000000000..6c9854f7331 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_universal_transverse_mercator_001.png differ diff --git a/v0.14.0/_images/sphx_glr_cyl_universal_transverse_mercator_thumb.png b/v0.14.0/_images/sphx_glr_cyl_universal_transverse_mercator_thumb.png new file mode 100644 index 00000000000..de0389e8f58 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_cyl_universal_transverse_mercator_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_date_time_charts_001.png b/v0.14.0/_images/sphx_glr_date_time_charts_001.png new file mode 100644 index 00000000000..66509ba3b7a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_date_time_charts_001.png differ diff --git a/v0.14.0/_images/sphx_glr_date_time_charts_002.png b/v0.14.0/_images/sphx_glr_date_time_charts_002.png new file mode 100644 index 00000000000..cef6d2edb97 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_date_time_charts_002.png differ diff --git a/v0.14.0/_images/sphx_glr_date_time_charts_003.png b/v0.14.0/_images/sphx_glr_date_time_charts_003.png new file mode 100644 index 00000000000..42bd0f8d67d Binary files /dev/null and b/v0.14.0/_images/sphx_glr_date_time_charts_003.png differ diff --git a/v0.14.0/_images/sphx_glr_date_time_charts_004.png b/v0.14.0/_images/sphx_glr_date_time_charts_004.png new file mode 100644 index 00000000000..7d755f12c4d Binary files /dev/null and b/v0.14.0/_images/sphx_glr_date_time_charts_004.png differ diff --git a/v0.14.0/_images/sphx_glr_date_time_charts_005.png b/v0.14.0/_images/sphx_glr_date_time_charts_005.png new file mode 100644 index 00000000000..c14990b2843 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_date_time_charts_005.png differ diff --git a/v0.14.0/_images/sphx_glr_date_time_charts_006.png b/v0.14.0/_images/sphx_glr_date_time_charts_006.png new file mode 100644 index 00000000000..bf66bd86387 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_date_time_charts_006.png differ diff --git a/v0.14.0/_images/sphx_glr_date_time_charts_007.png b/v0.14.0/_images/sphx_glr_date_time_charts_007.png new file mode 100644 index 00000000000..2f4e965facd Binary files /dev/null and b/v0.14.0/_images/sphx_glr_date_time_charts_007.png differ diff --git a/v0.14.0/_images/sphx_glr_date_time_charts_008.png b/v0.14.0/_images/sphx_glr_date_time_charts_008.png new file mode 100644 index 00000000000..fd5cb00e878 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_date_time_charts_008.png differ diff --git a/v0.14.0/_images/sphx_glr_date_time_charts_009.png b/v0.14.0/_images/sphx_glr_date_time_charts_009.png new file mode 100644 index 00000000000..933258a62ce Binary files /dev/null and b/v0.14.0/_images/sphx_glr_date_time_charts_009.png differ diff --git a/v0.14.0/_images/sphx_glr_date_time_charts_010.png b/v0.14.0/_images/sphx_glr_date_time_charts_010.png new file mode 100644 index 00000000000..924f1e833be Binary files /dev/null and b/v0.14.0/_images/sphx_glr_date_time_charts_010.png differ diff --git a/v0.14.0/_images/sphx_glr_date_time_charts_thumb.png b/v0.14.0/_images/sphx_glr_date_time_charts_thumb.png new file mode 100644 index 00000000000..98e8c98ab15 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_date_time_charts_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_datetime_inputs_001.png b/v0.14.0/_images/sphx_glr_datetime_inputs_001.png new file mode 100644 index 00000000000..7d37a52adb5 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_datetime_inputs_001.png differ diff --git a/v0.14.0/_images/sphx_glr_datetime_inputs_thumb.png b/v0.14.0/_images/sphx_glr_datetime_inputs_thumb.png new file mode 100644 index 00000000000..923a29d9ae4 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_datetime_inputs_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_decorated_lines_001.png b/v0.14.0/_images/sphx_glr_decorated_lines_001.png new file mode 100644 index 00000000000..d89de9d122a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_decorated_lines_001.png differ diff --git a/v0.14.0/_images/sphx_glr_decorated_lines_thumb.png b/v0.14.0/_images/sphx_glr_decorated_lines_thumb.png new file mode 100644 index 00000000000..b3b0b014727 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_decorated_lines_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_double_y_axes_001.png b/v0.14.0/_images/sphx_glr_double_y_axes_001.png new file mode 100644 index 00000000000..a97bf2b4bba Binary files /dev/null and b/v0.14.0/_images/sphx_glr_double_y_axes_001.png differ diff --git a/v0.14.0/_images/sphx_glr_double_y_axes_thumb.png b/v0.14.0/_images/sphx_glr_double_y_axes_thumb.png new file mode 100644 index 00000000000..3257201b9ee Binary files /dev/null and b/v0.14.0/_images/sphx_glr_double_y_axes_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_draping_on_3d_surface_001.png b/v0.14.0/_images/sphx_glr_draping_on_3d_surface_001.png new file mode 100644 index 00000000000..4536a457098 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_draping_on_3d_surface_001.png differ diff --git a/v0.14.0/_images/sphx_glr_draping_on_3d_surface_002.png b/v0.14.0/_images/sphx_glr_draping_on_3d_surface_002.png new file mode 100644 index 00000000000..d936c4a748c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_draping_on_3d_surface_002.png differ diff --git a/v0.14.0/_images/sphx_glr_draping_on_3d_surface_thumb.png b/v0.14.0/_images/sphx_glr_draping_on_3d_surface_thumb.png new file mode 100644 index 00000000000..92218e1f990 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_draping_on_3d_surface_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_earth_relief_001.png b/v0.14.0/_images/sphx_glr_earth_relief_001.png new file mode 100644 index 00000000000..4ab39f2a6ea Binary files /dev/null and b/v0.14.0/_images/sphx_glr_earth_relief_001.png differ diff --git a/v0.14.0/_images/sphx_glr_earth_relief_002.png b/v0.14.0/_images/sphx_glr_earth_relief_002.png new file mode 100644 index 00000000000..cd793669a35 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_earth_relief_002.png differ diff --git a/v0.14.0/_images/sphx_glr_earth_relief_003.png b/v0.14.0/_images/sphx_glr_earth_relief_003.png new file mode 100644 index 00000000000..1173661c1b0 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_earth_relief_003.png differ diff --git a/v0.14.0/_images/sphx_glr_earth_relief_004.png b/v0.14.0/_images/sphx_glr_earth_relief_004.png new file mode 100644 index 00000000000..3fcedf9d0f8 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_earth_relief_004.png differ diff --git a/v0.14.0/_images/sphx_glr_earth_relief_005.png b/v0.14.0/_images/sphx_glr_earth_relief_005.png new file mode 100644 index 00000000000..da8b6fd242c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_earth_relief_005.png differ diff --git a/v0.14.0/_images/sphx_glr_earth_relief_006.png b/v0.14.0/_images/sphx_glr_earth_relief_006.png new file mode 100644 index 00000000000..c275946c78a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_earth_relief_006.png differ diff --git a/v0.14.0/_images/sphx_glr_earth_relief_thumb.png b/v0.14.0/_images/sphx_glr_earth_relief_thumb.png new file mode 100644 index 00000000000..3796cdac71f Binary files /dev/null and b/v0.14.0/_images/sphx_glr_earth_relief_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_envelope_001.png b/v0.14.0/_images/sphx_glr_envelope_001.png new file mode 100644 index 00000000000..6d843ac2622 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_envelope_001.png differ diff --git a/v0.14.0/_images/sphx_glr_envelope_thumb.png b/v0.14.0/_images/sphx_glr_envelope_thumb.png new file mode 100644 index 00000000000..dedc623f9fb Binary files /dev/null and b/v0.14.0/_images/sphx_glr_envelope_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_frames_001.png b/v0.14.0/_images/sphx_glr_frames_001.png new file mode 100644 index 00000000000..2dbc1e3d49b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_frames_001.png differ diff --git a/v0.14.0/_images/sphx_glr_frames_002.png b/v0.14.0/_images/sphx_glr_frames_002.png new file mode 100644 index 00000000000..3a5f262bbe2 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_frames_002.png differ diff --git a/v0.14.0/_images/sphx_glr_frames_003.png b/v0.14.0/_images/sphx_glr_frames_003.png new file mode 100644 index 00000000000..765d819b0d1 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_frames_003.png differ diff --git a/v0.14.0/_images/sphx_glr_frames_004.png b/v0.14.0/_images/sphx_glr_frames_004.png new file mode 100644 index 00000000000..beeda4d4d9a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_frames_004.png differ diff --git a/v0.14.0/_images/sphx_glr_frames_005.png b/v0.14.0/_images/sphx_glr_frames_005.png new file mode 100644 index 00000000000..84d41c86bcd Binary files /dev/null and b/v0.14.0/_images/sphx_glr_frames_005.png differ diff --git a/v0.14.0/_images/sphx_glr_frames_006.png b/v0.14.0/_images/sphx_glr_frames_006.png new file mode 100644 index 00000000000..9772d146739 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_frames_006.png differ diff --git a/v0.14.0/_images/sphx_glr_frames_007.png b/v0.14.0/_images/sphx_glr_frames_007.png new file mode 100644 index 00000000000..3db1ff4f340 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_frames_007.png differ diff --git a/v0.14.0/_images/sphx_glr_frames_thumb.png b/v0.14.0/_images/sphx_glr_frames_thumb.png new file mode 100644 index 00000000000..202a88d84ba Binary files /dev/null and b/v0.14.0/_images/sphx_glr_frames_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_grdclip_001.png b/v0.14.0/_images/sphx_glr_grdclip_001.png new file mode 100644 index 00000000000..e8f8cee7d5f Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grdclip_001.png differ diff --git a/v0.14.0/_images/sphx_glr_grdclip_thumb.png b/v0.14.0/_images/sphx_glr_grdclip_thumb.png new file mode 100644 index 00000000000..206000b947e Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grdclip_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_grdgradient_001.png b/v0.14.0/_images/sphx_glr_grdgradient_001.png new file mode 100644 index 00000000000..825bf5c0b21 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grdgradient_001.png differ diff --git a/v0.14.0/_images/sphx_glr_grdgradient_shading_001.png b/v0.14.0/_images/sphx_glr_grdgradient_shading_001.png new file mode 100644 index 00000000000..1ac510a3433 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grdgradient_shading_001.png differ diff --git a/v0.14.0/_images/sphx_glr_grdgradient_shading_thumb.png b/v0.14.0/_images/sphx_glr_grdgradient_shading_thumb.png new file mode 100644 index 00000000000..78f20798063 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grdgradient_shading_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_grdgradient_thumb.png b/v0.14.0/_images/sphx_glr_grdgradient_thumb.png new file mode 100644 index 00000000000..82a57f1c7c7 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grdgradient_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_grdlandmask_001.png b/v0.14.0/_images/sphx_glr_grdlandmask_001.png new file mode 100644 index 00000000000..9754e26a9d2 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grdlandmask_001.png differ diff --git a/v0.14.0/_images/sphx_glr_grdlandmask_thumb.png b/v0.14.0/_images/sphx_glr_grdlandmask_thumb.png new file mode 100644 index 00000000000..89051fcd535 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grdlandmask_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_grdview_surface_001.png b/v0.14.0/_images/sphx_glr_grdview_surface_001.png new file mode 100644 index 00000000000..6792ca688e8 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grdview_surface_001.png differ diff --git a/v0.14.0/_images/sphx_glr_grdview_surface_thumb.png b/v0.14.0/_images/sphx_glr_grdview_surface_thumb.png new file mode 100644 index 00000000000..c136e783846 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grdview_surface_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_great_circles_001.png b/v0.14.0/_images/sphx_glr_great_circles_001.png new file mode 100644 index 00000000000..f423da9221b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_great_circles_001.png differ diff --git a/v0.14.0/_images/sphx_glr_great_circles_thumb.png b/v0.14.0/_images/sphx_glr_great_circles_thumb.png new file mode 100644 index 00000000000..41725ed13db Binary files /dev/null and b/v0.14.0/_images/sphx_glr_great_circles_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_grid_equalization_001.png b/v0.14.0/_images/sphx_glr_grid_equalization_001.png new file mode 100644 index 00000000000..eece98a968c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grid_equalization_001.png differ diff --git a/v0.14.0/_images/sphx_glr_grid_equalization_002.png b/v0.14.0/_images/sphx_glr_grid_equalization_002.png new file mode 100644 index 00000000000..8a2fb1a302b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grid_equalization_002.png differ diff --git a/v0.14.0/_images/sphx_glr_grid_equalization_003.png b/v0.14.0/_images/sphx_glr_grid_equalization_003.png new file mode 100644 index 00000000000..9125da84218 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grid_equalization_003.png differ diff --git a/v0.14.0/_images/sphx_glr_grid_equalization_004.png b/v0.14.0/_images/sphx_glr_grid_equalization_004.png new file mode 100644 index 00000000000..a1388444485 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grid_equalization_004.png differ diff --git a/v0.14.0/_images/sphx_glr_grid_equalization_thumb.png b/v0.14.0/_images/sphx_glr_grid_equalization_thumb.png new file mode 100644 index 00000000000..b4e53d29f1c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_grid_equalization_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_histogram_001.png b/v0.14.0/_images/sphx_glr_histogram_001.png new file mode 100644 index 00000000000..73d626ec153 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_histogram_001.png differ diff --git a/v0.14.0/_images/sphx_glr_histogram_thumb.png b/v0.14.0/_images/sphx_glr_histogram_thumb.png new file mode 100644 index 00000000000..080f4b25829 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_histogram_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_image_001.png b/v0.14.0/_images/sphx_glr_image_001.png new file mode 100644 index 00000000000..1edf4bb75ab Binary files /dev/null and b/v0.14.0/_images/sphx_glr_image_001.png differ diff --git a/v0.14.0/_images/sphx_glr_image_thumb.png b/v0.14.0/_images/sphx_glr_image_thumb.png new file mode 100644 index 00000000000..09e3b99871b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_image_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_inset_001.png b/v0.14.0/_images/sphx_glr_inset_001.png new file mode 100644 index 00000000000..6e451e76972 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_inset_001.png differ diff --git a/v0.14.0/_images/sphx_glr_inset_rectangle_region_001.png b/v0.14.0/_images/sphx_glr_inset_rectangle_region_001.png new file mode 100644 index 00000000000..dd82b2f4f69 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_inset_rectangle_region_001.png differ diff --git a/v0.14.0/_images/sphx_glr_inset_rectangle_region_thumb.png b/v0.14.0/_images/sphx_glr_inset_rectangle_region_thumb.png new file mode 100644 index 00000000000..1a476a524bd Binary files /dev/null and b/v0.14.0/_images/sphx_glr_inset_rectangle_region_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_inset_thumb.png b/v0.14.0/_images/sphx_glr_inset_thumb.png new file mode 100644 index 00000000000..6d8f3c45e81 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_inset_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_insets_001.png b/v0.14.0/_images/sphx_glr_insets_001.png new file mode 100644 index 00000000000..5827be7d7fe Binary files /dev/null and b/v0.14.0/_images/sphx_glr_insets_001.png differ diff --git a/v0.14.0/_images/sphx_glr_insets_002.png b/v0.14.0/_images/sphx_glr_insets_002.png new file mode 100644 index 00000000000..02cb2c7af25 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_insets_002.png differ diff --git a/v0.14.0/_images/sphx_glr_insets_003.png b/v0.14.0/_images/sphx_glr_insets_003.png new file mode 100644 index 00000000000..c2421023245 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_insets_003.png differ diff --git a/v0.14.0/_images/sphx_glr_insets_004.png b/v0.14.0/_images/sphx_glr_insets_004.png new file mode 100644 index 00000000000..145fe25015d Binary files /dev/null and b/v0.14.0/_images/sphx_glr_insets_004.png differ diff --git a/v0.14.0/_images/sphx_glr_insets_thumb.png b/v0.14.0/_images/sphx_glr_insets_thumb.png new file mode 100644 index 00000000000..a30d4b5f47c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_insets_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_land_and_water_001.png b/v0.14.0/_images/sphx_glr_land_and_water_001.png new file mode 100644 index 00000000000..0a507be9ddd Binary files /dev/null and b/v0.14.0/_images/sphx_glr_land_and_water_001.png differ diff --git a/v0.14.0/_images/sphx_glr_land_and_water_thumb.png b/v0.14.0/_images/sphx_glr_land_and_water_thumb.png new file mode 100644 index 00000000000..f39c96c2246 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_land_and_water_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_legend_001.png b/v0.14.0/_images/sphx_glr_legend_001.png new file mode 100644 index 00000000000..957b29012b6 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_legend_001.png differ diff --git a/v0.14.0/_images/sphx_glr_legend_thumb.png b/v0.14.0/_images/sphx_glr_legend_thumb.png new file mode 100644 index 00000000000..243e59e98ae Binary files /dev/null and b/v0.14.0/_images/sphx_glr_legend_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_line_custom_cpt_001.png b/v0.14.0/_images/sphx_glr_line_custom_cpt_001.png new file mode 100644 index 00000000000..2711a603a24 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_line_custom_cpt_001.png differ diff --git a/v0.14.0/_images/sphx_glr_line_custom_cpt_thumb.png b/v0.14.0/_images/sphx_glr_line_custom_cpt_thumb.png new file mode 100644 index 00000000000..1b0d1806869 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_line_custom_cpt_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_line_segment_ends_001.png b/v0.14.0/_images/sphx_glr_line_segment_ends_001.png new file mode 100644 index 00000000000..60a391e52c3 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_line_segment_ends_001.png differ diff --git a/v0.14.0/_images/sphx_glr_line_segment_ends_thumb.png b/v0.14.0/_images/sphx_glr_line_segment_ends_thumb.png new file mode 100644 index 00000000000..205525b2970 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_line_segment_ends_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_linefronts_001.png b/v0.14.0/_images/sphx_glr_linefronts_001.png new file mode 100644 index 00000000000..59ac243f165 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_linefronts_001.png differ diff --git a/v0.14.0/_images/sphx_glr_linefronts_thumb.png b/v0.14.0/_images/sphx_glr_linefronts_thumb.png new file mode 100644 index 00000000000..a14a40a6403 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_linefronts_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_lines_001.png b/v0.14.0/_images/sphx_glr_lines_001.png new file mode 100644 index 00000000000..c4b00f46638 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_lines_001.png differ diff --git a/v0.14.0/_images/sphx_glr_lines_002.png b/v0.14.0/_images/sphx_glr_lines_002.png new file mode 100644 index 00000000000..ac679f73046 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_lines_002.png differ diff --git a/v0.14.0/_images/sphx_glr_lines_003.png b/v0.14.0/_images/sphx_glr_lines_003.png new file mode 100644 index 00000000000..6c0ad6dc19c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_lines_003.png differ diff --git a/v0.14.0/_images/sphx_glr_lines_004.png b/v0.14.0/_images/sphx_glr_lines_004.png new file mode 100644 index 00000000000..fa356252cf1 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_lines_004.png differ diff --git a/v0.14.0/_images/sphx_glr_lines_005.png b/v0.14.0/_images/sphx_glr_lines_005.png new file mode 100644 index 00000000000..990365a59f3 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_lines_005.png differ diff --git a/v0.14.0/_images/sphx_glr_lines_006.png b/v0.14.0/_images/sphx_glr_lines_006.png new file mode 100644 index 00000000000..f59fc0259f2 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_lines_006.png differ diff --git a/v0.14.0/_images/sphx_glr_lines_007.png b/v0.14.0/_images/sphx_glr_lines_007.png new file mode 100644 index 00000000000..08e99db5f81 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_lines_007.png differ diff --git a/v0.14.0/_images/sphx_glr_lines_thumb.png b/v0.14.0/_images/sphx_glr_lines_thumb.png new file mode 100644 index 00000000000..22eba140825 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_lines_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_linestrings_001.png b/v0.14.0/_images/sphx_glr_linestrings_001.png new file mode 100644 index 00000000000..74ea8a708c8 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_linestrings_001.png differ diff --git a/v0.14.0/_images/sphx_glr_linestrings_thumb.png b/v0.14.0/_images/sphx_glr_linestrings_thumb.png new file mode 100644 index 00000000000..973a385aa93 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_linestrings_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_linestyles_001.png b/v0.14.0/_images/sphx_glr_linestyles_001.png new file mode 100644 index 00000000000..e9b2aecf884 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_linestyles_001.png differ diff --git a/v0.14.0/_images/sphx_glr_linestyles_thumb.png b/v0.14.0/_images/sphx_glr_linestyles_thumb.png new file mode 100644 index 00000000000..cf1dc1856df Binary files /dev/null and b/v0.14.0/_images/sphx_glr_linestyles_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_logo_001.png b/v0.14.0/_images/sphx_glr_logo_001.png new file mode 100644 index 00000000000..ce09de0d8de Binary files /dev/null and b/v0.14.0/_images/sphx_glr_logo_001.png differ diff --git a/v0.14.0/_images/sphx_glr_logo_thumb.png b/v0.14.0/_images/sphx_glr_logo_thumb.png new file mode 100644 index 00000000000..46223f02d49 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_logo_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_meca_001.png b/v0.14.0/_images/sphx_glr_meca_001.png new file mode 100644 index 00000000000..49d58f7bc3e Binary files /dev/null and b/v0.14.0/_images/sphx_glr_meca_001.png differ diff --git a/v0.14.0/_images/sphx_glr_meca_thumb.png b/v0.14.0/_images/sphx_glr_meca_thumb.png new file mode 100644 index 00000000000..1d11eb6d5d4 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_meca_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_eckertIV_001.png b/v0.14.0/_images/sphx_glr_misc_eckertIV_001.png new file mode 100644 index 00000000000..12413b09341 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_eckertIV_001.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_eckertIV_thumb.png b/v0.14.0/_images/sphx_glr_misc_eckertIV_thumb.png new file mode 100644 index 00000000000..dd1ce207766 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_eckertIV_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_eckertVI_001.png b/v0.14.0/_images/sphx_glr_misc_eckertVI_001.png new file mode 100644 index 00000000000..560b21a79dc Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_eckertVI_001.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_eckertVI_thumb.png b/v0.14.0/_images/sphx_glr_misc_eckertVI_thumb.png new file mode 100644 index 00000000000..97ea9b3ea44 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_eckertVI_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_hammer_001.png b/v0.14.0/_images/sphx_glr_misc_hammer_001.png new file mode 100644 index 00000000000..81c07d36a8f Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_hammer_001.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_hammer_thumb.png b/v0.14.0/_images/sphx_glr_misc_hammer_thumb.png new file mode 100644 index 00000000000..c3171443fc6 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_hammer_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_mollweide_001.png b/v0.14.0/_images/sphx_glr_misc_mollweide_001.png new file mode 100644 index 00000000000..5b687e28d18 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_mollweide_001.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_mollweide_thumb.png b/v0.14.0/_images/sphx_glr_misc_mollweide_thumb.png new file mode 100644 index 00000000000..cadb00a7f01 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_mollweide_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_robinson_001.png b/v0.14.0/_images/sphx_glr_misc_robinson_001.png new file mode 100644 index 00000000000..caa3f734ee0 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_robinson_001.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_robinson_thumb.png b/v0.14.0/_images/sphx_glr_misc_robinson_thumb.png new file mode 100644 index 00000000000..4204e8771aa Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_robinson_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_sinusoidal_001.png b/v0.14.0/_images/sphx_glr_misc_sinusoidal_001.png new file mode 100644 index 00000000000..59f2ab91e1f Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_sinusoidal_001.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_sinusoidal_thumb.png b/v0.14.0/_images/sphx_glr_misc_sinusoidal_thumb.png new file mode 100644 index 00000000000..fffb26c4f1a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_sinusoidal_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_van_der_grinten_001.png b/v0.14.0/_images/sphx_glr_misc_van_der_grinten_001.png new file mode 100644 index 00000000000..821ef966fbd Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_van_der_grinten_001.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_van_der_grinten_thumb.png b/v0.14.0/_images/sphx_glr_misc_van_der_grinten_thumb.png new file mode 100644 index 00000000000..d415cf55252 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_van_der_grinten_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_winkel_tripel_001.png b/v0.14.0/_images/sphx_glr_misc_winkel_tripel_001.png new file mode 100644 index 00000000000..f3ed2eddd75 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_winkel_tripel_001.png differ diff --git a/v0.14.0/_images/sphx_glr_misc_winkel_tripel_thumb.png b/v0.14.0/_images/sphx_glr_misc_winkel_tripel_thumb.png new file mode 100644 index 00000000000..260d49f7800 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_misc_winkel_tripel_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_multi_parameter_symbols_001.png b/v0.14.0/_images/sphx_glr_multi_parameter_symbols_001.png new file mode 100644 index 00000000000..827e46ec79e Binary files /dev/null and b/v0.14.0/_images/sphx_glr_multi_parameter_symbols_001.png differ diff --git a/v0.14.0/_images/sphx_glr_multi_parameter_symbols_002.png b/v0.14.0/_images/sphx_glr_multi_parameter_symbols_002.png new file mode 100644 index 00000000000..23303526cf1 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_multi_parameter_symbols_002.png differ diff --git a/v0.14.0/_images/sphx_glr_multi_parameter_symbols_thumb.png b/v0.14.0/_images/sphx_glr_multi_parameter_symbols_thumb.png new file mode 100644 index 00000000000..52686df0e56 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_multi_parameter_symbols_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_non_ascii_text_001.png b/v0.14.0/_images/sphx_glr_non_ascii_text_001.png new file mode 100644 index 00000000000..04270796327 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_non_ascii_text_001.png differ diff --git a/v0.14.0/_images/sphx_glr_non_ascii_text_thumb.png b/v0.14.0/_images/sphx_glr_non_ascii_text_thumb.png new file mode 100644 index 00000000000..16cba9c8b7e Binary files /dev/null and b/v0.14.0/_images/sphx_glr_non_ascii_text_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_patterns_001.png b/v0.14.0/_images/sphx_glr_patterns_001.png new file mode 100644 index 00000000000..558e5573c4c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_patterns_001.png differ diff --git a/v0.14.0/_images/sphx_glr_patterns_thumb.png b/v0.14.0/_images/sphx_glr_patterns_thumb.png new file mode 100644 index 00000000000..40b48f87c93 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_patterns_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_plot_001.png b/v0.14.0/_images/sphx_glr_plot_001.png new file mode 100644 index 00000000000..6cd9ef001ca Binary files /dev/null and b/v0.14.0/_images/sphx_glr_plot_001.png differ diff --git a/v0.14.0/_images/sphx_glr_plot_002.png b/v0.14.0/_images/sphx_glr_plot_002.png new file mode 100644 index 00000000000..d1d5c5e2874 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_plot_002.png differ diff --git a/v0.14.0/_images/sphx_glr_plot_003.png b/v0.14.0/_images/sphx_glr_plot_003.png new file mode 100644 index 00000000000..26be6cf067d Binary files /dev/null and b/v0.14.0/_images/sphx_glr_plot_003.png differ diff --git a/v0.14.0/_images/sphx_glr_plot_thumb.png b/v0.14.0/_images/sphx_glr_plot_thumb.png new file mode 100644 index 00000000000..7677dc837b4 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_plot_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_points_001.png b/v0.14.0/_images/sphx_glr_points_001.png new file mode 100644 index 00000000000..f0b09fae400 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_points_001.png differ diff --git a/v0.14.0/_images/sphx_glr_points_categorical_001.png b/v0.14.0/_images/sphx_glr_points_categorical_001.png new file mode 100644 index 00000000000..4ac063019c7 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_points_categorical_001.png differ diff --git a/v0.14.0/_images/sphx_glr_points_categorical_thumb.png b/v0.14.0/_images/sphx_glr_points_categorical_thumb.png new file mode 100644 index 00000000000..12e9e76636a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_points_categorical_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_points_thumb.png b/v0.14.0/_images/sphx_glr_points_thumb.png new file mode 100644 index 00000000000..77fdea14fa3 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_points_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_points_transparency_001.png b/v0.14.0/_images/sphx_glr_points_transparency_001.png new file mode 100644 index 00000000000..e7cca471149 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_points_transparency_001.png differ diff --git a/v0.14.0/_images/sphx_glr_points_transparency_thumb.png b/v0.14.0/_images/sphx_glr_points_transparency_thumb.png new file mode 100644 index 00000000000..4f815a3a0c1 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_points_transparency_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_polar_001.png b/v0.14.0/_images/sphx_glr_polar_001.png new file mode 100644 index 00000000000..4f8ec9c0eed Binary files /dev/null and b/v0.14.0/_images/sphx_glr_polar_001.png differ diff --git a/v0.14.0/_images/sphx_glr_polar_thumb.png b/v0.14.0/_images/sphx_glr_polar_thumb.png new file mode 100644 index 00000000000..5f4dd9b9c56 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_polar_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_polyconic_001.png b/v0.14.0/_images/sphx_glr_polyconic_001.png new file mode 100644 index 00000000000..e77f8c56b26 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_polyconic_001.png differ diff --git a/v0.14.0/_images/sphx_glr_polyconic_thumb.png b/v0.14.0/_images/sphx_glr_polyconic_thumb.png new file mode 100644 index 00000000000..9326472a56a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_polyconic_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_polygons_001.png b/v0.14.0/_images/sphx_glr_polygons_001.png new file mode 100644 index 00000000000..9a1245b4b18 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_polygons_001.png differ diff --git a/v0.14.0/_images/sphx_glr_polygons_002.png b/v0.14.0/_images/sphx_glr_polygons_002.png new file mode 100644 index 00000000000..50d338f9ba0 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_polygons_002.png differ diff --git a/v0.14.0/_images/sphx_glr_polygons_003.png b/v0.14.0/_images/sphx_glr_polygons_003.png new file mode 100644 index 00000000000..8906edc8db0 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_polygons_003.png differ diff --git a/v0.14.0/_images/sphx_glr_polygons_004.png b/v0.14.0/_images/sphx_glr_polygons_004.png new file mode 100644 index 00000000000..64ef1714764 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_polygons_004.png differ diff --git a/v0.14.0/_images/sphx_glr_polygons_005.png b/v0.14.0/_images/sphx_glr_polygons_005.png new file mode 100644 index 00000000000..2a80327c7cb Binary files /dev/null and b/v0.14.0/_images/sphx_glr_polygons_005.png differ diff --git a/v0.14.0/_images/sphx_glr_polygons_thumb.png b/v0.14.0/_images/sphx_glr_polygons_thumb.png new file mode 100644 index 00000000000..b1bce22827f Binary files /dev/null and b/v0.14.0/_images/sphx_glr_polygons_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_quoted_lines_001.png b/v0.14.0/_images/sphx_glr_quoted_lines_001.png new file mode 100644 index 00000000000..f03a0656264 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_quoted_lines_001.png differ diff --git a/v0.14.0/_images/sphx_glr_quoted_lines_002.png b/v0.14.0/_images/sphx_glr_quoted_lines_002.png new file mode 100644 index 00000000000..f4b4bb53fc0 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_quoted_lines_002.png differ diff --git a/v0.14.0/_images/sphx_glr_quoted_lines_thumb.png b/v0.14.0/_images/sphx_glr_quoted_lines_thumb.png new file mode 100644 index 00000000000..fb2fd2c0f86 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_quoted_lines_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_regions_001.png b/v0.14.0/_images/sphx_glr_regions_001.png new file mode 100644 index 00000000000..1253c5fbccf Binary files /dev/null and b/v0.14.0/_images/sphx_glr_regions_001.png differ diff --git a/v0.14.0/_images/sphx_glr_regions_002.png b/v0.14.0/_images/sphx_glr_regions_002.png new file mode 100644 index 00000000000..cfe47c31c7c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_regions_002.png differ diff --git a/v0.14.0/_images/sphx_glr_regions_003.png b/v0.14.0/_images/sphx_glr_regions_003.png new file mode 100644 index 00000000000..12c5f6196a8 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_regions_003.png differ diff --git a/v0.14.0/_images/sphx_glr_regions_004.png b/v0.14.0/_images/sphx_glr_regions_004.png new file mode 100644 index 00000000000..8ed701d8eda Binary files /dev/null and b/v0.14.0/_images/sphx_glr_regions_004.png differ diff --git a/v0.14.0/_images/sphx_glr_regions_005.png b/v0.14.0/_images/sphx_glr_regions_005.png new file mode 100644 index 00000000000..7790ab5fd21 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_regions_005.png differ diff --git a/v0.14.0/_images/sphx_glr_regions_006.png b/v0.14.0/_images/sphx_glr_regions_006.png new file mode 100644 index 00000000000..34caf2f3da0 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_regions_006.png differ diff --git a/v0.14.0/_images/sphx_glr_regions_007.png b/v0.14.0/_images/sphx_glr_regions_007.png new file mode 100644 index 00000000000..4cbf93df5a7 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_regions_007.png differ diff --git a/v0.14.0/_images/sphx_glr_regions_008.png b/v0.14.0/_images/sphx_glr_regions_008.png new file mode 100644 index 00000000000..f186d7cdd21 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_regions_008.png differ diff --git a/v0.14.0/_images/sphx_glr_regions_009.png b/v0.14.0/_images/sphx_glr_regions_009.png new file mode 100644 index 00000000000..e9bcd6c2eef Binary files /dev/null and b/v0.14.0/_images/sphx_glr_regions_009.png differ diff --git a/v0.14.0/_images/sphx_glr_regions_010.png b/v0.14.0/_images/sphx_glr_regions_010.png new file mode 100644 index 00000000000..2a9c3dd673f Binary files /dev/null and b/v0.14.0/_images/sphx_glr_regions_010.png differ diff --git a/v0.14.0/_images/sphx_glr_regions_011.png b/v0.14.0/_images/sphx_glr_regions_011.png new file mode 100644 index 00000000000..4cbf93df5a7 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_regions_011.png differ diff --git a/v0.14.0/_images/sphx_glr_regions_thumb.png b/v0.14.0/_images/sphx_glr_regions_thumb.png new file mode 100644 index 00000000000..251304ed537 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_regions_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_rgb_image_001.png b/v0.14.0/_images/sphx_glr_rgb_image_001.png new file mode 100644 index 00000000000..e4bc103b76b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_rgb_image_001.png differ diff --git a/v0.14.0/_images/sphx_glr_rgb_image_thumb.png b/v0.14.0/_images/sphx_glr_rgb_image_thumb.png new file mode 100644 index 00000000000..f066360bce8 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_rgb_image_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_rose_001.png b/v0.14.0/_images/sphx_glr_rose_001.png new file mode 100644 index 00000000000..0c7422ebd11 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_rose_001.png differ diff --git a/v0.14.0/_images/sphx_glr_rose_thumb.png b/v0.14.0/_images/sphx_glr_rose_thumb.png new file mode 100644 index 00000000000..ff874672c9f Binary files /dev/null and b/v0.14.0/_images/sphx_glr_rose_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_scalebar_001.png b/v0.14.0/_images/sphx_glr_scalebar_001.png new file mode 100644 index 00000000000..139a01ac12a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_scalebar_001.png differ diff --git a/v0.14.0/_images/sphx_glr_scalebar_002.png b/v0.14.0/_images/sphx_glr_scalebar_002.png new file mode 100644 index 00000000000..a1a2bb18ba1 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_scalebar_002.png differ diff --git a/v0.14.0/_images/sphx_glr_scalebar_thumb.png b/v0.14.0/_images/sphx_glr_scalebar_thumb.png new file mode 100644 index 00000000000..7bc945e36b2 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_scalebar_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_scatter3d_001.png b/v0.14.0/_images/sphx_glr_scatter3d_001.png new file mode 100644 index 00000000000..f3cbfb2a5cb Binary files /dev/null and b/v0.14.0/_images/sphx_glr_scatter3d_001.png differ diff --git a/v0.14.0/_images/sphx_glr_scatter3d_thumb.png b/v0.14.0/_images/sphx_glr_scatter3d_thumb.png new file mode 100644 index 00000000000..6940f7a3e01 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_scatter3d_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_scatter_001.png b/v0.14.0/_images/sphx_glr_scatter_001.png new file mode 100644 index 00000000000..909766e048b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_scatter_001.png differ diff --git a/v0.14.0/_images/sphx_glr_scatter_and_histograms_001.png b/v0.14.0/_images/sphx_glr_scatter_and_histograms_001.png new file mode 100644 index 00000000000..6095a6fd47e Binary files /dev/null and b/v0.14.0/_images/sphx_glr_scatter_and_histograms_001.png differ diff --git a/v0.14.0/_images/sphx_glr_scatter_and_histograms_thumb.png b/v0.14.0/_images/sphx_glr_scatter_and_histograms_thumb.png new file mode 100644 index 00000000000..7f3b3517041 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_scatter_and_histograms_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_scatter_thumb.png b/v0.14.0/_images/sphx_glr_scatter_thumb.png new file mode 100644 index 00000000000..54c6915ea30 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_scatter_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_shorelines_001.png b/v0.14.0/_images/sphx_glr_shorelines_001.png new file mode 100644 index 00000000000..b7ace227d30 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_shorelines_001.png differ diff --git a/v0.14.0/_images/sphx_glr_shorelines_thumb.png b/v0.14.0/_images/sphx_glr_shorelines_thumb.png new file mode 100644 index 00000000000..80d7aa3be38 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_shorelines_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_solar_001.png b/v0.14.0/_images/sphx_glr_solar_001.png new file mode 100644 index 00000000000..408f85026be Binary files /dev/null and b/v0.14.0/_images/sphx_glr_solar_001.png differ diff --git a/v0.14.0/_images/sphx_glr_solar_thumb.png b/v0.14.0/_images/sphx_glr_solar_thumb.png new file mode 100644 index 00000000000..e20c3b605c0 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_solar_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_subplots_001.png b/v0.14.0/_images/sphx_glr_subplots_001.png new file mode 100644 index 00000000000..1fb56d92452 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_subplots_001.png differ diff --git a/v0.14.0/_images/sphx_glr_subplots_002.png b/v0.14.0/_images/sphx_glr_subplots_002.png new file mode 100644 index 00000000000..45e8ddde347 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_subplots_002.png differ diff --git a/v0.14.0/_images/sphx_glr_subplots_003.png b/v0.14.0/_images/sphx_glr_subplots_003.png new file mode 100644 index 00000000000..42311c8be5c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_subplots_003.png differ diff --git a/v0.14.0/_images/sphx_glr_subplots_004.png b/v0.14.0/_images/sphx_glr_subplots_004.png new file mode 100644 index 00000000000..4c454ae5cdc Binary files /dev/null and b/v0.14.0/_images/sphx_glr_subplots_004.png differ diff --git a/v0.14.0/_images/sphx_glr_subplots_thumb.png b/v0.14.0/_images/sphx_glr_subplots_thumb.png new file mode 100644 index 00000000000..d97fda71dfc Binary files /dev/null and b/v0.14.0/_images/sphx_glr_subplots_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_ternary_001.png b/v0.14.0/_images/sphx_glr_ternary_001.png new file mode 100644 index 00000000000..daa4a8cc016 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_ternary_001.png differ diff --git a/v0.14.0/_images/sphx_glr_ternary_thumb.png b/v0.14.0/_images/sphx_glr_ternary_thumb.png new file mode 100644 index 00000000000..f86c4291df9 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_ternary_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_text_001.png b/v0.14.0/_images/sphx_glr_text_001.png new file mode 100644 index 00000000000..f2200a301ce Binary files /dev/null and b/v0.14.0/_images/sphx_glr_text_001.png differ diff --git a/v0.14.0/_images/sphx_glr_text_002.png b/v0.14.0/_images/sphx_glr_text_002.png new file mode 100644 index 00000000000..72ace3965cf Binary files /dev/null and b/v0.14.0/_images/sphx_glr_text_002.png differ diff --git a/v0.14.0/_images/sphx_glr_text_003.png b/v0.14.0/_images/sphx_glr_text_003.png new file mode 100644 index 00000000000..348c3c7ffdf Binary files /dev/null and b/v0.14.0/_images/sphx_glr_text_003.png differ diff --git a/v0.14.0/_images/sphx_glr_text_004.png b/v0.14.0/_images/sphx_glr_text_004.png new file mode 100644 index 00000000000..4b4c228e9fa Binary files /dev/null and b/v0.14.0/_images/sphx_glr_text_004.png differ diff --git a/v0.14.0/_images/sphx_glr_text_005.png b/v0.14.0/_images/sphx_glr_text_005.png new file mode 100644 index 00000000000..e84ca0be83c Binary files /dev/null and b/v0.14.0/_images/sphx_glr_text_005.png differ diff --git a/v0.14.0/_images/sphx_glr_text_006.png b/v0.14.0/_images/sphx_glr_text_006.png new file mode 100644 index 00000000000..741d0b9f33b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_text_006.png differ diff --git a/v0.14.0/_images/sphx_glr_text_symbols_001.png b/v0.14.0/_images/sphx_glr_text_symbols_001.png new file mode 100644 index 00000000000..26a9ae3da9b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_text_symbols_001.png differ diff --git a/v0.14.0/_images/sphx_glr_text_symbols_thumb.png b/v0.14.0/_images/sphx_glr_text_symbols_thumb.png new file mode 100644 index 00000000000..5f0248f71e7 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_text_symbols_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_text_thumb.png b/v0.14.0/_images/sphx_glr_text_thumb.png new file mode 100644 index 00000000000..8665f38bbb9 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_text_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_tilemaps_001.png b/v0.14.0/_images/sphx_glr_tilemaps_001.png new file mode 100644 index 00000000000..f1bf702c52a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_tilemaps_001.png differ diff --git a/v0.14.0/_images/sphx_glr_tilemaps_002.png b/v0.14.0/_images/sphx_glr_tilemaps_002.png new file mode 100644 index 00000000000..27a97a11850 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_tilemaps_002.png differ diff --git a/v0.14.0/_images/sphx_glr_tilemaps_thumb.png b/v0.14.0/_images/sphx_glr_tilemaps_thumb.png new file mode 100644 index 00000000000..5b513ae33dc Binary files /dev/null and b/v0.14.0/_images/sphx_glr_tilemaps_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_timestamp_001.png b/v0.14.0/_images/sphx_glr_timestamp_001.png new file mode 100644 index 00000000000..c5126e32085 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_timestamp_001.png differ diff --git a/v0.14.0/_images/sphx_glr_timestamp_002.png b/v0.14.0/_images/sphx_glr_timestamp_002.png new file mode 100644 index 00000000000..0a31386a83a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_timestamp_002.png differ diff --git a/v0.14.0/_images/sphx_glr_timestamp_thumb.png b/v0.14.0/_images/sphx_glr_timestamp_thumb.png new file mode 100644 index 00000000000..16b078eeec3 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_timestamp_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_track_sampling_001.png b/v0.14.0/_images/sphx_glr_track_sampling_001.png new file mode 100644 index 00000000000..628de5d4d65 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_track_sampling_001.png differ diff --git a/v0.14.0/_images/sphx_glr_track_sampling_thumb.png b/v0.14.0/_images/sphx_glr_track_sampling_thumb.png new file mode 100644 index 00000000000..71555912b37 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_track_sampling_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_vector_heads_tails_001.png b/v0.14.0/_images/sphx_glr_vector_heads_tails_001.png new file mode 100644 index 00000000000..9dcb71f5dc0 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vector_heads_tails_001.png differ diff --git a/v0.14.0/_images/sphx_glr_vector_heads_tails_thumb.png b/v0.14.0/_images/sphx_glr_vector_heads_tails_thumb.png new file mode 100644 index 00000000000..5693e852f48 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vector_heads_tails_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_vector_styles_001.png b/v0.14.0/_images/sphx_glr_vector_styles_001.png new file mode 100644 index 00000000000..51d1a786fed Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vector_styles_001.png differ diff --git a/v0.14.0/_images/sphx_glr_vector_styles_thumb.png b/v0.14.0/_images/sphx_glr_vector_styles_thumb.png new file mode 100644 index 00000000000..b19e9d0aa77 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vector_styles_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_001.png b/v0.14.0/_images/sphx_glr_vectors_001.png new file mode 100644 index 00000000000..7bcccc2fcad Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_001.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_002.png b/v0.14.0/_images/sphx_glr_vectors_002.png new file mode 100644 index 00000000000..e521c0847ba Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_002.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_003.png b/v0.14.0/_images/sphx_glr_vectors_003.png new file mode 100644 index 00000000000..ada91aa9e31 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_003.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_004.png b/v0.14.0/_images/sphx_glr_vectors_004.png new file mode 100644 index 00000000000..95bfe61e9f1 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_004.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_005.png b/v0.14.0/_images/sphx_glr_vectors_005.png new file mode 100644 index 00000000000..47dd836f1ba Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_005.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_006.png b/v0.14.0/_images/sphx_glr_vectors_006.png new file mode 100644 index 00000000000..562ead3a7ca Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_006.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_007.png b/v0.14.0/_images/sphx_glr_vectors_007.png new file mode 100644 index 00000000000..4c25fca57d2 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_007.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_008.png b/v0.14.0/_images/sphx_glr_vectors_008.png new file mode 100644 index 00000000000..30147358a2e Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_008.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_009.png b/v0.14.0/_images/sphx_glr_vectors_009.png new file mode 100644 index 00000000000..dc702990235 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_009.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_010.png b/v0.14.0/_images/sphx_glr_vectors_010.png new file mode 100644 index 00000000000..2f1cc225fb6 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_010.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_011.png b/v0.14.0/_images/sphx_glr_vectors_011.png new file mode 100644 index 00000000000..b7f539208a1 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_011.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_012.png b/v0.14.0/_images/sphx_glr_vectors_012.png new file mode 100644 index 00000000000..0b8e50fc17b Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_012.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_013.png b/v0.14.0/_images/sphx_glr_vectors_013.png new file mode 100644 index 00000000000..2a90c4a361f Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_013.png differ diff --git a/v0.14.0/_images/sphx_glr_vectors_thumb.png b/v0.14.0/_images/sphx_glr_vectors_thumb.png new file mode 100644 index 00000000000..41493abfb8a Binary files /dev/null and b/v0.14.0/_images/sphx_glr_vectors_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_velo_arrow_ellipse_001.png b/v0.14.0/_images/sphx_glr_velo_arrow_ellipse_001.png new file mode 100644 index 00000000000..c02be383314 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_velo_arrow_ellipse_001.png differ diff --git a/v0.14.0/_images/sphx_glr_velo_arrow_ellipse_thumb.png b/v0.14.0/_images/sphx_glr_velo_arrow_ellipse_thumb.png new file mode 100644 index 00000000000..c1f6f213022 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_velo_arrow_ellipse_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_wiggle_001.png b/v0.14.0/_images/sphx_glr_wiggle_001.png new file mode 100644 index 00000000000..9a2c8b0c511 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_wiggle_001.png differ diff --git a/v0.14.0/_images/sphx_glr_wiggle_thumb.png b/v0.14.0/_images/sphx_glr_wiggle_thumb.png new file mode 100644 index 00000000000..9f70cf72848 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_wiggle_thumb.png differ diff --git a/v0.14.0/_images/sphx_glr_working_with_panel_001.png b/v0.14.0/_images/sphx_glr_working_with_panel_001.png new file mode 100644 index 00000000000..c9b87f053bf Binary files /dev/null and b/v0.14.0/_images/sphx_glr_working_with_panel_001.png differ diff --git a/v0.14.0/_images/sphx_glr_working_with_panel_thumb.png b/v0.14.0/_images/sphx_glr_working_with_panel_thumb.png new file mode 100644 index 00000000000..44138fc6413 Binary files /dev/null and b/v0.14.0/_images/sphx_glr_working_with_panel_thumb.png differ diff --git a/v0.14.0/_modules/index.html b/v0.14.0/_modules/index.html new file mode 100644 index 00000000000..af449721963 --- /dev/null +++ b/v0.14.0/_modules/index.html @@ -0,0 +1,292 @@ + + + + + + + + Overview: module code — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +

All modules for which code is available

+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/_show_versions.html b/v0.14.0/_modules/pygmt/_show_versions.html new file mode 100644 index 00000000000..6e5b80a92aa --- /dev/null +++ b/v0.14.0/_modules/pygmt/_show_versions.html @@ -0,0 +1,333 @@ + + + + + + + + pygmt._show_versions — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt._show_versions

+"""
+Utility methods to print system information for debugging.
+
+Adapted from :func:`rioxarray.show_versions` and :func:`pandas.show_versions`.
+"""
+
+import platform
+import shutil
+import subprocess
+import sys
+from importlib.metadata import PackageNotFoundError, requires, version
+from typing import TextIO
+
+from packaging.requirements import Requirement
+from packaging.version import Version
+from pygmt.clib import Session, __gmt_version__
+
+# Get semantic version through setuptools-scm
+__version__ = f'v{version("pygmt")}'  # e.g. v0.1.2.dev3+g0ab3cd78
+__commit__ = __version__.split("+g")[-1] if "+g" in __version__ else ""  # 0ab3cd78
+
+
+def _get_clib_info() -> dict[str, str]:
+    """
+    Get information about the GMT shared library.
+    """
+    with Session() as lib:
+        return lib.info
+
+
+def _get_module_version(modname: str) -> str | None:
+    """
+    Get version information of a Python module.
+    """
+    try:
+        return version(modname)
+    except PackageNotFoundError:
+        return None
+
+
+def _get_ghostscript_version() -> str | None:
+    """
+    Get Ghostscript version.
+    """
+    match sys.platform:
+        case name if name in {"linux", "darwin"} or name.startswith("freebsd"):
+            cmds = ["gs"]
+        case "win32":
+            cmds = ["gswin64c.exe", "gswin32c.exe"]
+        case _:
+            return None
+
+    for gs_cmd in cmds:
+        if (gsfullpath := shutil.which(gs_cmd)) is not None:
+            return subprocess.check_output(
+                [gsfullpath, "--version"], universal_newlines=True
+            ).strip()
+    return None
+
+
+def _check_ghostscript_version(gs_version: str | None) -> str | None:
+    """
+    Check if the Ghostscript version is compatible with GMT versions.
+    """
+    if gs_version is None:
+        return "Ghostscript is not detected. Your installation may be broken."
+
+    match Version(gs_version):
+        case v if v < Version("9.53"):
+            return (
+                f"Ghostscript v{gs_version} is too old and may have serious bugs. "
+                "Please consider upgrading your Ghostscript."
+            )
+        case v if Version("10.00") <= v < Version("10.02"):
+            return (
+                f"Ghostscript v{gs_version} has known bugs. "
+                "Please consider upgrading to version v10.02 or later."
+            )
+        case v if v >= Version("10.02") and Version(__gmt_version__) < Version("6.5.0"):
+            return (
+                f"GMT v{__gmt_version__} doesn't support Ghostscript v{gs_version}. "
+                "Please consider upgrading to GMT>=6.5.0 or downgrading to Ghostscript "
+                "v9.56."
+            )
+    return None
+
+
+
+[docs] +def show_versions(file: TextIO | None = sys.stdout): + """ + Print various dependency versions which are useful when submitting bug reports. + + This includes information about: + + - PyGMT itself + - System information (Python version, Operating System) + - Core dependency versions (NumPy, pandas, Xarray, etc) + - GMT library information + + It also warns users if the installed Ghostscript version has serious bugs or is + incompatible with the installed GMT version. + """ + sys_info = { + "python": sys.version.replace("\n", " "), + "executable": sys.executable, + "machine": platform.platform(), + } + requirements = [Requirement(v).name for v in requires("pygmt")] + ["gdal"] # type: ignore[union-attr] + dep_info = {name: _get_module_version(name) for name in requirements} + dep_info.update({"ghostscript": _get_ghostscript_version()}) + + lines = [] + lines.append("PyGMT information:") + lines.append(f" version: {__version__}") + lines.append("System information:") + lines.extend([f" {key}: {val}" for key, val in sys_info.items()]) + lines.append("Dependency information:") + lines.extend([f" {key}: {val}" for key, val in dep_info.items()]) + lines.append("GMT library information:") + lines.extend([f" {key}: {val}" for key, val in _get_clib_info().items()]) + + if warnmsg := _check_ghostscript_version(dep_info["ghostscript"]): + lines.append("WARNING:") + lines.append(f" {warnmsg}") + + print("\n".join(lines), file=file)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/accessors.html b/v0.14.0/_modules/pygmt/accessors.html new file mode 100644 index 00000000000..abaabf8a92e --- /dev/null +++ b/v0.14.0/_modules/pygmt/accessors.html @@ -0,0 +1,371 @@ + + + + + + + + pygmt.accessors — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.accessors

+"""
+GMT accessor for :class:`xarray.DataArray`.
+"""
+
+import contextlib
+from pathlib import Path
+
+import xarray as xr
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.src.grdinfo import grdinfo
+
+
+
+[docs] +@xr.register_dataarray_accessor("gmt") +class GMTDataArrayAccessor: + """ + GMT accessor for :class:`xarray.DataArray`. + + The accessor extends :class:`xarray.DataArray` to store GMT-specific + properties about grids, which are important for PyGMT to correctly process + and plot the grids. + + Notes + ----- + + Due to the limitations of xarray accessors, the GMT accessors are created + once per :class:`xarray.DataArray` instance. You may lose these + GMT-specific properties when manipulating grids (e.g., arithmetic and slice + operations) or when accessing a :class:`xarray.DataArray` from a + :class:`xarray.Dataset`. In these cases, you need to manually set these + properties before passing the grid to PyGMT. + + Examples + -------- + + For GMT's built-in remote datasets, these GMT-specific properties are + automatically determined and you can access them as follows: + + >>> from pygmt.datasets import load_earth_relief + >>> # Use the global Earth relief grid with 1 degree spacing + >>> grid = load_earth_relief(resolution="01d", registration="pixel") + >>> # See if grid uses Gridline (0) or Pixel (1) registration + >>> grid.gmt.registration + 1 + >>> # See if grid uses Cartesian (0) or Geographic (1) coordinate system + >>> grid.gmt.gtype + 1 + + For :class:`xarray.DataArray` grids created by yourself, grid properties + ``registration`` and ``gtype`` default to 0 (i.e., a gridline-registered, + Cartesian grid). You need to set the correct properties before + passing it to PyGMT functions: + + >>> import numpy as np + >>> import pygmt + >>> import xarray as xr + >>> # create a DataArray in gridline coordinates of sin(lon) * cos(lat) + >>> interval = 2.5 + >>> lat = np.arange(90, -90 - interval, -interval) + >>> lon = np.arange(0, 360 + interval, interval) + >>> longrid, latgrid = np.meshgrid(lon, lat) + >>> data = np.sin(np.deg2rad(longrid)) * np.cos(np.deg2rad(latgrid)) + >>> grid = xr.DataArray(data, coords=[("latitude", lat), ("longitude", lon)]) + >>> # default to a gridline-registered Cartesian grid + >>> grid.gmt.registration, grid.gmt.gtype + (0, 0) + >>> # set it to a gridline-registered geographic grid + >>> grid.gmt.registration = 0 + >>> grid.gmt.gtype = 1 + >>> grid.gmt.registration, grid.gmt.gtype + (0, 1) + + Note that the accessors are created once per :class:`xarray.DataArray` + instance, so you may lose these GMT-specific properties after manipulating + your grid. + + Inplace assignment operators like ``*=`` don't create new instances, so the + properties are still kept: + + >>> grid *= 2.0 + >>> grid.gmt.registration, grid.gmt.gtype + (0, 1) + + Other grid operations (e.g., arithmetic or slice operations) create new + instances, so the properties will be lost: + + >>> # grid2 is a slice of the original grid + >>> grid2 = grid[0:30, 50:80] + >>> # properties are reset to the default values for new instance + >>> grid2.gmt.registration, grid2.gmt.gtype + (0, 0) + >>> # need to set these properties before passing the grid to PyGMT + >>> grid2.gmt.registration = grid.gmt.registration + >>> grid2.gmt.gtype = grid.gmt.gtype + >>> grid2.gmt.registration, grid2.gmt.gtype + (0, 1) + + Accessing a :class:`xarray.DataArray` from a :class:`xarray.Dataset` always + creates new instances, so these properties are always lost. The workaround + is to assign the :class:`xarray.DataArray` into a variable: + + >>> ds = xr.Dataset({"zval": grid}) + >>> ds.zval.gmt.registration, ds.zval.gmt.gtype + (0, 0) + >>> # manually set these properties won't work as expected + >>> ds.zval.gmt.registration, ds.zval.gmt.gtype = 0, 1 + >>> ds.zval.gmt.registration, ds.zval.gmt.gtype + (0, 0) + >>> # workaround: assign the DataArray into a variable + >>> zval = ds.zval + >>> zval.gmt.registration, zval.gmt.gtype + (0, 0) + >>> zval.gmt.registration, zval.gmt.gtype = 0, 1 + >>> zval.gmt.registration, zval.gmt.gtype + (0, 1) + """ + + def __init__(self, xarray_obj): + self._obj = xarray_obj + # Default to Gridline registration and Cartesian grid type + self._registration = 0 + self._gtype = 0 + + # If the source file exists, get grid registration and grid type from the last + # two columns of the shortened summary information of grdinfo. + if (_source := self._obj.encoding.get("source")) and Path(_source).exists(): + with contextlib.suppress(ValueError): + self._registration, self._gtype = map( + int, grdinfo(_source, per_column="n").split()[-2:] + ) + + @property + def registration(self): + """ + Registration type of the grid, either 0 (Gridline) or 1 (Pixel). + """ + return self._registration + + @registration.setter + def registration(self, value): + if value not in {0, 1}: + msg = ( + f"Invalid grid registration value: {value}, should be either " + "0 for Gridline registration or 1 for Pixel registration." + ) + raise GMTInvalidInput(msg) + self._registration = value + + @property + def gtype(self): + """ + Coordinate system type of the grid, either 0 (Cartesian) or 1 (Geographic). + """ + return self._gtype + + @gtype.setter + def gtype(self, value): + if value not in {0, 1}: + msg = ( + f"Invalid coordinate system type: {value}, should be " + "either 0 for Cartesian or 1 for Geographic." + ) + raise GMTInvalidInput(msg) + self._gtype = value
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/clib/session.html b/v0.14.0/_modules/pygmt/clib/session.html new file mode 100644 index 00000000000..f3f2134643e --- /dev/null +++ b/v0.14.0/_modules/pygmt/clib/session.html @@ -0,0 +1,2682 @@ + + + + + + + + pygmt.clib.session — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.clib.session

+"""
+Defines the Session class to create and destroy a GMT API session and provides access to
+the API functions.
+
+Uses ctypes to wrap most of the core functions from the C API.
+"""
+
+import contextlib
+import ctypes as ctp
+import io
+import sys
+import warnings
+from collections.abc import Callable, Generator, Sequence
+from typing import Literal
+
+import numpy as np
+import pandas as pd
+import xarray as xr
+from pygmt.clib.conversion import (
+    array_to_datetime,
+    dataarray_to_matrix,
+    sequence_to_ctypes_array,
+    strings_to_ctypes_array,
+    vectors_to_arrays,
+)
+from pygmt.clib.loading import get_gmt_version, load_libgmt
+from pygmt.datatypes import _GMT_DATASET, _GMT_GRID, _GMT_IMAGE
+from pygmt.exceptions import GMTCLibError, GMTCLibNoSessionError, GMTInvalidInput
+from pygmt.helpers import (
+    _validate_data_input,
+    data_kind,
+    tempfile_from_geojson,
+    tempfile_from_image,
+)
+
+FAMILIES = [
+    "GMT_IS_DATASET",  # Entity is a data table
+    "GMT_IS_GRID",  # Entity is a grid
+    "GMT_IS_IMAGE",  # Entity is a 1- or 3-band unsigned char image
+    "GMT_IS_PALETTE",  # Entity is a color palette table
+    "GMT_IS_POSTSCRIPT",  # Entity is a PostScript content struct
+    "GMT_IS_MATRIX",  # Entity is a user matrix
+    "GMT_IS_VECTOR",  # Entity is a set of user vectors
+    "GMT_IS_CUBE",  # Entity is a 3-D data cube
+]
+
+VIAS = [
+    "GMT_VIA_MATRIX",  # dataset is passed as a matrix
+    "GMT_VIA_VECTOR",  # dataset is passed as a set of vectors
+]
+
+GEOMETRIES = [
+    "GMT_IS_NONE",  # items without geometry (e.g., CPT)
+    "GMT_IS_POINT",  # items are points
+    "GMT_IS_LINE",  # items are lines
+    "GMT_IS_POLY",  # items are polygons
+    "GMT_IS_LP",  # items could be any one of LINE or POLY
+    "GMT_IS_PLP",  # items could be any one of POINT, LINE, or POLY
+    "GMT_IS_SURFACE",  # items are 2-D grid
+    "GMT_IS_VOLUME",  # items are 3-D grid
+    "GMT_IS_TEXT",  # Text strings which triggers ASCII text reading
+]
+
+METHODS = [
+    "GMT_IS_DUPLICATE",  # tell GMT the data are read-only
+    "GMT_IS_REFERENCE",  # tell GMT to duplicate the data
+]
+
+DIRECTIONS = ["GMT_IN", "GMT_OUT"]
+
+MODES = [
+    "GMT_CONTAINER_AND_DATA",  # Create/Read/Write both container and the data array
+    "GMT_CONTAINER_ONLY",  # Cread/Read/Write the container but no data array
+    "GMT_DATA_ONLY",  # Create/Read/Write the container's data array only
+    "GMT_IS_OUTPUT",  # For creating a resource as a container for output
+]
+MODE_MODIFIERS = [
+    "GMT_GRID_IS_CARTESIAN",  # Grid is not geographic but Cartesian
+    "GMT_GRID_IS_GEO",  # Grid is geographic, not Cartesian
+    "GMT_WITH_STRINGS",  # Allocate string array for GMT_DATASET/GMT_VECTOR/GMT_MATRIX
+]
+
+REGISTRATIONS = ["GMT_GRID_NODE_REG", "GMT_GRID_PIXEL_REG"]
+
+# Dictionary for mapping numpy dtypes to GMT data types.
+DTYPES_NUMERIC = {
+    np.int8: "GMT_CHAR",
+    np.int16: "GMT_SHORT",
+    np.int32: "GMT_INT",
+    np.int64: "GMT_LONG",
+    np.longlong: "GMT_LONG",
+    np.uint8: "GMT_UCHAR",
+    np.uint16: "GMT_USHORT",
+    np.uint32: "GMT_UINT",
+    np.uint64: "GMT_ULONG",
+    np.ulonglong: "GMT_ULONG",
+    np.float32: "GMT_FLOAT",
+    np.float64: "GMT_DOUBLE",
+    np.timedelta64: "GMT_LONG",
+}
+DTYPES_TEXT = {
+    np.str_: "GMT_TEXT",
+    np.datetime64: "GMT_DATETIME",
+}
+DTYPES = DTYPES_NUMERIC | DTYPES_TEXT
+
+# Dictionary for storing the values of GMT constants.
+GMT_CONSTANTS = {}
+
+# Load the GMT library outside the Session class to avoid repeated loading.
+_libgmt = load_libgmt()
+__gmt_version__ = get_gmt_version(_libgmt)
+
+
+
+[docs] +class Session: + """ + A GMT API session where most operations involving the C API happen. + + Works as a context manager (for use in a ``with`` block) to create a GMT C API + session and destroy it in the end to clean up memory. + + Functions of the shared library are exposed as methods of this class. Most methods + MUST be used with an open session (inside a ``with`` block). If creating GMT data + structures to communicate data, put that code inside the same ``with`` block as the + API calls that will use the data. + + By default, will let :mod:`ctypes` try to find the GMT shared library (``libgmt``). + If the environment variable :term:`GMT_LIBRARY_PATH` is set, will look for the + shared library in the directory specified by it. + + The ``session_pointer`` attribute holds a ctypes pointer to the currently open + session. + + Raises + ------ + GMTCLibNotFoundError + If there was any problem loading the library (couldn't find it or couldn't + access the functions). + GMTCLibNoSessionError + If you try to call a method outside of a ``with`` block. + + Examples + -------- + + >>> from pygmt.helpers.testing import load_static_earth_relief + >>> from pygmt.helpers import GMTTempFile + >>> grid = load_static_earth_relief() + >>> type(grid) + <class 'xarray.core.dataarray.DataArray'> + >>> # Create a session and destroy it automatically when exiting the "with" block. + >>> with Session() as lib: + ... # Create a virtual file and link to the memory block of the grid. + ... with lib.virtualfile_from_grid(grid) as fin: + ... # Create a temp file to use as output. + ... with GMTTempFile() as fout: + ... # Call the grdinfo module with the virtual file as input and the + ... # temp file as output. + ... lib.call_module("grdinfo", [fin, "-C", f"->{fout.name}"]) + ... # Read the contents of the temp file before it's deleted. + ... print(fout.read().strip()) + -55 -47 -24 -10 190 981 1 1 8 14 1 1 + """ + + @property + def session_pointer(self) -> ctp.c_void_p: + """ + The :class:`ctypes.c_void_p` pointer to the current open GMT session. + + Raises + ------ + GMTCLibNoSessionError + If trying to access without a currently open GMT session (i.e., outside of + the context manager). + """ + if getattr(self, "_session_pointer", None) is None: + msg = "No currently open GMT API session." + raise GMTCLibNoSessionError(msg) + return self._session_pointer + + @session_pointer.setter + def session_pointer(self, session: ctp.c_void_p): + """ + Set the session void pointer. + """ + self._session_pointer = session + + @property + def info(self) -> dict[str, str]: + """ + Dictionary with the GMT version and default paths and parameters. + """ + if not hasattr(self, "_info"): + self._info = { + "version": self.get_default("API_VERSION"), + "padding": self.get_default("API_PAD"), + # API_BINDIR points to the directory of the Python interpreter + # "binary dir": self.get_default("API_BINDIR"), + "share dir": self.get_default("API_SHAREDIR"), + # This segfaults for some reason + # 'data dir': self.get_default("API_DATADIR"), + "plugin dir": self.get_default("API_PLUGINDIR"), + "library path": self.get_default("API_LIBRARY"), + "cores": self.get_default("API_CORES"), + "grid layout": self.get_default("API_GRID_LAYOUT"), + "image layout": self.get_default("API_IMAGE_LAYOUT"), + "binary version": self.get_default("API_BIN_VERSION"), + } + return self._info + +
+[docs] + def __enter__(self): + """ + Create a GMT API session. + + Calls :meth:`pygmt.clib.Session.create`. + """ + self.create("pygmt-session") + return self
+ + +
+[docs] + def __exit__(self, exc_type, exc_value, traceback): + """ + Destroy the currently open GMT API session. + + Calls :meth:`pygmt.clib.Session.destroy`. + """ + self.destroy()
+ + +
+[docs] + def __getitem__(self, name: str) -> int: + """ + Get the value of a GMT constant. + + Parameters + ---------- + name + The name of the constant (e.g., ``"GMT_SESSION_EXTERNAL"``). + + Returns + ------- + value + Integer value of the constant. Do not rely on this value because it might + change. + """ + if name not in GMT_CONSTANTS: + GMT_CONSTANTS[name] = self.get_enum(name) + return GMT_CONSTANTS[name]
+ + + def get_enum(self, name: str) -> int: + """ + Get the value of a GMT constant (C enum) from ``gmt_resources.h``. + + Used to set configuration values for other API calls. Wraps ``GMT_Get_Enum``. + + Parameters + ---------- + name + The name of the constant (e.g., ``"GMT_SESSION_EXTERNAL"``). + + Returns + ------- + value + Integer value of the constant. Do not rely on this value because it might + change. + + Raises + ------ + GMTCLibError + If the constant doesn't exist. + """ + c_get_enum = self.get_libgmt_func( + "GMT_Get_Enum", argtypes=[ctp.c_void_p, ctp.c_char_p], restype=ctp.c_int + ) + + # The C library introduced the void API pointer to GMT_Get_Enum so that it's + # consistent with other functions. It doesn't use the pointer so we can pass + # in None (NULL pointer). We can't give it the actual pointer because we need + # to call GMT_Get_Enum when creating a new API session pointer (chicken-and-egg + # type of thing). + session = None + value = c_get_enum(session, name.encode()) + if value is None or value == -99999: + msg = f"Constant '{name}' doesn't exist in libgmt." + raise GMTCLibError(msg) + return value + +
+[docs] + def get_libgmt_func( + self, name: str, argtypes: list | None = None, restype=None + ) -> Callable: + """ + Get a ctypes function from the libgmt shared library. + + Assigns the argument and return type conversions for the function. + + Use this method to access a C function from libgmt. + + Parameters + ---------- + name + The name of the GMT API function. + argtypes + List of ctypes types used to convert the Python input arguments for the API + function. + restype : ctypes type + The ctypes type used to convert the input returned by the function into a + Python type. + + Returns + ------- + function + The GMT API function. + + Examples + -------- + + >>> from ctypes import c_void_p, c_int + >>> with Session() as lib: + ... func = lib.get_libgmt_func( + ... "GMT_Destroy_Session", argtypes=[c_void_p], restype=c_int + ... ) + >>> type(func) + <class 'ctypes.CDLL.__init__.<locals>._FuncPtr'> + """ + if not hasattr(self, "_libgmt"): + self._libgmt = _libgmt + function = getattr(self._libgmt, name) + if argtypes is not None: + function.argtypes = argtypes + if restype is not None: + function.restype = restype + return function
+ + +
+[docs] + def create(self, name: str): + """ + Create a new GMT C API session. + + This is required before most other methods of :class:`pygmt.clib.Session` can be + called. + + .. warning:: + + Usage of :class:`pygmt.clib.Session` as a context manager in a ``with`` + block is preferred over calling :meth:`pygmt.clib.Session.create` and + :meth:`pygmt.clib.Session.destroy` manually. + + Calls ``GMT_Create_Session`` and generates a new ``GMTAPI_CTRL`` struct, which + is a :class:`ctypes.c_void_p` pointer. Sets the ``session_pointer`` attribute to + this pointer. + + Remember to terminate the current session using + :meth:`pygmt.clib.Session.destroy` before creating a new one. + + Parameters + ---------- + name + A name for this session. Doesn't really affect the outcome. + """ + # Check if there is a currently open session by accessing the "session_pointer" + # attribute. If not, it will raise the GMTCLibNoSessionError exception and we're + # free to create a new one. Otherwise, we will raise a GMTCLibError exception. + try: + _ = self.session_pointer + msg = ( + "Failed to create a GMT API session: " + "There is currently an open session. Must destroy it first." + ) + raise GMTCLibError(msg) + except GMTCLibNoSessionError: + pass + + c_create_session = self.get_libgmt_func( + "GMT_Create_Session", + argtypes=[ctp.c_char_p, ctp.c_uint, ctp.c_uint, ctp.c_void_p], + restype=ctp.c_void_p, + ) + + # Capture the output printed by GMT into this list. Will use it later to + # generate error messages for the exceptions raised by API calls. + self._error_log: list[str] = [] + + @ctp.CFUNCTYPE(ctp.c_int, ctp.c_void_p, ctp.c_char_p) + def print_func(file_pointer, message): # noqa: ARG001 + """ + Callback function that the GMT C API will use to print log and error + messages. + + We'll capture the messages and print them to stderr so that they will show + up on the Jupyter notebook. + """ + # TODO(GMT>6.5.0): Remove the workaround for upstream bug in GMT<=6.5.0. + # Have to use try..except due to upstream GMT bug in GMT<=6.5.0. + # See https://github.com/GenericMappingTools/pygmt/issues/3205. + try: + message = message.decode().strip() + except UnicodeDecodeError: + return 0 + self._error_log.append(message) + # Flush to make sure the messages are printed even if we have a crash. + print(message, file=sys.stderr, flush=True) # noqa: T201 + return 0 + + # Need to store a copy of the function because ctypes doesn't and it will be + # garbage collected otherwise + self._print_callback = print_func + + padding = self["GMT_PAD_DEFAULT"] + # GMT_SESSION_EXTERNAL: GMT is called by an external wrapper. + # GMT_SESSION_NOGDALCLOSE: Do not call GDALDestroyDriverManager when using GDAL. + session_type = self["GMT_SESSION_EXTERNAL"] + self["GMT_SESSION_NOGDALCLOSE"] + session = c_create_session(name.encode(), padding, session_type, print_func) + + if session is None: + msg = f"Failed to create a GMT API session:\n{self._error_message}" + raise GMTCLibError(msg) + + self.session_pointer = session
+ + + @property + def _error_message(self) -> str: + """ + A string with all error messages emitted by the C API. + + Only includes messages with the string ``"[ERROR]"`` in them. + """ + msg = "" + if hasattr(self, "_error_log"): + msg = "\n".join(line for line in self._error_log if "[ERROR]" in line) + return msg + +
+[docs] + def destroy(self): + """ + Destroy the currently open GMT API session. + + .. warning:: + + Usage of :class:`pygmt.clib.Session` as a context manager in a ``with`` + block is preferred over calling :meth:`pygmt.clib.Session.create` and + :meth:`pygmt.clib.Session.destroy` manually. + + Calls ``GMT_Destroy_Session`` to terminate and free the memory of a registered + ``GMTAPI_CTRL`` session (the pointer for this struct is stored in the + ``session_pointer`` attribute). + + Always use this method after you are done using a C API session. The session + needs to be destroyed before creating a new one. Otherwise, some of the + configuration files might be left behind and can influence subsequent API calls. + + Sets the ``session_pointer`` attribute to ``None``. + """ + c_destroy_session = self.get_libgmt_func( + "GMT_Destroy_Session", argtypes=[ctp.c_void_p], restype=ctp.c_int + ) + + status = c_destroy_session(self.session_pointer) + if status: + msg = f"Failed to destroy GMT API session:\n{self._error_message}" + raise GMTCLibError(msg) + + self.session_pointer = None
+ + +
+[docs] + def get_default(self, name: str) -> str: + """ + Get the value of a GMT configuration parameter or a GMT API parameter. + + In addition to the long list of GMT configuration parameters, the following API + parameter names are also supported: + + * ``"API_VERSION"``: The GMT API version + * ``"API_PAD"``: The grid padding setting + * ``"API_BINDIR"``: The binary file directory + * ``"API_SHAREDIR"``: The share directory + * ``"API_DATADIR"``: The data directory + * ``"API_PLUGINDIR"``: The plugin directory + * ``"API_LIBRARY"``: The core library path + * ``"API_CORES"``: The number of cores + * ``"API_IMAGE_LAYOUT"``: The image/band layout + * ``"API_GRID_LAYOUT"``: The grid layout + * ``"API_BIN_VERSION"``: The GMT binary version (with git information) + + Parameters + ---------- + name + The name of the GMT configuration parameter (e.g., ``"PROJ_LENGTH_UNIT"``) + or a GMT API parameter (e.g., ``"API_VERSION"``). + + Returns + ------- + value + The current value for the parameter. + + Raises + ------ + GMTCLibError + If the parameter doesn't exist. + """ + c_get_default = self.get_libgmt_func( + "GMT_Get_Default", + argtypes=[ctp.c_void_p, ctp.c_char_p, ctp.c_char_p], + restype=ctp.c_int, + ) + + # Make a string buffer to get a return value + value = ctp.create_string_buffer(4096) + status = c_get_default(self.session_pointer, name.encode(), value) + if status != 0: + msg = f"Error getting value for '{name}' (error code {status})." + raise GMTCLibError(msg) + return value.value.decode()
+ + +
+[docs] + def get_common(self, option: str) -> bool | int | float | np.ndarray: + """ + Inquire if a GMT common option has been set and return its current value if + possible. + + Parameters + ---------- + option + The GMT common option to check. Valid options are ``"B"``, ``"I"``, ``"J"``, + ``"R"``, ``"U"``, ``"V"``, ``"X"``, ``"Y"``, ``"a"``, ``"b"``, ``"f"``, + ``"g"``, ``"h"``, ``"i"``, ``"n"``, ``"o"``, ``"p"``, ``"r"``, ``"s"``, + ``"t"``, and ``":"``. + + Returns + ------- + value + Whether the option was set or its value. If the option was not set, return + ``False``. Otherwise, the return value depends on the choice of the option. + + - options ``"B"``, ``"J"``, ``"U"``, ``"g"``, ``"n"``, ``"p"``, and ``"s"``: + return ``True`` if set, else ``False`` (bool) + - ``"I"``: 2-element array for the increments (float) + - ``"R"``: 4-element array for the region (float) + - ``"V"``: the verbose level (int) + - ``"X"``: the xshift (float) + - ``"Y"``: the yshift (float) + - ``"a"``: geometry of the dataset (int) + - ``"b"``: return 0 if ``-bi`` was set and 1 if ``-bo`` was set (int) + - ``"f"``: return 0 if ``-fi`` was set and 1 if ``-fo`` was set (int) + - ``"h"``: whether to delete existing header records (int) + - ``"i"``: number of input columns (int) + - ``"o"``: number of output columns (int) + - ``"r"``: registration type (int) + - ``"t"``: 2-element array for the transparency (float) + - ``":"``: return 0 if ``-:i`` was set and 1 if ``-:o`` was set (int) + + Examples + -------- + >>> with Session() as lib: + ... lib.call_module( + ... "basemap", ["-R0/10/10/15", "-JX5i/2.5i", "-Baf", "-Ve"] + ... ) + ... region = lib.get_common("R") + ... projection = lib.get_common("J") + ... timestamp = lib.get_common("U") + ... verbose = lib.get_common("V") + ... lib.call_module("plot", ["-T", "-Xw+1i", "-Yh-1i"]) + ... xshift = lib.get_common("X") # xshift/yshift are in inches + ... yshift = lib.get_common("Y") + >>> print(region, projection, timestamp, verbose, xshift, yshift) + [ 0. 10. 10. 15.] True False 3 6.0 1.5 + >>> with Session() as lib: + ... lib.call_module("basemap", ["-R0/10/10/15", "-JX5i/2.5i", "-Baf"]) + ... lib.get_common("A") + Traceback (most recent call last): + ... + pygmt.exceptions.GMTInvalidInput: Unknown GMT common option flag 'A'. + """ + if option not in "BIJRUVXYabfghinoprst:": + msg = f"Unknown GMT common option flag '{option}'." + raise GMTInvalidInput(msg) + + c_get_common = self.get_libgmt_func( + "GMT_Get_Common", + argtypes=[ctp.c_void_p, ctp.c_uint, ctp.POINTER(ctp.c_double)], + restype=ctp.c_int, + ) + value = np.empty(6, np.float64) # numpy array to store the value of the option + status = c_get_common( + self.session_pointer, + ord(option), + value.ctypes.data_as(ctp.POINTER(ctp.c_double)), + ) + + if status == self["GMT_NOTSET"]: # GMT_NOTSET (-1) means the option is not set + return False + if status == 0: # Option is set and no other value is returned. + return True + + # Otherwise, option is set and values are returned. + match option: + case "I" | "R" | "t": + # Option values (in double type) are returned via the 'value' array. + # 'status' is number of valid values in the array. + return value[:status] + case "X" | "Y": # Only one valid element in the array. + return value[0] + case _: # 'status' is the option value (in integer type). + return status
+ + +
+[docs] + def call_module(self, module: str, args: str | list[str]): + """ + Call a GMT module with the given arguments. + + Wraps ``GMT_Call_Module``. + + The ``GMT_Call_Module`` API function supports passing module arguments in three + different ways: + + 1. Pass a single string that contains whitespace-separated module arguments. + 2. Pass a list of strings and each string contains a module argument. + 3. Pass a list of ``GMT_OPTION`` data structure. + + Both options 1 and 2 are implemented in this function, but option 2 is preferred + because it can correctly handle special characters like whitespaces and + quotation marks in module arguments. + + Parameters + ---------- + module + The GMT module name to be called (``"coast"``, ``"basemap"``, etc). + args + Module arguments that will be passed to the GMT module. It can be either + a single string (e.g., ``"-R0/5/0/10 -JX10c -BWSen+t'My Title'"``) or a list + of strings (e.g., ``["-R0/5/0/10", "-JX10c", "-BWSEN+tMy Title"]``). + + Raises + ------ + GMTInvalidInput + If the ``args`` argument is not a string or a list of strings. + GMTCLibError + If the returned status code of the function is non-zero. + """ + c_call_module = self.get_libgmt_func( + "GMT_Call_Module", + argtypes=[ctp.c_void_p, ctp.c_char_p, ctp.c_int, ctp.c_void_p], + restype=ctp.c_int, + ) + + # 'args' can be (1) a single string or (2) a list of strings. + argv: bytes | ctp.Array[ctp.c_char_p] | None + if isinstance(args, list): + # 'args' is a list of strings and each string contains a module argument. + # In this way, GMT can correctly handle option arguments with whitespaces or + # quotation marks. This is the preferred way to pass arguments to the GMT + # API and is used for PyGMT >= v0.12.0. + mode = len(args) # 'mode' is the number of arguments. + # Pass a null pointer if no arguments are specified. + argv = strings_to_ctypes_array(args) if mode != 0 else None + elif isinstance(args, str): + # 'args' is a single string that contains whitespace-separated arguments. + # In this way, we need to correctly handle option arguments that contain + # whitespaces or quotation marks. It's used in PyGMT <= v0.11.0 but is no + # longer recommended. + mode = self["GMT_MODULE_CMD"] + argv = args.encode() + else: + msg = "'args' must either be a list of strings (recommended) or a string." + raise GMTInvalidInput(msg) + + status = c_call_module(self.session_pointer, module.encode(), mode, argv) + if status != 0: + msg = f"Module '{module}' failed with status code {status}:\n{self._error_message}" + raise GMTCLibError(msg)
+ + +
+[docs] + def create_data( + self, + family: str, + geometry: str, + mode: str, + dim: Sequence[int] | None = None, + ranges: Sequence[float] | None = None, + inc: Sequence[float] | None = None, + registration: Literal[ + "GMT_GRID_NODE_REG", "GMT_GRID_PIXEL_REG" + ] = "GMT_GRID_NODE_REG", + pad: int | None = None, + ) -> ctp.c_void_p: + """ + Create an empty GMT data container and allocate space to hold data. + + Valid data families and geometries are in ``FAMILIES`` and ``GEOMETRIES``. + + There are two ways to define the dimensions needed to actually allocate memory: + + 1. Via ``ranges``, ``inc`` and ``registration``. + 2. Via ``dim`` and ``registration``. + + ``dim`` contains up to 4 values and they have different meanings for + different GMT data families: + + For ``GMT_DATASET``: + + - 0: number of tables + - 1: number of segments per table + - 2: number of rows per segment + - 3: number of columns per row + + For ``GMT_VECTOR``: + + - 0: number of columns + - 1: number of rows [optional, can be 0 if unknown] + - 2: data type (e.g., ``GMT_DOUBLE``) [Will be overwritten by ``put_vector``] + + For ``GMT_GRID``/``GMT_IMAGE``/``GMT_CUBE``/``GMT_MATRIX``: + + - 0: number of columns + - 1: number of rows + - 2: number of bands or layers [Ignored for ``GMT_GRID``] + - 3: data type (e.g., ``GMT_DOUBLE``) [For ``GMT_MATRIX`` only, but will be + overwritten by ``put_matrix``] + + In other words, ``inc`` is assumed to be 1.0, and ``ranges`` is + [0, dim[0], 0, dim[1]] for pixel registration or + [0, dim[0]-1.0, 0, dim[1]-1.0] for grid registration. + + + When creating a grid/image/cube, you can do it in one or two steps: + + 1. Call this function with ``mode="GMT_CONTAINER_AND_DATA"``. This creates + a header and allocates a grid or an image + 2. Call this function twice: + + 1. First with ``mode="GMT_CONTAINER_ONLY"``, to create a header only and + compute the dimensions based on other parameters + 2. Second with ``mode="GMT_DATA_ONLY"``, to allocate the grid/image/cube + array based on the dimensions already set. This time, you pass NULL for + ``dim``/``ranges``/``inc``/``registration``/``pad`` and let ``data`` be + the void pointer returned in the first step. + + **Note**: This is not implemented yet, since this function doesn't have the + ``data`` parameter. + + Parameters + ---------- + family + A valid GMT data family name (e.g., ``"GMT_IS_DATASET"``). See ``FAMILIES`` + for valid names. + geometry + A valid GMT data geometry name (e.g., ``"GMT_IS_POINT"``). See + ``GEOMETRIES`` for valid names. + mode + A valid GMT data mode. See ``MODES`` for valid names. For + ``GMT_IS_DATASET``/``GMT_IS_MATRIX``/``GMT_IS_VECTOR``, adding + ``GMT_WITH_STRINGS`` to the ``mode`` will allocate the corresponding arrays + of string pointers. + dim + The dimensions of the dataset, as explained above. If ``None``, will pass in + the NULL pointer. + ranges + The data extent. + inc + The increments between points of the dataset. + registration + The node registration. Can be ``"GMT_GRID_PIXEL_REG"`` or + ``"GMT_GRID_NODE_REG"``. + pad + The padding for ``GMT_IS_GRID``/``GMT_IS_IMAGE``/``GMT_IS_CUBE``. If + ``None``, defaults to ``"GMT_PAD_DEFAULT"``. + + For ``GMT_IS_MATRIX``, it can be: + + - 0: default row/col orientation [Default] + - 1: row-major format (C) + - 2: column-major format (FORTRAN) + + Returns + ------- + data_ptr + A ctypes pointer (an integer) to the allocated GMT data container. + """ + c_create_data = self.get_libgmt_func( + "GMT_Create_Data", + argtypes=[ + ctp.c_void_p, # API + ctp.c_uint, # family + ctp.c_uint, # geometry + ctp.c_uint, # mode + ctp.POINTER(ctp.c_uint64), # dim + ctp.POINTER(ctp.c_double), # range + ctp.POINTER(ctp.c_double), # inc + ctp.c_uint, # registration + ctp.c_int, # pad + ctp.c_void_p, # data + ], + restype=ctp.c_void_p, + ) + + family_int = self._parse_constant(family, valid=FAMILIES, valid_modifiers=VIAS) + mode_int = self._parse_constant( + mode, + valid=MODES, + valid_modifiers=MODE_MODIFIERS, + ) + geometry_int = self._parse_constant(geometry, valid=GEOMETRIES) + registration_int = self._parse_constant(registration, valid=REGISTRATIONS) + + # Convert dim, ranges, and inc to ctypes arrays if given (will be None if not + # given to represent NULL pointers) + dim_ctp = sequence_to_ctypes_array(dim, ctp.c_uint64, 4) + ranges_ctp = sequence_to_ctypes_array(ranges, ctp.c_double, 4) + inc_ctp = sequence_to_ctypes_array(inc, ctp.c_double, 2) + + # Use a NULL pointer (None) for existing data to indicate that the container + # should be created empty. Fill it in later using put_vector and put_matrix. + data_ptr = c_create_data( + self.session_pointer, + family_int, + geometry_int, + mode_int, + dim_ctp, + ranges_ctp, + inc_ctp, + registration_int, + self._parse_pad(family, pad), + None, + ) + + if data_ptr is None: + msg = "Failed to create an empty GMT data pointer." + raise GMTCLibError(msg) + return data_ptr
+ + + def _parse_pad(self, family: str, pad: int | None) -> int: + """ + Parse and return an appropriate value for pad if ``None`` is given. + + Pad is a bit tricky because, for matrix types, pad control the matrix ordering + (row or column major). Using the default pad will set it to column major and + mess things up with the numpy arrays. + """ + if pad is None: + pad = 0 if "MATRIX" in family else self["GMT_PAD_DEFAULT"] + return pad + + def _parse_constant( + self, + constant: str, + valid: Sequence[str], + valid_modifiers: Sequence[str] | None = None, + ) -> int: + """ + Parse a constant, convert it to an integer, and validate it. + + The GMT C API takes certain defined constants, like ``"GMT_IS_GRID"``, that need + to be validated and converted to integer values using + :meth:`pygmt.clib.Session.__getitem__`. + + The constants can also take a modifier by appending another constant name, e.g., + ``"GMT_IS_GRID|GMT_VIA_MATRIX"``. The two parts must be converted separately and + their values are added. + + If no valid modifiers are given, then will assume that modifiers are not + allowed. In this case, will raise a :class:`pygmt.exceptions.GMTInvalidInput` + exception if given a modifier. + + Parameters + ---------- + constant + The name of a valid GMT API constant, with an optional modifier. + valid + A list of valid values for the constant. Will raise a GMTInvalidInput + exception if the given value is not in the list. + valid_modifiers + A list of valid modifiers that can be added to the constant. If ``None``, + no modifiers are allowed. + """ + parts = constant.split("|") + name = parts[0] + nmodifiers = len(parts) - 1 + + if name not in valid: + msg = f"Invalid constant name '{name}'. Must be one of {valid}." + raise GMTInvalidInput(msg) + + match nmodifiers: + case 1 if valid_modifiers is None: + msg = ( + f"Constant modifiers are not allowed since valid values " + f"were not given: '{constant}'." + ) + raise GMTInvalidInput(msg) + case 1 if valid_modifiers is not None and parts[1] not in valid_modifiers: + msg = ( + f"Invalid constant modifier '{parts[1]}'. " + f"Must be one of {valid_modifiers}." + ) + raise GMTInvalidInput(msg) + case n if n > 1: + msg = ( + f"Only one modifier is allowed in constants, " + f"{nmodifiers} given: '{constant}'." + ) + raise GMTInvalidInput(msg) + + integer_value = sum(self[part] for part in parts) + return integer_value + + def _check_dtype_and_dim(self, array: np.ndarray, ndim: int) -> int: + """ + Check that a numpy array has the given number of dimensions and is a valid data + type. + + Parameters + ---------- + array + The array to be tested. + ndim + The desired number of array dimensions. + + Returns + ------- + gmt_type + The GMT constant value representing this data type. + + Raises + ------ + GMTInvalidInput + If the array has the wrong number of dimensions or is an unsupported data + type. + + Examples + -------- + >>> import numpy as np + >>> data = np.array([1, 2, 3], dtype=np.float64) + >>> with Session() as lib: + ... gmttype = lib._check_dtype_and_dim(data, ndim=1) + ... gmttype == lib["GMT_DOUBLE"] + True + >>> data = np.ones((5, 2), dtype=np.float32) + >>> with Session() as lib: + ... gmttype = lib._check_dtype_and_dim(data, ndim=2) + ... gmttype == lib["GMT_FLOAT"] + True + """ + # Check that the array has the given number of dimensions. + if array.ndim != ndim: + msg = f"Expected a numpy {ndim}-D array, got {array.ndim}-D." + raise GMTInvalidInput(msg) + + # For 1-D arrays, try to convert unknown object type to np.datetime64. + if ndim == 1 and array.dtype.type is np.object_: + with contextlib.suppress(ValueError): + array = array_to_datetime(array) + + # 1-D arrays can be numeric or text, 2-D arrays can only be numeric. + valid_dtypes = DTYPES if ndim == 1 else DTYPES_NUMERIC + if (dtype := array.dtype.type) not in valid_dtypes: + msg = f"Unsupported numpy data type '{dtype}'." + raise GMTInvalidInput(msg) + return self[DTYPES[dtype]] + +
+[docs] + def put_vector(self, dataset: ctp.c_void_p, column: int, vector: np.ndarray): + r""" + Attach a 1-D numpy array as a column on a GMT dataset. + + Use this function to attach numpy array data to a GMT dataset and pass it to GMT + modules. Wraps ``GMT_Put_Vector``. + + The dataset must be created by :meth:`pygmt.clib.Session.create_data` first with + ``family="GMT_IS_DATASET|GMT_VIA_VECTOR"``. + + Not all numpy dtypes are supported, only: int8, int16, int32, int64, longlong, + uint8, uint16, uint32, uint64, ulonglong, float32, float64, str\_, datetime64, + and timedelta64. + + .. warning:: + The numpy array must be C contiguous in memory. Use + :func:`numpy.ascontiguousarray` to make sure your vector is contiguous (it + won't copy if it already is). + + Parameters + ---------- + dataset + The ctypes void pointer to a ``GMT_VECTOR`` data container. Create it with + :meth:`pygmt.clib.Session.create_data`. + column + The column number of this vector in the dataset (starting from 0). + vector + The array that will be attached to the dataset. Must be a 1-D C contiguous + array. + + Raises + ------ + GMTCLibError + If given invalid input or ``GMT_Put_Vector`` exits with a non-zero status. + """ + c_put_vector = self.get_libgmt_func( + "GMT_Put_Vector", + argtypes=[ctp.c_void_p, ctp.c_void_p, ctp.c_uint, ctp.c_uint, ctp.c_void_p], + restype=ctp.c_int, + ) + + vector_pointer: ctp.Array | ctp.c_void_p + gmt_type = self._check_dtype_and_dim(vector, ndim=1) + if gmt_type in {self["GMT_TEXT"], self["GMT_DATETIME"]}: + if gmt_type == self["GMT_DATETIME"]: + vector = np.datetime_as_string(array_to_datetime(vector)) + vector_pointer = strings_to_ctypes_array(vector) + else: + vector_pointer = vector.ctypes.data_as(ctp.c_void_p) + status = c_put_vector( + self.session_pointer, dataset, column, gmt_type, vector_pointer + ) + if status != 0: + msg = ( + f"Failed to put vector of type {vector.dtype} in column {column} of " + "dataset." + ) + raise GMTCLibError(msg)
+ + +
+[docs] + def put_strings(self, dataset: ctp.c_void_p, family: str, strings: np.ndarray): + """ + Attach a 1-D numpy array of dtype str as a column on a GMT dataset. + + Use this function to attach string type numpy array data to a GMT dataset and + pass it to GMT modules. Wraps ``GMT_Put_Strings``. + + The dataset must be created by :meth:`pygmt.clib.Session.create_data` first. + + .. warning:: + The numpy array must be C contiguous in memory. If it comes from a column + slice of a 2-D array, for example, you will have to make a copy. Use + :func:`numpy.ascontiguousarray` to make sure your vector is contiguous (it + won't copy if it already is). + + Parameters + ---------- + dataset + The ctypes void pointer to a ``GMT_VECTOR``/``GMT_MATRIX`` data container. + Create it with :meth:`pygmt.clib.Session.create_data`. + family + The family type of the dataset. Can be either ``GMT_IS_VECTOR`` or + ``GMT_IS_MATRIX``. + strings + The array that will be attached to the dataset. Must be a 1-D C contiguous + array. + + Raises + ------ + GMTCLibError + If given invalid input or ``GMT_Put_Strings`` exits with a non-zero status. + """ + c_put_strings = self.get_libgmt_func( + "GMT_Put_Strings", + argtypes=[ + ctp.c_void_p, # V_API + ctp.c_uint, # family + ctp.c_void_p, # object + ctp.POINTER(ctp.c_char_p), # array + ], + restype=ctp.c_int, + ) + + family_int = self._parse_constant( + family, valid=FAMILIES, valid_modifiers=METHODS + ) + strings_pointer = strings_to_ctypes_array(strings) + status = c_put_strings( + self.session_pointer, family_int, dataset, strings_pointer + ) + if status != 0: + msg = f"Failed to put strings of type {strings.dtype} into dataset." + raise GMTCLibError(msg)
+ + +
+[docs] + def put_matrix(self, dataset: ctp.c_void_p, matrix: np.ndarray, pad: int = 0): + """ + Attach a 2-D numpy array to a GMT dataset. + + Use this function to attach numpy array data to a GMT dataset and pass it to GMT + modules. Wraps ``GMT_Put_Matrix``. + + The dataset must be created by :meth:`pygmt.clib.Session.create_data` first with + ``family="GMT_IS_DATASET|GMT_VIA_MATRIX"``. + + Not all numpy dtypes are supported, only: int8, int16, int32, int64, longlong, + uint8, uint16, uint32, uint64, ulonglong, float32, and float64. + + .. warning:: + The numpy array must be C contiguous in memory. Use + :func:`numpy.ascontiguousarray` to make sure your matrix is contiguous (it + won't copy if it already is). + + Parameters + ---------- + dataset + The ctypes void pointer to a ``GMT_MATRIX`` data container. Create it with + :meth:`pygmt.clib.Session.create_data`. + matrix + The array that will be attached to the dataset. Must be a 2-D C contiguous + array. + pad + The amount of padding that should be added to the matrix. Use when creating + grids for modules that require padding. + + Raises + ------ + GMTCLibError + If given invalid input or ``GMT_Put_Matrix`` exits with a non-zero status. + """ + c_put_matrix = self.get_libgmt_func( + "GMT_Put_Matrix", + argtypes=[ctp.c_void_p, ctp.c_void_p, ctp.c_uint, ctp.c_int, ctp.c_void_p], + restype=ctp.c_int, + ) + + gmt_type = self._check_dtype_and_dim(matrix, ndim=2) + matrix_pointer = matrix.ctypes.data_as(ctp.c_void_p) + status = c_put_matrix( + self.session_pointer, dataset, gmt_type, pad, matrix_pointer + ) + if status != 0: + msg = f"Failed to put matrix of type {matrix.dtype}." + raise GMTCLibError(msg)
+ + +
+[docs] + def read_data( + self, + infile: str, + kind: Literal["dataset", "grid", "image"], + family: str | None = None, + geometry: str | None = None, + mode: str = "GMT_READ_NORMAL", + region: Sequence[float] | None = None, + data=None, + ): + """ + Read a data file into a GMT data container. + + Wraps ``GMT_Read_Data`` but only allows reading from a file. The function + definition is different from the original C API function. + + Parameters + ---------- + infile + The input file name. + kind + The data kind of the input file. Valid values are ``"dataset"``, ``"grid"`` + and ``"image"``. + family + A valid GMT data family name (e.g., ``"GMT_IS_DATASET"``). See the + ``FAMILIES`` attribute for valid names. If ``None``, will determine the data + family from the ``kind`` parameter. + geometry + A valid GMT data geometry name (e.g., ``"GMT_IS_POINT"``). See the + ``GEOMETRIES`` attribute for valid names. If ``None``, will determine the + data geometry from the ``kind`` parameter. + mode + How the data is to be read from the file. This option varies depending on + the given family. See the + :gmt-docs:`GMT API documentation <devdocs/api.html#import-from-a-file-stream-or-handle>` + for details. Default is ``GMT_READ_NORMAL`` which corresponds to the default + read mode value of 0 in the ``GMT_enum_read`` enum. + region + Subregion of the data, in the form of [xmin, xmax, ymin, ymax, zmin, zmax]. + If ``None``, the whole data is read. + data + ``None`` or the pointer returned by this function after a first call. It's + useful when reading grids/images/cubes in two steps (get a grid/image/cube + structure with a header, then read the data). + + Returns + ------- + Pointer to the data container, or ``None`` if there were errors. + + Raises + ------ + GMTCLibError + If the GMT API function fails to read the data. + """ # noqa: W505 + c_read_data = self.get_libgmt_func( + "GMT_Read_Data", + argtypes=[ + ctp.c_void_p, # V_API + ctp.c_uint, # family + ctp.c_uint, # method + ctp.c_uint, # geometry + ctp.c_uint, # mode + ctp.POINTER(ctp.c_double), # wesn + ctp.c_char_p, # infile + ctp.c_void_p, # data + ], + restype=ctp.c_void_p, # data_ptr + ) + + # Determine the family, geometry and data container from kind + _family, _geometry, dtype = { + "dataset": ("GMT_IS_DATASET", "GMT_IS_PLP", _GMT_DATASET), + "grid": ("GMT_IS_GRID", "GMT_IS_SURFACE", _GMT_GRID), + "image": ("GMT_IS_IMAGE", "GMT_IS_SURFACE", _GMT_IMAGE), + }[kind] + if family is None: + family = _family + if geometry is None: + geometry = _geometry + + data_ptr = c_read_data( + self.session_pointer, + self[family], + self["GMT_IS_FILE"], # Reading from a file + self[geometry], + self[mode], + sequence_to_ctypes_array(region, ctp.c_double, 6), + infile.encode(), + data, + ) + if data_ptr is None: + msg = f"Failed to read dataset from '{infile}'." + raise GMTCLibError(msg) + return ctp.cast(data_ptr, ctp.POINTER(dtype))
+ + +
+[docs] + def write_data(self, family, geometry, mode, wesn, output, data): + """ + Write a GMT data container to a file. + + The data container should be created by + :meth:`pygmt.clib.Session.create_data`. + + Wraps ``GMT_Write_Data`` but only allows writing to a file. So the + ``method`` argument is omitted. + + Parameters + ---------- + family : str + A valid GMT data family name (e.g., ``'GMT_IS_DATASET'``). See the + ``FAMILIES`` attribute for valid names. Don't use the + ``GMT_VIA_VECTOR`` or ``GMT_VIA_MATRIX`` constructs for this. Use + ``GMT_IS_VECTOR`` and ``GMT_IS_MATRIX`` instead. + geometry : str + A valid GMT data geometry name (e.g., ``'GMT_IS_POINT'``). See the + ``GEOMETRIES`` attribute for valid names. + mode : str + How the data is to be written to the file. This option varies + depending on the given family. See the GMT API documentation for + details. + wesn : list or numpy array + [xmin, xmax, ymin, ymax, zmin, zmax] of the data. Must have 6 + elements. + output : str + The output file name. + data : :class:`ctypes.c_void_p` + Pointer to the data container created by + :meth:`pygmt.clib.Session.create_data`. + + Raises + ------ + GMTCLibError + For invalid input arguments or if the GMT API functions returns a + non-zero status code. + """ + c_write_data = self.get_libgmt_func( + "GMT_Write_Data", + argtypes=[ + ctp.c_void_p, + ctp.c_uint, + ctp.c_uint, + ctp.c_uint, + ctp.c_uint, + ctp.POINTER(ctp.c_double), + ctp.c_char_p, + ctp.c_void_p, + ], + restype=ctp.c_int, + ) + + family_int = self._parse_constant(family, valid=FAMILIES, valid_modifiers=VIAS) + geometry_int = self._parse_constant(geometry, valid=GEOMETRIES) + status = c_write_data( + self.session_pointer, + family_int, + self["GMT_IS_FILE"], + geometry_int, + self[mode], + sequence_to_ctypes_array(wesn, ctp.c_double, 6), + output.encode(), + data, + ) + if status != 0: + msg = f"Failed to write dataset to '{output}'." + raise GMTCLibError(msg)
+ + +
+[docs] + @contextlib.contextmanager + def open_virtualfile( + self, + family: str, + geometry: str, + direction: str, + data: ctp.c_void_p | None, + ) -> Generator[str, None, None]: + """ + Open a GMT virtual file associated with a data object for reading or writing. + + GMT uses a virtual file scheme to pass in data or get data from API modules. Use + it to pass in your GMT data structure (created using + :meth:`pygmt.clib.Session.create_data`) to a module that expects an input file, + or get the output from a module that writes to a file. + + Use in a ``with`` block. Will automatically close the virtual file when leaving + the ``with`` block. Because of this, no wrapper for ``GMT_Close_VirtualFile`` + is provided. + + Parameters + ---------- + family + A valid GMT data family name (e.g., ``"GMT_IS_DATASET"``). Should be the + same as the one you used to create your data structure. + geometry + A valid GMT data geometry name (e.g., ``"GMT_IS_POINT"``). Should be the + same as the one you used to create your data structure. + direction + Either ``"GMT_IN"`` or ``"GMT_OUT"`` to indicate if passing data to GMT or + getting it out of GMT, respectively. By default, GMT can modify the data you + pass in. Add modifier ``"GMT_IS_REFERENCE"`` to tell GMT the data are + read-only, or ``"GMT_IS_DUPLICATE"`` to tell GMT to duplicate the data. + data + The ctypes void pointer to the GMT data structure. For output (i.e., + ``direction="GMT_OUT"``), it can be ``None`` to have GMT automatically + allocate the output GMT data structure. + + Yields + ------ + vfname + The name of the virtual file that you can pass to a GMT module. + + Examples + -------- + + >>> from pygmt.helpers import GMTTempFile + >>> import numpy as np + >>> x = np.array([0, 1, 2, 3, 4]) + >>> y = np.array([5, 6, 7, 8, 9]) + >>> with Session() as lib: + ... family = "GMT_IS_DATASET|GMT_VIA_VECTOR" + ... geometry = "GMT_IS_POINT" + ... dataset = lib.create_data( + ... family=family, + ... geometry=geometry, + ... mode="GMT_CONTAINER_ONLY", + ... dim=[2, 5, lib["GMT_INT"], 0], # ncolumns, nrows, dtype, unused + ... ) + ... lib.put_vector(dataset, column=0, vector=x) + ... lib.put_vector(dataset, column=1, vector=y) + ... # Add the dataset to a virtual file + ... vfargs = (family, geometry, "GMT_IN|GMT_IS_REFERENCE", dataset) + ... with lib.open_virtualfile(*vfargs) as vfile: + ... # Send the output to a temp file so that we can read it + ... with GMTTempFile() as ofile: + ... lib.call_module("info", [vfile, f"->{ofile.name}"]) + ... print(ofile.read().strip()) + <vector memory>: N = 5 <0/4> <5/9> + """ + c_open_virtualfile = self.get_libgmt_func( + "GMT_Open_VirtualFile", + argtypes=[ + ctp.c_void_p, # V_API + ctp.c_uint, # family + ctp.c_uint, # geometry + ctp.c_uint, # direction + ctp.c_void_p, # data + ctp.c_char_p, # name + ], + restype=ctp.c_int, + ) + + c_close_virtualfile = self.get_libgmt_func( + "GMT_Close_VirtualFile", + argtypes=[ctp.c_void_p, ctp.c_char_p], # V_API, name + restype=ctp.c_int, + ) + + family_int = self._parse_constant(family, valid=FAMILIES, valid_modifiers=VIAS) + geometry_int = self._parse_constant(geometry, valid=GEOMETRIES) + direction_int = self._parse_constant( + direction, valid=DIRECTIONS, valid_modifiers=METHODS + ) + + buff = ctp.create_string_buffer(self["GMT_VF_LEN"]) + status = c_open_virtualfile( + self.session_pointer, family_int, geometry_int, direction_int, data, buff + ) + if status != 0: + msg = ( + f"Failed to create a virtual file with {family=}, {geometry=}, " + f"{direction=}." + ) + raise GMTCLibError(msg) + + vfname = buff.value.decode() + try: + yield vfname + finally: + status = c_close_virtualfile(self.session_pointer, vfname.encode()) + if status != 0: + msg = f"Failed to close virtual file '{vfname}'." + raise GMTCLibError(msg)
+ + + # TODO(PyGMT>=0.15.0): Remove the deprecated open_virtual_file method. + def open_virtual_file(self, family, geometry, direction, data): + """ + Open a GMT virtual file associated with a data object for reading or writing. + + .. deprecated: 0.11.0 + + Will be removed in v0.15.0. Use :meth:`pygmt.clib.Session.open_virtualfile` + instead. + """ + msg = ( + "API function `Session.open_virtual_file()' has been deprecated " + "since v0.11.0 and will be removed in v0.15.0. " + "Use `Session.open_virtualfile()' instead." + ) + warnings.warn(msg, category=FutureWarning, stacklevel=2) + return self.open_virtualfile(family, geometry, direction, data) + +
+[docs] + @contextlib.contextmanager + def virtualfile_from_vectors( + self, vectors: Sequence, *args + ) -> Generator[str, None, None]: + """ + Store a sequence of 1-D vectors as columns of a dataset inside a virtual file. + + Use the virtual file name to pass the dataset with your vectors to a GMT module. + + Context manager (use in a ``with`` block). Yields the virtual file name that you + can pass as an argument to a GMT module call. Closes the virtual file upon exit + of the ``with`` block. + + Use this instead of creating the data container and virtual file by hand with + :meth:`pygmt.clib.Session.create_data`, :meth:`pygmt.clib.Session.put_vector`, + and :meth:`pygmt.clib.Session.open_virtualfile`. + + If the arrays are C contiguous blocks of memory, they will be passed without + copying to GMT. If they are not (e.g., they are columns of a 2-D array), they + will need to be copied to a contiguous block. + + Parameters + ---------- + vectors + A sequence of vectors that will be stored in the dataset. All must be of the + same size. + + Yields + ------ + fname + The name of virtual file. Pass this as a file name argument to a GMT module. + + Examples + -------- + + >>> from pygmt.helpers import GMTTempFile + >>> import numpy as np + >>> import pandas as pd + >>> x = [1, 2, 3] + >>> y = np.array([4, 5, 6]) + >>> z = pd.Series([7, 8, 9]) + >>> with Session() as ses: + ... with ses.virtualfile_from_vectors((x, y, z)) as fin: + ... # Send the output to a file so that we can read it + ... with GMTTempFile() as fout: + ... ses.call_module("info", [fin, f"->{fout.name}"]) + ... print(fout.read().strip()) + <vector memory>: N = 3 <1/3> <4/6> <7/9> + """ + # TODO(PyGMT>=0.16.0): Remove the "*args" parameter and related codes. + # "*args" is added in v0.14.0 for backward-compatibility with the deprecated + # syntax of passing multiple vectors as positional arguments. + if len(args) > 0: + msg = ( + "Passing multiple arguments to Session.virtualfile_from_vectors is " + "deprecated since v0.14.0 and will be unsupported in v0.16.0. " + "Put all vectors in a sequence (a tuple or a list) instead and pass " + "the sequence as the single argument to this function. " + "E.g., use `with lib.virtualfile_from_vectors((x, y, z)) as vfile` " + "instead of `with lib.virtualfile_from_vectors(x, y, z) as vfile`." + ) + warnings.warn(message=msg, category=FutureWarning, stacklevel=3) + vectors = (vectors, *args) + + # Conversion to a C-contiguous array needs to be done here and not in put_vector + # or put_strings because we need to maintain a reference to the copy while it is + # being used by the C API. Otherwise, the array would be garbage collected and + # the memory freed. Creating it in this context manager guarantees that the copy + # will be around until the virtual file is closed. The conversion is implicit in + # vectors_to_arrays. + arrays = vectors_to_arrays(vectors) + + columns = len(arrays) + # Find arrays that are of string dtype from column 3 onwards. Assumes that first + # 2 columns contains coordinates like longitude, latitude, or datetime string + # types. + for col, array in enumerate(arrays[2:]): + if np.issubdtype(array.dtype, np.str_): + columns = col + 2 + break + + rows = len(arrays[0]) + if not all(len(i) == rows for i in arrays): + msg = "All arrays must have same size." + raise GMTInvalidInput(msg) + + family = "GMT_IS_DATASET|GMT_VIA_VECTOR" + geometry = "GMT_IS_POINT" + + dataset = self.create_data( + family, + geometry, + mode="GMT_CONTAINER_ONLY", + dim=[columns, rows, self["GMT_DOUBLE"], 0], + ) + + # Use put_vector for columns with numerical type data + for col, array in enumerate(arrays[:columns]): + self.put_vector(dataset, column=col, vector=array) + + # Use put_strings for last column(s) with string type data. + # Have to use modifier "GMT_IS_DUPLICATE" to duplicate the strings. + string_arrays = arrays[columns:] + if string_arrays: + if len(string_arrays) == 1: + strings = string_arrays[0] + elif len(string_arrays) > 1: + strings = np.array( + [" ".join(vals) for vals in zip(*string_arrays, strict=True)], + dtype=np.str_, + ) + self.put_strings( + dataset, family="GMT_IS_VECTOR|GMT_IS_DUPLICATE", strings=strings + ) + + with self.open_virtualfile( + family, geometry, "GMT_IN|GMT_IS_REFERENCE", dataset + ) as vfile: + yield vfile
+ + +
+[docs] + @contextlib.contextmanager + def virtualfile_from_matrix(self, matrix: np.ndarray) -> Generator[str, None, None]: + """ + Store a 2-D numpy array as a matrix inside a virtual file. + + Use the virtual file name to pass in the data in your matrix to a GMT module. + + Context manager (use in a ``with`` block). Yields the virtual file name that you + can pass as an argument to a GMT module call. Closes the virtual file upon exit + of the ``with`` block. + + The virtual file will contain the array as a ``GMT_MATRIX`` data container + pretending to be a ``GMT_DATASET`` data container. + + **Not meant for creating ``GMT_GRID``**. The grid requires more metadata than + just the data matrix. Use :meth:`pygmt.clib.Session.virtualfile_from_grid` + instead. + + Use this instead of creating the data container and virtual file by hand with + :meth:`pygmt.clib.Session.create_data`, :meth:`pygmt.clib.Session.put_matrix`, + and :meth:`pygmt.clib.Session.open_virtualfile`. + + The matrix must be C contiguous in memory. If it is not (e.g., it is a slice of + a larger array), the array will be copied to make sure it is. + + Parameters + ---------- + matrix + The matrix that will be included in the GMT data container. + + Yields + ------ + fname + The name of virtual file. Pass this as a file name argument to a GMT module. + + Examples + -------- + + >>> from pygmt.helpers import GMTTempFile + >>> import numpy as np + >>> data = np.arange(12).reshape((4, 3)) + >>> print(data) + [[ 0 1 2] + [ 3 4 5] + [ 6 7 8] + [ 9 10 11]] + >>> with Session() as ses: + ... with ses.virtualfile_from_matrix(data) as fin: + ... # Send the output to a file so that we can read it + ... with GMTTempFile() as fout: + ... ses.call_module("info", [fin, f"->{fout.name}"]) + ... print(fout.read().strip()) + <matrix memory>: N = 4 <0/9> <1/10> <2/11> + """ + # Conversion to a C-contiguous array needs to be done here and not in put_matrix + # because we need to maintain a reference to the copy while it is being used by + # the C API. Otherwise, the array would be garbage collected and the memory + # freed. Creating it in this context manager guarantees that the copy will be + # around until the virtual file is closed. + matrix = np.ascontiguousarray(matrix) + rows, columns = matrix.shape + layers = 1 + + family = "GMT_IS_DATASET|GMT_VIA_MATRIX" + geometry = "GMT_IS_POINT" + + dataset = self.create_data( + family, geometry, mode="GMT_CONTAINER_ONLY", dim=[columns, rows, layers, 0] + ) + + self.put_matrix(dataset, matrix) + + with self.open_virtualfile( + family, geometry, "GMT_IN|GMT_IS_REFERENCE", dataset + ) as vfile: + yield vfile
+ + +
+[docs] + @contextlib.contextmanager + def virtualfile_from_grid(self, grid: xr.DataArray) -> Generator[str, None, None]: + """ + Store a grid in a virtual file. + + Use the virtual file name to pass in the data in your grid to a GMT module. + Grids must be :class:`xarray.DataArray` instances. + + Context manager (use in a ``with`` block). Yields the virtual file name that you + can pass as an argument to a GMT module call. Closes the virtual file upon exit + of the ``with`` block. + + The virtual file will contain the grid as a ``GMT_MATRIX`` data container with + extra metadata. + + Use this instead of creating a data container and virtual file by hand with + :meth:`pygmt.clib.Session.create_data`, :meth:`pygmt.clib.Session.put_matrix`, + and :meth:`pygmt.clib.Session.open_virtualfile`. + + The grid data matrix must be C contiguous in memory. If it is not (e.g., it is a + slice of a larger array), the array will be copied to make sure it is. + + Parameters + ---------- + grid + The grid that will be included in the virtual file. + + Yields + ------ + fname + The name of virtual file. Pass this as a file name argument to a GMT module. + + Examples + -------- + + >>> from pygmt.helpers.testing import load_static_earth_relief + >>> from pygmt.helpers import GMTTempFile + >>> data = load_static_earth_relief() + >>> print(data.shape) + (14, 8) + >>> print(data.lon.values.min(), data.lon.values.max()) + -54.5 -47.5 + >>> print(data.lat.values.min(), data.lat.values.max()) + -23.5 -10.5 + >>> print(data.values.min(), data.values.max()) + 190.0 981.0 + >>> with Session() as ses: + ... with ses.virtualfile_from_grid(data) as fin: + ... # Send the output to a file so that we can read it + ... with GMTTempFile() as fout: + ... ses.call_module( + ... "grdinfo", [fin, "-L0", "-Cn", f"->{fout.name}"] + ... ) + ... print(fout.read().strip()) + -55 -47 -24 -10 190 981 1 1 8 14 1 1 + >>> # The output is: w e s n z0 z1 dx dy n_columns n_rows reg gtype + """ + _gtype = {0: "GMT_GRID_IS_CARTESIAN", 1: "GMT_GRID_IS_GEO"}[grid.gmt.gtype] + _reg = {0: "GMT_GRID_NODE_REG", 1: "GMT_GRID_PIXEL_REG"}[grid.gmt.registration] + + # Conversion to a C-contiguous array needs to be done here and not in put_matrix + # because we need to maintain a reference to the copy while it is being used by + # the C API. Otherwise, the array would be garbage collected and the memory + # freed. Creating it in this context manager guarantees that the copy will be + # around until the virtual file is closed. The conversion is implicit in + # dataarray_to_matrix. + matrix, region, inc = dataarray_to_matrix(grid) + + family = "GMT_IS_GRID|GMT_VIA_MATRIX" + geometry = "GMT_IS_SURFACE" + gmt_grid = self.create_data( + family, + geometry, + mode=f"GMT_CONTAINER_ONLY|{_gtype}", + ranges=region, + inc=inc, + registration=_reg, # type: ignore[arg-type] + ) + self.put_matrix(gmt_grid, matrix) + with self.open_virtualfile( + family, geometry, "GMT_IN|GMT_IS_REFERENCE", gmt_grid + ) as vfile: + yield vfile
+ + +
+[docs] + @contextlib.contextmanager + def virtualfile_from_stringio( + self, stringio: io.StringIO + ) -> Generator[str, None, None]: + r""" + Store a :class:`io.StringIO` object in a virtual file. + + Store the contents of a :class:`io.StringIO` object in a GMT_DATASET container + and create a virtual file to pass to a GMT module. + + For simplicity, currently we make following assumptions in the StringIO object + + - ``"#"`` indicates a comment line. + - ``">"`` indicates a segment header. + + Parameters + ---------- + stringio + The :class:`io.StringIO` object containing the data to be stored in the + virtual file. + + Yields + ------ + fname + The name of the virtual file. + + Examples + -------- + >>> import io + >>> from pygmt.clib import Session + >>> # A StringIO object containing legend specifications + >>> stringio = io.StringIO( + ... "# Comment\n" + ... "H 24p Legend\n" + ... "N 2\n" + ... "S 0.1i c 0.15i p300/12 0.25p 0.3i My circle\n" + ... ) + >>> with Session() as lib: + ... with lib.virtualfile_from_stringio(stringio) as fin: + ... lib.virtualfile_to_dataset(vfname=fin, output_type="pandas") + 0 + 0 H 24p Legend + 1 N 2 + 2 S 0.1i c 0.15i p300/12 0.25p 0.3i My circle + """ + # Parse the io.StringIO object. + segments = [] + current_segment = {"header": "", "data": []} + for line in stringio.getvalue().splitlines(): + if line.startswith("#"): # Skip comments + continue + if line.startswith(">"): # Segment header + if current_segment["data"]: # If we have data, start a new segment + segments.append(current_segment) + current_segment = {"header": "", "data": []} + current_segment["header"] = line.strip(">").lstrip() + else: + current_segment["data"].append(line) # type: ignore[attr-defined] + if current_segment["data"]: # Add the last segment if it has data + segments.append(current_segment) + + # One table with one or more segments. + # n_rows is the maximum number of rows/records for all segments. + # n_columns is the number of numeric data columns, so it's 0 here. + n_tables = 1 + n_segments = len(segments) + n_rows = max(len(segment["data"]) for segment in segments) + n_columns = 0 + + # Create the GMT_DATASET container + family, geometry = "GMT_IS_DATASET", "GMT_IS_TEXT" + dataset = self.create_data( + family, + geometry, + mode="GMT_CONTAINER_ONLY|GMT_WITH_STRINGS", + dim=[n_tables, n_segments, n_rows, n_columns], + ) + table = ctp.cast(dataset, ctp.POINTER(_GMT_DATASET)).contents.table[0].contents + for i, segment in enumerate(segments): + seg = table.segment[i].contents + if segment["header"]: + seg.header = segment["header"].encode() # type: ignore[attr-defined] + seg.text = strings_to_ctypes_array(segment["data"]) + + with self.open_virtualfile(family, geometry, "GMT_IN", dataset) as vfile: + try: + yield vfile + finally: + # Must set the pointers to None to avoid double freeing the memory. + # Maybe upstream bug. + for i in range(n_segments): + seg = table.segment[i].contents + seg.header = None + seg.text = None
+ + +
+[docs] + def virtualfile_in( + self, + check_kind=None, + data=None, + x=None, + y=None, + z=None, + extra_arrays=None, + required_z=False, + required_data=True, + ): + """ + Store any data inside a virtual file. + + This convenience function automatically detects the kind of data passed + into it, and produces a virtualfile that can be passed into GMT later + on. + + Parameters + ---------- + check_kind : str or None + Used to validate the type of data that can be passed in. Choose + from 'raster', 'vector', or None. Default is None (no validation). + data : str or pathlib.Path or xarray.DataArray or {table-like} or None + Any raster or vector data format. This could be a file name or + path, a raster grid, a vector matrix/arrays, or other supported + data input. + x/y/z : 1-D arrays or None + x, y, and z columns as numpy arrays. + extra_arrays : list of 1-D arrays + Optional. A list of numpy arrays in addition to x, y, and z. + All of these arrays must be of the same size as the x/y/z arrays. + required_z : bool + State whether the 'z' column is required. + required_data : bool + Set to True when 'data' is required, or False when dealing with + optional virtual files. [Default is True]. + + Returns + ------- + file_context : contextlib._GeneratorContextManager + The virtual file stored inside a context manager. Access the file + name of this virtualfile using ``with file_context as fname: ...``. + + Examples + -------- + >>> from pygmt.helpers import GMTTempFile + >>> import xarray as xr + >>> data = xr.Dataset( + ... coords=dict(index=[0, 1, 2]), + ... data_vars=dict( + ... x=("index", [9, 8, 7]), + ... y=("index", [6, 5, 4]), + ... z=("index", [3, 2, 1]), + ... ), + ... ) + >>> with Session() as ses: + ... with ses.virtualfile_in(check_kind="vector", data=data) as fin: + ... # Send the output to a file so that we can read it + ... with GMTTempFile() as fout: + ... ses.call_module("info", [fin, f"->{fout.name}"]) + ... print(fout.read().strip()) + <vector memory>: N = 3 <7/9> <4/6> <1/3> + """ + kind = data_kind(data, required=required_data) + _validate_data_input( + data=data, + x=x, + y=y, + z=z, + required_z=required_z, + required_data=required_data, + kind=kind, + ) + + if check_kind: + valid_kinds = ("file", "arg") if required_data is False else ("file",) + if check_kind == "raster": + valid_kinds += ("grid", "image") + elif check_kind == "vector": + valid_kinds += ("empty", "matrix", "vectors", "geojson") + if kind not in valid_kinds: + msg = f"Unrecognized data type for {check_kind}: {type(data)}." + raise GMTInvalidInput(msg) + + # Decide which virtualfile_from_ function to use + _virtualfile_from = { + "arg": contextlib.nullcontext, + "empty": self.virtualfile_from_vectors, + "file": contextlib.nullcontext, + "geojson": tempfile_from_geojson, + "grid": self.virtualfile_from_grid, + "image": tempfile_from_image, + "stringio": self.virtualfile_from_stringio, + "matrix": self.virtualfile_from_matrix, + "vectors": self.virtualfile_from_vectors, + }[kind] + + # "_data" is the data that will be passed to the _virtualfile_from function. + # "_data" defaults to "data" but should be adjusted for some cases. + _data = data + match kind: + case "image" if data.dtype != "uint8": + msg = ( + f"Input image has dtype: {data.dtype} which is unsupported, and " + "may result in an incorrect output. Please recast image to a uint8 " + "dtype and/or scale to 0-255 range, e.g. using a histogram " + "equalization function like skimage.exposure.equalize_hist." + ) + warnings.warn(message=msg, category=RuntimeWarning, stacklevel=2) + case "empty": # data is None, so data must be given via x/y/z. + _data = [x, y] + if z is not None: + _data.append(z) + if extra_arrays: + _data.extend(extra_arrays) + case "vectors": + if hasattr(data, "items") and not hasattr(data, "to_frame"): + # pandas.DataFrame or xarray.Dataset types. + # pandas.Series will be handled below like a 1-D numpy.ndarray. + _data = [array for _, array in data.items()] + else: + # Python list, tuple, numpy.ndarray, and pandas.Series types + _data = np.atleast_2d(np.asanyarray(data).T) + case "matrix" if data.dtype.kind not in "iuf": + # GMT can only accept a 2-D matrix which are signed integer (i), + # unsigned integer (u) or floating point (f) types. For other data + # types, we need to use virtualfile_from_vectors instead, which turns + # the matrix into a list of vectors and allows for better handling of + # non-integer/float type inputs (e.g. for string or datetime data types) + _virtualfile_from = self.virtualfile_from_vectors + _data = data.T + + # Finally create the virtualfile from the data, to be passed into GMT + file_context = _virtualfile_from(_data) + return file_context
+ + + # TODO(PyGMT>=0.15.0): Remove the deprecated virtualfile_from_data method. +
+[docs] + def virtualfile_from_data( + self, + check_kind=None, + data=None, + x=None, + y=None, + z=None, + extra_arrays=None, + required_z=False, + required_data=True, + ): + """ + Store any data inside a virtual file. + + .. deprecated: 0.13.0 + + Will be removed in v0.15.0. Use :meth:`pygmt.clib.Session.virtualfile_in` + instead. + """ + msg = ( + "API function 'Session.virtualfile_from_data()' has been deprecated since " + "v0.13.0 and will be removed in v0.15.0. Use 'Session.virtualfile_in()' " + "instead." + ) + warnings.warn(msg, category=FutureWarning, stacklevel=2) + return self.virtualfile_in( + check_kind=check_kind, + data=data, + x=x, + y=y, + z=z, + extra_arrays=extra_arrays, + required_z=required_z, + required_data=required_data, + )
+ + +
+[docs] + @contextlib.contextmanager + def virtualfile_out( + self, + kind: Literal["dataset", "grid", "image"] = "dataset", + fname: str | None = None, + ) -> Generator[str, None, None]: + r""" + Create a virtual file or an actual file for storing output data. + + If ``fname`` is not given, a virtual file will be created to store the output + data into a GMT data container and the function yields the name of the virtual + file. Otherwise, the output data will be written into the specified file and the + function simply yields the actual file name. + + Parameters + ---------- + kind + The data kind of the virtual file to create. Valid values are ``"dataset"``, + ``"grid"``, and ``"image"``. Ignored if ``fname`` is specified. + fname + The name of the actual file to write the output data. No virtual file will + be created. + + Yields + ------ + vfile + Name of the virtual file or the actual file. + + Examples + -------- + >>> from pathlib import Path + >>> from pygmt.clib import Session + >>> from pygmt.datatypes import _GMT_DATASET + >>> from pygmt.helpers import GMTTempFile + >>> + >>> with GMTTempFile(suffix=".txt") as tmpfile: + ... with Path(tmpfile.name).open(mode="w") as fp: + ... print("1.0 2.0 3.0 TEXT", file=fp) + ... + ... # Create a virtual file for storing the output table. + ... with Session() as lib: + ... with lib.virtualfile_out(kind="dataset") as vouttbl: + ... lib.call_module("read", [tmpfile.name, vouttbl, "-Td"]) + ... ds = lib.read_virtualfile(vouttbl, kind="dataset") + ... assert isinstance(ds.contents, _GMT_DATASET) + ... + ... # Write data to an actual file without creating a virtual file. + ... with Session() as lib: + ... with lib.virtualfile_out(fname=tmpfile.name) as vouttbl: + ... assert vouttbl == tmpfile.name + ... lib.call_module("read", [tmpfile.name, vouttbl, "-Td"]) + ... line = Path(vouttbl).read_text() + ... assert line == "1\t2\t3\tTEXT\n" + """ + if fname is not None: # Yield the actual file name. + yield fname + else: # Create a virtual file for storing the output data. + # Determine the family and geometry from kind + family, geometry = { + "dataset": ("GMT_IS_DATASET", "GMT_IS_PLP"), + "grid": ("GMT_IS_GRID", "GMT_IS_SURFACE"), + "image": ("GMT_IS_IMAGE", "GMT_IS_SURFACE"), + }[kind] + direction = "GMT_OUT|GMT_IS_REFERENCE" if kind == "image" else "GMT_OUT" + with self.open_virtualfile(family, geometry, direction, None) as vfile: + yield vfile
+ + + def inquire_virtualfile(self, vfname: str) -> int: + """ + Get the family of a virtual file. + + Parameters + ---------- + vfname + Name of the virtual file to inquire. + + Returns + ------- + family + The integer value for the family of the virtual file. + + Examples + -------- + >>> from pygmt.clib import Session + >>> with Session() as lib: + ... with lib.virtualfile_out(kind="dataset") as vfile: + ... family = lib.inquire_virtualfile(vfile) + ... assert family == lib["GMT_IS_DATASET"] + """ + c_inquire_virtualfile = self.get_libgmt_func( + "GMT_Inquire_VirtualFile", + argtypes=[ctp.c_void_p, ctp.c_char_p], + restype=ctp.c_int, + ) + return c_inquire_virtualfile(self.session_pointer, vfname.encode()) + +
+[docs] + def read_virtualfile( + self, + vfname: str, + kind: Literal["dataset", "grid", "image", "cube", None] = None, + ): + """ + Read data from a virtual file and optionally cast into a GMT data container. + + Parameters + ---------- + vfname + Name of the virtual file to read. + kind + Cast the data into a GMT data container. Valid values are ``"dataset"``, + ``"grid"``, ``"image"`` and ``None``. If ``None``, will return a ctypes void + pointer. + + Returns + ------- + pointer + Pointer to the GMT data container. If ``kind`` is ``None``, returns a ctypes + void pointer instead. + + Examples + -------- + >>> from pathlib import Path + >>> from pygmt.clib import Session + >>> from pygmt.helpers import GMTTempFile + >>> + >>> # Read dataset from a virtual file + >>> with Session() as lib: + ... with GMTTempFile(suffix=".txt") as tmpfile: + ... with Path(tmpfile.name).open(mode="w") as fp: + ... print("1.0 2.0 3.0 TEXT", file=fp) + ... with lib.virtualfile_out(kind="dataset") as vouttbl: + ... lib.call_module("read", [tmpfile.name, vouttbl, "-Td"]) + ... # Read the virtual file as a void pointer + ... void_pointer = lib.read_virtualfile(vouttbl) + ... assert isinstance(void_pointer, int) # void pointer is an int + ... # Read the virtual file as a dataset + ... data_pointer = lib.read_virtualfile(vouttbl, kind="dataset") + ... assert isinstance(data_pointer, ctp.POINTER(_GMT_DATASET)) + >>> + >>> # Read grid from a virtual file + >>> with Session() as lib: + ... with lib.virtualfile_out(kind="grid") as voutgrd: + ... lib.call_module("read", ["@earth_relief_01d_g", voutgrd, "-Tg"]) + ... # Read the virtual file as a void pointer + ... void_pointer = lib.read_virtualfile(voutgrd) + ... assert isinstance(void_pointer, int) # void pointer is an int + ... data_pointer = lib.read_virtualfile(voutgrd, kind="grid") + ... assert isinstance(data_pointer, ctp.POINTER(_GMT_GRID)) + + """ + c_read_virtualfile = self.get_libgmt_func( + "GMT_Read_VirtualFile", + argtypes=[ctp.c_void_p, ctp.c_char_p], + restype=ctp.c_void_p, + ) + pointer = c_read_virtualfile(self.session_pointer, vfname.encode()) + # The GMT C API function GMT_Read_VirtualFile returns a void pointer. It usually + # needs to be cast into a pointer to a GMT data container (e.g., _GMT_GRID or + # _GMT_DATASET). + if kind is None: # Return the ctypes void pointer + return pointer + if kind == "cube": + msg = f"kind={kind} is not supported yet." + raise NotImplementedError(msg) + dtype = {"dataset": _GMT_DATASET, "grid": _GMT_GRID, "image": _GMT_IMAGE}[kind] + return ctp.cast(pointer, ctp.POINTER(dtype))
+ + +
+[docs] + def virtualfile_to_dataset( + self, + vfname: str, + output_type: Literal["pandas", "numpy", "file", "strings"] = "pandas", + header: int | None = None, + column_names: list[str] | None = None, + dtype: type | dict[str, type] | None = None, + index_col: str | int | None = None, + ) -> pd.DataFrame | np.ndarray | None: + """ + Output a tabular dataset stored in a virtual file to a different format. + + The format of the dataset is determined by the ``output_type`` parameter. + + Parameters + ---------- + vfname + The virtual file name that stores the result data. + output_type + Desired output type of the result data. + + - ``"pandas"`` will return a :class:`pandas.DataFrame` object. + - ``"numpy"`` will return a :class:`numpy.ndarray` object. + - ``"file"`` means the result was saved to a file and will return ``None``. + - ``"strings"`` will return the trailing text only as an array of strings. + header + Row number containing column names for the :class:`pandas.DataFrame` output. + ``header=None`` means not to parse the column names from table header. + Ignored if the row number is larger than the number of headers in the table. + column_names + The column names for the :class:`pandas.DataFrame` output. + dtype + Data type for the columns of the :class:`pandas.DataFrame` output. Can be a + single type for all columns or a dictionary mapping column names to types. + index_col + Column to set as the index of the :class:`pandas.DataFrame` output. + + Returns + ------- + result + The result dataset. If ``output_type="file"`` returns ``None``. + + Examples + -------- + >>> from pathlib import Path + >>> import numpy as np + >>> import pandas as pd + >>> + >>> from pygmt.helpers import GMTTempFile + >>> from pygmt.clib import Session + >>> + >>> with GMTTempFile(suffix=".txt") as tmpfile: + ... # prepare the sample data file + ... with Path(tmpfile.name).open(mode="w") as fp: + ... print(">", file=fp) + ... print("1.0 2.0 3.0 TEXT1 TEXT23", file=fp) + ... print("4.0 5.0 6.0 TEXT4 TEXT567", file=fp) + ... print(">", file=fp) + ... print("7.0 8.0 9.0 TEXT8 TEXT90", file=fp) + ... print("10.0 11.0 12.0 TEXT123 TEXT456789", file=fp) + ... + ... # file output + ... with Session() as lib: + ... with GMTTempFile(suffix=".txt") as outtmp: + ... with lib.virtualfile_out( + ... kind="dataset", fname=outtmp.name + ... ) as vouttbl: + ... lib.call_module("read", [tmpfile.name, vouttbl, "-Td"]) + ... result = lib.virtualfile_to_dataset( + ... vfname=vouttbl, output_type="file" + ... ) + ... assert result is None + ... assert Path(outtmp.name).stat().st_size > 0 + ... + ... # strings, numpy and pandas outputs + ... with Session() as lib: + ... with lib.virtualfile_out(kind="dataset") as vouttbl: + ... lib.call_module("read", [tmpfile.name, vouttbl, "-Td"]) + ... + ... # strings output + ... outstr = lib.virtualfile_to_dataset( + ... vfname=vouttbl, output_type="strings" + ... ) + ... assert isinstance(outstr, np.ndarray) + ... assert outstr.dtype.kind in ("S", "U") + ... + ... # numpy output + ... outnp = lib.virtualfile_to_dataset( + ... vfname=vouttbl, output_type="numpy" + ... ) + ... assert isinstance(outnp, np.ndarray) + ... + ... # pandas output + ... outpd = lib.virtualfile_to_dataset( + ... vfname=vouttbl, output_type="pandas" + ... ) + ... assert isinstance(outpd, pd.DataFrame) + ... + ... # pandas output with specified column names + ... outpd2 = lib.virtualfile_to_dataset( + ... vfname=vouttbl, + ... output_type="pandas", + ... column_names=["col1", "col2", "col3", "coltext"], + ... ) + ... assert isinstance(outpd2, pd.DataFrame) + >>> outstr + array(['TEXT1 TEXT23', 'TEXT4 TEXT567', 'TEXT8 TEXT90', + 'TEXT123 TEXT456789'], dtype='<U18') + >>> outnp + array([[1.0, 2.0, 3.0, 'TEXT1 TEXT23'], + [4.0, 5.0, 6.0, 'TEXT4 TEXT567'], + [7.0, 8.0, 9.0, 'TEXT8 TEXT90'], + [10.0, 11.0, 12.0, 'TEXT123 TEXT456789']], dtype=object) + >>> outpd + 0 1 2 3 + 0 1.0 2.0 3.0 TEXT1 TEXT23 + 1 4.0 5.0 6.0 TEXT4 TEXT567 + 2 7.0 8.0 9.0 TEXT8 TEXT90 + 3 10.0 11.0 12.0 TEXT123 TEXT456789 + >>> outpd2 + col1 col2 col3 coltext + 0 1.0 2.0 3.0 TEXT1 TEXT23 + 1 4.0 5.0 6.0 TEXT4 TEXT567 + 2 7.0 8.0 9.0 TEXT8 TEXT90 + 3 10.0 11.0 12.0 TEXT123 TEXT456789 + """ + if output_type == "file": # Already written to file, so return None + return None + + # Read the virtual file as a _GMT_DATASET object + result = self.read_virtualfile(vfname, kind="dataset").contents + + if output_type == "strings": # strings output + return result.to_strings() + + result = result.to_dataframe( + header=header, column_names=column_names, dtype=dtype, index_col=index_col + ) + if output_type == "numpy": # numpy.ndarray output + return result.to_numpy() + return result # pandas.DataFrame output
+ + +
+[docs] + def virtualfile_to_raster( + self, + vfname: str, + kind: Literal["grid", "image", "cube", None] = "grid", + outgrid: str | None = None, + ) -> xr.DataArray | None: + """ + Output raster data stored in a virtual file to an :class:`xarray.DataArray` + object. + + The raster data can be a grid, an image or a cube. + + Parameters + ---------- + vfname + The virtual file name that stores the result grid/image/cube. + kind + Type of the raster data. Valid values are ``"grid"``, ``"image"``, + ``"cube"`` or ``None``. If ``None``, will inquire the data type from the + virtual file name. + outgrid + Name of the output grid/image/cube. If specified, it means the raster data + was already saved into an actual file and will return ``None``. + + Returns + ------- + result + The result grid/image/cube. If ``outgrid`` is specified, return ``None``. + + Examples + -------- + >>> from pathlib import Path + >>> from pygmt.clib import Session + >>> from pygmt.helpers import GMTTempFile + >>> with Session() as lib: + ... # file output + ... with GMTTempFile(suffix=".nc") as tmpfile: + ... outgrid = tmpfile.name + ... with lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd: + ... lib.call_module("read", ["@earth_relief_01d_g", voutgrd, "-Tg"]) + ... result = lib.virtualfile_to_raster( + ... vfname=voutgrd, outgrid=outgrid + ... ) + ... assert result == None + ... assert Path(outgrid).stat().st_size > 0 + ... + ... # xarray.DataArray output + ... outgrid = None + ... with lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd: + ... lib.call_module("read", ["@earth_relief_01d_g", voutgrd, "-Tg"]) + ... result = lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid) + ... assert isinstance(result, xr.DataArray) + """ + if outgrid is not None: # Already written to file, so return None + return None + if kind is None: # Inquire the data family from the virtualfile + family = self.inquire_virtualfile(vfname) + kind = { # type: ignore[assignment] + self["GMT_IS_GRID"]: "grid", + self["GMT_IS_IMAGE"]: "image", + self["GMT_IS_CUBE"]: "cube", + }[family] + return self.read_virtualfile(vfname, kind=kind).contents.to_dataarray()
+ + +
+[docs] + def extract_region(self) -> np.ndarray: + """ + Extract the region of the currently active figure. + + Retrieves the information from the PostScript file, so it works for country + codes as well. + + Returns + ------- + region + A numpy 1-D array with the west, east, south, and north dimensions of the + current figure. + + Examples + -------- + >>> import pygmt + >>> fig = pygmt.Figure() + >>> fig.coast( + ... region=[0, 10, -20, -10], projection="M12c", frame=True, land="black" + ... ) + >>> with Session() as lib: + ... region = lib.extract_region() + >>> print(", ".join([f"{x:.2f}" for x in region])) + 0.00, 10.00, -20.00, -10.00 + + Using ISO country codes for the regions (for example ``"US.HI"`` for Hawaiʻi): + + >>> fig = pygmt.Figure() + >>> fig.coast(region="US.HI", projection="M12c", frame=True, land="black") + >>> with Session() as lib: + ... region = lib.extract_region() + >>> print(", ".join([f"{x:.2f}" for x in region])) + -164.71, -154.81, 18.91, 23.58 + + The country codes can have an extra argument that rounds the region to multiples + of the argument (for example, ``"US.HI+r5"`` will round the region to multiples + of 5): + + >>> fig = pygmt.Figure() + >>> fig.coast(region="US.HI+r5", projection="M12c", frame=True, land="black") + >>> with Session() as lib: + ... region = lib.extract_region() + >>> print(", ".join([f"{x:.2f}" for x in region])) + -165.00, -150.00, 15.00, 25.00 + """ # noqa: RUF002 + c_extract_region = self.get_libgmt_func( + "GMT_Extract_Region", + argtypes=[ctp.c_void_p, ctp.c_char_p, ctp.POINTER(ctp.c_double)], + restype=ctp.c_int, + ) + + region = np.empty(4, dtype=np.float64) + status = c_extract_region( + self.session_pointer, + None, # File pointer to a PostScript file. Must be None in modern mode. + region.ctypes.data_as(ctp.POINTER(ctp.c_double)), + ) + if status != 0: + msg = "Failed to extract region from current figure." + raise GMTCLibError(msg) + return region
+
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/earth_age.html b/v0.14.0/_modules/pygmt/datasets/earth_age.html new file mode 100644 index 00000000000..b86fafdf135 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/earth_age.html @@ -0,0 +1,314 @@ + + + + + + + + pygmt.datasets.earth_age — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.datasets.earth_age

+"""
+Function to download the Earth seafloor crustal age dataset from the GMT data server,
+and load as :class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_earth_age"]
+
+
+
+[docs] +def load_earth_age( + resolution: Literal[ + "01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m" + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel"] = "gridline", +) -> xr.DataArray: + r""" + Load the Earth seafloor crustal age dataset in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_age.jpg + :width: 80 % + :align: center + + Earth seafloor crustal age dataset. + + The grids are downloaded to a user data directory + (usually ``~/.gmt/server/earth/earth_age/``) the first time you invoke + this function. Afterwards, it will load the grid from the data directory. + So you'll need an internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@earth_age**\_\ *res*\[_\ *reg*] to any grid processing function or + plotting method. *res* is the grid resolution (see below), and *reg* is + the grid registration type (**p** for pixel registration or **g** for + the 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 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"``. + + Refer to :gmt-datasets:`earth-age.html` for more details about available + datasets, including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d`` and ``m`` stand for arc-degrees and + arc-minutes. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. + + Returns + ------- + grid + The Earth seafloor crustal age grid. Coordinates are latitude and + longitude in degrees. Age is in millions of years (Myr). + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors + (i.e., ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). + However, these properties may be lost after specific grid operations (such + as slicing) and will need to be manually set before passing the grid to any + PyGMT data processing or plotting functions. Refer to + :class:`pygmt.GMTDataArrayAccessor` for detailed explanations and + workarounds. + + Examples + -------- + + >>> from pygmt.datasets import load_earth_age + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_earth_age() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_earth_age(resolution="30m", registration="gridline") + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_earth_age( + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) + """ + grid = _load_remote_dataset( + name="earth_age", + prefix="earth_age", + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/earth_day.html b/v0.14.0/_modules/pygmt/datasets/earth_day.html new file mode 100644 index 00000000000..aa7e4e576de --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/earth_day.html @@ -0,0 +1,309 @@ + + + + + + + + pygmt.datasets.earth_day — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.datasets.earth_day

+"""
+Function to download the NASA Blue Marble image datasets from the GMT data server, and
+load as :class:`xarray.DataArray`.
+
+The images are available in various resolutions.
+"""
+
+import contextlib
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+with contextlib.suppress(ImportError):
+    # rioxarray is needed to register the rio accessor
+    import rioxarray  # noqa: F401
+
+__doctest_skip__ = ["load_blue_marble"]
+
+
+
+[docs] +def load_blue_marble( + resolution: Literal[ + "01d", + "30m", + "20m", + "15m", + "10m", + "06m", + "05m", + "04m", + "03m", + "02m", + "01m", + "30s", + ] = "01d", + region: Sequence[float] | str | None = None, +) -> xr.DataArray: + r""" + Load NASA Blue Marble images in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_daynight.jpg + :width: 80% + :align: center + + Earth day/night dataset. + + The images are downloaded to a user data directory (usually + ``~/.gmt/server/earth/earth_day/``) the first time you invoke this function. + Afterwards, it will load the image from the data directory. So you'll need an + internet connection the first time around. + + These images can also be accessed by passing in the file name + **@earth_day**\_\ *res* to any image processing function or plotting method. *res* + is the image resolution (see below). + + Refer to :gmt-datasets:`earth-daynight.html` for more details about available + datasets, including version information and references. + + Parameters + ---------- + resolution + The image resolution. The suffix ``d``, ``m``, and ``s`` stand for arc-degrees, + arc-minutes, and arc-seconds. + region + The subregion of the image to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*]. + + Returns + ------- + image + The NASA Blue Marble image. Coordinates are latitude and longitude in degrees. + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` image can be accessed via the GMT accessors (i.e., + ``image.gmt.registration`` and ``image.gmt.gtype`` respectively). However, these + properties may be lost after specific image operations (such as slicing) and will + need to be manually set before passing the image to any PyGMT data processing or + plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed + explanations and workarounds. + + Examples + -------- + + >>> from pygmt.datasets import load_blue_marble + >>> # load the default image (pixel-registered 1 arc-degree image) + >>> image = load_blue_marble() + """ + image = _load_remote_dataset( + name="earth_day", + prefix="earth_day", + resolution=resolution, + region=region, + registration="pixel", + ) + # If rioxarray is installed, set the coordinate reference system + if hasattr(image, "rio"): + image = image.rio.write_crs(input_crs="OGC:CRS84") + return image
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/earth_deflection.html b/v0.14.0/_modules/pygmt/datasets/earth_deflection.html new file mode 100644 index 00000000000..5d42d9f4681 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/earth_deflection.html @@ -0,0 +1,327 @@ + + + + + + + + pygmt.datasets.earth_deflection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.earth_deflection

+"""
+Function to download the IGPP Earth east-west and north-south deflection datasets from
+the GMT data server, and load as :class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_earth_deflection"]
+
+
+
+[docs] +def load_earth_deflection( + resolution: Literal[ + "01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m" + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel", None] = None, + component: Literal["east", "north"] = "east", +) -> xr.DataArray: + r""" + Load the IGPP Earth east-west and north-south deflection datasets in various + resolutions. + + .. list-table:: + :widths: 50 50 + :header-rows: 1 + + * - IGPP Earth east-west deflection + - IGPP Earth north-south deflection + * - .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_edefl.jpg + - .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_ndefl.jpg + + The grids are downloaded to a user data directory (usually + ``~/.gmt/server/earth/earth_edefl/`` and ``~/.gmt/server/earth/earth_ndefl/`` the + first time you invoke this function. Afterwards, it will load the grid from the + data directory. So you'll need an internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@**\ *earth_defl_type*\_\ *res*\[_\ *reg*] to any grid processing function or + plotting method. *earth_defl_type* is the GMT name for the dataset. The available + options are **earth_edefl** and **earth_ndefl**. *res* is the grid resolution (see + below), and *reg* is the grid registration type (**p** for pixel registration or + **g** for gridline registration). + + The default color palette table (CPTs) for this dataset is *@earth_defl.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_defl.cpt"``. + + Refer to :gmt-datasets:`earth-edefl.html` and :gmt-datasets:`earth-ndefl.html` for + more details about available datasets, including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d`` and ``m`` stand for arc-degrees and + arc-minutes. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. Default is ``None``, which means + ``"gridline"`` for all resolutions except ``"01m"`` which is ``"pixel"`` only. + component + By default, the east-west deflection (``component="east"``) is returned, + set ``component="north"`` to return the north-south deflection. + + Returns + ------- + grid + The Earth east-west or north-south deflection grid. Coordinates are latitude + and longitude in degrees. Deflection values are in micro-radians, where + positive (negative) values indicate a deflection to the east or north (west + or south). + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e., + ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these + properties may be lost after specific grid operations (such as slicing) and will + need to be manually set before passing the grid to any PyGMT data processing or + plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed + explanations and workarounds. + + Examples + -------- + + >>> from pygmt.datasets import load_earth_deflection + >>> # load the default grid for east-west deflection (gridline-registered + >>> # 1 arc-degree grid) + >>> grid = load_earth_deflection() + >>> # load the default grid for north-south deflection + >>> grid = load_earth_deflection(component="north") + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_earth_deflection(resolution="30m", registration="gridline") + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_earth_deflection( + ... resolution="05m", region=[120, 160, 30, 60], registration="gridline" + ... ) + """ + prefix = "earth_ndefl" if component == "north" else "earth_edefl" + grid = _load_remote_dataset( + name=prefix, + prefix=prefix, + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/earth_dist.html b/v0.14.0/_modules/pygmt/datasets/earth_dist.html new file mode 100644 index 00000000000..087865b8d39 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/earth_dist.html @@ -0,0 +1,313 @@ + + + + + + + + pygmt.datasets.earth_dist — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.earth_dist

+"""
+Function to download the GSHHG Earth distance to shoreline dataset from the GMT data
+server, and load as :class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_earth_dist"]
+
+
+
+[docs] +def load_earth_dist( + resolution: Literal[ + "01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m" + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel"] = "gridline", +) -> xr.DataArray: + r""" + Load the GSHHG Earth distance to shoreline dataset in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_dist.jpg + :width: 80 % + :align: center + + GSHHG Earth distance to shoreline dataset. + + The grids are downloaded to a user data directory (usually + ``~/.gmt/server/earth/earth_dist/``) the first time you invoke this function. + Afterwards, it will load the grid from the data directory. So you'll need an + internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@earth_dist**\_\ *res*\[_\ *reg*] to any grid processing function or plotting + method. *res* is the grid resolution (see below), and *reg* is the grid registration + type (**p** for pixel registration or **g** for gridline registration). + + The default color palette table (CPT) for this dataset is *@earth_dist.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_dist.cpt"``. + + Refer to :gmt-datasets:`earth-dist.html` for more details about available datasets, + including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d`` and ``m`` stand for arc-degrees and + arc-minutes. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. + + Returns + ------- + grid + The GSHHG Earth distance to shoreline grid. Coordinates are latitude and + longitude in degrees. Distances are in kilometers, where positive (negative) + values mean land to coastline (ocean to coastline). + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e., + ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these + properties may be lost after specific grid operations (such as slicing) and will + need to be manually set before passing the grid to any PyGMT data processing or + plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed + explanations and workarounds. + + Examples + -------- + + >>> from pygmt.datasets import load_earth_dist + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_earth_dist() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_earth_dist(resolution="30m", registration="gridline") + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_earth_dist( + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) + """ + grid = _load_remote_dataset( + name="earth_dist", + prefix="earth_dist", + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/earth_free_air_anomaly.html b/v0.14.0/_modules/pygmt/datasets/earth_free_air_anomaly.html new file mode 100644 index 00000000000..c2ca5ec0d52 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/earth_free_air_anomaly.html @@ -0,0 +1,326 @@ + + + + + + + + pygmt.datasets.earth_free_air_anomaly — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.earth_free_air_anomaly

+"""
+Function to download the IGPP Earth free-air anomaly and uncertainty datasets from
+the GMT data server, and load as :class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_earth_free_air_anomaly"]
+
+
+
+[docs] +def load_earth_free_air_anomaly( + resolution: Literal[ + "01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m" + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel", None] = None, + uncertainty: bool = False, +) -> xr.DataArray: + r""" + Load the IGPP Earth free-air anomaly and uncertainty datasets in various + resolutions. + + .. list-table:: + :widths: 50 50 + :header-rows: 1 + + * - IGPP Earth free-air anomaly + - IGPP Earth free-air anomaly uncertainty + * - .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_faa.jpg + - .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_faaerror.jpg + + The grids are downloaded to a user data directory (usually + ``~/.gmt/server/earth/earth_faa/`` or ``~/.gmt/server/earth/earth_faaerror/``) the + first time you invoke this function. Afterwards, it will load the grid from data + directory. So you'll need an internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@earth_faa_type**\_\ *res*\[_\ *reg*] to any grid processing function or + plotting method. *earth_faa_type* is the GMT name for the dataset. The available + options are **earth_faa** and **earth_faaerror**. *res* is the grid resolution (see + below), and *reg* is the grid registration type (**p** for pixel registration or + **g** for gridline registration). + + The default color palette tables (CPTs) for these datasets are *@earth_faa.cpt* and + *@earth_faaerror.cpt*. 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_faa.cpt"`` or + ``cmap="@earth_faaerror.cpt"``. + + Refer to :gmt-datasets:`earth-faa.html` and :gmt-datasets:`earth-faaerror.html` for + more details about available datasets, including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d`` and ``m`` stand for arc-degrees and + arc-minutes. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. Default is ``None``, which means + ``"gridline"`` for all resolutions except ``"01m"`` which is ``"pixel"`` + only. + uncertainty + By default, the Earth free-air anomaly values are returned. Set to ``True`` to + return the related uncertainties instead. + + Returns + ------- + grid + The Earth free-air anomaly (uncertainty) grid. Coordinates are latitude and + longitude in degrees. Values and uncertainties are in mGal. + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e., + ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these + properties may be lost after specific grid operations (such as slicing) and will + need to be manually set before passing the grid to any PyGMT data processing or + plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed + explanations and workarounds. + + Examples + -------- + + >>> from pygmt.datasets import load_earth_free_air_anomaly + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_earth_free_air_anomaly() + >>> # load the uncertainties related to the default grid + >>> grid = load_earth_free_air_anomaly(uncertainty=True) + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_earth_free_air_anomaly(resolution="30m", registration="gridline") + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_earth_free_air_anomaly( + ... resolution="05m", region=[120, 160, 30, 60], registration="gridline" + ... ) + """ + prefix = "earth_faaerror" if uncertainty is True else "earth_faa" + grid = _load_remote_dataset( + name=prefix, + prefix=prefix, + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/earth_geoid.html b/v0.14.0/_modules/pygmt/datasets/earth_geoid.html new file mode 100644 index 00000000000..658aaa25b1f --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/earth_geoid.html @@ -0,0 +1,307 @@ + + + + + + + + pygmt.datasets.earth_geoid — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.earth_geoid

+"""
+Function to download the EGM2008 Earth geoid dataset from the GMT data server, and load
+as :class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_earth_geoid"]
+
+
+
+[docs] +def load_earth_geoid( + resolution: Literal[ + "01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m" + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel"] = "gridline", +) -> xr.DataArray: + r""" + Load the EGM2008 Earth geoid dataset in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_geoid.jpg + :width: 80 % + :align: center + + EGM2008 Earth geoid dataset. + + The grids are downloaded to a user data directory + (usually ``~/.gmt/server/earth/earth_geoid/``) the first time you invoke + this function. Afterwards, it will load the grid from the data directory. + So you'll need an internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@earth_geoid**\_\ *res*\[_\ *reg*] to any grid processing function or + plotting method. *res* is the grid resolution (see below), and *reg* is + the grid registration type (**p** for pixel registration or **g** for + gridline registration). + + Refer to :gmt-datasets:`earth-geoid.html` for more details about available + datasets, including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d`` and ``m`` stand for arc-degrees and + arc-minutes. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. + + Returns + ------- + grid + The Earth geoid grid. Coordinates are latitude and + longitude in degrees. Units are in meters. + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors + (i.e., ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). + However, these properties may be lost after specific grid operations (such + as slicing) and will need to be manually set before passing the grid to any + PyGMT data processing or plotting functions. Refer to + :class:`pygmt.GMTDataArrayAccessor` for detailed explanations and + workarounds. + + Examples + -------- + + >>> from pygmt.datasets import load_earth_geoid + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_earth_geoid() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_earth_geoid(resolution="30m", registration="gridline") + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_earth_geoid( + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) + """ + grid = _load_remote_dataset( + name="earth_geoid", + prefix="earth_geoid", + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/earth_magnetic_anomaly.html b/v0.14.0/_modules/pygmt/datasets/earth_magnetic_anomaly.html new file mode 100644 index 00000000000..4db220f9d69 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/earth_magnetic_anomaly.html @@ -0,0 +1,362 @@ + + + + + + + + pygmt.datasets.earth_magnetic_anomaly — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.earth_magnetic_anomaly

+"""
+Function to download the Earth magnetic anomaly datasets from the GMT data server, and
+load as :class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+from pygmt.exceptions import GMTInvalidInput
+
+__doctest_skip__ = ["load_earth_magnetic_anomaly"]
+
+
+
+[docs] +def load_earth_magnetic_anomaly( + resolution: Literal[ + "01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m" + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel", None] = None, + data_source: Literal["emag2", "emag2_4km", "wdmam"] = "emag2", +) -> xr.DataArray: + r""" + Load the Earth magnetic anomaly datasets in various resolutions. + + .. list-table:: + :widths: 50 50 + :header-rows: 1 + + * - Earth Magnetic Anomaly Model (EMAG2) + - World Digital Magnetic Anomaly Map (WDMAM) + * - .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_mag.jpg + - .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_wdmam.jpg + + The grids are downloaded to a user data directory + (usually ``~/.gmt/server/earth/earth_mag/``, + ``~/.gmt/server/earth/earth_mag4km/``, + or ``~/.gmt/server/earth/earth_wdmam/``) the first time you invoke + this function. Afterwards, it will load the grid from the data directory. + So you'll need an internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@**\ *earth_mag_type*\_\ *res*\[_\ *reg*] to any grid processing + function or plotting method. *earth_mag_type* is the GMT name + for the dataset. The available options are **earth_mag**, + **earth_mag4km**, and **earth_wdmam**. *res* is the grid resolution + (see below), and *reg* is the 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"``. 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"``. + + Refer to :gmt-datasets:`earth-mag.html` + and :gmt-datasets:`earth-wdmam.html` for more details about available + datasets, including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d`` and ``m`` stand for arc-degrees and + arc-minutes. The resolution ``"02m"`` is not available for + ``data_source="wdmam"``. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. Default is ``None``, which means + ``"gridline"`` for all resolutions except ``"02m"`` for + ``data_source="emag2"`` or ``data_source="emag2_4km"``, which are ``"pixel"`` + only. + data_source + Select the source of the magnetic anomaly data. Available options are: + + - ``"emag2"``: EMAG2 Earth Magnetic Anomaly Model. It only includes + data observed at sea level over oceanic regions. + See :gmt-datasets:`earth-mag.html`. + - ``"emag2_4km"``: Use a version of EMAG2 where all observations + are relative to an altitude of 4 km above the geoid and include + data over land. + - ``"wdmam"``: World Digital Magnetic Anomaly Map (WDMAM). + See :gmt-datasets:`earth-wdmam.html`. + + Returns + ------- + grid + The Earth magnetic anomaly grid. Coordinates are latitude and + longitude in degrees. Units are in nano Tesla (nT). + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors + (i.e., ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). + However, these properties may be lost after specific grid operations (such + as slicing) and will need to be manually set before passing the grid to any + PyGMT data processing or plotting functions. Refer to + :class:`pygmt.GMTDataArrayAccessor` for detailed explanations and + workarounds. + + Examples + -------- + + >>> from pygmt.datasets import load_earth_magnetic_anomaly + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_earth_magnetic_anomaly() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_earth_magnetic_anomaly(resolution="30m", registration="gridline") + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_earth_magnetic_anomaly( + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) + >>> # load the 20 arc-minutes grid of the emag2_4km dataset + >>> grid = load_earth_magnetic_anomaly( + ... resolution="20m", registration="gridline", data_source="emag2_4km" + ... ) + >>> # load the 20 arc-minutes grid of the WDMAM dataset + >>> grid = load_earth_magnetic_anomaly( + ... resolution="20m", registration="gridline", data_source="wdmam" + ... ) + """ + # Map data source to prefix + prefix = { + "emag2": "earth_mag", + "emag2_4km": "earth_mag4km", + "wdmam": "earth_wdmam", + }.get(data_source) + if prefix is None: + msg = ( + f"Invalid earth magnetic anomaly data source '{data_source}'. " + "Valid values are 'emag2', 'emag2_4km', and 'wdmam'." + ) + raise GMTInvalidInput(msg) + grid = _load_remote_dataset( + name="earth_wdmam" if data_source == "wdmam" else "earth_mag", + prefix=prefix, + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/earth_mask.html b/v0.14.0/_modules/pygmt/datasets/earth_mask.html new file mode 100644 index 00000000000..e0e2eebfa9c --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/earth_mask.html @@ -0,0 +1,327 @@ + + + + + + + + pygmt.datasets.earth_mask — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.earth_mask

+"""
+Function to download the GSHHG Earth Mask dataset from the GMT data server, and load as
+:class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_earth_mask"]
+
+
+
+[docs] +def load_earth_mask( + resolution: Literal[ + "01d", + "30m", + "20m", + "15m", + "10m", + "06m", + "05m", + "04m", + "03m", + "02m", + "01m", + "30s", + "15s", + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel"] = "gridline", +) -> xr.DataArray: + r""" + Load the GSHHG Earth mask dataset in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_mask.jpg + :width: 80 % + :align: center + + GSHHG Earth mask dataset. + + The grids are downloaded to a user data directory + (usually ``~/.gmt/server/earth/earth_mask/``) the first time you invoke + this function. Afterwards, it will load the grid from the data directory. + So you'll need an internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@earth_mask**\_\ *res*\[_\ *reg*] to any grid processing function or + plotting method. *res* is the grid resolution (see below), and *reg* is + the grid registration type (**p** for pixel registration or **g** for + gridline registration). + + Refer to :gmt-datasets:`earth-mask.html` for more details about available + datasets, including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d``, ``m``, and ``s`` stand for arc-degrees, + arc-minutes, and arc-seconds. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. + + Returns + ------- + grid + The Earth mask grid. Coordinates are latitude and + longitude in degrees. The node values in the mask grids are all in + the 0-4 range and reflect different surface types: + + - 0: Oceanic areas beyond the shoreline + - 1: Land areas inside the shoreline + - 2: Lakes inside the land areas + - 3: Islands in lakes in the land areas + - 4: Smaller lakes in islands that are found within lakes + inside the land area + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors + (i.e., ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). + However, these properties may be lost after specific grid operations (such + as slicing) and will need to be manually set before passing the grid to any + PyGMT data processing or plotting functions. Refer to + :class:`pygmt.GMTDataArrayAccessor` for detailed explanations and + workarounds. + + Examples + -------- + + >>> from pygmt.datasets import load_earth_mask + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_earth_mask() + >>> # location (120°E, 50°N) is in land area (1) + >>> grid.sel(lon=120, lat=50).values + array(1, dtype=int8) + >>> # location (170°E, 50°N) is in oceanic area (0) + >>> grid.sel(lon=170, lat=50).values + array(0, dtype=int8) + """ + grid = _load_remote_dataset( + name="earth_mask", + prefix="earth_mask", + resolution=resolution, + region=region, + registration=registration, + ) + # `return grid.astype("int8")` doesn't work because grid encoding is lost. + # See https://github.com/GenericMappingTools/pygmt/issues/2629. + grid.data = grid.data.astype("int8") + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/earth_mean_dynamic_topography.html b/v0.14.0/_modules/pygmt/datasets/earth_mean_dynamic_topography.html new file mode 100644 index 00000000000..4eceebae628 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/earth_mean_dynamic_topography.html @@ -0,0 +1,311 @@ + + + + + + + + pygmt.datasets.earth_mean_dynamic_topography — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.earth_mean_dynamic_topography

+"""
+Function to download the CNES Earth mean dynamic topography dataset from the GMT data
+server, and load as :class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_earth_mean_dynamic_topography"]
+
+
+
+[docs] +def load_earth_mean_dynamic_topography( + resolution: Literal["01d", "30m", "20m", "15m", "10m", "07m"] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel"] = "gridline", +) -> xr.DataArray: + r""" + Load the CNES Earth mean dynamic topography dataset in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_mdt.jpg + :width: 80 % + :align: center + + CNES Earth mean dynamic topography dataset. + + The grids are downloaded to a user data directory (usually + ``~/.gmt/server/earth/earth_mdt/``) the first time you invoke this function. + Afterwards, it will load the grid from the data directory. So you'll need an + internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@earth_mdt**\_\ *res*\[_\ *reg*] to any grid processing function or plotting + method. *res* is the grid resolution (see below), and *reg* is the grid registration + type (**p** for pixel registration or **g** for gridline registration). + + The default color palette table (CPT) for this dataset is *@earth_mdt.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_mdt.cpt"``. + + Refer to :gmt-datasets:`earth-mdt.html` for more details about available datasets, + including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d`` and ``m`` stand for arc-degrees and + arc-minutes. Note that ``"07m"`` refers to a resolution of 7.5 arc-minutes. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. + + Returns + ------- + grid + The CNES Earth mean dynamic topography grid. Coordinates are latitude and + longitude in degrees. Values are in meters. + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e., + ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these + properties may be lost after specific grid operations (such as slicing) and will + need to be manually set before passing the grid to any PyGMT data processing or + plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed + explanations and workarounds. + + Examples + -------- + + >>> from pygmt.datasets import load_earth_mean_dynamic_topography + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_earth_mean_dynamic_topography() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_earth_mean_dynamic_topography( + ... resolution="30m", registration="gridline" + ... ) + >>> # load high-resolution (7 arc-minutes) grid for a specific region + >>> grid = load_earth_mean_dynamic_topography( + ... resolution="07m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) + """ + grid = _load_remote_dataset( + name="earth_mdt", + prefix="earth_mdt", + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/earth_mean_sea_surface.html b/v0.14.0/_modules/pygmt/datasets/earth_mean_sea_surface.html new file mode 100644 index 00000000000..eadbeb70e32 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/earth_mean_sea_surface.html @@ -0,0 +1,312 @@ + + + + + + + + pygmt.datasets.earth_mean_sea_surface — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.earth_mean_sea_surface

+"""
+Function to download the CNES Earth mean sea surface dataset from the GMT data
+server, and load as :class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_earth_mean_sea_surface"]
+
+
+
+[docs] +def load_earth_mean_sea_surface( + resolution: Literal[ + "01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m" + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel"] = "gridline", +) -> xr.DataArray: + r""" + Load the CNES Earth mean sea surface dataset in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_mss.jpg + :width: 80 % + :align: center + + CNES Earth mean sea surface dataset. + + The grids are downloaded to a user data directory (usually + ``~/.gmt/server/earth/earth_mss/``) the first time you invoke this function. + Afterwards, it will load the grid from the data directory. So you'll need an + internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@earth_mss**\_\ *res*\[_\ *reg*] to any grid processing function or plotting + method. *res* is the grid resolution (see below), and *reg* is the grid registration + type (**p** for pixel registration or **g** for gridline registration). + + The default color palette table (CPT) for this dataset is *@earth_mss.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_mss.cpt"``. + + Refer to :gmt-datasets:`earth-mss.html` for more details about available datasets, + including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d`` and ``m`` stand for arc-degrees and + arc-minutes. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. + + Returns + ------- + grid + The CNES Earth mean sea surface grid. Coordinates are latitude and + longitude in degrees. Values are in meters. + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e., + ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these + properties may be lost after specific grid operations (such as slicing) and will + need to be manually set before passing the grid to any PyGMT data processing or + plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed + explanations and workarounds. + + Examples + -------- + + >>> from pygmt.datasets import load_earth_mean_sea_surface + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_earth_mean_sea_surface() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_earth_mean_sea_surface(resolution="30m", registration="gridline") + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_earth_mean_sea_surface( + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) + """ + grid = _load_remote_dataset( + name="earth_mss", + prefix="earth_mss", + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/earth_night.html b/v0.14.0/_modules/pygmt/datasets/earth_night.html new file mode 100644 index 00000000000..6b649920d6d --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/earth_night.html @@ -0,0 +1,309 @@ + + + + + + + + pygmt.datasets.earth_night — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.earth_night

+"""
+Function to download the NASA Black Marble image datasets from the GMT data server, and
+load as :class:`xarray.DataArray`.
+
+The images are available in various resolutions.
+"""
+
+import contextlib
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+with contextlib.suppress(ImportError):
+    # rioxarray is needed to register the rio accessor
+    import rioxarray  # noqa: F401
+
+__doctest_skip__ = ["load_black_marble"]
+
+
+
+[docs] +def load_black_marble( + resolution: Literal[ + "01d", + "30m", + "20m", + "15m", + "10m", + "06m", + "05m", + "04m", + "03m", + "02m", + "01m", + "30s", + ] = "01d", + region: Sequence[float] | str | None = None, +) -> xr.DataArray: + r""" + Load NASA Black Marble images in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_daynight.jpg + :width: 80% + :align: center + + Earth day/night dataset. + + The images are downloaded to a user data directory (usually + ``~/.gmt/server/earth/earth_night/``) the first time you invoke this function. + Afterwards, it will load the image from the data directory. So you'll need an + internet connection the first time around. + + These images can also be accessed by passing in the file name + **@earth_night**\_\ *res* to any image processing function or plotting method. *res* + is the image resolution (see below). + + Refer to :gmt-datasets:`earth-daynight.html` for more details about available + datasets, including version information and references. + + Parameters + ---------- + resolution + The image resolution. The suffix ``d``, ``m``, and ``s`` stand for arc-degrees, + arc-minutes, and arc-seconds. + region + The subregion of the image to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*]. + + Returns + ------- + image + The NASA Black Marble image. Coordinates are latitude and longitude in degrees. + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` image can be accessed via the GMT accessors (i.e., + ``image.gmt.registration`` and ``image.gmt.gtype`` respectively). However, these + properties may be lost after specific image operations (such as slicing) and will + need to be manually set before passing the image to any PyGMT data processing or + plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed + explanations and workarounds. + + Examples + -------- + + >>> from pygmt.datasets import load_black_marble + >>> # load the default image (pixel-registered 1 arc-degree image) + >>> image = load_black_marble() + """ + image = _load_remote_dataset( + name="earth_night", + prefix="earth_night", + resolution=resolution, + region=region, + registration="pixel", + ) + # If rioxarray is installed, set the coordinate reference system + if hasattr(image, "rio"): + image = image.rio.write_crs(input_crs="OGC:CRS84") + return image
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/earth_relief.html b/v0.14.0/_modules/pygmt/datasets/earth_relief.html new file mode 100644 index 00000000000..7b31470feb0 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/earth_relief.html @@ -0,0 +1,393 @@ + + + + + + + + pygmt.datasets.earth_relief — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.earth_relief

+"""
+Function to download the Earth relief datasets from the GMT data server, and load as
+:class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+from pygmt.exceptions import GMTInvalidInput
+
+__doctest_skip__ = ["load_earth_relief"]
+
+
+
+[docs] +def load_earth_relief( + resolution: Literal[ + "01d", + "30m", + "20m", + "15m", + "10m", + "06m", + "05m", + "04m", + "03m", + "02m", + "01m", + "30s", + "15s", + "03s", + "01s", + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel", None] = None, + data_source: Literal["igpp", "gebco", "gebcosi", "synbath"] = "igpp", + use_srtm: bool = False, +) -> xr.DataArray: + r""" + Load the Earth relief datasets (topography and bathymetry) in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_gebco.jpg + :width: 80 % + :align: center + + Earth relief datasets (topography and bathymetry). + + The grids are downloaded to a user data directory + (usually ``~/.gmt/server/earth/earth_relief``, + ``~/.gmt/server/earth/earth_gebco``, ``~/.gmt/server/earth/earth_gebcosi``, + or ``~/.gmt/server/earth/earth_synbath``) the first time you + invoke this function. Afterwards, it will load the grid from the data + directory. So you'll need an internet connection the first time around. + + This module downloads the grids that can also be accessed by + passing in the file name **@**\ *earth_relief_type*\_\ *res*\[_\ *reg*] to + any grid processing function or plotting method. *earth_relief_type* is + the GMT name for the dataset. The available options are **earth_relief**\, + **earth_gebco**\, **earth_gebcosi**\, and **earth_synbath**\. *res* is the + grid resolution (see below), and *reg* is the 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. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d``, ``m`` and ``s`` stand for arc-degrees, + arc-minutes, and arc-seconds. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. Default is ``None``, which means + ``"gridline"`` for all resolutions except ``"15s"`` which is ``"pixel"`` + only. + data_source + Select the source for the Earth relief data. Available options are: + + - ``"igpp"``: IGPP Earth Relief. See + :gmt-datasets:`earth-relief.html`. + - ``"synbath"``: IGPP Earth Relief dataset that uses stastical + properties of young seafloor to provide a more realistic relief + of young areas with small seamounts. + - ``"gebco"``: GEBCO Earth Relief with only observed relief and + inferred relief via altimetric gravity. See + :gmt-datasets:`earth-gebco.html`. + - ``"gebcosi"``: GEBCO Earth Relief that gives sub-ice (si) elevations. + use_srtm + By default, the land-only SRTM tiles from NASA are used to generate the + ``"03s"`` and ``"01s"`` grids, and the missing ocean values are filled + by up-sampling the SRTM15 tiles which have a resolution of 15 + arc-seconds (i.e., ``"15s"``). If True, will only load the original + land-only SRTM tiles. Only works when ``data_source="igpp"``. + + Returns + ------- + grid + The Earth relief grid. Coordinates are latitude and longitude in + degrees. Relief is in meters. + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors + (i.e., ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). + However, these properties may be lost after specific grid operations (such + as slicing) and will need to be manually set before passing the grid to any + PyGMT data processing or plotting functions. Refer to + :class:`pygmt.GMTDataArrayAccessor` for detailed explanations and + workarounds. + + Examples + -------- + + >>> from pygmt.datasets import load_earth_relief + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_earth_relief() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_earth_relief(resolution="30m", registration="gridline") + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_earth_relief( + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) + >>> # load the original 3 arc-seconds land-only SRTM tiles from NASA + >>> grid = load_earth_relief( + ... resolution="03s", + ... region=[135, 136, 35, 36], + ... registration="gridline", + ... use_srtm=True, + ... ) + """ + # resolutions of original land-only SRTM tiles from NASA + land_only_srtm_resolutions = ["03s", "01s"] + + # Map data source to prefix + prefix = { + "igpp": "earth_relief", + "gebco": "earth_gebco", + "gebcosi": "earth_gebcosi", + "synbath": "earth_synbath", + }.get(data_source) + if prefix is None: + msg = ( + f"Invalid earth relief data source '{data_source}'. " + "Valid values are 'igpp', 'gebco', 'gebcosi', and 'synbath'." + ) + raise GMTInvalidInput(msg) + # Use SRTM or not. + if use_srtm and resolution in land_only_srtm_resolutions: + if data_source != "igpp": + msg = ( + f"Option 'use_srtm=True' doesn't work with data source '{data_source}'. " + "Please set 'data_source' to 'igpp'." + ) + raise GMTInvalidInput(msg) + prefix = "srtm_relief" + # Choose earth relief dataset + match data_source: + case "igpp" | "synbath": + name = "earth_igpp" + case "gebco" | "gebcosi": + name = "earth_gebco" + grid = _load_remote_dataset( + name=name, + prefix=prefix, + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/earth_vertical_gravity_gradient.html b/v0.14.0/_modules/pygmt/datasets/earth_vertical_gravity_gradient.html new file mode 100644 index 00000000000..f19d4643e87 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/earth_vertical_gravity_gradient.html @@ -0,0 +1,318 @@ + + + + + + + + pygmt.datasets.earth_vertical_gravity_gradient — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.earth_vertical_gravity_gradient

+"""
+Function to download the IGPP Earth vertical gravity gradient dataset from the GMT data
+server, and load as :class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_earth_vertical_gravity_gradient"]
+
+
+
+[docs] +def load_earth_vertical_gravity_gradient( + resolution: Literal[ + "01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m" + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel", None] = None, +) -> xr.DataArray: + r""" + Load the IGPP Earth vertical gravity gradient dataset in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_vgg.jpg + :width: 80 % + :align: center + + IGPP Earth vertical gravity gradient dataset. + + The grids are downloaded to a user data directory + (usually ``~/.gmt/server/earth/earth_vgg/``) the first time you invoke + this function. Afterwards, it will load the grid from the data directory. + So you'll need an internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@earth_vgg**\_\ *res*\[_\ *reg*] to any grid processing function or + plotting method. *res* is the grid resolution (see below), and *reg* is + the grid 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 about available + datasets, including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d`` and ``m`` stand for arc-degrees and + arc-minutes. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. Default is ``None``, which means + ``"gridline"`` for all resolutions except ``"01m"`` which is ``"pixel"`` + only. + + Returns + ------- + grid + The Earth vertical gravity gradient grid. Coordinates are latitude and + longitude in degrees. Units are in Eotvos. + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors + (i.e., ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). + However, these properties may be lost after specific grid operations (such + as slicing) and will need to be manually set before passing the grid to any + PyGMT data processing or plotting functions. Refer to + :class:`pygmt.GMTDataArrayAccessor` for detailed explanations and + workarounds. + + Examples + -------- + + >>> from pygmt.datasets import load_earth_vertical_gravity_gradient + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_earth_vertical_gravity_gradient() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_earth_vertical_gravity_gradient( + ... resolution="30m", registration="gridline" + ... ) + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_earth_vertical_gravity_gradient( + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) + """ + grid = _load_remote_dataset( + name="earth_vgg", + prefix="earth_vgg", + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/mars_relief.html b/v0.14.0/_modules/pygmt/datasets/mars_relief.html new file mode 100644 index 00000000000..99654eaad43 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/mars_relief.html @@ -0,0 +1,327 @@ + + + + + + + + pygmt.datasets.mars_relief — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.mars_relief

+"""
+Function to download the Mars relief dataset from the GMT data server, and load as
+:class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_mars_relief"]
+
+
+
+[docs] +def load_mars_relief( + resolution: Literal[ + "01d", + "30m", + "20m", + "15m", + "10m", + "06m", + "05m", + "04m", + "03m", + "02m", + "01m", + "30s", + "15s", + "12s", + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel", None] = None, +) -> xr.DataArray: + r""" + Load the Mars relief dataset in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_mars_relief.jpg + :width: 80% + :align: center + + Mars relief dataset. + + The grids are downloaded to a user data directory (usually + ``~/.gmt/server/mars/mars_relief/``) the first time you invoke this function. + Afterwards, it will load the grid from the data directory. So you'll need an + internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@mars_relief**\_\ *res*\[_\ *reg*] to any grid processing function or plotting + method. *res* is the grid resolution (see below), and *reg* is the grid registration + type (**p** for pixel registration or **g** for gridline registration). + + The default color palette table (CPT) for this dataset is *@mars_relief.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="@mars_relief.cpt"``. + + Refer to :gmt-datasets:`mars-relief.html` for more details about available datasets, + including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d``, ``m`` and ``s`` stand for arc-degrees, + arc-minutes and arc-seconds. Note that ``"12s"`` refers to a resolution of + 12.1468873601 arc-seconds. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. Default is ``None``, which means + ``"gridline"`` for all resolutions except for ``"12s"`` which is ``"pixel"`` + only. + + Returns + ------- + grid + The Mars relief grid. Coordinates are latitude and longitude in degrees. Relief + is in meters. + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e., + ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these + properties may be lost after specific grid operations (such as slicing) and will + need to be manually set before passing the grid to any PyGMT data processing or + plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed + explanations and workarounds. + + Examples + -------- + >>> from pygmt.datasets import load_mars_relief + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_mars_relief() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_mars_relief(resolution="30m", registration="gridline") + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_mars_relief( + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) + """ + grid = _load_remote_dataset( + name="mars_relief", + prefix="mars_relief", + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/mercury_relief.html b/v0.14.0/_modules/pygmt/datasets/mercury_relief.html new file mode 100644 index 00000000000..558f2db05b0 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/mercury_relief.html @@ -0,0 +1,325 @@ + + + + + + + + pygmt.datasets.mercury_relief — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.mercury_relief

+"""
+Function to download the Mercury relief dataset from the GMT data server, and load as
+:class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_mercury_relief"]
+
+
+
+[docs] +def load_mercury_relief( + resolution: Literal[ + "01d", + "30m", + "20m", + "15m", + "10m", + "06m", + "05m", + "04m", + "03m", + "02m", + "01m", + "56s", + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel", None] = None, +) -> xr.DataArray: + r""" + Load the Mercury relief dataset in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_mercury_relief.jpg + :width: 80% + :align: center + + Mercury relief dataset. + + The grids are downloaded to a user data directory (usually + ``~/.gmt/server/mercury/mercury_relief/``) the first time you invoke this function. + Afterwards, it will load the grid from the data directory. So you'll need an + internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@mercury_relief**\_\ *res*\[_\ *reg*] to any grid processing function or plotting + method. *res* is the grid resolution (see below), and *reg* is the grid registration + type (**p** for pixel registration or **g** for gridline registration). + + The default color palette table (CPT) for this dataset is *@mercury_relief.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="@mercury_relief.cpt"``. + + Refer to :gmt-datasets:`mercury-relief.html` for more details about available + datasets, including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d``, ``m`` and ``s`` stand for arc-degrees, + arc-minutes and arc-seconds. Note that ``"56s"`` refers to a resolution of + 56.25 arc-seconds. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. Default is ``None``, which means + ``"gridline"`` for all resolutions except for ``"56s"`` which is ``"pixel"`` + only. + + Returns + ------- + grid + The Mercury relief grid. Coordinates are latitude and longitude in degrees. + Relief is in meters. + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e., + ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these + properties may be lost after specific grid operations (such as slicing) and will + need to be manually set before passing the grid to any PyGMT data processing or + plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed + explanations and workarounds. + + Examples + -------- + >>> from pygmt.datasets import load_mercury_relief + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_mercury_relief() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_mercury_relief(resolution="30m", registration="gridline") + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_mercury_relief( + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) + """ + grid = _load_remote_dataset( + name="mercury_relief", + prefix="mercury_relief", + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/moon_relief.html b/v0.14.0/_modules/pygmt/datasets/moon_relief.html new file mode 100644 index 00000000000..42d7aaa755a --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/moon_relief.html @@ -0,0 +1,327 @@ + + + + + + + + pygmt.datasets.moon_relief — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.moon_relief

+"""
+Function to download the Moon relief dataset from the GMT data server, and load as
+:class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_moon_relief"]
+
+
+
+[docs] +def load_moon_relief( + resolution: Literal[ + "01d", + "30m", + "20m", + "15m", + "10m", + "06m", + "05m", + "04m", + "03m", + "02m", + "01m", + "30s", + "15s", + "14s", + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel", None] = None, +) -> xr.DataArray: + r""" + Load the Moon relief dataset in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_moon_relief.jpg + :width: 80% + :align: center + + Moon relief dataset. + + The grids are downloaded to a user data directory (usually + ``~/.gmt/server/moon/moon_relief/``) the first time you invoke this function. + Afterwards, it will load the grid from the data directory. So you'll need an + internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@moon_relief**\_\ *res*\[_\ *reg*] to any grid processing function or plotting + method. *res* is the grid resolution (see below), and *reg* is the grid registration + type (**p** for pixel registration or **g** for gridline registration). + + The default color palette table (CPT) for this dataset is *@moon_relief.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="@moon_relief.cpt"``. + + Refer to :gmt-datasets:`moon-relief.html` for more details about available datasets, + including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d``, ``m`` and ``s`` stand for arc-degrees, + arc-minutes and arc-seconds. Note that ``"14s"`` refers to a resolution of + 14.0625 arc-seconds. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. Default is ``None``, which means + ``"gridline"`` for all resolutions except for ``"14s"`` which is ``"pixel"`` + only. + + Returns + ------- + grid + The Moon relief grid. Coordinates are latitude and longitude in degrees. Relief + is in meters. + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e., + ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these + properties may be lost after specific grid operations (such as slicing) and will + need to be manually set before passing the grid to any PyGMT data processing or + plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed + explanations and workarounds. + + Examples + -------- + >>> from pygmt.datasets import load_moon_relief + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_moon_relief() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_moon_relief(resolution="30m", registration="gridline") + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_moon_relief( + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) + """ + grid = _load_remote_dataset( + name="moon_relief", + prefix="moon_relief", + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/pluto_relief.html b/v0.14.0/_modules/pygmt/datasets/pluto_relief.html new file mode 100644 index 00000000000..9cbd8d28832 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/pluto_relief.html @@ -0,0 +1,325 @@ + + + + + + + + pygmt.datasets.pluto_relief — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.pluto_relief

+"""
+Function to download the Pluto relief dataset from the GMT data server, and load as
+:class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_pluto_relief"]
+
+
+
+[docs] +def load_pluto_relief( + resolution: Literal[ + "01d", + "30m", + "20m", + "15m", + "10m", + "06m", + "05m", + "04m", + "03m", + "02m", + "01m", + "52s", + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel", None] = None, +) -> xr.DataArray: + r""" + Load the Pluto relief dataset in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_pluto_relief.jpg + :width: 80% + :align: center + + Pluto relief dataset. + + The grids are downloaded to a user data directory (usually + ``~/.gmt/server/pluto/pluto_relief/``) the first time you invoke this function. + Afterwards, it will load the grid from the data directory. So you'll need an + internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@pluto_relief**\_\ *res*\[_\ *reg*] to any grid processing function or plotting + method. *res* is the grid resolution (see below), and *reg* is the grid registration + type (**p** for pixel registration or **g** for gridline registration). + + The default color palette table (CPT) for this dataset is *@pluto_relief.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="@pluto_relief.cpt"``. + + Refer to :gmt-datasets:`pluto-relief.html` for more details about available + datasets, including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d``, ``m`` and ``s`` stand for arc-degrees, + arc-minutes and arc-seconds. Note that ``"52s"`` refers to a resolution of + 52.0732883317 arc-seconds. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. Default is ``None``, which means + ``"gridline"`` for all resolutions except for ``"52s"`` which is ``"pixel"`` + only. + + Returns + ------- + grid + The Pluto relief grid. Coordinates are latitude and longitude in degrees. Relief + is in meters. + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e., + ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these + properties may be lost after specific grid operations (such as slicing) and will + need to be manually set before passing the grid to any PyGMT data processing or + plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed + explanations and workarounds. + + Examples + -------- + >>> from pygmt.datasets import load_pluto_relief + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_pluto_relief() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_pluto_relief(resolution="30m", registration="gridline") + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_pluto_relief( + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) + """ + grid = _load_remote_dataset( + name="pluto_relief", + prefix="pluto_relief", + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/samples.html b/v0.14.0/_modules/pygmt/datasets/samples.html new file mode 100644 index 00000000000..872bb557019 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/samples.html @@ -0,0 +1,563 @@ + + + + + + + + pygmt.datasets.samples — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.datasets.samples

+"""
+Functions to load sample data.
+"""
+
+from collections.abc import Callable
+from typing import Literal, NamedTuple
+
+import pandas as pd
+import xarray as xr
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.io import load_dataarray
+from pygmt.src import which
+
+
+def _load_japan_quakes() -> pd.DataFrame:
+    """
+    Load a table of earthquakes around Japan.
+
+    The data are from the NOAA NGDC database.
+
+    Returns
+    -------
+    data
+        The data table. The column names are "year", "month", "day", "latitude",
+        "longitude", "depth_km", and "magnitude" of the earthquakes.
+    """
+    fname = which("@tut_quakes.ngdc", download="c")
+    return pd.read_csv(
+        fname,
+        header=1,
+        sep=r"\s+",
+        names=[
+            "year",
+            "month",
+            "day",
+            "latitude",
+            "longitude",
+            "depth_km",
+            "magnitude",
+        ],
+    )
+
+
+def _load_ocean_ridge_points() -> pd.DataFrame:
+    """
+    Load a table of ocean ridge points for the entire world.
+
+    Returns
+    -------
+    data
+        The data table. The column names are "longitude" and "latitude".
+    """
+    fname = which("@ridge.txt", download="c")
+    return pd.read_csv(
+        fname,
+        sep=r"\s+",
+        names=["longitude", "latitude"],
+        skiprows=1,
+        comment=">",
+    )
+
+
+def _load_baja_california_bathymetry() -> pd.DataFrame:
+    """
+    Load a table of ship observations of bathymetry off Baja California.
+
+    Returns
+    -------
+    data
+        The data table. The column names are "longitude", "latitude", and "bathymetry".
+    """
+    fname = which("@tut_ship.xyz", download="c")
+    return pd.read_csv(
+        fname, sep="\t", header=None, names=["longitude", "latitude", "bathymetry"]
+    )
+
+
+def _load_usgs_quakes() -> pd.DataFrame:
+    """
+    Load a table of global earthquakes from the USGS.
+
+    Returns
+    -------
+    data
+        The data table. Use ``print(data.describe())`` to see the available columns.
+    """
+    fname = which("@usgs_quakes_22.txt", download="c")
+    return pd.read_csv(fname)
+
+
+def _load_fractures_compilation() -> pd.DataFrame:
+    """
+    Load a table of fracture lengths and azimuths as hypothetically digitized from
+    geological maps.
+
+    Returns
+    -------
+    data
+        The data table. The column names are "length" and "azimuth" of the fractures.
+    """
+    fname = which("@fractures_06.txt", download="c")
+    data = pd.read_csv(fname, header=None, sep=r"\s+", names=["azimuth", "length"])
+    return data[["length", "azimuth"]]
+
+
+def _load_hotspots() -> pd.DataFrame:
+    """
+    Load a table with the locations, names, and suggested symbol sizes of hotspots.
+
+    The data are from Mueller, Royer, and Lawver, 1993, Geology, vol. 21, pp. 275-278.
+    The main 5 hotspots used by Doubrovine et al. [2012] have symbol sizes twice the
+    size of all other hotspots.
+
+    Returns
+    -------
+    data
+        The data table. The column names are "longitude", "latitude", "symbol_size", and
+        "place_name".
+    """
+    fname = which("@hotspots.txt", download="c")
+    return pd.read_csv(
+        fname,
+        sep="\t",
+        skiprows=3,
+        names=["longitude", "latitude", "symbol_size", "place_name"],
+    )
+
+
+def _load_mars_shape() -> pd.DataFrame:
+    """
+    Load a table of data for the shape of Mars.
+
+    Data and information are from Smith, D. E., and M. T. Zuber (1996), The shape of
+    Mars and the topographic signature of the hemispheric dichotomy.
+
+    Returns
+    -------
+    data
+        The data table. The column names are "longitude", "latitude", and "radius_m".
+    """
+    fname = which("@mars370d.txt", download="c")
+    return pd.read_csv(
+        fname, sep="\t", header=None, names=["longitude", "latitude", "radius_m"]
+    )
+
+
+def _load_rock_sample_compositions() -> pd.DataFrame:
+    """
+    Load a table of rock sample compositions.
+
+    Returns
+    -------
+    data
+        The data table. The column names are "limestone", "water", "air", and
+        "permittivity".
+    """
+    fname = which("@ternary.txt", download="c")
+    return pd.read_csv(
+        fname,
+        sep=r"\s+",
+        header=None,
+        names=["limestone", "water", "air", "permittivity"],
+    )
+
+
+def _load_notre_dame_topography() -> pd.DataFrame:
+    """
+    Load a table of Notre Dame topography.
+
+    The data is Table 5.11 in Davis: Statistics and Data Analysis in Geology.
+
+    Returns
+    -------
+    data
+        The data table. The column names are "x", "y", and "z".
+    """
+    fname = which("@Table_5_11.txt", download="c")
+    return pd.read_csv(fname, sep=r"\s+", header=None, names=["x", "y", "z"])
+
+
+def _load_maunaloa_co2() -> pd.DataFrame:
+    """
+    Load a table of CO2 values from Mauna Loa.
+
+    Returns
+    -------
+    data
+        The data table. The column names are "date" and "co2_ppm".
+    """
+    fname = which("@MaunaLoa_CO2.txt", download="c")
+    return pd.read_csv(
+        fname, header=None, skiprows=1, sep=r"\s+", names=["date", "co2_ppm"]
+    )
+
+
+def _load_earth_relief_holes() -> xr.DataArray:
+    """
+    Load the earth relief grid with some holes.
+
+    Returns
+    -------
+    grid
+        The Earth relief grid. Coordinates are latitude and longitude in degrees. Relief
+        is in meters.
+    """
+    fname = which("@earth_relief_20m_holes.grd", download="c")
+    return load_dataarray(fname, engine="netcdf4")
+
+
+class GMTSampleData(NamedTuple):
+    """
+    Information of a sample dataset.
+
+    Attributes
+    ----------
+    func : callable
+        The function that loads the sample dataset.
+    description : str
+        The description of the sample dataset.
+    """
+
+    func: Callable
+    description: str
+
+
+datasets = {
+    "bathymetry": GMTSampleData(
+        func=_load_baja_california_bathymetry,
+        description="Table of ship bathymetric observations off Baja California",
+    ),
+    "earth_relief_holes": GMTSampleData(
+        func=_load_earth_relief_holes,
+        description="Regional 20 arc-minutes Earth relief grid with holes",
+    ),
+    "fractures": GMTSampleData(
+        func=_load_fractures_compilation,
+        description="Table of hypothetical fracture lengths and azimuths",
+    ),
+    "hotspots": GMTSampleData(
+        func=_load_hotspots,
+        description="Table of locations, names, and symbol sizes of hotpots from "
+        "Müller et al. (1993)",
+    ),
+    "japan_quakes": GMTSampleData(
+        func=_load_japan_quakes,
+        description="Table of earthquakes around Japan from the NOAA NGDC database",
+    ),
+    "mars_shape": GMTSampleData(
+        func=_load_mars_shape,
+        description="Table of topographic signature of the hemispheric dichotomy of "
+        "Mars from Smith and Zuber (1996)",
+    ),
+    "maunaloa_co2": GMTSampleData(
+        func=_load_maunaloa_co2,
+        description="Table of CO2 readings from Mauna Loa",
+    ),
+    "notre_dame_topography": GMTSampleData(
+        func=_load_notre_dame_topography,
+        description="Table 5.11 in Davis: Statistics and Data Analysis in Geology",
+    ),
+    "ocean_ridge_points": GMTSampleData(
+        func=_load_ocean_ridge_points,
+        description="Table of ocean ridge points for the entire world",
+    ),
+    "rock_compositions": GMTSampleData(
+        func=_load_rock_sample_compositions,
+        description="Table of rock sample compositions",
+    ),
+    "usgs_quakes": GMTSampleData(
+        func=_load_usgs_quakes,
+        description="Table of earthquakes from the USGS",
+    ),
+}
+
+
+
+[docs] +def list_sample_data() -> dict[str, str]: + """ + Report datasets available for tests and documentation examples. + + Returns + ------- + dict + Names and short descriptions of available sample datasets. + + See Also + -------- + load_sample_data : Load an example dataset from the GMT server. + """ + return {name: dataset.description for name, dataset in datasets.items()}
+ + + +
+[docs] +def load_sample_data( + name: Literal[ + "bathymetry", + "earth_relief_holes", + "fractures", + "hotspots", + "japan_quakes", + "mars_shape", + "maunaloa_co2", + "notre_dame_topography", + "ocean_ridge_points", + "rock_compositions", + "usgs_quakes", + ], +) -> pd.DataFrame | xr.DataArray: + """ + Load an example dataset from the GMT server. + + The data are downloaded to a cache directory (usually ``~/.gmt/cache``) the first + time you invoke this function. Afterwards, it will load the data from the cache. So + you'll need an internet connection the first time around. + + Parameters + ---------- + name + Name of the dataset to load. + + Returns + ------- + data + Sample dataset loaded as a :class:`pandas.DataFrame` for tabular data or + :class:`xarray.DataArray` for raster data. + + See Also + -------- + list_sample_data : Report datasets available for tests and documentation examples. + + Examples + -------- + >>> from pprint import pprint + >>> from pygmt.datasets import list_sample_data, load_sample_data + >>> # use list_sample_data to see the available datasets + >>> pprint(list_sample_data(), width=120) + {'bathymetry': 'Table of ship bathymetric observations off Baja California', + 'earth_relief_holes': 'Regional 20 arc-minutes Earth relief grid with holes', + 'fractures': 'Table of hypothetical fracture lengths and azimuths', + 'hotspots': 'Table of locations, names, and symbol sizes of hotpots from Müller et al. (1993)', + 'japan_quakes': 'Table of earthquakes around Japan from the NOAA NGDC database', + 'mars_shape': 'Table of topographic signature of the hemispheric dichotomy of Mars from Smith and Zuber (1996)', + 'maunaloa_co2': 'Table of CO2 readings from Mauna Loa', + 'notre_dame_topography': 'Table 5.11 in Davis: Statistics and Data Analysis in Geology', + 'ocean_ridge_points': 'Table of ocean ridge points for the entire world', + 'rock_compositions': 'Table of rock sample compositions', + 'usgs_quakes': 'Table of earthquakes from the USGS'} + >>> # load the sample bathymetry dataset + >>> data = load_sample_data("bathymetry") + """ # noqa: W505 + if name not in datasets: + msg = f"Invalid dataset name '{name}'." + raise GMTInvalidInput(msg) + return datasets[name].func()
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/tile_map.html b/v0.14.0/_modules/pygmt/datasets/tile_map.html new file mode 100644 index 00000000000..7e06938941b --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/tile_map.html @@ -0,0 +1,416 @@ + + + + + + + + pygmt.datasets.tile_map — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.datasets.tile_map

+"""
+Function to load raster tile maps from XYZ tile providers, and load as
+:class:`xarray.DataArray`.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+from packaging.version import Version
+
+try:
+    import contextily
+    from rasterio.crs import CRS
+    from xyzservices import TileProvider
+
+    _HAS_CONTEXTILY = True
+except ImportError:
+    CRS = None
+    TileProvider = None
+    _HAS_CONTEXTILY = False
+
+try:
+    import rioxarray  # noqa: F401
+
+    _HAS_RIOXARRAY = True
+except ImportError:
+    _HAS_RIOXARRAY = False
+
+import numpy as np
+import xarray as xr
+
+__doctest_requires__ = {("load_tile_map"): ["contextily"]}
+
+
+
+[docs] +def load_tile_map( + region: Sequence[float], + zoom: int | Literal["auto"] = "auto", + source: TileProvider | str | None = None, + lonlat: bool = True, + crs: str | CRS = "EPSG:3857", + wait: int = 0, + max_retries: int = 2, + zoom_adjust: int | None = None, +) -> xr.DataArray: + """ + Load a georeferenced raster tile map from XYZ tile providers. + + The tiles that compose the map are merged and georeferenced into an + :class:`xarray.DataArray` image with 3 bands (RGB). Note that the returned image is + in a Spherical Mercator (EPSG:3857) coordinate reference system (CRS) by default, + but can be customized using the ``crs`` parameter. + + Parameters + ---------- + region + The bounding box of the map in the form of a list [*xmin*, *xmax*, *ymin*, + *ymax*]. These coordinates should be in longitude/latitude if ``lonlat=True`` or + Spherical Mercator (EPSG:3857) if ``lonlat=False``. + zoom + Level of detail. Higher levels (e.g. ``22``) mean a zoom level closer to the + Earth's surface, with more tiles covering a smaller geographical area and thus + more detail. Lower levels (e.g. ``0``) mean a zoom level further from the + Earth's surface, with less tiles covering a larger geographical area and thus + less detail. Default is ``"auto"`` to automatically determine the zoom level + based on the bounding box region extent. + + .. note:: + The maximum possible zoom level may be smaller than ``22``, and depends on + what is supported by the chosen web tile provider source. + source + The tile source: web tile provider or path to a local file. Provide either: + + - A web tile provider in the form of a :class:`xyzservices.TileProvider` object. + See :doc:`Contextily providers <contextily:providers_deepdive>` for a list of + tile providers. Default is ``xyzservices.providers.OpenStreetMap.HOT``, i.e. + OpenStreetMap Humanitarian web tiles. + - A web tile provider in the form of a URL. The placeholders for the XYZ in the + URL need to be {x}, {y}, {z}, respectively. E.g. + ``https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png``. + - A local file path. The file is read with :doc:`rasterio <rasterio:index>` and + all bands are loaded into the basemap. See + :doc:`contextily:working_with_local_files`. + + .. important:: + Tiles are assumed to be in the Spherical Mercator projection (EPSG:3857). + lonlat + If ``False``, coordinates in ``region`` are assumed to be Spherical Mercator as + opposed to longitude/latitude. + crs + Coordinate reference system (CRS) of the returned :class:`xarray.DataArray` + image. Default is ``"EPSG:3857"`` (i.e., Spherical Mercator). The CRS can be in + either string or :class:`rasterio.crs.CRS` format. + wait + If the tile API is rate-limited, the number of seconds to wait between a failed + request and the next try. + max_retries + Total number of rejected requests allowed before contextily will stop trying to + fetch more tiles from a rate-limited API. + zoom_adjust + The amount to adjust a chosen zoom level if it is chosen automatically. Values + outside of -1 to 1 are not recommended as they can lead to slow execution. + + .. note:: + The ``zoom_adjust`` parameter requires ``contextily>=1.5.0``. + + Returns + ------- + raster + Georeferenced 3-D data array of RGB values. + + Raises + ------ + ImportError + If ``contextily`` is not installed or can't be imported. Follow the + :doc:`install instructions for contextily <contextily:index>`, (e.g. via + ``python -m pip install contextily``) before using this function. + + Examples + -------- + >>> import contextily + >>> from pygmt.datasets import load_tile_map + >>> raster = load_tile_map( + ... region=[-180.0, 180.0, -90.0, 0.0], # West, East, South, North + ... zoom=1, # less detailed zoom level + ... source=contextily.providers.OpenTopoMap, + ... lonlat=True, # bounding box coordinates are longitude/latitude + ... ) + >>> raster.sizes + Frozen({'band': 3, 'y': 256, 'x': 512}) + >>> raster.coords # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE + Coordinates: + * band (band) uint8... 1 2 3 + * y (y) float64... -7.081e-10 -7.858e+04 ... -1.996e+07 -2.004e+07 + * x (x) float64... -2.004e+07 -1.996e+07 ... 1.996e+07 2.004e+07 + spatial_ref int... 0 + >>> # CRS is set only if rioxarray is available + >>> if hasattr(raster, "rio"): + ... raster.rio.crs.to_string() + 'EPSG:3857' + """ + # The CRS of the source tile provider. If the source is a TileProvider object, use + # its crs attribute if available. Otherwise, default to EPSG:3857. + _source_crs = getattr(source, "crs", "EPSG:3857") + + if not _HAS_CONTEXTILY: + msg = ( + "Package `contextily` is required to be installed to use this function. " + "Please use `python -m pip install contextily` or " + "`mamba install -c conda-forge contextily` to install the package." + ) + raise ImportError(msg) + + if crs != _source_crs and not _HAS_RIOXARRAY: + msg = ( + f"Package `rioxarray` is required if CRS is not '{_source_crs}'. " + "Please use `python -m pip install rioxarray` or " + "`mamba install -c conda-forge rioxarray` to install the package." + ) + raise ImportError(msg) + + # Keyword arguments for contextily.bounds2img + contextily_kwargs = { + "zoom": zoom, + "source": source, + "ll": lonlat, + "wait": wait, + "max_retries": max_retries, + } + # TODO(contextily>=1.5.0): Remove the check for the 'zoom_adjust' parameter. + if zoom_adjust is not None: + if Version(contextily.__version__) < Version("1.5.0"): + msg = ( + "The `zoom_adjust` parameter requires `contextily>=1.5.0` to work. " + "Please upgrade contextily, or manually set the `zoom` level instead." + ) + raise ValueError(msg) + contextily_kwargs["zoom_adjust"] = zoom_adjust + + west, east, south, north = region + image, extent = contextily.bounds2img( + w=west, s=south, e=east, n=north, **contextily_kwargs + ) + + # Turn RGBA img from channel-last to channel-first and get 3-band RGB only + _image = image.transpose(2, 0, 1) # Change image from (H, W, C) to (C, H, W) + rgb_image = _image[0:3, :, :] # Get just RGB by dropping RGBA's alpha channel + + # Georeference RGB image into an xarray.DataArray + left, right, bottom, top = extent + dataarray = xr.DataArray( + data=rgb_image, + coords={ + "band": np.array(object=[1, 2, 3], dtype=np.uint8), # Red, Green, Blue + "y": np.linspace(start=top, stop=bottom, num=rgb_image.shape[1]), + "x": np.linspace(start=left, stop=right, num=rgb_image.shape[2]), + }, + dims=("band", "y", "x"), + ) + + # If rioxarray is installed, set the coordinate reference system. + if hasattr(dataarray, "rio"): + dataarray = dataarray.rio.write_crs(input_crs=_source_crs) + + # Reproject raster image from the source CRS to the specified CRS. + if crs != _source_crs: + dataarray = dataarray.rio.reproject(dst_crs=crs) + + return dataarray
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/datasets/venus_relief.html b/v0.14.0/_modules/pygmt/datasets/venus_relief.html new file mode 100644 index 00000000000..732cc1dcb59 --- /dev/null +++ b/v0.14.0/_modules/pygmt/datasets/venus_relief.html @@ -0,0 +1,311 @@ + + + + + + + + pygmt.datasets.venus_relief — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ +

Source code for pygmt.datasets.venus_relief

+"""
+Function to download the Venus relief dataset from the GMT data server, and load as
+:class:`xarray.DataArray`.
+
+The grids are available in various resolutions.
+"""
+
+from collections.abc import Sequence
+from typing import Literal
+
+import xarray as xr
+from pygmt.datasets.load_remote_dataset import _load_remote_dataset
+
+__doctest_skip__ = ["load_venus_relief"]
+
+
+
+[docs] +def load_venus_relief( + resolution: Literal[ + "01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m" + ] = "01d", + region: Sequence[float] | str | None = None, + registration: Literal["gridline", "pixel"] = "gridline", +) -> xr.DataArray: + r""" + Load the Venus relief dataset in various resolutions. + + .. figure:: https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_venus_relief.jpg + :width: 80% + :align: center + + Venus relief dataset. + + The grids are downloaded to a user data directory (usually + ``~/.gmt/server/venus/venus_relief/``) the first time you invoke this function. + Afterwards, it will load the grid from the data directory. So you'll need an + internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@venus_relief**\_\ *res*\[_\ *reg*] to any grid processing function or plotting + method. *res* is the grid resolution (see below), and *reg* is the grid registration + type (**p** for pixel registration or **g** for gridline registration). + + The default color palette table (CPT) for this dataset is *@venus_relief.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="@venus_relief.cpt"``. + + Refer to :gmt-datasets:`venus-relief.html` for more details about available + datasets, including version information and references. + + Parameters + ---------- + resolution + The grid resolution. The suffix ``d`` and ``m`` stand for arc-degrees and + arc-minutes. + region + The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*, + *ymin*, *ymax*] or an ISO country code. Required for grids with resolutions + higher than 5 arc-minutes (i.e., ``"05m"``). + registration + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. + + Returns + ------- + grid + The Venus relief grid. Coordinates are latitude and longitude in degrees. Relief + is in meters. + + Note + ---- + The registration and coordinate system type of the returned + :class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e., + ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these + properties may be lost after specific grid operations (such as slicing) and will + need to be manually set before passing the grid to any PyGMT data processing or + plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed + explanations and workarounds. + + Examples + -------- + >>> from pygmt.datasets import load_venus_relief + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_venus_relief() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_venus_relief(resolution="30m", registration="gridline") + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_venus_relief( + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) + """ + grid = _load_remote_dataset( + name="venus_relief", + prefix="venus_relief", + resolution=resolution, + region=region, + registration=registration, + ) + return grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/enums.html b/v0.14.0/_modules/pygmt/enums.html new file mode 100644 index 00000000000..e6c881c13a2 --- /dev/null +++ b/v0.14.0/_modules/pygmt/enums.html @@ -0,0 +1,268 @@ + + + + + + + + pygmt.enums — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.enums

+"""
+Enumerations for PyGMT.
+"""
+
+from enum import IntEnum
+
+
+class GridFormat(IntEnum):
+    """
+    Enum for the GMT grid format ID.
+
+    These enums are defined in 'gmt_grdio.h'.
+    """
+
+    UNKNOWN = 0  #: Unknown grid format
+    BF = 1  #: GMT native, C-binary format (32-bit float)
+    BS = 2  #: GMT native, C-binary format (16-bit integer)
+    RB = 3  #: SUN rasterfile format (8-bit standard)
+    BB = 4  #: GMT native, C-binary format (8-bit integer)
+    BM = 5  #: GMT native, C-binary format (bit-mask)
+    SF = 6  #: Golden Software Surfer format 6 (32-bit float)
+    CB = 7  #: GMT netCDF format (8-bit integer, deprecated)
+    CS = 8  #: GMT netCDF format (16-bit integer, deprecated)
+    CI = 9  #: GMT netCDF format (32-bit integer, deprecated)
+    CF = 10  #: GMT netCDF format (32-bit float, deprecated)
+    CD = 11  #: GMT netCDF format (64-bit float, deprecated)
+    RF = 12  #: GEODAS grid format GRD98 (NGDC)
+    BI = 13  #: GMT native, C-binary format (32-bit integer)
+    BD = 14  #: GMT native, C-binary format (64-bit float)
+    NB = 15  #: GMT netCDF format (8-bit integer)
+    NS = 16  #: GMT netCDF format (16-bit integer)
+    NI = 17  #: GMT netCDF format (32-bit integer)
+    NF = 18  #: GMT netCDF format (32-bit float)
+    ND = 19  #: GMT netCDF format (64-bit float)
+    SD = 20  #: Golden Software Surfer format 7 (64-bit float, read-only)
+    AF = 21  #: Atlantic Geoscience Center format AGC (32-bit float)
+    GD = 22  #: Import through GDAL
+    EI = 23  #: ESRI Arc/Info ASCII Grid Interchange format (ASCII integer)
+    EF = 24  #: ESRI Arc/Info ASCII Grid Interchange format (ASCII float)
+
+
+
+[docs] +class GridRegistration(IntEnum): + """ + Enum for the grid registration. + """ + + GRIDLINE = 0 #: Gridline registration + PIXEL = 1 #: Pixel registration
+ + + +
+[docs] +class GridType(IntEnum): + """ + Enum for the grid type. + """ + + CARTESIAN = 0 #: Cartesian grid + GEOGRAPHIC = 1 #: Geographic grid
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/exceptions.html b/v0.14.0/_modules/pygmt/exceptions.html new file mode 100644 index 00000000000..adc7883d2ee --- /dev/null +++ b/v0.14.0/_modules/pygmt/exceptions.html @@ -0,0 +1,279 @@ + + + + + + + + pygmt.exceptions — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.exceptions

+"""
+Custom exception types used throughout the library.
+
+All exceptions derive from GMTError.
+"""
+
+
+
+[docs] +class GMTError(Exception): + """ + Base class for all GMT related errors. + """
+ + + +
+[docs] +class GMTOSError(GMTError): + """ + Unsupported operating system. + """
+ + + +
+[docs] +class GMTCLibError(GMTError): + """ + Error encountered when running a function from the GMT shared library. + """
+ + + +
+[docs] +class GMTCLibNotFoundError(GMTCLibError): + """ + Could not find the GMT shared library. + """
+ + + +
+[docs] +class GMTCLibNoSessionError(GMTCLibError): + """ + Tried to access GMT API without a currently open GMT session. + """
+ + + +
+[docs] +class GMTInvalidInput(GMTError): # noqa: N818 + """ + Raised when the input of a function/method is invalid. + """
+ + + +
+[docs] +class GMTVersionError(GMTError): + """ + Raised when an incompatible version of GMT is being used. + """
+ + + +class GMTImageComparisonFailure(AssertionError): # noqa: N818 + """ + Raised when a comparison between two images fails. + """ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/figure.html b/v0.14.0/_modules/pygmt/figure.html new file mode 100644 index 00000000000..65a8e98d81d --- /dev/null +++ b/v0.14.0/_modules/pygmt/figure.html @@ -0,0 +1,708 @@ + + + + + + + + pygmt.figure — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.figure

+"""
+Define the Figure class that handles all plotting.
+"""
+
+import base64
+import os
+from pathlib import Path, PurePath
+from tempfile import TemporaryDirectory
+from typing import Literal, overload
+
+try:
+    import IPython
+
+    _HAS_IPYTHON = True
+except ImportError:
+    _HAS_IPYTHON = False
+
+import numpy as np
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import launch_external_viewer, unique_name
+
+
+def _get_default_display_method() -> Literal["external", "notebook", "none"]:
+    """
+    Get the default method to display preview images.
+
+    The function checks the current environment and determines the most suitable method
+    to display preview images when calling :meth:`pygmt.Figure.show`. Valid display
+    methods are:
+
+    - ``"external"``: External PDF preview using the default PDF viewer
+    - ``"notebook"``: Inline PNG preview in the current notebook
+    - ``"none"``: Disable image preview
+
+    The default display method is ``"notebook"`` in the Jupyter notebook environment,
+    and ``"external"`` in other cases.
+
+    Setting environment variable :term:`PYGMT_USE_EXTERNAL_DISPLAY` to ``"false"`` can
+    disable image preview in external viewers. It's useful when running the tests and
+    building the documentation to avoid popping up windows.
+
+    Returns
+    -------
+    method
+        The default display method.
+    """
+    # Check if an IPython kernel is running.
+    if _HAS_IPYTHON and (ipy := IPython.get_ipython()) and "IPKernelApp" in ipy.config:
+        return "notebook"
+    # Check if the environment variable PYGMT_USE_EXTERNAL_DISPLAY is set to "false".
+    if os.environ.get("PYGMT_USE_EXTERNAL_DISPLAY", "true").lower() == "false":
+        return "none"
+    # Fallback to using the external viewer.
+    return "external"
+
+
+# A registry of all figures that have had "show" called in this session.
+# This is needed for the sphinx-gallery scraper in pygmt/sphinx_gallery.py
+SHOWED_FIGURES = []
+# Configurations for figure display.
+SHOW_CONFIG = {
+    "method": _get_default_display_method(),  # The image preview display method.
+}
+
+
+
+[docs] +class Figure: + """ + A GMT figure to handle all plotting. + + Use the plotting methods of this class to add elements to the figure. You can + preview the figure using :meth:`pygmt.Figure.show` and save the figure to a file + using :meth:`pygmt.Figure.savefig`. + + Examples + -------- + + >>> import pygmt + >>> fig = pygmt.Figure() + >>> fig.basemap(region=[0, 360, -90, 90], projection="W15c", frame=True) + >>> fig.savefig("my-figure.png") + >>> # Make sure the figure file is generated and clean it up + >>> from pathlib import Path + >>> assert Path("my-figure.png").exists() + >>> Path("my-figure.png").unlink() + + The plot region can be specified through ISO country codes (for example, ``"JP"`` + for Japan): + + >>> import pygmt + >>> fig = pygmt.Figure() + >>> fig.basemap(region="JP", projection="M7c", frame=True) + >>> # The fig.region attribute shows the WESN bounding box for the figure + >>> print(", ".join(f"{i:.2f}" for i in fig.region)) + 122.94, 145.82, 20.53, 45.52 + """ + + def __init__(self): + self._name = unique_name() + self._preview_dir = TemporaryDirectory(prefix=f"{self._name}-preview-") + self._activate_figure() + + def __del__(self): + """ + Clean up the temporary directory that stores the previews. + """ + if hasattr(self, "_preview_dir"): + self._preview_dir.cleanup() + + def _activate_figure(self): + """ + Start and/or activate the current figure. + + All plotting commands run afterward will append to this figure. + """ + fmt = "-" # Passing format "-" tells pygmt.end to not produce any files. + with Session() as lib: + lib.call_module(module="figure", args=[self._name, fmt]) + + def _preprocess(self, **kwargs): + """ + Call the ``figure`` module before each plotting command to ensure we're plotting + to this particular figure. + """ + self._activate_figure() + return kwargs + + @property + def region(self) -> np.ndarray: + """ + The geographic WESN bounding box for the current figure. + """ + self._activate_figure() + with Session() as lib: + wesn = lib.extract_region() + return wesn + +
+[docs] + def savefig( + self, + fname: str | PurePath, + transparent: bool = False, + crop: bool = True, + anti_alias: bool = True, + show: bool = False, + worldfile: bool = False, + **kwargs, + ): + """ + Save the figure to an image file. + + Supported image formats and their extensions: + + **Raster image formats** + + - BMP (``.bmp``) + - JPEG (``.jpg`` or ``.jpeg``) + - GeoTIFF (``.tiff``) + - PNG (``.png``) + - PPM (``.ppm``) + - TIFF (``.tif``) + + **Vector image formats** + + - EPS (``.eps``) + - PDF (``.pdf``) + + Besides the above formats, you can also save the figure to a KML file + (``.kml``), with a companion PNG file generated automatically. The KML file can + be viewed in Google Earth. + + You can pass in any keyword arguments that :meth:`pygmt.Figure.psconvert` + accepts. + + Parameters + ---------- + fname + The desired figure file name, including the extension. See the list of + supported formats and their extensions above. + transparent + Use a transparent background for the figure. Only valid for PNG format and + the PNG file asscoiated with KML format. + crop + Crop the figure canvas (page) to the plot area. + anti_alias + Use anti-aliasing when creating raster images. Ignored if creating vector + images. More specifically, it passes the arguments ``"t2"`` and ``"g2"`` to + the ``anti_aliasing`` parameter of :meth:`pygmt.Figure.psconvert`. + show + Display the figure in an external viewer. + worldfile + Create a companion `world file <https://en.wikipedia.org/wiki/World_file>`__ + for the figure. The world file will have the same name as the figure file + but with different extension (e.g., ``.tfw`` for ``.tif``). See + https://en.wikipedia.org/wiki/World_file#Filename_extension for the + convention of world file extensions. This parameter only works for raster + image formats (except GeoTIFF). + **kwargs : dict + Additional keyword arguments passed to :meth:`pygmt.Figure.psconvert`. Valid + parameters are ``dpi``, ``gs_path``, ``gs_option``, ``resize``, + ``bb_style``, and ``verbose``. + """ + # All supported formats + fmts = { + "bmp": "b", + "eps": "e", + "jpg": "j", + "kml": "G" if transparent is True else "g", + "pdf": "f", + "png": "G" if transparent is True else "g", + "ppm": "m", + "tif": "t", + "tiff": None, # GeoTIFF doesn't need the -T option + } + + fname = Path(fname) + prefix, suffix = fname.with_suffix("").as_posix(), fname.suffix + ext = suffix[1:].lower() # Remove the . and normalize to lowercase + + match ext: + case "jpeg": # Alias jpeg to jpg + ext = "jpg" + case "tiff": # GeoTIFF + kwargs["W"] = "+g" + case "kml": # KML + kwargs["W"] = "+k" + case "ps": + msg = "Extension '.ps' is not supported. Use '.eps' or '.pdf' instead." + raise GMTInvalidInput(msg) + case ext if ext not in fmts: + msg = f"Unknown extension '.{ext}'." + raise GMTInvalidInput(msg) + + if transparent and ext not in {"kml", "png"}: + msg = f"Transparency unavailable for '{ext}', only for png and kml." + raise GMTInvalidInput(msg) + if anti_alias: + kwargs["Qt"] = 2 + kwargs["Qg"] = 2 + + if worldfile: + if ext in {"eps", "kml", "pdf", "tiff"}: + msg = f"Saving a world file is not supported for '{ext}' format." + raise GMTInvalidInput(msg) + kwargs["W"] = True + + # pytest-mpl v0.17.0 added the "metadata" parameter to Figure.savefig, which is + # not recognized. So remove it before calling Figure.psconvert. + kwargs.pop("metadata", None) + self.psconvert(prefix=prefix, fmt=fmts[ext], crop=crop, **kwargs) + + # TODO(GMT>=6.5.0): Remove the workaround for upstream bug in GMT<6.5.0. + # Remove the .pgw world file if exists. Not necessary after GMT 6.5.0. + # See upstream fix https://github.com/GenericMappingTools/gmt/pull/7865 + if ext == "tiff": + fname.with_suffix(".pgw").unlink(missing_ok=True) + + # Rename if file extension doesn't match the input file suffix. + if ext != suffix[1:]: + fname.with_suffix("." + ext).rename(fname) + + if show: + launch_external_viewer(str(fname))
+ + +
+[docs] + def show( + self, + method: Literal["external", "notebook", "none", None] = None, + dpi: int = 300, + width: int = 500, + waiting: float = 0.5, + **kwargs, + ): + """ + Display a preview of the figure. + + Inserts the preview in the Jupyter notebook output if available, otherwise opens + it in the default viewer for your operating system (falls back to the default + web browser). + + Use :func:`pygmt.set_display` to select the default display method + (``"notebook"``, ``"external"``, ``"none"`` or ``None``). + + The ``method`` parameter allows to override the default display method for the + current figure. The parameters ``dpi`` and ``width`` can be used to control the + resolution and dimension of the figure in the notebook. + + The external viewer can be disabled by setting the environment variable + :term:`PYGMT_USE_EXTERNAL_DISPLAY` to ``"false"``. This is useful when running + tests and building the documentation to avoid popping up windows. + + The external viewer does not block the current process, thus it's necessary to + suspend the execution of the current process for a short while after launching + the external viewer, so that the preview image won't be deleted before the + external viewer tries to open it. Set the ``waiting`` parameter to a larger + number if the image viewer on your computer is slow to open the figure. + + Parameters + ---------- + method + The method to display the current image preview. Choose from: + + - ``"external"``: External PDF preview using the default PDF viewer + - ``"notebook"``: Inline PNG preview in the current notebook + - ``"none"``: Disable image preview + - ``None``: Reset to the default display method + + The default display method is ``"external"`` in Python consoles and + ``"notebook"`` in Jupyter notebooks, but can be changed by + :func:`pygmt.set_display`. + + dpi + The image resolution (dots per inch) in Jupyter notebooks. + width + The image width (in pixels) in Jupyter notebooks. + waiting + Suspend the execution of the current process for a given number of seconds + after launching an external viewer. Only works if ``method="external"``. + **kwargs : dict + Additional keyword arguments passed to :meth:`pygmt.Figure.psconvert`. Valid + parameters are ``gs_path``, ``gs_option``, ``resize``, ``bb_style``, and + ``verbose``. + """ + # Module level variable to know which figures had their show method called. + # Needed for the sphinx-gallery scraper. + SHOWED_FIGURES.append(self) + + # Set the display method + if method is None: + method = SHOW_CONFIG["method"] + + match method: + case "notebook": + if not _HAS_IPYTHON: + msg = ( + "Notebook display is selected, but IPython is not available. " + "Make sure you have IPython installed, " + "or run the script in a Jupyter notebook." + ) + raise ImportError(msg) + png = self._preview( + fmt="png", dpi=dpi, anti_alias=True, as_bytes=True, **kwargs + ) + IPython.display.display(IPython.display.Image(data=png, width=width)) + case "external": + pdf = self._preview( + fmt="pdf", dpi=dpi, anti_alias=False, as_bytes=False, **kwargs + ) + launch_external_viewer(pdf, waiting=waiting) + case "none": + pass # Do nothing + case _: + msg = ( + f"Invalid display method '{method}'. " + "Valid values are 'external', 'notebook', 'none' or None." + ) + raise GMTInvalidInput(msg)
+ + + @overload + def _preview( + self, fmt: str, dpi: int, as_bytes: Literal[True] = True, **kwargs + ) -> bytes: ... + @overload + def _preview( + self, fmt: str, dpi: int, as_bytes: Literal[False] = False, **kwargs + ) -> str: ... + def _preview(self, fmt: str, dpi: int, as_bytes: bool = False, **kwargs): + """ + Grab a preview of the figure. + + Parameters + ---------- + fmt + The image format. Can be any extension that :meth:`pygmt.Figure.savefig` + recognizes. + dpi + The image resolution (dots per inch). + as_bytes + If ``True``, will load the binary contents of the image as a bytes object, + and return that instead of the file name. + + Returns + ------- + preview + If ``as_bytes = False``, this is the file name of the preview image file. + Otherwise, it is the file content loaded as a bytes object. + """ + fname = Path(self._preview_dir.name) / f"{self._name}.{fmt}" + self.savefig(fname, dpi=dpi, **kwargs) + if as_bytes: + return fname.read_bytes() + return fname + + def _repr_png_(self) -> bytes: + """ + Show a PNG preview if the object is returned in an interactive shell. + + For the Jupyter notebook or IPython Qt console. + """ + png = self._preview(fmt="png", dpi=70, anti_alias=True, as_bytes=True) + return png + + def _repr_html_(self) -> str: + """ + Show the PNG image embedded in HTML with a controlled width. + + Looks better than the raw PNG. + """ + raw_png = self._preview(fmt="png", dpi=300, anti_alias=True, as_bytes=True) + base64_png = base64.encodebytes(raw_png) + html = '<img src="data:image/png;base64,{image}" width="{width}px">' + return html.format(image=base64_png.decode("utf-8"), width=500) + + from pygmt.src import ( # type: ignore[misc] + basemap, + coast, + colorbar, + contour, + grdcontour, + grdimage, + grdview, + histogram, + hlines, + image, + inset, + legend, + logo, + meca, + plot, + plot3d, + psconvert, + rose, + set_panel, + shift_origin, + solar, + subplot, + ternary, + text, + tilemap, + timestamp, + velo, + vlines, + wiggle, + )
+ + + +
+[docs] +def set_display(method: Literal["external", "notebook", "none", None] = None): + """ + Set the display method when calling :meth:`pygmt.Figure.show`. + + Parameters + ---------- + method + The method to display an image preview. Choose from: + + - ``"external"``: External PDF preview using the default PDF viewer + - ``"notebook"``: Inline PNG preview in the current notebook + - ``"none"``: Disable image preview + - ``None``: Reset to the default display method, which is either ``"external"`` + in Python consoles or ``"notebook"`` in Jupyter notebooks. + + Examples + -------- + Let's assume that you're using a Jupyter Notebook: + + >>> import pygmt + >>> fig = pygmt.Figure() + >>> fig.basemap(region=[0, 10, 0, 10], projection="X10c/5c", frame=True) + >>> fig.show() # Will display a PNG image in the current notebook + >>> + >>> # Set the display method to "external" + >>> pygmt.set_display(method="external") # doctest: +SKIP + >>> fig.show() # Will display a PDF image using the default PDF viewer + >>> + >>> # Set the display method to "none" + >>> pygmt.set_display(method="none") + >>> fig.show() # Will not show any image + >>> + >>> # Reset to the default display method + >>> pygmt.set_display(method=None) + >>> fig.show() # Again, will show a PNG image in the current notebook + """ + match method: + case "external" | "notebook" | "none": + SHOW_CONFIG["method"] = method + case None: + SHOW_CONFIG["method"] = _get_default_display_method() + case _: + msg = ( + f"Invalid display method '{method}'. " + "Valid values are 'external', 'notebook', 'none' or None." + ) + raise GMTInvalidInput(msg)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/io.html b/v0.14.0/_modules/pygmt/io.html new file mode 100644 index 00000000000..2a485bceddf --- /dev/null +++ b/v0.14.0/_modules/pygmt/io.html @@ -0,0 +1,256 @@ + + + + + + + + pygmt.io — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.io

+"""
+PyGMT input/output (I/O) utilities.
+"""
+
+import xarray as xr
+
+
+
+[docs] +def load_dataarray(filename_or_obj, **kwargs): + """ + Open, load into memory, and close a DataArray from a file or file-like object + containing a single data variable. + + This is a thin wrapper around :py:func:`xarray.open_dataarray`. It differs + from :py:func:`xarray.open_dataarray` in that it loads the DataArray into + memory, gets GMT specific metadata about the grid via + :py:meth:`GMTDataArrayAccessor`, closes the file, and returns the + DataArray. In contrast, :py:func:`xarray.open_dataarray` keeps the file + handle open and lazy loads its contents. All parameters are passed directly + to :py:func:`xarray.open_dataarray`. See that documentation for further + details. + + Parameters + ---------- + filename_or_obj : str or pathlib.Path or file-like or DataStore + Strings and Path objects are interpreted as a path to a netCDF file + or an OpenDAP URL and opened with python-netCDF4, unless the filename + ends with .gz, in which case the file is gunzipped and opened with + scipy.io.netcdf (only netCDF3 supported). Byte-strings or file-like + objects are opened by scipy.io.netcdf (netCDF3) or h5py (netCDF4/HDF). + + Returns + ------- + datarray : xarray.DataArray + The newly created DataArray. + + See Also + -------- + xarray.open_dataarray + """ + if "cache" in kwargs: + msg = "'cache' has no effect in this context." + raise TypeError(msg) + + with xr.open_dataarray(filename_or_obj, **kwargs) as dataarray: + result = dataarray.load() + _ = result.gmt # load GMTDataArray accessor information + + return result
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/basemap.html b/v0.14.0/_modules/pygmt/src/basemap.html new file mode 100644 index 00000000000..1e2c19a8063 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/basemap.html @@ -0,0 +1,292 @@ + + + + + + + + pygmt.src.basemap — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.basemap

+"""
+basemap - Plot base maps and frames for the figure.
+"""
+
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+
+@fmt_docstring
+@use_alias(
+    R="region",
+    J="projection",
+    Jz="zscale",
+    JZ="zsize",
+    B="frame",
+    L="map_scale",
+    F="box",
+    Td="rose",
+    Tm="compass",
+    V="verbose",
+    c="panel",
+    f="coltypes",
+    p="perspective",
+    t="transparency",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
+def basemap(self, **kwargs):
+    r"""
+    Plot base maps and frames for the figure.
+
+    Creates a basic or fancy basemap with axes, fill, and titles. Several
+    map projections are available, and the user may specify separate
+    tick-mark intervals for boundary annotation, ticking, and [optionally]
+    gridlines. A simple map scale or directional rose may also be plotted.
+
+    At least one of the parameters ``frame``, ``map_scale``, ``rose``, or
+    ``compass`` must be specified if not in subplot mode.
+
+    Full option list at :gmt-docs:`basemap.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    {projection}
+    zscale/zsize : float or str
+        Set z-axis scaling or z-axis size.
+    {region}
+        *Required if this is the first plot command.*
+    {frame}
+    map_scale : str
+        [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
+        **+w**\ *length*.
+        Draw a simple map scale centered on the reference point specified.
+    box : bool or str
+        [**+c**\ *clearances*][**+g**\ *fill*][**+i**\ [[*gap*/]\ *pen*]]\
+        [**+p**\ [*pen*]][**+r**\ [*radius*]][**+s**\ [[*dx*/*dy*/][*shade*]]].
+        If set to ``True``, draw a rectangular border around the
+        map scale or rose. Alternatively, specify a different pen with
+        **+p**\ *pen*. Add **+g**\ *fill* to fill the scale panel [Default is
+        no fill]. Append **+c**\ *clearance* where *clearance* is either gap,
+        xgap/ygap, or lgap/rgap/bgap/tgap where these items are uniform,
+        separate in x- and y-direction, or individual side spacings between
+        scale and border. Append **+i** to draw a secondary, inner border as
+        well. We use a uniform gap between borders of 2p and the
+        :gmt-term:`MAP_DEFAULTS_PEN` unless other values are specified. Append
+        **+r** to draw rounded rectangular borders instead, with a 6p corner
+        radius. You can override this radius by appending another value.
+        Finally, append **+s** to draw an offset background shaded region.
+        Here, *dx/dy* indicates the shift relative to the foreground frame
+        [Default is ``"4p/-4p"``] and shade sets the fill style to use for
+        shading [Default is ``"gray50"``].
+    rose : str
+        Draw a map directional rose on the map at the location defined by
+        the reference and anchor points.
+    compass : str
+        Draw a map magnetic rose on the map at the location defined by the
+        reference and anchor points.
+    {verbose}
+    {panel}
+    {coltypes}
+    {perspective}
+    {transparency}
+    """
+    kwargs = self._preprocess(**kwargs)
+    with Session() as lib:
+        lib.call_module(module="basemap", args=build_arg_list(kwargs))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/binstats.html b/v0.14.0/_modules/pygmt/src/binstats.html new file mode 100644 index 00000000000..d1d3375f248 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/binstats.html @@ -0,0 +1,321 @@ + + + + + + + + pygmt.src.binstats — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.binstats

+"""
+binstats - Bin spatial data and determine statistics per bin
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+
+
+[docs] +@fmt_docstring +@use_alias( + C="statistic", + E="empty", + I="spacing", + N="normalize", + R="region", + S="search_radius", + V="verbose", + W="weight", + a="aspatial", + b="binary", + h="header", + i="incols", + r="registration", +) +@kwargs_to_strings(I="sequence", R="sequence", i="sequence_comma") +def binstats(data, outgrid: str | None = None, **kwargs) -> xr.DataArray | None: + r""" + Bin spatial data and determine statistics per bin. + + Reads arbitrarily located (x,y[,z][,w]) points + (2-4 columns) from ``data`` and for each + node in the specified grid layout determines which points are + within the given radius. These points are then used in the + calculation of the specified statistic. The results may be + presented as is or may be normalized by the circle area to + perhaps give density estimates. + + Full option list at :gmt-docs:`gmtbinstats.html` + + {aliases} + + Parameters + ---------- + data : str, {table-like} + A file name of an ASCII data table or a 2-D {table-classes}. + {outgrid} + statistic : str + **a**\|\ **d**\|\ **g**\|\ **i**\|\ **l**\|\ **L**\|\ **m**\|\ **n**\ + \|\ **o**\|\ **p**\|\ **q**\ [*quant*]\|\ **r**\|\ **s**\|\ **u**\ + \|\ **U**\|\ **z**. + Choose the statistic that will be computed per node based on the + points that are within *radius* distance of the node. Select one of: + + - **a**: mean (average) + - **d**: median absolute deviation (MAD) + - **g**: full (max-min) range + - **i**: 25-75% interquartile range + - **l**: minimum (low) + - **L**: minimum of positive values only + - **m**: median + - **n**: number of values + - **o**: LMS scale + - **p**: mode (maximum likelihood) + - **q**: selected quantile (append desired quantile in 0-100% range [50]) + - **r**: root mean square (RMS) + - **s**: standard deviation + - **u**: maximum (upper) + - **U**: maximum of negative values only + - **z**: sum + empty : float + Set the value assigned to empty nodes [Default is NaN]. + normalize : bool + Normalize the resulting grid values by the area represented by the + search *radius* [Default is no normalization]. + search_radius : float or str + Set the *search_radius* that determines which data points are + considered close to a node. Append the distance unit. + Not compatible with ``tiling``. + weight : str + Input data have an extra column containing observation point weight. + If weights are given then weighted statistical quantities will be + computed while the count will be the sum of the weights instead of + number of points. If the weights are actually uncertainties + (one sigma) then append **+s** and weight = 1/sigma. + {spacing} + {region} + {verbose} + {aspatial} + {binary} + {header} + {incols} + {registration} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - ``None`` if ``outgrid`` is set (grid output will be stored in the file set by + ``outgrid``) + """ + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="vector", data=data) as vintbl, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="binstats", args=build_arg_list(kwargs, infile=vintbl) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/blockm.html b/v0.14.0/_modules/pygmt/src/blockm.html new file mode 100644 index 00000000000..a17a3c5fca2 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/blockm.html @@ -0,0 +1,581 @@ + + + + + + + + pygmt.src.blockm — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.blockm

+"""
+blockm - Block average (x, y, z) data tables by mean, median, or mode estimation.
+"""
+
+from typing import Literal
+
+import numpy as np
+import pandas as pd
+from pygmt.clib import Session
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+    validate_output_table_type,
+)
+
+__doctest_skip__ = ["blockmean", "blockmedian", "blockmode"]
+
+
+def _blockm(
+    block_method, data, x, y, z, output_type, outfile, **kwargs
+) -> pd.DataFrame | np.ndarray | None:
+    r"""
+    Block average (x, y, z) data tables by mean, median, or mode estimation.
+
+    Reads arbitrarily located (x, y, z) triplets [or optionally weighted
+    quadruplets (x, y, z, w)] from a table and writes to the output a mean,
+    median, or mode (depending on ``block_method``) position and value for
+    every non-empty block in a grid region defined by the ``region`` and
+    ``spacing`` parameters.
+
+    Parameters
+    ----------
+    block_method : str
+        Name of the GMT module to call. Must be "blockmean", "blockmedian" or
+        "blockmode".
+
+    Returns
+    -------
+    ret
+        Return type depends on ``outfile`` and ``output_type``:
+
+        - ``None`` if ``outfile`` is set (output will be stored in file set by
+          ``outfile``)
+        - :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile`` is not set
+          (depends on ``output_type``)
+    """
+    output_type = validate_output_table_type(output_type, outfile=outfile)
+
+    column_names = None
+    if output_type == "pandas" and isinstance(data, pd.DataFrame):
+        column_names = data.columns.to_list()
+
+    with Session() as lib:
+        with (
+            lib.virtualfile_in(
+                check_kind="vector", data=data, x=x, y=y, z=z, required_z=True
+            ) as vintbl,
+            lib.virtualfile_out(kind="dataset", fname=outfile) as vouttbl,
+        ):
+            lib.call_module(
+                module=block_method,
+                args=build_arg_list(kwargs, infile=vintbl, outfile=vouttbl),
+            )
+            return lib.virtualfile_to_dataset(
+                vfname=vouttbl, output_type=output_type, column_names=column_names
+            )
+
+
+
+[docs] +@fmt_docstring +@use_alias( + I="spacing", + R="region", + S="summary", + V="verbose", + a="aspatial", + b="binary", + d="nodata", + e="find", + f="coltypes", + h="header", + i="incols", + o="outcols", + r="registration", + w="wrap", +) +@kwargs_to_strings(I="sequence", R="sequence", i="sequence_comma", o="sequence_comma") +def blockmean( + data=None, + x=None, + y=None, + z=None, + output_type: Literal["pandas", "numpy", "file"] = "pandas", + outfile: str | None = None, + **kwargs, +) -> pd.DataFrame | np.ndarray | None: + r""" + Block average (x, y, z) data tables by mean estimation. + + Reads arbitrarily located (x, y, z) triplets [or optionally weighted + quadruplets (x, y, z, w)] and writes to the output a mean position and + value for every non-empty block in a grid region defined by the ``region`` + and ``spacing`` parameters. + + Takes a matrix, (x, y, z) triplets, or a file name as input. + + Must provide either ``data`` or ``x``, ``y``, and ``z``. + + Full option list at :gmt-docs:`blockmean.html` + + {aliases} + + Parameters + ---------- + data : str, {table-like} + Pass in (x, y, z) or (longitude, latitude, elevation) values by + providing a file name to an ASCII data table, a 2-D + {table-classes}. + x/y/z : 1-D arrays + Arrays of x and y coordinates and values z of the data points. + {output_type} + {outfile} + {spacing} + summary : str + [**m**\|\ **n**\|\ **s**\|\ **w**]. + Type of summary values calculated by blockmean. + + - **m**: reports mean value [Default] + - **n**: report the number of input points inside each block + - **s**: report the sum of all z-values inside a block + - **w**: report the sum of weights + {region} + {verbose} + {aspatial} + {binary} + {nodata} + {find} + {incols} + {coltypes} + {header} + {outcols} + {registration} + {wrap} + + Returns + ------- + ret + Return type depends on ``outfile`` and ``output_type``: + + - ``None`` if ``outfile`` is set (output will be stored in file set by + ``outfile``) + - :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile`` is not set + (depends on ``output_type``) + + Example + ------- + >>> import pygmt + >>> # Load a table of ship observations of bathymetry off Baja California + >>> data = pygmt.datasets.load_sample_data(name="bathymetry") + >>> # Calculate block mean values within 5 by 5 arc-minute bins + >>> data_bmean = pygmt.blockmean(data=data, region=[245, 255, 20, 30], spacing="5m") + """ + return _blockm( + block_method="blockmean", + data=data, + x=x, + y=y, + z=z, + output_type=output_type, + outfile=outfile, + **kwargs, + )
+ + + +
+[docs] +@fmt_docstring +@use_alias( + I="spacing", + R="region", + V="verbose", + a="aspatial", + b="binary", + d="nodata", + e="find", + f="coltypes", + h="header", + i="incols", + o="outcols", + r="registration", + w="wrap", +) +@kwargs_to_strings(I="sequence", R="sequence", i="sequence_comma", o="sequence_comma") +def blockmedian( + data=None, + x=None, + y=None, + z=None, + output_type: Literal["pandas", "numpy", "file"] = "pandas", + outfile: str | None = None, + **kwargs, +) -> pd.DataFrame | np.ndarray | None: + r""" + Block average (x, y, z) data tables by median estimation. + + Reads arbitrarily located (x, y, z) triplets [or optionally weighted + quadruplets (x, y, z, w)] and writes to the output a median position and + value for every non-empty block in a grid region defined by the ``region`` + and ``spacing`` parameters. + + Takes a matrix, (x, y, z) triplets, or a file name as input. + + Must provide either ``data`` or ``x``, ``y``, and ``z``. + + Full option list at :gmt-docs:`blockmedian.html` + + {aliases} + + Parameters + ---------- + data : str, {table-like} + Pass in (x, y, z) or (longitude, latitude, elevation) values by + providing a file name to an ASCII data table, a 2-D + {table-classes}. + x/y/z : 1-D arrays + Arrays of x and y coordinates and values z of the data points. + {output_type} + {outfile} + {spacing} + {region} + {verbose} + {aspatial} + {binary} + {nodata} + {find} + {coltypes} + {header} + {incols} + {outcols} + {registration} + {wrap} + + Returns + ------- + ret + Return type depends on ``outfile`` and ``output_type``: + + - ``None`` if ``outfile`` is set (output will be stored in the file set by + ``outfile``) + - :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile`` is not set + (depends on ``output_type``) + + Example + ------- + >>> import pygmt + >>> # Load a table of ship observations of bathymetry off Baja California + >>> data = pygmt.datasets.load_sample_data(name="bathymetry") + >>> # Calculate block median values within 5 by 5 arc-minute bins + >>> data_bmedian = pygmt.blockmedian( + ... data=data, region=[245, 255, 20, 30], spacing="5m" + ... ) + """ + return _blockm( + block_method="blockmedian", + data=data, + x=x, + y=y, + z=z, + output_type=output_type, + outfile=outfile, + **kwargs, + )
+ + + +
+[docs] +@fmt_docstring +@use_alias( + I="spacing", + R="region", + V="verbose", + a="aspatial", + b="binary", + d="nodata", + e="find", + f="coltypes", + h="header", + i="incols", + o="outcols", + r="registration", + w="wrap", +) +@kwargs_to_strings(I="sequence", R="sequence", i="sequence_comma", o="sequence_comma") +def blockmode( + data=None, + x=None, + y=None, + z=None, + output_type: Literal["pandas", "numpy", "file"] = "pandas", + outfile: str | None = None, + **kwargs, +) -> pd.DataFrame | np.ndarray | None: + r""" + Block average (x, y, z) data tables by mode estimation. + + Reads arbitrarily located (x, y, z) triplets [or optionally weighted + quadruplets (x, y, z, w)] and writes to the output a mode position and + value for every non-empty block in a grid region defined by the ``region`` + and ``spacing`` parameters. + + Takes a matrix, (x, y, z) triplets, or a file name as input. + + Must provide either ``data`` or ``x``, ``y``, and ``z``. + + Full option list at :gmt-docs:`blockmode.html` + + {aliases} + + Parameters + ---------- + data : str, {table-like} + Pass in (x, y, z) or (longitude, latitude, elevation) values by + providing a file name to an ASCII data table, a 2-D + {table-classes}. + x/y/z : 1-D arrays + Arrays of x and y coordinates and values z of the data points. + {output_type} + {outfile} + {spacing} + {region} + {verbose} + {aspatial} + {binary} + {nodata} + {find} + {coltypes} + {header} + {incols} + {outcols} + {registration} + {wrap} + + Returns + ------- + ret + Return type depends on ``outfile`` and ``output_type``: + + - ``None`` if ``outfile`` is set (output will be stored in the file set by + ``outfile``) + - :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile`` is not set + (depends on ``output_type``) + + Example + ------- + >>> import pygmt + >>> # Load a table of ship observations of bathymetry off Baja California + >>> data = pygmt.datasets.load_sample_data(name="bathymetry") + >>> # Calculate block mode values within 5 by 5 arc-minute bins + >>> data_bmode = pygmt.blockmode(data=data, region=[245, 255, 20, 30], spacing="5m") + """ + return _blockm( + block_method="blockmode", + data=data, + x=x, + y=y, + z=z, + output_type=output_type, + outfile=outfile, + **kwargs, + )
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/coast.html b/v0.14.0/_modules/pygmt/src/coast.html new file mode 100644 index 00000000000..a36f77a4ae9 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/coast.html @@ -0,0 +1,409 @@ + + + + + + + + pygmt.src.coast — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.coast

+"""
+coast - Plot land and water.
+"""
+
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    args_in_kwargs,
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+)
+
+__doctest_skip__ = ["coast"]
+
+
+@fmt_docstring
+@use_alias(
+    A="area_thresh",
+    B="frame",
+    C="lakes",
+    D="resolution",
+    E="dcw",
+    F="box",
+    G="land",
+    I="rivers",
+    J="projection",
+    L="map_scale",
+    N="borders",
+    R="region",
+    S="water",
+    V="verbose",
+    W="shorelines",
+    c="panel",
+    p="perspective",
+    t="transparency",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
+def coast(self, **kwargs):
+    r"""
+    Plot continents, shorelines, rivers, and borders on maps.
+
+    Plots grayshaded, colored, or textured land masses [or water masses] on
+    maps and [optionally] draws coastlines, rivers, and political
+    boundaries. The data files come in 5 different resolutions: (**f**)ull,
+    (**h**)igh, (**i**)ntermediate, (**l**)ow, and (**c**)rude. The full
+    resolution files amount to more than 55 Mb of data and provide great
+    detail; for maps of larger geographical extent it is more economical to
+    use one of the other resolutions. If the user selects to paint the
+    land areas and does not specify fill of water areas then the latter
+    will be transparent (i.e., earlier graphics drawn in those areas will
+    not be overwritten). Likewise, if the water areas are painted and no
+    land fill is set then the land areas will be transparent.
+
+    A map projection must be supplied.
+
+    Full option list at :gmt-docs:`coast.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    {projection}
+    {region}
+        *Required if this is the first plot command.*
+    {area_thresh}
+    {frame}
+    lakes : str or list
+        *fill*\ [**+l**\|\ **+r**].
+        Set the shade, color, or pattern for lakes and river-lakes. The
+        default is the fill chosen for "wet" areas set by the ``water``
+        parameter. Optionally, specify separate fills by appending
+        **+l** for lakes or **+r** for river-lakes, and passing multiple
+        strings in a list.
+    resolution : str
+        **f**\|\ **h**\|\ **i**\|\ **l**\|\ **c**.
+        Select the resolution of the data set to: (**f**\ )ull, (**h**\ )igh,
+        (**i**\ )ntermediate, (**l**\ )ow, and (**c**\ )rude.
+    land : str
+        Select filling of "dry" areas.
+    rivers : int, str, or list
+        *river*\ [/*pen*].
+        Draw rivers. Specify the type of rivers and [optionally] append
+        pen attributes [Default is ``"0.25p,black,solid"``].
+
+        Choose from the list of river types below; pass a list to ``rivers``
+        to use multiple arguments.
+
+        - ``0``: double-lined rivers (river-lakes)
+        - ``1``: permanent major rivers
+        - ``2``: additional major rivers
+        - ``3``: additional rivers
+        - ``4``: minor rivers
+        - ``5``: intermittent rivers - major
+        - ``6``: intermittent rivers - additional
+        - ``7``: intermittent rivers - minor
+        - ``8``: major canals
+        - ``9``: minor canals
+        - ``10``: irrigation canals
+
+        You can also choose from several preconfigured river groups:
+
+        - ``"a"``: rivers and canals (``0`` - ``10``)
+        - ``"A"``: rivers and canals except river-lakes (``1`` - ``10``)
+        - ``"r"``: permanent rivers (``0`` - ``4``)
+        - ``"R"``: permanent rivers except river-lakes (``1`` - ``4``)
+        - ``"i"``: intermittent rivers (``5`` - ``7``)
+        - ``"c"``: canals (``8`` - ``10``)
+
+    map_scale : str
+        [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ **+w**\ *length*.
+        Draw a simple map scale centered on the reference point specified.
+    box : bool or str
+        [**+c**\ *clearances*][**+g**\ *fill*][**+i**\ [[*gap*/]\ *pen*]]\
+        [**+p**\ [*pen*]][**+r**\ [*radius*]][**+s**\ [[*dx*/*dy*/][*shade*]]].
+        If set to ``True``, draw a rectangular border around the
+        map scale or rose. Alternatively, specify a different pen with
+        **+p**\ *pen*. Add **+g**\ *fill* to fill the scale panel [Default is
+        no fill]. Append **+c**\ *clearance* where *clearance* is either gap,
+        xgap/ygap, or lgap/rgap/bgap/tgap where these items are uniform,
+        separate in x- and y-direction, or individual side spacings between
+        scale and border. Append **+i** to draw a secondary, inner border as
+        well. We use a uniform gap between borders of 2p and the
+        :gmt-term:`MAP_DEFAULTS_PEN` unless other values are specified. Append
+        **+r** to draw rounded rectangular borders instead, with a 6p corner
+        radius. You can override this radius by appending another value.
+        Finally, append **+s** to draw an offset background shaded region.
+        Here, *dx/dy* indicates the shift relative to the foreground frame
+        [Default is ``"4p/-4p"``] and shade sets the fill style to use for
+        shading [Default is ``"gray50"``].
+    borders : int, str, or list
+        *border*\ [/*pen*].
+        Draw political boundaries. Specify the type of boundary and
+        [optionally] append pen attributes [Default is ``"0.25p,black,solid"``].
+
+        Choose from the list of boundaries below. Pass a list to ``borders`` to
+        use multiple arguments.
+
+        - ``1``: national boundaries
+        - ``2``: state boundaries within the Americas
+        - ``3``: marine boundaries
+        - ``"a"``: all boundaries (``1`` - ``3``)
+
+    water : str
+        Select filling "wet" areas.
+    shorelines : int, str, or list
+        [*level*\ /]\ *pen*.
+        Draw shorelines [Default is no shorelines]. Append pen attributes
+        [Default is ``"0.25p,black,solid"``] which apply to all four levels.
+        To set the pen for a single level, pass a string with *level*\ /*pen*\ ,
+        where level is 1-4 and represent coastline, lakeshore, island-in-lake shore,
+        and lake-in-island-in-lake shore. Pass a list of *level*\ /*pen*
+        strings to ``shorelines`` to set multiple levels. When specific
+        level pens are set, those not listed will not be drawn.
+    dcw : str or list
+        *code1,code2,…*\ [**+g**\ *fill*\ ][**+p**\ *pen*\ ][**+z**].
+        Select painting country polygons from the `Digital Chart of the World
+        <https://en.wikipedia.org/wiki/Digital_Chart_of_the_World>`__.
+        Append one or more comma-separated countries using the 2-character
+        `ISO 3166-1 alpha-2 convention
+        <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`__.
+        To select a state of a country (if available), append .\ *state*,
+        (e.g, ``"US.TX"`` for Texas). To specify a whole continent, prepend **=**
+        to any of the continent codes (e.g. ``"=EU"`` for Europe). Append
+        **+p**\ *pen* to draw polygon outlines [Default is no outline] and
+        **+g**\ *fill* to fill them [Default is no fill].
+    {panel}
+    {perspective}
+    {transparency}
+    {verbose}
+
+    Example
+    -------
+    >>> import pygmt
+    >>> # Create a new plot with pygmt.Figure()
+    >>> fig = pygmt.Figure()
+    >>> # Call the coast method for the plot
+    >>> fig.coast(
+    ...     # Set the projection to Mercator, and the plot width to 10 centimeters
+    ...     projection="M10c",
+    ...     # Set the region of the plot
+    ...     region=[-10, 30, 30, 60],
+    ...     # Set the frame of the plot, here annotations and major ticks
+    ...     frame="a",
+    ...     # Set the color of the land to "darkgreen"
+    ...     land="darkgreen",
+    ...     # Set the color of the water to "lightblue"
+    ...     water="lightblue",
+    ...     # Draw national borders with a 1-point black line
+    ...     borders="1/1p,black",
+    ... )
+    >>> # Show the plot
+    >>> fig.show()
+    """
+    kwargs = self._preprocess(**kwargs)
+    if not args_in_kwargs(args=["C", "G", "S", "I", "N", "E", "Q", "W"], kwargs=kwargs):
+        msg = (
+            "At least one of the following parameters must be specified: "
+            "lakes, land, water, rivers, borders, dcw, Q, or shorelines."
+        )
+        raise GMTInvalidInput(msg)
+    with Session() as lib:
+        lib.call_module(module="coast", args=build_arg_list(kwargs))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/colorbar.html b/v0.14.0/_modules/pygmt/src/colorbar.html new file mode 100644 index 00000000000..5cf6092bb31 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/colorbar.html @@ -0,0 +1,354 @@ + + + + + + + + pygmt.src.colorbar — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.colorbar

+"""
+colorbar - Plot a colorbar.
+"""
+
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["colorbar"]
+
+
+@fmt_docstring
+@use_alias(
+    B="frame",
+    C="cmap",
+    D="position",
+    F="box",
+    G="truncate",
+    I="shading",
+    J="projection",
+    L="equalsize",
+    Q="log",
+    R="region",
+    V="verbose",
+    W="scale",
+    Z="zfile",
+    c="panel",
+    p="perspective",
+    t="transparency",
+)
+@kwargs_to_strings(
+    R="sequence", G="sequence", I="sequence", c="sequence_comma", p="sequence"
+)
+def colorbar(self, **kwargs):
+    r"""
+    Plot colorbars on figures.
+
+    Both horizontal and vertical colorbars are supported. For CPTs with
+    gradational colors (i.e., the lower and upper boundary of an interval
+    have different colors) we will interpolate to give a continuous scale.
+    Variations in intensity due to shading/illumination may be displayed by
+    setting the ``shading`` parameter. Colors may be spaced according to a
+    linear scale, all be equal size, or by providing a file with individual
+    tile widths.
+
+    Full option list at :gmt-docs:`colorbar.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    frame : str or list
+        Set colorbar boundary frame, labels, and axes attributes.
+    {cmap}
+    position : str
+        [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
+        [**+w**\ *length*\ [/\ *width*]]\ [**+e**\ [**b**\|\ **f**][*length*]]\
+        [**+h**\|\ **v**][**+j**\ *justify*]\
+        [**+m**\ [**a**\|\ **c**\|\ **l**\|\ **u**]]\
+        [**+n**\ [*txt*]][**+o**\ *dx*\ [/*dy*]].
+        Define the reference point on the map for the color scale using one of
+        four coordinate systems: (1) Use **g** for map (user) coordinates, (2)
+        use **j** or **J** for setting *refpoint* via a 2-character
+        justification code that refers to the (invisible) map domain rectangle,
+        (3) use **n** for normalized (0-1) coordinates, or (4) use **x** for
+        plot coordinates (inches, cm, etc.). All but **x** requires both
+        ``region`` and ``projection`` to be specified. Append **+w** followed
+        by the length and width of the colorbar. If width is not specified
+        then it is set to 4% of the given length. Give a negative length to
+        reverse the scale bar. Append **+h** to get a horizontal scale
+        [Default is vertical (**+v**)]. By default, the anchor point on the
+        scale is assumed to be the bottom left corner (**BL**), but this can
+        be changed by appending **+j** followed by a 2-character
+        justification code *justify*.
+    box : bool or str
+        [**+c**\ *clearances*][**+g**\ *fill*][**+i**\ [[*gap*/]\ *pen*]]\
+        [**+p**\ [*pen*]][**+r**\ [*radius*]][**+s**\ [[*dx*/*dy*/][*shade*]]].
+        If set to ``True``, draw a rectangular border around the color scale.
+        Alternatively, specify a different pen with **+p**\ *pen*. Add
+        **+g**\ *fill* to fill the scale panel [Default is no fill]. Append
+        **+c**\ *clearance* where *clearance* is either gap, xgap/ygap, or
+        lgap/rgap/bgap/tgap where these items are uniform, separate in x- and
+        y-direction, or individual side spacings between scale and border.
+        Append **+i** to draw a secondary, inner border as well. We use a
+        uniform gap between borders of 2p and the :gmt-term:`MAP_DEFAULTS_PEN`
+        unless other values are specified. Append **+r** to draw rounded
+        rectangular borders instead, with a 6p corner radius. You can override
+        this radius by appending another value. Finally, append **+s** to draw
+        an offset background shaded region. Here, *dx/dy* indicates the shift
+        relative to the foreground frame [Default is ``"4p/-4p"``] and shade
+        sets the fill style to use for shading [Default is ``"gray50"``].
+    truncate : list or str
+        *zlo*/*zhi*.
+        Truncate the incoming CPT so that the lowest and highest z-levels are
+        to *zlo* and *zhi*. If one of these equal NaN then we leave that end of
+        the CPT alone. The truncation takes place before the plotting.
+    scale : float
+        Multiply all z-values in the CPT by the provided scale. By default,
+        the CPT is used as is.
+    shading : str, list, or bool
+        Add illumination effects. Passing a single numerical value sets the
+        range of intensities from -value to +value. If not specified, 1 is
+        used. Alternatively, set ``shading=[low, high]`` to specify an
+        asymmetric intensity range from *low* to *high*. [Default is no
+        illumination].
+    equalsize : float or str
+        [**i**]\ [*gap*].
+        Equal-sized color rectangles. By default, the rectangles are scaled
+        according to the z-range in the CPT (see also ``zfile``). If *gap* is
+        appended and the CPT is discrete each annotation is centered on each
+        rectangle, using the lower boundary z-value for the annotation. If
+        **i** is prepended the interval range is annotated instead. If
+        ``shading`` is used each rectangle will have its constant color
+        modified by the specified intensity.
+    log : bool
+        Select logarithmic scale and power of ten annotations. All z-values
+        in the CPT will be converted to p = log10(z) and only integer p-values
+        will be annotated using the 10^p format [Default is linear scale].
+    zfile : str
+        File with colorbar-width per color entry. By default, the width of the
+        entry is scaled to the color range, i.e., z = 0-100 gives twice the
+        width as z = 100-150 (see also ``equalsize``). **Note**: The widths
+        may be in plot distance units or given as relative fractions and will
+        be automatically scaled so that the sum of the widths equals the
+        requested colorbar length.
+    {verbose}
+    {panel}
+    {perspective}
+    {transparency}
+
+    Example
+    -------
+    >>> import pygmt
+    >>> # Create a new figure instance with pygmt.Figure()
+    >>> fig = pygmt.Figure()
+    >>> # Create a basemap
+    >>> fig.basemap(region=[0, 10, 0, 3], projection="X10c/3c", frame=True)
+    >>> # Call the colorbar method for the plot
+    >>> fig.colorbar(
+    ...     # Set cmap to the "roma" CPT
+    ...     cmap="roma",
+    ...     # Label the x-axis "Velocity" and the y-axis "m/s"
+    ...     frame=["x+lVelocity", "y+lm/s"],
+    ... )
+    >>> # Show the plot
+    >>> fig.show()
+    """
+    kwargs = self._preprocess(**kwargs)
+    with Session() as lib:
+        lib.call_module(module="colorbar", args=build_arg_list(kwargs))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/config.html b/v0.14.0/_modules/pygmt/src/config.html new file mode 100644 index 00000000000..96212ded2b4 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/config.html @@ -0,0 +1,429 @@ + + + + + + + + pygmt.src.config — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.config

+"""
+config - set GMT defaults globally or locally.
+"""
+
+from inspect import Parameter, Signature
+from typing import ClassVar
+
+from pygmt.clib import Session
+
+
+
+[docs] +class config: # noqa: N801 + """ + Set GMT defaults globally or locally. + + Change GMT defaults globally:: + + pygmt.config(PARAMETER=value) + + Change GMT defaults locally by using it as a context manager:: + + with pygmt.config(PARAMETER=value): + ... + + Full GMT defaults list at :gmt-docs:`gmt.conf.html` + """ + + # Manually set the __signature__ attribute to enable tab autocompletion + _keywords: ClassVar = [ + "COLOR_BACKGROUND", + "COLOR_FOREGROUND", + "COLOR_CPT", + "COLOR_NAN", + "COLOR_MODEL", + "COLOR_HSV_MIN_S", + "COLOR_HSV_MAX_S", + "COLOR_HSV_MIN_V", + "COLOR_HSV_MAX_V", + "COLOR_SET", + "DIR_CACHE", + "DIR_DATA", + "DIR_DCW", + "DIR_GSHHG", + "FONT_ANNOT_PRIMARY", + "FONT_ANNOT_SECONDARY", + "FONT_HEADING", + "FONT_LABEL", + "FONT_LOGO", + "FONT_SUBTITLE", + "FONT_TAG", + "FONT_TITLE", + "FORMAT_CLOCK_IN", + "FORMAT_CLOCK_OUT", + "FORMAT_CLOCK_MAP", + "FORMAT_DATE_IN", + "FORMAT_DATE_OUT", + "FORMAT_DATE_MAP", + "FORMAT_GEO_OUT", + "FORMAT_GEO_MAP", + "FORMAT_FLOAT_OUT", + "FORMAT_FLOAT_MAP", + "FORMAT_TIME_PRIMARY_MAP", + "FORMAT_TIME_SECONDARY_MAP", + "FORMAT_TIME_STAMP", + "GMT_DATA_SERVER", + "GMT_DATA_SERVER_LIMIT", + "GMT_DATA_UPDATE_INTERVAL", + "GMT_COMPATIBILITY", + "GMT_CUSTOM_LIBS", + "GMT_EXPORT_TYPE", + "GMT_EXTRAPOLATE_VAL", + "GMT_FFT", + "GMT_GRAPHICS_DPU", + "GMT_GRAPHICS_FORMAT", + "GMT_HISTORY", + "GMT_INTERPOLANT", + "GMT_LANGUAGE", + "GMT_MAX_CORES", + "GMT_THEME", + "GMT_TRIANGULATE", + "GMT_VERBOSE", + "IO_COL_SEPARATOR", + "IO_FIRST_HEADER", + "IO_GRIDFILE_FORMAT", + "IO_GRIDFILE_SHORTHAND", + "IO_HEADER", + "IO_HEADER_MARKER", + "IO_N_HEADER_RECS", + "IO_NAN_RECORDS", + "IO_NC4_CHUNK_SIZE", + "IO_NC4_DEFLATION_LEVEL", + "IO_LONLAT_TOGGLE", + "IO_SEGMENT_BINARY", + "IO_SEGMENT_MARKER", + "MAP_ANNOT_MIN_ANGLE", + "MAP_ANNOT_MIN_SPACING", + "MAP_ANNOT_OBLIQUE", + "MAP_ANNOT_OFFSET_PRIMARY", + "MAP_ANNOT_OFFSET_SECONDARY", + "MAP_ANNOT_ORTHO", + "MAP_DEFAULT_PEN", + "MAP_DEGREE_SYMBOL", + "MAP_EMBELLISHMENT_MODE", + "MAP_FRAME_AXES", + "MAP_FRAME_PEN", + "MAP_FRAME_PERCENT", + "MAP_FRAME_TYPE", + "MAP_FRAME_WIDTH", + "MAP_GRID_CROSS_SIZE_PRIMARY", + "MAP_GRID_CROSS_SIZE_SECONDARY", + "MAP_GRID_PEN_PRIMARY", + "MAP_GRID_PEN_SECONDARY", + "MAP_HEADING_OFFSET", + "MAP_LABEL_MODE", + "MAP_LABEL_OFFSET", + "MAP_LINE_STEP", + "MAP_LOGO", + "MAP_LOGO_POS", + "MAP_ORIGIN_X", + "MAP_ORIGIN_Y", + "MAP_POLAR_CAP", + "MAP_SCALE_HEIGHT", + "MAP_TICK_LENGTH_PRIMARY", + "MAP_TICK_LENGTH_SECONDARY", + "MAP_TICK_PEN_PRIMARY", + "MAP_TICK_PEN_SECONDARY", + "MAP_TITLE_OFFSET", + "MAP_VECTOR_SHAPE", + "PROJ_AUX_LATITUDE", + "PROJ_DATUM", + "PROJ_ELLIPSOID", + "PROJ_GEODESIC", + "PROJ_LENGTH_UNIT", + "PROJ_MEAN_RADIUS", + "PROJ_SCALE_FACTOR", + "PS_CHAR_ENCODING", + "PS_COLOR_MODEL", + "PS_COMMENTS", + "PS_CONVERT", + "PS_IMAGE_COMPRESS", + "PS_LINE_CAP", + "PS_LINE_JOIN", + "PS_MITER_LIMIT", + "PS_MEDIA", + "PS_PAGE_COLOR", + "PS_PAGE_ORIENTATION", + "PS_SCALE_X", + "PS_SCALE_Y", + "PS_TRANSPARENCY", + "TIME_EPOCH", + "TIME_IS_INTERVAL", + "TIME_INTERVAL_FRACTION", + "TIME_LEAP_SECONDS", + "TIME_REPORT", + "TIME_UNIT", + "TIME_WEEK_START", + "TIME_Y2K_OFFSET_YEAR", + ] + + _special_keywords: ClassVar = { + "FONT": [ + "FONT_ANNOT_PRIMARY", + "FONT_ANNOT_SECONDARY", + "FONT_HEADING", + "FONT_LABEL", + "FONT_TAG", + "FONT_TITLE", + ], + "FONT_ANNOT": ["FONT_ANNOT_PRIMARY", "FONT_ANNOT_SECONDARY"], + "FORMAT_TIME_MAP": ["FORMAT_TIME_PRIMARY_MAP", "FORMAT_TIME_SECONDARY_MAP"], + "MAP_ANNOT_OFFSET": [ + "MAP_ANNOT_OFFSET_PRIMARY", + "MAP_ANNOT_OFFSET_SECONDARY", + ], + "MAP_GRID_CROSS_SIZE": [ + "MAP_GRID_CROSS_SIZE_PRIMARY", + "MAP_GRID_CROSS_SIZE_SECONDARY", + ], + "MAP_GRID_PEN": ["MAP_GRID_PEN_PRIMARY", "MAP_GRID_PEN_SECONDARY"], + "MAP_TICK_LENGTH": ["MAP_TICK_LENGTH_PRIMARY", "MAP_TICK_LENGTH_SECONDARY"], + "MAP_TICK_PEN": ["MAP_TICK_PEN_PRIMARY", "MAP_TICK_PEN_SECONDARY"], + } + + __signature__ = Signature( + parameters=[ + Parameter(key, kind=Parameter.KEYWORD_ONLY, default=None) + for key in _keywords + list(_special_keywords.keys()) + ] + ) + + def __init__(self, **kwargs): + # Save values so that we can revert to their initial values + self.old_defaults = {} + with Session() as lib: + for key in kwargs: + if key in self._special_keywords: + for k in self._special_keywords[key]: + self.old_defaults[k] = lib.get_default(k) + else: + self.old_defaults[key] = lib.get_default(key) + + # call gmt set to change GMT defaults + with Session() as lib: + lib.call_module( + module="set", args=[f"{key}={value}" for key, value in kwargs.items()] + ) + + def __enter__(self): + """ + Do nothing but return the object. + """ + return self + + def __exit__(self, exc_type, exc_value, traceback): + """ + Revert GMT configurations to initial values. + """ + with Session() as lib: + lib.call_module( + module="set", + args=[f"{key}={value}" for key, value in self.old_defaults.items()], + )
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/contour.html b/v0.14.0/_modules/pygmt/src/contour.html new file mode 100644 index 00000000000..dfd744a33c4 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/contour.html @@ -0,0 +1,357 @@ + + + + + + + + pygmt.src.contour — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.contour

+"""
+contour - Plot contour table data.
+"""
+
+from pygmt.clib import Session
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    is_nonstr_iter,
+    kwargs_to_strings,
+    use_alias,
+)
+
+
+@fmt_docstring
+@use_alias(
+    A="annotation",
+    B="frame",
+    C="levels",
+    G="label_placement",
+    J="projection",
+    L="triangular_mesh_pen",
+    N="no_clip",
+    R="region",
+    S="skip",
+    V="verbose",
+    W="pen",
+    b="binary",
+    c="panel",
+    d="nodata",
+    e="find",
+    f="coltypes",
+    h="header",
+    i="incols",
+    l="label",
+    p="perspective",
+    t="transparency",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence")
+def contour(self, data=None, x=None, y=None, z=None, **kwargs):
+    r"""
+    Contour table data by direct triangulation.
+
+    Takes a matrix, (x, y, z) triplets, or a file name as input and plots,
+    lines, polygons, or symbols at those locations on a map.
+
+    Must provide either ``data`` or ``x``, ``y``, and ``z``.
+
+    Full option list at :gmt-docs:`contour.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    data : str, {table-like}
+        Pass in (x, y, z) or (longitude, latitude, elevation) values by
+        providing a file name to an ASCII data table, a 2-D
+        {table-classes}.
+    x/y/z : 1-D arrays
+        Arrays of x and y coordinates and values z of the data points.
+    {projection}
+    {region}
+    annotation : float, list, or str
+        Specify or disable annotated contour levels, modifies annotated
+        contours specified in ``levels``.
+
+        - Specify a fixed annotation interval.
+        - Specify a list of annotation levels.
+        - Disable all annotations by setting ``annotation="n"``.
+        - Adjust the appearance by appending different modifiers, e.g.,
+          ``"annot_int+f10p+gred"`` gives annotations with a font size of 10 points and
+          a red filled box. For all available modifiers see :gmt-docs:`contour.html#a`.
+    {frame}
+    levels : float, list, or str
+        Specify the contour lines to generate.
+
+        - The file name of a CPT file where the color boundaries will be used as
+          contour levels.
+        - The file name of a 2 (or 3) column file containing the contour levels (col 0),
+          (**C**)ontour or (**A**)nnotate (col 1), and optional angle (col 2).
+        - A fixed contour interval.
+        - A list of contour levels.
+    D : str
+        Dump contour coordinates.
+    E : str
+        Network information.
+    label_placement : str
+        [**d**\|\ **f**\|\ **n**\|\ **l**\|\ **L**\|\ **x**\|\ **X**]\ *args*.
+        Control the placement of labels along the quoted lines. It supports
+        five controlling algorithms. See :gmt-docs:`contour.html#g` for
+        details.
+    I : bool
+        Color the triangles using CPT.
+    triangular_mesh_pen : str
+        Pen to draw the underlying triangulation [Default is ``None``].
+    no_clip : bool
+        Do **not** clip contours or image at the frame boundaries
+        [Default is ``False`` to fit inside ``region``].
+    Q : float or str
+        [*cut*][**+z**].
+        Do not draw contours with less than *cut* number of points.
+    skip : bool or str
+        [**p**\|\ **t**].
+        Skip input points outside region.
+    pen : str or list
+        [*type*]\ *pen*\ [**+c**\ [**l**\|\ **f**]].
+        *type*, if present, can be **a** for annotated contours or **c** for regular
+        contours [Default]. The pen sets the attributes for the particular line.
+        Default pen for annotated contours is ``"0.75p,black"`` and for regular
+        contours ``"0.25p,black"``. Normally, all contours are drawn with a fixed
+        color determined by the pen setting. If **+cl** is appended the colors of the
+        contour lines are taken from the CPT (see ``levels``). If **+cf** is
+        appended the colors from the CPT file are applied to the contour annotations.
+        Select **+c** for both effects.
+    label : str
+        Add a legend entry for the contour being plotted. Normally, the
+        annotated contour is selected for the legend. You can select the
+        regular contour instead, or both of them, by considering the label
+        to be of the format [*annotcontlabel*][/*contlabel*]. If either
+        label contains a slash (/) character then use ``|`` as the
+        separator for the two labels instead.
+    {verbose}
+    {binary}
+    {panel}
+    {nodata}
+    {find}
+    {coltypes}
+    {header}
+    {incols}
+    {perspective}
+    {transparency}
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    # Specify levels for contours or annotations.
+    # One level is converted to a string with a trailing comma to separate it from
+    # specifying an interval.
+    # Multiple levels are concatenated to a comma-separated string.
+    for arg in ["A", "C"]:
+        if is_nonstr_iter(kwargs.get(arg)):
+            if len(kwargs[arg]) == 1:  # One level
+                kwargs[arg] = str(kwargs[arg][0]) + ","
+            else:  # Multiple levels
+                kwargs[arg] = ",".join(f"{item}" for item in kwargs[arg])
+
+    with Session() as lib:
+        with lib.virtualfile_in(
+            check_kind="vector", data=data, x=x, y=y, z=z, required_z=True
+        ) as vintbl:
+            lib.call_module(
+                module="contour", args=build_arg_list(kwargs, infile=vintbl)
+            )
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/dimfilter.html b/v0.14.0/_modules/pygmt/src/dimfilter.html new file mode 100644 index 00000000000..f6cf29d7108 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/dimfilter.html @@ -0,0 +1,360 @@ + + + + + + + + pygmt.src.dimfilter — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.dimfilter

+"""
+dimfilter - Directional filtering of grids in the space domain.
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["dimfilter"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + D="distance", + F="filter", + I="spacing", + N="sectors", + R="region", + V="verbose", +) +@kwargs_to_strings(I="sequence", R="sequence") +def dimfilter(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | None: + r""" + Filter a grid by dividing the filter circle. + + Filter a grid in the space (or time) domain by + dividing the given filter circle into the given number of sectors, + applying one of the selected primary convolution or non-convolution + filters to each sector, and choosing the final outcome according to the + selected secondary filter. It computes distances using Cartesian or + Spherical geometries. The output grid can optionally be generated as a + subregion of the input and/or with a new increment using ``spacing``, + which may add an "extra space" in the input data to prevent edge + effects for the output grid. If the filter is low-pass, then the output + may be less frequently sampled than the input. :func:`pygmt.dimfilter` + will not produce a smooth output as other spatial filters + do because it returns a minimum median out of *N* medians of *N* + sectors. The output can be rough unless the input data are noise-free. + Thus, an additional filtering (e.g., Gaussian via :func:`pygmt.grdfilter`) + of the DiM-filtered data is generally recommended. + + Full option list at :gmt-docs:`dimfilter.html` + + {aliases} + + Parameters + ---------- + {grid} + {outgrid} + distance : int or str + Distance flag tells how grid (x,y) relates to filter width, as follows: + + - **0**: grid (x,y) in same units as *width*, Cartesian distances. + - **1**: grid (x,y) in degrees, *width* in kilometers, Cartesian distances. + - **2**: grid (x,y) in degrees, *width* in km, dx scaled by cos(middle y), + Cartesian distances. + + The above options are fastest because they allow weight matrix to be + computed only once. The next two options are slower because they + recompute weights for each latitude. + + - **3**: grid (x,y) in degrees, *width* in km, dx scaled by cosine(y), + Cartesian distance calculation. + - **4**: grid (x,y) in degrees, *width* in km, Spherical distance calculation. + filter : str + **x**\ *width*\ [**+l**\|\ **u**]. + Set the primary filter type. Choose among convolution and + non-convolution filters. Use the filter code **x** followed by + the full diameter *width*. Available convolution filters are: + + - **b**: boxcar. Aall weights are equal. + - **c**: cosine arch. Weights follow a cosine arch curve. + - **g**: Gaussian. Weights are given by the Gaussian function. + + Non-convolution filters are: + + - **m**: median. Returns median value. + - **p**: maximum likelihood probability (a mode estimator). Return + modal value. If more than one mode is found we return their average + value. Append **+l** or **+h** to the filter width if you want + to return the smallest or largest of each sector's modal values. + sectors : str + **x**\ *sectors*\ [**+l**\|\ **u**] + Set the secondary filter type **x** and the number of bow-tie sectors. + *sectors* must be integer and larger than 0. When *sectors* is + set to 1, the secondary filter is not effective. Available secondary + filters **x** are: + + - **l**: lower. Return the minimum of all filtered values. + - **u**: upper. Return the maximum of all filtered values. + - **a**: average. Return the mean of all filtered values. + - **m**: median. Return the median of all filtered values. + - **p**: mode. Return the mode of all filtered values. + If more than one mode is found we return their average + value. Append **+l** or **+h** to the sectors if you rather want to + return the smallest or largest of the modal values. + spacing : str or list + *x_inc* [and optionally *y_inc*] is the output increment. Append + **m** to indicate minutes, or **c** to indicate seconds. If the new + *x_inc*, *y_inc* are **not** integer multiples of the old ones (in the + input data), filtering will be considerably slower. [Default is same + as the input.] + region : str or list + [*xmin*, *xmax*, *ymin*, *ymax*]. + Define the region of the output points [Default is the same as the input]. + {verbose} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - ``None`` if ``outgrid`` is set (grid output will be stored in the file set by + ``outgrid``) + + Example + ------- + >>> import pygmt + >>> # Load a grid of Earth relief data + >>> grid = pygmt.datasets.load_earth_relief() + >>> # Create a filtered grid from an input grid. + >>> filtered_grid = pygmt.dimfilter( + ... grid=grid, + ... # Set filter type to "median" and the diameter width to 600 km + ... filter="m600", + ... # Set grid in degrees, width in km + ... distance=4, + ... # Create 6 sectors and return the lowest values in the sector + ... sectors="l6", + ... # Set the region longitude range from 55W to 51W, and the + ... # latitude range from 24S to 19S + ... region=[-55, -51, -24, -19], + ... ) + """ + if not all(arg in kwargs for arg in ["D", "F", "N"]) and "Q" not in kwargs: + msg = ( + "At least one of the following parameters must be specified: " + "distance, filters, or sectors." + ) + raise GMTInvalidInput(msg) + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="raster", data=grid) as vingrd, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="dimfilter", args=build_arg_list(kwargs, infile=vingrd) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/filter1d.html b/v0.14.0/_modules/pygmt/src/filter1d.html new file mode 100644 index 00000000000..b15c75f1291 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/filter1d.html @@ -0,0 +1,336 @@ + + + + + + + + pygmt.src.filter1d — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.filter1d

+"""
+filter1d - Time domain filtering of 1-D data tables
+"""
+
+from typing import Literal
+
+import numpy as np
+import pandas as pd
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    use_alias,
+    validate_output_table_type,
+)
+
+
+
+[docs] +@fmt_docstring +@use_alias( + E="end", + F="filter_type", + N="time_col", +) +def filter1d( + data, + output_type: Literal["pandas", "numpy", "file"] = "pandas", + outfile: str | None = None, + **kwargs, +) -> pd.DataFrame | np.ndarray | None: + r""" + Time domain filtering of 1-D data tables. + + A general time domain filter for multiple column time + series data. The user specifies which column is the time (i.e., the + independent variable) via ``time_col``. The fastest operation + occurs when the input time series are equally spaced and have no gaps or + outliers and the special options are not needed. + Read a table and output as a :class:`numpy.ndarray`, + :class:`pandas.DataFrame`, or ASCII file. + + Full option list at :gmt-docs:`filter1d.html` + + {aliases} + + Parameters + ---------- + {output_type} + {outfile} + filter_type : str + **type**\ *width*\ [**+h**]. + Set the filter **type**. Choose among convolution and non-convolution + filters. Append the filter code followed by the full filter + *width* in same units as time column. By default, this + performs a low-pass filtering; append **+h** to select high-pass + filtering. Some filters allow for optional arguments and a modifier. + + Available convolution filter types are: + + - **b**: boxcar. All weights are equal. + - **c**: cosine arch. Weights follow a cosine arch curve. + - **g**: Gaussian. Weights are given by the Gaussian function. + - **f**: custom. Instead of *width* give name of a one-column file + with your own weight coefficients. + + Non-convolution filter types are: + + - **m**: median. Returns median value. + - **p**: maximum likelihood probability (a mode estimator). Return + modal value. If more than one mode is found we return their average + value. Append **+l** or **+u** if you rather want + to return the lowermost or uppermost of the modal values. + - **l**: lower (absolute). Return the minimum of all values. + - **L**: lower. Return minimum of all positive values only. + - **u**: upper (absolute). Return maximum of all values. + - **U**: upper. Return maximum of all negative values only. + + Upper case type **B**, **C**, **G**, **M**, **P**, **F** will use + robust filter versions: i.e., replace outliers (2.5 L1 scale off + median, using 1.4826 \* median absolute deviation [MAD]) with median + during filtering. + + In the case of **L**\|\ **U** it is possible that no data passes + the initial sign test; in that case the filter will return 0.0. + Apart from custom coefficients (**f**), the other filters may accept + variable filter widths by passing *width* as a two-column time-series + file with filter widths in the second column. The filter-width file + does not need to be co-registered with the data as we obtain the + required filter width at each output location via interpolation. For + multi-segment data files the filter file must either have the same + number of segments or just a single segment to be used for all data + segments. + + end : bool + Include ends of time series in output. The default [False] loses + half the filter-width of data at each end. + + time_col : int + Indicate which column contains the independent variable (time). The + left-most column is 0, while the right-most is (*n_cols* - 1) + [Default is ``0``]. + + Returns + ------- + ret + Return type depends on ``outfile`` and ``output_type``: + + - ``None`` if ``outfile`` is set (output will be stored in the file set by + ``outfile``) + - :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile`` is not set + (depends on ``output_type``) + """ + if kwargs.get("F") is None: + msg = "Pass a required argument to 'filter_type'." + raise GMTInvalidInput(msg) + + output_type = validate_output_table_type(output_type, outfile=outfile) + + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="vector", data=data) as vintbl, + lib.virtualfile_out(kind="dataset", fname=outfile) as vouttbl, + ): + lib.call_module( + module="filter1d", + args=build_arg_list(kwargs, infile=vintbl, outfile=vouttbl), + ) + return lib.virtualfile_to_dataset(vfname=vouttbl, output_type=output_type)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grd2cpt.html b/v0.14.0/_modules/pygmt/src/grd2cpt.html new file mode 100644 index 00000000000..7f48b0c59b9 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grd2cpt.html @@ -0,0 +1,404 @@ + + + + + + + + pygmt.src.grd2cpt — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grd2cpt

+"""
+grd2cpt - Create a CPT from a grid file.
+"""
+
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["grd2cpt"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + A="transparency", + C="cmap", + D="background", + F="color_model", + E="nlevels", + G="truncate", + H="output", + I="reverse", + L="limit", + M="overrule_bg", + N="no_bg", + Q="log", + R="region", + T="series", + V="verbose", + W="categorical", + Ww="cyclic", + Z="continuous", +) +@kwargs_to_strings(G="sequence", L="sequence", R="sequence", T="sequence") +def grd2cpt(grid, **kwargs): + r""" + Make GMT color palette tables from a grid file. + + This function will help you to make static color palette tables (CPTs). + By default, the CPT will be saved as the current CPT of the session, + figure, subplot, panel, or inset depending on which level + :func:`pygmt.grd2cpt` is called (for details on how GMT modern mode + maintains different levels of colormaps please see + :gmt-docs:`reference/features.html#gmt-modern-mode-hierarchical-levels`). + You can use ``output`` to save the CPT to a file. The CPT is based on an + existing dynamic master CPT of your choice, and the mapping from data value + to colors is through the data's cumulative distribution function (CDF), so + that the colors are histogram equalized. Thus if the grid(s) and the + resulting CPT are used in :meth:`pygmt.Figure.grdimage` with a linear + projection, the colors will be uniformly distributed in area on the plot. + Let z be the data values in the grid. Define CDF(Z) = (# of z < Z) / (# of + z in grid). (NaNs are ignored). These z-values are then normalized to the + master CPT and colors are sampled at the desired intervals. + + The CPT includes three additional colors beyond the range of z-values. + These are the background color (B) assigned to values lower than the lowest + *z*-value, the foreground color (F) assigned to values higher than the + highest *z*-value, and the NaN color (N) painted wherever values are + undefined. For color tables beyond the standard GMT offerings, visit + `cpt-city <http://www.seaviewsensing.com/pub/cpt-city/>`_ and + `Scientific Colour-Maps <https://www.fabiocrameri.ch/colourmaps.php>`_. + + If the master CPT includes B, F, and N entries, these will be copied into + the new master file. If not, the parameters :gmt-term:`COLOR_BACKGROUND`, + :gmt-term:`COLOR_FOREGROUND`, and :gmt-term:`COLOR_NAN` from the + :gmt-docs:`gmt.conf <gmt.conf>` file will be used. This default behavior + can be overruled using the parameters ``background``, ``overrule_bg`` + or ``no_bg``. + + The color model (RGB, HSV or CMYK) of the palette created by + :func:`pygmt.grd2cpt` will be the same as specified in the header of the + master CPT. When there is no :gmt-term:`COLOR_MODEL` entry in the master + CPT, the :gmt-term:`COLOR_MODEL` specified in the + :gmt-docs:`gmt.conf <gmt.conf>` file or the ``color_model`` parameter + will be used. + + Full option list at :gmt-docs:`grd2cpt.html` + + {aliases} + + Parameters + ---------- + {grid} + transparency : int or float or str + Set a constant level of transparency (0-100) for all color slices. + Append **+a** to also affect the foreground, background, and NaN + colors [Default is no transparency, i.e., ``0`` (opaque)]. + cmap : str + Select the master color palette table (CPT) to use in the + interpolation. Full list of built-in color palette tables can be found + at :gmt-docs:`reference/cpts.html#built-in-color-palette-tables-cpt`. + background : bool or str + Select the back- and foreground colors to match the colors for lowest + and highest *z*-values in the output CPT [Default (``background=True`` + or ``background="o"``) uses the colors specified in the master file, or + those defined by the parameters :gmt-term:`COLOR_BACKGROUND`, + :gmt-term:`COLOR_FOREGROUND`, and :gmt-term:`COLOR_NAN`]. Use + ``background="i"`` to match the colors for the lowest and highest + values in the input (instead of the output) CPT. + color_model : str + [**R**\|\ **r**\|\ **h**\|\ **c**]\ + [**+c**\ [*label*\|\ *start*\ [**-**]]]. + Force output CPT to be written with r/g/b codes, gray-scale values or + color name (**R**, default) or r/g/b codes only (**r**), or h-s-v codes + (**h**), or c/m/y/k codes (**c**). Optionally or alternatively, append + **+c** to write discrete palettes in categorical format. If *label* is + appended then we create labels for each category to be used when the + CPT is plotted. The *label* may be a comma-separated list of category + names (you can skip a category by not giving a name), or give + *start*, where we automatically build monotonically increasing + labels from *start* (a single letter or an integer). Additionally + append **-** to build ranges *start*-*start+1* as labels instead. + nlevels : bool, int, or str + Set to ``True`` to create a linear color table by using the grid + z-range as the new limits in the CPT. Alternatively, set *nlevels* + to resample the color table into *nlevels* equidistant slices. + series : list or str + [*min/max/inc*\ [**+b**\|\ **l**\|\ **n**\]|\ *file*\|\ *list*\]. + Define the range of the new CPT by giving the lowest and highest + z-value (and optionally an interval). If this is not given, the + existing range in the master CPT will be used intact. The values + produced defines the color slice boundaries. If **+n** is used it + refers to the number of such boundaries and not the number of slices. + For details on array creation, see + :gmt-docs:`makecpt.html#generate-1d-array`. + truncate : list or str + *zlow/zhigh*. + Truncate the incoming CPT so that the lowest and highest z-levels are + to *zlow* and *zhigh*. If one of these equal NaN then we leave that + end of the CPT alone. The truncation takes place before any resampling. + See also :gmt-docs:`reference/features.html#manipulating-cpts`. + output : str + Optional. The file name with extension .cpt to store the generated CPT + file. If not given or ``False`` [Default], saves the CPT as the current + CPT of the session, figure, subplot, panel, or inset depending on which + level :func:`pygmt.grd2cpt` is called. + reverse : str + Set this to ``True`` or **c** [Default] to reverse the sense of color + progression in the master CPT. Set this to **z** to reverse the sign + of z-values in the color table. Note that this change of z-direction + happens before ``truncate`` and ``series`` values are used so the + latter must be compatible with the changed z-range. See also + :gmt-docs:`reference/features.html#manipulating-cpts`. + overrule_bg : str + Overrule background, foreground, and NaN colors specified in the master + CPT with the values of the parameters :gmt-term:`COLOR_BACKGROUND`, + :gmt-term:`COLOR_FOREGROUND`, and :gmt-term:`COLOR_NAN` specified in + the :gmt-docs:`gmt.conf <gmt.conf>` file. When combined with + ``background``, only :gmt-term:`COLOR_NAN` is considered. + no_bg : bool + Do not write out the background, foreground, and NaN-color fields + [Default will write them, i.e. ``no_bg=False``]. + log : bool + For logarithmic interpolation scheme with input given as logarithms. + Expects input z-values provided via ``series`` to be log10(*z*), + assigns colors, and writes out *z*. + continuous : bool + Force a continuous CPT when building from a list of colors and a list + of z-values [Default is None, i.e. discrete values]. + categorical : bool + Do not interpolate the input color table but pick the output colors + starting at the beginning of the color table, until colors for all + intervals are assigned. This is particularly useful in combination with + a categorical color table, like ``cmap="categorical"``. + cyclic : bool + Produce a wrapped (cyclic) color table that endlessly repeats its + range. Note that ``cyclic=True`` cannot be set together with + ``categorical=True``. + {verbose} + + Example + ------- + >>> import pygmt + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = pygmt.datasets.load_earth_relief("30m", registration="gridline") + >>> # create a plot + >>> fig = pygmt.Figure() + >>> # create a CPT from the grid object with grd2cpt + >>> pygmt.grd2cpt(grid=grid) + >>> # plot the grid object, the CPT will be automatically used + >>> fig.grdimage(grid=grid) + >>> # show the plot + >>> fig.show() + """ + if kwargs.get("W") is not None and kwargs.get("Ww") is not None: + msg = "Set only 'categorical' or 'cyclic' to True, not both." + raise GMTInvalidInput(msg) + + if (output := kwargs.pop("H", None)) is not None: + kwargs["H"] = True + + with Session() as lib: + with lib.virtualfile_in(check_kind="raster", data=grid) as vingrd: + lib.call_module( + module="grd2cpt", + args=build_arg_list(kwargs, infile=vingrd, outfile=output), + )
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grd2xyz.html b/v0.14.0/_modules/pygmt/src/grd2xyz.html new file mode 100644 index 00000000000..b258620434c --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grd2xyz.html @@ -0,0 +1,378 @@ + + + + + + + + pygmt.src.grd2xyz — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grd2xyz

+"""
+grd2xyz - Convert grid to data table
+"""
+
+from typing import Literal
+
+import numpy as np
+import pandas as pd
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+    validate_output_table_type,
+)
+
+__doctest_skip__ = ["grd2xyz"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + C="cstyle", + R="region", + V="verbose", + W="weight", + Z="convention", + b="binary", + d="nodata", + f="coltypes", + h="header", + o="outcols", + s="skiprows", +) +@kwargs_to_strings(R="sequence", o="sequence_comma") +def grd2xyz( + grid, + output_type: Literal["pandas", "numpy", "file"] = "pandas", + outfile: str | None = None, + **kwargs, +) -> pd.DataFrame | np.ndarray | None: + r""" + Convert grid to data table. + + Read a grid and output xyz-triplets as a :class:`numpy.ndarray`, + :class:`pandas.DataFrame`, or ASCII file. + + Full option list at :gmt-docs:`grd2xyz.html` + + {aliases} + + Parameters + ---------- + {grid} + {output_type} + {outfile} + cstyle : str + [**f**\|\ **i**]. + Replace the x- and y-coordinates on output with the corresponding + column and row numbers. These start at 0 (C-style counting); append + **f** to start at 1 (Fortran-style counting). Alternatively, append + **i** to write just the two columns *index* and *z*, where *index* + is the 1-D indexing that GMT uses when referring to grid nodes. + {region} + Adding ``region`` will select a subsection of the grid. If this + subsection exceeds the boundaries of the grid, only the common region + will be output. + weight : str + [**a**\ [**+u**\ *unit*]\|\ *weight*]. + Write out *x,y,z,w*\ , where *w* is the supplied *weight* (or 1 if not + supplied) [Default writes *x,y,z* only]. Choose **a** to compute + weights equal to the area each node represents. For Cartesian grids + this is simply the product of the *x* and *y* increments (except for + gridline-registered grids at all sides [half] and corners [quarter]). + For geographic grids we default to a length unit of **k**. Change + this by appending **+u**\ *unit*. For such grids, the area + varies with latitude and also sees special cases for + gridline-registered layouts at sides, corners, and poles. + {verbose} + convention : str + [*flags*]. + Write a 1-column ASCII [or binary] table. Output will be organized + according to the specified ordering convention contained in *flags*. + If data should be written by rows, make *flags* start with + **T** (op) if first row is y = ymax or + **B** (ottom) if first row is y = ymin. Then, + append **L** or **R** to indicate that first element should start at + left or right end of row. Likewise for column formats: start with + **L** or **R** to position first column, and then append **T** or + **B** to position first element in a row. For gridline registered + grids: If grid is periodic in x but the written data should not + contain the (redundant) column at x = xmax, append **x**. For grid + periodic in y, skip writing the redundant row at y = ymax by + appending **y**. If the byte-order needs to be swapped, append + **w**. Select one of several data types (all binary except **a**): + + - **a**: ASCII representation of a single item per record + - **c**: int8_t, signed 1-byte character + - **u**: uint8_t, unsigned 1-byte character + - **h**: int16_t, short 2-byte integer + - **H**: uint16_t, unsigned short 2-byte integer + - **i**: int32_t, 4-byte integer + - **I**: uint32_t, unsigned 4-byte integer + - **l**: int64_t, long (8-byte) integer + - **L**: uint64_t, unsigned long (8-byte) integer + - **f**: 4-byte floating point single precision + - **d**: 8-byte floating point double precision + + Default format is scanline orientation of ASCII numbers: **TLa**. + {binary} + {nodata} + {coltypes} + {header} + {outcols} + {skiprows} + + Returns + ------- + ret + Return type depends on ``outfile`` and ``output_type``: + + - ``None`` if ``outfile`` is set (output will be stored in the file set by + ``outfile``) + - :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile`` is not set + (depends on ``output_type``) + + Example + ------- + >>> import pygmt + >>> # Load a grid of @earth_relief_30m data, with a longitude range of + >>> # 10° E to 30° E, and a latitude range of 15° N to 25° N + >>> grid = pygmt.datasets.load_earth_relief( + ... resolution="30m", region=[10, 30, 15, 25] + ... ) + >>> # Create a pandas.DataFrame with the xyz data from an input grid + >>> xyz_dataframe = pygmt.grd2xyz(grid=grid, output_type="pandas") + >>> xyz_dataframe.head(n=2) + lon lat z + 0 10.0 25.0 965.5 + 1 10.5 25.0 876.5 + """ + output_type = validate_output_table_type(output_type, outfile=outfile) + + if kwargs.get("o") is not None and output_type == "pandas": + msg = ( + "If 'outcols' is specified, 'output_type' must be either 'numpy' " + "or 'file'." + ) + raise GMTInvalidInput(msg) + # Set the default column names for the pandas DataFrame header. + column_names: list[str] = ["x", "y", "z"] + # Let output pandas column names match input DataArray dimension names + if output_type == "pandas" and isinstance(grid, xr.DataArray): + # Reverse the dims because it is rows, columns ordered. + column_names = [str(grid.dims[1]), str(grid.dims[0]), str(grid.name)] + + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="raster", data=grid) as vingrd, + lib.virtualfile_out(kind="dataset", fname=outfile) as vouttbl, + ): + lib.call_module( + module="grd2xyz", + args=build_arg_list(kwargs, infile=vingrd, outfile=vouttbl), + ) + return lib.virtualfile_to_dataset( + vfname=vouttbl, output_type=output_type, column_names=column_names + )
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdclip.html b/v0.14.0/_modules/pygmt/src/grdclip.html new file mode 100644 index 00000000000..84b86f7aa1c --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdclip.html @@ -0,0 +1,308 @@ + + + + + + + + pygmt.src.grdclip — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdclip

+"""
+grdclip - Change the range and extremes of grid values.
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["grdclip"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + R="region", + Sa="above", + Sb="below", + Si="between", + Sr="new", + V="verbose", +) +@kwargs_to_strings( + R="sequence", + Sa="sequence", + Sb="sequence", + Si="sequence", + Sr="sequence", +) +def grdclip(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | None: + r""" + Set values in a grid that meet certain criteria to a new value. + + Produce a clipped ``outgrid`` or :class:`xarray.DataArray` version of the + input ``grid`` file. + + The parameters ``above`` and ``below`` allow for a given value to be set + for values above or below a set amount, respectively. This allows for + extreme values in a grid, such as points below a certain depth when + plotting Earth relief, to all be set to the same value. + + Full option list at :gmt-docs:`grdclip.html` + + {aliases} + + Parameters + ---------- + {grid} + {outgrid} + {region} + above : str or list + [*high*, *above*]. + Set all data[i] > *high* to *above*. + below : str or list + [*low*, *below*]. + Set all data[i] < *low* to *below*. + between : str or list + [*low*, *high*, *between*]. + Set all data[i] >= *low* and <= *high* to *between*. + new : str or list + [*old*, *new*]. + Set all data[i] == *old* to *new*. This is mostly useful when + your data are known to be integer values. + {verbose} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - ``None`` if ``outgrid`` is set (grid output will be stored in the file set by + ``outgrid``) + + Example + ------- + >>> import pygmt + >>> # Load a grid of @earth_relief_30m data, with a longitude range of + >>> # 10° E to 30° E, and a latitude range of 15° N to 25° N + >>> grid = pygmt.datasets.load_earth_relief( + ... resolution="30m", region=[10, 30, 15, 25] + ... ) + >>> # Report the minimum and maximum data values + >>> [grid.data.min(), grid.data.max()] + [183.5, 1807.0] + >>> # Create a new grid from an input grid. Set all values below 1,000 to + >>> # 0 and all values above 1,500 to 10,000 + >>> new_grid = pygmt.grdclip(grid=grid, below=[1000, 0], above=[1500, 10000]) + >>> # Report the minimum and maximum data values + >>> [new_grid.data.min(), new_grid.data.max()] + [0.0, 10000.0] + """ + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="raster", data=grid) as vingrd, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="grdclip", args=build_arg_list(kwargs, infile=vingrd) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdcontour.html b/v0.14.0/_modules/pygmt/src/grdcontour.html new file mode 100644 index 00000000000..f80388753a7 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdcontour.html @@ -0,0 +1,361 @@ + + + + + + + + pygmt.src.grdcontour — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdcontour

+"""
+grdcontour - Plot a contour figure.
+"""
+
+from pygmt.clib import Session
+from pygmt.helpers import (
+    build_arg_list,
+    deprecate_parameter,
+    fmt_docstring,
+    is_nonstr_iter,
+    kwargs_to_strings,
+    use_alias,
+)
+
+__doctest_skip__ = ["grdcontour"]
+
+
+@fmt_docstring
+@deprecate_parameter("interval", "levels", "v0.12.0", remove_version="v0.16.0")
+@use_alias(
+    A="annotation",
+    B="frame",
+    C="levels",
+    G="label_placement",
+    J="projection",
+    L="limit",
+    Q="cut",
+    R="region",
+    S="resample",
+    V="verbose",
+    W="pen",
+    l="label",
+    c="panel",
+    f="coltypes",
+    p="perspective",
+    t="transparency",
+)
+@kwargs_to_strings(R="sequence", L="sequence", c="sequence_comma", p="sequence")
+def grdcontour(self, grid, **kwargs):
+    r"""
+    Convert grids or images to contours and plot them on maps.
+
+    Takes a grid file name or an :class:`xarray.DataArray` object as input.
+
+    Full option list at :gmt-docs:`grdcontour.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    {grid}
+    levels : float, list, or str
+        Specify the contour lines to generate.
+
+        - The file name of a CPT file where the color boundaries will be used as
+          contour levels.
+        - The file name of a 2 (or 3) column file containing the contour levels (col 0),
+          (**C**)ontour or (**A**)nnotate (col 1), and optional angle (col 2).
+        - A fixed contour interval.
+        - A list of contour levels.
+    annotation : float, list, or str
+        Specify or disable annotated contour levels, modifies annotated
+        contours specified in ``levels``.
+
+        - Specify a fixed annotation interval.
+        - Specify a list of annotation levels.
+        - Disable all annotations by setting ``annotation="n"``.
+        - Adjust the appearance by appending different modifiers, e.g.,
+          ``"annot_int+f10p+gred"`` gives annotations with a font size of 10 points
+          and a red filled box. For all available modifiers see
+          :gmt-docs:`grdcontour.html#a`.
+    limit : str or list of 2 ints
+        *low*/*high*.
+        Do no draw contours below `low` or above `high`, specify as string
+    cut : str or int
+        Do not draw contours with less than `cut` number of points.
+    resample : str or int
+        Resample smoothing factor.
+    {projection}
+    {region}
+    {frame}
+    label_placement : str
+        [**d**\|\ **f**\|\ **n**\|\ **l**\|\ **L**\|\ **x**\|\ **X**]\
+        *args*.
+        Control the placement of labels along the quoted lines. It supports
+        five controlling algorithms. See :gmt-docs:`grdcontour.html#g` for
+        details.
+    {verbose}
+    pen : str or list
+        [*type*]\ *pen*\ [**+c**\ [**l**\|\ **f**]].
+        *type*, if present, can be **a** for annotated contours or **c** for regular
+        contours [Default]. The pen sets the attributes for the particular line.
+        Default pen for annotated contours is ``"0.75p,black"`` and for regular
+        contours ``"0.25p,black"``. Normally, all contours are drawn with a fixed
+        color determined by the pen setting. If **+cl** is appended the colors of the
+        contour lines are taken from the CPT (see ``levels``). If **+cf** is
+        appended the colors from the CPT file are applied to the contour annotations.
+        Select **+c** for both effects.
+    {panel}
+    {coltypes}
+    label : str
+        Add a legend entry for the contour being plotted. Normally, the
+        annotated contour is selected for the legend. You can select the
+        regular contour instead, or both of them, by considering the label
+        to be of the format [*annotcontlabel*][/*contlabel*]. If either
+        label contains a slash (/) character then use ``|`` as the
+        separator for the two labels instead.
+    {perspective}
+    {transparency}
+
+    Example
+    -------
+    >>> import pygmt
+    >>> # Load the 15 arc-minutes grid with "gridline" registration in the
+    >>> # specified region
+    >>> grid = pygmt.datasets.load_earth_relief(
+    ...     resolution="15m",
+    ...     region=[-92.5, -82.5, -3, 7],
+    ...     registration="gridline",
+    ... )
+    >>> # Create a new plot with pygmt.Figure()
+    >>> fig = pygmt.Figure()
+    >>> # Create the contour plot
+    >>> fig.grdcontour(
+    ...     # Pass in the grid downloaded above
+    ...     grid=grid,
+    ...     # Set the interval for contour lines at 250 meters
+    ...     levels=250,
+    ...     # Set the interval for annotated contour lines at 1,000 meters
+    ...     annotation=1000,
+    ...     # Add a frame for the plot
+    ...     frame="a",
+    ...     # Set the projection to Mercator for the 10 cm figure
+    ...     projection="M10c",
+    ... )
+    >>> # Show the plot
+    >>> fig.show()
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    # Specify levels for the annotation and levels parameters.
+    # One level is converted to a string with a trailing comma to separate it from
+    # specifying an interval.
+    # Multiple levels are concatenated to a comma-separated string.
+    for arg in ["A", "C"]:
+        if is_nonstr_iter(kwargs.get(arg)):
+            if len(kwargs[arg]) == 1:  # One level
+                kwargs[arg] = str(kwargs[arg][0]) + ","
+            else:  # Multiple levels
+                kwargs[arg] = ",".join(f"{item}" for item in kwargs[arg])
+
+    with Session() as lib:
+        with lib.virtualfile_in(check_kind="raster", data=grid) as vingrd:
+            lib.call_module(
+                module="grdcontour", args=build_arg_list(kwargs, infile=vingrd)
+            )
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdcut.html b/v0.14.0/_modules/pygmt/src/grdcut.html new file mode 100644 index 00000000000..ddcee0dfcd8 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdcut.html @@ -0,0 +1,320 @@ + + + + + + + + pygmt.src.grdcut — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdcut

+"""
+grdcut - Extract subregion from a grid.
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.helpers import (
+    GMTTempFile,
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+)
+from pygmt.io import load_dataarray
+
+__doctest_skip__ = ["grdcut"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + G="outgrid", + R="region", + J="projection", + N="extend", + S="circ_subregion", + V="verbose", + Z="z_subregion", + f="coltypes", +) +@kwargs_to_strings(R="sequence") +def grdcut(grid, **kwargs) -> xr.DataArray | None: + r""" + Extract subregion from a grid. + + Produce a new ``outgrid`` file which is a subregion of ``grid``. The + subregion is specified with ``region``; the specified range must not exceed + the range of ``grid`` (but see ``extend``). If in doubt, run + :func:`pygmt.grdinfo` to check range. Alternatively, define the subregion + indirectly via a range check on the node values or via distances from a + given point. Finally, you can give ``projection`` for oblique projections + to determine the corresponding rectangular ``region`` that will give a grid + that fully covers the oblique domain. + + Full option list at :gmt-docs:`grdcut.html` + + {aliases} + + Parameters + ---------- + {grid} + {outgrid} + {projection} + {region} + extend : bool or float + Allow grid to be extended if new ``region`` exceeds existing + boundaries. Give a value to initialize nodes outside current region. + circ_subregion : str + *lon/lat/radius*\[\ *unit*\][**+n**]. + Specify an origin (*lon* and *lat*) and *radius*; append a distance + *unit* and we determine the corresponding rectangular region so that + all grid nodes on or inside the circle are contained in the subset. + If **+n** is appended we set all nodes outside the circle to NaN. + z_subregion : str + [*min/max*\][**+n**\|\ **N**\|\ **r**]. + Determine a new rectangular region so that all nodes outside this + region are also outside the given z-range [-inf/+inf]. To indicate no + limit on *min* or *max* only, specify a hyphen (-). Normally, any NaNs + encountered are simply skipped and not considered in the + range-decision. Append **+n** to consider a NaN to be outside the given + z-range. This means the new subset will be NaN-free. Alternatively, + append **+r** to consider NaNs to be within the data range. In this + case we stop shrinking the boundaries once a NaN is found [Default + simply skips NaNs when making the range decision]. Finally, if your + core subset grid is surrounded by rows and/or columns that are all + NaNs, append **+N** to strip off such columns before (optionally) + considering the range of the core subset for further reduction of the + area. + + {verbose} + {coltypes} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - ``None`` if ``outgrid`` is set (grid output will be stored in the file set by + ``outgrid``) + + Example + ------- + >>> import pygmt + >>> # Load a grid of @earth_relief_30m data, with a longitude range of + >>> # 10° E to 30° E, and a latitude range of 15° N to 25° N + >>> grid = pygmt.datasets.load_earth_relief( + ... resolution="30m", region=[10, 30, 15, 25] + ... ) + >>> # Create a new grid from an input grid, with a longitude range of + >>> # 12° E to 15° E and a latitude range of 21° N to 24° N + >>> new_grid = pygmt.grdcut(grid=grid, region=[12, 15, 21, 24]) + """ + with GMTTempFile(suffix=".nc") as tmpfile: + with Session() as lib: + with lib.virtualfile_in(check_kind="raster", data=grid) as vingrd: + if (outgrid := kwargs.get("G")) is None: + kwargs["G"] = outgrid = tmpfile.name # output to tmpfile + lib.call_module( + module="grdcut", args=build_arg_list(kwargs, infile=vingrd) + ) + + return load_dataarray(outgrid) if outgrid == tmpfile.name else None
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdfill.html b/v0.14.0/_modules/pygmt/src/grdfill.html new file mode 100644 index 00000000000..ce74aacff80 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdfill.html @@ -0,0 +1,292 @@ + + + + + + + + pygmt.src.grdfill — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdfill

+"""
+grdfill - Fill blank areas from a grid.
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["grdfill"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + A="mode", + N="no_data", + R="region", + V="verbose", +) +@kwargs_to_strings(R="sequence") +def grdfill(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | None: + r""" + Fill blank areas from a grid file. + + Read a grid that presumably has unfilled holes that the user wants to + fill in some fashion. Holes are identified by NaN values but this + criteria can be changed via the ``no_data`` parameter. There are several + different algorithms that can be used to replace the hole values. + + Full option list at :gmt-docs:`grdfill.html` + + {aliases} + + Parameters + ---------- + {grid} + {outgrid} + mode : str + Specify the hole-filling algorithm to use. Choose from **c** for + constant fill and append the constant value, **n** for nearest + neighbor (and optionally append a search radius in + pixels [default radius is :math:`r^2 = \sqrt{{ X^2 + Y^2 }}`, + where (*X,Y*) are the node dimensions of the grid]), or + **s** for bicubic spline (optionally append a *tension* + parameter [Default is no tension]). + no_data : float + Set the node value used to identify a point as a member of a hole + [Default is NaN]. + + {region} + {verbose} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - ``None`` if ``outgrid`` is set (grid output will be stored in the file set by + ``outgrid``) + + Example + ------- + >>> import pygmt + >>> # Load a bathymetric grid with missing data + >>> earth_relief_holes = pygmt.datasets.load_sample_data(name="earth_relief_holes") + >>> # Perform grid filling operations on the sample grid + >>> # Set all empty values to "20" + >>> filled_grid = pygmt.grdfill(grid=earth_relief_holes, mode="c20") + """ + if kwargs.get("A") is None and kwargs.get("L") is None: + msg = "At least parameter 'mode' or 'L' must be specified." + raise GMTInvalidInput(msg) + + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="raster", data=grid) as vingrd, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="grdfill", args=build_arg_list(kwargs, infile=vingrd) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdfilter.html b/v0.14.0/_modules/pygmt/src/grdfilter.html new file mode 100644 index 00000000000..7d8da67d41f --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdfilter.html @@ -0,0 +1,345 @@ + + + + + + + + pygmt.src.grdfilter — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdfilter

+"""
+grdfilter - Filter a grid in the space (or time) domain.
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+
+
+[docs] +@fmt_docstring +@use_alias( + D="distance", + F="filter", + I="spacing", + N="nans", + R="region", + T="toggle", + V="verbose", + f="coltypes", + r="registration", + x="cores", +) +@kwargs_to_strings(I="sequence", R="sequence") +def grdfilter(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | None: + r""" + Filter a grid in the space (or time) domain. + + Filter a grid file in the space (or time) domain using one of the selected + convolution or non-convolution isotropic or rectangular filters and compute + distances using Cartesian or Spherical geometries. The output grid file + can optionally be generated as a sub-region of the input (via ``region``) + and/or with new increment (via ``spacing``) or registration + (via ``toggle``). In this way, one may have "extra space" in the input + data so that the edges will not be used and the output can be within one + half-width of the input edges. If the filter is low-pass, then the output + may be less frequently sampled than the input. + + Full option list at :gmt-docs:`grdfilter.html` + + {aliases} + + Parameters + ---------- + {grid} + {outgrid} + filter : str + **b**\|\ **c**\|\ **g**\|\ **o**\|\ **m**\|\ **p**\|\ **h**\ *width*\ + [/*width2*\][*modifiers*]. + Name of the filter type you wish to apply, followed by the *width*: + + - **b** - Box Car + - **c** - Cosine Arch + - **g** - Gaussian + - **o** - Operator + - **m** - Median + - **p** - Maximum Likelihood probability + - **h** - Histogram + + distance : str + State how the grid (x,y) relates to the filter *width*: + + - ``"p"``: grid (px,py) with *width* an odd number of pixels, + Cartesian distances. + - ``"0"``: grid (x,y) same units as *width*, Cartesian distances. + - ``"1"``: grid (x,y) in degrees, *width* in kilometers, Cartesian + distances. + - ``"2"``: grid (x,y) in degrees, *width* in km, dx scaled by + cos(middle y), Cartesian distances. + + The above options are fastest because they allow weight matrix to be + computed only once. The next three options are slower because they + recompute weights for each latitude. + + - ``"3"``: grid (x,y) in degrees, *width* in km, dx scaled by cos(y), + Cartesian distance calculation. + - ``"4"``: grid (x,y) in degrees, *width* in km, Spherical distance + calculation. + - ``"5"``: grid (x,y) in Mercator ``projection="m1"`` img units, + *width* in km, Spherical distance calculation. + + {spacing} + nans : str or float + **i**\|\ **p**\|\ **r**. + Determine how NaN-values in the input grid affect the filtered output. + Use **i** to ignore all NaNs in the calculation of the filtered value + [Default]. **r** is same as **i** except if the input node was NaN then + the output node will be set to NaN (only applies if both grids are + co-registered). **p** will force the filtered value to be NaN if any + grid nodes with NaN-values are found inside the filter circle. + {region} + toggle : bool + Toggle the node registration for the output grid to get the opposite of + the input grid [Default gives the same registration as the input grid]. + {verbose} + {coltypes} + {registration} + {cores} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - ``None`` if ``outgrid`` is set (grid output will be stored in the file set by + ``outgrid``) + + Examples + -------- + >>> from pathlib import Path + >>> import pygmt + >>> # Apply a filter of 600 km (full width) to the @earth_relief_30m_g file + >>> # and return a filtered field (saved as netCDF) + >>> pygmt.grdfilter( + ... grid="@earth_relief_30m_g", + ... filter="m600", + ... distance="4", + ... region=[150, 250, 10, 40], + ... spacing=0.5, + ... outgrid="filtered_pacific.nc", + ... ) + >>> Path("filtered_pacific.nc").unlink() # Cleanup file + >>> # Apply a Gaussian smoothing filter of 600 km to the input DataArray + >>> # and return a filtered DataArray with the smoothed field + >>> grid = pygmt.datasets.load_earth_relief() + >>> smooth_field = pygmt.grdfilter(grid=grid, filter="g600", distance="4") + """ + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="raster", data=grid) as vingrd, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="grdfilter", args=build_arg_list(kwargs, infile=vingrd) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdgradient.html b/v0.14.0/_modules/pygmt/src/grdgradient.html new file mode 100644 index 00000000000..59c28f31017 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdgradient.html @@ -0,0 +1,387 @@ + + + + + + + + pygmt.src.grdgradient — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdgradient

+"""
+grdgradient - Compute directional gradients from a grid.
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    args_in_kwargs,
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+)
+
+__doctest_skip__ = ["grdgradient"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + A="azimuth", + D="direction", + E="radiance", + N="normalize", + Q="tiles", + R="region", + S="slope_file", + V="verbose", + f="coltypes", + n="interpolation", +) +@kwargs_to_strings(A="sequence", E="sequence", R="sequence") +def grdgradient(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | None: + r""" + Compute the directional derivative of the vector gradient of the data. + + Can accept ``azimuth``, ``direction``, and ``radiance`` input to create + the resulting gradient. + + Full option list at :gmt-docs:`grdgradient.html` + + {aliases} + + Parameters + ---------- + {grid} + {outgrid} + azimuth : float, str, or list + *azim*\ [/*azim2*]. + Azimuthal direction for a directional derivative; *azim* is the + angle in the x,y plane measured in degrees positive clockwise from + north (the +y direction) toward east (the +x direction). The + negative of the directional derivative, + :math:`-(\frac{{dz}}{{dx}}\sin(\mbox{{azim}}) + \ + \frac{{dz}}{{dy}}\cos(\mbox{{azim}}))`, is found; negation yields + positive values when the slope of :math:`z(x,y)` is downhill in the + *azim* direction, the correct sense for shading the illumination of an + image by a light source above the x,y plane shining from the *azim* + direction. Optionally, supply two azimuths, *azim*/*azim2*, in which + case the gradients in each of these directions are calculated and the + one larger in magnitude is retained; this is useful for illuminating + data with two directions of lineated structures, e.g., *0*/*270* + illuminates from the north (top) and west (left). Finally, if *azim* + is a file it must be a grid of the same domain, spacing and + registration as *grid* that will update the azimuth at each output + node when computing the directional derivatives. + direction : str + [**a**][**c**][**o**][**n**]. + Find the direction of the positive (up-slope) gradient of the data. + The following options are supported: + + - **a** - Find the aspect (i.e., the down-slope direction) + - **c** - Use the conventional Cartesian angles measured + counterclockwise from the positive x (east) direction. + - **o** - Report orientations (0-180) rather than directions (0-360). + - **n** - Add 90 degrees to all angles (e.g., to give local strikes of + the surface). + radiance : str or list + [**m**\|\ **s**\|\ **p**]\ *azim/elev*\ [**+a**\ *ambient*][**+d**\ + *diffuse*][**+p**\ *specular*][**+s**\ *shine*]. + Compute Lambertian radiance appropriate to use with + :meth:`pygmt.Figure.grdimage` and :meth:`pygmt.Figure.grdview`. The + Lambertian Reflection assumes an ideal surface that reflects all the + light that strikes it and the surface appears + equally bright from all viewing directions. Here, *azim* and *elev* are + the azimuth and elevation of the light vector. Optionally, supply + *ambient* [0.55], *diffuse* [0.6], *specular* [0.4], or *shine* [10], + which are parameters that control the reflectance properties of the + surface. Default values are given in the brackets. Use **s** for a + simpler Lambertian algorithm. Note that with this form you only have + to provide azimuth and elevation. Alternatively, use **p** for + the Peucker piecewise linear approximation (simpler but faster + algorithm; in this case *azim* and *elev* are hardwired to 315 + and 45 degrees. This means that even if you provide other values + they will be ignored.). + normalize : str or bool + [**e**\|\ **t**][*amp*][**+a**\ *ambient*][**+s**\ *sigma*]\ + [**+o**\ *offset*]. + The actual gradients :math:`g` are offset and scaled to produce + normalized gradients :math:`g_n` with a maximum output magnitude of + *amp*. If *amp* is not given, default *amp* = 1. If *offset* is not + given, it is set to the average of :math:`g`. The following forms are + supported: + + - **True** - Normalize using :math:`g_n = \mbox{{amp}}\ + (\frac{{g - \mbox{{offset}}}}{{max(|g - \mbox{{offset}}|)}})` + - **e** - Normalize using a cumulative Laplace distribution yielding: + :math:`g_n = \mbox{{amp}}(1 - \ + \exp{{(\sqrt{{2}}\frac{{g - \mbox{{offset}}}}{{\sigma}}))}}`, where + :math:`\sigma` is estimated using the L1 norm of + :math:`(g - \mbox{{offset}})` if it is not given. + - **t** - Normalize using a cumulative Cauchy distribution yielding: + :math:`g_n = \ + \frac{{2(\mbox{{amp}})}}{{\pi}}(\tan^{{-1}}(\frac{{g - \ + \mbox{{offset}}}}{{\sigma}}))` where :math:`\sigma` is estimated + using the L2 norm of :math:`(g - \mbox{{offset}})` if it is not + given. + + As a final option, you may add **+a**\ *ambient* to add *ambient* to + all nodes after gradient calculations are completed. + tiles : str + **c**\|\ **r**\|\ **R**. + Control how normalization via ``normalize`` is carried out. When + multiple grids should be normalized the same way (i.e., with the same + *offset* and/or *sigma*), + we must pass these values via ``normalize``. However, this is + inconvenient if we compute these values from a grid. Use **c** to + save the results of *offset* and *sigma* to a statistics file; if + grid output is not needed for this run then do not specify + ``outgrid``. For subsequent runs, just use **r** to read these + values. Using **R** will read then delete the statistics file. + {region} + slope_file : str + Name of output grid file with scalar magnitudes of gradient vectors. + Requires ``direction`` but makes ``outgrid`` optional. + {verbose} + {coltypes} + {interpolation} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - ``None`` if ``outgrid`` is set (grid output will be stored in the file set by + ``outgrid``) + + + Example + ------- + >>> import pygmt + >>> # Load a grid of @earth_relief_30m data, with a longitude range of + >>> # 10° E to 30° E, and a latitude range of 15° N to 25° N + >>> grid = pygmt.datasets.load_earth_relief( + ... resolution="30m", region=[10, 30, 15, 25] + ... ) + >>> # Create a new grid from an input grid, set the azimuth to 10 degrees, + >>> new_grid = pygmt.grdgradient(grid=grid, azimuth=10) + """ + if kwargs.get("Q") is not None and kwargs.get("N") is None: + msg = "Must specify normalize if tiles is specified." + raise GMTInvalidInput(msg) + if not args_in_kwargs(args=["A", "D", "E"], kwargs=kwargs): + msg = ( + "At least one of the following parameters must be specified: " + "azimuth, direction, or radiance." + ) + raise GMTInvalidInput(msg) + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="raster", data=grid) as vingrd, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="grdgradient", args=build_arg_list(kwargs, infile=vingrd) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdhisteq.html b/v0.14.0/_modules/pygmt/src/grdhisteq.html new file mode 100644 index 00000000000..e0781f6799d --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdhisteq.html @@ -0,0 +1,466 @@ + + + + + + + + pygmt.src.grdhisteq — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdhisteq

+"""
+grdhisteq - Perform histogram equalization for a grid.
+"""
+
+from typing import Literal
+
+import numpy as np
+import pandas as pd
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+    validate_output_table_type,
+)
+
+__doctest_skip__ = ["grdhisteq.*"]
+
+
+
+[docs] +class grdhisteq: # noqa: N801 + r""" + Perform histogram equalization for a grid. + + Two common use cases of :class:`pygmt.grdhisteq` are to find data values + that divide a grid into patches of equal area + (:meth:`pygmt.grdhisteq.compute_bins`) or to write a grid with + statistics based on some kind of cumulative distribution function + (:meth:`pygmt.grdhisteq.equalize_grid`). + + Histogram equalization provides a way to highlight data that has most + values clustered in a small portion of the dynamic range, such as a + grid of flat topography with a mountain in the middle. Ordinary gray + shading of this grid (using :meth:`pygmt.Figure.grdimage` or + :meth:`pygmt.Figure.grdview`) with a linear mapping from topography to + graytone will result in most of the image being very dark gray, with the + mountain being almost white. :meth:`pygmt.grdhisteq.compute_bins` can + provide a list of data values that divide the data range into divisions + which have an equal area in the image [Default is 16 if ``divisions`` is + not set]. The :class:`pandas.DataFrame` or ASCII file output can be used to + make a colormap with :func:`pygmt.makecpt` and an image with + :meth:`pygmt.Figure.grdimage` that has all levels of gray occurring + equally. + + :meth:`pygmt.grdhisteq.equalize_grid` provides a way to write a grid with + statistics based on a cumulative distribution function. In this + application, the ``outgrid`` has relative highs and lows in the same + (x,y) locations as the ``grid``, but the values are changed to reflect + their place in the cumulative distribution. + """ + +
+[docs] + @staticmethod + @fmt_docstring + @use_alias( + C="divisions", + R="region", + N="gaussian", + Q="quadratic", + V="verbose", + h="header", + ) + @kwargs_to_strings(R="sequence") + def equalize_grid( + grid, outgrid: str | None = None, **kwargs + ) -> xr.DataArray | None: + r""" + Perform histogram equalization for a grid. + + :meth:`pygmt.grdhisteq.equalize_grid` provides a way to write a grid + with statistics based on a cumulative distribution function. The + ``outgrid`` has relative highs and lows in the same (x,y) locations as + the ``grid``, but the values are changed to reflect their place in the + cumulative distribution. + + Full option list at :gmt-docs:`grdhisteq.html` + + {aliases} + + Parameters + ---------- + {grid} + {outgrid} + divisions : int + Set the number of divisions of the data range. + gaussian : bool or int or float + *norm*. + Produce an output grid with standard normal scores using + ``gaussian=True`` or force the scores to fall in the ±\ *norm* + range. + quadratic: bool + Perform quadratic equalization [Default is linear]. + {region} + {verbose} + + Returns + ------- + ret + Return type depends on the ``outgrid`` parameter: + + - :class:`xarray.DataArray` if ``outgrid`` is ``None`` + - ``None`` if ``outgrid`` is a str (grid output is stored in ``outgrid``) + + Example + ------- + >>> import pygmt + >>> # Load a grid of @earth_relief_30m data, with a longitude range + >>> # of 10°E to 30°E, and a latitude range of 15°N to 25°N + >>> grid = pygmt.datasets.load_earth_relief( + ... resolution="30m", region=[10, 30, 15, 25] + ... ) + >>> # Create a new grid with a Gaussian data distribution + >>> grid = pygmt.grdhisteq.equalize_grid(grid=grid, gaussian=True) + + See Also + -------- + :func:`pygmt.grd2cpt` + + Note + ---- + This method does a weighted histogram equalization for geographic + grids to account for node area varying with latitude. + """ + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="raster", data=grid) as vingrd, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="grdhisteq", args=build_arg_list(kwargs, infile=vingrd) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ + +
+[docs] + @staticmethod + @fmt_docstring + @use_alias( + C="divisions", + R="region", + N="gaussian", + Q="quadratic", + V="verbose", + h="header", + ) + @kwargs_to_strings(R="sequence") + def compute_bins( + grid, + output_type: Literal["pandas", "numpy", "file"] = "pandas", + outfile: str | None = None, + **kwargs, + ) -> pd.DataFrame | np.ndarray | None: + r""" + Perform histogram equalization for a grid. + + Histogram equalization provides a way to highlight data that has most + values clustered in a small portion of the dynamic range, such as a + grid of flat topography with a mountain in the middle. Ordinary gray + shading of this grid (using :meth:`pygmt.Figure.grdimage` or + :meth:`pygmt.Figure.grdview`) with a linear mapping from topography to + graytone will result in most of the image being very dark gray, with + the mountain being almost white. :meth:`pygmt.grdhisteq.compute_bins` + can provide a list of data values that divide the data range into + divisions which have an equal area in the image [Default is 16 if + ``divisions`` is not set]. The :class:`pandas.DataFrame` or ASCII file + output can be used to make a colormap with :func:`pygmt.makecpt` and an + image with :meth:`pygmt.Figure.grdimage` that has all levels of gray + occurring equally. + + Full option list at :gmt-docs:`grdhisteq.html` + + {aliases} + + Parameters + ---------- + {grid} + {output_type} + {outfile} + divisions : int + Set the number of divisions of the data range. + quadratic : bool + Perform quadratic equalization [Default is linear]. + {region} + {verbose} + {header} + + Returns + ------- + ret + Return type depends on ``outfile`` and ``output_type``: + + - ``None`` if ``outfile`` is set (output will be stored in file set by + ``outfile``) + - :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile`` is not + set (depends on ``output_type``) + + Example + ------- + >>> import pygmt + >>> # Load a grid of @earth_relief_30m data, with a longitude range of + >>> # 10° E to 30° E, and a latitude range of 15° N to 25° N + >>> grid = pygmt.datasets.load_earth_relief( + ... resolution="30m", region=[10, 30, 15, 25] + ... ) + >>> # Find elevation intervals that split the data range into 5 + >>> # divisions, each of which have an equal area in the original grid. + >>> bins = pygmt.grdhisteq.compute_bins(grid=grid, divisions=5) + >>> print(bins) + start stop + bin_id + 0 183.5 395.0 + 1 395.0 472.0 + 2 472.0 575.0 + 3 575.0 709.5 + 4 709.5 1807.0 + + See Also + -------- + :func:`pygmt.grd2cpt` + + Note + ---- + This method does a weighted histogram equalization for geographic + grids to account for node area varying with latitude. + """ + output_type = validate_output_table_type(output_type, outfile=outfile) + + if kwargs.get("h") is not None and output_type != "file": + msg = "'header' is only allowed with output_type='file'." + raise GMTInvalidInput(msg) + + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="raster", data=grid) as vingrd, + lib.virtualfile_out(kind="dataset", fname=outfile) as vouttbl, + ): + kwargs["D"] = vouttbl # -D for output file name + lib.call_module( + module="grdhisteq", args=build_arg_list(kwargs, infile=vingrd) + ) + + return lib.virtualfile_to_dataset( + vfname=vouttbl, + output_type=output_type, + column_names=["start", "stop", "bin_id"], + dtype={ + "start": np.float32, + "stop": np.float32, + "bin_id": np.uint32, + }, + index_col="bin_id" if output_type == "pandas" else None, + )
+
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdimage.html b/v0.14.0/_modules/pygmt/src/grdimage.html new file mode 100644 index 00000000000..445247f4483 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdimage.html @@ -0,0 +1,382 @@ + + + + + + + + pygmt.src.grdimage — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdimage

+"""
+grdimage - Plot grids or images.
+"""
+
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+)
+
+__doctest_skip__ = ["grdimage"]
+
+
+@fmt_docstring
+@use_alias(
+    B="frame",
+    C="cmap",
+    D="img_in",
+    E="dpi",
+    G="bitcolor",
+    I="shading",
+    J="projection",
+    M="monochrome",
+    N="no_clip",
+    Q="nan_transparent",
+    R="region",
+    V="verbose",
+    n="interpolation",
+    c="panel",
+    f="coltypes",
+    p="perspective",
+    t="transparency",
+    x="cores",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
+def grdimage(self, grid, **kwargs):
+    r"""
+    Project and plot grids or images.
+
+    Reads a 2-D grid file and produces a gray-shaded (or colored) map by
+    building a rectangular image and assigning pixels a gray-shade (or color)
+    based on the z-value and the CPT file. Optionally, illumination may be
+    added by providing a file with intensities in the (-1,+1) range or
+    instructions to derive intensities from the input data grid. Values outside
+    this range will be clipped. Such intensity files can be created from the
+    grid using :func:`pygmt.grdgradient` and, optionally, modified by
+    :gmt-docs:`grdmath.html` or :class:`pygmt.grdhisteq`. Alternatively, pass
+    *image* which can be an image file (geo-referenced or not). In this case
+    the image can optionally be illuminated with the file provided via the
+    ``shading`` parameter. Here, if image has no coordinates then those of the
+    intensity file will be used.
+
+    When using map projections, the grid is first resampled on a new
+    rectangular grid with the same dimensions. Higher resolution images can
+    be obtained by using the ``dpi`` parameter. To obtain the resampled value
+    (and hence shade or color) of each map pixel, its location is inversely
+    projected back onto the input grid after which a value is interpolated
+    between the surrounding input grid values. By default bi-cubic
+    interpolation is used. Aliasing is avoided by also forward projecting
+    the input grid nodes. If two or more nodes are projected onto the same
+    pixel, their average will dominate in the calculation of the pixel
+    value. Interpolation and aliasing is controlled with the
+    ``interpolation`` parameter.
+
+    The ``region`` parameter can be used to select a map region larger or
+    smaller than that implied by the extent of the grid.
+
+    Full option list at :gmt-docs:`grdimage.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    {grid}
+    {frame}
+    {cmap}
+    img_in : str
+        [**r**].
+        GMT will automatically detect standard image files (Geotiff, TIFF,
+        JPG, PNG, GIF, etc.) and will read those via GDAL. For very obscure
+        image formats you may need to explicitly set ``img_in``, which
+        specifies that the grid is in fact an image file to be read via
+        GDAL. Append **r** to assign the region specified by ``region``
+        to the image. For example, if you have used ``region="d"`` then
+        the image will be assigned a global domain. This mode allows you
+        to project a raw image (an image without referencing coordinates).
+    dpi : int
+        [**i**\|\ *dpi*].
+        Set the resolution of the projected grid that will be created if a
+        map projection other than Linear or Mercator was selected [Default
+        is ``100`` dpi]. By default, the projected grid will be of the
+        same size (rows and columns) as the input file. Specify **i** to
+        use the PostScript image operator to interpolate the image at the
+        device resolution.
+    bitcolor : str
+        *color*\ [**+b**\|\ **f**\].
+        This parameter only applies when a resulting 1-bit image otherwise
+        would consist of only two colors: black (0) and white (255). If so,
+        this parameter will instead use the image as a transparent mask and
+        paint the mask with the given color. Append **+b** to paint the
+        background pixels (1) or **+f** for the foreground pixels
+        [Default is **+f**].
+    shading : str or :class:`xarray.DataArray`
+        [*intensfile*\|\ *intensity*\|\ *modifiers*].
+        Give the name of a grid file or a DataArray with intensities in the
+        (-1,+1) range, or a constant intensity to apply everywhere (affects the
+        ambient light). Alternatively, derive an intensity grid from the input
+        data grid via a call to :func:`pygmt.grdgradient`; append
+        **+a**\ *azimuth*, **+n**\ *args*, and **+m**\ *ambient* to specify
+        azimuth, intensity, and ambient arguments for that function, or just
+        give **+d** to select the default arguments (``+a-45+nt1+m0``). If you
+        want a more specific intensity scenario then run
+        :func:`pygmt.grdgradient` separately first. If we should derive
+        intensities from another file than grid, specify the file with
+        suitable modifiers [Default is no illumination]. **Note**: If the
+        input data represent an *image* then an *intensfile* or constant
+        *intensity* must be provided.
+    {projection}
+    monochrome : bool
+        Force conversion to monochrome image using the (television) YIQ
+        transformation. Cannot be used with ``nan_transparent``.
+    no_clip : bool
+        Do **not** clip the image at the frame boundaries (only relevant
+        for non-rectangular maps) [Default is ``False``].
+    nan_transparent : bool or str
+        [**+z**\ *value*][*color*]
+        Make grid nodes with z = NaN transparent, using the color-masking
+        feature in PostScript Level 3 (the PS device must support PS Level
+        3). If the input is a grid, use **+z** to select another grid value
+        than NaN. If input is instead an image, append an alternate *color* to
+        select another pixel value to be transparent [Default is ``"black"``].
+    {region}
+    {verbose}
+    {panel}
+    {coltypes}
+    {interpolation}
+    {perspective}
+    {transparency}
+    {cores}
+
+    Example
+    -------
+    >>> import pygmt
+    >>> # load the 30 arc-minutes grid with "gridline" registration
+    >>> grid = pygmt.datasets.load_earth_relief("30m", registration="gridline")
+    >>> # create a new plot with pygmt.Figure()
+    >>> fig = pygmt.Figure()
+    >>> # pass in the grid and set the CPT to "geo"
+    >>> # set the projection to Mollweide and the size to 10 cm
+    >>> fig.grdimage(grid=grid, cmap="geo", projection="W10c", frame="ag")
+    >>> # show the plot
+    >>> fig.show()
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    # Do not support -A option
+    if any(kwargs.get(arg) is not None for arg in ["A", "img_out"]):
+        msg = (
+            "Parameter 'img_out'/'A' is not implemented. "
+            "Please consider submitting a feature request to us."
+        )
+        raise GMTInvalidInput(msg)
+
+    with Session() as lib:
+        with (
+            lib.virtualfile_in(check_kind="raster", data=grid) as vingrd,
+            lib.virtualfile_in(
+                check_kind="raster", data=kwargs.get("I"), required_data=False
+            ) as vshadegrid,
+        ):
+            kwargs["I"] = vshadegrid
+            lib.call_module(
+                module="grdimage", args=build_arg_list(kwargs, infile=vingrd)
+            )
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdinfo.html b/v0.14.0/_modules/pygmt/src/grdinfo.html new file mode 100644 index 00000000000..608224f7803 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdinfo.html @@ -0,0 +1,329 @@ + + + + + + + + pygmt.src.grdinfo — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdinfo

+"""
+grdinfo - Retrieve info about grid file.
+"""
+
+from pygmt.clib import Session
+from pygmt.helpers import (
+    GMTTempFile,
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+)
+
+
+
+[docs] +@fmt_docstring +@use_alias( + C="per_column", + D="tiles", + F="geographic", + I="spacing", + L="force_scan", + M="minmax_pos", + R="region", + T="nearest_multiple", + V="verbose", + f="coltypes", +) +@kwargs_to_strings(D="sequence", I="sequence", R="sequence") +def grdinfo(grid, **kwargs): + r""" + Get information about a grid. + + Can read the grid from a file or given as an :class:`xarray.DataArray` grid. + + Full option list at :gmt-docs:`grdinfo.html` + + {aliases} + + Parameters + ---------- + {grid} + {region} + per_column : str or bool + **n**\|\ **t**. + Format the report using tab-separated fields on a single line. The + output is name *w e s n z0 z1 dx dy nx ny* [ *x0 y0 x1 y1* ] + [ *med scale* ] [ *mean std rms* ] [ *n_nan* ] *registration gtype*. + The data in brackets are outputted depending on the ``force_scan`` + and ``minmax_pos`` parameters. Use **t** to place file name at the end + of the output record or, **n** or ``True`` to only output numerical + columns. The registration is either 0 (gridline) or 1 (pixel), while + gtype is either 0 (Cartesian) or 1 (geographic). The default value is + ``False``. This cannot be called if ``geographic`` is also set. + tiles : str or list + *xoff*\ [/*yoff*][**+i**]. + Divide a single grid's domain (or the ``region`` domain, if no grid + given) into tiles of size dx times dy (set via ``spacing``). You can + specify overlap between tiles by appending *xoff*\ [/*yoff*]. If the + single grid is given you may use the modifier **+i** to ignore tiles + that have no data within each tile subregion. Default output is text + region strings. Use ``per_column`` to instead report four columns with + xmin xmax ymin ymax per tile, or use ``per_column="t"`` to also have + the region string appended as trailing text. + geographic : bool + Report grid domain and x/y-increments in world mapping format. + The default value is ``False``. This cannot be called if + ``per_column`` is also set. + spacing : str or list + *dx*\ [/*dy*]\|\ **b**\|\ **i**\|\ **r**. + Report the min/max of the region to the nearest multiple of dx and dy, + and output this in the form w/e/s/n (unless ``per_column`` is set). To + report the actual grid region, append **r**. For a grid produced by + the img supplement (a Cartesian Mercator grid), the exact geographic + region is given with **i** (if not found then we return the actual + grid region instead). If no argument is given then we report the grid + increment in the form *xinc*\ [/*yinc*]. If **b** is given we write + each grid's bounding box polygon instead. Finally, if ``tiles`` is in + effect then *dx* and *dy* are the dimensions of the desired tiles. + force_scan : int or str + **0**\|\ **1**\|\ **2**\|\ **p**\|\ **a**. + + - **0**: Report range of z after actually scanning the data, not just + reporting what the header says. + - **1**: Report median and L1 scale of z (L1 scale = 1.4826 * Median + Absolute Deviation (MAD)). + - **2**: Report mean, standard deviation, and root-mean-square (rms) + of z. + - **p**: Report mode (LMS) and LMS scale of z. + - **a**: Include all of the above. + minmax_pos : bool + Include the x/y values at the location of the minimum and maximum + z-values. + nearest_multiple : str + [*dz*]\ [**+a**\ [*alpha*]]\ [**+s**]. + Determine minimum and maximum z-values. If *dz* is provided then we + first round these values off to multiples of *dz*. To exclude the + two tails of the distribution when determining the minimum and + maximum you can add **+a** to set the *alpha* value (in percent): + We then sort the grid, exclude the data in the 0.5*\ *alpha* and + 100 - 0.5*\ *alpha* tails, and revise the minimum and maximum. To + force a symmetrical range about zero, using minus/plus the maximum + absolute value of the two extremes, append **+s**. We report the + result via the text string *zmin/zmax* or *zmin/zmax/dz* + (if *dz* was given) as expected by :func:`pygmt.makecpt`. + {verbose} + {coltypes} + + Returns + ------- + info : str + A string with information about the grid. + """ + with GMTTempFile() as outfile: + with Session() as lib: + with lib.virtualfile_in(check_kind="raster", data=grid) as vingrd: + lib.call_module( + module="grdinfo", + args=build_arg_list(kwargs, infile=vingrd, outfile=outfile.name), + ) + result = outfile.read() + return result
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdlandmask.html b/v0.14.0/_modules/pygmt/src/grdlandmask.html new file mode 100644 index 00000000000..ce45aef78c7 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdlandmask.html @@ -0,0 +1,314 @@ + + + + + + + + pygmt.src.grdlandmask — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdlandmask

+"""
+grdlandmask - Create a "wet-dry" mask grid from shoreline data base
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["grdlandmask"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + A="area_thresh", + D="resolution", + E="bordervalues", + I="spacing", + N="maskvalues", + R="region", + V="verbose", + r="registration", + x="cores", +) +@kwargs_to_strings(I="sequence", R="sequence", N="sequence", E="sequence") +def grdlandmask(outgrid: str | None = None, **kwargs) -> xr.DataArray | None: + r""" + Create a grid file with set values for land and water. + + Read the selected shoreline database and create a grid to specify which + nodes in the specified grid are over land or over water. The nodes defined + by the selected region and lattice spacing + will be set according to one of two criteria: (1) land vs water, or + (2) the more detailed (hierarchical) ocean vs land vs lake + vs island vs pond. + + Full option list at :gmt-docs:`grdlandmask.html` + + {aliases} + + Parameters + ---------- + {outgrid} + {spacing} + {region} + {area_thresh} + resolution : str + *res*\[\ **+f**\]. Select the resolution of the data set to use + ((**f**)ull, (**h**)igh, (**i**)ntermediate, (**l**)ow, or + (**c**)rude). The resolution drops off by ~80% between data sets. + [Default is **l**]. Append **+f** to automatically select a lower + resolution should the one requested not be available + [abort if not found]. Alternatively, choose (**a**)uto to automatically + select the best resolution given the chosen region. Note that because + the coastlines differ in details a node in a mask file using one + resolution is not guaranteed to remain inside [or outside] when a + different resolution is selected. + bordervalues : bool, str, float, or list + Nodes that fall exactly on a polygon boundary should be + considered to be outside the polygon [Default considers them to be + inside]. Alternatively, append either a list of four values + [*cborder*, *lborder*, *iborder*, *pborder*] or just the single value + *bordervalue* (for the case when they should all be the same value). + This turns on the line-tracking mode. Now, after setting the mask + values specified via ``maskvalues`` we trace the lines and change the + node values for all cells traversed by a line to the corresponding + border value. Here, *cborder* is used for cells traversed by the + coastline, *lborder* for cells traversed by a lake outline, *iborder* + for islands-in-lakes outlines, and *pborder* for + ponds-in-islands-in-lakes outlines [Default is no line tracing]. + maskvalues : str or list + [*wet*, *dry*] or [*ocean*, *land*, *lake*, *island*, *pond*]. + Set the values that will be assigned to nodes. Values can + be any number, including the textstring NaN + [Default is [0, 1, 0, 1, 0] (i.e., [0, 1])]. Also select + ``bordervalues`` to let nodes exactly on feature boundaries be + considered outside [Default is inside]. + {verbose} + {registration} + {cores} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - ``None`` if ``outgrid`` is set (grid output will be stored in the file set by + ``outgrid``) + + Example + ------- + >>> import pygmt + >>> # Create a landmask grid with a longitude range of 125° E to 130° E, a + >>> # latitude range of 30° N to 35° N, and a grid spacing of 1 arc-degree + >>> landmask = pygmt.grdlandmask(spacing=1, region=[125, 130, 30, 35]) + """ + if kwargs.get("I") is None or kwargs.get("R") is None: + msg = "Both 'region' and 'spacing' must be specified." + raise GMTInvalidInput(msg) + + with Session() as lib: + with lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd: + kwargs["G"] = voutgrd + lib.call_module(module="grdlandmask", args=build_arg_list(kwargs)) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdproject.html b/v0.14.0/_modules/pygmt/src/grdproject.html new file mode 100644 index 00000000000..64050259a70 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdproject.html @@ -0,0 +1,326 @@ + + + + + + + + pygmt.src.grdproject — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdproject

+"""
+grdproject - Forward and inverse map transformation of grids.
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["grdproject"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + C="center", + D="spacing", + E="dpi", + F="scaling", + J="projection", + I="inverse", + M="unit", + R="region", + V="verbose", + n="interpolation", + r="registration", +) +@kwargs_to_strings(C="sequence", D="sequence", R="sequence") +def grdproject(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | None: + r""" + Change projection of gridded data between geographical and rectangular. + + This method will project a geographical gridded data set onto a + rectangular grid. If ``inverse`` is ``True``, it will project a + rectangular coordinate system to a geographic system. To obtain the value + at each new node, its location is inversely projected back onto the input + grid after which a value is interpolated between the surrounding input + grid values. By default bi-cubic interpolation is used. Aliasing is + avoided by also forward projecting the input grid nodes. If two or more + nodes are projected onto the same new node, their average will dominate in + the calculation of the new node value. Interpolation and aliasing is + controlled with the ``interpolation`` parameter. The new node spacing may + be determined in one of several ways by specifying the grid spacing, + number of nodes, or resolution. Nodes not constrained by input data are + set to NaN. The ``region`` parameter can be used to select a map region + large or smaller than that implied by the extent of the grid file. + + Full option list at :gmt-docs:`grdproject.html` + + {aliases} + + Parameters + ---------- + {grid} + {outgrid} + inverse : bool + When set to ``True`` transforms grid from rectangular to geographical + [Default is ``False``]. + {projection} + {region} + center : str or list + [*dx*, *dy*]. + Let projected coordinates be relative to projection center [Default + is relative to lower left corner]. Optionally, add offsets in the + projected units to be added (or subtracted when ``inverse`` is set) to + (from) the projected coordinates, such as false eastings and + northings for particular projection zones [Default is ``[0, 0]``]. + {spacing} + dpi : int + Set the resolution for the new grid in dots per inch. + scaling : str + [**c**\|\ **i**\|\ **p**\|\ **e**\|\ **f**\|\ + **k**\|\ **M**\|\ **n**\|\ **u**]. + Force 1:1 scaling, i.e., output or input data are in actual projected + meters [**e**]. To specify other units, append **f** (feet), + **k** (kilometers), **M** (statute miles), **n** (nautical miles), + **u** (US survey feet), **i** (inches), **c** (centimeters), or + **p** (points). + unit : str + Append **c**, **i**, or **p** to indicate that centimeters, inches, or + points should be the projected measure unit. Cannot be used with + ``scaling``. + {verbose} + {interpolation} + {registration} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - ``None`` if ``outgrid`` is set (grid output will be stored in the file set by + ``outgrid``) + + Example + ------- + >>> import pygmt + >>> # Load a grid of @earth_relief_30m data, with a longitude range of + >>> # 10° E to 30° E, and a latitude range of 15° N to 25° N + >>> region = [10, 30, 15, 25] + >>> grid = pygmt.datasets.load_earth_relief(resolution="30m", region=region) + >>> # Project the geographic gridded data onto a rectangular grid + >>> new_grid = pygmt.grdproject(grid=grid, projection="M10c", region=region) + """ + if kwargs.get("J") is None: + msg = "The projection must be specified." + raise GMTInvalidInput(msg) + + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="raster", data=grid) as vingrd, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="grdproject", args=build_arg_list(kwargs, infile=vingrd) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdsample.html b/v0.14.0/_modules/pygmt/src/grdsample.html new file mode 100644 index 00000000000..225b39bec26 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdsample.html @@ -0,0 +1,300 @@ + + + + + + + + pygmt.src.grdsample — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdsample

+"""
+grdsample - Resample a grid onto a new lattice
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["grdsample"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + I="spacing", + R="region", + T="translate", + V="verbose", + f="coltypes", + n="interpolation", + r="registration", + x="cores", +) +@kwargs_to_strings(I="sequence", R="sequence") +def grdsample(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | None: + r""" + Change the registration, spacing, or nodes in a grid file. + + This reads a grid file and interpolates it to create a new grid + file. It can change the registration with ``translate`` or + ``registration``, change the grid-spacing or number of nodes with + ``spacing``, and set a new sub-region using ``region``. A bicubic + [Default], bilinear, B-spline or nearest-neighbor interpolation is set + with ``interpolation``. + + When ``region`` is omitted, the output grid will cover the same region as + the input grid. When ``spacing`` is omitted, the grid spacing of the + output grid will be the same as the input grid. Either ``registration`` or + ``translate`` can be used to change the grid registration. When omitted, + the output grid will have the same registration as the input grid. + + Full option list at :gmt-docs:`grdsample.html` + + {aliases} + + Parameters + ---------- + {grid} + {outgrid} + {spacing} + {region} + translate : bool + Translate between grid and pixel registration; if the input is + grid-registered, the output will be pixel-registered and vice-versa. + registration : str or bool + [**g**\|\ **p**\ ]. + Set registration to **g**\ ridline or **p**\ ixel. + {verbose} + {coltypes} + {interpolation} + {cores} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - ``None`` if ``outgrid`` is set (grid output will be stored in the file set by + ``outgrid``) + + Example + ------- + >>> import pygmt + >>> # Load a grid of @earth_relief_30m data, with a longitude range of + >>> # 10° E to 30° E, and a latitude range of 15° N to 25° N + >>> grid = pygmt.datasets.load_earth_relief( + ... resolution="30m", region=[10, 30, 15, 25] + ... ) + >>> # Create a new grid from an input grid, change the registration, + >>> # and set both x- and y-spacing to 0.5 arc-degrees + >>> new_grid = pygmt.grdsample(grid=grid, translate=True, spacing=[0.5, 0.5]) + """ + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="raster", data=grid) as vingrd, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="grdsample", args=build_arg_list(kwargs, infile=vingrd) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdtrack.html b/v0.14.0/_modules/pygmt/src/grdtrack.html new file mode 100644 index 00000000000..0e466c45767 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdtrack.html @@ -0,0 +1,535 @@ + + + + + + + + pygmt.src.grdtrack — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdtrack

+"""
+grdtrack - Sample grids at specified (x,y) locations.
+"""
+
+from typing import Literal
+
+import numpy as np
+import pandas as pd
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+    validate_output_table_type,
+)
+
+__doctest_skip__ = ["grdtrack"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + A="resample", + C="crossprofile", + D="dfile", + E="profile", + F="critical", + R="region", + N="no_skip", + S="stack", + T="radius", + V="verbose", + Z="z_only", + a="aspatial", + b="binary", + d="nodata", + e="find", + f="coltypes", + g="gap", + h="header", + i="incols", + j="distcalc", + n="interpolation", + o="outcols", + s="skiprows", + w="wrap", +) +@kwargs_to_strings(R="sequence", S="sequence", i="sequence_comma", o="sequence_comma") +def grdtrack( + grid, + points=None, + output_type: Literal["pandas", "numpy", "file"] = "pandas", + outfile: str | None = None, + newcolname=None, + **kwargs, +) -> pd.DataFrame | np.ndarray | None: + r""" + Sample grids at specified (x,y) locations. + + Reads one or more grid files and a table (from file or an array input; but + see ``profile`` for exception) with (x,y) [or (lon,lat)] positions in the + first two columns (more columns may be present). It interpolates the + grid(s) at the positions in the table and writes out the table with the + interpolated values added as (one or more) new columns. Alternatively + (``crossprofile``), the input is considered to be line-segments and we + create orthogonal cross-profiles at each data point or with an equidistant + separation and sample the grid(s) along these profiles. A bicubic + [Default], bilinear, B-spline or nearest-neighbor interpolation is used, + requiring boundary conditions at the limits of the region (see + ``interpolation``; Default uses "natural" conditions (second partial + derivative normal to edge is zero) unless the grid is automatically + recognized as periodic.) + + Full option list at :gmt-docs:`grdtrack.html` + + {aliases} + + Parameters + ---------- + {grid} + + points : str, {table-like} + Pass in either a file name to an ASCII data table, a 2-D + {table-classes}. + {output_type} + {outfile} + newcolname : str + Required if ``points`` is a :class:`pandas.DataFrame`. The name for the + new column in the track :class:`pandas.DataFrame` table where the + sampled values will be placed. + resample : str + **f**\|\ **p**\|\ **m**\|\ **r**\|\ **R**\ [**+l**] + For track resampling (if ``crossprofile`` or ``profile`` are set) we + can select how this is to be performed. Append **f** to keep original + points, but add intermediate points if needed [Default], **m** as + **f**, but first follow meridian (along y) then parallel (along x), + **p** as **f**, but first follow parallel (along y) then meridian + (along x), **r** to resample at equidistant locations; input points are + not necessarily included in the output, and **R** as **r**, but adjust + given spacing to fit the track length exactly. Finally, append + **+l** if geographic distances should be measured along rhumb lines + (loxodromes) instead of great circles. Ignored unless ``crossprofile`` + is used. + crossprofile : str + *length*/\ *ds*\ [*/spacing*][**+a**\|\ **+v**][**l**\|\ **r**]. + Use input line segments to create an equidistant and (optionally) + equally-spaced set of crossing profiles along which we sample the + grid(s) [Default simply samples the grid(s) at the input locations]. + Specify two length scales that control how the sampling is done: + *length* sets the full length of each cross-profile, while *ds* is + the sampling spacing along each cross-profile. Optionally, append + **/**\ *spacing* for an equidistant spacing between cross-profiles + [Default erects cross-profiles at the input coordinates]; see + ``resample`` for how resampling the input track is controlled. By + default, all cross-profiles have the same direction (left to right + as we look in the direction of the input line segment). Append **+a** + to alternate the direction of cross-profiles, or **v** to enforce + either a "west-to-east" or "south-to-north" view. By default the entire + profiles are output. Choose to only output the left or right halves + of the profiles by appending **+l** or **+r**, respectively. Append + suitable units to *length*; it sets the unit used for *ds* [and + *spacing*] (See :gmt-docs:`Units <grdtrack.html#units>`). The default + unit for geographic grids is meters while Cartesian grids implies the + user unit. The output columns will be *lon*, *lat*, *dist*, *azimuth*, + *z1*, *z2*, ..., *zn* (The *zi* are the sampled values for each of the + *n* grids). + dfile : str + In concert with ``crossprofile`` we can save the (possibly resampled) + original lines to *dfile* [Default only saves the cross-profiles]. The + columns will be *lon*, *lat*, *dist*, *azimuth*, *z1*, *z2*, ... + (sampled value for each grid). + profile : str + *line*\ [,\ *line*,...][**+a**\ *az*][**+c**][**+d**][**+g**]\ + [**+i**\ *inc*][**+l**\ *length*][**+n**\ *np*][**+o**\ *az*]\ + [**+r**\ *radius*]. + Instead of reading input track coordinates, specify profiles via + coordinates and modifiers. The format of each *line* is + *start*/*stop*, where *start* or *stop* are either *lon*/*lat* (*x*/*y* + for Cartesian data) or a 2-character XY key that uses the + :gmt-docs:`text <text.html>`-style justification format to specify + a point on the map as [LCR][BMT]. Each line will be a separate segment + unless **+c** is used which will connect segments with shared joints + into a single segment. In addition to line coordinates, you can use Z-, + Z+ to mean the global minimum and maximum locations in the grid (only + available if a single grid is given via **outfile**). You may append + **+i**\ *inc* to set the sampling interval; if not given then we + default to half the minimum grid interval. For a *line* along parallels + or meridians you can add **+g** to report degrees of longitude or + latitude instead of great circle distances starting at zero. Instead of + two coordinates you can specify an origin and one of **+a**, **+o**, or + **+r**. The **+a** sets the azimuth of a profile of given length + starting at the given origin, while **+o** centers the profile on the + origin; both require **+l**. For circular sampling specify **+r** to + define a circle of given radius centered on the origin; this option + requires either **+n** or **+i**. The **+n**\ *np* modifier sets the + desired number of points, while **+l**\ *length* gives the total length + of the profile. Append **+d** to output the along-track distances after + the coordinates. **Note**: No track file will be read. Also note that + only one distance unit can be chosen. Giving different units will + result in an error. If no units are specified we default to great + circle distances in km (if geographic). If working with geographic data + you can use ``distcalc`` to control distance calculation mode [Default + is Great Circle]. **Note**: If ``crossprofile`` is set and *spacing* is + given then that sampling scheme overrules any modifier set in + ``profile``. + critical : str + [**+b**][**+n**][**+r**][**+z**\ *z0*]. + Find critical points along each cross-profile as a function of + along-track distance. Requires ``crossprofile`` and a single input grid + (*z*). We examine each cross-profile generated and report (*dist*, + *lonc*, *latc*, *distc*, *azimuthc*, *zc*) at the center peak of + maximum *z* value, (*lonl*, *latl*, *distl*) and (*lonr*, *latr*, + *distr*) at the first and last non-NaN point whose *z*-value exceeds + *z0*, respectively, and the *width* based on the two extreme points + found. Here, *dist* is the distance along the original input + ``points`` and the other 12 output columns are a function of that + distance. When searching for the center peak and the extreme first and + last values that exceed the threshold we assume the profile is positive + up. If we instead are looking for a trough then you must use **+n** to + temporarily flip the profile to positive. The threshold *z0* value is + always given as >= 0; use **+z** to change it [Default is 0]. + Alternatively, use **+b** to determine the balance point and standard + deviation of the profile; this is the weighted mean and weighted + standard deviation of the distances, with *z* acting as the weight. + Finally, use **+r** to obtain the weighted rms about the cross-track + center (*distc* == 0). **Note**: We round the exact results to the + nearest distance nodes along the cross-profiles. We write 13 output + columns per track: *dist, lonc, latc, distc, azimuthc, zc, lonl, latl, + distl, lonr, latr, distr, width*. + {region} + no_skip : bool + Do *not* skip points that fall outside the domain of the grid(s) + [Default only output points within the grid domain]. + stack : str or list + *method*/*modifiers*. + In conjunction with ``crossprofile``, compute a single stacked profile + from all profiles across each segment. Choose how stacking should be + computed [Default method is **a**]: + + - **a** = mean (average) + - **m** = median + - **p** = mode (maximum likelihood) + - **l** = lower + - **L** = lower but only consider positive values + - **u** = upper + - **U** = upper but only consider negative values. + + The *modifiers* control the output; choose one or more among these + choices: + + - **+a** : Append stacked values to all cross-profiles. + - **+d** : Append stack deviations to all cross-profiles. + - **+r** : Append data residuals (data - stack) to all cross-profiles. + - **+s**\ [*file*] : Save stacked profile to *file* [Default file name + is grdtrack_stacked_profile.txt]. + - **+c**\ *fact* : Compute envelope on stacked profile as + ±\ *fact* \*\ *deviation* [Default fact value is 2]. + + Here are some notes: + + 1. Deviations depend on *method* and are st.dev (**a**), L1 scale, + i.e., 1.4826 \* median absolute deviation (MAD) (for **m** and + **p**), or half-range (upper-lower)/2. + 2. The stacked profile file contains a leading column plus groups of + 4-6 columns, with one group for each sampled grid. The leading + column holds cross distance, while the first four columns in a group + hold stacked value, deviation, min value, and max value, + respectively. If *method* is one of **a**\|\ **m**\|\ **p** then we + also write the lower and upper confidence bounds (see **+c**). When + one or more of **+a**, **+d**, and **+r** are used then we also + append the stacking results to the end of each row, for all + cross-profiles. The order is always stacked value (**+a**), followed + by deviations (**+d**) and finally residuals (**+r**). When more + than one grid is sampled this sequence of 1-3 columns is repeated + for each grid. + radius : bool, float, or str + [*radius*][**+e**\|\ **p**]. + To be used with normal grid sampling, and limited to a single, non-IMG + grid. If the nearest node to the input point is NaN, search outwards + until we find the nearest non-NaN node and report that value instead. + Optionally specify a search radius which limits the consideration to + points within this distance from the input point. To report the + location of the nearest node and its distance from the input point, + append **+e**. The default unit for geographic grid distances is + spherical degrees. Use *radius* to change the unit and give *radius* = + 0 if you do not want to limit the radius search. To instead replace the + input point with the coordinates of the nearest node, append **+p**. + {verbose} + z_only : bool + Only write out the sampled z-values [Default writes all columns]. + {aspatial} + {binary} + {nodata} + {find} + {coltypes} + {gap} + {header} + {incols} + {distcalc} + {interpolation} + {outcols} + {skiprows} + {wrap} + + Returns + ------- + ret + Return type depends on ``outfile`` and ``output_type``: + + - ``None`` if ``outfile`` is set (output will be stored in file set by + ``outfile``) + - :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile`` is not set + (depends on ``output_type``) + + Example + ------- + >>> import pygmt + >>> # Load a grid of @earth_relief_30m data, with a longitude range of + >>> # -118° E to -107° E, and a latitude range of -49° N to -42° N + >>> grid = pygmt.datasets.load_earth_relief( + ... resolution="30m", region=[-118, -107, -49, -42] + ... ) + >>> # Load a pandas dataframe with ocean ridge points + >>> points = pygmt.datasets.load_sample_data(name="ocean_ridge_points") + >>> # Create a pandas dataframe from an input grid and set of points + >>> # The output dataframe adds a column named "bathymetry" + >>> output_dataframe = pygmt.grdtrack( + ... points=points, grid=grid, newcolname="bathymetry" + ... ) + """ + if points is not None and kwargs.get("E") is not None: + msg = "Can't set both 'points' and 'profile'." + raise GMTInvalidInput(msg) + + if points is None and kwargs.get("E") is None: + msg = "Must give 'points' or set 'profile'." + raise GMTInvalidInput(msg) + + if hasattr(points, "columns") and newcolname is None: + msg = "Please pass in a str to 'newcolname'." + raise GMTInvalidInput(msg) + + output_type = validate_output_table_type(output_type, outfile=outfile) + + column_names = None + if output_type == "pandas" and isinstance(points, pd.DataFrame): + column_names = [*points.columns.to_list(), newcolname] + + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="raster", data=grid) as vingrd, + lib.virtualfile_in( + check_kind="vector", data=points, required_data=False + ) as vintbl, + lib.virtualfile_out(kind="dataset", fname=outfile) as vouttbl, + ): + kwargs["G"] = vingrd + lib.call_module( + module="grdtrack", + args=build_arg_list(kwargs, infile=vintbl, outfile=vouttbl), + ) + return lib.virtualfile_to_dataset( + vfname=vouttbl, + output_type=output_type, + column_names=column_names, + )
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdview.html b/v0.14.0/_modules/pygmt/src/grdview.html new file mode 100644 index 00000000000..aa044119a68 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdview.html @@ -0,0 +1,362 @@ + + + + + + + + pygmt.src.grdview — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdview

+"""
+grdview - Create a three-dimensional plot from a grid.
+"""
+
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["grdview"]
+
+
+@fmt_docstring
+@use_alias(
+    R="region",
+    J="projection",
+    Jz="zscale",
+    JZ="zsize",
+    B="frame",
+    C="cmap",
+    G="drapegrid",
+    N="plane",
+    Q="surftype",
+    Wc="contourpen",
+    Wm="meshpen",
+    Wf="facadepen",
+    I="shading",
+    V="verbose",
+    c="panel",
+    f="coltypes",
+    n="interpolation",
+    p="perspective",
+    t="transparency",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
+def grdview(self, grid, **kwargs):
+    r"""
+    Create 3-D perspective image or surface mesh from a grid.
+
+    Reads a 2-D grid file and produces a 3-D perspective plot by drawing a
+    mesh, painting a colored/gray-shaded surface made up of polygons, or by
+    scanline conversion of these polygons to a raster image. Options
+    include draping a data set on top of a surface, plotting of contours on
+    top of the surface, and apply artificial illumination based on
+    intensities provided in a separate grid file.
+
+    Full option list at :gmt-docs:`grdview.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    {grid}
+    region : str or list
+        *xmin/xmax/ymin/ymax*\ [**+r**][**+u**\ *unit*].
+        Specify the :doc:`region </tutorials/basics/regions>` of interest.
+        When used with ``perspective``, optionally append */zmin/zmax* to
+        indicate the range to use for the 3-D axes [Default is the region in
+        the input grid].
+    {projection}
+    zscale/zsize : float or str
+        Set z-axis scaling or z-axis size.
+    {frame}
+    cmap : str
+        The name of the color palette table to use.
+    drapegrid : str or :class:`xarray.DataArray`
+        The file name or a DataArray of the image grid to be draped on top
+        of the relief provided by ``grid`` [Default determines colors from grid].
+        Note that ``zscale`` and ``plane`` always refer to the grid.
+        The drapegrid only provides the information pertaining to colors, which
+        (if drapegrid is a grid) will be looked-up via the CPT (see ``cmap``).
+    plane : float or str
+        *level*\ [**+g**\ *fill*].
+        Draw a plane at this z-level. If the optional color is provided
+        via the **+g** modifier, and the projection is not oblique, the frontal
+        facade between the plane and the data perimeter is colored.
+    surftype : str
+        Specify cover type of the grid.
+        Select one of following settings:
+
+        - **m** - mesh plot [Default].
+        - **mx** or **my** - waterfall plots (row or column profiles).
+        - **s** - surface plot, and optionally append **m** to have mesh lines
+          drawn on top of the surface.
+        - **i** - image plot.
+        - **c** - Same as **i** but will make nodes with z = NaN transparent.
+
+        For any of these choices, you may force a monochrome image by
+        appending the modifier **+m**.
+    contourpen : str
+        Draw contour lines on top of surface or mesh (not image). Append
+        pen attributes used for the contours.
+    meshpen : str
+        Set the pen attributes used for the mesh. You must also select
+        ``surftype`` of **m** or **sm** for meshlines to be drawn.
+    facadepen :str
+        Set the pen attributes used for the facade. You must also select
+        ``plane`` for the facade outline to be drawn.
+    shading : str
+        Provide the name of a grid file with intensities in the (-1,+1)
+        range, or a constant intensity to apply everywhere (affects the
+        ambient light). Alternatively, derive an intensity grid from the
+        input data grid reliefgrid via a call to :func:`pygmt.grdgradient`;
+        append **+a**\ *azimuth*, **+n**\ *args*, and **+m**\ *ambient* to
+        specify azimuth, intensity, and ambient arguments for that function,
+        or just give **+d** to select the default arguments
+        [Default is **+a**\ -45\ **+nt**\ 1\ **+m**\ 0].
+    {verbose}
+    {panel}
+    {coltypes}
+    {interpolation}
+    {perspective}
+    {transparency}
+
+    Example
+    -------
+    >>> import pygmt
+    >>> # load the 30 arc-minutes grid with "gridline" registration
+    >>> # in a specified region
+    >>> grid = pygmt.datasets.load_earth_relief(
+    ...     resolution="30m",
+    ...     region=[-92.5, -82.5, -3, 7],
+    ...     registration="gridline",
+    ... )
+    >>> # create a new figure instance with pygmt.Figure()
+    >>> fig = pygmt.Figure()
+    >>> # create the contour plot
+    >>> fig.grdview(
+    ...     # pass in the grid downloaded above
+    ...     grid=grid,
+    ...     # set the perspective to an azimuth of 130° and an elevation of 30°
+    ...     perspective=[130, 30],
+    ...     # add a frame to the x- and y-axes
+    ...     # specify annotations on the south and east borders of the plot
+    ...     frame=["xa", "ya", "wSnE"],
+    ...     # set the projection of the 2-D map to Mercator with a 10 cm width
+    ...     projection="M10c",
+    ...     # set the vertical scale (z-axis) to 2 cm
+    ...     zsize="2c",
+    ...     # set "surface plot" to color the surface via a CPT
+    ...     surftype="s",
+    ...     # specify CPT to "geo"
+    ...     cmap="geo",
+    ... )
+    >>> # show the plot
+    >>> fig.show()
+    """
+    kwargs = self._preprocess(**kwargs)
+    with Session() as lib:
+        with (
+            lib.virtualfile_in(check_kind="raster", data=grid) as vingrd,
+            lib.virtualfile_in(
+                check_kind="raster", data=kwargs.get("G"), required_data=False
+            ) as vdrapegrid,
+        ):
+            kwargs["G"] = vdrapegrid
+            lib.call_module(
+                module="grdview", args=build_arg_list(kwargs, infile=vingrd)
+            )
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/grdvolume.html b/v0.14.0/_modules/pygmt/src/grdvolume.html new file mode 100644 index 00000000000..c6fb1860d2e --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/grdvolume.html @@ -0,0 +1,322 @@ + + + + + + + + pygmt.src.grdvolume — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.grdvolume

+"""
+grdvolume - Calculate grid volume and area constrained by a contour.
+"""
+
+from typing import Literal
+
+import numpy as np
+import pandas as pd
+from pygmt.clib import Session
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+    validate_output_table_type,
+)
+
+__doctest_skip__ = ["grdvolume"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + C="contour", + R="region", + S="unit", + V="verbose", +) +@kwargs_to_strings(C="sequence", R="sequence") +def grdvolume( + grid, + output_type: Literal["pandas", "numpy", "file"] = "pandas", + outfile: str | None = None, + **kwargs, +) -> pd.DataFrame | np.ndarray | None: + r""" + Determine the volume between the surface of a grid and a plane. + + Read a 2-D grid file and calculate the volume contained below the surface + and above the plane specified by the given contour (or zero if not given) + and return the contour, area, volume, and maximum mean height + (volume/area). Alternatively, a range of contours can be specified to + return the volume and area inside the contour for all contour values. + + Full option list at :gmt-docs:`grdvolume.html` + + {aliases} + + Parameters + ---------- + {grid} + {output_type} + {outfile} + contour : str, float, or list + *cval*\|\ *low/high/delta*\|\ **r**\ *low/high*\|\ **r**\ *cval*. + Find area, volume and mean height (volume/area) inside and above the + *cval* contour. Alternatively, search using all contours from *low* to + *high* in steps of *delta*. [Default returns area, volume and mean + height of the entire grid]. The area is measured in the plane of the + contour. Adding the **r** prefix computes the volume below the grid + surface and above the planes defined by *low* and *high*, or below + *cval* and grid's minimum. Note that this is an *outside* volume + whilst the other forms compute an *inside* (below the surface) area + volume. Use this form to compute for example the volume of water + between two contours. If no *contour* is given then there is no contour + and the entire grid area, volume and the mean height is returned and + *cval* will be reported as 0. + {region} + {verbose} + + Returns + ------- + ret + Return type depends on ``outfile`` and ``output_type``: + + - ``None`` if ``outfile`` is set (output will be stored in file set by + ``outfile``) + - :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile`` is not set + (depends on ``output_type``) + + Example + ------- + >>> import pygmt + >>> # Load a grid of @earth_relief_30m data, with a longitude range of + >>> # 10° E to 30° E, and a latitude range of 15° N to 25° N + >>> grid = pygmt.datasets.load_earth_relief( + ... resolution="30m", region=[10, 30, 15, 25] + ... ) + >>> # Create a pandas dataframe that contains the contour, area, volume, + >>> # and maximum mean height above the plane specified by the given + >>> # contour and below the surface; set the minimum contour z-value to + >>> # 200, the maximum to 400, and the interval to 50. + >>> output_dataframe = pygmt.grdvolume( + ... grid=grid, contour=[200, 400, 50], output_type="pandas" + ... ) + >>> print(output_dataframe) + 0 1 2 3 + 0 200.0 2.323600e+12 8.523815e+14 366.836554 + 1 250.0 2.275864e+12 7.371655e+14 323.905736 + 2 300.0 2.166707e+12 6.258570e+14 288.851699 + 3 350.0 2.019284e+12 5.207732e+14 257.899955 + 4 400.0 1.870441e+12 4.236191e+14 226.480847 + """ + output_type = validate_output_table_type(output_type, outfile=outfile) + + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="raster", data=grid) as vingrd, + lib.virtualfile_out(kind="dataset", fname=outfile) as vouttbl, + ): + lib.call_module( + module="grdvolume", + args=build_arg_list(kwargs, infile=vingrd, outfile=vouttbl), + ) + return lib.virtualfile_to_dataset(vfname=vouttbl, output_type=output_type)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/histogram.html b/v0.14.0/_modules/pygmt/src/histogram.html new file mode 100644 index 00000000000..a9b9687ee62 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/histogram.html @@ -0,0 +1,347 @@ + + + + + + + + pygmt.src.histogram — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.histogram

+"""
+Histogram - Create a histogram.
+"""
+
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+
+@fmt_docstring
+@use_alias(
+    A="horizontal",
+    B="frame",
+    C="cmap",
+    D="annotate",
+    E="barwidth",
+    F="center",
+    G="fill",
+    J="projection",
+    L="extreme",
+    N="distribution",
+    Q="cumulative",
+    R="region",
+    S="stairs",
+    T="series",
+    V="verbose",
+    W="pen",
+    Z="histtype",
+    b="binary",
+    c="panel",
+    d="nodata",
+    e="find",
+    h="header",
+    i="incols",
+    l="label",
+    p="perspective",
+    t="transparency",
+    w="wrap",
+)
+@kwargs_to_strings(
+    R="sequence", T="sequence", c="sequence_comma", i="sequence_comma", p="sequence"
+)
+def histogram(self, data, **kwargs):
+    r"""
+    Plot Cartesian histograms.
+
+    Full option list at :gmt-docs:`histogram.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    data : str, list, {table-like}
+        Pass in either a file name to an ASCII data table, a Python list, a 2-D
+        {table-classes}.
+    {projection}
+    {region}
+    {frame}
+    {cmap}
+    fill : str
+         Set color or pattern for filling bars [Default is no fill].
+    {pen}
+    {panel}
+    annotate : bool or str
+        [**+b**][**+f**\ *font*][**+o**\ *off*][**+r**].
+        Annotate each bar with the count it represents. Append any of the
+        following modifiers: Use **+b** to place the labels beneath the bars
+        instead of above; use **+f** to change to another font than the default
+        annotation font; use **+o** to change the offset between bar and
+        label [Default is ``"6p"``]; use **+r** to rotate the labels from
+        horizontal to vertical.
+    barwidth : float or str
+        *width*\ [**+o**\ *offset*].
+        Use an alternative histogram bar width than the default set via
+        ``series``, and optionally shift all bars by an *offset*. Here
+        *width* is either an alternative width in data units, or the user may
+        append a valid plot dimension unit (**c**\|\ **i**\|\ **p**) for a
+        fixed dimension instead. Optionally, all bins may be shifted along the
+        axis by *offset*. As for *width*, it may be given in data units of
+        plot dimension units by appending the relevant unit.
+    center : bool
+        Center bin on each value. [Default is left edge].
+    distribution : bool, float, or str
+        [*mode*][**+p**\ *pen*].
+        Draw the equivalent normal distribution; append desired
+        *pen* [Default is ``"0.25p,black,solid"``].
+        The *mode* selects which central location and scale to use:
+
+        * 0 = mean and standard deviation [Default];
+        * 1 = median and L1 scale (1.4826 \* median absolute deviation; MAD);
+        * 2 = LMS (least median of squares) mode and scale.
+    cumulative : bool or str
+        [**r**].
+        Draw a cumulative histogram by passing ``True``. Use **r** to display
+        a reverse cumulative histogram.
+    extreme : str
+        **l**\|\ **h**\|\ **b**.
+        The modifiers specify the handling of extreme values that fall outside
+        the range set by ``series``. By default, these values are ignored.
+        Append **b** to let these values be included in the first or last
+        bins. To only include extreme values below first bin into the first
+        bin, use **l**, and to only include extreme values above the last bin
+        into that last bin, use **h**.
+    stairs : bool
+        Draw a stairs-step diagram which does not include the internal bars
+        of the default histogram.
+    horizontal : bool
+        Plot the histogram horizontally from x = 0 [Default is vertically from y = 0].
+        The plot dimensions remain the same, but the two axes are flipped, i.e., the
+        x-axis is plotted vertically and the y-axis is plotted horizontally.
+    series : int, str, or list
+        [*min*\ /*max*\ /]\ *inc*\ [**+n**\ ].
+        Set the interval for the width of each bar in the histogram.
+    histtype : int or str
+        [*type*][**+w**].
+        Choose between 6 types of histograms:
+
+        * 0 = counts [Default]
+        * 1 = frequency_percent
+        * 2 = log (1.0 + count)
+        * 3 = log (1.0 + frequency_percent)
+        * 4 = log10 (1.0 + count)
+        * 5 = log10 (1.0 + frequency_percent).
+
+        To use weights provided as a second data column instead of pure counts,
+        append **+w**.
+    {verbose}
+    {binary}
+    {nodata}
+    {find}
+    {header}
+    {incols}
+    {label}
+    {perspective}
+    {transparency}
+    {wrap}
+    """
+    kwargs = self._preprocess(**kwargs)
+    with Session() as lib:
+        with lib.virtualfile_in(check_kind="vector", data=data) as vintbl:
+            lib.call_module(
+                module="histogram", args=build_arg_list(kwargs, infile=vintbl)
+            )
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/hlines.html b/v0.14.0/_modules/pygmt/src/hlines.html new file mode 100644 index 00000000000..71a713d6bb7 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/hlines.html @@ -0,0 +1,342 @@ + + + + + + + + pygmt.src.hlines — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.hlines

+"""
+hlines - Plot horizontal lines.
+"""
+
+from collections.abc import Sequence
+
+import numpy as np
+from pygmt.exceptions import GMTInvalidInput
+
+__doctest_skip__ = ["hlines"]
+
+
+def hlines(
+    self,
+    y: float | Sequence[float],
+    xmin: float | Sequence[float] | None = None,
+    xmax: float | Sequence[float] | None = None,
+    pen: str | None = None,
+    label: str | None = None,
+    no_clip: bool = False,
+    perspective: str | bool | None = None,
+):
+    """
+    Plot one or multiple horizontal line(s).
+
+    This method is a high-level wrapper around :meth:`pygmt.Figure.plot` that focuses on
+    plotting horizontal lines at Y-coordinates specified by the ``y`` parameter. The
+    ``y`` parameter can be a single value (for a single horizontal line) or a sequence
+    of values (for multiple horizontal lines).
+
+    By default, the X-coordinates of the start and end points of the lines are set to
+    be the X-limits of the current plot, but this can be overridden by specifying the
+    ``xmin`` and ``xmax`` parameters. ``xmin`` and ``xmax`` can be either a single
+    value or a sequence of values. If a single value is provided, it is applied to all
+    lines. If a sequence is provided, the length of ``xmin`` and ``xmax`` must match
+    the length of ``y``.
+
+    The term "horizontal" lines can be interpreted differently in different coordinate
+    systems:
+
+    - **Cartesian** coordinate system: lines are plotted as straight lines.
+    - **Polar** projection: lines are plotted as arcs along a constant radius.
+    - **Geographic** projection: lines are plotted as parallels along constant latitude.
+
+    Parameters
+    ----------
+    y
+        Y-coordinates to plot the lines. It can be a single value (for a single line)
+        or a sequence of values (for multiple lines).
+    xmin/xmax
+        X-coordinates of the start/end point(s) of the line(s). If ``None``, defaults to
+        the X-limits of the current plot. ``xmin`` and ``xmax`` can be either a single
+        value or a sequence of values. If a single value is provided, it is applied to
+        all lines. If a sequence is provided, the length of ``xmin`` and ``xmax`` must
+        match the length of ``y``.
+    pen
+        Pen attributes for the line(s), in the format of *width,color,style*.
+    label
+        Label for the line(s), to be displayed in the legend.
+    no_clip
+        If ``True``, do not clip lines outside the plot region. Only makes sense in the
+        Cartesian coordinate system.
+    perspective
+        Select perspective view and set the azimuth and elevation angle of the
+        viewpoint. Refer to :meth:`pygmt.Figure.plot` for details.
+
+    Examples
+    --------
+    >>> import pygmt
+    >>> fig = pygmt.Figure()
+    >>> fig.basemap(region=[0, 10, 0, 10], projection="X10c/10c", frame=True)
+    >>> fig.hlines(y=1, pen="1p,black", label="Line at y=1")
+    >>> fig.hlines(y=2, xmin=2, xmax=8, pen="1p,red,-", label="Line at y=2")
+    >>> fig.hlines(y=[3, 4], xmin=3, xmax=7, pen="1p,black,.", label="Lines at y=3,4")
+    >>> fig.hlines(y=[5, 6], xmin=4, xmax=9, pen="1p,red", label="Lines at y=5,6")
+    >>> fig.hlines(
+    ...     y=[7, 8], xmin=[0, 1], xmax=[7, 8], pen="1p,blue", label="Lines at y=7,8"
+    ... )
+    >>> fig.legend()
+    >>> fig.show()
+    """
+    self._preprocess()
+
+    # Determine the x limits from the current plot region if not specified.
+    if xmin is None or xmax is None:
+        xlimits = self.region[:2]
+        if xmin is None:
+            xmin = xlimits[0]
+        if xmax is None:
+            xmax = xlimits[1]
+
+    # Ensure y/xmin/xmax are 1-D arrays.
+    _y = np.atleast_1d(y)
+    _xmin = np.atleast_1d(xmin)
+    _xmax = np.atleast_1d(xmax)
+
+    nlines = len(_y)  # Number of lines to plot.
+
+    # Check if xmin/xmax are scalars or have the expected length.
+    if _xmin.size not in {1, nlines} or _xmax.size not in {1, nlines}:
+        msg = (
+            f"'xmin' and 'xmax' are expected to be scalars or have lengths '{nlines}', "
+            f"but lengths '{_xmin.size}' and '{_xmax.size}' are given."
+        )
+        raise GMTInvalidInput(msg)
+
+    # Repeat xmin/xmax to match the length of y if they are scalars.
+    if nlines != 1:
+        if _xmin.size == 1:
+            _xmin = np.repeat(_xmin, nlines)
+        if _xmax.size == 1:
+            _xmax = np.repeat(_xmax, nlines)
+
+    # Call the Figure.plot method to plot the lines.
+    for i in range(nlines):
+        # Special handling for label.
+        # 1. Only specify a label when plotting the first line.
+        # 2. The -l option can accept comma-separated labels for labeling multiple lines
+        #    with auto-coloring enabled. We don't need this feature here, so we need to
+        #    replace comma with \054 if the label contains commas.
+        _label = label.replace(",", "\\054") if label and i == 0 else None
+
+        # By default, points are connected as great circle arcs in geographic coordinate
+        # systems and straight lines in Cartesian coordinate systems (including polar
+        # projection). To plot "horizontal" lines along constant latitude (in geographic
+        # coordinate systems) or constant radius (in polar projection), we need to
+        # resample the line to at least 4 points.
+        npoints = 4  # 2 for Cartesian, at least 4 for geographic and polar projections.
+        self.plot(
+            x=np.linspace(_xmin[i], _xmax[i], npoints),
+            y=[_y[i]] * npoints,
+            pen=pen,
+            label=_label,
+            no_clip=no_clip,
+            perspective=perspective,
+            straight_line="x",
+        )
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/image.html b/v0.14.0/_modules/pygmt/src/image.html new file mode 100644 index 00000000000..3c19dec0b65 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/image.html @@ -0,0 +1,277 @@ + + + + + + + + pygmt.src.image — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.image

+"""
+image - Plot an image.
+"""
+
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+
+@fmt_docstring
+@use_alias(
+    D="position",
+    F="box",
+    G="bitcolor",
+    J="projection",
+    M="monochrome",
+    R="region",
+    V="verbose",
+    c="panel",
+    p="perspective",
+    t="transparency",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
+def image(self, imagefile, **kwargs):
+    r"""
+    Place images or EPS files on maps.
+
+    Reads an Encapsulated PostScript file or a raster image file and plots
+    it on a map.
+
+    Full option list at :gmt-docs:`image.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    imagefile : str
+        This must be an Encapsulated PostScript (EPS) file or a raster
+        image. An EPS file must contain an appropriate BoundingBox. A
+        raster file can have a depth of 1, 8, 24, or 32 bits and is read
+        via GDAL. **Note**: If GDAL was not configured during GMT installation
+        then only EPS files are supported.
+    {projection}
+    {region}
+    position : str
+        [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ **+r**\ *dpi*\
+        **+w**\ [**-**]\ *width*\ [/*height*]\ [**+j**\ *justify*]\
+        [**+n**\ *nx*\ [/*ny*]]\ [**+o**\ *dx*\ [/*dy*]].
+        Set reference point on the map for the image.
+    box : bool or str
+        [**+c**\ *clearances*][**+g**\ *fill*][**+i**\ [[*gap*/]\ *pen*]]\
+        [**+p**\ [*pen*]][**+r**\ [*radius*]][**+s**\ [[*dx*/*dy*/][*shade*]]].
+        If set to ``True``, draw a rectangular border around the image
+        using :gmt-term:`MAP_FRAME_PEN`.
+    bitcolor : str or list
+        [*color*][**+b**\|\ **f**\|\ **t**].
+        Change certain pixel values to another color or make them transparent.
+        For 1-bit images you can specify an alternate *color* for the
+        background (**+b**) or the foreground (**+f**) pixels, or give no color
+        to make those pixels transparent. Can be repeated with different
+        settings. Alternatively, for color images you can select a single
+        *color* that should be made transparent instead (**+t**).
+    monochrome : bool
+        Convert color image to monochrome grayshades using the (television)
+        YIQ-transformation.
+    {verbose}
+    {panel}
+    {perspective}
+    {transparency}
+    """
+    kwargs = self._preprocess(**kwargs)
+    with Session() as lib:
+        lib.call_module(module="image", args=build_arg_list(kwargs, infile=imagefile))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/info.html b/v0.14.0/_modules/pygmt/src/info.html new file mode 100644 index 00000000000..dd40af893bc --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/info.html @@ -0,0 +1,311 @@ + + + + + + + + pygmt.src.info — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.info

+"""
+info - Get information about data tables.
+"""
+
+import numpy as np
+from pygmt.clib import Session
+from pygmt.helpers import (
+    GMTTempFile,
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+)
+
+
+
+[docs] +@fmt_docstring +@use_alias( + C="per_column", + I="spacing", + T="nearest_multiple", + V="verbose", + a="aspatial", + f="coltypes", + i="incols", + r="registration", +) +@kwargs_to_strings(I="sequence", i="sequence_comma") +def info(data, **kwargs): + r""" + Get information about data tables. + + Reads from files and finds the extreme values in each of the columns + reported as min/max pairs. It recognizes NaNs and will print warnings if + the number of columns vary from record to record. As an option, it will + find the extent of the first two columns rounded up and down to the nearest + multiple of the supplied increments given by ``spacing``. Such output will + be in a :class:`numpy.ndarray` form [*w*, *e*, *s*, *n*], which can be used + directly as the ``region`` parameter for other modules (hence only *dx* + and *dy* are needed). If the ``per_column`` parameter is combined with + ``spacing``, then the :class:`numpy.ndarray` output will be rounded up/down for as + many columns as there are increments provided in ``spacing``. A similar + parameter ``nearest_multiple`` will provide a :class:`numpy.ndarray` in the form + of [*zmin*, *zmax*, *dz*] for makecpt. + + Full option list at :gmt-docs:`gmtinfo.html` + + {aliases} + + Parameters + ---------- + data : str, {table-like} + Pass in either a file name to an ASCII data table, a 1-D/2-D + {table-classes}. + per_column : bool + Report the min/max values per column in separate columns. + spacing : str + [**b**\|\ **p**\|\ **f**\|\ **s**]\ *dx*\[/*dy*\[/*dz*...]]. + Compute the min/max values of the first n columns to the nearest + multiple of the provided increments [default is 2 columns]. By default, + output results in the form ``[w, e, s, n]``, unless ``per_column`` is + set in which case we output each min and max value in separate output + columns. + nearest_multiple : str + **dz**\[\ **+c**\ *col*]. + Report the min/max of the first (0'th) column to the nearest multiple + of dz and output this in the form ``[zmin, zmax, dz]``. + + {verbose} + {aspatial} + {incols} + {coltypes} + {registration} + + Returns + ------- + output : :class:`numpy.ndarray` or str + Return type depends on whether any of the ``per_column``, + ``spacing``, or ``nearest_multiple`` parameters are set. + + - :class:`numpy.ndarray` if either of the above parameters are used. + - str if none of the above parameters are used. + """ + with Session() as lib: + with GMTTempFile() as tmpfile: + with lib.virtualfile_in(check_kind="vector", data=data) as vintbl: + lib.call_module( + module="info", + args=build_arg_list(kwargs, infile=vintbl, outfile=tmpfile.name), + ) + result = tmpfile.read() + + if any(kwargs.get(arg) is not None for arg in ["C", "I", "T"]): + # Converts certain output types into a numpy array + # instead of a raw string that is less useful. + if result.startswith(("-R", "-T")): # e.g. -R0/1/2/3 or -T0/9/1 + result = result[2:].replace("/", " ") + try: + result = np.loadtxt(result.splitlines()) + except ValueError: + # Load non-numerical outputs in str type, e.g. for datetime + result = np.loadtxt(result.splitlines(), dtype=np.str_) + + return result
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/inset.html b/v0.14.0/_modules/pygmt/src/inset.html new file mode 100644 index 00000000000..8d08afc2fbc --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/inset.html @@ -0,0 +1,350 @@ + + + + + + + + pygmt.src.inset — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.inset

+"""
+inset - Create inset figures.
+"""
+
+import contextlib
+
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["inset"]
+
+
+@fmt_docstring
+@contextlib.contextmanager
+@use_alias(
+    D="position",
+    F="box",
+    J="projection",
+    M="margin",
+    N="no_clip",
+    R="region",
+    V="verbose",
+)
+@kwargs_to_strings(D="sequence", M="sequence", R="sequence")
+def inset(self, **kwargs):
+    r"""
+    Create an inset figure to be placed within a larger figure.
+
+    This method sets the position, frame, and margins for a smaller figure
+    inside of the larger figure. Plotting methods that are called within the
+    context manager are added to the inset figure.
+
+    Full option list at :gmt-docs:`inset.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    position : str or list
+        *xmin/xmax/ymin/ymax*\ [**+r**][**+u**\ *unit*]] \
+        | [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
+        **+w**\ *width*\ [/*height*][**+j**\ *justify*]\
+        [**+o**\ *dx*\ [/*dy*]].
+
+        *This is the only required parameter.*
+        Define the map inset rectangle on the map. Specify the rectangle
+        in one of three ways:
+
+        Append **g**\ *lon*/*lat* for map (user) coordinates,
+        **j**\ *code* or **J**\ *code* for setting the *refpoint* via a
+        2-character justification code that refers to the (invisible)
+        projected map bounding box, **n**\ *xn*/*yn* for normalized (0-1)
+        bounding box coordinates, or **x**\ *x*/*y* for plot
+        coordinates (inches, centimeters, points, append unit).
+        All but **x** requires both ``region`` and ``projection`` to be
+        specified. You can offset the reference point via
+        **+o**\ *dx*/*dy* in the direction implied by *code* or
+        **+j**\ *justify*.
+
+        Alternatively, give *west/east/south/north* of geographic
+        rectangle bounded by parallels and meridians; append **+r** if the
+        coordinates instead are the lower left and upper right corners of
+        the desired rectangle. (Or, give *xmin/xmax/ymin/ymax* of bounding
+        rectangle in projected coordinates and optionally
+        append **+u**\ *unit* [Default coordinate unit is meters (**e**)].
+
+        Append **+w**\ *width*\ [/*height*] of bounding rectangle or box
+        in plot coordinates (inches, centimeters, etc.). By default, the
+        anchor point on the scale is assumed to be the bottom left corner
+        (**BL**), but this can be changed by appending **+j** followed by
+        a 2-character justification code *justify*.
+        **Note**: If **j** is used then *justify* defaults to the same
+        as *refpoint*, if **J** is used then *justify* defaults to the
+        mirror opposite of *refpoint*. Specify inset box attributes via
+        the ``box`` parameter [Default is outline only].
+    box : str or bool
+        [**+c**\ *clearances*][**+g**\ *fill*][**+i**\ [[*gap*/]\
+        *pen*]][**+p**\ [*pen*]][**+r**\ [*radius*]][**+s**\
+        [[*dx*/*dy*/][*shade*]]].
+        If set to ``True``, draw a rectangular box around the map
+        inset using the default pen; specify a different pen
+        with **+p**\ *pen*. Add **+g**\ *fill* to fill the inset box
+        [Default is no fill].
+        Append **+c**\ *clearance* where *clearance* is either
+        *gap*, *xgap*\ /\ *ygap*, or *lgap*\ /\ *rgap*\ /\ *bgap*\ /\
+        *tgap* where these items are uniform, separate in x- and
+        y-directions, or individual side spacings between map embellishment
+        and border. Append **+i** to draw a secondary, inner border as well.
+        We use a uniform *gap* between borders of 2p and the default pen
+        unless other values are specified. Append **+r** to draw rounded
+        rectangular borders instead, with a 6p corner radius. You
+        can override this radius by appending another value. Append
+        **+s** to draw an offset background shaded region. Here, *dx*/*dy*
+        indicates the shift relative to the foreground frame [Default is
+        ``"4p/-4p"``] and *shade* sets the fill style to use for
+        shading [Default is ``"gray50"``].
+    margin : float, str, or list
+        This is clearance that is added around the inside of the inset.
+        Plotting will take place within the inner region only. The margins
+        can be a single value, a pair of values separated (for setting
+        separate horizontal and vertical margins), or the full set of four
+        margins (for setting separate left, right, bottom, and top
+        margins). When passing multiple values, it can be either a list or
+        a string with the values separated by forward
+        slashes [Default is no margins].
+    no_clip : bool
+        Do **not** clip features extruding outside the inset frame
+        boundaries [Default is ``False``].
+    {region}
+    {projection}
+    {verbose}
+
+    Examples
+    --------
+    >>> import pygmt
+    >>>
+    >>> # Create the larger figure
+    >>> fig = pygmt.Figure()
+    >>> fig.coast(region="MG+r2", water="lightblue", shorelines="thin")
+    >>> # Use a "with" statement to initialize the inset context manager
+    >>> # Setting the position to top left and a width of 3.5 centimeters
+    >>> with fig.inset(position="jTL+w3.5c+o0.2c", margin=0, box="+pgreen"):
+    ...     # Map elements under the "with" statement are plotted in the inset
+    ...     fig.coast(
+    ...         region="g",
+    ...         projection="G47/-20/3.5c",
+    ...         land="gray",
+    ...         water="white",
+    ...         dcw="MG+gred",
+    ...     )
+    ...
+    >>> # Map elements outside the "with" statement are plotted in the main
+    >>> # figure
+    >>> fig.logo(position="jBR+o0.2c+w3c")
+    >>> fig.show()
+    """
+    kwargs = self._preprocess(**kwargs)
+    with Session() as lib:
+        try:
+            lib.call_module(module="inset", args=["begin", *build_arg_list(kwargs)])
+            yield
+        finally:
+            lib.call_module(
+                module="inset", args=["end", *build_arg_list({"V": kwargs.get("V")})]
+            )
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/legend.html b/v0.14.0/_modules/pygmt/src/legend.html new file mode 100644 index 00000000000..29b3d59baee --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/legend.html @@ -0,0 +1,308 @@ + + + + + + + + pygmt.src.legend — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.legend

+"""
+legend - Plot a legend.
+"""
+
+import io
+import pathlib
+
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    build_arg_list,
+    data_kind,
+    fmt_docstring,
+    is_nonstr_iter,
+    kwargs_to_strings,
+    use_alias,
+)
+
+
+@fmt_docstring
+@use_alias(
+    R="region",
+    J="projection",
+    D="position",
+    F="box",
+    V="verbose",
+    c="panel",
+    p="perspective",
+    t="transparency",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
+def legend(
+    self,
+    spec: str | pathlib.PurePath | io.StringIO | None = None,
+    position="JTR+jTR+o0.2c",
+    box="+gwhite+p1p",
+    **kwargs,
+):
+    r"""
+    Plot legends on maps.
+
+    Makes legends that can be overlaid on maps. Reads specific
+    legend-related information from an input file, or automatically creates
+    legend entries from plotted symbols that have labels. Unless otherwise
+    noted, annotations will be made using the primary annotation font and
+    size in effect (i.e., :gmt-term:`FONT_ANNOT_PRIMARY`).
+
+    Full option list at :gmt-docs:`legend.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    spec
+        The legend specification. It can be:
+
+        - ``None`` which means using the automatically generated legend specification
+          file
+        - A string or a :class:`pathlib.PurePath` object pointing to the legend
+          specification file
+        - A :class:`io.StringIO` object containing the legend specification.
+
+        See :gmt-docs:`legend.html` for the definition of the legend specification.
+    {projection}
+    {region}
+    position : str
+        [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
+        **+w**\ *width*\ [/*height*]\ [**+j**\ *justify*]\ [**+l**\ *spacing*]\
+        [**+o**\ *dx*\ [/*dy*]].
+        Define the reference point on the map for the
+        legend. By default, uses **JTR**\ **+jTR**\ **+o**\ 0.2c which
+        places the legend at the top-right corner inside the map frame, with a
+        0.2 cm offset.
+    box : bool or str
+        [**+c**\ *clearances*][**+g**\ *fill*][**+i**\ [[*gap*/]\ *pen*]]\
+        [**+p**\ [*pen*]][**+r**\ [*radius*]][**+s**\ [[*dx*/*dy*/][*shade*]]].
+        If set to ``True``, draw a rectangular border around the legend
+        using :gmt-term:`MAP_FRAME_PEN`. By default, uses
+        **+g**\ white\ **+p**\ 1p which draws a box around the legend using a
+        1p black pen and adds a white background.
+    {verbose}
+    {panel}
+    {perspective}
+    {transparency}
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    if kwargs.get("D") is None:
+        kwargs["D"] = position
+        if kwargs.get("F") is None:
+            kwargs["F"] = box
+
+    kind = data_kind(spec)
+    if kind not in {"empty", "file", "stringio"}:
+        msg = f"Unrecognized data type: {type(spec)}"
+        raise GMTInvalidInput(msg)
+    if kind == "file" and is_nonstr_iter(spec):
+        msg = "Only one legend specification file is allowed."
+        raise GMTInvalidInput(msg)
+
+    with Session() as lib:
+        with lib.virtualfile_in(data=spec, required_data=False) as vintbl:
+            lib.call_module(module="legend", args=build_arg_list(kwargs, infile=vintbl))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/logo.html b/v0.14.0/_modules/pygmt/src/logo.html new file mode 100644 index 00000000000..255678b7223 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/logo.html @@ -0,0 +1,264 @@ + + + + + + + + pygmt.src.logo — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.logo

+"""
+logo - Plot the GMT logo
+"""
+
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+
+@fmt_docstring
+@use_alias(
+    R="region",
+    J="projection",
+    D="position",
+    F="box",
+    S="style",
+    V="verbose",
+    c="panel",
+    t="transparency",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
+def logo(self, **kwargs):
+    r"""
+    Plot the GMT logo.
+
+    By default, the GMT logo is 2 inches wide and 1 inch high and
+    will be positioned relative to the current plot origin.
+    Use various options to change this and to place a transparent or
+    opaque rectangular map panel behind the GMT logo.
+
+    Full option list at :gmt-docs:`gmtlogo.html`.
+
+    {aliases}
+
+    Parameters
+    ----------
+    {projection}
+    {region}
+    position : str
+        [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
+        **+w**\ *width*\ [**+j**\ *justify*]\ [**+o**\ *dx*\ [/*dy*]].
+        Set reference point on the map for the image.
+    box : bool or str
+        If set to ``True``, draw a rectangular border around the
+        GMT logo.
+    style : str
+        [**l**\|\ **n**\|\ **u**].
+        Control what is written beneath the map portion of the logo.
+
+        - **l** to plot the text label "The Generic Mapping Tools"
+          [Default]
+        - **n** to skip the label placement
+        - **u** to place the URL to the GMT site
+    {verbose}
+    {panel}
+    {transparency}
+    """
+    kwargs = self._preprocess(**kwargs)
+    with Session() as lib:
+        lib.call_module(module="logo", args=build_arg_list(kwargs))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/makecpt.html b/v0.14.0/_modules/pygmt/src/makecpt.html new file mode 100644 index 00000000000..254b0fd65f0 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/makecpt.html @@ -0,0 +1,372 @@ + + + + + + + + pygmt.src.makecpt — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.makecpt

+"""
+makecpt - Make GMT color palette tables.
+"""
+
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+
+
+[docs] +@fmt_docstring +@use_alias( + A="transparency", + C="cmap", + D="background", + F="color_model", + G="truncate", + H="output", + I="reverse", + M="overrule_bg", + N="no_bg", + Q="log", + T="series", + V="verbose", + W="categorical", + Ww="cyclic", + Z="continuous", +) +@kwargs_to_strings(T="sequence", G="sequence") +def makecpt(**kwargs): + r""" + Make GMT color palette tables. + + This function will help you to make static color palette tables (CPTs). + By default, the CPT will be saved as the current CPT of the session, + figure, subplot, panel, or inset depending on which level + :func:`pygmt.makecpt` is called (for details on how GMT modern mode + maintains different levels of colormaps please see + :gmt-docs:`reference/features.html#gmt-modern-mode-hierarchical-levels`). + You can use ``output`` to save the CPT to a file. + You define an equidistant + set of contour intervals or pass your own z-table or list, and create a new + CPT based on an existing master (dynamic) CPT. The resulting CPT can be + reversed relative to the master cpt, and can be made continuous or + discrete. For color tables beyond the standard GMT offerings, visit + `cpt-city <http://www.seaviewsensing.com/pub/cpt-city/>`_ and + `Scientific Colour-Maps <https://www.fabiocrameri.ch/colourmaps.php>`_. + + The CPT includes three additional colors beyond the range of z-values. + These are the background color (B) assigned to values lower than the lowest + *z*-value, the foreground color (F) assigned to values higher than the + highest *z*-value, and the NaN color (N) painted wherever values are + undefined. + + If the master CPT includes B, F, and N entries, these will be copied into + the new master file. If not, the parameters :gmt-term:`COLOR_BACKGROUND`, + :gmt-term:`COLOR_FOREGROUND`, and :gmt-term:`COLOR_NAN` from the + :gmt-docs:`gmt.conf <gmt.conf>` file will be used. This + default behavior can be overruled using the parameters ``background``, + ``overrule_bg`` or ``no_bg``. + + The color model (RGB, HSV or CMYK) of the palette created by + :func:`pygmt.makecpt` will be the same as specified in the header of the + master CPT. When there is no :gmt-term:`COLOR_MODEL` entry in the + master CPT, the :gmt-term:`COLOR_MODEL` specified in the + :gmt-docs:`gmt.conf <gmt.conf>` file will be used. + + Full option list at :gmt-docs:`makecpt.html` + + {aliases} + + Parameters + ---------- + transparency : str + Set a constant level of transparency (0-100) for all color slices. + Append **+a** to also affect the foreground, background, and NaN + colors [Default is no transparency, i.e., ``0`` (opaque)]. + cmap : str + Select the master color palette table (CPT) to use in the + interpolation. Full list of built-in color palette tables can be found + at :gmt-docs:`reference/cpts.html#built-in-color-palette-tables-cpt`. + background : bool or str + Select the back- and foreground colors to match the colors for lowest + and highest *z*-values in the output CPT [Default (``background=True`` + or ``background="o"``) uses the colors specified in the master file, or + those defined by the parameters :gmt-term:`COLOR_BACKGROUND`, + :gmt-term:`COLOR_FOREGROUND`, and :gmt-term:`COLOR_NAN`]. Use + ``background="i"`` to match the colors for the lowest and highest + values in the input (instead of the output) CPT. + color_model : str + [**R**\|\ **r**\|\ **h**\|\ **c**]\ + [**+c**\ [*label*\|\ *start*\ [**-**]]]. + Force output CPT to be written with r/g/b codes, gray-scale values or + color name (**R**, default) or r/g/b codes only (**r**), or h-s-v codes + (**h**), or c/m/y/k codes (**c**). Optionally or alternatively, append + **+c** to write discrete palettes in categorical format. If *label* is + appended then we create labels for each category to be used when the + CPT is plotted. The *label* may be a comma-separated list of category + names (you can skip a category by not giving a name), or give + *start*, where we automatically build monotonically increasing + labels from *start* (a single letter or an integer). Additionally + append **-** to build ranges *start*-*start+1* as labels instead. + series : list or str + [*min/max/inc*\ [**+b**\|\ **l**\|\ **n**]\|\ *file*\|\ *list*]. + Define the range of the new CPT by giving the lowest and highest + z-value (and optionally an interval). If this is not given, the + existing range in the master CPT will be used intact. The values + produced defines the color slice boundaries. If **+n** is used it + refers to the number of such boundaries and not the number of slices. + For details on array creation, see + :gmt-docs:`makecpt.html#generate-1d-array`. + truncate : list or str + *zlow/zhigh*. + Truncate the incoming CPT so that the lowest and highest z-levels are + to *zlow* and *zhigh*. If one of these equal NaN then we leave that + end of the CPT alone. The truncation takes place before any resampling. + See also :gmt-docs:`reference/features.html#manipulating-cpts`. + output : str + Optional. The file name with extension .cpt to store the generated CPT + file. If not given or ``False`` [Default], saves the CPT as the current + CPT of the session, figure, subplot, panel, or inset depending on which + level :func:`pygmt.makecpt` is called. + reverse : str + Set this to ``True`` or **c** [Default] to reverse the sense of color + progression in the master CPT. Set this to **z** to reverse the sign + of z-values in the color table. Note that this change of z-direction + happens before ``truncate`` and ``series`` values are used so the + latter must be compatible with the changed z-range. See also + :gmt-docs:`reference/features.html#manipulating-cpts`. + overrule_bg : str + Overrule background, foreground, and NaN colors specified in the master + CPT with the values of the parameters :gmt-term:`COLOR_BACKGROUND`, + :gmt-term:`COLOR_FOREGROUND`, and :gmt-term:`COLOR_NAN` specified in + the :gmt-docs:`gmt.conf <gmt.conf>` file. When combined with + ``background``, only :gmt-term:`COLOR_NAN` is considered. + no_bg : bool + Do not write out the background, foreground, and NaN-color fields + [Default will write them, i.e. ``no_bg=False``]. + log : bool + For logarithmic interpolation scheme with input given as logarithms. + Expects input z-values provided via ``series`` to be log10(*z*), + assigns colors, and writes out *z*. + continuous : bool + Force a continuous CPT when building from a list of colors and a list + of z-values [Default is None, i.e. discrete values]. + {verbose} + categorical : bool + Do not interpolate the input color table but pick the output colors + starting at the beginning of the color table, until colors for all + intervals are assigned. This is particularly useful in combination with + a categorical color table, like ``cmap="categorical"``. + cyclic : bool + Produce a wrapped (cyclic) color table that endlessly repeats its + range. Note that ``cyclic=True`` cannot be set together with + ``categorical=True``. + """ + if kwargs.get("W") is not None and kwargs.get("Ww") is not None: + msg = "Set only categorical or cyclic to True, not both." + raise GMTInvalidInput(msg) + + if (output := kwargs.pop("H", None)) is not None: + kwargs["H"] = True + + with Session() as lib: + lib.call_module(module="makecpt", args=build_arg_list(kwargs, outfile=output))
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/meca.html b/v0.14.0/_modules/pygmt/src/meca.html new file mode 100644 index 00000000000..41b4cd9e978 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/meca.html @@ -0,0 +1,677 @@ + + + + + + + + pygmt.src.meca — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.meca

+"""
+meca - Plot focal mechanisms.
+"""
+
+import numpy as np
+import pandas as pd
+from pygmt.clib import Session
+from pygmt.exceptions import GMTError, GMTInvalidInput
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+
+def convention_code(convention, component="full"):
+    """
+    Determine the convention code for focal mechanisms.
+
+    The convention code can be used in meca's -S option.
+
+    Parameters
+    ----------
+    convention : str
+        The focal mechanism convention. Can be one of the following:
+
+        - ``"aki"``: Aki and Richards
+        - ``"gcmt"``: Global Centroid Moment Tensor
+        - ``"partial"``: Partial focal mechanism
+        - ``"mt"``: Moment tensor
+        - ``"principal_axis"``: Principal axis
+
+        Single letter convention codes like ``"a"`` and ``"c"`` are also
+        supported but undocumented.
+
+    component : str
+        The component of the focal mechanism. Only used when ``convention`` is
+        ``"mt"`` or ``"principal_axis"``. Can be one of the following:
+
+        - ``"full"``: Full moment tensor
+        - ``"deviatoric"``: Deviatoric moment tensor
+        - ``"dc"``: Double couple
+
+    Returns
+    -------
+    str
+        The single-letter convention code used in meca's -S option.
+
+    Examples
+    --------
+    >>> convention_code("aki")
+    'a'
+    >>> convention_code("gcmt")
+    'c'
+    >>> convention_code("partial")
+    'p'
+
+    >>> convention_code("mt", component="full")
+    'm'
+    >>> convention_code("mt", component="deviatoric")
+    'z'
+    >>> convention_code("mt", component="dc")
+    'd'
+    >>> convention_code("principal_axis", component="full")
+    'x'
+    >>> convention_code("principal_axis", component="deviatoric")
+    't'
+    >>> convention_code("principal_axis", component="dc")
+    'y'
+
+    >>> for code in ["a", "c", "m", "d", "z", "p", "x", "y", "t"]:
+    ...     assert convention_code(code) == code
+
+    >>> convention_code("invalid")
+    Traceback (most recent call last):
+      ...
+    pygmt.exceptions.GMTInvalidInput: Invalid convention 'invalid'.
+
+    >>> convention_code("mt", "invalid")  # doctest: +NORMALIZE_WHITESPACE
+    Traceback (most recent call last):
+      ...
+    pygmt.exceptions.GMTInvalidInput:
+        Invalid component 'invalid' for convention 'mt'.
+    """
+    # Codes for focal mechanism formats determined by "convention"
+    codes1 = {"aki": "a", "gcmt": "c", "partial": "p"}
+    # Codes for focal mechanism formats determined by both "convention" and
+    # "component"
+    codes2 = {
+        "mt": {"deviatoric": "z", "dc": "d", "full": "m"},
+        "principal_axis": {"deviatoric": "t", "dc": "y", "full": "x"},
+    }
+
+    if convention in codes1:
+        return codes1[convention]
+    if convention in codes2:
+        if component not in codes2[convention]:
+            msg = f"Invalid component '{component}' for convention '{convention}'."
+            raise GMTInvalidInput(msg)
+        return codes2[convention][component]
+    if convention in {"a", "c", "m", "d", "z", "p", "x", "y", "t"}:
+        return convention
+    msg = f"Invalid convention '{convention}'."
+    raise GMTInvalidInput(msg)
+
+
+def convention_name(code):
+    """
+    Determine the name of a focal mechanism convention from its code.
+
+    Parameters
+    ----------
+    code : str
+        The single-letter convention code.
+
+    Returns
+    -------
+    str
+        The name of the focal mechanism convention.
+
+    Examples
+    --------
+    >>> convention_name("a")
+    'aki'
+    >>> convention_name("aki")
+    'aki'
+    """
+    name = {
+        "a": "aki",
+        "c": "gcmt",
+        "p": "partial",
+        "z": "mt",
+        "d": "mt",
+        "m": "mt",
+        "x": "principal_axis",
+        "y": "principal_axis",
+        "t": "principal_axis",
+    }.get(code)
+    return name if name is not None else code
+
+
+def convention_params(convention):
+    """
+    Return the list of focal mechanism parameters for a given convention.
+
+    Parameters
+    ----------
+    convention : str
+        The focal mechanism convention. Can be one of the following:
+
+        - ``"aki"``: Aki and Richards
+        - ``"gcmt"``: Global Centroid Moment Tensor
+        - ``"partial"``: Partial focal mechanism
+        - ``"mt"``: Moment tensor
+        - ``"principal_axis"``: Principal axis
+
+    Returns
+    -------
+    list
+        The list of focal mechanism parameters.
+    """
+    return {
+        "aki": ["strike", "dip", "rake", "magnitude"],
+        "gcmt": [
+            "strike1",
+            "dip1",
+            "rake1",
+            "strike2",
+            "dip2",
+            "rake2",
+            "mantissa",
+            "exponent",
+        ],
+        "mt": ["mrr", "mtt", "mff", "mrt", "mrf", "mtf", "exponent"],
+        "partial": ["strike1", "dip1", "strike2", "fault_type", "magnitude"],
+        "principal_axis": [
+            "t_value",
+            "t_azimuth",
+            "t_plunge",
+            "n_value",
+            "n_azimuth",
+            "n_plunge",
+            "p_value",
+            "p_azimuth",
+            "p_plunge",
+            "exponent",
+        ],
+    }[convention]
+
+
+@fmt_docstring
+@use_alias(
+    A="offset",
+    B="frame",
+    C="cmap",
+    E="extensionfill",
+    Fr="labelbox",
+    G="compressionfill",
+    J="projection",
+    L="outline",
+    N="no_clip",
+    R="region",
+    T="nodal",
+    V="verbose",
+    W="pen",
+    c="panel",
+    p="perspective",
+    t="transparency",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
+def meca(  # noqa: PLR0912, PLR0913, PLR0915
+    self,
+    spec,
+    scale,
+    convention=None,
+    component="full",
+    longitude=None,
+    latitude=None,
+    depth=None,
+    plot_longitude=None,
+    plot_latitude=None,
+    event_name=None,
+    **kwargs,
+):
+    r"""
+    Plot focal mechanisms.
+
+    Full option list at :gmt-docs:`supplements/seis/meca.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    spec : str, 1-D numpy array, 2-D numpy array, dict, or pandas.DataFrame
+        Data that contain focal mechanism parameters.
+
+        ``spec`` can be specified in either of the following types:
+
+        - *str*: a file name containing focal mechanism parameters as columns. The
+          meaning of each column is:
+
+          - Columns 1 and 2: event longitude and latitude
+          - Column 3: event depth (in kilometers)
+          - Columns 4 to 3+n: focal mechanism parameters. The number of columns *n*
+            depends on the choice of ``convention``, which is described below.
+          - Columns 4+n and 5+n: longitude and latitude at which to place the
+            beachball. ``0 0`` plots the beachball at the longitude and latitude
+            given in the columns 1 and 2. [optional; requires ``offset=True``].
+          - Last Column: text string to appear near the beachball [optional].
+
+        - *1-D np.array*: focal mechanism parameters of a single event.
+          The meanings of columns are the same as above.
+        - *2-D np.array*: focal mechanism parameters of multiple events.
+          The meanings of columns are the same as above.
+        - *dict* or :class:`pandas.DataFrame`: The dict keys or
+          :class:`pandas.DataFrame` column names determine the focal mechanism
+          convention. For the different conventions, the following combination of
+          keys / column names are required:
+
+          - ``"aki"``: *strike*, *dip*, *rake*, *magnitude*
+          - ``"gcmt"``: *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*,
+            *mantissa*, *exponent*
+          - ``"mt"``: *mrr*, *mtt*, *mff*, *mrt*, *mrf*, *mtf*, *exponent*
+          - ``"partial"``: *strike1*, *dip1*, *strike2*, *fault_type*, *magnitude*
+          - ``"principal_axis"``: *t_value*, *t_azimuth*, *t_plunge*, *n_value*,
+            *n_azimuth*, *n_plunge*, *p_value*, *p_azimuth*, *p_plunge*, *exponent*
+
+          A dict may contain values for a single focal mechanism or lists of
+          values for multiple focal mechanisms.
+
+          Both dict and :class:`pandas.DataFrame` may optionally contain the keys /
+          column names: ``latitude``, ``longitude``, ``depth``, ``plot_longitude``,
+          ``plot_latitude``, and/or ``event_name``.
+
+        If ``spec`` is either a str or a 1-D or 2-D numpy array, the ``convention``
+        parameter is required to interpret the columns. If ``spec`` is a dict or
+        a :class:`pandas.DataFrame`, ``convention`` is not needed and ignored if
+        specified.
+    scale : float or str
+        *scale*\ [**+a**\ *angle*][**+f**\ *font*][**+j**\ *justify*]\
+        [**+l**][**+m**][**+o**\ *dx*\ [/\ *dy*]][**+s**\ *reference*].
+        Adjust scaling of the radius of the beachball, which is  proportional to the
+        magnitude. By default, *scale* defines the size for magnitude = 5 (i.e., scalar
+        seismic moment M0 = 4.0E23 dynes-cm). If **+l** is used the radius will be
+        proportional to the seismic moment instead. Use **+s** and give a *reference*
+        to change the reference magnitude (or moment), and use **+m** to plot all
+        beachballs with the same size. A text string can be specified to appear near
+        the beachball (corresponding to column or parameter ``event_name``). Append
+        **+a**\ *angle* to change the angle of the text string; append **+f**\ *font*
+        to change its font (size,fontname,color); append **+j**\ *justify* to change
+        the text location relative to the beachball [Default is ``"TC"``, i.e., Top
+        Center]; append **+o** to offset the text string by *dx*\ /*dy*.
+    convention : str
+        Focal mechanism convention. Choose from:
+
+        - ``"aki"`` (Aki and Richards)
+        - ``"gcmt"`` (global CMT)
+        - ``"mt"`` (seismic moment tensor)
+        - ``"partial"`` (partial focal mechanism)
+        - ``"principal_axis"`` (principal axis)
+
+        Ignored if ``spec`` is a dict or :class:`pandas.DataFrame`.
+    component : str
+        The component of the seismic moment tensor to plot.
+
+        - ``"full"``: the full seismic moment tensor
+        - ``"dc"``: the closest double couple defined from the moment tensor (zero
+          trace and zero determinant)
+        - ``"deviatoric"``: deviatoric part of the moment tensor (zero trace)
+    longitude/latitude/depth : float, list, or 1-D numpy array
+        Longitude(s) / latitude(s) / depth(s) of the event(s). Length must match the
+        number of events. Overrides the ``longitude`` / ``latitude`` / ``depth`` values
+        in ``spec`` if ``spec`` is a dict or :class:`pandas.DataFrame`.
+    plot_longitude/plot_latitude : float, str, list, or 1-D numpy array
+        Longitude(s) / Latitude(s) at which to place the beachball(s). Length must match
+        the number of events. Overrides the ``plot_longitude`` / ``plot_latitude``
+        values in ``spec`` if ``spec`` is a dict or :class:`pandas.DataFrame`.
+    event_name : str, list of str, or 1-D numpy array
+        Text string(s), e.g., event name(s) to appear near the beachball(s). Length
+        must match the number of events. Overrides the ``event_name`` labels in ``spec``
+        if ``spec`` is a dict or :class:`pandas.DataFrame`.
+    labelbox : bool or str
+        [*fill*].
+        Draw a box behind the label if given via ``event_name``. Use *fill* to give a
+        fill color [Default is ``"white"``].
+    offset : bool or str
+        [**+p**\ *pen*][**+s**\ *size*].
+        Offset beachball(s) to the longitude(s) and latitude(s) specified in the last
+        two columns of the input file or array, or by ``plot_longitude`` and
+        ``plot_latitude`` if provided. A line from the beachball to the initial location
+        is drawn. Use **+s**\ *size* to plot a small circle at the initial location and
+        to set the diameter of this circle [Default is no circle]. Use **+p**\ *pen* to
+        set the pen attributes for this feature [Default is set via ``pen``]. The fill
+        of the circle is set via ``compressionfill`` or ``cmap``, i.e., corresponds to
+        the fill of the compressive quadrants.
+    compressionfill : str
+        Set color or pattern for filling compressive quadrants [Default is ``"black"``].
+        This setting also applies to the fill of the circle defined via ``offset``.
+    extensionfill : str
+        Set color or pattern for filling extensive quadrants [Default is ``"white"``].
+    pen : str
+        Set (default) pen attributes for all lines related to the beachball [Default is
+        ``"0.25p,black,solid"``]. This setting applies to ``outline``, ``nodal``, and
+        ``offset``, unless overruled by arguments passed to those parameters. Draws the
+        circumference of the beachball.
+    outline : bool or str
+        [*pen*].
+        Draw circumference and nodal planes of the beachball. Use *pen* to set  the pen
+        attributes for this feature [Default is set via ``pen``].
+    nodal : bool, int, or str
+        [*nplane*][/*pen*].
+        Plot the nodal planes and outline the bubble which is transparent. If *nplane*
+        is
+
+        - ``0`` or ``True``: both nodal planes are plotted [Default].
+        - ``1``: only the first nodal plane is plotted.
+        - ``2``: only the second nodal plane is plotted.
+
+        Use /*pen* to set the pen attributes for this feature [Default is set via
+        ``pen``].
+        For double couple mechanisms, ``nodal`` renders the beachball transparent by
+        drawing only the nodal planes and the circumference. For non-double couple
+        mechanisms, ``nodal=0`` overlays best double couple transparently.
+    cmap : str
+        File name of a CPT file or a series of comma-separated colors (e.g.,
+        *color1,color2,color3*) to build a linear continuous CPT from those colors
+        automatically. The color of the compressive quadrants is determined by the
+        z-value (i.e., event depth or the third column for an input file). This setting
+        also applies to the fill of the circle defined via ``offset``.
+    no_clip : bool
+        Do **not** skip symbols that fall outside the frame boundaries [Default is
+       ``False``, i.e., plot symbols inside the frame boundaries only].
+    {projection}
+    {region}
+    {frame}
+    {verbose}
+    {panel}
+    {perspective}
+    {transparency}
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    # Convert spec to pandas.DataFrame unless it's a file
+    if isinstance(spec, dict | pd.DataFrame):  # spec is a dict or pd.DataFrame
+        # determine convention from dict keys or pd.DataFrame column names
+        for conv in ["aki", "gcmt", "mt", "partial", "principal_axis"]:
+            if set(convention_params(conv)).issubset(set(spec.keys())):
+                convention = conv
+                break
+        else:
+            if isinstance(spec, dict):
+                msg = "Keys in dict 'spec' do not match known conventions."
+            else:
+                msg = "Column names in pd.DataFrame 'spec' do not match known conventions."
+            raise GMTError(msg)
+
+        # convert dict to pd.DataFrame so columns can be reordered
+        if isinstance(spec, dict):
+            # convert values to ndarray so pandas doesn't complain about "all
+            # scalar values". See
+            # https://github.com/GenericMappingTools/pygmt/pull/2174
+            spec = pd.DataFrame(
+                {key: np.atleast_1d(value) for key, value in spec.items()}
+            )
+    elif isinstance(spec, np.ndarray):  # spec is a numpy array
+        if convention is None:
+            msg = "'convention' must be specified for an array input."
+            raise GMTInvalidInput(msg)
+        # make sure convention is a name, not a code
+        convention = convention_name(convention)
+
+        # Convert array to pd.DataFrame and assign column names
+        spec = pd.DataFrame(np.atleast_2d(spec))
+        colnames = ["longitude", "latitude", "depth", *convention_params(convention)]
+        # check if spec has the expected number of columns
+        ncolsdiff = len(spec.columns) - len(colnames)
+        if ncolsdiff == 0:
+            pass
+        elif ncolsdiff == 1:
+            colnames += ["event_name"]
+        elif ncolsdiff == 2:
+            colnames += ["plot_longitude", "plot_latitude"]
+        elif ncolsdiff == 3:
+            colnames += ["plot_longitude", "plot_latitude", "event_name"]
+        else:
+            msg = (
+                f"Input array must have {len(colnames)} to {len(colnames) + 3} columns."
+            )
+            raise GMTInvalidInput(msg)
+        spec.columns = colnames
+
+    # Now spec is a pd.DataFrame or a file
+    if isinstance(spec, pd.DataFrame):
+        # override the values in pd.DataFrame if parameters are given
+        for arg, name in [
+            (longitude, "longitude"),
+            (latitude, "latitude"),
+            (depth, "depth"),
+            (plot_longitude, "plot_longitude"),
+            (plot_latitude, "plot_latitude"),
+            (event_name, "event_name"),
+        ]:
+            if arg is not None:
+                spec[name] = np.atleast_1d(arg)
+
+        # Due to the internal implementation of the meca module, we need to
+        # convert the following columns to strings if they exist
+        if "plot_longitude" in spec.columns and "plot_latitude" in spec.columns:
+            spec["plot_longitude"] = spec["plot_longitude"].astype(str)
+            spec["plot_latitude"] = spec["plot_latitude"].astype(str)
+        if "event_name" in spec.columns:
+            spec["event_name"] = spec["event_name"].astype(str)
+
+        # Reorder columns in DataFrame to match convention if necessary
+        # expected columns are:
+        # longitude, latitude, depth, focal_parameters,
+        #   [plot_longitude, plot_latitude] [event_name]
+        newcols = ["longitude", "latitude", "depth", *convention_params(convention)]
+        if "plot_longitude" in spec.columns and "plot_latitude" in spec.columns:
+            newcols += ["plot_longitude", "plot_latitude"]
+            if kwargs.get("A") is None:
+                kwargs["A"] = True
+        if "event_name" in spec.columns:
+            newcols += ["event_name"]
+        # reorder columns in DataFrame
+        if spec.columns.tolist() != newcols:
+            spec = spec.reindex(newcols, axis=1)
+
+    # determine data_format from convention and component
+    data_format = convention_code(convention=convention, component=component)
+
+    # Assemble -S flag
+    kwargs["S"] = f"{data_format}{scale}"
+    with Session() as lib:
+        with lib.virtualfile_in(check_kind="vector", data=spec) as vintbl:
+            lib.call_module(module="meca", args=build_arg_list(kwargs, infile=vintbl))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/nearneighbor.html b/v0.14.0/_modules/pygmt/src/nearneighbor.html new file mode 100644 index 00000000000..06be12ed28d --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/nearneighbor.html @@ -0,0 +1,360 @@ + + + + + + + + pygmt.src.nearneighbor — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.nearneighbor

+"""
+nearneighbor - Grid table data using a "Nearest neighbor" algorithm.
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["nearneighbor"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + E="empty", + I="spacing", + N="sectors", + R="region", + S="search_radius", + V="verbose", + a="aspatial", + b="binary", + d="nodata", + e="find", + f="coltypes", + g="gap", + h="header", + i="incols", + r="registration", + w="wrap", +) +@kwargs_to_strings(I="sequence", R="sequence", i="sequence_comma") +def nearneighbor( + data=None, x=None, y=None, z=None, outgrid: str | None = None, **kwargs +) -> xr.DataArray | None: + r""" + Grid table data using a "Nearest neighbor" algorithm. + + **nearneighbor** reads arbitrarily located (*x*, *y*, *z*\ [, *w*]) + triplets [quadruplets] and uses a nearest neighbor algorithm to assign a + weighted average value to each node that has one or more data points within + a search radius centered on the node with adequate coverage across a subset + of the chosen sectors. The node value is computed as a weighted mean of the + nearest point from each sector inside the search radius. The weighting + function and the averaging used is given by: + + .. math:: + w(r_i) = \frac{{w_i}}{{1 + d(r_i) ^ 2}}, + \quad d(r) = \frac {{3r}}{{R}}, + \quad \bar{{z}} = \frac{{\sum_i^n w(r_i) z_i}}{{\sum_i^n w(r_i)}} + + where :math:`n` is the number of data points that satisfy the selection + criteria and :math:`r_i` is the distance from the node to the *i*'th data + point. If no data weights are supplied then :math:`w_i = 1`. + + .. figure:: https://docs.generic-mapping-tools.org/dev/_images/GMT_nearneighbor.png + :width: 300 px + :align: center + + Search geometry includes the search radius (R) which limits the points + considered and the number of sectors (here 4), which restricts how + points inside the search radius contribute to the value at the node. + Only the closest point in each sector (red circles) contribute to the + weighted estimate. + + Takes a matrix, (x, y, z) triplets, or a file name as input. + + Must provide either ``data`` or ``x``, ``y``, and ``z``. + + Full option list at :gmt-docs:`nearneighbor.html` + + {aliases} + + Parameters + ---------- + data : str, {table-like} + Pass in (x, y, z) or (longitude, latitude, elevation) values by + providing a file name to an ASCII data table, a 2-D + {table-classes}. + x/y/z : 1-D arrays + Arrays of x and y coordinates and values z of the data points. + + {spacing} + + {region} + + search_radius : str + Set the search radius that determines which data points are considered + close to a node. + {outgrid} + empty : str + Optional. Set the value assigned to empty nodes. Defaults to NaN. + + sectors : str + *sectors*\ [**+m**\ *min_sectors*]\|\ **n**. + Optional. The circular search area centered on each node is divided + into *sectors* sectors. Average values will only be computed if there + is *at least* one value inside each of at least *min_sectors* of the + sectors for a given node. Nodes that fail this test are assigned the + value NaN (but see ``empty``). If **+m** is omitted then *min_sectors* + is set to be at least 50% of *sectors* (i.e., rounded up to next + integer) [Default is a quadrant search with 100% coverage, i.e., + *sectors* = *min_sectors* = 4]. Note that only the nearest value per + sector enters into the averaging; the more distant points are ignored. + Alternatively, use ``sectors="n"`` to call GDAL's nearest neighbor + algorithm instead. + + {verbose} + {aspatial} + {binary} + {nodata} + {find} + {coltypes} + {gap} + {header} + {incols} + {registration} + {wrap} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray`: if ``outgrid`` is not set + - ``None`` if ``outgrid`` is set (grid output will be stored in the file set by + ``outgrid``) + Example + ------- + >>> import pygmt + >>> # Load a sample dataset of bathymetric x, y, and z values + >>> data = pygmt.datasets.load_sample_data(name="bathymetry") + >>> # Create a new grid with 5 arc-minutes spacing in the designated region + >>> # Set search_radius to only take points within 10 arc-minutes of a node + >>> output = pygmt.nearneighbor( + ... data=data, + ... spacing="5m", + ... region=[245, 255, 20, 30], + ... search_radius="10m", + ... ) + """ + with Session() as lib: + with ( + lib.virtualfile_in( + check_kind="vector", data=data, x=x, y=y, z=z, required_z=True + ) as vintbl, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="nearneighbor", args=build_arg_list(kwargs, infile=vintbl) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/plot.html b/v0.14.0/_modules/pygmt/src/plot.html new file mode 100644 index 00000000000..b4bd06553b4 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/plot.html @@ -0,0 +1,465 @@ + + + + + + + + pygmt.src.plot — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.plot

+"""
+plot - Plot in two dimensions.
+"""
+
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    build_arg_list,
+    data_kind,
+    fmt_docstring,
+    is_nonstr_iter,
+    kwargs_to_strings,
+    use_alias,
+)
+from pygmt.src._common import _data_geometry_is_point
+
+
+@fmt_docstring
+@use_alias(
+    A="straight_line",
+    B="frame",
+    C="cmap",
+    D="offset",
+    E="error_bar",
+    F="connection",
+    G="fill",
+    I="intensity",
+    J="projection",
+    L="close",
+    N="no_clip",
+    R="region",
+    S="style",
+    V="verbose",
+    W="pen",
+    Z="zvalue",
+    a="aspatial",
+    b="binary",
+    c="panel",
+    d="nodata",
+    e="find",
+    f="coltypes",
+    g="gap",
+    h="header",
+    i="incols",
+    l="label",
+    p="perspective",
+    t="transparency",
+    w="wrap",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence")
+def plot(
+    self, data=None, x=None, y=None, size=None, symbol=None, direction=None, **kwargs
+):
+    r"""
+    Plot lines, polygons, and symbols in 2-D.
+
+    Takes a matrix, (x,y) pairs, or a file name as input and plots lines,
+    polygons, or symbols at those locations on a map.
+
+    Must provide either ``data`` or ``x``/``y``.
+
+    If providing data through ``x``/``y``, ``fill`` can be a 1-D array that
+    will be mapped to a colormap.
+
+    If a symbol is selected and no symbol size given, then plot will
+    interpret the third column of the input data as symbol size. Symbols
+    whose size is <= 0 are skipped. If no symbols are specified then the
+    symbol code (see ``style`` below) must be present as last column in the
+    input. If ``style`` is not used, a line connecting the data points will
+    be drawn instead. To explicitly close polygons, use ``close``. Select a
+    fill with ``fill``. If ``fill`` is set, ``pen`` will control whether the
+    polygon outline is drawn or not. If a symbol is selected, ``fill`` and
+    ``pen`` determine the fill and outline/no outline, respectively.
+
+    Full option list at :gmt-docs:`plot.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    data : str, {table-like}
+        Pass in either a file name to an ASCII data table, a 2-D
+        {table-classes}.
+        Use parameter ``incols`` to choose which columns are x, y, fill, and
+        size, respectively.
+    x/y : float or 1-D arrays
+        The x and y coordinates, or arrays of x and y coordinates of the
+        data points
+    size : 1-D array
+        The size of the data points in units specified using ``style``.
+        Only valid if using ``x``/``y``.
+    symbol : 1-D array
+        The symbols of the data points. Only valid if using ``x``/``y``.
+    direction : list of two 1-D arrays
+        If plotting vectors (using ``style="V"`` or ``style="v"``), then
+        should be a list of two 1-D arrays with the vector directions. These
+        can be angle and length, azimuth and length, or x and y components,
+        depending on the style options chosen.
+    {projection}
+    {region}
+    straight_line : bool or str
+        [**m**\|\ **p**\|\ **x**\|\ **y**].
+        By default, geographic line segments are drawn as great circle
+        arcs. To draw them as straight lines, use
+        ``straight_line=True``.
+        Alternatively, add **m** to draw the line by first following a
+        meridian, then a parallel. Or append **p** to start following a
+        parallel, then a meridian. (This can be practical to draw a line
+        along parallels, for example). For Cartesian data, points are
+        simply connected, unless you append **x** or **y** to draw
+        stair-case curves that whose first move is along *x* or *y*,
+        respectively.
+    {frame}
+    {cmap}
+    offset : str
+        *dx*/*dy*.
+        Offset the plot symbol or line locations by the given amounts
+        *dx/dy* [Default is no offset]. If *dy* is not given it is set
+        equal to *dx*.
+    error_bar : bool or str
+        [**x**\|\ **y**\|\ **X**\|\ **Y**][**+a**\|\ **A**]\
+        [**+cl**\|\ **f**][**+n**][**+w**\ *cap*][**+p**\ *pen*].
+        Draw error bars. Full documentation is at
+        :gmt-docs:`plot.html#e`.
+    connection : str
+        [**c**\|\ **n**\|\ **p**][**a**\|\ **r**\|\ **s**\|\ **t**\|\ *refpoint*].
+        Alter the way points are connected (by specifying a *scheme*) and data are
+        grouped (by specifying a *method*). Append one of three line connection schemes:
+
+        - **c**: Draw continuous line segments for each group [Default].
+        - **n**: Draw networks of line segments between all points in each group.
+        - **p**: Draw line segments from a reference point reset for each group.
+
+        Optionally, append the one of four segmentation methods to define the group:
+
+        - **a**: Ignore all segment headers, i.e., let all points belong to a single
+          group, and set group the reference point to the very first point of the first
+          file.
+        - **r**: Segment headers are honored so each segment is a group; the group
+          reference point is reset after each record to the previous point (this method
+          is only available with the ``connection="p"`` scheme).
+        - **s**: Same as **r**, but the group reference point is reset to the first
+          point of each incoming segment [Default].
+        - **t**: Consider all data in each file to be a single separate group and reset
+          the group reference point to the first point of each group.
+
+        Instead of the codes **a**\|\ **r**\|\ **s**\|\ **t** you may append the
+        coordinates of a *refpoint* which will serve as a fixed external reference point
+        for all groups.
+    {fill}
+        *fill* can be a 1-D array, but it is only valid if using ``x``/``y``
+        and ``cmap=True`` is also required.
+    intensity : float, bool, or 1-D array
+        Provide an *intensity* value (nominally in the -1 to +1 range) to
+        modulate the fill color by simulating illumination. If using
+        ``intensity=True``, we will instead read *intensity* from the first
+        data column after the symbol parameters (if given). *intensity* can
+        also be a 1-D array to set varying intensity for symbols, but it is
+        only valid for ``x``/``y`` pairs.
+    close : str
+        [**+b**\|\ **d**\|\ **D**][**+xl**\|\ **r**\|\ *x0*]\
+        [**+yl**\|\ **r**\|\ *y0*][**+p**\ *pen*].
+        Force closed polygons. Full documentation is at
+        :gmt-docs:`plot.html#l`.
+    no_clip : bool or str
+        [**c**\|\ **r**].
+        Do **not** clip symbols that fall outside the frame boundaries
+        [Default plots points whose coordinates are strictly inside the
+        frame boundaries only].
+        The parameter does not apply to lines and polygons which are always
+        clipped to the map region. For periodic (360-longitude) maps we
+        must plot all symbols twice in case they are clipped by the
+        repeating boundary. ``no_clip=True`` will turn off clipping and not
+        plot repeating symbols. Use ``no_clip="r"`` to turn off clipping
+        but retain the plotting of such repeating symbols, or use
+        ``no_clip="c"`` to retain clipping but turn off plotting of
+        repeating symbols.
+    style : str
+        Plot symbols (including vectors, pie slices, fronts, decorated or
+        quoted lines).
+    {pen}
+    {verbose}
+    zvalue : str
+        *value*\|\ *file*.
+        Instead of specifying a symbol or polygon fill and outline color
+        via ``fill`` and ``pen``, give both a *value* via ``zvalue`` and a
+        color lookup table via ``cmap``.  Alternatively, give the name of a
+        *file* with one z-value (read from the last column) for each
+        polygon in the input data. To apply it to the fill color, use
+        ``fill="+z"``. To apply it to the pen color, append **+z** to
+        ``pen``.
+    {aspatial}
+    {binary}
+    {panel}
+    {nodata}
+    {find}
+    {coltypes}
+    {gap}
+    {header}
+    {incols}
+    {label}
+    {perspective}
+    {transparency}
+        ``transparency`` can also be a 1-D array to set varying
+        transparency for symbols, but this option is only valid if using
+        ``x``/``y``.
+    {wrap}
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    kind = data_kind(data)
+    extra_arrays = []
+    if kind == "empty":  # Add more columns for vectors input
+        # Parameters for vector styles
+        if (
+            isinstance(kwargs.get("S"), str)
+            and len(kwargs["S"]) >= 1
+            and kwargs["S"][0] in "vV"
+            and is_nonstr_iter(direction)
+        ):
+            extra_arrays.extend(direction)
+        # Fill
+        if is_nonstr_iter(kwargs.get("G")):
+            extra_arrays.append(kwargs.get("G"))
+            del kwargs["G"]
+        # Size
+        if is_nonstr_iter(size):
+            extra_arrays.append(size)
+        # Intensity and transparency
+        for flag in ["I", "t"]:
+            if is_nonstr_iter(kwargs.get(flag)):
+                extra_arrays.append(kwargs.get(flag))
+                kwargs[flag] = ""
+        # Symbol must be at the last column
+        if is_nonstr_iter(symbol):
+            if "S" not in kwargs:
+                kwargs["S"] = True
+            extra_arrays.append(symbol)
+    else:
+        for name, value in [
+            ("direction", direction),
+            ("fill", kwargs.get("G")),
+            ("size", size),
+            ("intensity", kwargs.get("I")),
+            ("transparency", kwargs.get("t")),
+            ("symbol", symbol),
+        ]:
+            if is_nonstr_iter(value):
+                msg = f"'{name}' can't be a 1-D array if 'data' is used."
+                raise GMTInvalidInput(msg)
+
+    # Set the default style if data has a geometry of Point or MultiPoint
+    if kwargs.get("S") is None and _data_geometry_is_point(data, kind):
+        kwargs["S"] = "s0.2c"
+
+    with Session() as lib:
+        with lib.virtualfile_in(
+            check_kind="vector", data=data, x=x, y=y, extra_arrays=extra_arrays
+        ) as vintbl:
+            lib.call_module(module="plot", args=build_arg_list(kwargs, infile=vintbl))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/plot3d.html b/v0.14.0/_modules/pygmt/src/plot3d.html new file mode 100644 index 00000000000..7288c98b889 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/plot3d.html @@ -0,0 +1,455 @@ + + + + + + + + pygmt.src.plot3d — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.plot3d

+"""
+plot3d - Plot in three dimensions.
+"""
+
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    build_arg_list,
+    data_kind,
+    fmt_docstring,
+    is_nonstr_iter,
+    kwargs_to_strings,
+    use_alias,
+)
+from pygmt.src._common import _data_geometry_is_point
+
+
+@fmt_docstring
+@use_alias(
+    A="straight_line",
+    B="frame",
+    C="cmap",
+    D="offset",
+    G="fill",
+    I="intensity",
+    J="projection",
+    Jz="zscale",
+    JZ="zsize",
+    L="close",
+    N="no_clip",
+    Q="no_sort",
+    R="region",
+    S="style",
+    V="verbose",
+    W="pen",
+    Z="zvalue",
+    a="aspatial",
+    b="binary",
+    c="panel",
+    d="nodata",
+    e="find",
+    f="coltypes",
+    g="gap",
+    h="header",
+    i="incols",
+    l="label",
+    p="perspective",
+    t="transparency",
+    w="wrap",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence")
+def plot3d(
+    self,
+    data=None,
+    x=None,
+    y=None,
+    z=None,
+    size=None,
+    symbol=None,
+    direction=None,
+    **kwargs,
+):
+    r"""
+    Plot lines, polygons, and symbols in 3-D.
+
+    Takes a matrix, (x, y, z) triplets, or a file name as input and plots
+    lines, polygons, or symbols at those locations in 3-D.
+
+    Must provide either ``data`` or ``x``, ``y``, and ``z``.
+
+    If providing data through ``x``, ``y``, and ``z``, ``fill`` can be a
+    1-D array that will be mapped to a colormap.
+
+    If a symbol is selected and no symbol size given, then plot3d will
+    interpret the fourth column of the input data as symbol size. Symbols
+    whose size is <= 0 are skipped. If no symbols are specified then the
+    symbol code (see ``style`` below) must be present as last column in the
+    input. If ``style`` is not used, a line connecting the data points will
+    be drawn instead. To explicitly close polygons, use ``close``. Select a
+    fill with ``fill``. If ``fill`` is set, ``pen`` will control whether the
+    polygon outline is drawn or not. If a symbol is selected, ``fill`` and
+    ``pen`` determine the fill and outline/no outline, respectively.
+
+    Full option list at :gmt-docs:`plot3d.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    data : str, {table-like}
+        Either a data file name, a 2-D {table-classes}.
+        Optionally, use parameter ``incols`` to specify which columns are x, y,
+        z, fill, and size, respectively.
+    x/y/z : float or 1-D arrays
+        The x, y, and z coordinates, or arrays of x, y and z coordinates of
+        the data points.
+    size : 1-D array
+        The size of the data points in units specified in ``style``.
+        Only valid if using ``x``/``y``/``z``.
+    symbol : 1-D array
+        The symbols of the data points. Only valid if using ``x``/``y``.
+    direction : list of two 1-D arrays
+        If plotting vectors (using ``style="V"`` or ``style="v"``), then
+        should be a list of two 1-D arrays with the vector directions. These
+        can be angle and length, azimuth and length, or x and y components,
+        depending on the style options chosen.
+    {projection}
+    zscale/zsize : float or str
+        Set z-axis scaling or z-axis size.
+    {region}
+    straight_line : bool or str
+        [**m**\|\ **p**\|\ **x**\|\ **y**].
+        By default, geographic line segments are drawn as great circle
+        arcs. To draw them as straight lines, use ``straight_line``.
+        Alternatively, add **m** to draw the line by first following a
+        meridian, then a parallel. Or append **p** to start following a
+        parallel, then a meridian. (This can be practical to draw a line
+        along parallels, for example). For Cartesian data, points are
+        simply connected, unless you append **x** or **y** to draw
+        stair-case curves that whose first move is along *x* or *y*,
+        respectively. **Note**: The ``straight_line`` parameter requires
+        constant *z*-coordinates.
+    {frame}
+    {cmap}
+    offset : str
+        *dx*/*dy*\ [/*dz*].
+        Offset the plot symbol or line locations by the given amounts
+        *dx*/*dy*\ [/*dz*] [Default is no offset].
+    {fill}
+        *fill* can be a 1-D array, but it is only valid if using ``x``/``y``
+        and ``cmap=True`` is also required.
+    intensity : float, bool, or 1-D array
+        Provide an *intensity* value (nominally in the -1 to +1 range) to
+        modulate the fill color by simulating illumination. If using
+        ``intensity=True``, we will instead read *intensity* from the first
+        data column after the symbol parameters (if given). *intensity* can
+        also be a 1-D array to set varying intensity for symbols, but it is
+        only valid for ``x``/``y``/``z``.
+
+    close : str
+        [**+b**\|\ **d**\|\ **D**][**+xl**\|\ **r**\|\ *x0*]\
+        [**+yl**\|\ **r**\|\ *y0*][**+p**\ *pen*].
+        Force closed polygons. Full documentation is at
+        :gmt-docs:`plot3d.html#l`.
+    no_clip : bool or str
+        [**c**\|\ **r**].
+        Do **not** clip symbols that fall outside the frame boundaries
+        [Default plots points whose coordinates are strictly inside the
+        frame boundaries only].
+        This parameter does not apply to lines and polygons which are always
+        clipped to the map region. For periodic (360° longitude) maps we
+        must plot all symbols twice in case they are clipped by the
+        repeating boundary. ``no_clip=True`` will turn off clipping and not
+        plot repeating symbols. Use ``no_clip="r"`` to turn off clipping
+        but retain the plotting of such repeating symbols, or use
+        ``no_clip="c"`` to retain clipping but turn off plotting of
+        repeating symbols.
+    no_sort : bool
+        Turn off the automatic sorting of items based on their distance
+        from the viewer. The default is to sort the items so that items in
+        the foreground are plotted after items in the background.
+    style : str
+        Plot symbols. Full documentation is at :gmt-docs:`plot3d.html#s`.
+    {verbose}
+    {pen}
+    zvalue : str
+        *value*\|\ *file*.
+        Instead of specifying a symbol or polygon fill and outline color
+        via ``fill`` and ``pen``, give both a *value* via **zvalue** and a
+        color lookup table via ``cmap``.  Alternatively, give the name of a
+        *file* with one z-value (read from the last column) for each
+        polygon in the input data. To apply it to the fill color, use
+        ``fill="+z"``. To apply it to the pen color, append **+z** to
+        ``pen``.
+    {aspatial}
+    {binary}
+    {panel}
+    {nodata}
+    {find}
+    {coltypes}
+    {gap}
+    {header}
+    {incols}
+    {label}
+    {perspective}
+    {transparency}
+        ``transparency`` can also be a 1-D array to set varying
+        transparency for symbols, but this option is only valid if using
+        ``x``/``y``/``z``.
+    {wrap}
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    kind = data_kind(data)
+    extra_arrays = []
+
+    if kind == "empty":  # Add more columns for vectors input
+        # Parameters for vector styles
+        if (
+            isinstance(kwargs.get("S"), str)
+            and len(kwargs["S"]) >= 1
+            and kwargs["S"][0] in "vV"
+            and is_nonstr_iter(direction)
+        ):
+            extra_arrays.extend(direction)
+        # Fill
+        if is_nonstr_iter(kwargs.get("G")):
+            extra_arrays.append(kwargs.get("G"))
+            del kwargs["G"]
+        # Size
+        if is_nonstr_iter(size):
+            extra_arrays.append(size)
+        # Intensity and transparency
+        for flag in ["I", "t"]:
+            if is_nonstr_iter(kwargs.get(flag)):
+                extra_arrays.append(kwargs.get(flag))
+                kwargs[flag] = ""
+        # Symbol must be at the last column
+        if is_nonstr_iter(symbol):
+            if "S" not in kwargs:
+                kwargs["S"] = True
+            extra_arrays.append(symbol)
+    else:
+        for name, value in [
+            ("direction", direction),
+            ("fill", kwargs.get("G")),
+            ("size", size),
+            ("intensity", kwargs.get("I")),
+            ("transparency", kwargs.get("t")),
+            ("symbol", symbol),
+        ]:
+            if is_nonstr_iter(value):
+                msg = f"'{name}' can't be a 1-D array if 'data' is used."
+                raise GMTInvalidInput(msg)
+
+    # Set the default style if data has a geometry of Point or MultiPoint
+    if kwargs.get("S") is None and _data_geometry_is_point(data, kind):
+        kwargs["S"] = "u0.2c"
+
+    with Session() as lib:
+        with lib.virtualfile_in(
+            check_kind="vector",
+            data=data,
+            x=x,
+            y=y,
+            z=z,
+            extra_arrays=extra_arrays,
+            required_z=True,
+        ) as vintbl:
+            lib.call_module(module="plot3d", args=build_arg_list(kwargs, infile=vintbl))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/project.html b/v0.14.0/_modules/pygmt/src/project.html new file mode 100644 index 00000000000..3b9b4fca164 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/project.html @@ -0,0 +1,469 @@ + + + + + + + + pygmt.src.project — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.project

+"""
+project - Project data onto lines or great circles, or generate tracks.
+"""
+
+from typing import Literal
+
+import numpy as np
+import pandas as pd
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+    validate_output_table_type,
+)
+
+
+
+[docs] +@fmt_docstring +@use_alias( + A="azimuth", + C="center", + E="endpoint", + F="convention", + G="generate", + L="length", + N="flat_earth", + Q="unit", + S="sort", + T="pole", + V="verbose", + W="width", + Z="ellipse", + f="coltypes", +) +@kwargs_to_strings(E="sequence", L="sequence", T="sequence", W="sequence", C="sequence") +def project( + data=None, + x=None, + y=None, + z=None, + output_type: Literal["pandas", "numpy", "file"] = "pandas", + outfile: str | None = None, + **kwargs, +) -> pd.DataFrame | np.ndarray | None: + r""" + Project data onto lines or great circles, or generate tracks. + + Project reads arbitrary :math:`(x, y [, z])` data and returns any + combination of :math:`(x, y, z, p, q, r, s)`, where :math:`(p, q)` are the + coordinates in the projection, :math:`(r, s)` is the position in the + :math:`(x, y)` coordinate system of the point on the profile (:math:`q = 0` + path) closest to :math:`(x, y)`, and :math:`z` is all remaining columns in + the input (beyond the required :math:`x` and :math:`y` columns). + + Alternatively, ``project`` may be used to generate + :math:`(r, s, p)` triplets at equal increments along a profile using the + ``generate`` parameter. In this case, the value of ``data`` is ignored + (you can use, e.g., ``data=None``). + + Projections are defined in any (but only) one of three ways: + + 1. By a ``center`` and an ``azimuth`` in degrees clockwise from North. + 2. By a ``center`` and ``endpoint`` of the projection path. + 3. By a ``center`` and a ``pole`` position. + + To spherically project data along a great circle path, an oblique + coordinate system is created which has its equator along that path, and the + zero meridian through the Center. Then the oblique longitude (:math:`p`) + corresponds to the distance from the Center along the great circle, and the + oblique latitude (:math:`q`) corresponds to the distance perpendicular to + the great circle path. When moving in the increasing (:math:`p`) direction, + (toward B or in the azimuth direction), the positive (:math:`q`) direction + is to your left. If a Pole has been specified, then the positive + (:math:`q`) direction is toward the pole. + + To specify an oblique projection, use the ``pole`` parameter to set + the pole. Then the equator of the projection is already determined and the + ``center`` parameter is used to locate the :math:`p = 0` meridian. The + center *cx/cy* will be taken as a point through which the :math:`p = 0` + meridian passes. If you do not care to choose a particular point, use the + South pole (*cx* = 0, *cy* = -90). + + Data can be selectively windowed by using the ``length`` and ``width`` + parameters. If ``width`` is used, the projection width is set to use only + data with :math:`w_{{min}} < q < w_{{max}}`. If ``length`` is set, then + the length is set to use only those data with + :math:`l_{{min}} < p < l_{{max}}`. If the ``endpoint`` parameter + has been used to define the projection, then ``length="w"`` may be used to + window the length of the projection to exactly the span from O to B. + + Flat Earth (Cartesian) coordinate transformations can also be made. Set + ``flat_earth=True`` and remember that azimuth is clockwise from North (the + y axis), NOT the usual cartesian theta, which is counterclockwise from the + x axis. azimuth = 90 - theta. + + No assumptions are made regarding the units for + :math:`x, y, r, s, p, q, dist, l_{{min}}, l_{{max}}, w_{{min}}, w_{{max}}`. + If ``unit`` is selected, map units are assumed and :math:`x, y, r, s` must + be in degrees and + :math:`p, q, dist, l_{{min}}, l_{{max}}, w_{{min}}, w_{{max}}` + will be in km. + + Calculations of specific great-circle and geodesic distances or for + back-azimuths or azimuths are better done using :gmt-docs:`mapproject` as + project is strictly spherical. + + Full option list at :gmt-docs:`project.html` + + {aliases} + + Parameters + ---------- + data : str, {table-like} + Pass in (x, y, z) or (longitude, latitude, elevation) values by + providing a file name to an ASCII data table, a 2-D + {table-classes}. + {output_type} + {outfile} + + center : str or list + *cx*/*cy*. + Set the origin of the projection, in Definition 1 or 2. If + Definition 3 is used, then *cx/cy* are the coordinates of a + point through which the oblique zero meridian (:math:`p = 0`) should + pass. The *cx/cy* is not required to be 90 degrees from the pole. + + azimuth : float or str + Define the azimuth of the projection (Definition 1). + + endpoint : str or list + *bx*/*by*. + Define the end point of the projection path (Definition 2). + + convention : str + Specify the desired output using any combination of **xyzpqrs**, in + any order [Default is **xypqrsz**]. Do not space between the letters. + Use lower case. The output will be columns of values corresponding to + your ``convention``. The **z** flag is special and refers to all + numerical columns beyond the leading **x** and **y** in your input + record. The **z** flag also includes any trailing text (which is + placed at the end of the record regardless of the order of **z** in + ``convention``). **Note**: If ``generate`` is True, then the output + order is hardwired to be **rsp** and ``convention`` is not allowed. + + generate : str + *dist* [/*colat*][**+c**\|\ **h**]. + Create :math:`(r, s, p)` output data every *dist* units of :math:`p` + (See ``unit`` parameter). Alternatively, append */colat* for a small + circle instead [Default is a colatitude of 90, i.e., a great circle]. + If setting a pole with ``pole`` and you want the small circle to go + through *cx*/*cy*, append **+c** to compute the required colatitude. + Use ``center`` and ``endpoint`` to generate a circle that goes + through the center and end point. Note, in this case the center and + end point cannot be farther apart than :math:`2|\mbox{{colat}}|`. + Finally, if you append **+h** then we will report the position of + the pole as part of the segment header [Default is no header]. + **Note**: No input is read and the value of ``data``, ``x``, ``y``, + and ``z`` is ignored if ``generate`` is used. + + length : str or list + [**w**\|\ *l_min*/*l_max*]. + Project only those data whose *p* coordinate is + within :math:`l_{{min}} < p < l_{{max}}`. If ``endpoint`` has been set, + then you may alternatively use **w** to stay within the distance from + ``center`` to ``endpoint``. + + flat_earth : bool + Make a Cartesian coordinate transformation in the plane. + [Default is ``False``; plane created with spherical trigonometry.] + + unit : bool + Set units for :math:`x, y, r, s` to degrees and + :math:`p, q, dist, l_{{min}}, l_{{max}}, w_{{min}}, w_{{max}}` to km. + [Default is ``False``; all arguments use the same units] + + sort : bool + Sort the output into increasing :math:`p` order. Useful when projecting + random data into a sequential profile. + + pole : str or list + *px*/*py*. + Set the position of the rotation pole of the projection. + (Definition 3). + + {verbose} + + width : str or list + *w_min*/*w_max*. + Project only those data whose :math:`q` coordinate is + within :math:`w_{{min}} < q < w_{{max}}`. + + ellipse : str + *major*/*minor*/*azimuth* [**+e**\|\ **n**]. + Used in conjunction with ``center`` (sets its center) and ``generate`` + (sets the distance increment) to create the coordinates of an ellipse + with *major* and *minor* axes given in km (unless ``flat_earth`` is + given for a Cartesian ellipse) and the *azimuth* of the major axis in + degrees. Append **+e** to adjust the increment set via ``generate`` so + that the the ellipse has equal distance increments [Default uses the + given increment and closes the ellipse]. Instead, append **+n** to set + a specific number of unique equidistant data via ``generate``. For + degenerate ellipses you can just supply a single *diameter* instead. A + geographic diameter may be specified in any desired unit other than km + by appending the unit (e.g., 3-D for degrees) [Default is km]; + the increment is assumed to be in the same unit. **Note**: + For the Cartesian ellipse (which requires ``flat_earth``), the + *direction* is counter-clockwise from the horizontal instead of an + *azimuth*. + + {coltypes} + + Returns + ------- + ret + Return type depends on ``outfile`` and ``output_type``: + + - ``None`` if ``outfile`` is set (output will be stored in file set by + ``outfile``) + - :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile`` is not set + (depends on ``output_type``) + """ + if kwargs.get("C") is None: + msg = "The 'center' parameter must be specified." + raise GMTInvalidInput(msg) + if kwargs.get("G") is None and data is None: + msg = "The 'data' parameter must be specified unless 'generate' is used." + raise GMTInvalidInput(msg) + if kwargs.get("G") is not None and kwargs.get("F") is not None: + msg = "The 'convention' parameter is not allowed with 'generate'." + raise GMTInvalidInput(msg) + + output_type = validate_output_table_type(output_type, outfile=outfile) + + column_names = None + if output_type == "pandas" and kwargs.get("G") is not None: + column_names = list("rsp") + + with Session() as lib: + with ( + lib.virtualfile_in( + check_kind="vector", + data=data, + x=x, + y=y, + z=z, + required_z=False, + required_data=False, + ) as vintbl, + lib.virtualfile_out(kind="dataset", fname=outfile) as vouttbl, + ): + lib.call_module( + module="project", + args=build_arg_list(kwargs, infile=vintbl, outfile=vouttbl), + ) + return lib.virtualfile_to_dataset( + vfname=vouttbl, + output_type=output_type, + column_names=column_names, + )
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/psconvert.html b/v0.14.0/_modules/pygmt/src/psconvert.html new file mode 100644 index 00000000000..40c27fbcc43 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/psconvert.html @@ -0,0 +1,333 @@ + + + + + + + + pygmt.src.psconvert — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.psconvert

+"""
+psconvert - Convert [E]PS file(s) to other formats.
+"""
+
+from pathlib import Path
+
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+
+@fmt_docstring
+@use_alias(
+    A="crop",
+    C="gs_option",
+    E="dpi",
+    F="prefix",
+    G="gs_path",
+    I="resize",
+    N="bb_style",
+    T="fmt",
+    Q="anti_aliasing",
+    V="verbose",
+)
+@kwargs_to_strings()
+def psconvert(self, **kwargs):
+    r"""
+    Convert [E]PS file(s) to other formats.
+
+    Converts one or more PostScript files to other formats (BMP, EPS, JPEG,
+    PDF, PNG, PPM, TIFF) using Ghostscript.
+
+    If no input files are given, will convert the current active figure
+    (see :class:`pygmt.Figure`). In this case, an output name must be given
+    using parameter ``prefix``.
+
+    Full option list at :gmt-docs:`psconvert.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    crop : str or bool
+        Adjust the BoundingBox and HiResBoundingBox to the minimum
+        required by the image content. Default is ``True``. Append **+u** to
+        first remove any GMT-produced time-stamps. Append **+r** to
+        *round* the HighResBoundingBox instead of using the ``ceil``
+        function. This is going against Adobe Law but can be useful when
+        creating very small images where the difference of one pixel
+        might matter. If ``verbose`` is used we also report the
+        dimensions of the final illustration.
+    gs_path : str
+        Full path to the Ghostscript executable.
+    gs_option : str
+        Specify a single, custom option that will be passed on to
+        Ghostscript as is.
+    dpi : int
+        Set raster resolution in dpi. Default is 720 for PDF, 300 for
+        others.
+    prefix : str
+        Force the output file name. By default output names are constructed
+        using the input names as base, which are appended with an
+        appropriate extension. Use this option to provide a different name,
+        but without extension. Extension is still determined automatically.
+    resize : str
+        [**+m**\ *margins*][**+s**\ [**m**]\ *width*\
+        [/\ *height*]][**+S**\ *scale*].
+        Adjust the BoundingBox and HiResBoundingBox by scaling and/or
+        adding margins. Append **+m** to specify extra margins to extend
+        the bounding box. Give either one (uniform), two (x and y) or four
+        (individual sides) margins; append unit [Default is set by
+        :gmt-term:`PROJ_LENGTH_UNIT`]. Append **+s**\ *width* to resize the
+        output image to exactly *width* units. The default unit is set by
+        :gmt-term:`PROJ_LENGTH_UNIT` but you can append a new unit and/or
+        impose different width and height (**Note**: This may change the
+        image aspect ratio). What happens here is that Ghostscript will do
+        the re-interpolation work and the final image will retain the DPI
+        resolution set by ``dpi``.  Append **+sm** to set a maximum size
+        and the new *width* is only imposed if the original figure width
+        exceeds it. Append /\ *height* to also impose a maximum height in
+        addition to the width. Alternatively, append **+S**\ *scale* to
+        scale the image by a constant factor.
+    bb_style : str
+        Set optional BoundingBox fill color, fading, or draw the outline
+        of the BoundingBox. Append **+f**\ *fade* to fade the entire plot
+        towards black (100%) [no fading, 0]. Append **+g**\ *paint* to
+        paint the BoundingBox behind the illustration and append **+p**\
+        [*pen*] to draw the BoundingBox outline (append a pen or accept
+        the default pen of ``"0.25p,black,solid"``). **Note**: If both **+g** and
+        **+f** are used then we use *paint* as the fade color instead of
+        black. Append **+i** to enforce gray-shades by using ICC profiles.
+    anti_aliasing : str
+        [**g**\|\ **p**\|\ **t**\][**1**\|\ **2**\|\ **4**].
+        Set the anti-aliasing options for **g**\ raphics or **t**\ ext.
+        Append the size of the subsample box (1, 2, or 4) [Default is
+        ``"4"``]. [Default is no anti-aliasing (same as bits = 1).]
+    fmt : str
+        Set the output format, where **b** means BMP, **e** means EPS,
+        **E** means EPS with PageSize command, **f** means PDF, **F** means
+        multi-page PDF, **j** means JPEG, **g** means PNG, **G** means
+        transparent PNG (untouched regions are transparent), **m** means
+        PPM, and **t** means TIFF [Default is JPEG]. To
+        **b**\|\ **j**\|\ **g**\|\ **t**\ , optionally append **+m** in
+        order to get a monochrome (grayscale) image. The EPS format can be
+        combined with any of the other formats. For example, **ef** creates
+        both an EPS and a PDF file. Using **F** creates a multi-page PDF
+        file from the list of input PS or PDF files. It requires the
+        ``prefix`` parameter.
+    {verbose}
+    """
+    kwargs = self._preprocess(**kwargs)
+    # Default cropping the figure to True
+    if kwargs.get("A") is None:
+        kwargs["A"] = ""
+
+    prefix = kwargs.get("F")
+    if prefix in {"", None, False, True}:
+        msg = "The 'prefix' parameter must be specified with a valid value."
+        raise GMTInvalidInput(msg)
+
+    # Check if the parent directory exists
+    prefix_path = Path(prefix).parent
+    if not prefix_path.exists():
+        msg = f"No such directory: '{prefix_path}', please create it first."
+        raise FileNotFoundError(msg)
+
+    with Session() as lib:
+        lib.call_module(module="psconvert", args=build_arg_list(kwargs))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/rose.html b/v0.14.0/_modules/pygmt/src/rose.html new file mode 100644 index 00000000000..8194f36854e --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/rose.html @@ -0,0 +1,411 @@ + + + + + + + + pygmt.src.rose — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.rose

+"""
+rose - Plot windrose diagrams or polar histograms.
+"""
+
+from pygmt.clib import Session
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+)
+
+
+@fmt_docstring
+@use_alias(
+    A="sector",
+    B="frame",
+    C="cmap",
+    D="shift",
+    Em="vectors",
+    F="no_scale",
+    G="fill",
+    I="inquire",
+    JX="diameter",
+    L="labels",
+    M="vector_params",
+    Q="alpha",
+    R="region",
+    S="norm",
+    T="orientation",
+    V="verbose",
+    W="pen",
+    Z="scale",
+    b="binary",
+    d="nodata",
+    e="find",
+    h="header",
+    i="incols",
+    c="panel",
+    p="perspective",
+    t="transparency",
+    w="wrap",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence")
+def rose(self, data=None, length=None, azimuth=None, **kwargs):
+    """
+    Plot windrose diagrams or polar histograms.
+
+    Takes a matrix, (length,azimuth) pairs, or a file name as input
+    and plots windrose diagrams or polar histograms (sector diagram
+    or rose diagram).
+
+    Must provide either ``data`` or ``length`` and ``azimuth``.
+
+    Options include full circle and half circle plots. The outline
+    of the windrose is drawn with the same color as
+    :gmt-term:`MAP_DEFAULT_PEN`.
+
+    Full option list at :gmt-docs:`rose.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    data : str, {table-like}
+        Pass in either a file name to an ASCII data table, a 2-D
+        {table-classes}.
+        Use parameter ``incols`` to choose which columns are length and
+        azimuth, respectively. If a file with only azimuths is given, use
+        ``incols`` to indicate the single column with azimuths; then all
+        lengths are set to unity (see ``scale="u"`` to set actual
+        lengths to unity as well).
+
+    length/azimuth : float or 1-D arrays
+        Length and azimuth values, or arrays of length and azimuth
+        values.
+
+    orientation : bool
+        Specify that the input data are orientation data (i.e., have a
+        180 degree ambiguity) instead of true 0-360 degree directions
+        [Default is 0-360 degrees]. We compensate by counting each record
+        twice: First as azimuth and second as azimuth +180. Ignored if
+        ``region`` is given as (-90, 90) or (0, 180).
+
+    region : str or list
+        *r0/r1/az0/az1* or [*r0*, *r1*, *az0*, *az1*].
+        *Required if this is the first plot command*.
+        Specify the ``region`` of interest in (*r*, *azimuth*) space.
+        Here, *r0* is 0 and *r1* is the maximal length in units.
+        For *az0* and *az1*, specify either (-90, 90) or (0, 180) for
+        half circle plot or (0, 360) for full circle.
+
+    diameter : str
+         Set the diameter of the rose diagram. If not given,
+         then we default to a diameter of 7.5 cm.
+
+    sector : float or str
+         Give the sector width in degrees for sector and rose diagram.
+         Default ``0`` means windrose diagram. Append **+r** to draw rose
+         diagram instead of sector diagram (e.g. ``"10+r"``).
+
+    norm : bool
+         Normalize input radii (or bin counts if ``sector`` is used)
+         by the largest value so all radii (or bin counts) range from 0
+         to 1.
+
+    frame : str
+         Set map boundary frame and axes attributes. Remember that *x*
+         here is radial distance and *y* is azimuth. The y label may be
+         used to plot a figure caption. The scale bar length is determined
+         by the radial gridline spacing.
+
+    scale : float or str
+         Multiply the data radii by scale. E.g., use ``scale=0.001`` to
+         convert your data from m to km. To exclude the radii from
+         consideration, set them all to unity with ``scale="u"``
+         [Default is no scaling].
+
+    fill : str
+         Set color or pattern for filling sectors [Default is no fill].
+
+    cmap : str
+        Give a CPT. The *r*-value for each sector is used to look-up the
+        sector color. Cannot be used with a rose diagram.
+
+    pen : str
+        Set pen attributes for sector outline or rose plot, e.g.
+        ``pen="0.5p"``. [Default is no outline]. To change pen used to
+        draw vector (requires ``vectors``) [Default is same as sector
+        outline] use e.g. ``pen="v0.5p"``.
+
+    labels : str
+         *wlabel,elabel,slabel,nlabel*.
+         Specify labels for the 0, 90, 180, and 270 degree marks.
+         For full-circle plot the default is
+         ``"West,East,South,North"`` and for half-circle the default
+         is ``"90W,90E,-,0"``. A ``"-"`` in any entry disables that
+         label (e.g. ``labels="W,E,-,N"``). Use ``labels=""`` to
+         disable all four labels. Note that the
+         :gmt-term:`GMT_LANGUAGE` setting will affect the words used.
+
+    no_scale : bool
+         Do NOT draw the scale length bar (``no_scale=True``).
+         Default plots scale in lower right corner provided ``frame``
+         is used.
+
+    shift : bool
+         Shift sectors so that they are centered on the bin interval
+         (e.g., first sector is centered on 0 degrees).
+
+    vectors : str
+          *mode_file*.
+          Plot vectors showing the principal directions given in
+          the *mode_file* file.
+          Alternatively, specify ``vectors`` to compute and plot
+          mean direction. See ``vector_params`` to control the vector
+          attributes. Finally, to instead save the computed mean
+          direction and other statistics, use
+          ``vectors="+wmode_file"``. The eight items saved to
+          a single record are: *mean_az*, *mean_r*, *mean_resultant*,
+          *max_r*, *scaled_mean_r*, *length_sum*, *n*, *sign@alpha*,
+          where the last term is 0 or 1 depending on whether the mean
+          resultant is significant at the level of confidence set via
+          ``alpha``.
+
+    vector_params : str
+        Used with ``vectors`` to modify vector parameters. For
+        vector heads, append vector head size [Default is 0, i.e., a
+        line]. See :gmt-docs:`rose.html#vector-attributes` for
+        specifying additional attributes. If ``vectors`` is not
+        given and the current plot mode is to draw a windrose diagram
+        then using ``vector_params`` will add vector heads to all
+        individual directions using the supplied attributes.
+
+    alpha : float or str
+        Set the confidence level used to determine if the mean
+        resultant is significant (i.e., Lord Rayleigh test for
+        uniformity) [Default is ``alpha=0.05``]. **Note**: The
+        critical values are approximated [Berens, 2009] and requires
+        at least 10 points; the critical resultants are accurate to
+        at least 3 significant digits. For smaller data sets you
+        should consult exact statistical tables.
+
+        Berens, P., 2009, CircStat: A MATLAB Toolbox for Circular
+        Statistics, *J. Stat. Software*, 31(10), 1-21,
+        https://doi.org/10.18637/jss.v031.i10.
+
+    {verbose}
+    {binary}
+    {panel}
+    {nodata}
+    {find}
+    {header}
+    {incols}
+    {perspective}
+    {transparency}
+    {wrap}
+    """
+
+    kwargs = self._preprocess(**kwargs)
+
+    with Session() as lib:
+        with lib.virtualfile_in(
+            check_kind="vector", data=data, x=length, y=azimuth
+        ) as vintbl:
+            lib.call_module(module="rose", args=build_arg_list(kwargs, infile=vintbl))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/select.html b/v0.14.0/_modules/pygmt/src/select.html new file mode 100644 index 00000000000..c32ff1da5fc --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/select.html @@ -0,0 +1,435 @@ + + + + + + + + pygmt.src.select — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.select

+"""
+select - Select data table subsets based on multiple spatial criteria.
+"""
+
+from typing import Literal
+
+import numpy as np
+import pandas as pd
+from pygmt.clib import Session
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+    validate_output_table_type,
+)
+
+__doctest_skip__ = ["select"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + A="area_thresh", + C="dist2pt", + D="resolution", + F="polygon", + G="gridmask", + I="reverse", + J="projection", + L="dist2line", + N="mask", + R="region", + V="verbose", + Z="z_subregion", + b="binary", + d="nodata", + e="find", + f="coltypes", + g="gap", + h="header", + i="incols", + o="outcols", + s="skiprows", + w="wrap", +) +@kwargs_to_strings(M="sequence", R="sequence", i="sequence_comma", o="sequence_comma") +def select( + data=None, + output_type: Literal["pandas", "numpy", "file"] = "pandas", + outfile: str | None = None, + **kwargs, +) -> pd.DataFrame | np.ndarray | None: + r""" + Select data table subsets based on multiple spatial criteria. + + This is a filter that reads (x, y) or (longitude, latitude) positions from + the first 2 columns of ``data`` and uses a combination of 1-7 criteria to + pass or reject the records. Records can be selected based on whether or not + they: + + 1. are inside a rectangular region (``region`` [and ``projection``]) + 2. are within *dist* km of any point in *pointfile* (``dist2pt``) + 3. are within *dist* km of any line in *linefile* (``dist2line``) + 4. are inside one of the polygons in *polygonfile* (``polygon``) + 5. are inside geographical features (based on coastlines) + 6. have z-values within a given range + 7. are inside bins of a grid mask whose nodes are non-zero + + The sense of the tests can be reversed for each of these 7 criteria by + using the ``reverse`` parameter. + + Full option list at :gmt-docs:`gmtselect.html` + + {aliases} + + Parameters + ---------- + data : str, {table-like} + Pass in either a file name to an ASCII data table, a 2-D + {table-classes}. + {output_type} + {outfile} + {area_thresh} + dist2pt : str + *pointfile*\|\ *lon*/*lat*\ **+d**\ *dist*. + Pass all records whose locations are within *dist* of any of the + points in the ASCII file *pointfile*. If *dist* is zero, the 3rd + column of *pointfile* must have each point's individual radius of + influence. If you only have a single point, you can specify + *lon*/*lat* instead of *pointfile*. Distances are Cartesian and in + user units. Alternatively, if ``region`` and ``projection`` are used, + the geographic coordinates are projected to map coordinates (in + centimeters, inches, meters, or points, as determined by + :gmt-term:`PROJ_LENGTH_UNIT`) before Cartesian distances are compared + to *dist*. + dist2line : str + *linefile*\ **+d**\ *dist*\ [**+p**]. + Pass all records whose locations are within *dist* of any of the line + segments in the ASCII :gmt-docs:`multiple-segment file + <reference/file-formats.html#optional-segment-header-records>` + *linefile*. If *dist* is zero, we will scan each sub-header in + *linefile* for an embedded **-D**\ *dist* setting that sets each + line's individual distance value. Distances are Cartesian and in + user units. Alternatively, if ``region`` and ``projection`` are used, + the geographic coordinates are projected to map coordinates (in + centimeters, inches, meters, or points, as determined by + :gmt-term:`PROJ_LENGTH_UNIT`) before Cartesian distances are + compared to *dist*. Append **+p** to ensure only points whose + orthogonal projections onto the nearest line-segment fall within + the segment's endpoints [Default considers points "beyond" the + line's endpoints]. + polygon : str + *polygonfile*. + Pass all records whose locations are within one of the closed + polygons in the ASCII :gmt-docs:`multiple-segment file + <reference/file-formats.html#optional-segment-header-records>` + *polygonfile*. For spherical polygons (lon, lat), make sure no + consecutive points are separated by 180 degrees or more in longitude. + resolution : str + *resolution*\ [**+f**]. + Ignored unless ``mask`` is set. Selects the resolution of the coastline + data set to use ((**f**)ull, (**h**)igh, (**i**)ntermediate, (**l**)ow, + or (**c**)rude). The resolution drops off by ~80% between data sets. + [Default is **l**]. Append (**+f**) to automatically select a lower + resolution should the one requested not be available [Default is abort + if not found]. Note that because the coastlines differ in details + it is not guaranteed that a point will remain inside [or outside] when + a different resolution is selected. + gridmask : str + Pass all locations that are inside the valid data area of the grid + *gridmask*. Nodes that are outside are either NaN or zero. + reverse : str + [**cflrsz**]. + Reverse the sense of the test for each of the criteria specified: + + - **c** select records NOT inside any point's circle of influence. + - **f** select records NOT inside any of the polygons. + - **g** will pass records inside the cells with z equal zero of the + grid mask in ``gridmask``. + - **l** select records NOT within the specified distance of any line. + - **r** select records NOT inside the specified rectangular region. + - **s** select records NOT considered inside as specified by ``mask`` + (and ``area_thresh``, ``resolution``). + - **z** select records NOT within the range specified by + ``z_subregion``. + {projection} + mask : str or list + Pass all records whose location is inside specified geographical + features. Specify if records should be skipped (s) or kept (k) using + 1 of 2 formats: + + - *wet/dry*. + - *ocean/land/lake/island/pond*. + + [Default is s/k/s/k/s (i.e., s/k), which passes all points on dry + land]. + {region} + {verbose} + z_subregion : str or list + *min*\ [/*max*]\ [**+a**]\ [**+c**\ *col*]\ [**+i**]. + Pass all records whose 3rd column (*z*; *col* = 2) lies within the + given range or is NaN (use ``skiprows`` to skip NaN records). If *max* + is omitted then we test if *z* equals *min* instead. This means + equality within 5 ULPs (unit of least precision; + https://en.wikipedia.org/wiki/Unit_in_the_last_place). Input file must + have at least three columns. To indicate no limit on *min* or *max*, + specify a hyphen (-). If your 3rd column is absolute time then remember + to supply ``coltypes="2T"``. To specify another column, append + **+c**\ *col*, and to specify several tests pass a list of arguments + as you have columns to test. + **Note**: When more than one ``z_subregion`` argument is given then the + ``reverse="z"`` cannot be used. In the case of multiple tests + you may use these modifiers as well: **+a** passes any record that + passes at least one of your *z* tests [Default is all tests must pass], + and **+i** reverses the tests to pass record with *z* value NOT in the + given range. Finally, if **+c** is not used then it is automatically + incremented for each new ``z_subregion`` argument, starting with 2. + {binary} + {nodata} + {find} + {coltypes} + {gap} + {header} + {incols} + {outcols} + {skiprows} + {wrap} + + Returns + ------- + ret + Return type depends on ``outfile`` and ``output_type``: + + - ``None`` if ``outfile`` is set (output will be stored in file set by + ``outfile``) + - :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile`` is not set + (depends on ``output_type``) + + Example + ------- + >>> import pygmt + >>> # Load a table of ship observations of bathymetry off Baja California + >>> ship_data = pygmt.datasets.load_sample_data(name="bathymetry") + >>> # Only return the data points that lie within the region between + >>> # longitudes 246 and 247 and latitudes 20 and 21 + >>> out = pygmt.select(data=ship_data, region=[246, 247, 20, 21]) + """ + output_type = validate_output_table_type(output_type, outfile=outfile) + + column_names = None + if output_type == "pandas" and isinstance(data, pd.DataFrame): + column_names = data.columns.to_list() + + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="vector", data=data) as vintbl, + lib.virtualfile_out(kind="dataset", fname=outfile) as vouttbl, + ): + lib.call_module( + module="select", + args=build_arg_list(kwargs, infile=vintbl, outfile=vouttbl), + ) + return lib.virtualfile_to_dataset( + vfname=vouttbl, + output_type=output_type, + column_names=column_names, + )
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/shift_origin.html b/v0.14.0/_modules/pygmt/src/shift_origin.html new file mode 100644 index 00000000000..a48749f166d --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/shift_origin.html @@ -0,0 +1,271 @@ + + + + + + + + pygmt.src.shift_origin — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.shift_origin

+"""
+shift_origin - Shift plot origin in x and/or y directions.
+"""
+
+from pygmt.clib import Session
+
+
+def shift_origin(
+    self, xshift: float | str | None = None, yshift: float | str | None = None
+):
+    r"""
+    Shift plot origin in x and/or y directions.
+
+    This method shifts the plot origin relative to the current origin by *xshift* and
+    *yshift* in x and y directions, respectively. Optionally, append the length unit
+    (**c** for centimeters, **i** for inches, or **p** for points) to the shifts.
+    Default unit if not explicitly given is **c**, but can be changed to other units via
+    :gmt-term:`PROJ_LENGTH_UNIT`.
+
+    For *xshift*, a special character **w** can also be used, which represents the
+    bounding box **width** of the previous plot. The full syntax is
+    [[±][*f*]\ **w**\ [/\ *d*\ ]±]\ *xoff*, where optional signs, factor *f* and divisor
+    *d* can be used to compute an offset that may be adjusted further by ±\ *xoff*.
+    Assuming that the previous plot has a width of 10 centimeters, here are some example
+    values for *xshift*:
+
+    - ``"w"``: x-shift is 10 cm
+    - ``"w+2c"``: x-shift is 10+2=12 cm
+    - ``"2w+3c"``: x-shift is 2*10+3=23 cm
+    - ``"w/2-2c"``: x-shift is 10/2-2=3 cm
+
+    Similarly, for *yshift*, a special character **h** can also be used, which is the
+    bounding box **height** of the previous plot.
+
+    **Note**: The previous plot bounding box refers to the last object plotted, which
+    may be a basemap, image, logo, legend, colorbar, etc.
+
+    Parameters
+    ----------
+    xshift
+        Shift plot origin in x direction.
+    yshift
+        Shift plot origin in y direction.
+
+    Examples
+    --------
+    >>> import pygmt
+    >>> fig = pygmt.Figure()
+    >>> fig.basemap(region=[0, 10, 0, 10], projection="X10c/10c", frame=True)
+    >>> # Shift the plot origin in x direction by 12 cm
+    >>> fig.shift_origin(xshift=12)
+    >>> fig.basemap(region=[0, 10, 0, 10], projection="X14c/10c", frame=True)
+    >>> # Shift the plot origin in x direction based on the previous plot width
+    >>> # Here, the width is 14 cm, and xshift is 16 cm
+    >>> fig.shift_origin(xshift="w+2c")
+    >>> fig.show()
+    """
+    self._preprocess()
+    args = ["-T"]
+    if xshift:
+        args.append(f"-X{xshift}")
+    if yshift:
+        args.append(f"-Y{yshift}")
+
+    with Session() as lib:
+        lib.call_module(module="plot", args=args)
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/solar.html b/v0.14.0/_modules/pygmt/src/solar.html new file mode 100644 index 00000000000..641679793f5 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/solar.html @@ -0,0 +1,326 @@ + + + + + + + + pygmt.src.solar — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.solar

+"""
+solar - Plot day-night terminators and twilight.
+"""
+
+from typing import Literal
+
+import pandas as pd
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["solar"]
+
+
+@fmt_docstring
+@use_alias(
+    B="frame",
+    G="fill",
+    J="projection",
+    R="region",
+    V="verbose",
+    W="pen",
+    c="panel",
+    p="perspective",
+    t="transparency",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
+def solar(
+    self,
+    terminator: Literal["astronomical", "civil", "day_night", "nautical"] = "day_night",
+    terminator_datetime=None,
+    **kwargs,
+):
+    r"""
+    Plot day-light terminators or twilights.
+
+    This function plots the day-night terminator. Alternatively, it can plot the
+    terminators for civil twilight, nautical twilight, or astronomical twilight.
+
+    Full option list at :gmt-docs:`solar.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    terminator
+        Set the type of terminator displayed, which can be set with either the full name
+        or the first letter of the name. Available options are:
+
+        - ``"astronomical"``: Astronomical twilight
+        - ``"civil"``: Civil twilight
+        - ``"day_night"``: Day/night terminator
+        - ``"nautical"``: Nautical twilight
+
+        Refer to https://en.wikipedia.org/wiki/Twilight for the definitions of different
+        types of twilight.
+    terminator_datetime : str or datetime object
+        Set the UTC date and time of the displayed terminator [Default is the current
+        UTC date and time]. It can be passed as a string or Python datetime object.
+    {region}
+    {projection}
+    {frame}
+    fill : str
+        Set color or pattern for filling terminators [Default is no fill].
+    pen : str
+        Set pen attributes for lines [Default is ``"0.25p,black,solid"``].
+    {verbose}
+    {panel}
+    {perspective}
+    {transparency}
+
+    Example
+    -------
+    >>> # import the Python module "datetime"
+    >>> import datetime
+    >>> import pygmt
+    >>> # create a datetime object at 8:52:18 on June 24, 1997 (time in UTC)
+    >>> date = datetime.datetime(
+    ...     year=1997, month=6, day=24, hour=8, minute=52, second=18
+    ... )
+    >>> # create a new plot with pygmt.Figure()
+    >>> fig = pygmt.Figure()
+    >>> # create a map of the Earth with the coast method
+    >>> fig.coast(land="darkgreen", water="lightblue", projection="W10c", region="d")
+    >>> fig.solar(
+    ...     # set the terminator to "day_night"
+    ...     terminator="day_night",
+    ...     # pass the datetime object
+    ...     terminator_datetime=date,
+    ...     # fill the night-section with navyblue at 75% transparency
+    ...     fill="navyblue@75",
+    ...     # draw the terminator with a 1-point black line
+    ...     pen="1p,black",
+    ... )
+    >>> # show the plot
+    >>> fig.show()
+    """
+    kwargs = self._preprocess(**kwargs)
+    if kwargs.get("T") is not None:
+        msg = "Use 'terminator' and 'terminator_datetime' instead of 'T'."
+        raise GMTInvalidInput(msg)
+
+    valid_terminators = ["day_night", "civil", "nautical", "astronomical"]
+    if terminator not in valid_terminators and terminator not in "dcna":
+        msg = (
+            f"Unrecognized solar terminator type '{terminator}'. "
+            f"Valid values are {valid_terminators}."
+        )
+        raise GMTInvalidInput(msg)
+    kwargs["T"] = terminator[0]
+    if terminator_datetime:
+        try:
+            datetime_string = pd.to_datetime(terminator_datetime).strftime(
+                "%Y-%m-%dT%H:%M:%S.%f"
+            )
+        except ValueError as verr:
+            msg = "Unrecognized datetime format."
+            raise GMTInvalidInput(msg) from verr
+        kwargs["T"] += f"+d{datetime_string}"
+    with Session() as lib:
+        lib.call_module(module="solar", args=build_arg_list(kwargs))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/sph2grd.html b/v0.14.0/_modules/pygmt/src/sph2grd.html new file mode 100644 index 00000000000..1162489a305 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/sph2grd.html @@ -0,0 +1,285 @@ + + + + + + + + pygmt.src.sph2grd — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.sph2grd

+"""
+sph2grd - Compute grid from spherical harmonic coefficients
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["sph2grd"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + I="spacing", + R="region", + V="verbose", + b="binary", + h="header", + i="incols", + r="registration", + x="cores", +) +@kwargs_to_strings(I="sequence", R="sequence", i="sequence_comma") +def sph2grd(data, outgrid: str | None = None, **kwargs) -> xr.DataArray | None: + r""" + Create spherical grid files in tension of data. + + Reads a spherical harmonics coefficient table with records of L, M, + C[L,M], S[L,M] and evaluates the spherical harmonic model on the + specified grid. + + Full option list at :gmt-docs:`sph2grd.html` + + {aliases} + + Parameters + ---------- + data : str, {table-like} + Pass in data with L, M, C[L,M], S[L,M] values by + providing a file name to an ASCII data table, a 2-D + {table-classes}. + {outgrid} + {spacing} + {region} + {verbose} + {binary} + {header} + {incols} + {registration} + {cores} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - None if ``outgrid`` is set (grid output will be stored in file set by + ``outgrid``) + + Example + ------- + >>> import pygmt + >>> # Create a new grid from the remote file "EGM96_to_36.txt", + >>> # set the grid spacing to 1 arc-degree, and the region to global ("g") + >>> new_grid = pygmt.sph2grd(data="@EGM96_to_36.txt", spacing=1, region="g") + """ + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="vector", data=data) as vintbl, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="sph2grd", args=build_arg_list(kwargs, infile=vintbl) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/sphdistance.html b/v0.14.0/_modules/pygmt/src/sphdistance.html new file mode 100644 index 00000000000..194d888a1c9 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/sphdistance.html @@ -0,0 +1,332 @@ + + + + + + + + pygmt.src.sphdistance — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.sphdistance

+"""
+sphdistance - Create Voronoi distance, node,
+or natural nearest-neighbor grid on a sphere
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["sphdistance"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + C="single_form", + D="duplicate", + E="quantity", + I="spacing", + L="unit", + N="node_table", + Q="voronoi", + R="region", + V="verbose", +) +@kwargs_to_strings(I="sequence", R="sequence") +def sphdistance( + data=None, x=None, y=None, outgrid: str | None = None, **kwargs +) -> xr.DataArray | None: + r""" + Create Voronoi distance, node, or natural nearest-neighbor grid on a sphere. + + Reads a table containing *lon, lat* columns and performs + the construction of Voronoi polygons. These polygons are + then processed to calculate the nearest distance to each + node of the lattice and written to the specified grid. + + Full option list at :gmt-docs:`sphdistance.html` + + {aliases} + + Parameters + ---------- + data : str, {table-like} + Pass in (x, y) or (longitude, latitude) values by + providing a file name to an ASCII data table, a 2-D + {table-classes}. + x/y : 1-D arrays + Arrays of x and y coordinates. + {outgrid} + {spacing} + {region} + {verbose} + single_form : bool + For large data sets you can save some memory (at the expense of more + processing) by only storing one form of location coordinates + (geographic or Cartesian 3-D vectors) at any given time, translating + from one form to the other when necessary [Default keeps both arrays + in memory]. Not applicable with ``voronoi``. + duplicate : bool + Used to skip duplicate points since the algorithm cannot handle them. + [Default assumes there are no duplicates]. + quantity : str + **d**\|\ **n**\|\ **z**\ [*dist*]. + Specify the quantity that should be assigned to the grid nodes [Default + is **d**]: + + - **d** - compute distances to the nearest data point + - **n** - assign the ID numbers of the Voronoi polygons that each + grid node is inside + - **z** - assign all nodes inside the polygon the z-value of the center + node for a natural nearest-neighbor grid. + + Optionally, append the resampling interval along Voronoi arcs in + spherical degrees. + unit : str + Specify the unit used for distance calculations. Choose among **d** + (spherical degrees), **e** (meters), **f** (feet), **k** (kilometers), + **M** (miles), **n** (nautical miles), or **u** (survey feet). + node_table : str + Read the information pertaining to each Voronoi + polygon (the unique node lon, lat and polygon area) from a separate + file [Default acquires this information from the ASCII segment + headers of the output file]. Required if binary input via `voronoi` + is used. + voronoi : str + Append the name of a file with pre-calculated Voronoi polygons + [Default performs the Voronoi construction on input data]. + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - None if ``outgrid`` is set (grid output will be stored in file set by + ``outgrid``) + + Example + ------- + >>> import numpy as np + >>> import pygmt + >>> # Create an array of longitude/latitude coordinates + >>> coords_list = [[85.5, 22.3], [82.3, 22.6], [85.8, 22.4], [86.5, 23.3]] + >>> coords_array = np.array(coords_list) + >>> # Perform a calculation of the distance to + >>> # each point from Voronoi polygons + >>> grid = pygmt.sphdistance( + ... data=coords_array, spacing=[1, 2], region=[82, 87, 22, 24] + ... ) + """ + if kwargs.get("I") is None or kwargs.get("R") is None: + msg = "Both 'region' and 'spacing' must be specified." + raise GMTInvalidInput(msg) + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="vector", data=data, x=x, y=y) as vintbl, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="sphdistance", args=build_arg_list(kwargs, infile=vintbl) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/sphinterpolate.html b/v0.14.0/_modules/pygmt/src/sphinterpolate.html new file mode 100644 index 00000000000..7cd71649a1f --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/sphinterpolate.html @@ -0,0 +1,279 @@ + + + + + + + + pygmt.src.sphinterpolate — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.sphinterpolate

+"""
+sphinterpolate - Spherical gridding in tension of data on a sphere
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["sphinterpolate"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + I="spacing", + R="region", + V="verbose", +) +@kwargs_to_strings(I="sequence", R="sequence") +def sphinterpolate(data, outgrid: str | None = None, **kwargs) -> xr.DataArray | None: + r""" + Create spherical grid files in tension of data. + + Reads a table containing *lon, lat, z* columns and performs a Delaunay + triangulation to set up a spherical interpolation in tension. Several + options may be used to affect the outcome, such as choosing local versus + global gradient estimation or optimize the tension selection to satisfy one + of four criteria. + + Full option list at :gmt-docs:`sphinterpolate.html` + + {aliases} + + Parameters + ---------- + data : str, {table-like} + Pass in (x, y, z) or (longitude, latitude, elevation) values by + providing a file name to an ASCII data table, a 2-D + {table-classes}. + {outgrid} + {spacing} + {region} + {verbose} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is not set + - None if ``outgrid`` is set (grid output will be stored in file set by + ``outgrid``) + + Example + ------- + >>> import pygmt + >>> # Load a table of Mars with longitude/latitude/radius columns + >>> mars_shape = pygmt.datasets.load_sample_data(name="mars_shape") + >>> # Perform Delaunay triangulation on the table data + >>> # to produce a grid with a 1 arc-degree spacing + >>> grid = pygmt.sphinterpolate(data=mars_shape, spacing=1, region="g") + """ + with Session() as lib: + with ( + lib.virtualfile_in(check_kind="vector", data=data) as vintbl, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="sphinterpolate", args=build_arg_list(kwargs, infile=vintbl) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/subplot.html b/v0.14.0/_modules/pygmt/src/subplot.html new file mode 100644 index 00000000000..4dc7d8fd5e5 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/subplot.html @@ -0,0 +1,438 @@ + + + + + + + + pygmt.src.subplot — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.subplot

+"""
+subplot - Manage modern mode figure subplot configuration and selection.
+"""
+
+import contextlib
+
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+)
+
+
+@fmt_docstring
+@contextlib.contextmanager
+@use_alias(
+    Ff="figsize",
+    Fs="subsize",
+    A="autolabel",
+    B="frame",
+    C="clearance",
+    J="projection",
+    M="margins",
+    R="region",
+    SC="sharex",
+    SR="sharey",
+    T="title",
+    V="verbose",
+)
+@kwargs_to_strings(Ff="sequence", Fs="sequence", M="sequence", R="sequence")
+def subplot(self, nrows=1, ncols=1, **kwargs):
+    r"""
+    Create multi-panel subplot figures.
+
+    This method is used to split the current figure into a rectangular layout
+    of subplots that each may contain a single self-contained figure. Begin by
+    defining the layout of the entire multi-panel illustration. Several
+    parameters are available to specify the systematic layout, labeling,
+    dimensions, and more for the subplots.
+
+    Full option list at :gmt-docs:`subplot.html#synopsis-begin-mode`
+
+    {aliases}
+
+    Parameters
+    ----------
+    nrows : int
+        Number of vertical rows of the subplot grid.
+    ncols : int
+        Number of horizontal columns of the subplot grid.
+    figsize : list
+        Specify the final figure dimensions as [*width*, *height*].
+    subsize : list
+        Specify the dimensions of each subplot directly as [*width*, *height*].
+        Note that only one of ``figsize`` or ``subsize`` can be provided at
+        once.
+
+    autolabel : bool or str
+        [*autolabel*][**+c**\ *dx*\ [/*dy*]][**+g**\ *fill*][**+j**\|\ **J**\
+        *refpoint*][**+o**\ *dx*\ [/*dy*]][**+p**\ *pen*][**+r**\|\ **R**]
+        [**+v**].
+        Specify automatic tagging of each subplot. Append either a number or
+        letter [a]. This sets the tag of the first, top-left subplot and others
+        follow sequentially. Surround the number or letter by parentheses on
+        any side if these should be typeset as part of the tag. Use
+        **+j**\|\ **J**\ *refpoint* to specify where the tag should be placed
+        in the subplot [TL]. **Note**: **+j** sets the justification of the
+        tag to *refpoint* (suitable for interior tags) while **+J** instead
+        selects the mirror opposite (suitable for exterior tags). Append
+        **+c**\ *dx*\[/*dy*] to set the clearance between the tag and a
+        surrounding text box requested via **+g** or **+p** [3p/3p, i.e., 15%
+        of the :gmt-term:`FONT_TAG` size dimension]. Append **+g**\ *fill* to
+        paint the tag's text box with *fill* [no painting]. Append
+        **+o**\ *dx*\ [/*dy*] to offset the tag's reference point in the
+        direction implied by the justification [4p/4p, i.e., 20% of the
+        :gmt-term:`FONT_TAG` size]. Append **+p**\ *pen* to draw the outline of
+        the tag's text box using selected *pen* [no outline]. Append **+r** to
+        typeset your tag numbers using lowercase Roman numerals; use **+R** for
+        uppercase Roman numerals [Arabic numerals]. Append **+v** to increase
+        tag numbers vertically down columns [horizontally across rows].
+    {frame}
+    clearance : str or list
+        [*side*]\ *clearance*.
+        Reserve a space of dimension *clearance* between the margin and the
+        subplot on the specified side, using *side* values from **w**, **e**,
+        **s**, or **n**; or **x** for both **w** and **e**; or **y** for both
+        **s** and **n**. No *side* means all sides (i.e. ``clearance="1c"``
+        would set a clearance of 1 cm on all sides). The option is repeatable
+        to set aside space on more than one side (e.g.
+        ``clearance=["w1c", "s2c"]`` would set a clearance of 1 cm on west
+        side and 2 cm on south side). Such space will be left untouched by
+        the main map plotting but can be accessed by methods that plot
+        scales, bars, text, etc.
+    {projection}
+    margins : str or list
+        This is margin space that is added between neighboring subplots (i.e.,
+        the interior margins) in addition to the automatic space added for tick
+        marks, annotations, and labels. The margins can be specified as either:
+
+        - a single value (for same margin on all sides). E.g. ``"5c"``.
+        - a pair of values (for setting separate horizontal and vertical
+          margins). E.g. ``["5c", "3c"]``.
+        - a set of four values (for setting separate left, right, bottom, and
+          top margins). E.g. ``["1c", "2c", "3c", "4c"]``.
+
+        The actual gap created is always a sum of the margins for the two
+        opposing sides (e.g., east plus west or south plus north margins)
+        [Default is half the primary annotation font size, giving the full
+        annotation font size as the default gap].
+    {region}
+    sharex : bool or str
+        Set subplot layout for shared x-axes. Use when all subplots in a column
+        share a common *x*-range. If ``sharex=True``, the first (i.e.,
+        **t**\ op) and the last (i.e., **b**\ ottom) rows will have
+        *x*-annotations; use ``sharex="t"`` or ``sharex="b"`` to select only
+        one of those two rows [both]. Append **+l** if annotated *x*-axes
+        should have a label [none]; optionally append the label if it is the
+        same for the entire subplot. Append **+t** to make space for subplot
+        titles for each row; use **+tc** for top row titles only [no subplot
+        titles].
+    sharey : bool or str
+        Set subplot layout for shared y-axes. Use when all subplots in a row
+        share a common *y*-range. If ``sharey=True``, the first (i.e.,
+        **l**\ eft) and the last (i.e., **r**\ ight) columns will have
+        *y*-annotations; use ``sharey="l"`` or ``sharey="r"`` to select only
+        one of those two columns [both]. Append **+l** if annotated *y*-axes
+        will have a label [none]; optionally, append the label if it is the
+        same for the entire subplot. Append **+p** to make all annotations
+        axis-parallel [horizontal]; if not used you may have to set
+        ``clearance`` to secure extra space for long horizontal annotations.
+
+        Notes for ``sharex``/``sharey``:
+
+        - Labels and titles that depends on which row or column are specified
+          as usual via a subplot's own ``frame`` setting.
+        - Append **+w** to the ``figsize`` or ``subsize`` parameter to draw
+          horizontal and vertical lines between interior panels using selected
+          pen [no lines].
+    title : str
+        While individual subplots can have titles (see ``sharex``/``sharey`` or
+        ``frame``), the entire figure may also have an overarching *heading*
+        [no heading]. Font is determined by setting :gmt-term:`FONT_HEADING`.
+    {verbose}
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    if nrows < 1 or ncols < 1:
+        msg = "Please ensure that both 'nrows'>=1 and 'ncols'>=1."
+        raise GMTInvalidInput(msg)
+    if kwargs.get("Ff") and kwargs.get("Fs"):
+        msg = "Please provide either one of 'figsize' or 'subsize' only."
+        raise GMTInvalidInput(msg)
+
+    # Need to use separate sessions for "subplot begin" and "subplot end".
+    # Otherwise, "subplot end" will use the last session, which may cause
+    # strange positioning issues for later plotting calls.
+    # See https://github.com/GenericMappingTools/pygmt/issues/2426.
+    try:
+        with Session() as lib:
+            lib.call_module(
+                module="subplot",
+                args=["begin", f"{nrows}x{ncols}", *build_arg_list(kwargs)],
+            )
+            yield
+    finally:
+        with Session() as lib:
+            lib.call_module(
+                module="subplot", args=["end", *build_arg_list({"V": kwargs.get("V")})]
+            )
+
+
+@fmt_docstring
+@contextlib.contextmanager
+@use_alias(A="fixedlabel", C="clearance", V="verbose")
+@kwargs_to_strings(panel="sequence_comma")
+def set_panel(self, panel=None, **kwargs):
+    r"""
+    Set the current subplot panel to plot on.
+
+    Before you start plotting you must first select the active subplot.
+    **Note**: If any *projection* option is passed with the question mark
+    **?** as scale or width when plotting subplots, then the dimensions of
+    the map are automatically determined by the subplot size and your
+    region. For Cartesian plots: If you want the scale to apply equally to
+    both dimensions then you must specify ``projection="x"`` [The default
+    ``projection="X"`` will fill the subplot by using unequal scales].
+
+    {aliases}
+
+    Parameters
+    ----------
+    panel : str or list
+        *row,col*\|\ *index*.
+        Sets the current subplot until further notice. **Note**: First *row*
+        or *col* is 0, not 1. If not given we go to the next subplot by order
+        specified via ``autolabel`` in :meth:`pygmt.Figure.subplot`. As an
+        alternative, you may bypass using :meth:`pygmt.Figure.set_panel` and
+        instead supply the common option **panel**\ =[*row,col*] to the first
+        plot command you issue in that subplot. GMT maintains information about
+        the current figure and subplot. Also, you may give the one-dimensional
+        *index* instead which starts at 0 and follows the row or column order
+        set via ``autolabel`` in :meth:`pygmt.Figure.subplot`.
+
+    fixedlabel : str
+        Overrides the automatic labeling with the given string. No modifiers
+        are allowed. Placement, justification, etc. are all inherited from how
+        ``autolabel`` was specified by the initial :meth:`pygmt.Figure.subplot`
+        command.
+
+    clearance : str or list
+        [*side*]\ *clearance*.
+        Reserve a space of dimension *clearance* between the margin and the
+        subplot on the specified side, using *side* values from **w**, **e**,
+        **s**, or **n**. The option is repeatable to set aside space on more
+        than one side (e.g. ``clearance=["w1c", "s2c"]`` would set a clearance
+        of 1 cm on west side and 2 cm on south side). Such space will be left
+        untouched by the main map plotting but can be accessed by methods that
+        plot scales, bars, text, etc. This setting overrides the common
+        clearances set by ``clearance`` in the initial
+        :meth:`pygmt.Figure.subplot` call.
+
+    {verbose}
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    with Session() as lib:
+        lib.call_module(
+            module="subplot", args=["set", str(panel), *build_arg_list(kwargs)]
+        )
+        yield
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/surface.html b/v0.14.0/_modules/pygmt/src/surface.html new file mode 100644 index 00000000000..d49898d7eed --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/surface.html @@ -0,0 +1,374 @@ + + + + + + + + pygmt.src.surface — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.surface

+"""
+surface - Grid table data using adjustable tension continuous curvature splines.
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["surface"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + C="convergence", + I="spacing", + Ll="lower", + Lu="upper", + M="maxradius", + R="region", + T="tension", + V="verbose", + a="aspatial", + b="binary", + d="nodata", + e="find", + f="coltypes", + h="header", + i="incols", + r="registration", + w="wrap", +) +@kwargs_to_strings(I="sequence", R="sequence") +def surface( + data=None, x=None, y=None, z=None, outgrid: str | None = None, **kwargs +) -> xr.DataArray | None: + r""" + Grid table data using adjustable tension continuous curvature splines. + + Surface reads randomly-spaced (x, y, z) triplets and produces gridded + values z(x,y) by solving: + + .. math:: (1 - t)\nabla^2(z)+t\nabla(z) = 0 + + where :math:`t` is a tension factor between 0 and 1, and :math:`\nabla` + indicates the Laplacian operator. Here, :math:`t = 0` gives the + "minimum curvature" solution. Minimum curvature can cause undesired + oscillations and false local maxima or minima (see Smith and Wessel, + 1990), and you may wish to use :math:`t > 0` to suppress these effects. + Experience suggests :math:`t \sim 0.25` usually looks good for potential + field data and :math:`t` should be larger (:math:`t \sim 0.35`) for steep + topography data. :math:`t = 1` gives a harmonic surface (no maxima or + minima are possible except at control data points). It is recommended that + the user preprocess the data with :func:`pygmt.blockmean`, + :func:`pygmt.blockmedian`, or :func:`pygmt.blockmode` to avoid spatial + aliasing and eliminate redundant data. You may impose lower and/or upper + bounds on the solution. These may be entered in the form of a fixed value, + a grid with values, or simply be the minimum/maximum input data values. + Natural boundary conditions are applied at the edges, except for + geographic data with 360-degree range where we apply periodic boundary + conditions in the longitude direction. + + Takes a matrix, (x, y, z) triplets, or a file name as input. + + Must provide either ``data`` or ``x``, ``y``, and ``z``. + + Full option list at :gmt-docs:`surface.html` + + {aliases} + + Parameters + ---------- + data : str, {table-like} + Pass in (x, y, z) or (longitude, latitude, elevation) values by + providing a file name to an ASCII data table, a 2-D + {table-classes}. + x/y/z : 1-D arrays + Arrays of x and y coordinates and values z of the data points. + + {spacing} + + {region} + {outgrid} + convergence : float + Optional. Convergence limit. Iteration is assumed to have converged + when the maximum absolute change in any grid value is less than + ``convergence``. (Units same as data z units). Alternatively, + give limit in percentage of root-mean-square (rms) deviation by + appending %. [Default is scaled to :math:`10^{{-4}}` of the rms + deviation of the data from a best-fit (least-squares) plane.] + This is the final convergence limit at the desired grid spacing; + for intermediate (coarser) grids the effective convergence limit is + divided by the grid spacing multiplier. + maxradius : float or str + Optional. After solving for the surface, apply a mask so that nodes + farther than ``maxradius`` away from a data constraint are set to NaN + [Default is no masking]. Append a distance unit (see + :gmt-docs:`Units <surface.html#units>`) if needed. One can also + select the nodes to mask by using the *n_cells*\ **c** form. Here + *n_cells* means the number of cells around the node is controlled + by a data point. As an example ``"0c"`` means that only the cell + where the point lies is filled, ``"1c"`` keeps one cell beyond + that (i.e. makes a 3x3 square neighborhood), and so on. + lower : float or str + Optional. Impose limits on the output solution. Parameter ``lower`` + sets the lower bound. ``lower`` can be the name of a grid file with + lower bound values, a fixed value, **d** to set to minimum input + value, or **u** for unconstrained [Default]. Grid files used to set + the limits may contain NaNs. In the presence of NaNs, the limit of + a node masked with NaN is unconstrained. + upper : float or str + Optional. Impose limits on the output solution. Parameter ``upper`` + sets the upper bound and can be the name of a grid file with upper + bound values, a fixed value, **d** to set to maximum input value, + or **u** for unconstrained [Default]. Grid files used to set the + limits may contain NaNs. In the presence of NaNs, the limit of a + node masked with NaN is unconstrained. + tension : float or str + [**b**\|\ **i**]. + Optional. Tension factor[s]. These must be between 0 and 1. Tension + may be used in the interior solution (above equation, where it + suppresses spurious oscillations) and in the boundary conditions + (where it tends to flatten the solution approaching the edges). Add + **i**\ *tension* to set interior tension, and **b**\ *tension* to + set boundary tension. If you do not prepend **i** or **b**, both + will be set to the same value. [Default is 0 for both and gives + minimum curvature solution.] + {verbose} + {aspatial} + {binary} + {nodata} + {find} + {coltypes} + {header} + {incols} + {registration} + {wrap} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray`: if ``outgrid`` is not set + - None if ``outgrid`` is set (grid output will be stored in file set by + ``outgrid``) + + Example + ------- + >>> import pygmt + >>> # Load a sample table of topography + >>> topography = pygmt.datasets.load_sample_data(name="notre_dame_topography") + >>> # Perform gridding of topography data + >>> grid = pygmt.surface(data=topography, spacing=1, region=[0, 4, 0, 8]) + """ + with Session() as lib: + with ( + lib.virtualfile_in( + check_kind="vector", data=data, x=x, y=y, z=z, required_z=True + ) as vintbl, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="surface", args=build_arg_list(kwargs, infile=vintbl) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/ternary.html b/v0.14.0/_modules/pygmt/src/ternary.html new file mode 100644 index 00000000000..31118ed5556 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/ternary.html @@ -0,0 +1,305 @@ + + + + + + + + pygmt.src.ternary — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.ternary

+"""
+ternary - Plot data on ternary diagrams.
+"""
+
+import pandas as pd
+from packaging.version import Version
+from pygmt.clib import Session, __gmt_version__
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+
+@fmt_docstring
+@use_alias(
+    B="frame",
+    C="cmap",
+    G="fill",
+    JX="width",
+    R="region",
+    S="style",
+    V="verbose",
+    W="pen",
+    c="panel",
+    p="perspective",
+    t="transparency",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
+def ternary(
+    self,
+    data,
+    alabel: str | None = None,
+    blabel: str | None = None,
+    clabel: str | None = None,
+    **kwargs,
+):
+    r"""
+    Plot ternary diagrams.
+
+    Reads (*a*,\ *b*,\ *c*\ [,\ *z*]) records from *data* and plots symbols at
+    those locations on a ternary diagram. If a symbol is selected and no symbol
+    size given, then we will interpret the fourth column of the input data as
+    symbol size. Symbols whose *size* is <= 0 are skipped. If no symbols are
+    specified then the symbol code (see ``style`` below) must be present as
+    last column in the input.  If ``style`` is not specified then we instead
+    plot lines or polygons.
+
+    Full option list at :gmt-docs:`ternary.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    data : str, list, {table-like}
+        Pass in either a file name to an ASCII data table, a Python list, a 2-D
+        {table-classes}.
+    width : str
+        Set the width of the figure by passing a number, followed by
+        a unit (**i** for inches, **c** for centimeters). Use a negative width
+        to indicate that positive axes directions be clock-wise
+        [Default lets the a, b, c axes be positive in a
+        counter-clockwise direction].
+    region : str or list
+        [*amin*, *amax*, *bmin*, *bmax*, *cmin*, *cmax*].
+        Give the min and max limits for each of the three axes **a**, **b**,
+        and **c**.
+    {cmap}
+    {fill}
+    alabel
+        Set the label for the *a* vertex where the component is 100%. The label is
+        placed at a distance of three times the :gmt-term:`MAP_LABEL_OFFSET` setting
+        from the corner.
+    blabel
+        Same as ``alabel`` but for the *b* vertex.
+    clabel
+        Same as ``alabel`` but for the *c* vertex.
+    style : str
+        *symbol*\[\ *size*].
+        Plot individual symbols in a ternary diagram.
+    {pen}
+    {verbose}
+    {panel}
+    {perspective}
+    {transparency}
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    # -Lalabel/blabel/clabel. '-' means skipping the label.
+    labels = (alabel, blabel, clabel)
+    if any(v is not None for v in labels):
+        kwargs["L"] = "/".join(str(v) if v is not None else "-" for v in labels)
+
+    # TODO(GMT>=6.5.0): Remove the patch for upstream bug fixed in GMT 6.5.0.
+    # See https://github.com/GenericMappingTools/pygmt/pull/2138
+    if Version(__gmt_version__) < Version("6.5.0") and isinstance(data, pd.DataFrame):
+        data = data.to_numpy()
+
+    with Session() as lib:
+        with lib.virtualfile_in(check_kind="vector", data=data) as vintbl:
+            lib.call_module(
+                module="ternary",
+                args=build_arg_list(kwargs, infile=vintbl),
+            )
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/text.html b/v0.14.0/_modules/pygmt/src/text.html new file mode 100644 index 00000000000..d6a15e7b828 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/text.html @@ -0,0 +1,477 @@ + + + + + + + + pygmt.src.text — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.text

+"""
+text - Plot text on a figure.
+"""
+
+from collections.abc import Sequence
+
+import numpy as np
+from pygmt._typing import AnchorCode, StringArrayTypes
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    _check_encoding,
+    build_arg_list,
+    data_kind,
+    fmt_docstring,
+    is_nonstr_iter,
+    kwargs_to_strings,
+    non_ascii_to_octal,
+    use_alias,
+)
+
+
+@fmt_docstring
+@use_alias(
+    R="region",
+    J="projection",
+    B="frame",
+    C="clearance",
+    D="offset",
+    G="fill",
+    N="no_clip",
+    V="verbose",
+    W="pen",
+    a="aspatial",
+    c="panel",
+    e="find",
+    f="coltypes",
+    h="header",
+    it="use_word",
+    p="perspective",
+    t="transparency",
+    w="wrap",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
+def text_(  # noqa: PLR0912
+    self,
+    textfiles=None,
+    x=None,
+    y=None,
+    position: AnchorCode | None = None,
+    text: str | StringArrayTypes | None = None,
+    angle=None,
+    font=None,
+    justify: bool | None | AnchorCode | Sequence[AnchorCode] = None,
+    **kwargs,
+):
+    r"""
+    Plot or typeset text strings of variable size, font type, and orientation.
+
+    Must provide at least one of the following combinations as input:
+
+    - ``textfiles``
+    - ``x``/``y``, and ``text``
+    - ``position`` and ``text``
+
+    The text strings passed via the ``text`` parameter can contain ASCII characters and
+    non-ASCII characters defined in the Adobe ISOLatin1+, Adobe Symbol, Adobe
+    ZapfDingbats and ISO-8859-x (x can be 1-11, 13-16) encodings. Refer to
+    :doc:`/techref/encodings` for the full list of supported non-ASCII characters.
+
+    Full option list at :gmt-docs:`text.html`.
+
+    {aliases}
+
+    Parameters
+    ----------
+    textfiles : str or list
+        A file name or a list of file names containing one or more records.
+        Each record has the following columns:
+
+        * *x*: X coordinate or longitude
+        * *y*: Y coordinate or latitude
+        * *angle*: Angle in degrees counter-clockwise from horizontal
+        * *font*: Text size, font, and color
+        * *justify*: Two-character justification code
+        * *text*: The text string to typeset
+
+        The *angle*, *font*, and *justify* columns are optional and can be set
+        by using the ``angle``, ``font``, and ``justify`` parameters,
+        respectively. If these parameters are set to ``True``, then the
+        corresponding columns must be present in the input file(s) and the
+        columns must be in the order mentioned above.
+    x/y : float or 1-D arrays
+        The x and y coordinates, or an array of x and y coordinates to plot
+        the text.
+    position
+        Set reference point on the map for the text by using x, y
+        coordinates extracted from ``region`` instead of providing them
+        through ``x``/``y``. Specify with a two-letter (order independent)
+        code, chosen from:
+
+        * Vertical: **T**\ (op), **M**\ (iddle), **B**\ (ottom)
+        * Horizontal: **L**\ (eft), **C**\ (entre), **R**\ (ight)
+
+        For example, ``position="TL"`` plots the text at the Top Left corner
+        of the map.
+    text
+        The text string, or an array of strings to plot on the figure.
+    angle: float, str, bool or list
+        Set the angle measured in degrees counter-clockwise from
+        horizontal (e.g. 30 sets the text at 30 degrees). If no angle is
+        explicitly given (i.e. ``angle=True``) then the input to ``textfiles``
+        must have this as a column.
+    font : str, bool or list of str
+        Set the font specification with format *size*\ ,\ *font*\ ,\ *color*
+        where *size* is text size in points, *font* is the font to use, and
+        *color* sets the font color. For example,
+        ``font="12p,Helvetica-Bold,red"`` selects a 12p, red, Helvetica-Bold
+        font. If no font info is explicitly given (i.e. ``font=True``), then
+        the input to ``textfiles`` must have this information in one of its
+        columns.
+    justify
+        Set the alignment which refers to the part of the text string that
+        will be mapped onto the (x, y) point. Choose a two-letter
+        combination of **L**, **C**, **R** (for left, center, or right) and
+        **T**, **M**, **B** (for top, middle, or bottom). E.g., **BL** for
+        bottom left. If no justification is explicitly given
+        (i.e. ``justify=True``), then the input to ``textfiles`` must have
+        this as a column.
+    {projection}
+    {region}
+        *Required if this is the first plot command.*
+    clearance : str
+        [*dx/dy*][**+to**\|\ **O**\|\ **c**\|\ **C**].
+        Adjust the clearance between the text and the surrounding box
+        [Default is 15% of the font size]. Only used if ``pen`` or ``fill``
+        are specified. Append the unit you want (**c** for centimeters,
+        **i** for inches, or **p** for points; if not given we consult
+        :gmt-term:`PROJ_LENGTH_UNIT`) or *%* for a percentage of the font
+        size. Optionally, use modifier **+t** to set the shape of the text
+        box when using ``fill`` and/or ``pen``. Append lower case **o**
+        to get a straight rectangle [Default is **o**]. Append upper case
+        **O** to get a rounded rectangle. In paragraph mode (*paragraph*)
+        you can also append lower case **c** to get a concave rectangle or
+        append upper case **C** to get a convex rectangle.
+    fill : str
+        Set color for filling text boxes [Default is no fill].
+    offset : str
+        [**j**\|\ **J**]\ *dx*\[/*dy*][**+v**\[*pen*]].
+        Offset the text from the projected (x, y) point by *dx*/\ *dy*
+        [Default is ``"0/0"``].
+        If *dy* is not specified then it is set equal to *dx*. Use **j** to
+        offset the text away from the point instead (i.e., the text
+        justification will determine the direction of the shift). Using
+        **J** will shorten diagonal offsets at corners by sqrt(2).
+        Optionally, append **+v** which will draw a line from the original
+        point to the shifted point; append a pen to change the attributes
+        for this line.
+    pen : str
+        Set the pen used to draw a rectangle around the text string
+        (see ``clearance``) [Default is ``"0.25p,black,solid"``].
+    no_clip : bool
+        Do **not** clip text at the frame boundaries [Default is
+        ``False``].
+    {verbose}
+    {aspatial}
+    {panel}
+    {find}
+    {coltypes}
+    {header}
+    use_word : int
+        Select a specific word from the trailing text, with the first
+        word being 0 [Default is the entire trailing text]. No numerical
+        columns can be specified.
+    {perspective}
+    {transparency}
+        ``transparency`` can also be a 1-D array to set varying
+        transparency for texts, but this option is only valid if using
+        ``x``/``y`` and ``text``.
+    {wrap}
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    # Ensure inputs are either textfiles, x/y/text, or position/text
+    if (
+        (textfiles is not None)
+        + (position is not None)
+        + (x is not None or y is not None)
+    ) != 1:
+        msg = "Provide either 'textfiles', 'x'/'y'/'text', or 'position'/'text'."
+        raise GMTInvalidInput(msg)
+
+    required_data = position is None
+    kind = data_kind(textfiles, required=required_data)
+
+    if position is not None and (text is None or is_nonstr_iter(text)):
+        msg = "'text' can't be None or array when 'position' is given."
+        raise GMTInvalidInput(msg)
+    if textfiles is not None and text is not None:
+        msg = "'text' can't be specified when 'textfiles' is given."
+        raise GMTInvalidInput(msg)
+    if kind == "empty" and text is None:
+        msg = "Must provide text with x/y pairs."
+        raise GMTInvalidInput(msg)
+
+    # Arguments that can accept arrays.
+    array_args = [
+        (angle, "+a", "angle"),
+        (font, "+f", "font"),
+        (justify, "+j", "justify"),
+    ]
+
+    # Build the -F option.
+    if kwargs.get("F") is None and any(
+        v is not None for v in (position, angle, font, justify)
+    ):
+        kwargs.update({"F": ""})
+
+    for arg, flag, _ in array_args:
+        if arg is True:
+            kwargs["F"] += flag
+        elif isinstance(arg, int | float | str):
+            kwargs["F"] += f"{flag}{arg}"
+
+    extra_arrays = []
+    confdict = {}
+    if kind == "empty":
+        for arg, flag, name in array_args:
+            if is_nonstr_iter(arg):
+                kwargs["F"] += flag
+                # angle is numeric type and font/justify are str type.
+                if name == "angle":
+                    extra_arrays.append(arg)
+                else:
+                    extra_arrays.append(np.asarray(arg, dtype=np.str_))
+
+        # If an array of transparency is given, GMT will read it from the last numerical
+        # column per data record.
+        if is_nonstr_iter(kwargs.get("t")):
+            extra_arrays.append(kwargs["t"])
+            kwargs["t"] = True
+
+        # Append text to the last column. Text must be passed in as str type.
+        text = np.asarray(text, dtype=np.str_)
+        if (encoding := _check_encoding("".join(text.flatten()))) != "ascii":
+            text = np.vectorize(non_ascii_to_octal, excluded="encoding")(
+                text, encoding=encoding
+            )
+            confdict["PS_CHAR_ENCODING"] = encoding
+        extra_arrays.append(text)
+    else:
+        if isinstance(position, str):
+            kwargs["F"] += f"+c{position}+t{text}"
+
+        for arg, _, name in [*array_args, (kwargs.get("t"), "", "transparency")]:
+            if is_nonstr_iter(arg):
+                msg = f"Argument of '{name}' must be a single value or True."
+                raise GMTInvalidInput(msg)
+
+    with Session() as lib:
+        with lib.virtualfile_in(
+            check_kind="vector",
+            data=textfiles,
+            x=x,
+            y=y,
+            extra_arrays=extra_arrays,
+            required_data=required_data,
+        ) as vintbl:
+            lib.call_module(
+                module="text",
+                args=build_arg_list(kwargs, infile=vintbl, confdict=confdict),
+            )
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/tilemap.html b/v0.14.0/_modules/pygmt/src/tilemap.html new file mode 100644 index 00000000000..32cd1361c54 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/tilemap.html @@ -0,0 +1,340 @@ + + + + + + + + pygmt.src.tilemap — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.tilemap

+"""
+tilemap - Plot XYZ tile maps.
+"""
+
+from typing import Literal
+
+from pygmt.clib import Session
+from pygmt.datasets.tile_map import load_tile_map
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+try:
+    from xyzservices import TileProvider
+except ImportError:
+    TileProvider = None
+
+
+@fmt_docstring
+@use_alias(
+    B="frame",
+    E="dpi",
+    I="shading",
+    J="projection",
+    M="monochrome",
+    N="no_clip",
+    Q="nan_transparent",
+    # R="region",
+    V="verbose",
+    c="panel",
+    p="perspective",
+    t="transparency",
+)
+@kwargs_to_strings(c="sequence_comma", p="sequence")  # R="sequence",
+def tilemap(
+    self,
+    region: list,
+    zoom: int | Literal["auto"] = "auto",
+    source: TileProvider | str | None = None,
+    lonlat: bool = True,
+    wait: int = 0,
+    max_retries: int = 2,
+    zoom_adjust: int | None = None,
+    **kwargs,
+):
+    r"""
+    Plot an XYZ tile map.
+
+    This method loads XYZ tile maps from a tile server or local file using
+    :func:`pygmt.datasets.load_tile_map` into a georeferenced form, and plots the tiles
+    as a basemap or overlay using :meth:`pygmt.Figure.grdimage`.
+
+    **Note**: By default, standard web map tiles served in a Spherical Mercator
+    (EPSG:3857) Cartesian format will be reprojected to a geographic coordinate
+    reference system (OGC:CRS84) and plotted with longitude/latitude bounds when
+    ``lonlat=True``. If reprojection is not desired, please set ``lonlat=False`` and
+    provide Spherical Mercator (EPSG:3857) coordinates to the ``region`` parameter.
+
+    {aliases}
+
+    Parameters
+    ----------
+    region
+        The bounding box of the map in the form of a list [*xmin*, *xmax*, *ymin*,
+        *ymax*]. These coordinates should be in longitude/latitude if ``lonlat=True`` or
+        Spherical Mercator (EPSG:3857) if ``lonlat=False``.
+    zoom
+        Level of detail. Higher levels (e.g. ``22``) mean a zoom level closer to the
+        Earth's surface, with more tiles covering a smaller geographical area and thus
+        more detail. Lower levels (e.g. ``0``) mean a zoom level further from the
+        Earth's surface, with less tiles covering a larger geographical area and thus
+        less detail. Default is ``"auto"`` to automatically determine the zoom level
+        based on the bounding box region extent.
+
+        .. note::
+           The maximum possible zoom level may be smaller than ``22``, and depends on
+           what is supported by the chosen web tile provider source.
+    source
+        The tile source: web tile provider or path to a local file. Provide either:
+
+        - A web tile provider in the form of a :class:`xyzservices.TileProvider` object.
+          See :doc:`Contextily providers <contextily:providers_deepdive>` for a list of
+          tile providers. Default is ``xyzservices.providers.OpenStreetMap.HOT``, i.e.
+          OpenStreetMap Humanitarian web tiles.
+        - A web tile provider in the form of a URL. The placeholders for the XYZ in the
+          URL need to be ``{{x}}``, ``{{y}}``, ``{{z}}``, respectively. E.g.
+          ``https://{{s}}.tile.openstreetmap.org/{{z}}/{{x}}/{{y}}.png``.
+        - A local file path. The file is read with :doc:`rasterio <rasterio:index>` and
+          all bands are loaded into the basemap. See
+          :doc:`contextily:working_with_local_files`.
+
+        .. important::
+           Tiles are assumed to be in the Spherical Mercator projection (EPSG:3857).
+    lonlat
+        If ``False``, coordinates in ``region`` are assumed to be Spherical Mercator as
+        opposed to longitude/latitude.
+    wait
+        If the tile API is rate-limited, the number of seconds to wait between a failed
+        request and the next try.
+    max_retries
+        Total number of rejected requests allowed before contextily will stop trying to
+        fetch more tiles from a rate-limited API.
+    zoom_adjust
+        The amount to adjust a chosen zoom level if it is chosen automatically. Values
+        outside of -1 to 1 are not recommended as they can lead to slow execution.
+
+        .. note::
+           The ``zoom_adjust`` parameter requires ``contextily>=1.5.0``.
+
+    kwargs : dict
+        Extra keyword arguments to pass to :meth:`pygmt.Figure.grdimage`.
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    raster = load_tile_map(
+        region=region,
+        zoom=zoom,
+        source=source,
+        lonlat=lonlat,
+        crs="OGC:CRS84" if lonlat is True else "EPSG:3857",
+        wait=wait,
+        max_retries=max_retries,
+        zoom_adjust=zoom_adjust,
+    )
+    if lonlat:
+        raster.gmt.gtype = 1  # Set to geographic type
+
+    # Only set region if no_clip is None or False, so that plot is clipped to exact
+    # bounding box region
+    if kwargs.get("N") in {None, False}:
+        kwargs["R"] = "/".join(str(coordinate) for coordinate in region)
+
+    with Session() as lib:
+        with lib.virtualfile_in(check_kind="raster", data=raster) as vingrd:
+            lib.call_module(
+                module="grdimage", args=build_arg_list(kwargs, infile=vingrd)
+            )
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/timestamp.html b/v0.14.0/_modules/pygmt/src/timestamp.html new file mode 100644 index 00000000000..92dd6c98df1 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/timestamp.html @@ -0,0 +1,321 @@ + + + + + + + + pygmt.src.timestamp — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.timestamp

+"""
+timestamp - Plot the GMT timestamp logo.
+"""
+
+import warnings
+from collections.abc import Sequence
+
+from packaging.version import Version
+from pygmt._typing import AnchorCode
+from pygmt.clib import Session, __gmt_version__
+from pygmt.helpers import build_arg_list, kwargs_to_strings
+
+__doctest_skip__ = ["timestamp"]
+
+
+@kwargs_to_strings(offset="sequence")
+def timestamp(
+    self,
+    text: str | None = None,
+    label: str | None = None,
+    justify: AnchorCode = "BL",
+    offset: float | str | Sequence[float | str] = ("-54p", "-54p"),
+    font: str = "Helvetica,black",
+    timefmt: str = "%Y %b %d %H:%M:%S",
+):
+    r"""
+    Plot the GMT timestamp logo.
+
+    Add the GMT timestamp logo with an optional label at the bottom-left corner of a
+    plot with an offset of ``("-54p", "-54p")``. The timestamp will be in the locale set
+    by the environment variable :term:`TZ` (generally local time but can be changed via
+    ``os.environ["TZ"]``) and its format is controlled by the ``timefmt`` parameter. It
+    can also be replaced with any custom text string using the ``text`` parameter.
+
+    Parameters
+    ----------
+    text
+        If ``None``, the current UNIX timestamp is shown in the GMT timestamp logo. Set
+        this parameter to replace the UNIX timestamp with a custom text string instead.
+        The text must be no longer than 64 characters.
+    label
+        The text string shown after the GMT timestamp logo.
+    justify
+        Justification of the timestamp box relative to the plot's bottom-left corner
+        (i.e., the plot origin). Give a two-character code that is a combination of a
+        horizontal (**L**\ (eft), **C**\ (enter), or **R**\ (ight)) and a vertical
+        (**T**\ (op), **M**\ (iddle), or **B**\ (ottom)) code. For example,
+        ``justify="TL"`` means choosing the **T**\ op **L**\ eft point of the timestamp
+        as the anchor point.
+    offset
+        *offset* or (*offset_x*, *offset_y*).
+        Offset the anchor point of the timestamp box by *offset_x* and *offset_y*. If a
+        single value *offset* is given, *offset_y* = *offset_x* = *offset*.
+    font
+        Font of the timestamp and the optional label. Since the GMT logo has a fixed
+        height, the font sizes are fixed to be 8-point for the timestamp and 7-point for
+        the label. The parameter can't change the font color for GMT<=6.4.0, only the
+        font style.
+    timefmt
+        Format string for the UNIX timestamp. The format string is parsed by the C
+        function ``strftime``, so that virtually any text can be used (even not
+        containing any time information).
+
+    Examples
+    --------
+    Plot the GMT timestamp logo.
+
+    >>> import pygmt
+    >>> fig = pygmt.Figure()
+    >>> fig.timestamp()
+    >>> fig.show()
+
+    Plot the GMT timestamp logo with a custom label.
+
+    >>> fig = pygmt.Figure()
+    >>> fig.timestamp(label="Powered by PyGMT")
+    >>> fig.show()
+    """
+    self._preprocess()
+
+    # Build the options passed to the "plot" module
+    kwdict: dict = {"T": True, "U": ""}
+    if label is not None:
+        kwdict["U"] += f"{label}"
+    kwdict["U"] += f"+j{justify}"
+
+    # TODO(GMT>=6.5.0): Remove the patch for upstream bug fixed in GMT 6.5.0.
+    if Version(__gmt_version__) < Version("6.5.0") and "/" not in str(offset):
+        # Giving a single offset doesn't work in GMT < 6.5.0.
+        # See https://github.com/GenericMappingTools/gmt/issues/7107.
+        offset = f"{offset}/{offset}"
+    kwdict["U"] += f"+o{offset}"
+
+    # The +t modifier was added in GMT 6.5.0.
+    # See https://github.com/GenericMappingTools/gmt/pull/7127.
+    if text is not None:
+        if len(str(text)) > 64:
+            msg = (
+                "Argument of 'text' must be no longer than 64 characters. "
+                "The given text string will be truncated to 64 characters."
+            )
+            warnings.warn(message=msg, category=RuntimeWarning, stacklevel=2)
+        # TODO(GMT>=6.5.0): Remove the workaround for the new '+t' modifier.
+        if Version(__gmt_version__) < Version("6.5.0"):
+            # Workaround for GMT<6.5.0 by overriding the 'timefmt' parameter
+            timefmt = text[:64]
+        else:
+            kwdict["U"] += f"+t{text}"
+
+    with Session() as lib:
+        lib.call_module(
+            module="plot",
+            args=build_arg_list(
+                kwdict, confdict={"FONT_LOGO": font, "FORMAT_TIME_STAMP": timefmt}
+            ),
+        )
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/triangulate.html b/v0.14.0/_modules/pygmt/src/triangulate.html new file mode 100644 index 00000000000..f05907f3bfd --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/triangulate.html @@ -0,0 +1,463 @@ + + + + + + + + pygmt.src.triangulate — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.triangulate

+"""
+triangulate - Delaunay triangulation or Voronoi partitioning and gridding of
+Cartesian data.
+"""
+
+from typing import Literal
+
+import numpy as np
+import pandas as pd
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+    validate_output_table_type,
+)
+
+
+
+[docs] +class triangulate: # noqa: N801 + """ + Delaunay triangulation or Voronoi partitioning and gridding of Cartesian data. + + Triangulate reads in x,y[,z] data and performs Delaunay triangulation, + i.e., it finds how the points should be connected to give the most + equilateral triangulation possible. If a map projection (give ``region`` + and ``projection``) is chosen then it is applied before the triangulation + is calculated. By default, the output is triplets of point id numbers that + make up each triangle. The id numbers refer to the points position (line + number, starting at 0 for the first line) in the input file. If ``outgrid`` + and ``spacing`` are set a grid will be calculated based on the surface + defined by the planar triangles. The actual algorithm used in the + triangulations is either that of Watson [1982] or Shewchuk [1996] [Default + is Shewchuk if installed; type ``gmt get GMT_TRIANGULATE`` on the command + line to see which method is selected]. Furthermore, if the Shewchuk + algorithm is installed then you can also perform the calculation of Voronoi + polygons and optionally grid your data via the natural nearest neighbor + algorithm. + + Note + ---- + For geographic data with global or very large extent you should consider + :gmt-docs:`sphtriangulate <sphtriangulate.html>` instead since + ``triangulate`` is a Cartesian or small-geographic area operator and is + unaware of periodic or polar boundary conditions. + """ + +
+[docs] + @staticmethod + @fmt_docstring + @use_alias( + I="spacing", + J="projection", + R="region", + V="verbose", + b="binary", + d="nodata", + e="find", + f="coltypes", + h="header", + i="incols", + r="registration", + s="skiprows", + w="wrap", + ) + @kwargs_to_strings(I="sequence", R="sequence", i="sequence_comma") + def regular_grid( + data=None, x=None, y=None, z=None, outgrid: str | None = None, **kwargs + ) -> xr.DataArray | None: + """ + Delaunay triangle based gridding of Cartesian data. + + Reads in x,y[,z] data and performs Delaunay triangulation, i.e., it + finds how the points should be connected to give the most equilateral + triangulation possible. If a map projection (give ``region`` and + ``projection``) is chosen then it is applied before the triangulation + is calculated. By setting ``outgrid`` and ``spacing``, a grid will be + calculated based on the surface defined by the planar triangles. The + actual algorithm used in the triangulations is either that of Watson + [1982] or Shewchuk [1996] [Default is Shewchuk if installed; type + ``gmt get GMT_TRIANGULATE`` on the command line to see which method is + selected]. This choice is made during the GMT installation. + Furthermore, if the Shewchuk algorithm is installed then you can also + perform the calculation of Voronoi polygons and optionally grid your + data via the natural nearest neighbor algorithm. + + Must provide either ``data`` or ``x``, ``y``, and ``z``. + + Must provide ``region`` and ``spacing``. + + Full option list at :gmt-docs:`triangulate.html` + + {aliases} + + Parameters + ---------- + x/y/z : :class:`numpy.ndarray` + Arrays of x and y coordinates and values z of the data points. + data : str, {table-like} + Pass in (x, y[, z]) or (longitude, latitude[, elevation]) values by + providing a file name to an ASCII data table, a 2-D + {table-classes}. + {projection} + {region} + {spacing} + {outgrid} + The interpolation is performed in the original coordinates, so if + your triangles are close to the poles you are better off projecting + all data to a local coordinate system before using ``triangulate`` + (this is true of all gridding routines) or instead select + :gmt-docs:`sphtriangulate <sphtriangulate.html>`. + {verbose} + {binary} + {nodata} + {find} + {coltypes} + {header} + {incols} + {registration} + {skiprows} + {wrap} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray` if ``outgrid`` is ``None`` [Default] + - ``None`` if ``outgrid`` is a str (grid output is stored in ``outgrid``) + + Note + ---- + For geographic data with global or very large extent you should + consider :gmt-docs:`sphtriangulate <sphtriangulate.html>` instead since + ``triangulate`` is a Cartesian or small-geographic area operator and is + unaware of periodic or polar boundary conditions. + """ + with Session() as lib: + with ( + lib.virtualfile_in( + check_kind="vector", data=data, x=x, y=y, z=z, required_z=False + ) as vintbl, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="triangulate", args=build_arg_list(kwargs, infile=vintbl) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ + +
+[docs] + @staticmethod + @fmt_docstring + @use_alias( + I="spacing", + J="projection", + R="region", + V="verbose", + b="binary", + d="nodata", + e="find", + f="coltypes", + h="header", + i="incols", + r="registration", + s="skiprows", + w="wrap", + ) + @kwargs_to_strings(I="sequence", R="sequence", i="sequence_comma") + def delaunay_triples( + data=None, + x=None, + y=None, + z=None, + *, + output_type: Literal["pandas", "numpy", "file"] = "pandas", + outfile: str | None = None, + **kwargs, + ) -> pd.DataFrame | np.ndarray | None: + """ + Delaunay triangle based gridding of Cartesian data. + + Reads in x,y[,z] data and performs Delaunay triangulation, i.e., it + finds how the points should be connected to give the most equilateral + triangulation possible. If a map projection (give ``region`` and + ``projection``) is chosen then it is applied before the triangulation + is calculated. The actual algorithm used in the triangulations is + either that of Watson [1982] or Shewchuk [1996] [Default if installed; + type ``gmt get GMT_TRIANGULATE`` on the command line to see which + method is selected). + + Must provide either ``data`` or ``x``, ``y``, and ``z``. + + Full option list at :gmt-docs:`triangulate.html` + + {aliases} + + Parameters + ---------- + x/y/z : :class:`numpy.ndarray` + Arrays of x and y coordinates and values z of the data points. + data : str, {table-like} + Pass in (x, y, z) or (longitude, latitude, elevation) values by + providing a file name to an ASCII data table, a 2-D + {table-classes}. + {projection} + {region} + {output_type} + {outfile} + {verbose} + {binary} + {nodata} + {find} + {coltypes} + {header} + {incols} + {skiprows} + {wrap} + + Returns + ------- + ret + Return type depends on ``outfile`` and ``output_type``: + + - ``None`` if ``outfile`` is set (output will be stored in the file set by + ``outfile``) + - :class:`pandas.DataFrame` or :class:`numpy.ndarray` if ``outfile`` is not + set (depends on ``output_type``) + + Note + ---- + For geographic data with global or very large extent you should + consider :gmt-docs:`sphtriangulate <sphtriangulate.html>` instead since + ``triangulate`` is a Cartesian or small-geographic area operator and is + unaware of periodic or polar boundary conditions. + """ + output_type = validate_output_table_type(output_type, outfile=outfile) + + with Session() as lib: + with ( + lib.virtualfile_in( + check_kind="vector", data=data, x=x, y=y, z=z, required_z=False + ) as vintbl, + lib.virtualfile_out(kind="dataset", fname=outfile) as vouttbl, + ): + lib.call_module( + module="triangulate", + args=build_arg_list(kwargs, infile=vintbl, outfile=vouttbl), + ) + return lib.virtualfile_to_dataset(vfname=vouttbl, output_type=output_type)
+
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/velo.html b/v0.14.0/_modules/pygmt/src/velo.html new file mode 100644 index 00000000000..8590c263ca6 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/velo.html @@ -0,0 +1,463 @@ + + + + + + + + pygmt.src.velo — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.velo

+"""
+velo - Plot velocity vectors, crosses, anisotropy bars, and wedges.
+"""
+
+import numpy as np
+import pandas as pd
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    build_arg_list,
+    fmt_docstring,
+    kwargs_to_strings,
+    use_alias,
+)
+
+
+@fmt_docstring
+@use_alias(
+    A="vector",
+    B="frame",
+    C="cmap",
+    D="rescale",
+    E="uncertaintyfill",
+    G="fill",
+    H="scale",
+    I="shading",
+    J="projection",
+    L="line",
+    N="no_clip",
+    R="region",
+    S="spec",
+    V="verbose",
+    W="pen",
+    Z="zvalue",
+    c="panel",
+    d="nodata",
+    e="find",
+    h="header",
+    i="incols",
+    p="perspective",
+    t="transparency",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence")
+def velo(self, data=None, **kwargs):
+    r"""
+    Plot velocity vectors, crosses, anisotropy bars, and wedges.
+
+    Reads data values from files, :class:`numpy.ndarray` or
+    :class:`pandas.DataFrame` and plots the selected geodesy symbol on a map.
+    You may choose from velocity vectors and their uncertainties, rotational
+    wedges and their uncertainties, anisotropy bars, or strain crosses. Symbol
+    fills or their outlines may be colored based on constant parameters or via
+    color lookup tables.
+
+    Must provide ``data`` and ``spec``.
+
+    Full option list at :gmt-docs:`supplements/geodesy/velo.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    data : str, {table-like}
+        Pass in either a file name to an ASCII data table, a 2-D
+        {table-classes}.
+        Note that text columns are only supported with file or
+        :class:`pandas.DataFrame` inputs.
+
+    spec: str
+        Select the meaning of the columns in the data file and the figure to
+        be plotted. In all cases, the scales are in data units per length unit
+        and sizes are in length units (default length unit is controlled by
+        :gmt-term:`PROJ_LENGTH_UNIT` unless **c**, **i**, or **p** is
+        appended).
+
+        - **e**\ [*velscale*/]\ *confidence*\ [**+f**\ *font*]
+
+          Velocity ellipses in (N,E) convention. The *velscale* sets the
+          scaling of the velocity arrows. If *velscale* is not given then we
+          read it from the data file as an extra column. The *confidence* sets
+          the 2-dimensional confidence limit for the ellipse, e.g. 0.95 for 95%
+          confidence ellipse. Use **+f** to set the font and size of the text
+          [Default is 9p,Helvetica,black]; give **+f**\ 0 to deactivate
+          labeling. The arrow will be drawn with the pen attributes specified
+          by the ``pen`` parameter and the arrow-head can be colored via
+          ``fill``. The ellipse will be filled with the color or pattern
+          specified by the ``uncertaintyfill`` parameter [Default is
+          transparent], and its outline will be drawn if ``line`` is selected
+          using the pen selected (by ``pen`` if not given by ``line``).
+          Parameters are expected to be in the following columns:
+
+            - **1**,\ **2**: longitude, latitude of station
+            - **3**,\ **4**: eastward, northward velocity
+            - **5**,\ **6**: uncertainty of eastward, northward velocities
+              (1-sigma)
+            - **7**: correlation between eastward and northward components
+            - **Trailing text**: name of station (optional)
+
+        - **n**\ [*barscale*]
+
+          Anisotropy bars. *barscale* sets the scaling of the bars. If
+          *barscale* is not given then we read it from the data file as an
+          extra column. Parameters are expected to be in the following columns:
+
+            - **1**,\ **2**: longitude, latitude of station
+            - **3**,\ **4**: eastward, northward components of anisotropy
+              vector
+
+        - **r**\ [*velscale*/]\ *confidence*\ [**+f**\ *font*]
+
+          Velocity ellipses in rotated convention. The *velscale* sets the
+          scaling of the velocity arrows. If *velscale* is not given then we
+          read it from the data file as an extra column. The *confidence* sets
+          the 2-dimensional confidence limit for the ellipse, e.g. 0.95 for 95%
+          confidence ellipse. Use **+f** to set the font and size of the text
+          [Default is 9p,Helvetica,black]; give **+f**\ 0 to deactivate
+          labeling. The arrow will be drawn with the pen attributes specified
+          by the ``pen`` parameter and the arrow-head can be colored via
+          ``fill``. The ellipse will be filled with the color or pattern
+          specified by the ``uncertaintyfill`` parameter [Default is
+          transparent], and its outline will be drawn if ``line`` is selected
+          using the pen selected (by ``pen`` if not given by ``line``).
+          Parameters are expected to be in the following columns:
+
+            - **1**,\ **2**: longitude, latitude of station
+            - **3**,\ **4**: eastward, northward velocity
+            - **5**,\ **6**: semi-major, semi-minor axes
+            - **7**: counter-clockwise angle, in degrees, from horizontal axis
+              to major axis of ellipse.
+            - **Trailing text**: name of station (optional)
+
+        - **w**\ [*wedgescale*/]\ *wedgemag*
+
+          Rotational wedges. The *wedgescale* sets the size of the wedges. If
+          *wedgescale* is not given then we read it from the data file as an
+          extra column. Rotation values are multiplied by *wedgemag* before
+          plotting. For example, setting *wedgemag* to 1.e7 works well for
+          rotations of the order of 100 nanoradians/yr. Use ``fill`` to set
+          the fill color or pattern for the wedge, and ``uncertaintyfill`` to
+          set the color or pattern for the uncertainty. Parameters are
+          expected to be in the following columns:
+
+            - **1**,\ **2**: longitude, latitude of station
+            - **3**: rotation in radians
+            - **4**: rotation uncertainty in radians
+
+        - **x**\ [*cross_scale*]
+
+          Strain crosses. The *cross_scale* sets the size of the cross. If
+          *cross_scale* is not given then we read it from the data file as an
+          extra column. Parameters are expected to be in the following columns:
+
+            - **1**,\ **2**: longitude, latitude of station
+            - **3**: eps1, the most extensional eigenvalue of strain tensor,
+              with extension taken positive.
+            - **4**: eps2, the most compressional eigenvalue of strain tensor,
+              with extension taken positive.
+            - **5**: azimuth of eps2 in degrees CW from North.
+
+    {projection}
+    {region}
+    vector : bool or str
+        Modify vector parameters. For vector heads, append vector head *size*
+        [Default is 9p]. See
+        :gmt-docs:`supplements/geodesy/velo.html#vector-attributes` for
+        specifying additional attributes.
+    {frame}
+    {cmap}
+    rescale : str
+        Can be used to rescale the uncertainties of velocities (``spec="e"``
+        and ``spec="r"``) and rotations (``spec="w"``). Can be combined with
+        the ``confidence`` variable.
+    uncertaintyfill : str
+        Set color or pattern for filling uncertainty wedges (``spec="w"``)
+        or velocity error ellipses (``spec="e"`` or ``spec="r"``).
+        If ``uncertaintyfill`` is not specified, the uncertainty regions
+        will be transparent. **Note**: Using ``cmap`` and ``zvalue="+e"``
+        will update the uncertainty fill color based on the selected measure
+        in ``zvalue`` [Default is magnitude error]. More details at
+        :gmt-docs:`reference/features.html#gfill-attrib`.
+    fill : str
+        Set color or pattern for filling symbols [Default is no fill].
+        **Note**: Using ``cmap`` (and optionally ``zvalue``) will update the
+        symbol fill color based on the selected measure in ``zvalue``
+        [Default is magnitude]. More details at
+        :gmt-docs:`reference/features.html#gfill-attrib`.
+    scale : float or bool
+        [*scale*].
+        Scale symbol sizes and pen widths on a per-record basis using the
+        *scale* read from the data set, given as the first column after the
+        (optional) *z* and *size* columns [Default is no scaling]. The symbol
+        size is either provided by ``spec`` or via the input *size* column.
+        Alternatively, append a constant *scale* that should be used instead of
+        reading a scale column.
+    shading : float or bool
+        *intens*.
+        Use the supplied *intens* value (nominally in the -1 to +1 range) to
+        modulate the symbol fill color by simulating illumination [Default is
+        none]. If *intens* is not provided we will instead read the intensity
+        from an extra data column after the required input columns determined
+        by ``spec``.
+    line: str
+        [*pen*\ [**+c**\ [**f**\|\ **l**]]].
+        Draw lines. Ellipses and rotational wedges will have their outlines
+        drawn using the current pen (see ``pen``).  Alternatively, append a
+        separate pen to use for the error outlines. If the modifier **+cl** is
+        appended then the color of the pen is updated from the CPT (see
+        ``cmap``). If instead modifier **+cf** is appended then the color from
+        the cpt file is applied to error fill only [Default]. Use just **+c**
+        to set both pen and fill color.
+    no_clip: bool
+        Do **not** skip symbols that fall outside the frame boundaries
+        [Default is ``False``, i.e., plot symbols inside the frame
+        boundaries only].
+    {verbose}
+    pen : str
+        [*pen*][**+c**\ [**f**\|\ **l**]].
+        Set pen attributes for velocity arrows, ellipse circumference and fault
+        plane edges [Default is ``"0.25p,black,solid"``].
+        If the modifier **+cl** is appended then the color of the pen is
+        updated from the CPT (see ``cmap``). If instead modifier **+cf** is
+        appended then the color from the cpt file is applied to symbol fill
+        only [Default].  Use just **+c** to set both pen and fill color.
+    zvalue : str
+        [**m**\|\ **e**\|\ **n**\|\ **u**\ ][**+e**].
+        Select the quantity that will be used with the CPT given via ``cmap``
+        to set the fill color.  Choose from **m**\ agnitude (vector magnitude
+        or rotation magnitude), **e**\ ast-west velocity, **n**\ orth-south
+        velocity, or **u**\ ser-supplied data column (supplied after the
+        required columns). To instead use the corresponding error estimates
+        (i.e., vector or rotation uncertainty) to lookup the color and paint
+        the error ellipse or wedge instead, append **+e**.
+    {panel}
+    {nodata}
+    {find}
+    {header}
+    {incols}
+    {perspective}
+    {transparency}
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    if kwargs.get("S") is None or (
+        kwargs.get("S") is not None and not isinstance(kwargs["S"], str)
+    ):
+        msg = "The parameter 'spec' is required and has to be a string."
+        raise GMTInvalidInput(msg)
+
+    if isinstance(data, np.ndarray) and not pd.api.types.is_numeric_dtype(data):
+        msg = (
+            "Text columns are not supported with numpy.ndarray type inputs. "
+            "They are only supported with file or pandas.DataFrame inputs."
+        )
+        raise GMTInvalidInput(msg)
+
+    with Session() as lib:
+        with lib.virtualfile_in(check_kind="vector", data=data) as vintbl:
+            lib.call_module(module="velo", args=build_arg_list(kwargs, infile=vintbl))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/vlines.html b/v0.14.0/_modules/pygmt/src/vlines.html new file mode 100644 index 00000000000..f18b43fe16e --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/vlines.html @@ -0,0 +1,337 @@ + + + + + + + + pygmt.src.vlines — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.vlines

+"""
+vlines - Plot vertical lines.
+"""
+
+from collections.abc import Sequence
+
+import numpy as np
+from pygmt.exceptions import GMTInvalidInput
+
+__doctest_skip__ = ["vlines"]
+
+
+def vlines(
+    self,
+    x: float | Sequence[float],
+    ymin: float | Sequence[float] | None = None,
+    ymax: float | Sequence[float] | None = None,
+    pen: str | None = None,
+    label: str | None = None,
+    no_clip: bool = False,
+    perspective: str | bool | None = None,
+):
+    """
+    Plot one or multiple vertical line(s).
+
+    This method is a high-level wrapper around :meth:`pygmt.Figure.plot` that focuses on
+    plotting vertical lines at X-coordinates specified by the ``x`` parameter. The ``x``
+    parameter can be a single value (for a single vertical line) or a sequence of values
+    (for multiple vertical lines).
+
+    By default, the Y-coordinates of the start and end points of the lines are set to be
+    the Y-limits of the current plot, but this can be overridden by specifying the
+    ``ymin`` and ``ymax`` parameters. ``ymin`` and ``ymax`` can be either a single value
+    or a sequence of values. If a single value is provided, it is applied to all lines.
+    If a sequence is provided, the length of ``ymin`` and ``ymax`` must match the length
+    of ``x``.
+
+    The term "vertical" lines can be interpreted differently in different coordinate
+    systems:
+
+    - **Cartesian** coordinate system: lines are plotted as straight lines.
+    - **Polar** projection: lines are plotted as straight lines along radius.
+    - **Geographic** projection: lines are plotted as meridians along constant
+      longitude.
+
+    Parameters
+    ----------
+    x
+        X-coordinates to plot the lines. It can be a single value (for a single line)
+        or a sequence of values (for multiple lines).
+    ymin/ymax
+        Y-coordinates of the start/end point(s) of the line(s). If ``None``, defaults to
+        the Y-limits of the current plot. ``ymin`` and ``ymax`` can either be a single
+        value or a sequence of values. If a single value is provided, it is applied to
+        all lines. If a sequence is provided, the length of ``ymin`` and ``ymax`` must
+        match the length of ``x``.
+    pen
+        Pen attributes for the line(s), in the format of *width,color,style*.
+    label
+        Label for the line(s), to be displayed in the legend.
+    no_clip
+        If ``True``, do not clip lines outside the plot region. Only makes sense in the
+        Cartesian coordinate system.
+    perspective
+        Select perspective view and set the azimuth and elevation angle of the
+        viewpoint. Refer to :meth:`pygmt.Figure.plot` for details.
+
+    Examples
+    --------
+    >>> import pygmt
+    >>> fig = pygmt.Figure()
+    >>> fig.basemap(region=[0, 10, 0, 10], projection="X10c/10c", frame=True)
+    >>> fig.vlines(x=1, pen="1p,black", label="Line at x=1")
+    >>> fig.vlines(x=2, ymin=2, ymax=8, pen="1p,red,-", label="Line at x=2")
+    >>> fig.vlines(x=[3, 4], ymin=3, ymax=7, pen="1p,black,.", label="Lines at x=3,4")
+    >>> fig.vlines(x=[5, 6], ymin=4, ymax=9, pen="1p,red", label="Lines at x=5,6")
+    >>> fig.vlines(
+    ...     x=[7, 8], ymin=[0, 1], ymax=[7, 8], pen="1p,blue", label="Lines at x=7,8"
+    ... )
+    >>> fig.legend()
+    >>> fig.show()
+    """
+    self._preprocess()
+
+    # Determine the y limits from the current plot region if not specified.
+    if ymin is None or ymax is None:
+        ylimits = self.region[2:]
+        if ymin is None:
+            ymin = ylimits[0]
+        if ymax is None:
+            ymax = ylimits[1]
+
+    # Ensure x/ymin/ymax are 1-D arrays.
+    _x = np.atleast_1d(x)
+    _ymin = np.atleast_1d(ymin)
+    _ymax = np.atleast_1d(ymax)
+
+    nlines = len(_x)  # Number of lines to plot.
+
+    # Check if ymin/ymax are scalars or have the expected length.
+    if _ymin.size not in {1, nlines} or _ymax.size not in {1, nlines}:
+        msg = (
+            f"'ymin' and 'ymax' are expected to be scalars or have lengths '{nlines}', "
+            f"but lengths '{_ymin.size}' and '{_ymax.size}' are given."
+        )
+        raise GMTInvalidInput(msg)
+
+    # Repeat ymin/ymax to match the length of x if they are scalars.
+    if nlines != 1:
+        if _ymin.size == 1:
+            _ymin = np.repeat(_ymin, nlines)
+        if _ymax.size == 1:
+            _ymax = np.repeat(_ymax, nlines)
+
+    # Call the Figure.plot method to plot the lines.
+    for i in range(nlines):
+        # Special handling for label.
+        # 1. Only specify a label when plotting the first line.
+        # 2. The -l option can accept comma-separated labels for labeling multiple lines
+        #    with auto-coloring enabled. We don't need this feature here, so we need to
+        #    replace comma with \054 if the label contains commas.
+        _label = label.replace(",", "\\054") if label and i == 0 else None
+
+        self.plot(
+            x=[_x[i], _x[i]],
+            y=[_ymin[i], _ymax[i]],
+            pen=pen,
+            label=_label,
+            no_clip=no_clip,
+            perspective=perspective,
+            straight_line="y",
+        )
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/which.html b/v0.14.0/_modules/pygmt/src/which.html new file mode 100644 index 00000000000..d6fb18be07f --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/which.html @@ -0,0 +1,284 @@ + + + + + + + + pygmt.src.which — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.which

+"""
+which - Find the full path to specified files.
+"""
+
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, is_nonstr_iter, use_alias
+
+
+
+[docs] +@fmt_docstring +@use_alias(G="download", V="verbose") +def which(fname, **kwargs) -> str | list[str]: + r""" + Find the full path to specified files. + + Reports the full paths to the files given through ``fname``. We look + for the file in (1) the current directory, (2) in $GMT_USERDIR (if + defined), (3) in $GMT_DATADIR (if defined), or (4) in $GMT_CACHEDIR + (if defined). + + ``fname`` can also be a downloadable file (either a complete URL, an + @file for downloading from the GMT data server, or any of the remote + datasets at https://www.pygmt.org/latest/api/index.html#datasets). + In these cases, use the ``download`` parameter to set the desired + behavior. If ``download`` is not used (or ``False``), the file will + not be found. + + Full option list at :gmt-docs:`gmtwhich.html` + + {aliases} + + Parameters + ---------- + fname : str or list + One or more file names of any data type (grids, tables, etc.). + download : bool or str + [**a**\|\ **c**\|\ **l**\|\ **u**]. + If the ``fname`` argument is a downloadable file (either a complete + URL, an @file for downloading from the GMT data server, or any of + the remote datasets at + https://www.pygmt.org/latest/api/index.html#datasets) + we will try to download the file if it is not found in your local + data or cache directories. If set to ``True`` or **l** is passed + the file is downloaded to the current directory. Use **a** to place + files in the appropriate folder under the user directory (this is + where GMT normally places downloaded files), **c** to place it in + the user cache directory, or **u** for the user data directory + instead (i.e., ignoring any subdirectory structure). + {verbose} + + Returns + ------- + path + The path(s) to the file(s), depending on the parameters used. + + Raises + ------ + FileNotFoundError + If the file is not found. + """ + with Session() as lib: + with lib.virtualfile_out(kind="dataset") as vouttbl: + lib.call_module( + module="which", + args=build_arg_list(kwargs, infile=fname, outfile=vouttbl), + ) + paths = lib.virtualfile_to_dataset(vfname=vouttbl, output_type="strings") + + match paths.size: + case 0: + _fname = "', '".join(fname) if is_nonstr_iter(fname) else fname + msg = f"File(s) '{_fname}' not found." + raise FileNotFoundError(msg) + case 1: + return paths[0] + case _: + return paths.tolist()
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/wiggle.html b/v0.14.0/_modules/pygmt/src/wiggle.html new file mode 100644 index 00000000000..8e2bafa70a2 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/wiggle.html @@ -0,0 +1,318 @@ + + + + + + + + pygmt.src.wiggle — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.wiggle

+"""
+wiggle - Plot z=f(x,y) anomalies along tracks.
+"""
+
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+
+@fmt_docstring
+@use_alias(
+    B="frame",
+    D="position",
+    J="projection",
+    R="region",
+    T="track",
+    V="verbose",
+    W="pen",
+    Z="scale",
+    b="binary",
+    c="panel",
+    d="nodata",
+    e="find",
+    f="coltypes",
+    g="gap",
+    h="header",
+    i="incols",
+    p="perspective",
+    t="transparency",
+    w="wrap",
+)
+@kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence")
+def wiggle(
+    self,
+    data=None,
+    x=None,
+    y=None,
+    z=None,
+    fillpositive=None,
+    fillnegative=None,
+    **kwargs,
+):
+    r"""
+    Plot z=f(x,y) anomalies along tracks.
+
+    Takes a matrix, (x, y, z) triplets, or a file name as input and plots z
+    as a function of distance along track.
+
+    Must provide either ``data`` or ``x``, ``y``, and ``z``.
+
+    Full option list at :gmt-docs:`wiggle.html`
+
+    {aliases}
+
+    Parameters
+    ----------
+    x/y/z : 1-D arrays
+        The arrays of x and y coordinates and z data points.
+    data : str, {table-like}
+        Pass in either a file name to an ASCII data table, a 2-D
+        {table-classes}.
+        Use parameter ``incols`` to choose which columns are x, y, z,
+        respectively.
+    {projection}
+    {region}
+    scale : str or float
+        Give anomaly scale in data-units/distance-unit. Append **c**, **i**,
+        or **p** to indicate the distance unit (centimeters, inches, or
+        points); if no unit is given we use the default unit that is
+        controlled by :gmt-term:`PROJ_LENGTH_UNIT`.
+    {frame}
+    position : str
+        [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
+        **+w**\ *length*\ [**+j**\ *justify*]\ [**+al**\|\ **r**]\
+        [**+o**\ *dx*\ [/*dy*]][**+l**\ [*label*]].
+        Define the reference point on the map for the vertical scale bar.
+    fillpositive : str
+        Set color or pattern for filling positive wiggles
+        [Default is no fill].
+    fillnegative : str
+        Set color or pattern for filling negative wiggles
+        [Default is no fill].
+    track : str
+        Draw track [Default is no track]. Append pen attributes to use
+        [Default is ``"0.25p,black,solid"``].
+    {verbose}
+    pen : str
+        Specify outline pen attributes [Default is no outline].
+    {binary}
+    {panel}
+    {nodata}
+    {find}
+    {coltypes}
+    {gap}
+    {header}
+    {incols}
+    {perspective}
+    {transparency}
+    {wrap}
+    """
+    kwargs = self._preprocess(**kwargs)
+
+    if fillpositive or fillnegative:
+        kwargs["G"] = []
+        if fillpositive:
+            kwargs["G"].append(fillpositive + "+p")
+        if fillnegative:
+            kwargs["G"].append(fillnegative + "+n")
+
+    with Session() as lib:
+        with lib.virtualfile_in(
+            check_kind="vector", data=data, x=x, y=y, z=z, required_z=True
+        ) as vintbl:
+            lib.call_module(module="wiggle", args=build_arg_list(kwargs, infile=vintbl))
+
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/x2sys_cross.html b/v0.14.0/_modules/pygmt/src/x2sys_cross.html new file mode 100644 index 00000000000..cd744fb5775 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/x2sys_cross.html @@ -0,0 +1,464 @@ + + + + + + + + pygmt.src.x2sys_cross — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.x2sys_cross

+"""
+x2sys_cross - Calculate crossovers between track data files.
+"""
+
+import contextlib
+import os
+from pathlib import Path
+from typing import Any
+
+import pandas as pd
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import (
+    build_arg_list,
+    data_kind,
+    fmt_docstring,
+    kwargs_to_strings,
+    unique_name,
+    use_alias,
+)
+
+
+@contextlib.contextmanager
+def tempfile_from_dftrack(track, suffix):
+    """
+    Saves :class:`pandas.DataFrame` track table to a temporary tab-separated ASCII text
+    file with a unique name (to prevent clashes when running x2sys_cross), adding a
+    suffix extension to the end.
+
+    Parameters
+    ----------
+    track : :class:`pandas.DataFrame`
+        A table holding track data with coordinate (x, y) or (lon, lat) values,
+        and (optionally) time (t).
+    suffix : str
+        File extension, e.g. xyz, tsv, etc.
+
+    Yields
+    ------
+    tmpfilename : str
+        A temporary tab-separated value file with a unique name holding the
+        track data. E.g. "track-1a2b3c4.tsv".
+    """
+    try:
+        tmpfilename = f"track-{unique_name()[:7]}.{suffix}"
+        track.to_csv(
+            path_or_buf=tmpfilename,
+            sep="\t",
+            index=False,
+            na_rep="NaN",  # write a NaN value explicitly instead of a blank string
+            date_format="%Y-%m-%dT%H:%M:%S.%fZ",  # ISO8601 format
+        )
+        yield tmpfilename
+    finally:
+        Path(tmpfilename).unlink()
+
+
+
+[docs] +@fmt_docstring +@use_alias( + A="combitable", + C="runtimes", + D="override", + I="interpolation", + R="region", + S="speed", + T="tag", + Q="coe", + V="verbose", + W="numpoints", + Z="trackvalues", +) +@kwargs_to_strings(R="sequence") +def x2sys_cross( + tracks=None, outfile: str | None = None, **kwargs +) -> pd.DataFrame | None: + r""" + Calculate crossovers between track data files. + + Determines all intersections between ("external cross-overs") or within + ("internal cross-overs") tracks (Cartesian or geographic), and report the + time, position, distance along track, heading and speed along each track + segment, and the crossover error (COE) and mean values for all observables. + By default, :func:`pygmt.x2sys_cross` will look for both external and + internal COEs. As an option, you may choose to project all data using one + of the map projections prior to calculating the COE. + + Full option list at :gmt-docs:`supplements/x2sys/x2sys_cross.html` + + {aliases} + + Parameters + ---------- + tracks : :class:`pandas.DataFrame`, str, or list + A table or a list of tables with (x, y) or (lon, lat) values in the + first two columns. Track(s) can be provided as :class:`pandas.DataFrame` tables + or file names. Supported file formats are ASCII, native binary, or + COARDS netCDF 1-D data. More columns may also be present. + + If the file names are missing their file extension, we will append the suffix + specified for this TAG. Track files will be searched for first in the current + directory and second in all directories listed in $X2SYS_HOME/TAG/TAG_paths.txt + (if it exists). [If environment variable :term:`X2SYS_HOME` is not set it will + default to $GMT_SHAREDIR/x2sys]. (**Note**: MGD77 files will also be looked for + via $MGD77_HOME/mgd77_paths.txt and .gmt files will be searched for via + $GMT_SHAREDIR/mgg/gmtfile_paths). + + outfile + The file name for the output ASCII txt file to store the table in. + tag : str + Specify the x2sys TAG which identifies the attributes of this data + type. + + combitable : str + Only process the pair-combinations found in the file *combitable* + [Default process all possible combinations among the specified files]. + The file *combitable* is created by :gmt-docs:`x2sys_get's -L option + <supplements/x2sys/x2sys_get.html#l>`. + + runtimes : bool or str + Compute and append the processing run-time for each pair to the + progress message (use ``runtimes=True``). Pass in a file name (e.g. + ``runtimes="file.txt"``) to save these run-times to file. The idea here + is to use the knowledge of run-times to split the main process in a + number of sub-processes that can each be launched in a different + processor of your multi-core machine. See the MATLAB function + `split_file4coes.m + <https://github.com/GenericMappingTools/gmt/blob/master/src/x2sys/>`_. + + override : bool or str + **S**\|\ **N**. + Control how geographic coordinates are handled (Cartesian data are + unaffected). By default, we determine if the data are closer to one + pole than the other, and then we use a cylindrical polar conversion to + avoid problems with longitude jumps. You can turn this off entirely + with ``override`` and then the calculations uses the original data (we + have protections against longitude jumps). However, you can force the + selection of the pole for the projection by appending **S** or **N** + for the south or north pole, respectively. The conversion is used + because the algorithm used to find crossovers is inherently a + Cartesian algorithm that can run into trouble with data that has large + longitudinal range at higher latitudes. + + interpolation : str + **l**\|\ **a**\|\ **c**. + Sets the interpolation mode for estimating values at the crossover. + Choose among: + + - **l** - Linear interpolation [Default]. + - **a** - Akima spline interpolation. + - **c** - Cubic spline interpolation. + + coe : str + Use **e** for external COEs only, and **i** for internal COEs only + [Default is all COEs]. + + {region} + + speed : str or list + **l**\|\ **u**\|\ **h**\ *speed*. + Defines window of track speeds. If speeds are outside this window we do + not calculate a COE. Specify: + + - **l** sets lower speed [Default is 0]. + - **u** sets upper speed [Default is infinity]. + - **h** does not limit the speed but sets a lower speed below which + headings will not be computed (i.e., set to NaN) [Default + calculates headings regardless of speed]. + + For example, you can use ``speed=["l0", "u10", "h5"]`` to set a lower + speed of 0, upper speed of 10, and disable heading calculations for + speeds below 5. + + {verbose} + + numpoints : int + Give the maximum number of data points on either side of the crossover + to use in the spline interpolation [Default is 3]. + + trackvalues : bool + Report the values of each track at the crossover [Default reports the + crossover value and the mean value]. + + Returns + ------- + crossover_errors + Table containing crossover error information. A :class:`pandas.DataFrame` object + is returned if ``outfile`` is not set, otherwise ``None`` is returned and output + will be stored in file set by ``outfile``. + """ + # Determine output type based on 'outfile' parameter + output_type = "pandas" if outfile is None else "file" + + file_contexts: list[contextlib.AbstractContextManager[Any]] = [] + for track in tracks: + match data_kind(track): + case "file": + file_contexts.append(contextlib.nullcontext(track)) + case "vectors": + # find suffix (-E) of trackfiles used (e.g. xyz, csv, etc) from + # $X2SYS_HOME/TAGNAME/TAGNAME.tag file + tagfile = Path( + os.environ["X2SYS_HOME"], kwargs["T"], f"{kwargs['T']}.tag" + ) + # Last line is like "-Dxyz -Etsv -I1/1" + lastline = tagfile.read_text(encoding="utf8").splitlines()[-1] + for item in sorted(lastline.split()): # sort list alphabetically + if item.startswith(("-E", "-D")): # prefer -Etsv over -Dxyz + suffix = item[2:] # e.g. tsv (1st choice) or xyz (2nd choice) + + # Save pandas.DataFrame track data to temporary file + file_contexts.append(tempfile_from_dftrack(track=track, suffix=suffix)) + case _: + msg = f"Unrecognized data type: {type(track)}." + raise GMTInvalidInput(msg) + + with Session() as lib: + with lib.virtualfile_out(kind="dataset", fname=outfile) as vouttbl: + with contextlib.ExitStack() as stack: + fnames = [stack.enter_context(c) for c in file_contexts] + lib.call_module( + module="x2sys_cross", + args=build_arg_list(kwargs, infile=fnames, outfile=vouttbl), + ) + result = lib.virtualfile_to_dataset( + vfname=vouttbl, output_type=output_type, header=2 + ) + + if output_type == "file": + return result + + # Convert 3rd and 4th columns to datetime/timedelta for pandas output. + # These two columns have names "t_1"/"t_2" or "i_1"/"i_2". + # "t_" means absolute datetimes and "i_" means dummy times. + # Internally, they are all represented as double-precision numbers in GMT, + # relative to TIME_EPOCH with the unit defined by TIME_UNIT. + # In GMT, TIME_UNIT can be 'y' (year), 'o' (month), 'w' (week), 'd' (day), + # 'h' (hour), 'm' (minute), 's' (second). Years are 365.2425 days and months + # are of equal length. + # pd.to_timedelta() supports unit of 'W'/'D'/'h'/'m'/'s'/'ms'/'us'/'ns'. + match time_unit := lib.get_default("TIME_UNIT"): + case "y": + unit = "s" + scale = 365.2425 * 86400.0 + case "o": + unit = "s" + scale = 365.2425 / 12.0 * 86400.0 + case "w" | "d" | "h" | "m" | "s": + unit = time_unit.upper() if time_unit in "wd" else time_unit + scale = 1.0 + + columns = result.columns[2:4] + result[columns] *= scale + result[columns] = result[columns].apply(pd.to_timedelta, unit=unit) + if columns[0][0] == "t": # "t" or "i": + result[columns] += pd.Timestamp(lib.get_default("TIME_EPOCH")) + return result
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/x2sys_init.html b/v0.14.0/_modules/pygmt/src/x2sys_init.html new file mode 100644 index 00000000000..b86edbccf06 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/x2sys_init.html @@ -0,0 +1,322 @@ + + + + + + + + pygmt.src.x2sys_init — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.x2sys_init

+"""
+x2sys_init - Initialize a new x2sys track database.
+"""
+
+from pygmt.clib import Session
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+
+
+[docs] +@fmt_docstring +@use_alias( + D="fmtfile", + E="suffix", + F="force", + G="discontinuity", + I="spacing", + N="units", + R="region", + V="verbose", + W="gap", + j="distcalc", +) +@kwargs_to_strings(I="sequence", R="sequence") +def x2sys_init(tag, **kwargs): + r""" + Initialize a new x2sys track database. + + Serves as the starting point for x2sys and initializes a set of data bases + that are particular to one kind of track data. These data, their associated + data bases, and key parameters are given a short-hand notation called an + x2sys TAG. The TAG keeps track of settings such as file format, whether the + data are geographic or not, and the binning resolution for track indices. + + Before you can run :func:`pygmt.x2sys_init` you must set the environment variable + :term:`X2SYS_HOME` to a directory where you have write permission, which is where + x2sys can keep track of your settings. + + Full option list at :gmt-docs:`supplements/x2sys/x2sys_init.html` + + {aliases} + + Parameters + ---------- + tag : str + The unique name of this data type x2sys TAG. + + fmtfile : str + Format definition file prefix for this data set (see + :gmt-docs:`GMT's Format Definition Files + <supplements/x2sys/x2sys_init.html#format-definition-files>` + for more information). Specify full path if the file is not in the + current directory. + + Some file formats already have definition files premade. These include: + + - **mgd77** (for plain ASCII MGD77 data files) + - **mgd77+** (for enhanced MGD77+ netCDF files) + - **gmt** (for old mgg supplement binary files) + - **xy** (for plain ASCII x, y tables) + - **xyz** (same, with one z-column) + - **geo** (for plain ASCII longitude, latitude files) + - **geoz** (same, with one z-column). + + suffix : str + Specify the file extension (suffix) for these data files. If not + given we use the format definition file prefix as the suffix (see + ``fmtfile``). + + discontinuity : str + **d**\|\ **g**. + Select geographical coordinates. Append **d** for discontinuity at the + Dateline (makes longitude go from -180° E to +180° E) or **g** for + discontinuity at Greenwich (makes longitude go from 0° E to 360° E + [Default]). If not given we assume the data are Cartesian. + + spacing : str or list + *dx*\[/*dy*]. + *dx* and optionally *dy* is the grid spacing. Append **m** to + indicate minutes or **s** to indicate seconds for geographic data. + These spacings refer to the binning used in the track bin-index data + base. + + units : str or list + **d**\|\ **s**\ *unit*. + Set the units used for distance and speed when requested by other + programs. Append **d** for distance or **s** for speed, then give the + desired *unit* as: + + - **c** - Cartesian userdist or userdist/usertime + - **e** - meters or m/s + - **f** - feet or ft/s + - **k** - kilometers or km/hr + - **m** - miles or mi/hr + - **n** - nautical miles or knots + - **u** - survey feet or sft/s + + [Default is ``units=["dk", "se"]`` (km and m/s) if ``discontinuity`` is + set, and ``units=["dc", "sc"]`` otherwise (e.g., for Cartesian units)]. + + {region} + {verbose} + + gap : str or list + **t**\|\ **d**\ *gap*. + Give **t** or **d** and append the corresponding maximum time gap (in + user units; this is typically seconds [Default is infinity]), or + distance (for units, see ``units``) gap [Default is infinity]) allowed + between the two data points immediately on either side of a crossover. + If these limits are exceeded then a data gap is assumed and no COE will + be determined. + + {distcalc} + """ + with Session() as lib: + lib.call_module(module="x2sys_init", args=build_arg_list(kwargs, infile=tag))
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_modules/pygmt/src/xyz2grd.html b/v0.14.0/_modules/pygmt/src/xyz2grd.html new file mode 100644 index 00000000000..8f2792aefd2 --- /dev/null +++ b/v0.14.0/_modules/pygmt/src/xyz2grd.html @@ -0,0 +1,368 @@ + + + + + + + + pygmt.src.xyz2grd — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +

Source code for pygmt.src.xyz2grd

+"""
+xyz2grd - Convert data table to a grid.
+"""
+
+import xarray as xr
+from pygmt.clib import Session
+from pygmt.exceptions import GMTInvalidInput
+from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
+
+__doctest_skip__ = ["xyz2grd"]
+
+
+
+[docs] +@fmt_docstring +@use_alias( + A="duplicate", + I="spacing", + J="projection", + R="region", + V="verbose", + Z="convention", + b="binary", + d="nodata", + e="find", + f="coltypes", + h="header", + i="incols", + r="registration", + w="wrap", +) +@kwargs_to_strings(I="sequence", R="sequence") +def xyz2grd( + data=None, x=None, y=None, z=None, outgrid: str | None = None, **kwargs +) -> xr.DataArray | None: + r""" + Create a grid file from table data. + + Reads one or more tables with *x, y, z* columns and creates a binary grid + file. :func:`pygmt.xyz2grd` will report if some of the nodes are not filled + in with data. Such unconstrained nodes are set to a value specified by the + user [Default is NaN]. Nodes with more than one value will be set to the + mean value. + + Full option list at :gmt-docs:`xyz2grd.html` + + {aliases} + + Parameters + ---------- + data : str, {table-like} + Pass in (x, y, z) or (longitude, latitude, elevation) values by + providing a file name to an ASCII data table, a 2-D {table-classes}. + x/y/z : 1-D arrays + The arrays of x and y coordinates and z data points. + {outgrid} + duplicate : str + [**d**\|\ **f**\|\ **l**\|\ **m**\|\ **n**\|\ + **r**\|\ **S**\|\ **s**\|\ **u**\|\ **z**]. + By default we will calculate mean values if multiple entries fall on + the same node. Use ``duplicate`` to change this behavior, except it is + ignored if ``convention`` is given. Append **f** or **s** to simply + keep the first or last data point that was assigned to each node. + Append **l** or **u** or **d** to find the lowest (minimum) or upper + (maximum) value or the difference between the maximum and minimum + values at each node, respectively. Append **m** or **r** or **S** to + compute mean or RMS value or standard deviation at each node, + respectively. Append **n** to simply count the number of data points + that were assigned to each node (this only requires two input columns + *x* and *y* as *z* is not consulted). Append **z** to sum multiple + values that belong to the same node. + {spacing} + {projection} + {region} + {verbose} + convention : str + [*flags*]. + Read a 1-column ASCII [or binary] table. This assumes that all the + nodes are present and sorted according to specified ordering + convention contained in *flags*. If incoming data represents rows, + make *flags* start with **T**\ (op) if first row is y + = ymax or **B**\ (ottom) if first row is y = ymin. + Then, append **L** or **R** to indicate that first element is at + left or right end of row. Likewise for column formats: start with + **L** or **R** to position first column, and then append **T** or + **B** to position first element in a row. **Note**: These two + row/column indicators are only required for grids; for other tables + they do not apply. For gridline registered grids: If data are periodic + in x but the incoming data do not contain the (redundant) column at + x = xmax, append **x**. For data periodic in y without redundant row at + y = ymax, append **y**. Append **s**\ *n* to skip the first *n* number + of bytes (probably a header). If the byte-order or the words needs + to be swapped, append **w**. Select one of several data types (all + binary except **a**): + + - **A** ASCII representation of one or more floating point values per + record + - **a** ASCII representation of a single item per record + - **c** int8_t, signed 1-byte character + - **u** uint8_t, unsigned 1-byte character + - **h** int16_t, signed 2-byte integer + - **H** uint16_t, unsigned 2-byte integer + - **i** int32_t, signed 4-byte integer + - **I** uint32_t, unsigned 4-byte integer + - **l** int64_t, long (8-byte) integer + - **L** uint64_t, unsigned long (8-byte) integer + - **f** 4-byte floating point single precision + - **d** 8-byte floating point double precision + + [Default format is scanline orientation of ASCII numbers: **La**]. + The difference between **A** and **a** is that the latter can decode + both *date*\ **T**\ *clock* and *ddd:mm:ss[.xx]* formats but expects + each input record to have a single value, while the former can handle + multiple values per record but can only parse regular floating point + values. Translate incoming *z*-values via the ``incols`` parameter. + {binary} + {nodata} + {find} + {coltypes} + {header} + {incols} + {registration} + {wrap} + + Returns + ------- + ret + Return type depends on whether the ``outgrid`` parameter is set: + + - :class:`xarray.DataArray`: if ``outgrid`` is not set + - None if ``outgrid`` is set (grid output will be stored in file set by + ``outgrid``) + + Example + ------- + >>> import numpy as np + >>> import pygmt + >>> # generate a grid for z=x**2+y**2, with an x-range of 0 to 3, + >>> # and a y-range of 10.5 to 12.5. The x- and y-spacings are 1.0 and 0.5. + >>> x, y = np.meshgrid([0, 1, 2, 3], [10.5, 11.0, 11.5, 12.0, 12.5]) + >>> z = x**2 + y**2 + >>> xx, yy, zz = x.flatten(), y.flatten(), z.flatten() + >>> grid = pygmt.xyz2grd( + ... x=xx, y=yy, z=zz, spacing=(1.0, 0.5), region=[0, 3, 10, 13] + ... ) + """ + if kwargs.get("I") is None or kwargs.get("R") is None: + msg = "Both 'region' and 'spacing' must be specified." + raise GMTInvalidInput(msg) + + with Session() as lib: + with ( + lib.virtualfile_in( + check_kind="vector", data=data, x=x, y=y, z=z, required_z=True + ) as vintbl, + lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd, + ): + kwargs["G"] = voutgrd + lib.call_module( + module="xyz2grd", args=build_arg_list(kwargs, infile=vintbl) + ) + return lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.basemap.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.basemap.rst.txt new file mode 100644 index 00000000000..53e29d912b7 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.basemap.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.basemap +==================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.basemap + +.. minigallery:: pygmt.Figure.basemap + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.coast.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.coast.rst.txt new file mode 100644 index 00000000000..94c852e95bc --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.coast.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.coast +================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.coast + +.. minigallery:: pygmt.Figure.coast + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.colorbar.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.colorbar.rst.txt new file mode 100644 index 00000000000..a96f0820dee --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.colorbar.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.colorbar +===================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.colorbar + +.. minigallery:: pygmt.Figure.colorbar + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.contour.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.contour.rst.txt new file mode 100644 index 00000000000..4b19409fb73 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.contour.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.contour +==================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.contour + +.. minigallery:: pygmt.Figure.contour + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.grdcontour.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.grdcontour.rst.txt new file mode 100644 index 00000000000..795179e51bb --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.grdcontour.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.grdcontour +======================= + +.. currentmodule:: pygmt + +.. automethod:: Figure.grdcontour + +.. minigallery:: pygmt.Figure.grdcontour + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.grdimage.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.grdimage.rst.txt new file mode 100644 index 00000000000..b94611454f6 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.grdimage.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.grdimage +===================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.grdimage + +.. minigallery:: pygmt.Figure.grdimage + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.grdview.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.grdview.rst.txt new file mode 100644 index 00000000000..cf83b083f1e --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.grdview.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.grdview +==================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.grdview + +.. minigallery:: pygmt.Figure.grdview + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.histogram.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.histogram.rst.txt new file mode 100644 index 00000000000..36340db8473 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.histogram.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.histogram +====================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.histogram + +.. minigallery:: pygmt.Figure.histogram + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.hlines.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.hlines.rst.txt new file mode 100644 index 00000000000..d7e86528f69 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.hlines.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.hlines +=================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.hlines + +.. minigallery:: pygmt.Figure.hlines + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.image.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.image.rst.txt new file mode 100644 index 00000000000..583b24343eb --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.image.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.image +================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.image + +.. minigallery:: pygmt.Figure.image + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.inset.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.inset.rst.txt new file mode 100644 index 00000000000..d73fa2cc5e0 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.inset.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.inset +================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.inset + +.. minigallery:: pygmt.Figure.inset + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.legend.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.legend.rst.txt new file mode 100644 index 00000000000..a70eca4abf9 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.legend.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.legend +=================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.legend + +.. minigallery:: pygmt.Figure.legend + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.logo.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.logo.rst.txt new file mode 100644 index 00000000000..e46f739f401 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.logo.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.logo +================= + +.. currentmodule:: pygmt + +.. automethod:: Figure.logo + +.. minigallery:: pygmt.Figure.logo + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.meca.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.meca.rst.txt new file mode 100644 index 00000000000..3982356ec62 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.meca.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.meca +================= + +.. currentmodule:: pygmt + +.. automethod:: Figure.meca + +.. minigallery:: pygmt.Figure.meca + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.plot.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.plot.rst.txt new file mode 100644 index 00000000000..e431c13e9c3 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.plot.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.plot +================= + +.. currentmodule:: pygmt + +.. automethod:: Figure.plot + +.. minigallery:: pygmt.Figure.plot + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.plot3d.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.plot3d.rst.txt new file mode 100644 index 00000000000..31a5ce7de20 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.plot3d.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.plot3d +=================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.plot3d + +.. minigallery:: pygmt.Figure.plot3d + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.psconvert.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.psconvert.rst.txt new file mode 100644 index 00000000000..ce8a7a52c65 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.psconvert.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.psconvert +====================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.psconvert + +.. minigallery:: pygmt.Figure.psconvert + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.rose.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.rose.rst.txt new file mode 100644 index 00000000000..a1d826462a6 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.rose.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.rose +================= + +.. currentmodule:: pygmt + +.. automethod:: Figure.rose + +.. minigallery:: pygmt.Figure.rose + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.rst.txt new file mode 100644 index 00000000000..02034ee77b3 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.rst.txt @@ -0,0 +1,155 @@ +pygmt.Figure +============ + +.. currentmodule:: pygmt + +.. autoclass:: Figure + + +.. rubric:: Attributes + + +.. autoproperty:: + Figure.region + + + + +.. rubric:: Methods Summary + +.. autosummary:: + + + + + Figure.basemap + + + + Figure.coast + + + + Figure.colorbar + + + + Figure.contour + + + + Figure.grdcontour + + + + Figure.grdimage + + + + Figure.grdview + + + + Figure.histogram + + + + Figure.hlines + + + + Figure.image + + + + Figure.inset + + + + Figure.legend + + + + Figure.logo + + + + Figure.meca + + + + Figure.plot + + + + Figure.plot3d + + + + Figure.psconvert + + + + Figure.rose + + + + Figure.savefig + + + + Figure.set_panel + + + + Figure.shift_origin + + + + Figure.show + + + + Figure.solar + + + + Figure.subplot + + + + Figure.ternary + + + + Figure.text + + + + Figure.tilemap + + + + Figure.timestamp + + + + Figure.velo + + + + Figure.vlines + + + + Figure.wiggle + + + + +.. minigallery:: pygmt.Figure + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.savefig.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.savefig.rst.txt new file mode 100644 index 00000000000..906b37f08a2 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.savefig.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.savefig +==================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.savefig + +.. minigallery:: pygmt.Figure.savefig + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.set_panel.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.set_panel.rst.txt new file mode 100644 index 00000000000..2e06f8501fc --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.set_panel.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.set\_panel +======================= + +.. currentmodule:: pygmt + +.. automethod:: Figure.set_panel + +.. minigallery:: pygmt.Figure.set_panel + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.shift_origin.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.shift_origin.rst.txt new file mode 100644 index 00000000000..f4c2e2ecdff --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.shift_origin.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.shift\_origin +========================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.shift_origin + +.. minigallery:: pygmt.Figure.shift_origin + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.show.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.show.rst.txt new file mode 100644 index 00000000000..6074fd55eac --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.show.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.show +================= + +.. currentmodule:: pygmt + +.. automethod:: Figure.show + +.. minigallery:: pygmt.Figure.show + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.solar.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.solar.rst.txt new file mode 100644 index 00000000000..6fe4a5faa9b --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.solar.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.solar +================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.solar + +.. minigallery:: pygmt.Figure.solar + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.subplot.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.subplot.rst.txt new file mode 100644 index 00000000000..d53253c9555 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.subplot.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.subplot +==================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.subplot + +.. minigallery:: pygmt.Figure.subplot + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.ternary.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.ternary.rst.txt new file mode 100644 index 00000000000..8a118bdd59c --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.ternary.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.ternary +==================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.ternary + +.. minigallery:: pygmt.Figure.ternary + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.text.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.text.rst.txt new file mode 100644 index 00000000000..ed08be7bbed --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.text.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.text +================= + +.. currentmodule:: pygmt + +.. automethod:: Figure.text + +.. minigallery:: pygmt.Figure.text + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.tilemap.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.tilemap.rst.txt new file mode 100644 index 00000000000..a22d12e69ed --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.tilemap.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.tilemap +==================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.tilemap + +.. minigallery:: pygmt.Figure.tilemap + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.timestamp.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.timestamp.rst.txt new file mode 100644 index 00000000000..0d0d78c992e --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.timestamp.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.timestamp +====================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.timestamp + +.. minigallery:: pygmt.Figure.timestamp + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.velo.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.velo.rst.txt new file mode 100644 index 00000000000..ba00f440b07 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.velo.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.velo +================= + +.. currentmodule:: pygmt + +.. automethod:: Figure.velo + +.. minigallery:: pygmt.Figure.velo + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.vlines.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.vlines.rst.txt new file mode 100644 index 00000000000..49f539e5c59 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.vlines.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.vlines +=================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.vlines + +.. minigallery:: pygmt.Figure.vlines + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.Figure.wiggle.rst.txt b/v0.14.0/_sources/api/generated/pygmt.Figure.wiggle.rst.txt new file mode 100644 index 00000000000..acfe9798998 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.Figure.wiggle.rst.txt @@ -0,0 +1,13 @@ +pygmt.Figure.wiggle +=================== + +.. currentmodule:: pygmt + +.. automethod:: Figure.wiggle + +.. minigallery:: pygmt.Figure.wiggle + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.GMTDataArrayAccessor.rst.txt b/v0.14.0/_sources/api/generated/pygmt.GMTDataArrayAccessor.rst.txt new file mode 100644 index 00000000000..7c6b4ecff79 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.GMTDataArrayAccessor.rst.txt @@ -0,0 +1,27 @@ +pygmt.GMTDataArrayAccessor +========================== + +.. currentmodule:: pygmt + +.. autoclass:: GMTDataArrayAccessor + + +.. rubric:: Attributes + + +.. autoproperty:: + GMTDataArrayAccessor.gtype + +.. autoproperty:: + GMTDataArrayAccessor.registration + + + + + +.. minigallery:: pygmt.GMTDataArrayAccessor + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.binstats.rst.txt b/v0.14.0/_sources/api/generated/pygmt.binstats.rst.txt new file mode 100644 index 00000000000..4e47a8ea61d --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.binstats.rst.txt @@ -0,0 +1,13 @@ +pygmt.binstats +============== + +.. currentmodule:: pygmt + +.. autofunction:: binstats + +.. minigallery:: pygmt.binstats + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.blockmean.rst.txt b/v0.14.0/_sources/api/generated/pygmt.blockmean.rst.txt new file mode 100644 index 00000000000..0296d7e9e06 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.blockmean.rst.txt @@ -0,0 +1,13 @@ +pygmt.blockmean +=============== + +.. currentmodule:: pygmt + +.. autofunction:: blockmean + +.. minigallery:: pygmt.blockmean + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.blockmedian.rst.txt b/v0.14.0/_sources/api/generated/pygmt.blockmedian.rst.txt new file mode 100644 index 00000000000..522f7d51d6b --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.blockmedian.rst.txt @@ -0,0 +1,13 @@ +pygmt.blockmedian +================= + +.. currentmodule:: pygmt + +.. autofunction:: blockmedian + +.. minigallery:: pygmt.blockmedian + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.blockmode.rst.txt b/v0.14.0/_sources/api/generated/pygmt.blockmode.rst.txt new file mode 100644 index 00000000000..c605df8beca --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.blockmode.rst.txt @@ -0,0 +1,13 @@ +pygmt.blockmode +=============== + +.. currentmodule:: pygmt + +.. autofunction:: blockmode + +.. minigallery:: pygmt.blockmode + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.__enter__.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.__enter__.rst.txt new file mode 100644 index 00000000000..3c9b798b964 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.__enter__.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.\_\_enter\_\_ +================================ + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.__enter__ + +.. minigallery:: pygmt.clib.Session.__enter__ + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.__exit__.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.__exit__.rst.txt new file mode 100644 index 00000000000..923b1ed8a54 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.__exit__.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.\_\_exit\_\_ +=============================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.__exit__ + +.. minigallery:: pygmt.clib.Session.__exit__ + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.__getitem__.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.__getitem__.rst.txt new file mode 100644 index 00000000000..5a789a341da --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.__getitem__.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.\_\_getitem\_\_ +================================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.__getitem__ + +.. minigallery:: pygmt.clib.Session.__getitem__ + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.call_module.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.call_module.rst.txt new file mode 100644 index 00000000000..f9cb98d3ccf --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.call_module.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.call\_module +=============================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.call_module + +.. minigallery:: pygmt.clib.Session.call_module + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.create.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.create.rst.txt new file mode 100644 index 00000000000..5bf1b08b122 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.create.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.create +========================= + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.create + +.. minigallery:: pygmt.clib.Session.create + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.create_data.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.create_data.rst.txt new file mode 100644 index 00000000000..9d8147091c4 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.create_data.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.create\_data +=============================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.create_data + +.. minigallery:: pygmt.clib.Session.create_data + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.destroy.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.destroy.rst.txt new file mode 100644 index 00000000000..2bf025c1955 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.destroy.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.destroy +========================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.destroy + +.. minigallery:: pygmt.clib.Session.destroy + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.extract_region.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.extract_region.rst.txt new file mode 100644 index 00000000000..d6464feb48d --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.extract_region.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.extract\_region +================================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.extract_region + +.. minigallery:: pygmt.clib.Session.extract_region + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.get_common.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.get_common.rst.txt new file mode 100644 index 00000000000..8160d93c13d --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.get_common.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.get\_common +============================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.get_common + +.. minigallery:: pygmt.clib.Session.get_common + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.get_default.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.get_default.rst.txt new file mode 100644 index 00000000000..65270be89f5 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.get_default.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.get\_default +=============================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.get_default + +.. minigallery:: pygmt.clib.Session.get_default + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.get_libgmt_func.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.get_libgmt_func.rst.txt new file mode 100644 index 00000000000..8b9ecf76d71 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.get_libgmt_func.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.get\_libgmt\_func +==================================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.get_libgmt_func + +.. minigallery:: pygmt.clib.Session.get_libgmt_func + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.open_virtualfile.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.open_virtualfile.rst.txt new file mode 100644 index 00000000000..f8f90ac5b7b --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.open_virtualfile.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.open\_virtualfile +==================================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.open_virtualfile + +.. minigallery:: pygmt.clib.Session.open_virtualfile + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.put_matrix.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.put_matrix.rst.txt new file mode 100644 index 00000000000..d96df1aaaea --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.put_matrix.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.put\_matrix +============================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.put_matrix + +.. minigallery:: pygmt.clib.Session.put_matrix + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.put_strings.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.put_strings.rst.txt new file mode 100644 index 00000000000..be7ae9bb8ef --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.put_strings.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.put\_strings +=============================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.put_strings + +.. minigallery:: pygmt.clib.Session.put_strings + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.put_vector.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.put_vector.rst.txt new file mode 100644 index 00000000000..4e476f4e3d5 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.put_vector.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.put\_vector +============================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.put_vector + +.. minigallery:: pygmt.clib.Session.put_vector + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.read_data.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.read_data.rst.txt new file mode 100644 index 00000000000..cecaf4520aa --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.read_data.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.read\_data +============================= + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.read_data + +.. minigallery:: pygmt.clib.Session.read_data + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.read_virtualfile.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.read_virtualfile.rst.txt new file mode 100644 index 00000000000..96eb4454d8e --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.read_virtualfile.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.read\_virtualfile +==================================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.read_virtualfile + +.. minigallery:: pygmt.clib.Session.read_virtualfile + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.rst.txt new file mode 100644 index 00000000000..5a6bf836003 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.rst.txt @@ -0,0 +1,142 @@ +pygmt.clib.Session +================== + +.. currentmodule:: pygmt.clib + +.. autoclass:: Session + + +.. rubric:: Attributes + + +.. autoproperty:: + Session.info + +.. autoproperty:: + Session.session_pointer + + + + +.. rubric:: Methods Summary + +.. autosummary:: + + + + + Session.call_module + + + + Session.create + + + + Session.create_data + + + + Session.destroy + + + + Session.extract_region + + + + Session.get_common + + + + Session.get_default + + + + Session.get_enum + + + + Session.get_libgmt_func + + + + Session.inquire_virtualfile + + + + Session.open_virtual_file + + + + Session.open_virtualfile + + + + Session.put_matrix + + + + Session.put_strings + + + + Session.put_vector + + + + Session.read_data + + + + Session.read_virtualfile + + + + Session.virtualfile_from_data + + + + Session.virtualfile_from_grid + + + + Session.virtualfile_from_matrix + + + + Session.virtualfile_from_stringio + + + + Session.virtualfile_from_vectors + + + + Session.virtualfile_in + + + + Session.virtualfile_out + + + + Session.virtualfile_to_dataset + + + + Session.virtualfile_to_raster + + + + Session.write_data + + + + +.. minigallery:: pygmt.clib.Session + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_data.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_data.rst.txt new file mode 100644 index 00000000000..e90b8db0d9c --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_data.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.virtualfile\_from\_data +========================================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.virtualfile_from_data + +.. minigallery:: pygmt.clib.Session.virtualfile_from_data + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_grid.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_grid.rst.txt new file mode 100644 index 00000000000..457ec74d0c5 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_grid.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.virtualfile\_from\_grid +========================================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.virtualfile_from_grid + +.. minigallery:: pygmt.clib.Session.virtualfile_from_grid + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_matrix.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_matrix.rst.txt new file mode 100644 index 00000000000..564dd73c1c5 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_matrix.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.virtualfile\_from\_matrix +============================================ + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.virtualfile_from_matrix + +.. minigallery:: pygmt.clib.Session.virtualfile_from_matrix + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_stringio.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_stringio.rst.txt new file mode 100644 index 00000000000..fade2a1f89b --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_stringio.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.virtualfile\_from\_stringio +============================================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.virtualfile_from_stringio + +.. minigallery:: pygmt.clib.Session.virtualfile_from_stringio + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_vectors.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_vectors.rst.txt new file mode 100644 index 00000000000..2501678343e --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_from_vectors.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.virtualfile\_from\_vectors +============================================= + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.virtualfile_from_vectors + +.. minigallery:: pygmt.clib.Session.virtualfile_from_vectors + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_in.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_in.rst.txt new file mode 100644 index 00000000000..f52c0d34d92 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_in.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.virtualfile\_in +================================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.virtualfile_in + +.. minigallery:: pygmt.clib.Session.virtualfile_in + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_out.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_out.rst.txt new file mode 100644 index 00000000000..6557a4542f4 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_out.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.virtualfile\_out +=================================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.virtualfile_out + +.. minigallery:: pygmt.clib.Session.virtualfile_out + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_to_dataset.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_to_dataset.rst.txt new file mode 100644 index 00000000000..5dff93b5ae5 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_to_dataset.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.virtualfile\_to\_dataset +=========================================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.virtualfile_to_dataset + +.. minigallery:: pygmt.clib.Session.virtualfile_to_dataset + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_to_raster.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_to_raster.rst.txt new file mode 100644 index 00000000000..ee7953d5ef5 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.virtualfile_to_raster.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.virtualfile\_to\_raster +========================================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.virtualfile_to_raster + +.. minigallery:: pygmt.clib.Session.virtualfile_to_raster + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.clib.Session.write_data.rst.txt b/v0.14.0/_sources/api/generated/pygmt.clib.Session.write_data.rst.txt new file mode 100644 index 00000000000..34c04a3abcf --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.clib.Session.write_data.rst.txt @@ -0,0 +1,13 @@ +pygmt.clib.Session.write\_data +============================== + +.. currentmodule:: pygmt.clib + +.. automethod:: Session.write_data + +.. minigallery:: pygmt.clib.Session.write_data + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.config.rst.txt b/v0.14.0/_sources/api/generated/pygmt.config.rst.txt new file mode 100644 index 00000000000..1da2adb22ce --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.config.rst.txt @@ -0,0 +1,17 @@ +pygmt.config +============ + +.. currentmodule:: pygmt + +.. autoclass:: config + + + + + +.. minigallery:: pygmt.config + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.list_sample_data.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.list_sample_data.rst.txt new file mode 100644 index 00000000000..6e6a67d5aac --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.list_sample_data.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.list\_sample\_data +================================= + +.. currentmodule:: pygmt.datasets + +.. autofunction:: list_sample_data + +.. minigallery:: pygmt.datasets.list_sample_data + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_black_marble.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_black_marble.rst.txt new file mode 100644 index 00000000000..4821e0f4122 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_black_marble.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_black\_marble +================================== + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_black_marble + +.. minigallery:: pygmt.datasets.load_black_marble + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_blue_marble.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_blue_marble.rst.txt new file mode 100644 index 00000000000..ea0b39bd45f --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_blue_marble.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_blue\_marble +================================= + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_blue_marble + +.. minigallery:: pygmt.datasets.load_blue_marble + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_age.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_age.rst.txt new file mode 100644 index 00000000000..3c6bed7373a --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_age.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_earth\_age +=============================== + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_earth_age + +.. minigallery:: pygmt.datasets.load_earth_age + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_deflection.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_deflection.rst.txt new file mode 100644 index 00000000000..fb4024ade1d --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_deflection.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_earth\_deflection +====================================== + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_earth_deflection + +.. minigallery:: pygmt.datasets.load_earth_deflection + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_dist.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_dist.rst.txt new file mode 100644 index 00000000000..afcdedc39ea --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_dist.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_earth\_dist +================================ + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_earth_dist + +.. minigallery:: pygmt.datasets.load_earth_dist + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_free_air_anomaly.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_free_air_anomaly.rst.txt new file mode 100644 index 00000000000..f03b5169d4d --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_free_air_anomaly.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_earth\_free\_air\_anomaly +============================================== + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_earth_free_air_anomaly + +.. minigallery:: pygmt.datasets.load_earth_free_air_anomaly + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_geoid.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_geoid.rst.txt new file mode 100644 index 00000000000..a277803d3d3 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_geoid.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_earth\_geoid +================================= + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_earth_geoid + +.. minigallery:: pygmt.datasets.load_earth_geoid + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_magnetic_anomaly.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_magnetic_anomaly.rst.txt new file mode 100644 index 00000000000..0de31b3ec75 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_magnetic_anomaly.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_earth\_magnetic\_anomaly +============================================= + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_earth_magnetic_anomaly + +.. minigallery:: pygmt.datasets.load_earth_magnetic_anomaly + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_mask.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_mask.rst.txt new file mode 100644 index 00000000000..215c9cedb45 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_mask.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_earth\_mask +================================ + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_earth_mask + +.. minigallery:: pygmt.datasets.load_earth_mask + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_mean_dynamic_topography.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_mean_dynamic_topography.rst.txt new file mode 100644 index 00000000000..79bc62f6d06 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_mean_dynamic_topography.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_earth\_mean\_dynamic\_topography +===================================================== + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_earth_mean_dynamic_topography + +.. minigallery:: pygmt.datasets.load_earth_mean_dynamic_topography + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_mean_sea_surface.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_mean_sea_surface.rst.txt new file mode 100644 index 00000000000..49340a4310e --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_mean_sea_surface.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_earth\_mean\_sea\_surface +============================================== + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_earth_mean_sea_surface + +.. minigallery:: pygmt.datasets.load_earth_mean_sea_surface + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_relief.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_relief.rst.txt new file mode 100644 index 00000000000..10abd1eed42 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_relief.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_earth\_relief +================================== + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_earth_relief + +.. minigallery:: pygmt.datasets.load_earth_relief + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_vertical_gravity_gradient.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_vertical_gravity_gradient.rst.txt new file mode 100644 index 00000000000..5a71449d8f2 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_earth_vertical_gravity_gradient.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_earth\_vertical\_gravity\_gradient +======================================================= + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_earth_vertical_gravity_gradient + +.. minigallery:: pygmt.datasets.load_earth_vertical_gravity_gradient + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_mars_relief.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_mars_relief.rst.txt new file mode 100644 index 00000000000..99eaa0b89c6 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_mars_relief.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_mars\_relief +================================= + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_mars_relief + +.. minigallery:: pygmt.datasets.load_mars_relief + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_mercury_relief.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_mercury_relief.rst.txt new file mode 100644 index 00000000000..5e94b67a1f1 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_mercury_relief.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_mercury\_relief +==================================== + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_mercury_relief + +.. minigallery:: pygmt.datasets.load_mercury_relief + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_moon_relief.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_moon_relief.rst.txt new file mode 100644 index 00000000000..9ae39a6b21b --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_moon_relief.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_moon\_relief +================================= + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_moon_relief + +.. minigallery:: pygmt.datasets.load_moon_relief + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_pluto_relief.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_pluto_relief.rst.txt new file mode 100644 index 00000000000..18194303d8e --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_pluto_relief.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_pluto\_relief +================================== + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_pluto_relief + +.. minigallery:: pygmt.datasets.load_pluto_relief + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_sample_data.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_sample_data.rst.txt new file mode 100644 index 00000000000..6d7b0937997 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_sample_data.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_sample\_data +================================= + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_sample_data + +.. minigallery:: pygmt.datasets.load_sample_data + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_tile_map.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_tile_map.rst.txt new file mode 100644 index 00000000000..5a58dd8e077 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_tile_map.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_tile\_map +============================== + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_tile_map + +.. minigallery:: pygmt.datasets.load_tile_map + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.datasets.load_venus_relief.rst.txt b/v0.14.0/_sources/api/generated/pygmt.datasets.load_venus_relief.rst.txt new file mode 100644 index 00000000000..7e8878ac79e --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.datasets.load_venus_relief.rst.txt @@ -0,0 +1,13 @@ +pygmt.datasets.load\_venus\_relief +================================== + +.. currentmodule:: pygmt.datasets + +.. autofunction:: load_venus_relief + +.. minigallery:: pygmt.datasets.load_venus_relief + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.dimfilter.rst.txt b/v0.14.0/_sources/api/generated/pygmt.dimfilter.rst.txt new file mode 100644 index 00000000000..0a9390f15a6 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.dimfilter.rst.txt @@ -0,0 +1,13 @@ +pygmt.dimfilter +=============== + +.. currentmodule:: pygmt + +.. autofunction:: dimfilter + +.. minigallery:: pygmt.dimfilter + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.enums.GridRegistration.rst.txt b/v0.14.0/_sources/api/generated/pygmt.enums.GridRegistration.rst.txt new file mode 100644 index 00000000000..547c55706d8 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.enums.GridRegistration.rst.txt @@ -0,0 +1,8 @@ +pygmt.enums.GridRegistration +============================ + +.. currentmodule:: pygmt.enums + +.. autoclass:: GridRegistration + :members: + :member-order: bysource \ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.enums.GridType.rst.txt b/v0.14.0/_sources/api/generated/pygmt.enums.GridType.rst.txt new file mode 100644 index 00000000000..4beba0d0223 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.enums.GridType.rst.txt @@ -0,0 +1,8 @@ +pygmt.enums.GridType +==================== + +.. currentmodule:: pygmt.enums + +.. autoclass:: GridType + :members: + :member-order: bysource \ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTCLibError.rst.txt b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTCLibError.rst.txt new file mode 100644 index 00000000000..96ba7b98085 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTCLibError.rst.txt @@ -0,0 +1,11 @@ +pygmt.exceptions.GMTCLibError +============================= + +.. currentmodule:: pygmt.exceptions + +.. autoexception:: GMTCLibError + + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTCLibNoSessionError.rst.txt b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTCLibNoSessionError.rst.txt new file mode 100644 index 00000000000..93a122b99fe --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTCLibNoSessionError.rst.txt @@ -0,0 +1,11 @@ +pygmt.exceptions.GMTCLibNoSessionError +====================================== + +.. currentmodule:: pygmt.exceptions + +.. autoexception:: GMTCLibNoSessionError + + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTCLibNotFoundError.rst.txt b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTCLibNotFoundError.rst.txt new file mode 100644 index 00000000000..a1071478c56 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTCLibNotFoundError.rst.txt @@ -0,0 +1,11 @@ +pygmt.exceptions.GMTCLibNotFoundError +===================================== + +.. currentmodule:: pygmt.exceptions + +.. autoexception:: GMTCLibNotFoundError + + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTError.rst.txt b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTError.rst.txt new file mode 100644 index 00000000000..603dd6970f9 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTError.rst.txt @@ -0,0 +1,11 @@ +pygmt.exceptions.GMTError +========================= + +.. currentmodule:: pygmt.exceptions + +.. autoexception:: GMTError + + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTInvalidInput.rst.txt b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTInvalidInput.rst.txt new file mode 100644 index 00000000000..7df31f2b956 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTInvalidInput.rst.txt @@ -0,0 +1,11 @@ +pygmt.exceptions.GMTInvalidInput +================================ + +.. currentmodule:: pygmt.exceptions + +.. autoexception:: GMTInvalidInput + + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTOSError.rst.txt b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTOSError.rst.txt new file mode 100644 index 00000000000..e68db3b72dd --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTOSError.rst.txt @@ -0,0 +1,11 @@ +pygmt.exceptions.GMTOSError +=========================== + +.. currentmodule:: pygmt.exceptions + +.. autoexception:: GMTOSError + + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTVersionError.rst.txt b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTVersionError.rst.txt new file mode 100644 index 00000000000..36faf589c96 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.exceptions.GMTVersionError.rst.txt @@ -0,0 +1,11 @@ +pygmt.exceptions.GMTVersionError +================================ + +.. currentmodule:: pygmt.exceptions + +.. autoexception:: GMTVersionError + + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.filter1d.rst.txt b/v0.14.0/_sources/api/generated/pygmt.filter1d.rst.txt new file mode 100644 index 00000000000..0090c8d02cb --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.filter1d.rst.txt @@ -0,0 +1,13 @@ +pygmt.filter1d +============== + +.. currentmodule:: pygmt + +.. autofunction:: filter1d + +.. minigallery:: pygmt.filter1d + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grd2cpt.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grd2cpt.rst.txt new file mode 100644 index 00000000000..efb6e2212a9 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grd2cpt.rst.txt @@ -0,0 +1,13 @@ +pygmt.grd2cpt +============= + +.. currentmodule:: pygmt + +.. autofunction:: grd2cpt + +.. minigallery:: pygmt.grd2cpt + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grd2xyz.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grd2xyz.rst.txt new file mode 100644 index 00000000000..96fc5bfda80 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grd2xyz.rst.txt @@ -0,0 +1,13 @@ +pygmt.grd2xyz +============= + +.. currentmodule:: pygmt + +.. autofunction:: grd2xyz + +.. minigallery:: pygmt.grd2xyz + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdclip.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdclip.rst.txt new file mode 100644 index 00000000000..8d3b13832f9 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdclip.rst.txt @@ -0,0 +1,13 @@ +pygmt.grdclip +============= + +.. currentmodule:: pygmt + +.. autofunction:: grdclip + +.. minigallery:: pygmt.grdclip + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdcut.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdcut.rst.txt new file mode 100644 index 00000000000..87a34edff3e --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdcut.rst.txt @@ -0,0 +1,13 @@ +pygmt.grdcut +============ + +.. currentmodule:: pygmt + +.. autofunction:: grdcut + +.. minigallery:: pygmt.grdcut + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdfill.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdfill.rst.txt new file mode 100644 index 00000000000..2c684ebf4d1 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdfill.rst.txt @@ -0,0 +1,13 @@ +pygmt.grdfill +============= + +.. currentmodule:: pygmt + +.. autofunction:: grdfill + +.. minigallery:: pygmt.grdfill + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdfilter.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdfilter.rst.txt new file mode 100644 index 00000000000..cb4190606aa --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdfilter.rst.txt @@ -0,0 +1,13 @@ +pygmt.grdfilter +=============== + +.. currentmodule:: pygmt + +.. autofunction:: grdfilter + +.. minigallery:: pygmt.grdfilter + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdgradient.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdgradient.rst.txt new file mode 100644 index 00000000000..722dc6ad0fa --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdgradient.rst.txt @@ -0,0 +1,13 @@ +pygmt.grdgradient +================= + +.. currentmodule:: pygmt + +.. autofunction:: grdgradient + +.. minigallery:: pygmt.grdgradient + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdhisteq.compute_bins.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdhisteq.compute_bins.rst.txt new file mode 100644 index 00000000000..1bee1f93d2f --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdhisteq.compute_bins.rst.txt @@ -0,0 +1,13 @@ +pygmt.grdhisteq.compute\_bins +============================= + +.. currentmodule:: pygmt + +.. automethod:: grdhisteq.compute_bins + +.. minigallery:: pygmt.grdhisteq.compute_bins + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdhisteq.equalize_grid.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdhisteq.equalize_grid.rst.txt new file mode 100644 index 00000000000..0805cd772e0 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdhisteq.equalize_grid.rst.txt @@ -0,0 +1,13 @@ +pygmt.grdhisteq.equalize\_grid +============================== + +.. currentmodule:: pygmt + +.. automethod:: grdhisteq.equalize_grid + +.. minigallery:: pygmt.grdhisteq.equalize_grid + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdhisteq.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdhisteq.rst.txt new file mode 100644 index 00000000000..4c1a6f86f1f --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdhisteq.rst.txt @@ -0,0 +1,32 @@ +pygmt.grdhisteq +=============== + +.. currentmodule:: pygmt + +.. autoclass:: grdhisteq + + + + +.. rubric:: Methods Summary + +.. autosummary:: + + + + + grdhisteq.compute_bins + + + + grdhisteq.equalize_grid + + + + +.. minigallery:: pygmt.grdhisteq + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdinfo.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdinfo.rst.txt new file mode 100644 index 00000000000..fcfe9fe3122 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdinfo.rst.txt @@ -0,0 +1,13 @@ +pygmt.grdinfo +============= + +.. currentmodule:: pygmt + +.. autofunction:: grdinfo + +.. minigallery:: pygmt.grdinfo + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdlandmask.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdlandmask.rst.txt new file mode 100644 index 00000000000..e62e0ab661a --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdlandmask.rst.txt @@ -0,0 +1,13 @@ +pygmt.grdlandmask +================= + +.. currentmodule:: pygmt + +.. autofunction:: grdlandmask + +.. minigallery:: pygmt.grdlandmask + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdproject.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdproject.rst.txt new file mode 100644 index 00000000000..5fd1cd3462c --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdproject.rst.txt @@ -0,0 +1,13 @@ +pygmt.grdproject +================ + +.. currentmodule:: pygmt + +.. autofunction:: grdproject + +.. minigallery:: pygmt.grdproject + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdsample.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdsample.rst.txt new file mode 100644 index 00000000000..9e72ac8680c --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdsample.rst.txt @@ -0,0 +1,13 @@ +pygmt.grdsample +=============== + +.. currentmodule:: pygmt + +.. autofunction:: grdsample + +.. minigallery:: pygmt.grdsample + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdtrack.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdtrack.rst.txt new file mode 100644 index 00000000000..8b1d448c363 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdtrack.rst.txt @@ -0,0 +1,13 @@ +pygmt.grdtrack +============== + +.. currentmodule:: pygmt + +.. autofunction:: grdtrack + +.. minigallery:: pygmt.grdtrack + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.grdvolume.rst.txt b/v0.14.0/_sources/api/generated/pygmt.grdvolume.rst.txt new file mode 100644 index 00000000000..082e944519a --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.grdvolume.rst.txt @@ -0,0 +1,13 @@ +pygmt.grdvolume +=============== + +.. currentmodule:: pygmt + +.. autofunction:: grdvolume + +.. minigallery:: pygmt.grdvolume + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.info.rst.txt b/v0.14.0/_sources/api/generated/pygmt.info.rst.txt new file mode 100644 index 00000000000..06b4aca3d30 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.info.rst.txt @@ -0,0 +1,13 @@ +pygmt.info +========== + +.. currentmodule:: pygmt + +.. autofunction:: info + +.. minigallery:: pygmt.info + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.load_dataarray.rst.txt b/v0.14.0/_sources/api/generated/pygmt.load_dataarray.rst.txt new file mode 100644 index 00000000000..312328000c6 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.load_dataarray.rst.txt @@ -0,0 +1,13 @@ +pygmt.load\_dataarray +===================== + +.. currentmodule:: pygmt + +.. autofunction:: load_dataarray + +.. minigallery:: pygmt.load_dataarray + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.makecpt.rst.txt b/v0.14.0/_sources/api/generated/pygmt.makecpt.rst.txt new file mode 100644 index 00000000000..2a36053a4d7 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.makecpt.rst.txt @@ -0,0 +1,13 @@ +pygmt.makecpt +============= + +.. currentmodule:: pygmt + +.. autofunction:: makecpt + +.. minigallery:: pygmt.makecpt + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.nearneighbor.rst.txt b/v0.14.0/_sources/api/generated/pygmt.nearneighbor.rst.txt new file mode 100644 index 00000000000..544bdc367be --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.nearneighbor.rst.txt @@ -0,0 +1,13 @@ +pygmt.nearneighbor +================== + +.. currentmodule:: pygmt + +.. autofunction:: nearneighbor + +.. minigallery:: pygmt.nearneighbor + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.project.rst.txt b/v0.14.0/_sources/api/generated/pygmt.project.rst.txt new file mode 100644 index 00000000000..f9cc76b1445 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.project.rst.txt @@ -0,0 +1,13 @@ +pygmt.project +============= + +.. currentmodule:: pygmt + +.. autofunction:: project + +.. minigallery:: pygmt.project + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.select.rst.txt b/v0.14.0/_sources/api/generated/pygmt.select.rst.txt new file mode 100644 index 00000000000..4a2c424246e --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.select.rst.txt @@ -0,0 +1,13 @@ +pygmt.select +============ + +.. currentmodule:: pygmt + +.. autofunction:: select + +.. minigallery:: pygmt.select + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.set_display.rst.txt b/v0.14.0/_sources/api/generated/pygmt.set_display.rst.txt new file mode 100644 index 00000000000..b0300c9d1cb --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.set_display.rst.txt @@ -0,0 +1,13 @@ +pygmt.set\_display +================== + +.. currentmodule:: pygmt + +.. autofunction:: set_display + +.. minigallery:: pygmt.set_display + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.show_versions.rst.txt b/v0.14.0/_sources/api/generated/pygmt.show_versions.rst.txt new file mode 100644 index 00000000000..917597d683c --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.show_versions.rst.txt @@ -0,0 +1,13 @@ +pygmt.show\_versions +==================== + +.. currentmodule:: pygmt + +.. autofunction:: show_versions + +.. minigallery:: pygmt.show_versions + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.sph2grd.rst.txt b/v0.14.0/_sources/api/generated/pygmt.sph2grd.rst.txt new file mode 100644 index 00000000000..421f8ed2a22 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.sph2grd.rst.txt @@ -0,0 +1,13 @@ +pygmt.sph2grd +============= + +.. currentmodule:: pygmt + +.. autofunction:: sph2grd + +.. minigallery:: pygmt.sph2grd + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.sphdistance.rst.txt b/v0.14.0/_sources/api/generated/pygmt.sphdistance.rst.txt new file mode 100644 index 00000000000..c091960a143 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.sphdistance.rst.txt @@ -0,0 +1,13 @@ +pygmt.sphdistance +================= + +.. currentmodule:: pygmt + +.. autofunction:: sphdistance + +.. minigallery:: pygmt.sphdistance + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.sphinterpolate.rst.txt b/v0.14.0/_sources/api/generated/pygmt.sphinterpolate.rst.txt new file mode 100644 index 00000000000..147cec55e83 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.sphinterpolate.rst.txt @@ -0,0 +1,13 @@ +pygmt.sphinterpolate +==================== + +.. currentmodule:: pygmt + +.. autofunction:: sphinterpolate + +.. minigallery:: pygmt.sphinterpolate + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.surface.rst.txt b/v0.14.0/_sources/api/generated/pygmt.surface.rst.txt new file mode 100644 index 00000000000..b69b8f905d9 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.surface.rst.txt @@ -0,0 +1,13 @@ +pygmt.surface +============= + +.. currentmodule:: pygmt + +.. autofunction:: surface + +.. minigallery:: pygmt.surface + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.triangulate.delaunay_triples.rst.txt b/v0.14.0/_sources/api/generated/pygmt.triangulate.delaunay_triples.rst.txt new file mode 100644 index 00000000000..fa1854844da --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.triangulate.delaunay_triples.rst.txt @@ -0,0 +1,13 @@ +pygmt.triangulate.delaunay\_triples +=================================== + +.. currentmodule:: pygmt + +.. automethod:: triangulate.delaunay_triples + +.. minigallery:: pygmt.triangulate.delaunay_triples + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.triangulate.regular_grid.rst.txt b/v0.14.0/_sources/api/generated/pygmt.triangulate.regular_grid.rst.txt new file mode 100644 index 00000000000..2bbe36a2919 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.triangulate.regular_grid.rst.txt @@ -0,0 +1,13 @@ +pygmt.triangulate.regular\_grid +=============================== + +.. currentmodule:: pygmt + +.. automethod:: triangulate.regular_grid + +.. minigallery:: pygmt.triangulate.regular_grid + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.triangulate.rst.txt b/v0.14.0/_sources/api/generated/pygmt.triangulate.rst.txt new file mode 100644 index 00000000000..a8b2824144f --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.triangulate.rst.txt @@ -0,0 +1,32 @@ +pygmt.triangulate +================= + +.. currentmodule:: pygmt + +.. autoclass:: triangulate + + + + +.. rubric:: Methods Summary + +.. autosummary:: + + + + + triangulate.delaunay_triples + + + + triangulate.regular_grid + + + + +.. minigallery:: pygmt.triangulate + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.which.rst.txt b/v0.14.0/_sources/api/generated/pygmt.which.rst.txt new file mode 100644 index 00000000000..8cf152ecc6a --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.which.rst.txt @@ -0,0 +1,13 @@ +pygmt.which +=========== + +.. currentmodule:: pygmt + +.. autofunction:: which + +.. minigallery:: pygmt.which + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.x2sys_cross.rst.txt b/v0.14.0/_sources/api/generated/pygmt.x2sys_cross.rst.txt new file mode 100644 index 00000000000..b3f22bfdba8 --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.x2sys_cross.rst.txt @@ -0,0 +1,13 @@ +pygmt.x2sys\_cross +================== + +.. currentmodule:: pygmt + +.. autofunction:: x2sys_cross + +.. minigallery:: pygmt.x2sys_cross + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.x2sys_init.rst.txt b/v0.14.0/_sources/api/generated/pygmt.x2sys_init.rst.txt new file mode 100644 index 00000000000..dfe6829a03f --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.x2sys_init.rst.txt @@ -0,0 +1,13 @@ +pygmt.x2sys\_init +================= + +.. currentmodule:: pygmt + +.. autofunction:: x2sys_init + +.. minigallery:: pygmt.x2sys_init + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/generated/pygmt.xyz2grd.rst.txt b/v0.14.0/_sources/api/generated/pygmt.xyz2grd.rst.txt new file mode 100644 index 00000000000..c206c1e296f --- /dev/null +++ b/v0.14.0/_sources/api/generated/pygmt.xyz2grd.rst.txt @@ -0,0 +1,13 @@ +pygmt.xyz2grd +============= + +.. currentmodule:: pygmt + +.. autofunction:: xyz2grd + +.. minigallery:: pygmt.xyz2grd + :add-heading: + +.. raw:: html + +
\ No newline at end of file diff --git a/v0.14.0/_sources/api/index.rst.txt b/v0.14.0/_sources/api/index.rst.txt new file mode 100644 index 00000000000..1f573dcb8eb --- /dev/null +++ b/v0.14.0/_sources/api/index.rst.txt @@ -0,0 +1,342 @@ +.. _api: + +API Reference +============= + +.. automodule:: pygmt + +.. currentmodule:: pygmt + +Plotting +-------- + +Figure class overview +~~~~~~~~~~~~~~~~~~~~~ + +All plotting is handled through the :class:`pygmt.Figure` class and its methods. + +.. autosummary:: + :toctree: generated + + Figure + +Plotting map elements +~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated + + Figure.basemap + Figure.coast + Figure.colorbar + Figure.hlines + Figure.inset + Figure.legend + Figure.logo + Figure.solar + Figure.text + Figure.timestamp + Figure.vlines + +Plotting tabular data +~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated + + Figure.contour + Figure.histogram + Figure.meca + Figure.plot + Figure.plot3d + Figure.rose + Figure.ternary + Figure.velo + Figure.wiggle + +Plotting raster data +~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated + + Figure.grdcontour + Figure.grdimage + Figure.grdview + Figure.image + Figure.tilemap + +Configuring layout +~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated + + Figure.set_panel + Figure.shift_origin + Figure.subplot + +Saving and displaying the figure +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated + + Figure.savefig + Figure.show + Figure.psconvert + +Configuring the display settings +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following function is provided directly through the :mod:`pygmt` top level +package. + +.. autosummary:: + :toctree: generated + + set_display + +Color palette table generation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following functions are provided directly through the :mod:`pygmt` top level +package. + +.. autosummary:: + :toctree: generated + + grd2cpt + makecpt + + +Data Processing +--------------- + +Operations on tabular data +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated + + binstats + blockmean + blockmedian + blockmode + filter1d + nearneighbor + project + select + sph2grd + sphdistance + sphinterpolate + surface + triangulate + triangulate.regular_grid + triangulate.delaunay_triples + xyz2grd + +Operations on raster data +~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated + + dimfilter + grd2xyz + grdclip + grdcut + grdfill + grdfilter + grdgradient + grdhisteq + grdhisteq.equalize_grid + grdhisteq.compute_bins + grdlandmask + grdproject + grdsample + grdtrack + grdvolume + +Crossover analysis with x2sys +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated + + x2sys_init + x2sys_cross + +Input/output +------------ + +.. autosummary:: + :toctree: generated + + load_dataarray + +GMT Defaults +------------ + +Operations on GMT defaults: + +.. autosummary:: + :toctree: generated + + config + +Metadata +-------- + +Getting metadata from tabular or grid data: + +.. autosummary:: + :toctree: generated + + GMTDataArrayAccessor + info + grdinfo + +Enums +----- + +.. currentmodule:: pygmt.enums + +.. autosummary:: + :toctree: generated + :nosignatures: + :template: autosummary/enums.rst + + GridRegistration + GridType + +.. currentmodule:: pygmt + +Miscellaneous +------------- + +.. autosummary:: + :toctree: generated + + which + show_versions + +Datasets +-------- + +PyGMT provides access to GMT's datasets through the :mod:`pygmt.datasets` module. +These functions will download the datasets automatically the first time they are used +and store them in GMT's user data directory. + +.. autosummary:: + :toctree: generated + + datasets.list_sample_data + datasets.load_black_marble + datasets.load_blue_marble + datasets.load_earth_age + datasets.load_earth_deflection + datasets.load_earth_dist + datasets.load_earth_free_air_anomaly + datasets.load_earth_geoid + datasets.load_earth_magnetic_anomaly + datasets.load_earth_mask + datasets.load_earth_mean_dynamic_topography + datasets.load_earth_mean_sea_surface + datasets.load_earth_relief + datasets.load_earth_vertical_gravity_gradient + datasets.load_mars_relief + datasets.load_mercury_relief + datasets.load_moon_relief + datasets.load_pluto_relief + datasets.load_venus_relief + datasets.load_sample_data + +In addition, there is also a special function to load XYZ tile maps via +:doc:`contextily ` to be used as base maps. + +.. autosummary:: + :toctree: generated + + datasets.load_tile_map + +.. currentmodule:: pygmt + +Exceptions +---------- + +All custom exceptions are derived from :class:`pygmt.exceptions.GMTError`. + +.. autosummary:: + :toctree: generated + + exceptions.GMTError + exceptions.GMTInvalidInput + exceptions.GMTVersionError + exceptions.GMTOSError + exceptions.GMTCLibError + exceptions.GMTCLibNoSessionError + exceptions.GMTCLibNotFoundError + + +.. currentmodule:: pygmt + +GMT C API +--------- + +The :mod:`pygmt.clib` package is a wrapper for the GMT C API built using :mod:`ctypes`. +Most calls to the C API happen through the :class:`pygmt.clib.Session` class. + +.. autosummary:: + :toctree: generated + + clib.Session + +:gmt-docs:`GMT modules ` are executed through +the :meth:`~pygmt.clib.Session.call_module` method: + +.. autosummary:: + :toctree: generated + + clib.Session.call_module + +Passing memory blocks between Python data objects (e.g. :class:`numpy.ndarray`, +:class:`pandas.Series`, :class:`xarray.DataArray`, etc) and GMT happens through +*virtual files*. These methods are context managers that automate the conversion of +Python objects to and from GMT virtual files: + +.. autosummary:: + :toctree: generated + + clib.Session.virtualfile_in + clib.Session.virtualfile_out + clib.Session.virtualfile_to_dataset + clib.Session.virtualfile_to_raster + +Low level access (these are mostly used by the :mod:`pygmt.clib` package): + +.. autosummary:: + :toctree: generated + + clib.Session.create + clib.Session.destroy + clib.Session.__getitem__ + clib.Session.__enter__ + clib.Session.__exit__ + clib.Session.get_default + clib.Session.get_common + clib.Session.create_data + clib.Session.put_matrix + clib.Session.put_strings + clib.Session.put_vector + clib.Session.read_data + clib.Session.write_data + clib.Session.open_virtualfile + clib.Session.read_virtualfile + clib.Session.extract_region + clib.Session.get_libgmt_func + clib.Session.virtualfile_from_data + clib.Session.virtualfile_from_grid + clib.Session.virtualfile_from_stringio + clib.Session.virtualfile_from_matrix + clib.Session.virtualfile_from_vectors diff --git a/v0.14.0/_sources/changes.md.txt b/v0.14.0/_sources/changes.md.txt new file mode 100644 index 00000000000..21250127374 --- /dev/null +++ b/v0.14.0/_sources/changes.md.txt @@ -0,0 +1,1663 @@ +# Changelog + +## Release v0.14.0 (2024/12/31) + +[![Digital Object Identifier for PyGMT v0.14.0](https://zenodo.org/badge/DOI/10.5281/zenodo.14535921.svg)](https://doi.org/10.5281/zenodo.14535921) + +### Highlights + +* 🎉 **Fourteenth minor release of PyGMT** 🎉 +* Bump minimum supported version to GMT>=6.4.0 ([#3450](https://github.com/GenericMappingTools/pygmt/pull/3450)) +* Two new plotting methods and six new functions to access more GMT remote datasets +* PyArrow as an optional dependency and improved support of PyArrow data types ([#3592](https://github.com/GenericMappingTools/pygmt/pull/3592)) + +### New Features + +* Add Figure.hlines for plotting horizontal lines ([#923](https://github.com/GenericMappingTools/pygmt/pull/923)) +* Add Figure.vlines for plotting vertical lines ([#3726](https://github.com/GenericMappingTools/pygmt/pull/3726)) +* Add load_black_marble to load "Black Marble" dataset ([#3469](https://github.com/GenericMappingTools/pygmt/pull/3469)) +* Add load_blue_marble to load "Blue Marble" dataset ([#2235](https://github.com/GenericMappingTools/pygmt/pull/2235)) +* Add load_earth_deflection to load "IGPP Earth east-west and north-south deflection" datasets ([#3728](https://github.com/GenericMappingTools/pygmt/pull/3728)) +* Add load_earth_dist to load "GSHHG Earth distance to shoreline" dataset ([#3706](https://github.com/GenericMappingTools/pygmt/pull/3706)) +* Add load_earth_mean_dynamic_topography to load "CNES Earth Mean Dynamic Topography" dataset ([#3718](https://github.com/GenericMappingTools/pygmt/pull/3718)) +* Add load_earth_mean_sea_surface to load "CNES Earth Mean Sea Surface" dataset ([#3717](https://github.com/GenericMappingTools/pygmt/pull/3717)) +* load_earth_free_air_anomaly: Add "uncertainty" parameter to load the "IGPP Earth free-air anomaly uncertainty" dataset ([#3727](https://github.com/GenericMappingTools/pygmt/pull/3727)) + + +### Enhancements + +* Figure.plot: Add the "symbol" parameter to support plotting data points with varying symbols ([#1117](https://github.com/GenericMappingTools/pygmt/pull/1117)) +* Figure.plot3d: Add the "symbol" parameter to support plotting data points with varying symbols ([#3559](https://github.com/GenericMappingTools/pygmt/pull/3559)) +* Figure.legend: Support passing a StringIO object as the legend specification ([#3438](https://github.com/GenericMappingTools/pygmt/pull/3438)) +* load_tile_map: Add parameter "crs" to set the CRS of the returned dataarray ([#3554](https://github.com/GenericMappingTools/pygmt/pull/3554)) +* PyArrow: Support pyarrow arrays with string/large_string/string_view types ([#3619](https://github.com/GenericMappingTools/pygmt/pull/3619)) +* Support 1-D/2-D numpy arrays with longlong and ulonglong dtype ([#3566](https://github.com/GenericMappingTools/pygmt/pull/3566)) +* GMT_IMAGE: Implement the to_dataarray method for 3-band images ([#3128](https://github.com/GenericMappingTools/pygmt/pull/3128)) +* Ensure non-ASCII characters are typeset correctly even if PS_CHAR_ENCODING is not "ISOLatin1+" ([#3611](https://github.com/GenericMappingTools/pygmt/pull/3611)) +* Add enums GridRegistration and GridType for grid registration and type ([#3693](https://github.com/GenericMappingTools/pygmt/pull/3693)) + +### Deprecations + +* SPEC 0: Bump minimum supported versions to Python 3.11, NumPy 1.25, pandas>=2.0 and xarray>=2023.04 ([#3460](https://github.com/GenericMappingTools/pygmt/pull/3460), [#3606](https://github.com/GenericMappingTools/pygmt/pull/3606), [#3697](https://github.com/GenericMappingTools/pygmt/pull/3697)) +* clib.Session.virtualfile_from_vectors: Now takes a sequence of vectors as its single argument (Passing multiple arguments will be unsupported in v0.16.0) ([#3522](https://github.com/GenericMappingTools/pygmt/pull/3522)) +* Remove the deprecated build_arg_string function (deprecated since v0.12.0) ([#3427](https://github.com/GenericMappingTools/pygmt/pull/3427)) +* Figure.grdcontour: Remove the deprecated syntax for the 'annotation' parameter (deprecated since v0.12.0) ([#3428](https://github.com/GenericMappingTools/pygmt/pull/3428)) + +### Bug Fixes + +* launch_external_viewer: Use full path when opening the file in a web browser ([#3647](https://github.com/GenericMappingTools/pygmt/pull/3647)) +* PyArrow: Map date32[day]/date64[ms] dtypes in pandas objects to np.datetime64 with correct date/time units ([#3617](https://github.com/GenericMappingTools/pygmt/pull/3617)) +* clib.session: Add the GMT_SESSION_NOGDALCLOSE flag to keep GDAL open ([#3672](https://github.com/GenericMappingTools/pygmt/pull/3672)) +* Set the "Conventions" attribute to "CF-1.7" for netCDF grids only ([#3463](https://github.com/GenericMappingTools/pygmt/pull/3463)) +* Fix the conversion error for pandas.Series with missing values in pandas<=2.1 ([#3505](https://github.com/GenericMappingTools/pygmt/pull/3505), [#3596](https://github.com/GenericMappingTools/pygmt/pull/3596)) +* GeoPandas: Explicitly convert columns with overflow integers to avoid OverflowError with fiona 1.10 ([#3455](https://github.com/GenericMappingTools/pygmt/pull/3455)) +* Figure.plot/Figure.plot3d: Improve the check of the "style" parameter for "v" or "V" ([#3603](https://github.com/GenericMappingTools/pygmt/pull/3603)) +* Correctly reserve the grid data dtype by converting ctypes array to numpy array with np.ctypeslib.as_array ([#3446](https://github.com/GenericMappingTools/pygmt/pull/3446)) +* **Breaking**: Figure.text: Fix typesetting of integers when mixed with floating-point values ([#3493](https://github.com/GenericMappingTools/pygmt/pull/3493)) + +### Documentation + +* Add basic tutorial "Plotting polygons" ([#3593](https://github.com/GenericMappingTools/pygmt/pull/3593)) +* Update the gallery example for plotting lines with LineString/MultiLineString geometry ([#3711](https://github.com/GenericMappingTools/pygmt/pull/3711)) +* Add the PyGMT ecosystem page ([#3475](https://github.com/GenericMappingTools/pygmt/pull/3475)) +* Document the support policy for optional packages ([#3616](https://github.com/GenericMappingTools/pygmt/pull/3616)) +* Document the environment variables that can affect the behavior of PyGMT ([#3432](https://github.com/GenericMappingTools/pygmt/pull/3432)) +* Document the built-in patterns in the Technical Reference section ([#3466](https://github.com/GenericMappingTools/pygmt/pull/3466)) +* Document Continuous Benchmarking in Maintainers Guides ([#3631](https://github.com/GenericMappingTools/pygmt/pull/3631)) +* Add instructions for installing optional dependencies ([#3506](https://github.com/GenericMappingTools/pygmt/pull/3506)) +* Update "PyData Ecosystem" to "Scientific Python Ecosystem" ([#3447](https://github.com/GenericMappingTools/pygmt/pull/3447)) +* Figure.savefig: Clarify that the "transparent" parameter also works for the PNG file associated with the KML format ([#3579](https://github.com/GenericMappingTools/pygmt/pull/3579)) +* Add the PyGMT talk at AGU24 to the "Overview" section ([#3685](https://github.com/GenericMappingTools/pygmt/pull/3685)) +* Add the GMT/PyGMT pre-conference workshop at AGU24 to the "External resources" section ([#3689](https://github.com/GenericMappingTools/pygmt/pull/3689)) +* Add TODO comments in the maintainers guides and update the release checklist ([#3724](https://github.com/GenericMappingTools/pygmt/pull/3724)) + +### Maintenance + +* **Breaking**: data_kind: data is None and required now returns the "empty" kind ([#3482](https://github.com/GenericMappingTools/pygmt/pull/3482)) +* **Breaking**: data_kind: Now "matrix" represents a 2-D numpy array and unrecognized data types fall back to "vectors" ([#3351](https://github.com/GenericMappingTools/pygmt/pull/3351)) +* Add Support for Python 3.13 ([#3490](https://github.com/GenericMappingTools/pygmt/pull/3490)) +* Add the Session.virtualfile_from_stringio method to allow StringIO input for certain functions/methods ([#3326](https://github.com/GenericMappingTools/pygmt/pull/3326)) +* Add "geodatasets" as a dependency for docs and update the choropleth example ([#3719](https://github.com/GenericMappingTools/pygmt/pull/3719)) +* PyArrow: Check compatibility of pyarrow.array with string type ([#2933](https://github.com/GenericMappingTools/pygmt/pull/2933)) +* Rename sphinx-gallery's README.txt to GALLERY_HEADER.rst and require Sphinx-Gallery>=0.17.0 ([#3348](https://github.com/GenericMappingTools/pygmt/pull/3348)) +* clib.conversion: Remove the as_c_contiguous function and use np.ascontiguousarray instead ([#3492](https://github.com/GenericMappingTools/pygmt/pull/3492)) +* Use TODO comments to track deprecations and workarounds ([#3722](https://github.com/GenericMappingTools/pygmt/pull/3722)) +* Move Figure.psconvert into a separate file ([#3553](https://github.com/GenericMappingTools/pygmt/pull/3553)) +* Improve the data type checking for 2-D arrays passed to the GMT C API ([#3563](https://github.com/GenericMappingTools/pygmt/pull/3563)) +* Enable ruff's TD (flake8-todos), COM (flake8-commas), TRY (tryceratops), and EM (flake8-errmsg) rules ([#3723](https://github.com/GenericMappingTools/pygmt/pull/3723), [#3531](https://github.com/GenericMappingTools/pygmt/pull/3531), [#3665](https://github.com/GenericMappingTools/pygmt/pull/3665), [#3661](https://github.com/GenericMappingTools/pygmt/pull/3661)) +* CI: Install pyarrow-core instead of pyarrow from conda-forge ([#3698](https://github.com/GenericMappingTools/pygmt/pull/3698)) +* CI: Ensure no hyphens in Python file and directory names in the "Style Checks" workflow ([#3703](https://github.com/GenericMappingTools/pygmt/pull/3703)) +* Bump to ruff>=0.8.0 and rename rule TCH to TC ([#3662](https://github.com/GenericMappingTools/pygmt/pull/3662)) +* Bump to Ghostscript 10.04.0 ([#3443](https://github.com/GenericMappingTools/pygmt/pull/3443)) +* Add enums GridFormat for GMT grid format ID ([#3449](https://github.com/GenericMappingTools/pygmt/pull/3449)) + +**Full Changelog**: + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Yvonne Fröhlich](https://github.com/yvonnefroehlich) +* [Wei Ji Leong](https://github.com/weiji14) +* [Michael Grund](https://github.com/michaelgrund) +* [Will Schlitzer](https://github.com/willschlitzer) +* [Jiayuan Yao](https://github.com/core-man) + +## Release v0.13.0 (2024/09/05) + +[![Digital Object Identifier for PyGMT v0.13.0](https://zenodo.org/badge/DOI/10.5281/zenodo.13679420.svg)](https://doi.org/10.5281/zenodo.13679420) + +### Highlights + +* 🎉 **Thirteenth minor release of PyGMT** 🎉 +* Add new documentation section "Technical Reference" and document the supported encodings and fonts +* Tutorial for "Draping a dataset on top of a topographic surface" ([#3316](https://github.com/GenericMappingTools/pygmt/pull/3316)) +* Tutorial for "Typesetting non-ASCII characters" ([#3389](https://github.com/GenericMappingTools/pygmt/pull/3389)) + +### New Features + +* Wrap the GMT API function GMT_Read_Data to read data into GMT data containers ([#3324](https://github.com/GenericMappingTools/pygmt/pull/3324)) +* Wrap GMT's standard data type GMT_IMAGE for images ([#3338](https://github.com/GenericMappingTools/pygmt/pull/3338)) + +### Enhancements + +* **Breaking**: pygmt.x2sys_cross: Refactor to use virtualfiles for output tables ([#3182](https://github.com/GenericMappingTools/pygmt/pull/3182)) +* pygmt.show_versions: Warn about incompatible Ghostscript versions ([#3244](https://github.com/GenericMappingTools/pygmt/pull/3244)) +* pygmt.show_versions: Show GDAL version ([#3364](https://github.com/GenericMappingTools/pygmt/pull/3364), [#3376](https://github.com/GenericMappingTools/pygmt/pull/3376)) +* pygmt.datasets.load_*: Add autocompletion support for the 'resolution' parameter ([#3260](https://github.com/GenericMappingTools/pygmt/pull/3260)) +* clib.Session: Refactor the `__getitem__` special method to avoid calling API function GMT_Get_Enum repeatedly ([#3261](https://github.com/GenericMappingTools/pygmt/pull/3261)) +* clib: Refactor to avoid checking GMT version repeatedly and only check once when loading the GMT library ([#3254](https://github.com/GenericMappingTools/pygmt/pull/3254)) +* Support non-ASCII characters in ISO-8859-x charsets ([#3310](https://github.com/GenericMappingTools/pygmt/pull/3310)) +* Refactor to improve the user experience with non-ASCII characters ([#3206](https://github.com/GenericMappingTools/pygmt/pull/3206)) + +### Deprecations + +* SPEC 0: Bump minimum supported version to xarray 2022.09 ([#3372](https://github.com/GenericMappingTools/pygmt/pull/3372)) +* SPEC 0: Bump minimum supported version to NumPy 1.24 ([#3286](https://github.com/GenericMappingTools/pygmt/pull/3286)) +* clib: Deprecate API function 'Session.virtualfile_from_data', use 'Session.virtualfile_in' instead (will be removed in v0.15.0) ([#3225](https://github.com/GenericMappingTools/pygmt/pull/3225)) +* Remove the unused pygmt.print_clib_info function ([#3257](https://github.com/GenericMappingTools/pygmt/pull/3257)) +* Figure.timestamp: Remove deprecated parameter 'justification', use 'justify' instead (deprecated since v0.11.0) ([#3222](https://github.com/GenericMappingTools/pygmt/pull/3222)) + +### Bug Fixes + +* pygmt.set_display: Fix the bug that `method=None` doesn't reset to the default display method ([#3396](https://github.com/GenericMappingTools/pygmt/pull/3396)) +* load_tile_map: Register the rio accessor by importing rioxarray, so the returned raster has CRS ([#3323](https://github.com/GenericMappingTools/pygmt/pull/3323)) +* load_tile_map: Fix the raster band indexing, should start from 1 ([#3322](https://github.com/GenericMappingTools/pygmt/pull/3322)) +* load_tile_map: Replace deprecated rio.set_crs with rio.write_crs ([#3321](https://github.com/GenericMappingTools/pygmt/pull/3321)) +* PYGMT_USE_EXTERNAL_DISPLAY should NOT disable image display in Jupyter notebook environment ([#3418](https://github.com/GenericMappingTools/pygmt/pull/3418)) + +### Documentation + +* External Resources: Add tutorial in Portuguese and using PyGMT in Google Colab ([#3360](https://github.com/GenericMappingTools/pygmt/pull/3360)) +* Remove the non-official GMT wrappers from README ([#3413](https://github.com/GenericMappingTools/pygmt/pull/3413)) +* Give recommendations about GMT-Ghostscript incompatibility and the testing example ([#3249](https://github.com/GenericMappingTools/pygmt/pull/3249)) +* Document the supported 35 standard Postscript fonts in the Technical Reference section ([#3378](https://github.com/GenericMappingTools/pygmt/pull/3378)) +* Add an offboarding access checklist for maintainers ([#3411](https://github.com/GenericMappingTools/pygmt/pull/3411)) +* Update the onboarding access checklist in Maintainers Guides ([#3404](https://github.com/GenericMappingTools/pygmt/pull/3404)) +* Add sphinx extension myst-nb to enable writing executable Markdown notebooks ([#3379](https://github.com/GenericMappingTools/pygmt/pull/3379)) + +### Maintenance + +* pygmt.grd2cpt & pygmt.makecpt: Simplify the logic for dealing with CPT output ([#3334](https://github.com/GenericMappingTools/pygmt/pull/3334)) +* geopandas: Use io.StringIO to read geojson data and handle compatibility with geopandas v0.x and v1.x ([#3247](https://github.com/GenericMappingTools/pygmt/pull/3247)) +* Simplify the "Minimum Supported Versions" page using MyST customized URL schemes ([#3383](https://github.com/GenericMappingTools/pygmt/pull/3383)) +* build_arg_list: Raise an exception if an invalid output file name is given ([#3336](https://github.com/GenericMappingTools/pygmt/pull/3336)) +* sphinx-gallery: Temporarily pin to < 0.17.0 ([#3350](https://github.com/GenericMappingTools/pygmt/pull/3350)) +* Run pytest with `--color=yes` to force GitHub Actions logs to have color ([#3330](https://github.com/GenericMappingTools/pygmt/pull/3330)) +* Patch the callback print function to suppress the UnicodeDecodeError ([#3367](https://github.com/GenericMappingTools/pygmt/pull/3367)) +* Move Will from Active Maintainers to Distinguished Contributors ([#3388](https://github.com/GenericMappingTools/pygmt/pull/3388)) +* Enable ruff's unspecified-encoding (PLW1514) rule and fix violations ([#3319](https://github.com/GenericMappingTools/pygmt/pull/3319)) +* Enable ruff's literal-membership (PLR6201) rule and fix violations ([#3317](https://github.com/GenericMappingTools/pygmt/pull/3317)) +* Determine the minimum required versions of dependencies from package metadata for docs ([#3380](https://github.com/GenericMappingTools/pygmt/pull/3380)) +* CI: Use OIDC token for codecov uploading ([#3163](https://github.com/GenericMappingTools/pygmt/pull/3163)) +* CI: Test NumPy 2.1 in the GMT Tests workflow ([#3401](https://github.com/GenericMappingTools/pygmt/pull/3401)) +* CI: Set GMT_ENABLE_OPENMP to TRUE to enable OpenMP support on macOS ([#3266](https://github.com/GenericMappingTools/pygmt/pull/3266)) +* CI: Fix the name of the 'build' package to 'python-build' on conda-forge ([#3408](https://github.com/GenericMappingTools/pygmt/pull/3408)) +* CI: Bump to ubuntu-24.04 and mambaforge-23.11 in ReadTheDocs ([#3296](https://github.com/GenericMappingTools/pygmt/pull/3296)) +* CI: Build GMT dev source code with OpenMP enabled on Linux and GThreads enabled on Linux/macOS ([#3011](https://github.com/GenericMappingTools/pygmt/pull/3011)) +* CI: Add pytest plugins pytest-xdist and pytest-rerunfailures ([#3193](https://github.com/GenericMappingTools/pygmt/pull/3193), [#3267](https://github.com/GenericMappingTools/pygmt/pull/3267)) +* Add pre-commit config with pre-commit-hooks and enable pre-commit.ci to update hooks quarterly ([#3283](https://github.com/GenericMappingTools/pygmt/pull/3283), [#3414](https://github.com/GenericMappingTools/pygmt/pull/3414)) +* Add a test to make sure PyGMT works with paths that contain non-ASCII characters ([#3280](https://github.com/GenericMappingTools/pygmt/pull/3280)) + +**Full Changelog**: + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Yvonne Fröhlich](https://github.com/yvonnefroehlich) +* [Wei Ji Leong](https://github.com/weiji14) +* [Michael Grund](https://github.com/michaelgrund) +* [Andre L. Belem](https://github.com/andrebelem) + +--- + +## Release v0.12.0 (2024/05/01) + +[![Digital Object Identifier for PyGMT v0.12.0](https://zenodo.org/badge/DOI/10.5281/zenodo.11062720.svg)](https://doi.org/10.5281/zenodo.11062720) + +### Highlights + +* 🎉 **Twelfth minor release of PyGMT** 🎉 +* 🚀 Almost all module wrappers (with a few exceptions) now use in-memory GMT *virtual files* instead of intermediate temporary files to improve performance ([#2730](https://github.com/GenericMappingTools/pygmt/issues/2730)) +* Almost all module wrappers (with a few exceptions) now have consistent behavior for table-like output ([#1318](https://github.com/GenericMappingTools/pygmt/issues/1318)) +* Adopt [SPEC 0](https://scientific-python.org/specs/spec-0000/) policy for minimum supported versions of GMT, Python, and other core dependencies + +### Enhancements + +* **Breaking**: (Unneeded) extra double quotes around text strings (containing whitespaces) are now considered as part of the text string ([#3132](https://github.com/GenericMappingTools/pygmt/pull/3132), [#3457](https://github.com/GenericMappingTools/pygmt/issues/3457)) +* pygmt.project: Add 'output_type' parameter for output in pandas/numpy/file formats ([#3110](https://github.com/GenericMappingTools/pygmt/pull/3110)) +* pygmt.grdtrack: Add 'output_type' parameter for output in pandas/numpy/file formats ([#3106](https://github.com/GenericMappingTools/pygmt/pull/3106)) +* pygmt.blockm*: Add 'output_type' parameter for output in pandas/numpy/file formats ([#3103](https://github.com/GenericMappingTools/pygmt/pull/3103)) +* Figure.grdcontour: Adjust processing arguments passed to "annotation" and "interval" parameters ([#3116](https://github.com/GenericMappingTools/pygmt/pull/3116)) +* Figure.contour: Adjust processing arguments passed to "annotation" and "levels" parameters ([#2706](https://github.com/GenericMappingTools/pygmt/pull/2706)) +* clib: Wrap the GMT API function GMT_Read_VirtualFile ([#2993](https://github.com/GenericMappingTools/pygmt/pull/2993)) +* clib: Add virtualfile_to_dataset method for converting virtualfile to a dataset ([#3083](https://github.com/GenericMappingTools/pygmt/pull/3083), [#3140](https://github.com/GenericMappingTools/pygmt/pull/3140), [#3157](https://github.com/GenericMappingTools/pygmt/pull/3157), +[#3117](https://github.com/GenericMappingTools/pygmt/pull/3117)) +* clib: Add the virtualfile_out method for creating output virtualfile ([#3057](https://github.com/GenericMappingTools/pygmt/pull/3057)) +* Wrap GMT_Inquire_VirtualFile to get the family of virtualfiles ([#3152](https://github.com/GenericMappingTools/pygmt/pull/3152)) +* Wrap GMT's standard data type GMT_GRID for grids ([#2398](https://github.com/GenericMappingTools/pygmt/pull/2398)) +* Wrap GMT's standard data type GMT_DATASET for table inputs ([#2729](https://github.com/GenericMappingTools/pygmt/pull/2729), [#3131](https://github.com/GenericMappingTools/pygmt/pull/3131), [#3174](https://github.com/GenericMappingTools/pygmt/pull/3174)) +* Wrap GMT's data structure GMT_GRID_HEADER for grid/image/cube headers ([#3127](https://github.com/GenericMappingTools/pygmt/pull/3127), [#3134](https://github.com/GenericMappingTools/pygmt/pull/3134)) +* Session.call_module: Support passing a list of argument strings ([#3139](https://github.com/GenericMappingTools/pygmt/pull/3139)) +* Refactor the _load_remote_dataset function to load tiled and non-tiled grids in a consistent way ([#3120](https://github.com/GenericMappingTools/pygmt/pull/3120)) +* Refactor all wrappers to pass an argument list to Session.call_module ([#3132](https://github.com/GenericMappingTools/pygmt/pull/3132)) +* Add function build_arg_list for building arguments list from keyword dictionaries ([#3149](https://github.com/GenericMappingTools/pygmt/pull/3149)) +* Support left/right single quotation marks in text and arguments ([#3192](https://github.com/GenericMappingTools/pygmt/pull/3192)) +* non_ascii_to_octal: Return the input string if it only contains printable ASCII characters ([#3199](https://github.com/GenericMappingTools/pygmt/pull/3199)) + +### Deprecations + +* SPEC 0: Set minimum supported versions to Python>=3.10, pandas>=1.5 and xarray>=2022.06 ([#3043](https://github.com/GenericMappingTools/pygmt/pull/3043), [#3039](https://github.com/GenericMappingTools/pygmt/pull/3039), [#3151](https://github.com/GenericMappingTools/pygmt/pull/3151)) +* Figure.plot/plot3d/rose: Remove deprecated parameter "color", use "fill" instead (deprecated since v0.8.0) ([#3032](https://github.com/GenericMappingTools/pygmt/pull/3032)) +* Figure.velo: Remove deprecated parameters "color"/"uncertaintycolor", use "fill"/"uncertaintyfill" instead (deprecated since v0.8.0) ([#3034](https://github.com/GenericMappingTools/pygmt/pull/3034)) +* Figure.wiggle: Remove deprecated parameter "color", use "fillpositive"/"fillnegative" instead (deprecated since v0.8.0) ([#3035](https://github.com/GenericMappingTools/pygmt/pull/3035)) +* Figure.grdimage: Remove deprecated parameter "bit_color", use "bitcolor" instead (deprecated since v0.8.0) ([#3036](https://github.com/GenericMappingTools/pygmt/pull/3036)) +* Figure: Remove deprecated "xshift" ("X") and "yshift" ("Y") parameters, use "Figure.shift_origin" instead (deprecated since v0.8.0) ([#3044](https://github.com/GenericMappingTools/pygmt/pull/3044)) +* Figure: Remove deprecated "timestamp" ("U") parameter, use "Figure.timestamp" instead (deprecated since v0.9.0) ([#3045](https://github.com/GenericMappingTools/pygmt/pull/3045)) +* clib: Rename the "virtualfile_from_data" method to "virtualfile_in" ([#3068](https://github.com/GenericMappingTools/pygmt/pull/3068)) +* Deprecate the "build_arg_string" function, use build_arg_list instead (deprecated since v0.12.0, will be removed in v0.14.0) ([#3184](https://github.com/GenericMappingTools/pygmt/pull/3184)) +* Deprecate the "sequence_plus" converter, only used for the "annotation" parameter of Figure.grdcontour (deprecated since v0.12.0, will be removed in v0.14.0) ([#3207](https://github.com/GenericMappingTools/pygmt/pull/3207)) +* Figure.grdcontour: Deprecate parameter "interval" to "levels" (FutureWarning since v0.12.0, will be removed in v0.16.0) ([#3209](https://github.com/GenericMappingTools/pygmt/pull/3209)) + +### Documentation + +* External Resources: Add repository "gmt-pygmt-plotting" ([#3213](https://github.com/GenericMappingTools/pygmt/pull/3213)) +* Gallery example "Custom symbols": Mention own custom symbols ([#3186](https://github.com/GenericMappingTools/pygmt/pull/3186)) +* Intro "04 Table inputs": Document that a list of file names, pathlib.Path objects, URLs, or remote files is supported ([3214](https://github.com/GenericMappingTools/pygmt/pull/3214)) +* Tutorial "Plotting text": Rewrite to improve structure, explain more parameters, show list input ([#2760](https://github.com/GenericMappingTools/pygmt/pull/2760)) + +### Maintenance + +* pygmt.filter1d: Improve performance by storing output in virtual files ([#3085](https://github.com/GenericMappingTools/pygmt/pull/3085)) +* pygmt.grdvolume: Refactor to store output in virtual files instead of temporary files ([#3102](https://github.com/GenericMappingTools/pygmt/pull/3102)) +* pygmt.grdhisteq.compute_bins: Refactor to store output in virtual files instead of temporary files ([#3109](https://github.com/GenericMappingTools/pygmt/pull/3109)) +* pygmt.grd2xyz: Improve performance by storing output in virtual files ([#3097](https://github.com/GenericMappingTools/pygmt/pull/3097)) +* pygmt.select: Improve performance by storing output in virtual files ([#3108](https://github.com/GenericMappingTools/pygmt/pull/3108)) +* pygmt.triangulate.delaunay_triples: Improve performance by storing output in virtual files ([#3107](https://github.com/GenericMappingTools/pygmt/pull/3107)) +* pygmt.which: Refactor to get rid of temporary files ([#3148](https://github.com/GenericMappingTools/pygmt/pull/3148)) +* Use consistent names (vintbl and vingrd) for input virtual files ([#3082](https://github.com/GenericMappingTools/pygmt/pull/3082)) +* Add sequence_to_ctypes_array to convert a sequence to a ctypes array ([#3136](https://github.com/GenericMappingTools/pygmt/pull/3136)) +* Add strings_to_ctypes_array to convert a sequence of strings into a ctypes array ([#3137](https://github.com/GenericMappingTools/pygmt/pull/3137)) +* Figure.psconvert: Ignore the unrecognized "metadata" parameter added by pytest-mpl v0.17.0 ([#3054](https://github.com/GenericMappingTools/pygmt/pull/3054)) +* Remote Datasets: Adjust attributes - remove "title", use default of "name" and "long_name", introduce "description" ([#3048](https://github.com/GenericMappingTools/pygmt/pull/3048)) +* Adopt SPEC 0 policy and drop NEP 29 policy ([#3037](https://github.com/GenericMappingTools/pygmt/pull/3037)) +* Document the support policy for minimum required GMT versions ([#3070](https://github.com/GenericMappingTools/pygmt/pull/3070)) +* Bump to ghostscript 10.03.0 ([#3112](https://github.com/GenericMappingTools/pygmt/pull/3112)) +* Bump to ruff 0.3.0 ([#3081](https://github.com/GenericMappingTools/pygmt/pull/3081)) +* Enable ruff's PTH (flake8-use-pathlib) rules and fix violations ([#3129](https://github.com/GenericMappingTools/pygmt/pull/3129)) +* Change the dev dependency "matplotlib" to "matplotlib-base" to reduce environment size ([#3158](https://github.com/GenericMappingTools/pygmt/pull/3158)) +* Migrate from os.path to pathlib ([#3119](https://github.com/GenericMappingTools/pygmt/pull/3119)) +* CI: Use "gh release" to upload assets to release ([#3187](https://github.com/GenericMappingTools/pygmt/pull/3187)) +* CI: Consistently use github.token instead of secrets.GITHUB_TOKEN ([#3189](https://github.com/GenericMappingTools/pygmt/pull/3189)) +* CI: Configure workflows to run on "workflow_dispatch" event ([#3133](https://github.com/GenericMappingTools/pygmt/pull/3133)) +* Switch to official GitHub action for managing app tokens ([#3165](https://github.com/GenericMappingTools/pygmt/pull/3165)) + +**Full Changelog**: + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Yvonne Fröhlich](https://github.com/yvonnefroehlich) +* [Michael Grund](https://github.com/michaelgrund) +* [Wei Ji Leong](https://github.com/weiji14) + +## Release v0.11.0 (2024/02/01) + +[![Digital Object Identifier for PyGMT v0.11.0](https://zenodo.org/badge/DOI/10.5281/zenodo.10578540.svg)](https://doi.org/10.5281/zenodo.10578540) + +### Highlights + +* 🎉 **Eleventh minor release of PyGMT** 🎉 +* Tutorial for table inputs ([#2722](https://github.com/GenericMappingTools/pygmt/pull/2722)) and gallery example for choropleth map ([#2796](https://github.com/GenericMappingTools/pygmt/pull/2796)) +* Easy access to planetary relief datasets (Mercury, Venus, Moon, Mars, Pluto) ([#3028](https://github.com/GenericMappingTools/pygmt/pull/3028), [#2906](https://github.com/GenericMappingTools/pygmt/pull/2906), [#2674](https://github.com/GenericMappingTools/pygmt/pull/2674), [#2847](https://github.com/GenericMappingTools/pygmt/pull/2847), [#3027](https://github.com/GenericMappingTools/pygmt/pull/3027)) +* Faster PyGMT by ~0.1 seconds for each module call ([#2930](https://github.com/GenericMappingTools/pygmt/pull/2930)) + +### New Features + +* Support timedelta64 dtype as input ([#2884](https://github.com/GenericMappingTools/pygmt/pull/2884)) +* Figure.text: Support passing in a list of angle/font/justify values ([#2720](https://github.com/GenericMappingTools/pygmt/pull/2720)) +* Figure.savefig: Support saving figures in PPM (.ppm) format ([#2771](https://github.com/GenericMappingTools/pygmt/pull/2771)) +* Figure.savefig: Support generating GeoTIFF file (with extension '.tiff') ([#2698](https://github.com/GenericMappingTools/pygmt/pull/2698)) +* Figure.savefig: Add the 'worldfile' parameter to write a companion world file for raster images ([#2766](https://github.com/GenericMappingTools/pygmt/pull/2766)) + +### Enhancements + +* geopandas: Correctly handle columns with integer values bigger than the largest 32-bit integer ([#2841](https://github.com/GenericMappingTools/pygmt/pull/2841)) +* pyarrow: Support date32[day] and date64[ms] dtypes in pandas objects ([#2845](https://github.com/GenericMappingTools/pygmt/pull/2845)) +* datasets.load_tile_map and Figure.tilemap: Add "zoom_adjust" parameter ([#2934](https://github.com/GenericMappingTools/pygmt/pull/2934)) +* grdlandmask: Add common alias "cores" for "x" ([#2944](https://github.com/GenericMappingTools/pygmt/pull/2944)) +* Figure.coast: Add alias "box" for "-F" ([#2823](https://github.com/GenericMappingTools/pygmt/pull/2823)) +* Improve the error messages for unsupported numpy dtypes ([#2856](https://github.com/GenericMappingTools/pygmt/pull/2856)) +* Set GMT_SESSION_NAME to a unique name on Windows for multiprocessing support ([#2938](https://github.com/GenericMappingTools/pygmt/pull/2938)) +* Figure.savefig: Support .jpeg as JPEG image extension ([#2691](https://github.com/GenericMappingTools/pygmt/pull/2691)) +* Figure.savefig: Support uppercase file extensions (e.g., PNG, PDF) ([#2697](https://github.com/GenericMappingTools/pygmt/pull/2697)) + +### Deprecations + +* Rename API function Session.open_virtual_file to Session.open_virtualfile (remove in v0.15.0) ([#2996](https://github.com/GenericMappingTools/pygmt/pull/2996)) +* NEP29: Set minimum required version to NumPy 1.23+ ([#2991](https://github.com/GenericMappingTools/pygmt/pull/2991)) +* Figure.timestamp: Deprecate parameter 'justification' to 'justify' (remove in v0.13.0) ([#3002](https://github.com/GenericMappingTools/pygmt/pull/3002)) +* Figure.grdimage: Remove the unsupported 'img_out'/'A' parameter ([#2907](https://github.com/GenericMappingTools/pygmt/pull/2907)) + +### Bug Fixes + +* pygmt.which: Fix the bug when passing multiple files ([#2726](https://github.com/GenericMappingTools/pygmt/pull/2726)) +* pygmt.filter1d: Fix the bug that the first line is read as headers ([#2780](https://github.com/GenericMappingTools/pygmt/pull/2780)) +* clib: Fix the bug when passing multiple columns of strings with variable lengths to the GMT C API ([#2719](https://github.com/GenericMappingTools/pygmt/pull/2719)) +* Let kwargs_to_strings work with default values and positional arguments ([#2826](https://github.com/GenericMappingTools/pygmt/pull/2826)) +* Figure.meca: Fix typo pricipal_axis -> principal_axis ([#2940](https://github.com/GenericMappingTools/pygmt/pull/2940)) + +### Documentation + +* Add gallery example "Scale bar" ([#2822](https://github.com/GenericMappingTools/pygmt/pull/2822)) +* Add gallery example for plotting connection lines ("connection" parameter of Figure.plot) ([#2999](https://github.com/GenericMappingTools/pygmt/pull/2999)) +* Add gallery example showing how to adjust line segment ends (caps and joints) ([#3015](https://github.com/GenericMappingTools/pygmt/pull/3015)) +* Gallery example "Legend": Update regarding input data and multi-column legends ([#2762](https://github.com/GenericMappingTools/pygmt/pull/2762)) +* Add the Japanese "PyGMT-HOWTO" tutorial to "External Resources" ([#2743](https://github.com/GenericMappingTools/pygmt/pull/2743)) +* Figure.plot: Update docstring for "connection" parameter to GMT 6.5 ([#2994](https://github.com/GenericMappingTools/pygmt/pull/2994)) +* Use consistent description for the "outgrid" parameter ([#2874](https://github.com/GenericMappingTools/pygmt/pull/2874)) +* Improve the onboarding access checklist for contributors, maintainers and administrators ([#2656](https://github.com/GenericMappingTools/pygmt/pull/2656)) +* Recommend Miniforge instead of Mambaforge ([#2833](https://github.com/GenericMappingTools/pygmt/pull/2833)) + +### Maintenance + +* pyarrow: Check compatibility of pyarrow-backed pandas objects with numeric dtypes ([#2774](https://github.com/GenericMappingTools/pygmt/pull/2774)) +* Switch away from Stamen basemaps ([#2717](https://github.com/GenericMappingTools/pygmt/pull/2717)) +* Add the "validate_output_table_type" function to check the "output_type" parameter ([#2772](https://github.com/GenericMappingTools/pygmt/pull/2772)) +* Create "skip_if_no" helper function to skip tests when missing a package ([#2883](https://github.com/GenericMappingTools/pygmt/pull/2883)) +* Fix "fixture_xr_image" to open "earth_day_01d" directly with rioxarray ([#2963](https://github.com/GenericMappingTools/pygmt/pull/2963)) +* Improve the way to import optional modules ([#2809](https://github.com/GenericMappingTools/pygmt/pull/2809)) +* Move variable `__gmt_version__` to pygmt.clib to avoid cyclic-import errors ([#2713](https://github.com/GenericMappingTools/pygmt/pull/2713)) +* Refactor the internal "_load_remote_dataset function" to simplify datasets' definitions ([#2917](https://github.com/GenericMappingTools/pygmt/pull/2917)) +* Benchmark grdsample, grdfilter and sph2grd with fixed cores ([#2945](https://github.com/GenericMappingTools/pygmt/pull/2945)) +* Setup Continuous Benchmarking workflow with pytest-codspeed ([#2908](https://github.com/GenericMappingTools/pygmt/pull/2908)) +* Update output shape and mean values from some x2sys_cross tests ([#2986](https://github.com/GenericMappingTools/pygmt/pull/2986)) +* Bump the GMT version in CI to 6.5.0 ([#2962](https://github.com/GenericMappingTools/pygmt/pull/2962)) +* Bump ghostscript to 10.02.1 ([#2694](https://github.com/GenericMappingTools/pygmt/pull/2694)) +* Add support for Python 3.12 ([#2711](https://github.com/GenericMappingTools/pygmt/pull/2711)) +* NEP29: Test PyGMT on NumPy 1.26 ([#2692](https://github.com/GenericMappingTools/pygmt/pull/2692)) +* CI: Trigger the cache_data workflow in PRs if cache files are added/deleted/updated ([#2939](https://github.com/GenericMappingTools/pygmt/pull/2939)) +* CI: Test GMT dev version on Windows by building from source ([#2773](https://github.com/GenericMappingTools/pygmt/pull/2773)) +* CI: Set cache-downloads to false to speedup the "Setup Micromamba" step ([#2946](https://github.com/GenericMappingTools/pygmt/pull/2946)) +* CI: Run certain GitHub Actions workflows on official repo only ([#2951](https://github.com/GenericMappingTools/pygmt/pull/2951)) +* CI: Run benchmarks if PR is labeled with "run/benchmark" ([#2958](https://github.com/GenericMappingTools/pygmt/pull/2958)) +* CI: Run "GMT Dev Tests" if PR is labeled with "run/test-gmt-dev" ([#2960](https://github.com/GenericMappingTools/pygmt/pull/2960)) +* CI: Require at least one code block separator for example files in the Style Checks workflow ([#2810](https://github.com/GenericMappingTools/pygmt/pull/2810)) +* Add Mypy for static type checking ([#2808](https://github.com/GenericMappingTools/pygmt/pull/2808)) +* TYP: Improve the doc style for type hints ([#2813](https://github.com/GenericMappingTools/pygmt/pull/2813)) +* TYP: Add type hints support for pygmt.datasets.load_sample_data ([#2859](https://github.com/GenericMappingTools/pygmt/pull/2859)) +* TYP: Add type hints for the "registration" parameter in pygmt.datasets.load_* functions ([#2867](https://github.com/GenericMappingTools/pygmt/pull/2867)) +* TYP: Add type hints for "data_source" in load_earth_relief and load_earth_magnetic_anomaly functions ([#2849](https://github.com/GenericMappingTools/pygmt/pull/2849)) +* TYP: Add type hints for parameters of Figure.timestamp([#2890](https://github.com/GenericMappingTools/pygmt/pull/2890)) +* TYP: Add type hints for "terminator" in Figure.solar and simplify codes ([#2881](https://github.com/GenericMappingTools/pygmt/pull/2881)) +* TYP: Add type hints for parameters of Figure.shift_origin, improve docstrings, and add inline examples ([#2879](https://github.com/GenericMappingTools/pygmt/pull/2879)) +* doc: Convert the installation guides source code from ReST to Markdown ([#2992](https://github.com/GenericMappingTools/pygmt/pull/2992)) +* doc: Convert overview source code from ReST to Markdown ([#2953](https://github.com/GenericMappingTools/pygmt/pull/2953)) +* doc: Move compatibility table from README to separate file ([#2862](https://github.com/GenericMappingTools/pygmt/pull/2862)) +* Enable the PDF format documentation in the ReadTheDocs site ([#2876](https://github.com/GenericMappingTools/pygmt/pull/2876)) +* Add the full changelog link to the release drafter template ([#2838](https://github.com/GenericMappingTools/pygmt/pull/2838)) +* Release Drafter: Automatically replace GitHub handles with names and links ([#2777](https://github.com/GenericMappingTools/pygmt/pull/2777)) +* Exclude CODE_OF_CONDUCT.md, AUTHORSHIP.md and pygmt/tests directory from distributions ([#2957](https://github.com/GenericMappingTools/pygmt/pull/2957)) +* Add Zenodo's GMT community to the maintainer's onboarding list ([#2761](https://github.com/GenericMappingTools/pygmt/pull/2761)) +* Use ruff to lint and format codes, and remove flakeheaven/isort/black/blackdoc ([#2741](https://github.com/GenericMappingTools/pygmt/issues/2741)) +* Use codespell to check common misspellings ([#2673](https://github.com/GenericMappingTools/pygmt/pull/2673)) +* Use "# %%" as code block separators in examples ([#2662](https://github.com/GenericMappingTools/pygmt/pull/2662)) + +**Full Changelog**: + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Yvonne Fröhlich](https://github.com/yvonnefroehlich) +* [Wei Ji Leong](https://github.com/weiji14) +* [Michael Grund](https://github.com/michaelgrund) +* [Max Jones](https://github.com/maxrjones) + +--- + +## Release v0.10.0 (2023/09/02) + +[![Digital Object Identifier for PyGMT v0.10.0](https://zenodo.org/badge/DOI/10.5281/zenodo.8303186.svg)](https://doi.org/10.5281/zenodo.8303186) + +### Highlights + +* 🎉 **Tenth minor release of PyGMT** 🎉 +* Support non-ASCII characters in Figure.text ([#2638](https://github.com/GenericMappingTools/pygmt/pull/2638)) and other method arguments ([#2584](https://github.com/GenericMappingTools/pygmt/pull/2584)) +* Three new tutorials and seven new gallery examples + +### Enhancements + +* Figure.colorbar: Add alias for "Q" ([#2608](https://github.com/GenericMappingTools/pygmt/pull/2608)) +* Figure.grdimage: Allow passing RGB xarray.DataArray images ([#2590](https://github.com/GenericMappingTools/pygmt/pull/2590)) +* Figure.image: Add alias for "G" ([#2615](https://github.com/GenericMappingTools/pygmt/pull/2615)) +* Figure.meca: Add aliases for "L", "T", and "Fr" ([#2546](https://github.com/GenericMappingTools/pygmt/pull/2546)) +* clib.Session: Wrap the GMT_Get_Common API function ([#2500](https://github.com/GenericMappingTools/pygmt/pull/2500)) +* pygmt.grdfill: Add alias for "N" ([#2618](https://github.com/GenericMappingTools/pygmt/pull/2618)) +* pygmt.select: Add aliases for "C", "F", and "L" ([#2466](https://github.com/GenericMappingTools/pygmt/pull/2466)) +* pygmt.show_versions: Show versions of IPython and rioxarray ([#2492](https://github.com/GenericMappingTools/pygmt/pull/2492)) +* Better handling of optional virtual files (e.g., shading in Figure.grdimage) ([#2493](https://github.com/GenericMappingTools/pygmt/pull/2493)) + +### Deprecations + +* Remove the unused pygmt.test() function ([#2652](https://github.com/GenericMappingTools/pygmt/pull/2652)) +* Figure.grdimage: Deprecate parameter "bit_color" to "bitcolor" (remove in v0.12.0) ([#2635](https://github.com/GenericMappingTools/pygmt/pull/2635)) +* Figure.text: Remove the deprecated "incols" parameter (deprecated since v0.8.0) ([#2473](https://github.com/GenericMappingTools/pygmt/pull/2473)) +* NEP29: Set minimum required version to Python 3.9+ ([#2487](https://github.com/GenericMappingTools/pygmt/pull/2487)) +* NEP29: Set minimum required version to NumPy 1.22+ ([#2586](https://github.com/GenericMappingTools/pygmt/pull/2586)) + +### Bug Fixes + +* load_earth_mask: Keep data's encoding to correctly infer data's registration and gtype information ([#2632](https://github.com/GenericMappingTools/pygmt/pull/2632)) +* Geopandas integration: Mapping int/int64 to int32 for OGR_GMT format ([#2592](https://github.com/GenericMappingTools/pygmt/pull/2592)) +* Figure.meca: Let the "scale" parameter accept int/float/str values ([#2566](https://github.com/GenericMappingTools/pygmt/pull/2566)) +* Figure.meca: Fix beachball offsetting for ndarray input (requires GMT>6.4.0) ([#2576](https://github.com/GenericMappingTools/pygmt/pull/2576)) + +### Documentation + +* Document the default CPT for GMT remote datasets ([#2573](https://github.com/GenericMappingTools/pygmt/pull/2573)) +* Add tutorial to explain naming of PyGMT figure elements ([#2383](https://github.com/GenericMappingTools/pygmt/pull/2383)) +* Add tutorial to show interactive data visualization via `panel` ([#2498](https://github.com/GenericMappingTools/pygmt/pull/2498)) +* Add tutorial for cartesian histograms ([#2445](https://github.com/GenericMappingTools/pygmt/pull/2445)) +* Add gallery example to show usage of dcw parameter in Figure.coast ([#2428](https://github.com/GenericMappingTools/pygmt/pull/2428)) +* Add gallery example to show usage of tile maps ([#2585](https://github.com/GenericMappingTools/pygmt/pull/2585)) +* Add gallery example showing how to build an envelope around a curve ([#2587](https://github.com/GenericMappingTools/pygmt/pull/2587)) +* Add gallery example for plotting an RGB image from an xarray.DataArray ([#2641](https://github.com/GenericMappingTools/pygmt/pull/2641)) +* Add gallery example "Quoted lines" (`style="q"`) ([#2563](https://github.com/GenericMappingTools/pygmt/pull/2563)) +* Add gallery example "Decorated lines" (`style="~"`) ([#2564](https://github.com/GenericMappingTools/pygmt/pull/2564)) +* Add gallery example "Cross-section along a transect" ([#2515](https://github.com/GenericMappingTools/pygmt/pull/2515)) + +### Maintenance + +* Use substitutions to show the minimum required Python and GMT versions dynamically in installation guides ([#2488](https://github.com/GenericMappingTools/pygmt/pull/2488)) +* Use np.asarray to convert a 1-D array to datetime type in array_to_datetime ([#2481](https://github.com/GenericMappingTools/pygmt/pull/2481)) +* Use consistent docstrings for test files ([#2578](https://github.com/GenericMappingTools/pygmt/pull/2578)) +* Use concurrency to cancel previous runs ([#2589](https://github.com/GenericMappingTools/pygmt/pull/2589)) +* Set date_format to ISO8601 to silence pandas 2.0 UserWarning on read_csv ([#2569](https://github.com/GenericMappingTools/pygmt/pull/2569)) +* Remove dummy_context and use contextlib.nullcontext instead ([#2491](https://github.com/GenericMappingTools/pygmt/pull/2491)) +* NEP29: Test PyGMT on NumPy 1.25 ([#2581](https://github.com/GenericMappingTools/pygmt/pull/2581)) +* Fix tests for Aug 2023 updated remote datasets ([#2636](https://github.com/GenericMappingTools/pygmt/pull/2636)) +* Figure.meca: Refactor the two tests for offsetting beachballs ([#2572](https://github.com/GenericMappingTools/pygmt/pull/2572)) +* Figure.meca: Refactor tests for plotting multiple focal mechanisms ([#2565](https://github.com/GenericMappingTools/pygmt/pull/2565)) +* Figure.meca: Refactor tests for plotting a single focal mechanism ([#2533](https://github.com/GenericMappingTools/pygmt/pull/2533)) +* Figure.meca: Add a test for passing event names via pandas.DataFrame ([#2582](https://github.com/GenericMappingTools/pygmt/pull/2582)) +* Exclude bots from contributors in release drafter ([#2484](https://github.com/GenericMappingTools/pygmt/pull/2484)) +* Exclude DVC files from source/binary distributions ([#2634](https://github.com/GenericMappingTools/pygmt/pull/2634)) +* CI: Use mamba-org/provision-with-micromamba to setup micromamba ([#2435](https://github.com/GenericMappingTools/pygmt/pull/2435)) +* CI: Migrate provision-with-micromamba to setup-micromamba ([#2536](https://github.com/GenericMappingTools/pygmt/pull/2536)) +* CI: Run dev tests on scientific Python nightly wheels ([#2612](https://github.com/GenericMappingTools/pygmt/pull/2612)) +* CI: Remove the deprecated cml-publish command from the dvc-diff workflow ([#2559](https://github.com/GenericMappingTools/pygmt/pull/2559)) +* CI: Fix and simplify the dvc-diff workflow ([#2549](https://github.com/GenericMappingTools/pygmt/pull/2549)) +* CI: Add the "Doctests" workflow to run doctests weekly ([#2456](https://github.com/GenericMappingTools/pygmt/pull/2456)) +* CI: Add detailed descriptions in the workflow files and update maintainer guides ([#2496](https://github.com/GenericMappingTools/pygmt/pull/2496)) +* Add private function _validate_data_input to validate input data ([#2595](https://github.com/GenericMappingTools/pygmt/pull/2595)) + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Yvonne Fröhlich](https://github.com/yvonnefroehlich) +* [Wei Ji Leong](https://github.com/weiji14) +* [Michael Grund](https://github.com/michaelgrund) +* [Jing-Hui Tong](https://github.com/jhtong33) +* [Max Jones](https://github.com/maxrjones) + +--- + +## Release v0.9.0 (2023/03/31) + +[![Digital Object Identifier for PyGMT v0.9.0](https://zenodo.org/badge/DOI/10.5281/zenodo.7772533.svg)](https://doi.org/10.5281/zenodo.7772533) + +### Highlights + +* 🎉 **Ninth minor release of PyGMT** 🎉 +* Add Figure.tilemap to plot XYZ tile maps ([#2394](https://github.com/GenericMappingTools/pygmt/pull/2394)) +* Add function to load raster tile maps using contextily ([#2125](https://github.com/GenericMappingTools/pygmt/pull/2125)) +* Eleven new/updated gallery and inline examples + +### New Features + +* Add load_earth_mask function for GSHHG Global Earth Mask dataset ([#2310](https://github.com/GenericMappingTools/pygmt/pull/2310)) +* Add Figure.timestamp to plot the GMT timestamp logo ([#2208](https://github.com/GenericMappingTools/pygmt/pull/2208), [#2425](https://github.com/GenericMappingTools/pygmt/pull/2425)) + +### Enhancements + +* pygmt.surface: Add aliases for "C", "L", "M", and "T" ([#2321](https://github.com/GenericMappingTools/pygmt/pull/2321)) +* Figure.meca: Add aliases for "C", "E", "G", and "W" ([#2345](https://github.com/GenericMappingTools/pygmt/pull/2345)) +* Figure.colorbar: Add aliases for "L" and "Z" ([#2357](https://github.com/GenericMappingTools/pygmt/pull/2357)) + +### Deprecations + +* NEP29: Set minimum required version to NumPy 1.21+ ([#2389](https://github.com/GenericMappingTools/pygmt/pull/2389)) +* Recommend Figure.timestamp and remove timestamp (U) alias from all plotting methods ([#2135](https://github.com/GenericMappingTools/pygmt/pull/2135)) +* Remove the deprecated load_fractures_compilation function (deprecated since v0.6.0) ([#2303](https://github.com/GenericMappingTools/pygmt/pull/2303)) +* Remove the deprecated load_hotspots function (deprecated since v0.6.0) ([#2309](https://github.com/GenericMappingTools/pygmt/pull/2309)) +* Remove the deprecated load_japan_quakes function (deprecated since v0.6.0) ([#2301](https://github.com/GenericMappingTools/pygmt/pull/2301)) +* Remove the deprecated load_mars_shape function (deprecated since v0.6.0) ([#2304](https://github.com/GenericMappingTools/pygmt/pull/2304)) +* Remove the deprecated load_ocean_ridge_points function (deprecated since v0.6.0) ([#2308](https://github.com/GenericMappingTools/pygmt/pull/2308)) +* Remove the deprecated load_sample_bathymetry function (deprecated since v0.6.0) ([#2305](https://github.com/GenericMappingTools/pygmt/pull/2305)) +* Remove the deprecated load_usgs_quakes function (deprecated since v0.6.0) ([#2306](https://github.com/GenericMappingTools/pygmt/pull/2306)) +* pygmt.grdtrack: Remove the warning about the incorrect parameter order of 'points, grid' (warned since v0.7.0) ([#2312](https://github.com/GenericMappingTools/pygmt/pull/2312)) + +### Bug Fixes + +* GMTDataArrayAccessor: Fallback to default grid registration and gtype if the grid source file doesn't exist ([#2009](https://github.com/GenericMappingTools/pygmt/pull/2009)) +* Figure.subplot: Fix setting "sharex", "sharey", and "frame" in combination with Figure.basemap ([#2417](https://github.com/GenericMappingTools/pygmt/pull/2417)) +* Figure.subplot: Fix strange positioning issues after exiting subplot ([#2427](https://github.com/GenericMappingTools/pygmt/pull/2427)) +* pygmt.config: Correctly reset to default values that contain whitespaces ([#2331](https://github.com/GenericMappingTools/pygmt/pull/2331)) +* pygmt.set_display: Do nothing when the display method is set to 'none' ([#2450](https://github.com/GenericMappingTools/pygmt/pull/2450)) + +### Documentation + +* GMTDataArrayAccessor: Add inline examples for setting GMT specific properties ([#2370](https://github.com/GenericMappingTools/pygmt/pull/2370)) +* Document limitations of GMT xarray accessors ([#2375](https://github.com/GenericMappingTools/pygmt/pull/2375)) +* Revise the notes about registration and gtype of remote datasets ([#2384](https://github.com/GenericMappingTools/pygmt/pull/2384)) +* Add project keywords to the pyproject.toml file ([#2315](https://github.com/GenericMappingTools/pygmt/pull/2315)) +* Add inline example for colorbar ([#2373](https://github.com/GenericMappingTools/pygmt/pull/2373)) +* Add inline example for grdview ([#2381](https://github.com/GenericMappingTools/pygmt/pull/2381)) +* Add inline example for load_earth_mask ([#2355](https://github.com/GenericMappingTools/pygmt/pull/2355)) +* Add inline example for load_earth_vertical_gravity_gradient ([#2356](https://github.com/GenericMappingTools/pygmt/pull/2356)) +* Add inline examples and improve documentation for pygmt.set_display ([#2458](https://github.com/GenericMappingTools/pygmt/pull/2458)) +* Add gallery example showing how to use patterns via the "fill" parameter (or similar parameters) ([#2329](https://github.com/GenericMappingTools/pygmt/pull/2329)) +* Add gallery example for scatter plot with histograms on sides ([#2410](https://github.com/GenericMappingTools/pygmt/pull/2410)) +* Add gallery example showing how to use advanced grdgradient via the "azimuth" & "normalize" parameters ([#2354](https://github.com/GenericMappingTools/pygmt/pull/2354)) +* Add gallery example for the Figure.timestamp method ([#2391](https://github.com/GenericMappingTools/pygmt/pull/2391)) +* Expand gallery example "Colorbar" for categorical data ([#2395](https://github.com/GenericMappingTools/pygmt/pull/2395)) +* Expand gallery example "Focal mechanisms" to use "*fill" and "pen" ([#2433](https://github.com/GenericMappingTools/pygmt/pull/2433)) +* Add working example to quickstart section of README ([#2369](https://github.com/GenericMappingTools/pygmt/pull/2369)) +* Recommend Mambaforge and mamba in the installation and contributing guides ([#2385](https://github.com/GenericMappingTools/pygmt/pull/2385)) + +### Maintenance + +* Add the GMTSampleData class to simplify the load_sample_data and list_sample_data functions ([#2342](https://github.com/GenericMappingTools/pygmt/pull/2342)) +* Add a new target 'doctest' to run doctests only and simplify Makefile ([#2443](https://github.com/GenericMappingTools/pygmt/pull/2443)) +* Add a package-level variable `__gmt_version__` for development use ([#2366](https://github.com/GenericMappingTools/pygmt/pull/2366)) +* Allow printing show_versions() to in-memory buffer to enable testing ([#2399](https://github.com/GenericMappingTools/pygmt/pull/2399)) +* Accept a dict containing configurable GMT parameters in build_arg_string ([#2324](https://github.com/GenericMappingTools/pygmt/pull/2324)) +* Publish to TestPyPI and PyPI via OpenID Connect token ([#2453](https://github.com/GenericMappingTools/pygmt/pull/2453)) +* Remove --sdist --wheel flags from the build command ([#2420](https://github.com/GenericMappingTools/pygmt/pull/2420)) +* Replace ModuleNotFoundError with the more general ImportError ([#2441](https://github.com/GenericMappingTools/pygmt/pull/2441)) + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Yvonne Fröhlich](https://github.com/yvonnefroehlich) +* [Wei Ji Leong](https://github.com/weiji14) +* [Michael Grund](https://github.com/michaelgrund) +* [Will Schlitzer](https://github.com/willschlitzer) +* [Jing-Hui Tong](https://github.com/jhtong33) +* [Max Jones](https://github.com/maxrjones) + +--- + +## Release v0.8.0 (2022/12/30) + +[![Digital Object Identifier for PyGMT v0.8.0](https://zenodo.org/badge/DOI/10.5281/zenodo.7481934.svg)](https://doi.org/10.5281/zenodo.7481934) + +### Highlights + +* 🎉 **Eighth minor release of PyGMT** 🎉 +* Added support for tab auto-completion for all GMT default parameters ([#2213](https://github.com/GenericMappingTools/pygmt/pull/2213)) +* Created functions to download GMT remote datasets ([#1786](https://github.com/GenericMappingTools/pygmt/issues/1786)) +* Wrapped the ternary module ([#1431](https://github.com/GenericMappingTools/pygmt/pull/1431)) +* Added an intro tutorial for creating contour maps ([#2126](https://github.com/GenericMappingTools/pygmt/pull/2126)) + +### New Features + +* Add load_earth_free_air_anomaly function for Earth free-air anomaly dataset ([#2238](https://github.com/GenericMappingTools/pygmt/pull/2238)) +* Add load_earth_geoid function for Earth Geoid dataset ([#2236](https://github.com/GenericMappingTools/pygmt/pull/2236)) +* Add load_earth_magnetic_anomaly function for Earth magnetic anomaly dataset ([#2196](https://github.com/GenericMappingTools/pygmt/pull/2196), [#2239](https://github.com/GenericMappingTools/pygmt/pull/2239), [#2241](https://github.com/GenericMappingTools/pygmt/pull/2241)) +* Add load_earth_vertical_gravity_gradient function for Earth vertical gravity gradient dataset ([#2240](https://github.com/GenericMappingTools/pygmt/pull/2240)) +* load_earth_relief: Add the support of data sources "gebco" , "gebcosi", and "synbath" ([#1818](https://github.com/GenericMappingTools/pygmt/pull/1818), [#2162](https://github.com/GenericMappingTools/pygmt/pull/2162), [#2192](https://github.com/GenericMappingTools/pygmt/pull/2192), [#2281](https://github.com/GenericMappingTools/pygmt/pull/2281)) +* Wrap ternary ([#1431](https://github.com/GenericMappingTools/pygmt/pull/1431)) + +### Enhancements + +* Set gridline (if available) as the default grid registration for remote datasets ([#2266](https://github.com/GenericMappingTools/pygmt/pull/2266)) +* Add ternary sample dataset ([#2211](https://github.com/GenericMappingTools/pygmt/pull/2211)) +* Figure.ternary: Add parameters "alabel", "blabel", and "clabel" ([#2139](https://github.com/GenericMappingTools/pygmt/pull/2139)) +* Figure.psconvert: Add a new alias "gs_path" (-G) ([#2076](https://github.com/GenericMappingTools/pygmt/pull/2076)) +* Figure.psconvert: Check if the given prefix is valid ([#2170](https://github.com/GenericMappingTools/pygmt/pull/2170)) +* Figure.savefig: Raise a FileNotFoundError if the parent directory doesn't exist ([#2160](https://github.com/GenericMappingTools/pygmt/pull/2160)) +* Figure.show: Allow keyword arguments passed to Figure.psconvert ([#2078](https://github.com/GenericMappingTools/pygmt/pull/2078)) +* pygmt.config: Support tab auto-completion for all GMT defaults ([#2213](https://github.com/GenericMappingTools/pygmt/pull/2213)) +* Rewrite the meca function to support offsetting and labeling beachballs ([#1784](https://github.com/GenericMappingTools/pygmt/pull/1784)) + +### Deprecations + +* Deprecate xshift (X) and yshift (Y) aliases from all plotting modules (remove in v0.12.0) ([#2071](https://github.com/GenericMappingTools/pygmt/pull/2071)) +* Figure.plot: Deprecate parameter "color" to "fill" (remove in v0.12.0) ([#2177](https://github.com/GenericMappingTools/pygmt/pull/2177)) +* Figure.plot3d: Deprecate parameter "color" to "fill" (remove in v0.12.0) ([#2178](https://github.com/GenericMappingTools/pygmt/pull/2178)) +* Figure.rose: Deprecate parameter color to fill (remove in v0.12.0) ([#2181](https://github.com/GenericMappingTools/pygmt/pull/2181)) +* Figure.velo: Deprecate parameters "color" to "fill" and "uncertaintycolor" to "uncertaintyfill" (remove in v0.12.0) ([#2206](https://github.com/GenericMappingTools/pygmt/pull/2206)) +* Figure.wiggle: Deprecate parameter "color" (remove in v0.12.0) and add "fillpositive"/"fillnegative" ([#2205](https://github.com/GenericMappingTools/pygmt/pull/2205)) +* Figure.psconvert: Remove the deprecated parameter "icc_gray" (deprecated since v0.6.0) ([#2267](https://github.com/GenericMappingTools/pygmt/pull/2267)) +* Figure.text: Deprecate parameter "incols" to "use_word" (remove in v0.10.0) ([#1964](https://github.com/GenericMappingTools/pygmt/pull/1964)) + +### Bug Fixes + +* Figure.meca: Fix line and circle of offset parameter for dict/pandas input ([#2226](https://github.com/GenericMappingTools/pygmt/pull/2226)) +* Figure.meca: Fix beachball offsetting with dict/pandas inputs ([#2202](https://github.com/GenericMappingTools/pygmt/pull/2202)) +* Figure.meca: Fix the bug when passing a dict of scalar values to the spec parameter ([#2174](https://github.com/GenericMappingTools/pygmt/pull/2174)) +* Figure.ternary: Fix the crash for pd.DataFrame input with GMT 6.3.0-6.4.0 ([#2274](https://github.com/GenericMappingTools/pygmt/pull/2274)) + +### Documentation + +* Add intro tutorial section for creating contour map ([#2126](https://github.com/GenericMappingTools/pygmt/pull/2126)) +* Add gallery example for Figure.ternary method ([#2138](https://github.com/GenericMappingTools/pygmt/pull/2138)) +* Add gallery example showing the usage of vertical and horizontal bars ([#1521](https://github.com/GenericMappingTools/pygmt/pull/1521)) +* Add inline example for coast ([#2142](https://github.com/GenericMappingTools/pygmt/pull/2142)) +* Add inline example for grdcontour ([#2148](https://github.com/GenericMappingTools/pygmt/pull/2148)) +* Add inline example for grdimage ([#2146](https://github.com/GenericMappingTools/pygmt/pull/2146)) +* Add inline example for grd2cpt ([#2145](https://github.com/GenericMappingTools/pygmt/pull/2145)) +* Add inline example for solar ([#2147](https://github.com/GenericMappingTools/pygmt/pull/2147)) +* Add SciPy 2022 talk to presentations ([#2053](https://github.com/GenericMappingTools/pygmt/pull/2053)) +* Add instructions to install pygmt kernel for Jupyter users ([#2153](https://github.com/GenericMappingTools/pygmt/pull/2153)) +* Improve instructions about setting GMT_LIBRARY_PATH env variable ([#2136](https://github.com/GenericMappingTools/pygmt/pull/2136)) +* Add badges for conda package version, license, and twitter ([#2081](https://github.com/GenericMappingTools/pygmt/pull/2081)) +* Add PyOpenSci peer reviewed badge to main README ([#2112](https://github.com/GenericMappingTools/pygmt/pull/2112)) + +### Maintenance + +* Add an internal function to load GMT remote datasets ([#2200](https://github.com/GenericMappingTools/pygmt/pull/2200)) +* Add support for Python 3.11 ([#2172](https://github.com/GenericMappingTools/pygmt/pull/2172)) +* NEP29: Test PyGMT on NumPy 1.24 ([#2256](https://github.com/GenericMappingTools/pygmt/pull/2256)) +* NEP29: Test PyGMT on NumPy 1.23 and 1.21 ([#2057](https://github.com/GenericMappingTools/pygmt/pull/2057)) +* Bump the GMT version in CI to 6.4.0 ([#1990](https://github.com/GenericMappingTools/pygmt/pull/1990)) +* Update baseline images for GMT 6.4.0 ([#1883](https://github.com/GenericMappingTools/pygmt/pull/1883)) +* Migrate Continuous Documentation from Vercel to Readthedocs ([#1859](https://github.com/GenericMappingTools/pygmt/pull/1859)) +* Set nested_sections to False for Sphinx-Gallery 0.11.0 regarding a correct navgation bar ([#2046](https://github.com/GenericMappingTools/pygmt/pull/2046)) +* Convert bug report, feature, and module request issue templates into yaml configured forms ([#2091](https://github.com/GenericMappingTools/pygmt/pull/2091), [#2214](https://github.com/GenericMappingTools/pygmt/pull/2214), [#2216](https://github.com/GenericMappingTools/pygmt/pull/2216)) +* doc: Set different html_baseurl for stable and dev versions ([#2158](https://github.com/GenericMappingTools/pygmt/pull/2158)) +* Update the instructions for checking README syntax ([#2265](https://github.com/GenericMappingTools/pygmt/pull/2265)) +* Use longname placeholders in the docstrings for common options ([#1932](https://github.com/GenericMappingTools/pygmt/pull/1932)) +* Add optional dependencies to pyproject.toml ([#2069](https://github.com/GenericMappingTools/pygmt/pull/2069)) +* Migrate project metadata from setup.py to pyproject.toml following PEP621 ([#1848](https://github.com/GenericMappingTools/pygmt/pull/1848)) +* Move blackdoc options to pyproject.toml ([#2093](https://github.com/GenericMappingTools/pygmt/pull/2093)) +* Move docformatter options from Makefile to pyproject.toml ([#2072](https://github.com/GenericMappingTools/pygmt/pull/2072)) +* Replace flake8 with flakeheaven ([#1847](https://github.com/GenericMappingTools/pygmt/pull/1847)) +* Add a workflow and Makefile target to test old GMT versions every Tuesday ([#2079](https://github.com/GenericMappingTools/pygmt/pull/2079)) +* Check if a module outputs to a temporary file using "Path().stat().st_size > 0" ([#2224](https://github.com/GenericMappingTools/pygmt/pull/2224)) +* pygmt.show_versions: Show GMT binary version and hide the Python interpreter path ([#1838](https://github.com/GenericMappingTools/pygmt/pull/1838)) +* Refactor grdview and grdimage to use virtualfile_from_data ([#1988](https://github.com/GenericMappingTools/pygmt/pull/1988)) +* Use the org-wide code of conduct ([#2020](https://github.com/GenericMappingTools/pygmt/pull/2020)) + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Yvonne Fröhlich](https://github.com/yvonnefroehlich) +* [Will Schlitzer](https://github.com/willschlitzer) +* [Michael Grund](https://github.com/michaelgrund) +* [Wei Ji Leong](https://github.com/weiji14) +* [Max Jones](https://github.com/maxrjones) + +--- + +## Release v0.7.0 (2022/07/01) + +[![Digital Object Identifier for PyGMT v0.7.0](https://zenodo.org/badge/DOI/10.5281/zenodo.6702566.svg)](https://doi.org/10.5281/zenodo.6702566) + +### Highlights + +* 🎉 **Seventh minor release of PyGMT** 🎉 +* Wrapped 3 GMT modules +* Added two new PyGMT tutorials and EGU 2022 short course to external resources page ([#1971](https://github.com/GenericMappingTools/pygmt/pull/1971) and [#1935](https://github.com/GenericMappingTools/pygmt/pull/1935)) + +### New Features + +* Wrap binstats ([#1652](https://github.com/GenericMappingTools/pygmt/pull/1652)) +* Wrap filter1d ([#1512](https://github.com/GenericMappingTools/pygmt/pull/1512)) +* Wrap dimfilter ([#1492](https://github.com/GenericMappingTools/pygmt/pull/1492)) + +### Enhancements + +* Support passing data in NumPy int8, int16, uint8 and uint16 dtypes to GMT ([#1963](https://github.com/GenericMappingTools/pygmt/pull/1963)) +* inset: Add region and projection aliases and fix two examples ([#1931](https://github.com/GenericMappingTools/pygmt/pull/1931)) +* basemap: Plotting frames if required parameters are not given ([#1909](https://github.com/GenericMappingTools/pygmt/pull/1909)) +* basemap: Added box alias for F ([#1894](https://github.com/GenericMappingTools/pygmt/pull/1894)) +* Add a sample dataset maunaLoa_co2 ([#1961](https://github.com/GenericMappingTools/pygmt/pull/1961)) +* Add a sample dataset notre_dame_topography ([#1920](https://github.com/GenericMappingTools/pygmt/pull/1920)) +* Add a sample dataset earth_relief_holes ([#1921](https://github.com/GenericMappingTools/pygmt/pull/1921)) + +### Deprecations + +* NEP29: Set minimum required version to NumPy 1.20+ ([#1985](https://github.com/GenericMappingTools/pygmt/pull/1985)) +* Figure.wiggle: Remove parameter 'columns', use 'incols' instead. ([#1977](https://github.com/GenericMappingTools/pygmt/pull/1977)) +* Figure.histogram and pygmt.info: Remove parameter 'table', use 'data' instead ([#1975](https://github.com/GenericMappingTools/pygmt/pull/1975)) +* pygmt.surface: Remove parameter 'outfile', use 'outgrid' instead ([#1976](https://github.com/GenericMappingTools/pygmt/pull/1976)) +* blockm/contour/plot/plot3d/rose/surface/wiggle: Change the parameter order of data array and input arrays ([#1978](https://github.com/GenericMappingTools/pygmt/pull/1978)) + +### Bug Fixes + +* grdtrack: Fix the bug when profile is given ([#1867](https://github.com/GenericMappingTools/pygmt/pull/1867)) +* Fix the grid accessor (grid registration and type) for 3D grids ([#1913](https://github.com/GenericMappingTools/pygmt/pull/1913)) + +### Documentation + +* Add instructions to install PyGMT using mamba ([#1967](https://github.com/GenericMappingTools/pygmt/pull/1967)) +* Improve two gallery examples regarding categorical colormaps ([#1934](https://github.com/GenericMappingTools/pygmt/pull/1934)) +* Add inline example to dimfilter ([#1956](https://github.com/GenericMappingTools/pygmt/pull/1956)) +* Add inline example to surface ([#1953](https://github.com/GenericMappingTools/pygmt/pull/1953)) +* Add inline example to grdfill ([#1954](https://github.com/GenericMappingTools/pygmt/pull/1954)) +* Add inline code examples to contributing guidelines ([#1924](https://github.com/GenericMappingTools/pygmt/pull/1924)) +* Add thumbnail images to the external resources page ([#1941](https://github.com/GenericMappingTools/pygmt/pull/1941)) +* Redesign the team gallery using sphinx-design's card directive ([#1937](https://github.com/GenericMappingTools/pygmt/pull/1937)) + +### Maintenance + +* Fix broken 'Improve this page' links using sphinx variable page_source_suffix ([#1969](https://github.com/GenericMappingTools/pygmt/pull/1969)) +* Split up functions for loading datasets ([#1955](https://github.com/GenericMappingTools/pygmt/pull/1955)) +* Set setuptools_scm fallback_version to follow PEP440 ([#1945](https://github.com/GenericMappingTools/pygmt/pull/1945)) +* Refactor text to use virtualfile_from_data ([#1121](https://github.com/GenericMappingTools/pygmt/pull/1121)) +* Run full tests only on Wednesday scheduled jobs ([#1833](https://github.com/GenericMappingTools/pygmt/pull/1833)) +* Run GMT Dev Tests on Monday, Wednesday and Friday only ([#1922](https://github.com/GenericMappingTools/pygmt/pull/1922)) +* Update GMT Dev Tests workflow to test on macOS-12 and ubuntu-22.04 ([#1918](https://github.com/GenericMappingTools/pygmt/pull/1918)) + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Will Schlitzer](https://github.com/willschlitzer) +* [Wei Ji Leong](https://github.com/weiji14) +* [Andre L. Belem](https://github.com/andrebelem) +* [Yvonne Fröhlich](https://github.com/yvonnefroehlich) +* [Max Jones](https://github.com/maxrjones) +* [Jack Beagley](https://github.com/jackbeagley) +* [Michael Grund](https://github.com/michaelgrund) + +--- + +## Release v0.6.1 (2022/04/11) + +[![Digital Object Identifier for PyGMT v0.6.1](https://zenodo.org/badge/DOI/10.5281/zenodo.6426493.svg)](https://doi.org/10.5281/zenodo.6426493) + +### Highlights + +* Patch release which allows passing None explicitly to pygmt functions ([#1872](https://github.com/GenericMappingTools/pygmt/pull/1872), [#1862](https://github.com/GenericMappingTools/pygmt/pull/1862), [#1857](https://github.com/GenericMappingTools/pygmt/pull/1857), [#1815](https://github.com/GenericMappingTools/pygmt/pull/1815)) +* A new tutorial for grdhisteq ([#1821](https://github.com/GenericMappingTools/pygmt/pull/1821)) + +### Bug Fixes + +* Fix pathlib support for plot and plot3d ([#1831](https://github.com/GenericMappingTools/pygmt/pull/1831)) + +### Documentation + +* Add inline example for grdvolume ([#1726](https://github.com/GenericMappingTools/pygmt/pull/1726)) +* Format author affiliations in CITATION.cff and AUTHORS.md ([#1844](https://github.com/GenericMappingTools/pygmt/pull/1844)) + +### Maintenance + +* NEP29: Run PyGMT tests and docs build on Python 3.10 ([#1868](https://github.com/GenericMappingTools/pygmt/pull/1868)) +* Let pygmt.show_versions() report geopandas version ([#1846](https://github.com/GenericMappingTools/pygmt/pull/1846)) +* Refactor build_arg_string to also deal with infile and outfile ([#1837](https://github.com/GenericMappingTools/pygmt/pull/1837)) +* Migrate build system settings to pyproject.toml following pep517 and pep518 ([#1845](https://github.com/GenericMappingTools/pygmt/pull/1845)) +* Use the build package to build sdist and wheel distributions ([#1823](https://github.com/GenericMappingTools/pygmt/pull/1823)) +* Let slash command /test-gmt-dev report job URL ([#1866](https://github.com/GenericMappingTools/pygmt/pull/1866)) + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Max Jones](https://github.com/maxrjones) +* [Wei Ji Leong](https://github.com/weiji14) +* [Michael Grund](https://github.com/michaelgrund) +* [Will Schlitzer](https://github.com/willschlitzer) + +--- + +## Release v0.6.0 (2022/03/14) + +[![Digital Object Identifier for PyGMT v0.6.0](https://zenodo.org/badge/DOI/10.5281/zenodo.6349217.svg)](https://doi.org/10.5281/zenodo.6349217) + +### Highlights + +* 🎉 **Sixth minor release of PyGMT** 🎉 +* New inline examples for 14 functions! +* Single `pygmt.datasets.load_sample_data` function for loading any sample dataset ([#1685](https://github.com/GenericMappingTools/pygmt/pull/1685)) +* Minimum required GMT version is now 6.3.0 ([#1649](https://github.com/GenericMappingTools/pygmt/pull/1649)) + +### New Features + +* Wrap triangulate ([#731](https://github.com/GenericMappingTools/pygmt/pull/731)) +* Wrap grdhisteq ([#1433](https://github.com/GenericMappingTools/pygmt/pull/1433)) + +### Enhancements + +* Add alias for blockmean's -S parameter ([#1601](https://github.com/GenericMappingTools/pygmt/pull/1601)) +* Allow users to set the waiting time when displaying a preview image using an external viewer ([#1618](https://github.com/GenericMappingTools/pygmt/pull/1618)) +* Raise an exception if the given parameter is not recognized and is longer than 2 characters ([#1792](https://github.com/GenericMappingTools/pygmt/pull/1792)) + +### Deprecations + +* Figure.plot/plot3d: Remove parameter "sizes", use "size" instead ([#1809](https://github.com/GenericMappingTools/pygmt/pull/1809)) +* Figure.contour/plot/plot3d/rose: Remove parameter "columns", use "incols" instead ([#1806](https://github.com/GenericMappingTools/pygmt/pull/1806)) +* Figure.psconvert: Add new aliases and deprecate parameter "icc_gray" (remove in v0.8.0) ([#1673](https://github.com/GenericMappingTools/pygmt/pull/1673)) +* NEP29: Set minimum required version to Python 3.8+ ([#1676](https://github.com/GenericMappingTools/pygmt/pull/1676)) +* NEP29: Set minimum required version to NumPy 1.19+ ([#1675](https://github.com/GenericMappingTools/pygmt/pull/1675)) + +### Bug Fixes + +* Allow passing arguments containing spaces into pygmt functions ([#1487](https://github.com/GenericMappingTools/pygmt/pull/1487)) +* Fix the spacing parameter processing for many modules ([#1805](https://github.com/GenericMappingTools/pygmt/pull/1805)) +* Fix missing gcmt convention keys in pygmt.meca ([#1611](https://github.com/GenericMappingTools/pygmt/pull/1611)) +* Fix the spacing parameter and check required parameters in xyz2grd ([#1804](https://github.com/GenericMappingTools/pygmt/pull/1804)) +* Fix UnicodeDecodeError with shapefiles for plot and plot3d ([#1695](https://github.com/GenericMappingTools/pygmt/pull/1695)) + +### Documentation + +* Add a shorter video introduction to the home page ([#1769](https://github.com/GenericMappingTools/pygmt/pull/1769)) +* Add Liam's 2021 ROSES video to learning resources ([#1760](https://github.com/GenericMappingTools/pygmt/pull/1760)) +* Add quick conda install instructions in main README ([#1717](https://github.com/GenericMappingTools/pygmt/pull/1717)) +* Add instructions for reporting upstream bugs to contributing.md ([#1610](https://github.com/GenericMappingTools/pygmt/pull/1610)) +* List key development dependencies to install for new contributors ([#1783](https://github.com/GenericMappingTools/pygmt/pull/1783)) +* Update Code of Conduct to v2.1 ([#1754](https://github.com/GenericMappingTools/pygmt/pull/1754)) +* Update the contributing guide about pushing changes to dvc and git ([#1776](https://github.com/GenericMappingTools/pygmt/pull/1776)) +* Update dataset links to the new remote-datasets site ([#1785](https://github.com/GenericMappingTools/pygmt/pull/1785)) +* Add more sections to the API docs ([#1643](https://github.com/GenericMappingTools/pygmt/pull/1643)) +* Add an "add a title" to starter tutorial ([#1688](https://github.com/GenericMappingTools/pygmt/pull/1688)) +* Reorganize tutorial section in the documentation sidebar ([#1603](https://github.com/GenericMappingTools/pygmt/pull/1603)) +* Update the starter tutorial introduction ([#1607](https://github.com/GenericMappingTools/pygmt/pull/1607)) +* Add gallery example to showcase blockmean ([#1598](https://github.com/GenericMappingTools/pygmt/pull/1598)) +* Add gallery example to showcase project ([#1696](https://github.com/GenericMappingTools/pygmt/pull/1696)) +* Update text symbol gallery example ([#1648](https://github.com/GenericMappingTools/pygmt/pull/1648)) +* Add inline example for blockmean ([#1729](https://github.com/GenericMappingTools/pygmt/pull/1729)) +* Add inline example for blockmedian ([#1730](https://github.com/GenericMappingTools/pygmt/pull/1730)) +* Add inline example for blockmode ([#1731](https://github.com/GenericMappingTools/pygmt/pull/1731)) +* Add inline example for grd2xyz ([#1713](https://github.com/GenericMappingTools/pygmt/pull/1713)) +* Add inline example for grdclip ([#1711](https://github.com/GenericMappingTools/pygmt/pull/1711)) +* Add inline example for grdcut ([#1689](https://github.com/GenericMappingTools/pygmt/pull/1689)) +* Add inline example for grdgradient ([#1720](https://github.com/GenericMappingTools/pygmt/pull/1720)) +* Add inline example for grdlandmask ([#1721](https://github.com/GenericMappingTools/pygmt/pull/1721)) +* Add inline example for grdproject ([#1722](https://github.com/GenericMappingTools/pygmt/pull/1722)) +* Add inline example for grdsample ([#1724](https://github.com/GenericMappingTools/pygmt/pull/1724)) +* Add inline example for grdtrack ([#1725](https://github.com/GenericMappingTools/pygmt/pull/1725)) +* Add inline example for select ([#1756](https://github.com/GenericMappingTools/pygmt/pull/1756)) +* Add inline example for sph2grd ([#1718](https://github.com/GenericMappingTools/pygmt/pull/1718)) +* Add inline example for xyz2grd ([#1719](https://github.com/GenericMappingTools/pygmt/pull/1719)) + +### Maintenance + +* Add a test to make sure the incols parameter works for pandas.DataFrame ([#1771](https://github.com/GenericMappingTools/pygmt/pull/1771)) +* Add load_static_earth_relief function for internal testing ([#1727](https://github.com/GenericMappingTools/pygmt/pull/1727)) +* Migrate pylint settings from .pylintrc to pyproject.toml ([#1755](https://github.com/GenericMappingTools/pygmt/pull/1755)) +* NEP29: Test PyGMT on NumPy 1.22 ([#1701](https://github.com/GenericMappingTools/pygmt/pull/1701)) +* Replace pkg_resources with importlib.metadata ([#1674](https://github.com/GenericMappingTools/pygmt/pull/1674)) +* Update deprecated -g common option syntax ([#1670](https://github.com/GenericMappingTools/pygmt/pull/1670)) +* Update deprecated -JG syntax ([#1659](https://github.com/GenericMappingTools/pygmt/pull/1659)) +* Use pytest-doctestplus to skip some inline doctests ([#1790](https://github.com/GenericMappingTools/pygmt/pull/1790)) +* Use Python 3.10 in Continuous Integration tests ([#1577](https://github.com/GenericMappingTools/pygmt/pull/1577)) + +### Contributors + +* [Will Schlitzer](https://github.com/willschlitzer) +* [Max Jones](https://github.com/maxrjones) +* [Dongdong Tian](https://github.com/seisman) +* [Michael Grund](https://github.com/michaelgrund) +* [Wei Ji Leong](https://github.com/weiji14) +* [Julius Busecke](https://github.com/jbusecke) + +--- + +## Release v0.5.0 (2021/10/29) + +[![Digital Object Identifier for PyGMT v0.5.0](https://zenodo.org/badge/DOI/10.5281/zenodo.5607255.svg)](https://doi.org/10.5281/zenodo.5607255) + +### Highlights + +* 🎉 **Fifth minor release of PyGMT** 🎉 +* Wrapped 12 GMT modules +* Standardized and reorder table inputs to be 'data, x, y, z' across functions ([#1479](https://github.com/GenericMappingTools/pygmt/pull/1479)) +* Added a gallery example showing usage of line objects from a geopandas.GeoDataFrame ([#1474](https://github.com/GenericMappingTools/pygmt/pull/1474)) + +### New Features + +* Wrap blockmode ([#1456](https://github.com/GenericMappingTools/pygmt/pull/1456)) +* Wrap gmtselect ([#1429](https://github.com/GenericMappingTools/pygmt/pull/1429)) +* Wrap grd2xyz ([#1284](https://github.com/GenericMappingTools/pygmt/pull/1284)) +* Wrap grdproject ([#1377](https://github.com/GenericMappingTools/pygmt/pull/1377)) +* Wrap grdsample ([#1380](https://github.com/GenericMappingTools/pygmt/pull/1380)) +* Wrap grdvolume ([#1299](https://github.com/GenericMappingTools/pygmt/pull/1299)) +* Wrap nearneighbor ([#1379](https://github.com/GenericMappingTools/pygmt/pull/1379)) +* Wrap project ([#1122](https://github.com/GenericMappingTools/pygmt/pull/1122)) +* Wrap sph2grd ([#1434](https://github.com/GenericMappingTools/pygmt/pull/1434)) +* Wrap sphdistance ([#1383](https://github.com/GenericMappingTools/pygmt/pull/1383)) +* Wrap sphinterpolate ([#1418](https://github.com/GenericMappingTools/pygmt/pull/1418)) +* Wrap xyz2grd ([#636](https://github.com/GenericMappingTools/pygmt/pull/636)) +* Add function to import seafloor crustal age dataset ([#1471](https://github.com/GenericMappingTools/pygmt/pull/1471)) +* Add pygmt.load_dataarray function ([#1439](https://github.com/GenericMappingTools/pygmt/pull/1439)) + +### Enhancements + +* Expand table-like input options for Figure.contour ([#1531](https://github.com/GenericMappingTools/pygmt/pull/1531)) +* Expand table-like input options for pygmt.surface ([#1455](https://github.com/GenericMappingTools/pygmt/pull/1455)) +* Raise GMTInvalidInput exception when required z is missing ([#1478](https://github.com/GenericMappingTools/pygmt/pull/1478)) +* Add support for passing pathlib.Path objects as filenames ([#1382](https://github.com/GenericMappingTools/pygmt/pull/1382)) +* Allow passing a list to the 'incols' parameter for blockm, grdtrack and text ([#1475](https://github.com/GenericMappingTools/pygmt/pull/1475)) +* Plot square or cube by default for OGR/GMT files with Point/MultiPoint types ([#1438](https://github.com/GenericMappingTools/pygmt/pull/1438)) +* Plot square or cube by default for geopandas Point/MultiPoint types ([#1405](https://github.com/GenericMappingTools/pygmt/pull/1405)) +* Add area_thresh to COMMON_OPTIONS ([#1426](https://github.com/GenericMappingTools/pygmt/pull/1426)) +* Add function to import Mars dataset ([#1420](https://github.com/GenericMappingTools/pygmt/pull/1420)) +* Add function to import hotspot dataset ([#1386](https://github.com/GenericMappingTools/pygmt/pull/1386)) + +### Deprecations + +* pygmt.blockm*: Reorder input parameters to 'data, x, y, z' ([#1565](https://github.com/GenericMappingTools/pygmt/pull/1565)) +* pygmt.surface: Reorder input parameters to 'data, x, y, z' ([#1562](https://github.com/GenericMappingTools/pygmt/pull/1562)) +* Figure.contour: Reorder input parameters to 'data, x, y, z' ([#1561](https://github.com/GenericMappingTools/pygmt/pull/1561)) +* Figure.plot3d: Reorder input parameters to 'data, x, y, z' ([#1560](https://github.com/GenericMappingTools/pygmt/pull/1560)) +* Figure.plot: Reorder input parameters to "data, x, y" ([#1547](https://github.com/GenericMappingTools/pygmt/pull/1547)) +* Figure.rose: Reorder input parameters to 'data, length, azimuth' ([#1546](https://github.com/GenericMappingTools/pygmt/pull/1546)) +* Figure.wiggle: Reorder input parameter to 'data, x, y, z' ([#1548](https://github.com/GenericMappingTools/pygmt/pull/1548)) +* Figure.histogram: Deprecate parameter "table" to "data" (remove in v0.7.0) ([#1540](https://github.com/GenericMappingTools/pygmt/pull/1540)) +* pygmt.info: Deprecate parameter "table" to "data" (remove in v0.7.0) ([#1538](https://github.com/GenericMappingTools/pygmt/pull/1538)) +* Figure.wiggle: Deprecate parameter "columns" to "incols" (remove in v0.7.0) ([#1504](https://github.com/GenericMappingTools/pygmt/pull/1504)) +* pygmt.surface: Deprecate parameter "outfile" to "outgrid" (remove in v0.7.0) ([#1458](https://github.com/GenericMappingTools/pygmt/pull/1458)) +* NEP29: Set minimum required version to NumPy 1.18+ ([#1430](https://github.com/GenericMappingTools/pygmt/pull/1430)) + +### Bug Fixes + +* Allow GMTDataArrayAccessor to work on sliced datacubes ([#1581](https://github.com/GenericMappingTools/pygmt/pull/1581)) +* Allow non-string color when input data is a matrix or a file for plot and plot3d ([#1526](https://github.com/GenericMappingTools/pygmt/pull/1526)) +* Raise RuntimeWarning instead of an exception for irregular grid spacing ([#1530](https://github.com/GenericMappingTools/pygmt/pull/1530)) +* Raise an error for zero increment grid ([#1484](https://github.com/GenericMappingTools/pygmt/pull/1484)) + +### Documentation + +* Add CITATION.cff file for PyGMT ([#1592](https://github.com/GenericMappingTools/pygmt/pull/1592)) +* Update region and projection standard docstrings ([#1510](https://github.com/GenericMappingTools/pygmt/pull/1510)) +* Document gmtwhich -Ga option to download to appropriate cache folder ([#1554](https://github.com/GenericMappingTools/pygmt/pull/1554)) +* Add gallery example showing the usage of text symbols ([#1522](https://github.com/GenericMappingTools/pygmt/pull/1522)) +* Add gallery example for grdgradient ([#1428](https://github.com/GenericMappingTools/pygmt/pull/1428)) +* Add gallery example for grdlandmask ([#1469](https://github.com/GenericMappingTools/pygmt/pull/1469)) +* Add missing aliases to pygmt.grdgradient ([#1515](https://github.com/GenericMappingTools/pygmt/pull/1515)) +* Add missing aliases to pygmt.sphdistance ([#1516](https://github.com/GenericMappingTools/pygmt/pull/1516)) +* Add missing aliases to pygmt.blockmean and pygmt.blockmedian ([#1500](https://github.com/GenericMappingTools/pygmt/pull/1500)) +* Add missing aliases to pygmt.Figure.wiggle ([#1498](https://github.com/GenericMappingTools/pygmt/pull/1498)) +* Add missing aliases to pygmt.Figure.velo ([#1497](https://github.com/GenericMappingTools/pygmt/pull/1497)) +* Add missing aliases to pygmt.surface ([#1501](https://github.com/GenericMappingTools/pygmt/pull/1501)) +* Add missing aliases to pygmt.Figure.plot3d ([#1503](https://github.com/GenericMappingTools/pygmt/pull/1503)) +* Add missing aliases to pygmt.grdlandmask ([#1423](https://github.com/GenericMappingTools/pygmt/pull/1423)) +* Add missing aliases to pygmt.grdtrack ([#1499](https://github.com/GenericMappingTools/pygmt/pull/1499)) +* Add missing aliases to pygmt.Figure.plot ([#1502](https://github.com/GenericMappingTools/pygmt/pull/1502)) +* Add missing aliases to pygmt.Figure.text ([#1448](https://github.com/GenericMappingTools/pygmt/pull/1448)) +* Add missing aliases to pygmt.Figure.histogram ([#1451](https://github.com/GenericMappingTools/pygmt/pull/1451)) +* Add missing alias to pygmt.Figure.legend ([#1453](https://github.com/GenericMappingTools/pygmt/pull/1453)) +* Add missing aliases to pygmt.Figure.rose ([#1452](https://github.com/GenericMappingTools/pygmt/pull/1452)) +* Add missing alias to pygmt.Figure.grdview ([#1450](https://github.com/GenericMappingTools/pygmt/pull/1450)) +* Add missing aliases to pygmt.Figure.image.py ([#1449](https://github.com/GenericMappingTools/pygmt/pull/1449)) +* Add missing common options to contour ([#1446](https://github.com/GenericMappingTools/pygmt/pull/1446)) +* Add missing 'incols' alias to info ([#1476](https://github.com/GenericMappingTools/pygmt/pull/1476)) + +### Maintenance + +* Add support for Python 3.10 ([#1591](https://github.com/GenericMappingTools/pygmt/pull/1591)) +* Make IPython partially optional on CI to increase test coverage of figure.py ([#1496](https://github.com/GenericMappingTools/pygmt/pull/1496)) +* Use mamba to install Continuous Integration dependencies ([#841](https://github.com/GenericMappingTools/pygmt/pull/841)) +* Remove deprecated codecov dependency from CI ([#1494](https://github.com/GenericMappingTools/pygmt/pull/1494)) +* Add the use of Flake8 to check examples and fix warnings ([#1477](https://github.com/GenericMappingTools/pygmt/pull/1477)) + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Michael Grund](https://github.com/michaelgrund) +* [Will Schlitzer](https://github.com/willschlitzer) +* [Wei Ji Leong](https://github.com/weiji14) +* [Max Jones](https://github.com/maxrjones) +* [Yohai Magen](https://github.com/yohaimagen) +* [Amanda Leaman](https://github.com/arleaman) +* [@daroari](https://github.com/daroari) +* [@obaney](https://github.com/obaney) +* [@srijac](https://github.com/srijac) +* [Andrés Ignacio Torres](https://github.com/aitorres) +* [Becky Salvage](https://github.com/BeckySalvage) +* [Claudio Satriano](https://github.com/claudiodsf) +* [Jamie J Quinn](https://github.com/JamieJQuinn) +* [@carocamargo](https://github.com/carocamargo) + +---- + +## Release v0.4.1 (2021/08/07) + +[![Digital Object Identifier for PyGMT v0.4.1](https://zenodo.org/badge/DOI/10.5281/zenodo.5162003.svg)](https://doi.org/10.5281/zenodo.5162003) + +### Highlights + +* 🎉 **Patch release with multiple gallery examples** 🎉 +* Change default GitHub branch name from "master" to "main" to increase inclusivity ([#1360](https://github.com/GenericMappingTools/pygmt/pull/1360)) +* Add a "[PyGMT Team](https://www.pygmt.org/latest/team.html)" page ([#1308](https://github.com/GenericMappingTools/pygmt/pull/1308)) + +### Enhancements + +* Add common alias "verbose" (V) to grdlandmask and savefig ([#1343](https://github.com/GenericMappingTools/pygmt/pull/1343)) + +### Bug Fixes + +* Change invalid input conditions in grdtrack ([#1376](https://github.com/GenericMappingTools/pygmt/pull/1376)) +* Fix bug so that x2sys_cross accepts dataframes with NaN values ([#1369](https://github.com/GenericMappingTools/pygmt/pull/1369)) + +### Documentation + +* Combine documentation and compatibility sections in README ([#1415](https://github.com/GenericMappingTools/pygmt/pull/1415)) +* Add a gallery example for grdclip ([#1396](https://github.com/GenericMappingTools/pygmt/pull/1396)) +* Add a gallery example for different colormaps in subplots ([#1394](https://github.com/GenericMappingTools/pygmt/pull/1394)) +* Add a gallery example for the contour method ([#1387](https://github.com/GenericMappingTools/pygmt/pull/1387)) +* Add a gallery example showing individual custom symbols ([#1348](https://github.com/GenericMappingTools/pygmt/pull/1348)) +* Add common option aliases to COMMON_OPTIONS in decorators.py ([#1407](https://github.com/GenericMappingTools/pygmt/pull/1407)) +* Add return statement to grdclip and grdgradient docstring ([#1390](https://github.com/GenericMappingTools/pygmt/pull/1390)) +* Restructure contributing.md to separate docs/general info from contributing code section ([#1339](https://github.com/GenericMappingTools/pygmt/pull/1339)) + +### Maintenance + +* Add tomli as a dependency in GMT Dev Tests ([#1401](https://github.com/GenericMappingTools/pygmt/pull/1401)) +* NEP29: Test PyGMT on NumPy 1.21 ([#1355](https://github.com/GenericMappingTools/pygmt/pull/1355)) + +### Contributors + +* [Max Jones](https://github.com/maxrjones) +* [Will Schlitzer](https://github.com/willschlitzer) +* [Michael Grund](https://github.com/michaelgrund) +* [Wei Ji Leong](https://github.com/weiji14) +* [Yohai Magen](https://github.com/yohaimagen) +* [Jiayuan Yao](https://github.com/core-man) +* [Dongdong Tian](https://github.com/seisman) +* [Kadatatlu Kishore](https://github.com/kadatatlukishore) +* [@sean0921](https://github.com/sean0921) +* [Soham Banerjee](https://github.com/soham4abc) + +---- + +## Release v0.4.0 (2021/06/20) + +[![Digital Object Identifier for PyGMT v0.4.0](https://zenodo.org/badge/DOI/10.5281/zenodo.4978645.svg)](https://doi.org/10.5281/zenodo.4978645) + +### Highlights + +* 🎉 **Fourth minor release of PyGMT** 🎉 +* Add tutorials for datetime data ([#1193](https://github.com/GenericMappingTools/pygmt/pull/1193)) and plotting vectors ([#1070](https://github.com/GenericMappingTools/pygmt/pull/1070)) +* Support tab auto-completion in Jupyter ([#1282](https://github.com/GenericMappingTools/pygmt/pull/1282)) +* Minimum required GMT version is now 6.2.0 or newer ([#1321](https://github.com/GenericMappingTools/pygmt/pull/1321)) + +### New Features + +* Wrap blockmean ([#1092](https://github.com/GenericMappingTools/pygmt/pull/1092)) +* Wrap grdclip ([#1261](https://github.com/GenericMappingTools/pygmt/pull/1261)) +* Wrap grdfill ([#1276](https://github.com/GenericMappingTools/pygmt/pull/1276)) +* Wrap grdgradient ([#1269](https://github.com/GenericMappingTools/pygmt/pull/1269)) +* Wrap grdlandmask ([#1273](https://github.com/GenericMappingTools/pygmt/pull/1273)) +* Wrap histogram ([#1072](https://github.com/GenericMappingTools/pygmt/pull/1072)) +* Wrap rose ([#794](https://github.com/GenericMappingTools/pygmt/pull/794)) +* Wrap solar ([#804](https://github.com/GenericMappingTools/pygmt/pull/804)) +* Wrap velo ([#525](https://github.com/GenericMappingTools/pygmt/pull/525)) +* Wrap wiggle ([#1145](https://github.com/GenericMappingTools/pygmt/pull/1145)) +* Add new function to load fractures sample data ([#1101](https://github.com/GenericMappingTools/pygmt/pull/1101)) +* Allow load_earth_relief() to load the original land-only 01s or 03s SRTM tiles ([#976](https://github.com/GenericMappingTools/pygmt/pull/976)) +* Handle geopandas and shapely geometries via geo_interface link ([#1000](https://github.com/GenericMappingTools/pygmt/pull/1000)) +* Support passing string type numbers, geographic coordinates and datetimes ([#975](https://github.com/GenericMappingTools/pygmt/pull/975)) + +### Enhancements + +* Allow passing an array as intensity for plot3d ([#1109](https://github.com/GenericMappingTools/pygmt/pull/1109)) +* Allow passing an array as intensity for plot ([#1065](https://github.com/GenericMappingTools/pygmt/pull/1065)) +* Allow passing xr.DataArray as shading to grdimage ([#750](https://github.com/GenericMappingTools/pygmt/pull/750)) +* Allow x/y/z input for blockmedian and blockmean ([#1319](https://github.com/GenericMappingTools/pygmt/pull/1319)) +* Allow pygmt.which to accept a list of filenames as input ([#1312](https://github.com/GenericMappingTools/pygmt/pull/1312)) +* Refactor blockm* to use virtualfile_from_data and improve i/o ([#1280](https://github.com/GenericMappingTools/pygmt/pull/1280)) +* Refactor grdtrack to use virtualfile_from_data and improve i/o to pandas.DataFrame ([#1189](https://github.com/GenericMappingTools/pygmt/pull/1189)) +* Add parameters to histogram ([#1249](https://github.com/GenericMappingTools/pygmt/pull/1249)) +* Add alias 'aspatial' to methods blockmedian, info, plot, plot3d, surface ([#1090](https://github.com/GenericMappingTools/pygmt/pull/1090)) +* Add alias 'registration' to methods blockmean, info, grdfilter, surface ([#1089](https://github.com/GenericMappingTools/pygmt/pull/1089)) +* Add incols to COMMON_OPTIONS, blockmean, and blockmedian ([#1300](https://github.com/GenericMappingTools/pygmt/pull/1300)) +* Improve Figure.show for displaying previews in Jupyter notebooks and external viewers ([#529](https://github.com/GenericMappingTools/pygmt/pull/529)) +* Let Figure.savefig recommend .eps or .pdf when .ps extension is used ([#1307](https://github.com/GenericMappingTools/pygmt/pull/1307)) + +### Deprecations + +* Figure.contour: Deprecate parameter "columns" to "incols" (remove in v0.6.0) ([#1303](https://github.com/GenericMappingTools/pygmt/pull/1303)) +* Figure.plot: Deprecate parameter "sizes" to "size" (remove in v0.6.0) ([#1254](https://github.com/GenericMappingTools/pygmt/pull/1254)) +* Figure.plot: Deprecate parameter "columns" to "incols" (remove in v0.6.0) ([#1298](https://github.com/GenericMappingTools/pygmt/pull/1298)) +* Figure.plot3d: Deprecate parameter "sizes" to "size" (remove in v0.6.0) ([#1258](https://github.com/GenericMappingTools/pygmt/pull/1258)) +* Figure.plot3d: Deprecate parameter "columns" to "incols" (remove in v0.6.0) ([#1040](https://github.com/GenericMappingTools/pygmt/pull/1040)) +* Figure.rose: Deprecate parameter "columns" to "incols" (remove in v0.6.0) ([#1306](https://github.com/GenericMappingTools/pygmt/pull/1306)) +* NEP29: Set minimum required versions to NumPy 1.17+ and Python 3.7+ ([#1074](https://github.com/GenericMappingTools/pygmt/pull/1074)) +* Raise a warning for the use of short-form parameters when long-forms are available ([#1316](https://github.com/GenericMappingTools/pygmt/pull/1316)) + +### Bug Fixes + +* Allow pandas.Series inputs to fig.histogram and pygmt.info ([#1329](https://github.com/GenericMappingTools/pygmt/pull/1329)) +* Explicitly use netcdf4 engine in xarray.open_dataarray to read grd files ([#1264](https://github.com/GenericMappingTools/pygmt/pull/1264)) +* Let Figure.savefig support filenames with spaces ([#1116](https://github.com/GenericMappingTools/pygmt/pull/1116)) +* Let Figure.show(method='external') work well in Python scripts ([#1062](https://github.com/GenericMappingTools/pygmt/pull/1062)) + +### Documentation + +* Add histogram gallery example ([#1272](https://github.com/GenericMappingTools/pygmt/pull/1272)) +* Add a gallery example showing individual basic geometric symbols ([#1211](https://github.com/GenericMappingTools/pygmt/pull/1211)) +* Specify rectangle's width and height via style parameter in multi-parameter symbols example ([#1325](https://github.com/GenericMappingTools/pygmt/pull/1325)) +* Update the inset gallery example ([#1287](https://github.com/GenericMappingTools/pygmt/pull/1287)) +* Add categorical colorbars for plot, plot3d and line colors gallery examples ([#1267](https://github.com/GenericMappingTools/pygmt/pull/1267)) +* Apply NIST SI unit convention to some gallery examples ([#1194](https://github.com/GenericMappingTools/pygmt/pull/1194)) +* Use colorblind-friendly colors in the scatter plots gallery example ([#1013](https://github.com/GenericMappingTools/pygmt/pull/1013)) +* Added documentation for three oblique mercator projections ([#1251](https://github.com/GenericMappingTools/pygmt/pull/1251)) +* Add a list of external PyGMT resources ([#1210](https://github.com/GenericMappingTools/pygmt/pull/1210)) +* Complete documentation for grdtrack ([#1190](https://github.com/GenericMappingTools/pygmt/pull/1190)) +* Add projection and region to grdview docstring ([#1295](https://github.com/GenericMappingTools/pygmt/pull/1295)) +* Add common alias spacing (-I) for specifying grid increments ([#1288](https://github.com/GenericMappingTools/pygmt/pull/1288)) +* Standardize docstrings for table-like inputs ([#1186](https://github.com/GenericMappingTools/pygmt/pull/1186)) +* Clarify that the "transparency" parameter in plot/plot3d/text can be 1d array ([#1265](https://github.com/GenericMappingTools/pygmt/pull/1265)) +* Clarify that the "color" parameter in plot/plot3d can be 1d array ([#1260](https://github.com/GenericMappingTools/pygmt/pull/1260)) +* Clarify interplay of spacing and per_column in info ([#1127](https://github.com/GenericMappingTools/pygmt/pull/1127)) +* Remove the "full test" section from installation guide ([#1206](https://github.com/GenericMappingTools/pygmt/pull/1206)) +* Clarify position of deprecate_parameter decorator to be above use_alias ([#1302](https://github.com/GenericMappingTools/pygmt/pull/1302)) +* Add guidelines for managing issues to maintenance.md ([#1301](https://github.com/GenericMappingTools/pygmt/pull/1301)) +* Add alias name convention to CONTRIBUTING.md ([#1256](https://github.com/GenericMappingTools/pygmt/pull/1256)) +* Move contributing guide details to website and rename two sections ([#1335](https://github.com/GenericMappingTools/pygmt/pull/1335)) +* Update the check_figures_equal testing section in CONTRIBUTING.md ([#1108](https://github.com/GenericMappingTools/pygmt/pull/1108)) +* Revise Pull Request review process in CONTRIBUTING.md ([#1119](https://github.com/GenericMappingTools/pygmt/pull/1119)) + +### Maintenance + +* Add a workflow to upload baseline images as a release asset ([#1317](https://github.com/GenericMappingTools/pygmt/pull/1317)) +* Add regression test for grdimage plotting an xarray.DataArray grid subset ([#1314](https://github.com/GenericMappingTools/pygmt/pull/1314)) +* Add download_test_data to download data files used in tests ([#1310](https://github.com/GenericMappingTools/pygmt/pull/1310)) +* Remove xfails and workarounds for datetime inputs into pygmt.info ([#1236](https://github.com/GenericMappingTools/pygmt/pull/1236)) +* Improve the DVC image diff workflow to support side-by-side comparison of modified images ([#1219](https://github.com/GenericMappingTools/pygmt/pull/1219)) +* Document the deprecation policy and add the deprecate_parameter decorator to deprecate parameters ([#1160](https://github.com/GenericMappingTools/pygmt/pull/1160)) +* Convert booleans arguments in build_arg_string, not in kwargs_to_strings ([#1125](https://github.com/GenericMappingTools/pygmt/pull/1125)) +* Create GitHub Action workflow for reporting DVC image diffs ([#1104](https://github.com/GenericMappingTools/pygmt/pull/1104)) +* Update "GMT Dev Tests" workflow to test macOS-11.0 and pre-release Python packages ([#1105](https://github.com/GenericMappingTools/pygmt/pull/1105)) +* Initialize data version control for managing test images ([#1036](https://github.com/GenericMappingTools/pygmt/pull/1036)) +* Separate workflows for running tests and building documentation ([#1033](https://github.com/GenericMappingTools/pygmt/pull/1033)) + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Wei Ji Leong](https://github.com/weiji14) +* [Michael Grund](https://github.com/michaelgrund) +* [Max Jones](https://github.com/maxrjones) +* [Will Schlitzer](https://github.com/willschlitzer) +* [Jiayuan Yao](https://github.com/core-man) +* [Abhishek Anant](https://github.com/itsabhianant) +* [Claire Klima](https://github.com/cklima616) +* [Megan Munzek](https://github.com/munzekm) +* [Michael Neumann](https://github.com/MichaeINeumann) +* [Nathan Loria](https://github.com/Nathandloria) +* [Noor Buchi](https://github.com/noorbuchi) +* [Shivani chauhan](https://github.com/xdshivani) +* [@alperen-kilic](https://github.com/alperen-kilic) +* [Loïc Houpert](https://github.com/lhoupert) +* [Emily McMullan](https://github.com/eemcmullan) +* [Lawrence Qupty](https://github.com/Lawqup) +* [Matthew Tankersley](https://github.com/mdtanker) +* [@shahid-0](https://github.com/shahid-0) +* [Vitor Gratiere Torres](https://github.com/vitorgt) + +---- + +## Release v0.3.1 (2021/03/14) + +[![Digital Object Identifier for PyGMT v0.3.1](https://zenodo.org/badge/DOI/10.5281/zenodo.4592991.svg)](https://doi.org/10.5281/zenodo.4592991) + +### Highlights + +* 🎉 **Multiple bug fixes and an improved gallery** 🎉 +* Reorganized gallery examples into new categories ([#995](https://github.com/GenericMappingTools/pygmt/pull/995)) +* Added gallery examples for plotting vectors ([#950](https://github.com/GenericMappingTools/pygmt/pull/950), [#890](https://github.com/GenericMappingTools/pygmt/pull/890)) +* Last version to support GMT 6.1.1, future PyGMT versions will require GMT 6.2.0 or newer + +### Enhancements + +* Support passing a sequence to the spacing parameter of pygmt.info() ([#1031](https://github.com/GenericMappingTools/pygmt/pull/1031)) + +### Bug Fixes + +* Fix issues in loading GMT's shared library ([#977](https://github.com/GenericMappingTools/pygmt/pull/977)) +* Let pygmt.info load datetime columns into a str dtype array ([#960](https://github.com/GenericMappingTools/pygmt/pull/960)) +* Check invalid combinations of resolution and registration in load_earth_relief() ([#965](https://github.com/GenericMappingTools/pygmt/pull/965)) +* Open figures using the associated application on Windows ([#952](https://github.com/GenericMappingTools/pygmt/pull/952)) +* Fix bug that stops Figure.coast from plotting with only dcw parameter ([#910](https://github.com/GenericMappingTools/pygmt/pull/910)) + +### Documentation + +* Add a gallery example showing different line front styles ([#1022](https://github.com/GenericMappingTools/pygmt/pull/1022)) +* Add a gallery example for a double y-axes graph ([#1019](https://github.com/GenericMappingTools/pygmt/pull/1019)) +* Add a gallery example of inset map showing a rectangle region ([#1020](https://github.com/GenericMappingTools/pygmt/pull/1020)) +* Add a gallery example to show coloring of points by categories ([#1006](https://github.com/GenericMappingTools/pygmt/pull/1006)) +* Add gallery example showing different polar projection use cases ([#955](https://github.com/GenericMappingTools/pygmt/pull/955)) +* Add underscore guideline to CONTRIBUTING.md ([#1034](https://github.com/GenericMappingTools/pygmt/pull/1034)) +* Add instructions to upgrade installed PyGMT version ([#1029](https://github.com/GenericMappingTools/pygmt/pull/1029)) +* Improve the docstring of the pygmt package ([#1016](https://github.com/GenericMappingTools/pygmt/pull/1016)) +* Add common alias coltypes (-f) for specifying i/o data types ([#994](https://github.com/GenericMappingTools/pygmt/pull/994)) +* Expand documentation linking in CONTRIBUTING.md ([#802](https://github.com/GenericMappingTools/pygmt/pull/802)) +* Write changelog in markdown using MyST ([#941](https://github.com/GenericMappingTools/pygmt/pull/941)) +* Update web font to Atkinson Hyperlegible ([#938](https://github.com/GenericMappingTools/pygmt/pull/938)) +* Improve the gallery example for datetime inputs ([#919](https://github.com/GenericMappingTools/pygmt/pull/919)) + +### Maintenance + +* Refactor plot and plot3d to use virtualfile_from_data ([#990](https://github.com/GenericMappingTools/pygmt/pull/990)) +* Explicitly exclude unnecessary files in source distributions ([#999](https://github.com/GenericMappingTools/pygmt/pull/999)) +* Refactor grd modules to use virtualfile_from_data ([#992](https://github.com/GenericMappingTools/pygmt/pull/992)) +* Refactor info and grdinfo to use virtualfile_from_data ([#961](https://github.com/GenericMappingTools/pygmt/pull/961)) +* Onboarding maintainer checklist ([#773](https://github.com/GenericMappingTools/pygmt/pull/773)) +* Add comprehensive tests for pygmt.clib.loading.clib_full_names ([#872](https://github.com/GenericMappingTools/pygmt/pull/872)) +* Add a workflow checking links in plaintext and HTML files ([#634](https://github.com/GenericMappingTools/pygmt/pull/634)) +* Remove nbsphinx extension ([#931](https://github.com/GenericMappingTools/pygmt/pull/931)) +* Improve the error message for loading an old version of the GMT library ([#925](https://github.com/GenericMappingTools/pygmt/pull/925)) +* Move requirements-dev.txt dependencies to environment.yml ([#812](https://github.com/GenericMappingTools/pygmt/pull/812)) +* Ensure proper non-dev version string when publishing to PyPI ([#900](https://github.com/GenericMappingTools/pygmt/pull/900)) +* Run tests in a single CI job (Ubuntu + Python 3.9) for draft PRs ([#906](https://github.com/GenericMappingTools/pygmt/pull/906)) + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Jiayuan Yao](https://github.com/core-man) +* [Wei Ji Leong](https://github.com/weiji14) +* [Max Jones](https://github.com/maxrjones) +* [Michael Grund](https://github.com/michaelgrund) +* [Will Schlitzer](https://github.com/willschlitzer) +* [Liam Toney](https://github.com/liamtoney) +* [Kathryn Materna](https://github.com/kmaterna) +* [Alicia Ngoc Diep Ha](https://github.com/aliciaha1997) +* [Tawanda Moyo](https://github.com/tawandamoyo) + +---- + +## Release v0.3.0 (2021/02/15) + +[![Digital Object Identifier for PyGMT v0.3.0](https://zenodo.org/badge/DOI/10.5281/zenodo.4522136.svg)](https://doi.org/10.5281/zenodo.4522136) + +### Highlights + +* 🎉 **Third minor release of PyGMT** 🎉 +* Wrap inset ([#788](https://github.com/GenericMappingTools/pygmt/pull/788)) for making overview maps and subplot ([#822](https://github.com/GenericMappingTools/pygmt/pull/822)) for multi-panel figures +* Apply standardized formatting conventions ([#775](https://github.com/GenericMappingTools/pygmt/pull/775)) across most documentation pages +* Drop Python 3.6 support ([#699](https://github.com/GenericMappingTools/pygmt/pull/699)) so PyGMT now requires Python 3.7 or newer + +### New Features + +* Wrap grd2cpt ([#803](https://github.com/GenericMappingTools/pygmt/pull/803)) +* Let Figure.text support record-by-record transparency ([#716](https://github.com/GenericMappingTools/pygmt/pull/716)) +* Provide basic support for FreeBSD ([#700](https://github.com/GenericMappingTools/pygmt/pull/700), [#878](https://github.com/GenericMappingTools/pygmt/pull/878)) + +### Enhancements + +* Let load_earth_relief support the 'region' parameter for all resolutions ([#873](https://github.com/GenericMappingTools/pygmt/pull/873)) +* Improve how PyGMT finds the GMT library ([#702](https://github.com/GenericMappingTools/pygmt/pull/702)) +* Add common alias panel (-c) to all plotting functions ([#853](https://github.com/GenericMappingTools/pygmt/pull/853)) +* Add aliases dcw ([#765](https://github.com/GenericMappingTools/pygmt/pull/765)) and lakes ([#781](https://github.com/GenericMappingTools/pygmt/pull/781)) to Figure.coast +* Add alias shading to Figure.colorbar ([#752](https://github.com/GenericMappingTools/pygmt/pull/752)) +* Add alias annotation (A) to Figure.contour ([#883](https://github.com/GenericMappingTools/pygmt/pull/883)) +* Wrap Figure.grdinfo aliases ([#799](https://github.com/GenericMappingTools/pygmt/pull/799)) +* Add aliases frame and cmap to Figure.colorbar ([#709](https://github.com/GenericMappingTools/pygmt/pull/709)) +* Add alias frame to Figure.grdview ([#707](https://github.com/GenericMappingTools/pygmt/pull/707)) +* Improve the error message when PyGMT fails to load the GMT library ([#814](https://github.com/GenericMappingTools/pygmt/pull/814)) +* Add GMTInvalidInput error to Figure.coast ([#787](https://github.com/GenericMappingTools/pygmt/pull/787)) + +### Documentation + +* Add authorship policy ([#726](https://github.com/GenericMappingTools/pygmt/pull/726)) +* Update PyGMT development installation instructions ([#865](https://github.com/GenericMappingTools/pygmt/pull/865)) +* Add a tutorial for adding a map title ([#720](https://github.com/GenericMappingTools/pygmt/pull/720)) +* Add a tutorial for plotting Earth relief ([#712](https://github.com/GenericMappingTools/pygmt/pull/712)) +* Add a tutorial for 3D perspective image ([#743](https://github.com/GenericMappingTools/pygmt/pull/743)) +* Add a tutorial for contour maps ([#705](https://github.com/GenericMappingTools/pygmt/pull/705)) +* Add a tutorial for plotting lines ([#741](https://github.com/GenericMappingTools/pygmt/pull/741)) +* Add a tutorial for the region argument ([#800](https://github.com/GenericMappingTools/pygmt/pull/800)) +* Add a gallery example for datetime inputs ([#779](https://github.com/GenericMappingTools/pygmt/pull/779)) +* Add a gallery example for Figure.logo ([#823](https://github.com/GenericMappingTools/pygmt/pull/823)) +* Add a gallery example for plotting multi-parameter symbols ([#772](https://github.com/GenericMappingTools/pygmt/pull/772)) +* Add a gallery example for Figure.image ([#777](https://github.com/GenericMappingTools/pygmt/pull/777)) +* Add a gallery example for setting line colors with a custom CPT ([#774](https://github.com/GenericMappingTools/pygmt/pull/774)) +* Add more gallery examples for projections ([#761](https://github.com/GenericMappingTools/pygmt/pull/761), [#721](https://github.com/GenericMappingTools/pygmt/pull/721), [#757](https://github.com/GenericMappingTools/pygmt/pull/757), [#723](https://github.com/GenericMappingTools/pygmt/pull/723), [#762](https://github.com/GenericMappingTools/pygmt/pull/762), [#742](https://github.com/GenericMappingTools/pygmt/pull/742), [#728](https://github.com/GenericMappingTools/pygmt/pull/728), [#727](https://github.com/GenericMappingTools/pygmt/pull/727)) +* Update the docstrings in the plotting modules ([#881](https://github.com/GenericMappingTools/pygmt/pull/881)) +* Update the docstrings in the non-plotting modules ([#882](https://github.com/GenericMappingTools/pygmt/pull/882)) +* Update Figure.coast docstrings ([#798](https://github.com/GenericMappingTools/pygmt/pull/798)) +* Update the docstrings of common aliases ([#862](https://github.com/GenericMappingTools/pygmt/pull/862)) +* Add sphinx-copybutton extension to easily copy codes ([#838](https://github.com/GenericMappingTools/pygmt/pull/838)) +* Choose the best figures in tutorials for thumbnails ([#826](https://github.com/GenericMappingTools/pygmt/pull/826)) +* Update axis label explanation in frames tutorial ([#820](https://github.com/GenericMappingTools/pygmt/pull/820)) +* Add guidelines for types of tests to write ([#796](https://github.com/GenericMappingTools/pygmt/pull/796)) +* Recommend using SI units in documentation ([#795](https://github.com/GenericMappingTools/pygmt/pull/795)) +* Add a table for compatibility of PyGMT with Python and GMT ([#763](https://github.com/GenericMappingTools/pygmt/pull/763)) +* Add description for the "columns" arguments ([#766](https://github.com/GenericMappingTools/pygmt/pull/766)) +* Add a table of the available projections ([#753](https://github.com/GenericMappingTools/pygmt/pull/753)) +* Add projection description for Lambert Azimuthal Equal-Area ([#760](https://github.com/GenericMappingTools/pygmt/pull/760)) +* Change text when GMTInvalidInput error is raised for basemap ([#729](https://github.com/GenericMappingTools/pygmt/pull/729)) + +### Bug Fixes + +* Fix a bug of Figure.text when "text" is a non-string array ([#724](https://github.com/GenericMappingTools/pygmt/pull/724)) +* Fix the error message when IPython is not available ([#701](https://github.com/GenericMappingTools/pygmt/pull/701)) + +### Maintenance + +* Add dependabot to keep GitHub Actions up to date ([#861](https://github.com/GenericMappingTools/pygmt/pull/861)) +* Skip workflows in PRs if only non-source-code files are changed ([#839](https://github.com/GenericMappingTools/pygmt/pull/839)) +* Add slash command '/test-gmt-dev' to test GMT dev version ([#831](https://github.com/GenericMappingTools/pygmt/pull/831)) +* Check files for UNIX-style line breaks and 644 permission ([#736](https://github.com/GenericMappingTools/pygmt/pull/736)) +* Rename vercel configuration file from now.json to vercel.json ([#738](https://github.com/GenericMappingTools/pygmt/pull/738)) +* Add a CI job testing GMT master branch on Windows ([#756](https://github.com/GenericMappingTools/pygmt/pull/756)) +* Migrate documentation deployment from Travis CI to GitHub Actions ([#713](https://github.com/GenericMappingTools/pygmt/pull/713)) +* Move Figure.meca into a standalone module ([#686](https://github.com/GenericMappingTools/pygmt/pull/686)) +* Move plotting functions to separate modules ([#808](https://github.com/GenericMappingTools/pygmt/pull/808)) +* Move non-plotting modules to separate modules ([#832](https://github.com/GenericMappingTools/pygmt/pull/832)) +* Add isort to sort imports alphabetically ([#745](https://github.com/GenericMappingTools/pygmt/pull/745)) +* Convert relative imports to absolute imports ([#754](https://github.com/GenericMappingTools/pygmt/pull/754)) +* Switch from versioneer to setuptools-scm ([#695](https://github.com/GenericMappingTools/pygmt/pull/695)) +* Add docformatter to format plain text in docstrings ([#642](https://github.com/GenericMappingTools/pygmt/pull/642)) +* Migrate pytest configurations to pyproject.toml ([#725](https://github.com/GenericMappingTools/pygmt/pull/725)) +* Migrate coverage configurations to pyproject.toml ([#667](https://github.com/GenericMappingTools/pygmt/pull/667)) +* Show test execution times in pytest ([#835](https://github.com/GenericMappingTools/pygmt/pull/835)) +* Add tests for grdfilter ([#809](https://github.com/GenericMappingTools/pygmt/pull/809)) +* Add tests for GMTInvalidInput of Figure.savefig and Figure.show ([#810](https://github.com/GenericMappingTools/pygmt/pull/810)) +* Add args_in_kwargs function ([#791](https://github.com/GenericMappingTools/pygmt/pull/791)) +* Add a Makefile target 'distclean' for deleting project metadata files ([#744](https://github.com/GenericMappingTools/pygmt/pull/744)) +* Add a test for Figure.basemap map_scale ([#739](https://github.com/GenericMappingTools/pygmt/pull/739)) +* Use args_in_kwargs for Figure.basemap error raising ([#797](https://github.com/GenericMappingTools/pygmt/pull/797)) + +### Contributors + +* [Will Schlitzer](https://github.com/willschlitzer) +* [Dongdong Tian](https://github.com/seisman) +* [Wei Ji Leong](https://github.com/weiji14) +* [Michael Grund](https://github.com/michaelgrund) +* [Liam Toney](https://github.com/liamtoney) +* [Max Jones](https://github.com/maxrjones) + +---- + +## Release v0.2.1 (2020/11/14) + +[![Digital Object Identifier for PyGMT v0.2.1](https://zenodo.org/badge/DOI/10.5281/zenodo.4253459.svg)](https://doi.org/10.5281/zenodo.4253459) + +### Highlights + +* 🎉 **Patch release with more tutorials and gallery examples!** 🎉 +* 🐍 Support Python 3.9 ([#689](https://github.com/GenericMappingTools/pygmt/pull/689)) +* 📹 Add [Liam](https://github.com/liamtoney)'s [ROSES 2020 PyGMT talk](https://www.youtube.com/watch?v=SSIGJEe0BIk) ([#643](https://github.com/GenericMappingTools/pygmt/pull/643)) + +### New Features + +* Wrap plot3d ([#471](https://github.com/GenericMappingTools/pygmt/pull/471)) +* Wrap grdfilter ([#616](https://github.com/GenericMappingTools/pygmt/pull/616)) + +### Enhancements + +* Allow np.object dtypes into virtualfile_from_vectors ([#684](https://github.com/GenericMappingTools/pygmt/pull/684)) +* Let plot() accept record-by-record transparency ([#626](https://github.com/GenericMappingTools/pygmt/pull/626)) +* Refactor info to allow datetime inputs from xarray.Dataset and pandas.DataFrame tables ([#619](https://github.com/GenericMappingTools/pygmt/pull/619)) + +### Tutorials & Gallery + +* Add tutorial for pygmt.config ([#482](https://github.com/GenericMappingTools/pygmt/pull/482)) +* Add an example for different line styles ([#604](https://github.com/GenericMappingTools/pygmt/pull/604), [#664](https://github.com/GenericMappingTools/pygmt/pull/664)) +* Add a gallery example for varying transparent points ([#654](https://github.com/GenericMappingTools/pygmt/pull/654)) +* Add tutorial for pygmt.Figure.text ([#480](https://github.com/GenericMappingTools/pygmt/pull/480)) +* Add an example for scatter plots with auto legends ([#607](https://github.com/GenericMappingTools/pygmt/pull/607)) +* Improve colorbar gallery example ([#596](https://github.com/GenericMappingTools/pygmt/pull/596)) + +### Documentation Improvements + +* doc: Fix the description of grdcontour -G option ([#681](https://github.com/GenericMappingTools/pygmt/pull/681)) +* Refresh Code of Conduct from v1.4 to v2.0 ([#673](https://github.com/GenericMappingTools/pygmt/pull/673)) +* Add PyGMT Zenodo BibTeX entry to main README ([#678](https://github.com/GenericMappingTools/pygmt/pull/678)) +* Complete most of documentation for makecpt ([#676](https://github.com/GenericMappingTools/pygmt/pull/676)) +* Complete documentation for plot ([#666](https://github.com/GenericMappingTools/pygmt/pull/666)) +* Add "no_clip" to plot, text, contour and meca ([#661](https://github.com/GenericMappingTools/pygmt/pull/661)) +* Add common alias "verbose" (V) to all functions ([#662](https://github.com/GenericMappingTools/pygmt/pull/662)) +* Improve documentation of Figure.logo() ([#651](https://github.com/GenericMappingTools/pygmt/pull/651)) +* Add mini-galleries for methods and functions ([#648](https://github.com/GenericMappingTools/pygmt/pull/648)) +* Complete documentation of grdimage ([#620](https://github.com/GenericMappingTools/pygmt/pull/620)) +* Add common alias perspective (p) for plotting 3D illustrations ([#627](https://github.com/GenericMappingTools/pygmt/pull/627)) +* Add common aliases xshift (X) and yshift (Y) ([#624](https://github.com/GenericMappingTools/pygmt/pull/624)) +* Add common alias cores (x) for grdimage and other multi-threaded modules ([#625](https://github.com/GenericMappingTools/pygmt/pull/625)) +* Enable switching different versions of documentation ([#621](https://github.com/GenericMappingTools/pygmt/pull/621)) +* Add common alias transparency (-t) to all plotting functions ([#614](https://github.com/GenericMappingTools/pygmt/pull/614)) + +### Bug Fixes + +* Disallow passing arguments like -XNone to GMT ([#639](https://github.com/GenericMappingTools/pygmt/pull/639)) + +### Maintenance + +* Migrate PyPI release to GitHub Actions ([#679](https://github.com/GenericMappingTools/pygmt/pull/679)) +* Upload artifacts showing diff images on test failure ([#675](https://github.com/GenericMappingTools/pygmt/pull/675)) +* Add slash command "/format" to automatically format PRs ([#646](https://github.com/GenericMappingTools/pygmt/pull/646)) +* Add instructions to run specific tests ([#660](https://github.com/GenericMappingTools/pygmt/pull/660)) +* Add more tests for xarray grid shading ([#650](https://github.com/GenericMappingTools/pygmt/pull/650)) +* Refactor xfail tests to avoid storing baseline images ([#603](https://github.com/GenericMappingTools/pygmt/pull/603)) +* Add blackdoc to format Python codes in docstrings ([#641](https://github.com/GenericMappingTools/pygmt/pull/641)) +* Check and lint sphinx configuration file doc/conf.py ([#630](https://github.com/GenericMappingTools/pygmt/pull/630)) +* Improve Makefile to clean ``__pycache__`` directory recursively ([#611](https://github.com/GenericMappingTools/pygmt/pull/611)) +* Update release process and checklist template ([#602](https://github.com/GenericMappingTools/pygmt/pull/602)) + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Wei Ji Leong](https://github.com/weiji14) +* [Conor Bacon](https://github.com/hemmelig) +* [carocamargo](https://github.com/carocamargo) + +---- + +## Release v0.2.0 (2020/09/12) + +[![Digital Object Identifier for PyGMT v0.2.0](https://zenodo.org/badge/DOI/10.5281/zenodo.4025418.svg)](https://doi.org/10.5281/zenodo.4025418) + +### Highlights + +* 🎉 **Second minor release of PyGMT** 🎉 +* Minimum required GMT version is now 6.1.1 or newer ([#577](https://github.com/GenericMappingTools/pygmt/pull/577)) +* Plotting xarray grids using grdimage and grdview should not crash anymore and works for most cases ([#560](https://github.com/GenericMappingTools/pygmt/pull/560)) +* Easier time-series plots with support for datetime-like inputs to plot ([#464](https://github.com/GenericMappingTools/pygmt/pull/464)) and the region argument ([#562](https://github.com/GenericMappingTools/pygmt/pull/562)) + +### New Features + +* Wrap GMT_Put_Strings to pass str columns into GMT C API directly ([#520](https://github.com/GenericMappingTools/pygmt/pull/520)) +* Wrap meca ([#516](https://github.com/GenericMappingTools/pygmt/pull/516)) +* Wrap x2sys_init and x2sys_cross ([#546](https://github.com/GenericMappingTools/pygmt/pull/546)) +* Let grdcut() accept xarray.DataArray as input ([#541](https://github.com/GenericMappingTools/pygmt/pull/541)) +* Initialize a GMTDataArrayAccessor ([#500](https://github.com/GenericMappingTools/pygmt/pull/500)) + +### Enhancements + +* Allow passing in pandas dataframes to x2sys_cross ([#591](https://github.com/GenericMappingTools/pygmt/pull/591)) +* Sensible array outputs for pygmt info ([#575](https://github.com/GenericMappingTools/pygmt/pull/575)) +* Allow pandas.DataFrame table and 1D/2D numpy array inputs into pygmt.info ([#574](https://github.com/GenericMappingTools/pygmt/pull/574)) +* Add auto-legend feature to grdcontour and contour ([#568](https://github.com/GenericMappingTools/pygmt/pull/568)) +* Add common alias verbose (V) ([#550](https://github.com/GenericMappingTools/pygmt/pull/550)) +* Let load_earth_relief() support all resolutions and optional subregion ([#542](https://github.com/GenericMappingTools/pygmt/pull/542)) +* Allow load_earth_relief() to load pixel or gridline registered data ([#509](https://github.com/GenericMappingTools/pygmt/pull/509)) + +### Documentation + +* Link to try-gmt binder repository ([#598](https://github.com/GenericMappingTools/pygmt/pull/598)) +* Improve docstring of data_kind() to include xarray grid ([#588](https://github.com/GenericMappingTools/pygmt/pull/588)) +* Improve the documentation of Figure.shift_origin() ([#536](https://github.com/GenericMappingTools/pygmt/pull/536)) +* Add shading to grdview gallery example ([#506](https://github.com/GenericMappingTools/pygmt/pull/506)) + +### Bug Fixes + +* Ensure surface and grdcut loads GMTDataArray accessor info into xarray ([#539](https://github.com/GenericMappingTools/pygmt/pull/539)) +* Raise an error if short- and long-form arguments coexist ([#537](https://github.com/GenericMappingTools/pygmt/pull/537)) +* Fix the grdtrack example to avoid crashes on macOS ([#531](https://github.com/GenericMappingTools/pygmt/pull/531)) +* Properly allow for either pixel or gridline registered grids ([#476](https://github.com/GenericMappingTools/pygmt/pull/476)) + +### Maintenance + +* Add a test for xarray shading ([#581](https://github.com/GenericMappingTools/pygmt/pull/581)) +* Remove expected failures on grdview tests ([#589](https://github.com/GenericMappingTools/pygmt/pull/589)) +* Redesign check_figures_equal testing function to be more explicit ([#590](https://github.com/GenericMappingTools/pygmt/pull/590)) +* Cut Windows CI build time in half to 15 min ([#586](https://github.com/GenericMappingTools/pygmt/pull/586)) +* Add a test for Session.write_data() writing netCDF grids ([#583](https://github.com/GenericMappingTools/pygmt/pull/583)) +* Add a test to make sure shift_origin does not crash ([#580](https://github.com/GenericMappingTools/pygmt/pull/580)) +* Add testing.check_figures_equal to avoid storing baseline images ([#555](https://github.com/GenericMappingTools/pygmt/pull/555)) +* Eliminate unnecessary jobs from Travis CI ([#567](https://github.com/GenericMappingTools/pygmt/pull/567)) and Azure Pipelines ([#513](https://github.com/GenericMappingTools/pygmt/pull/513)) +* Improve the workflow to test both GMT master ([#485](https://github.com/GenericMappingTools/pygmt/pull/485)) and 6.1 branches ([#554](https://github.com/GenericMappingTools/pygmt/pull/554)) +* Automatically cancel in-progress CI runs of old commits ([#544](https://github.com/GenericMappingTools/pygmt/pull/544)) +* Remove the Stickler CI configuration file ([#538](https://github.com/GenericMappingTools/pygmt/pull/538)), run style checks using GitHub Actions ([#519](https://github.com/GenericMappingTools/pygmt/pull/519)) +* Cache GMT remote data as artifacts on GitHub ([#530](https://github.com/GenericMappingTools/pygmt/pull/530)) +* Let pytest generate both HTML and XML coverage reports ([#512](https://github.com/GenericMappingTools/pygmt/pull/512)) +* Run Continuous Integration tests on GitHub Actions ([#475](https://github.com/GenericMappingTools/pygmt/pull/475)) + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Wei Ji Leong](https://github.com/weiji14) +* [Tyler Newton](https://github.com/tjnewton) +* [Liam Toney](https://github.com/liamtoney) + +---- + +## Release v0.1.2 (2020/07/07) + +[![Digital Object Identifier for PyGMT v0.1.2](https://zenodo.org/badge/DOI/10.5281/zenodo.3930577.svg)](https://doi.org/10.5281/zenodo.3930577) + +### Highlights + +* Patch release in preparation for the SciPy 2020 sprint session +* Last version to support GMT 6.0, future PyGMT versions will require GMT 6.1 or newer + +### New Features + +* Wrap grdcut ([#492](https://github.com/GenericMappingTools/pygmt/pull/492)) +* Add show_versions() function for printing debugging information used in issue reports ([#466](https://github.com/GenericMappingTools/pygmt/pull/466)) + +### Enhancements + +* Change load_earth_relief()'s default resolution to 01d ([#488](https://github.com/GenericMappingTools/pygmt/pull/488)) +* Enhance text with extra functionality and aliases ([#481](https://github.com/GenericMappingTools/pygmt/pull/481)) + +### Documentation + +* Add gallery example for grdview ([#502](https://github.com/GenericMappingTools/pygmt/pull/502)) +* Turn all short aliases into long form ([#474](https://github.com/GenericMappingTools/pygmt/pull/474)) +* Update the plotting example using the colormap generated by pygmt.makecpt ([#472](https://github.com/GenericMappingTools/pygmt/pull/472)) +* Add instructions to view the test coverage reports locally ([#468](https://github.com/GenericMappingTools/pygmt/pull/468)) +* Update the instructions for testing pygmt install ([#459](https://github.com/GenericMappingTools/pygmt/pull/459)) + +### Bug Fixes + +* Fix a bug when passing data to GMT in Session.open_virtual_file() ([#490](https://github.com/GenericMappingTools/pygmt/pull/490)) + +### Maintenance + +* Temporarily expect failures for some grdcontour and grdview tests ([#503](https://github.com/GenericMappingTools/pygmt/pull/503)) +* Fix several failures due to updates of earth relief data ([#498](https://github.com/GenericMappingTools/pygmt/pull/498)) +* Unpin pylint version and fix some lint warnings ([#484](https://github.com/GenericMappingTools/pygmt/pull/484)) +* Separate tests of gmtinfo and grdinfo ([#461](https://github.com/GenericMappingTools/pygmt/pull/461)) +* Fix the test for GMT_COMPATIBILITY=6 ([#454](https://github.com/GenericMappingTools/pygmt/pull/454)) +* Update baseline images for updates of earth relief data ([#452](https://github.com/GenericMappingTools/pygmt/pull/452)) +* Simplify PyGMT Release process ([#446](https://github.com/GenericMappingTools/pygmt/pull/446)) + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Wei Ji Leong](https://github.com/weiji14) +* [Liam Toney](https://github.com/liamtoney) + +---- + +## Release v0.1.1 (2020/05/22) + +[![Digital Object Identifier for PyGMT v0.1.1](https://zenodo.org/badge/DOI/10.5281/zenodo.3837197.svg)](https://doi.org/10.5281/zenodo.3837197) + +### Highlights + +* 🏁Windows users rejoice, this bugfix release is for you!🏁 +* Let PyGMT work with the conda GMT package on Windows ([#434](https://github.com/GenericMappingTools/pygmt/pull/434)) + +### Enhancements + +* Handle setting special parameters without default settings for config ([#411](https://github.com/GenericMappingTools/pygmt/pull/411)) + +### Documentation + +* Update install instructions ([#430](https://github.com/GenericMappingTools/pygmt/pull/430)) +* Add PyGMT AGU 2019 poster to website ([#425](https://github.com/GenericMappingTools/pygmt/pull/425)) +* Redirect www.pygmt.org to latest, instead of dev ([#423](https://github.com/GenericMappingTools/pygmt/pull/423)) + +### Bug Fixes + +* Set GMT_COMPATIBILITY to 6 when pygmt session starts ([#432](https://github.com/GenericMappingTools/pygmt/pull/432)) +* Improve how PyGMT finds the GMT library ([#440](https://github.com/GenericMappingTools/pygmt/pull/440)) + +### Maintenance + +* Finalize fixes on Windows test suite for v0.1.1 ([#441](https://github.com/GenericMappingTools/pygmt/pull/441)) +* Cache test data on Azure Pipelines ([#438](https://github.com/GenericMappingTools/pygmt/pull/438)) + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Wei Ji Leong](https://github.com/weiji14) +* [Jason K. Moore](https://github.com/moorepants) + +---- + +## Release v0.1.0 (2020/05/03) + +[![Digital Object Identifier for PyGMT v0.1.0](https://zenodo.org/badge/DOI/10.5281/zenodo.3782862.svg)](https://doi.org/10.5281/zenodo.3782862) + +### Highlights + +* 🎉 **First official release of PyGMT** 🎉 +* Python 3.8 is now supported ([#398](https://github.com/GenericMappingTools/pygmt/pull/398)) +* PyGMT now uses the stable version of GMT 6.0.0 by default ([#363](https://github.com/GenericMappingTools/pygmt/pull/363)) +* Use sphinx-gallery to manage examples and tutorials ([#268](https://github.com/GenericMappingTools/pygmt/pull/268)) + +### New Features + +* Wrap blockmedian ([#349](https://github.com/GenericMappingTools/pygmt/pull/349)) +* Add pygmt.config() to change gmt defaults locally and globally ([#293](https://github.com/GenericMappingTools/pygmt/pull/293)) +* Wrap grdview ([#330](https://github.com/GenericMappingTools/pygmt/pull/330)) +* Wrap grdtrack ([#308](https://github.com/GenericMappingTools/pygmt/pull/308)) +* Wrap colorbar ([#332](https://github.com/GenericMappingTools/pygmt/pull/332)) +* Wrap text ([#321](https://github.com/GenericMappingTools/pygmt/pull/321)) +* Wrap legend ([#333](https://github.com/GenericMappingTools/pygmt/pull/333)) +* Wrap makecpt ([#329](https://github.com/GenericMappingTools/pygmt/pull/329)) +* Add a new method to shift plot origins ([#289](https://github.com/GenericMappingTools/pygmt/pull/289)) + +### Enhancements + +* Allow text accepting "frame" as an argument ([#385](https://github.com/GenericMappingTools/pygmt/pull/385)) +* Allow for grids with negative lat/lon increments ([#369](https://github.com/GenericMappingTools/pygmt/pull/369)) +* Allow passing in list to 'region' argument in surface ([#378](https://github.com/GenericMappingTools/pygmt/pull/378)) +* Allow passing in scalar number to x and y in plot ([#376](https://github.com/GenericMappingTools/pygmt/pull/376)) +* Implement default position/box for legend ([#359](https://github.com/GenericMappingTools/pygmt/pull/359)) +* Add sequence_space converter in kwargs_to_string ([#325](https://github.com/GenericMappingTools/pygmt/pull/325)) + +### Documentation + +* Update PyPI install instructions and API disclaimer message ([#421](https://github.com/GenericMappingTools/pygmt/pull/421)) +* Fix the link to GMT documentation ([#419](https://github.com/GenericMappingTools/pygmt/pull/419)) +* Use napoleon instead of numpydoc with sphinx ([#383](https://github.com/GenericMappingTools/pygmt/pull/383)) +* Document using a list for repeated arguments ([#361](https://github.com/GenericMappingTools/pygmt/pull/361)) +* Add legend gallery entry ([#358](https://github.com/GenericMappingTools/pygmt/pull/358)) +* Update instructions to set GMT_LIBRARY_PATH ([#324](https://github.com/GenericMappingTools/pygmt/pull/324)) +* Fix the link to the GMT homepage ([#331](https://github.com/GenericMappingTools/pygmt/pull/331)) +* Split projections gallery by projection types ([#318](https://github.com/GenericMappingTools/pygmt/pull/318)) +* Fix the link to GMT/Matlab API in the README ([#297](https://github.com/GenericMappingTools/pygmt/pull/297)) +* Use shinx extlinks for linking GMT docs ([#294](https://github.com/GenericMappingTools/pygmt/pull/294)) +* Comment about country code in projection examples ([#290](https://github.com/GenericMappingTools/pygmt/pull/290)) +* Add an overview page listing presentations ([#286](https://github.com/GenericMappingTools/pygmt/pull/286)) + +### Bug Fixes + +* Let surface return xr.DataArray instead of xr.Dataset ([#408](https://github.com/GenericMappingTools/pygmt/pull/408)) +* Update GMT constant GMT_STR16 to GMT_VF_LEN for GMT API change in 6.1.0 ([#397](https://github.com/GenericMappingTools/pygmt/pull/397)) +* Properly trigger pytest matplotlib image comparison ([#352](https://github.com/GenericMappingTools/pygmt/pull/352)) +* Use uuid.uuid4 to generate unique names ([#274](https://github.com/GenericMappingTools/pygmt/pull/274)) + +### Maintenance + +* Quickfix Zeit Now miniconda installer link to anaconda.com ([#413](https://github.com/GenericMappingTools/pygmt/pull/413)) +* Fix GitHub Pages deployment from Travis ([#410](https://github.com/GenericMappingTools/pygmt/pull/410)) +* Update and clean TravisCI configuration ([#404](https://github.com/GenericMappingTools/pygmt/pull/404)) +* Quickfix min elevation for new SRTM15+V2.1 earth relief grids ([#401](https://github.com/GenericMappingTools/pygmt/pull/401)) +* Wrap docstrings to 79 chars and check with flake8 ([#384](https://github.com/GenericMappingTools/pygmt/pull/384)) +* Update continuous integration scripts to 1.2.0 ([#355](https://github.com/GenericMappingTools/pygmt/pull/355)) +* Use Zeit Now to deploy doc builds from PRs ([#344](https://github.com/GenericMappingTools/pygmt/pull/344)) +* Move gmt from requirements.txt to CI scripts instead ([#343](https://github.com/GenericMappingTools/pygmt/pull/343)) +* Change py.test to pytest ([#338](https://github.com/GenericMappingTools/pygmt/pull/338)) +* Add Google Analytics to measure site visitors ([#314](https://github.com/GenericMappingTools/pygmt/pull/314)) +* Register mpl_image_compare marker to remove PytestUnknownMarkWarning ([#323](https://github.com/GenericMappingTools/pygmt/pull/323)) +* Disable Windows CI builds before PR [#313](https://github.com/GenericMappingTools/pygmt/pull/313) is merged ([#320](https://github.com/GenericMappingTools/pygmt/pull/320)) +* Enable Mac and Windows CI on Azure Pipelines ([#312](https://github.com/GenericMappingTools/pygmt/pull/312)) +* Fixes for using GMT 6.0.0rc1 ([#311](https://github.com/GenericMappingTools/pygmt/pull/311)) +* Assign authorship to "The PyGMT Developers" ([#284](https://github.com/GenericMappingTools/pygmt/pull/284)) + +### Deprecations + +* Remove mention of gitter.im ([#405](https://github.com/GenericMappingTools/pygmt/pull/405)) +* Remove portrait (-P) from common options ([#339](https://github.com/GenericMappingTools/pygmt/pull/339)) +* Remove require.js since WorldWind was dropped ([#278](https://github.com/GenericMappingTools/pygmt/pull/278)) +* Remove Web WorldWind support ([#275](https://github.com/GenericMappingTools/pygmt/pull/275)) + +### Contributors + +* [Dongdong Tian](https://github.com/seisman) +* [Wei Ji Leong](https://github.com/weiji14) +* [Leonardo Uieda](https://github.com/leouieda) +* [Liam Toney](https://github.com/liamtoney) +* [Brook Tozer](https://github.com/btozer) +* [Claudio Satriano](https://github.com/claudiodsf) +* [Cody Woodson](https://github.com/Dovacody) +* [Mark Wieczorek](https://github.com/MarkWieczorek) +* [Philipp Loose](https://github.com/phloose) +* [Kathryn Materna](https://github.com/kmaterna) diff --git a/v0.14.0/_sources/contributing.md.txt b/v0.14.0/_sources/contributing.md.txt new file mode 100644 index 00000000000..36b0d76e984 --- /dev/null +++ b/v0.14.0/_sources/contributing.md.txt @@ -0,0 +1,695 @@ +# Contributors Guide + +This is a community driven project and everyone is welcome to contribute. + +The project is hosted at the +[PyGMT GitHub repository](https://github.com/GenericMappingTools/pygmt). + +The goal is to maintain a diverse community that's pleasant for everyone. +**Please be considerate and respectful of others**. Everyone must abide by our +[Code of Conduct](https://github.com/GenericMappingTools/.github/blob/main/CODE_OF_CONDUCT.md) +and we encourage all to read it carefully. + +## Ways to Contribute + +### Ways to Contribute Documentation and/or Code + +* Tackle any issue that you wish! Some issues are labeled as **"good first issue"** to + indicate that they are beginner friendly, meaning that they don't require extensive + knowledge of the project. +* Make a tutorial or gallery example of how to do something. +* Improve the API documentation. +* Contribute code! This can be code that you already have and it doesn't need to be + perfect! We will help you clean things up, test it, etc. + +### Ways to Contribute Feedback + +* Provide feedback about how we can improve the project or about your particular use + case. Open an [issue](https://github.com/GenericMappingTools/pygmt/issues) with + feature requests or bug fixes, or post general comments/questions on the + [forum](https://forum.generic-mapping-tools.org). +* Help triage issues, or give a "thumbs up" on issues that others reported which are + relevant to you. + +### Ways to Contribute to Community Building + +* Participate and answer questions on the [PyGMT forum Q&A](https://forum.generic-mapping-tools.org/c/questions/pygmt-q-a/11). +* Participate in discussions at the quarterly PyGMT Community Meetings, which are + announced on the [forum governance page](https://forum.generic-mapping-tools.org/c/governance/9). +* Cite PyGMT when using the project. +* Spread the word about PyGMT or star the project! + +## Providing Feedback + +### Reporting a Bug + +* Find the [*Issues*](https://github.com/GenericMappingTools/pygmt/issues) tab on the +top of the GitHub repository and click *New issue*. +* Click on *Get started* next to *Bug report*. +* **Please try to fill out the template with as much detail as you can**. +* After submitting your bug report, try to answer any follow up questions about the bug + as best as you can. + +#### Reporting Upstream Bugs + +If you are aware that a bug is caused by an upstream GMT issue rather than a +PyGMT-specific issue, you can optionally take the following steps to help resolve +the problem: + +* Add the line `pygmt.config(GMT_VERBOSE="d")` after your import statements, which + will report the equivalent GMT commands as one of the debug messages. +* Either append all messages from running your script to your GitHub issue, or + filter the messages to include only the GMT-equivalent commands using a command + such as: + + python .py 2>&1 | awk -F': ' '$2=="GMT_Call_Command string" {print $3}' + + where `` is the name of your test script. +* If the bug is produced when passing an in-memory data object (e.g., a + pandas.DataFrame or xarray.DataArray) to a PyGMT function, try writing the + data to a file (e.g., a netCDF or ASCII txt file) and passing the data file + to the PyGMT function instead. In the GitHub issue, please share the results + for both cases along with your code. + +### Submitting a Feature Request + +* Find the [*Issues*](https://github.com/GenericMappingTools/pygmt/issues) tab on the + top of the GitHub repository and click *New issue*. +* Click on *Get started* next to *Feature request*. +* **Please try to fill out the template with as much detail as you can**. +* After submitting your feature request, try to answer any follow up questions as best + as you can. + +### Submitting General Comments/Questions + +There are several pages on the [Community Forum](https://forum.generic-mapping-tools.org/) +where you can submit general comments and/or questions: + +* For questions about using PyGMT, select *New Topic* from the + [PyGMT Q&A Page](https://forum.generic-mapping-tools.org/c/questions/pygmt-q-a/11). +* For general comments, select *New Topic* from the + [Lounge Page](https://forum.generic-mapping-tools.org/c/lounge/6). +* To share your work, select *New Topic* from the + [Showcase Page](https://forum.generic-mapping-tools.org/c/Show-your-nice-example-script/10). + +## General Guidelines + +### Resources for New Contributors + +Please take a look at these resources to learn about Git and pull requests (don't +hesitate to [ask questions](contributing.md#getting-help)): + +* [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/). +* [Git Workflow Tutorial](https://www.asmeurer.com/git-workflow/) by Aaron Meurer. +* [How to Contribute to an Open Source Project on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github). + +### Getting Help + +Discussion often happens on GitHub issues and pull requests. In addition, there is a +[Discourse forum](https://forum.generic-mapping-tools.org/c/questions/pygmt-q-a) for +the project where you can ask questions. + +### Pull Request Workflow + +We follow the [git pull request workflow](https://www.asmeurer.com/git-workflow) +to make changes to our codebase. Every change made goes through a pull request, even +our own, so that our +[continuous integration](https://en.wikipedia.org/wiki/Continuous_integration) +services have a chance to check that the code is up to standards and passes all +our tests. This way, the *main* branch is always stable. + +#### General Guidelines for Making a Pull Request (PR): + +* What should be included in a PR + - Have a quick look at the titles of all the existing issues first. If there + is already an issue that matches your PR, leave a comment there to let us + know what you plan to do. Otherwise, **open an issue** describing what you + want to do. + - Each pull request should consist of a **small** and logical collection of + changes; larger changes should be broken down into smaller parts and + integrated separately. + - Bug fixes should be submitted in separate PRs. +* How to write and submit a PR + - Use underscores for all Python (\*.py) files as per + [PEP8](https://www.python.org/dev/peps/pep-0008/), not hyphens. Directory names + should also use underscores instead of hyphens. + - Describe what your PR changes and *why* this is a good thing. Be as + specific as you can. The PR description is how we keep track of the changes + made to the project over time. + - Do not commit changes to files that are irrelevant to your feature or + bugfix (e.g.: `.gitignore`, IDE project files, etc). + - Write descriptive commit messages. Chris Beams has written a + [guide](https://chris.beams.io/posts/git-commit/) on how to write good + commit messages. +* PR review + - Be willing to accept criticism and work on improving your code; we don't + want to break other users' code, so care must be taken not to introduce + bugs. + - Be aware that the pull request review process is not immediate, and is + generally proportional to the size of the pull request. + +#### General Process for Pull Request Review: + +After you've submitted a pull request, you should expect to hear at least a +comment within a couple of days. We may suggest some changes, improvements or +alternative implementation details. + +To increase the chances of getting your pull request accepted quickly, try to: + +* Submit a friendly PR + - Write a good and detailed description of what the PR does. + - Write some documentation for your code (docstrings) and leave comments + explaining the *reason* behind non-obvious things. + - Write tests for the code you wrote/modified if needed. + Please refer to [Testing your code](contributing.md#testing-your-code) or + [Testing plots](contributing.md#testing-plots). + - Include an example of new features in the gallery or tutorials. + Please refer to [Gallery plots](contributing.md#contributing-gallery-plots) + or [Tutorials](contributing.md#contributing-tutorials). +* Have a good coding style + - Use readable code, as it is better than clever code (even with comments). + - Follow the [PEP8](https://pep8.org) style guide for code and the + [NumPy style guide](https://numpydoc.readthedocs.io/en/latest/format.html) + for docstrings. Please refer to [Code style](contributing.md#code-style). + +Pull requests will automatically have tests run by GitHub Actions. +This includes running both the unit tests as well as code linters. +GitHub will show the status of these checks on the pull request. +Try to get them all passing (green). +If you have any trouble, leave a comment in the PR or +[get in touch](contributing.md#getting-help). + +## Setting up your Environment + +These steps for setting up your environment are necessary for +[editing the documentation locally](contributing.md#editing-the-documentation-locally) and +[contributing code](contributing.md#contributing-code). A local PyGMT development environment +is not needed for [editing the documentation on GitHub](contributing.md#editing-the-documentation-on-github). + +We highly recommend using [Miniforge](https://github.com/conda-forge/miniforge#miniforge3) +and the `mamba` package manager to install and manage your Python packages. +It will make your life a lot easier! + +The repository includes a virtual environment file `environment.yml` with the +specification for all development requirements to build and test the project. +In particular, these are some of the key development dependencies you will need +to install to build the documentation and run the unit tests locally: + +- git (for cloning the repo and tracking changes in code) +- dvc (for downloading baseline images used in tests) +- pytest-mpl (for checking that generated plots match the baseline) +- sphinx-gallery (for building the gallery example page) + +See the [`environment.yml`](https://github.com/GenericMappingTools/pygmt/blob/main/environment.yml) +file for the full list of dependencies and the environment name (`pygmt`). +Once you have forked and cloned the repository to your local machine, you can +use this file to create an isolated environment on which you can work. +Run the following on the base of the repository to create a new conda +environment from the `environment.yml` file: + +```bash +mamba env create --file environment.yml +``` + +Before building and testing the project, you have to activate the environment +(you'll need to do this every time you start a new terminal): + +```bash +mamba activate pygmt +``` + +We have a [`Makefile`](https://github.com/GenericMappingTools/pygmt/blob/main/Makefile) +that provides commands for installing, running the tests and coverage analysis, +running linters, etc. If you don't want to use `make`, open the `Makefile` and +copy the commands you want to run. + +To install the current source code into your testing environment, run: + +```bash +make install # on Linux/macOS +python -m pip install --no-deps -e . # on Windows +``` + +This installs your project in *editable* mode, meaning that changes made to the source +code will be available when you import the package (even if you're on a different +directory). + +## Contributing Documentation + +### PyGMT Documentation Overview + +There are four main components to PyGMT's documentation: + +* Gallery examples, with source code in Python `*.py` files under the + `examples/gallery/` folder. +* Tutorial examples, with source code in Python `*.py` files under the + `examples/tutorials/` folder. +* API documentation, with source code in the docstrings in Python `*.py` + files under the `pygmt/src/` and `pygmt/datasets/` folders. +* Getting started/developer documentation, with source text in ReST `*.rst` + and markdown `*.md` files under the `doc/` folder. + +The documentation is written primarily in +[reStructuredText](https://docutils.sourceforge.io/rst.html) and built by +[Sphinx](https://www.sphinx-doc.org/). Please refer to +{gmt-docs}`reStructuredText Cheatsheet ` +if you are new to reStructuredText. When contributing documentation, be sure to +follow the general guidelines in the [pull request workflow](contributing.md#pull-request-workflow) +section. + +There are two primary ways to edit the PyGMT documentation: +- For simple documentation changes, you can easily + [edit the documentation on GitHub](contributing.md#editing-the-documentation-on-github). + This only requires you to have a GitHub account. +- For more complicated changes, you can + [edit the documentation locally](contributing.md#editing-the-documentation-locally). + In order to build the documentation locally, you first need to + [set up your environment](contributing.md#setting-up-your-environment). + +### Editing the Documentation on GitHub + +If you're browsing the documentation and notice a typo or something that could be +improved, please consider letting us know by [creating an issue](contributing.md#reporting-a-bug) or +(even better) submitting a fix. + +You can submit fixes to the documentation pages completely online without having to +download and install anything: + +1. On each documentation page, there should be an "Improve This Page" link at the very + top. +2. Click on that link to open the respective source file (usually an `.rst` file in the + `doc/` folder or a `.py` file in the `examples/` folder) on GitHub for editing online + (you'll need a GitHub account). +3. Make your desired changes. +4. When you're done, scroll to the bottom of the page. +5. Fill out the two fields under "Commit changes": the first is a short title describing + your fixes; the second is a more detailed description of the changes. Try to be as + detailed as possible and describe *why* you changed something. +6. Choose "Create a new branch for this commit and start a pull request" and + click on the "Propose changes" button to open a pull request. +7. The pull request will run the GMT automated tests and make a preview deployment. + You can see how your change looks in the PyGMT documentation by clicking the + "Details" button of the "docs/readthedocs.org:pygmt-dev" status check, + after the building has finished (usually 10-15 minutes after the pull request was created). +8. We'll review your pull request, recommend changes if necessary, and then merge + them in if everything is OK. +9. Done! + +Alternatively, you can make the changes offline to the files in the `doc` folder or the +example scripts. See [editing the documentation locally](contributing.md#editing-the-documentation-locally) +for instructions. + +### Editing the Documentation Locally + +For more extensive changes, you can edit the documentation in your cloned repository +and build the documentation to preview changes before submitting a pull request. First, +follow the [setting up your environment](contributing.md#setting-up-your-environment) instructions. +After making your changes, you can build the HTML files from sources using: + +```bash +cd doc +make all +``` + +This will build the HTML files in `doc/_build/html`. +Open `doc/_build/html/index.html` in your browser to view the pages. Follow the +[pull request workflow](contributing.md#pull-request-workflow) to submit your changes for review. + +### Adding example code + +Many of the PyGMT functions have example code in their documentation. To contribute an +example, add an "Example" header and put the example code below it. Have all lines +begin with `>>>`. To keep this example code from being run during testing, add the code +`__doctest_skip__ = ["function_name"]` to the top of the module. + +**Inline code example** + +Below the import statements at the top of the file: + +```python +__doctest_skip__ = ["function_name"] +``` + +At the end of the function's docstring: + +```python +Example +------- +>>> import pygmt +>>> # Comment describing what is happening +>>> Code example +``` + +### Contributing Gallery Plots + +The gallery and tutorials are managed by +[sphinx-gallery](https://sphinx-gallery.readthedocs.io/). +The source files for the example gallery are `.py` scripts in `examples/gallery/` that +generate one or more figures. They are executed automatically by sphinx-gallery when +the [documentation is built](contributing.md#editing-the-documentation-locally). The output is gathered and +assembled into the gallery. + +You can **add a new** plot by placing a new `.py` file in one of the folders inside the +`examples/gallery` folder of the repository. See the other examples to get an idea for the +format. + +General guidelines for making a good gallery plot: + +* Examples should highlight a single feature/command. Good: *how to add a label to + a colorbar*. Bad: *how to add a label to the colorbar and use two different CPTs and + use subplots*. +* Try to make the example as simple as possible. Good: *use only commands that are + required to show the feature you want to highlight*. Bad: *use advanced/complex Python + features to make the code smaller*. +* Use a sample dataset from `pygmt.datasets` if you need to plot data. If a suitable + dataset isn't available, open an issue requesting one and we'll work together to add + it. +* Add comments to explain things that aren't obvious from reading the code. Good: *Use a + Mercator projection and make the plot 15 centimeters wide*. Bad: *Draw coastlines and + plot the data*. +* Describe the feature that you're showcasing and link to other relevant parts of the + documentation. +* SI units should be used in the example code for gallery plots. + +### Contributing Tutorials + +The tutorials (the User Guide in the docs) are also built by sphinx-gallery from the +`.py` files in the `examples/tutorials` folder of the repository. To add a new tutorial: + +* Create a `.py` file in the `examples/tutorials/advanced` folder. +* Write the tutorial in "notebook" style with code mixed with paragraphs explaining what + is being done. See the other tutorials for the format. +* Choose the most representative figure as the thumbnail figure by adding the comment + line `# sphinx_gallery_thumbnail_number = ` at the end of the tutorial. + The *fig_number* starts from 1. + +Guidelines for a good tutorial: + +* Each tutorial should focus on a particular set of tasks that a user might want to + accomplish: plotting grids, interpolation, configuring the frame, projections, etc. +* The tutorial code should be as simple as possible. Avoid using advanced/complex Python + features or abbreviations. +* Explain the options and features in as much detail as possible. The gallery has + concise examples while the tutorials are detailed and full of text. +* SI units should be used in the example code for tutorial plots. + +Note that the pygmt.Figure.show method needs to be called for a plot +to be inserted into the documentation. + + +### Editing the API Documentation + +The API documentation is built from the docstrings in the Python `*.py` files under +the `pygmt/src/` and `pygmt/datasets/` folders. **All docstrings** should follow the +[NumPy style guide](https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard). +All functions/classes/methods should have docstrings with a full description of all +arguments and return values. + +While the maximum line length for code is automatically set by ruff, docstrings +must be formatted manually. To play nicely with Jupyter and IPython, **keep docstrings +limited to 88 characters** per line. + +### Standards for Example Code + +When editing documentation, use the following standards to demonstrate the example code: + +1. Python arguments, such as import statements, Boolean expressions, and function + arguments should be wrapped as ``code`` by using \`\` on both sides of the code. + Examples: \`\`import pygmt\`\` results in ``import pygmt``, \`\`True\`\` results in `True`, + \`\`style="v"\`\` results in `style="v"`. +2. Literal GMT arguments should be **bold** by wrapping the arguments with \*\* + (two asterisks) on both sides. The argument description should be in *italicized* + with \* (single asterisk) on both sides. + Examples: `**+l**\ *label*` results in **+l***label*, `**05m**` results in **05m**. +3. Optional arguments are wrapped with [ ] (square brackets). +4. Arguments that are mutually exclusive are separated with a | (bar) to denote "or". +5. Default arguments for parameters and configuration settings are wrapped + with [ ] (square brackets) with the prefix "Default is". Example: [Default is + **p**]. + +### Cross-referencing with Sphinx + +The API reference is manually assembled in `doc/api/index.rst`. +The *autodoc* sphinx extension will automatically create pages for each +function/class/module/method listed there. + +You can reference functions, classes, modules, and methods from anywhere +(including docstrings) using: + +- :func:\`package.module.function\` +- :class:\`package.module.class\` +- :meth:\`package.module.method\` +- :mod:\`package.module\` + +An example would be to use +:meth:\`pygmt.Figure.grdview\` to link +to [https://www.pygmt.org/latest/api/generated/pygmt.Figure.grdview.html](https://www.pygmt.org/latest/api/generated/pygmt.Figure.grdview.html). +PyGMT documentation that is not a class, method, +or module can be linked with :doc:\`Any Link Text \`. +For example, :doc:\`Install instructions \\` links +to [https://www.pygmt.org/latest/install.html](https://www.pygmt.org/latest/install.html). + +Linking to the GMT documentation and GMT configuration parameters can be done using: + +- :gmt-docs:\`page_name.html\` +- :gmt-term:\`GMT_PARAMETER\` + +An example would be using +:gmt-docs:\`makecpt.html\` to link to {gmt-docs}`makecpt.html`. +For GMT configuration parameters, an example is +:gmt-term:\`COLOR_FOREGROUND\` to link to {gmt-term}`COLOR_FOREGROUND`. + +Sphinx will create a link to the automatically generated page for that +function/class/module/method. + +## Contributing Code + +### PyGMT Code Overview + +The source code for PyGMT is located in the `pygmt/` directory. When contributing +code, be sure to follow the general guidelines in the +[pull request workflow](contributing.md#pull-request-workflow) section. + +### Code Style + +We use the [ruff](https://docs.astral.sh/ruff) tool to format the code, so we +don't have to think about it. It loosely follow the [PEP8](https://pep8.org) guide +but with a few differences. Regardless, you won't have to worry about formatting +the code yourself. Before committing, run it to automatically format your code: + +```bash +make format +``` + +For consistency, we also use `pre-commit` hooks to enforce UNIX-style line endings +(`\n`) and file permission 644 (`-rw-r--r--`) throughout the whole project. +Don't worry if you forget to do it. Our continuous integration systems will +warn us and you can make a new commit with the formatted code. +Even better, you can just write `/format` in the first line of any comment in a +pull request to lint the code automatically. + +When wrapping a new alias, use an underscore to separate words bridged by vowels +(aeiou), such as `no_skip` and `z_only`. Do not use an underscore to separate +words bridged only by consonants, such as `distcalc`, and `crossprofile`. This +convention is not applied by the code checking tools, but the PyGMT maintainers +will comment on any pull requests as needed. + +When working on a tutorial or a gallery plot, it is good practice to use code +block separators to split a long script into multiple blocks. The separators also +make it possible to run the script like a Jupyter notebook in some modern text +editors or IDEs. We consistently use `# %%` as code block separators (please +refer to [issue #2660](https://github.com/GenericMappingTools/pygmt/issues/2660) +for the discussions) and require at least one separator in all example files. + +We also use [ruff](https://docs.astral.sh/ruff) to check the quality of the code +and quickly catch common errors. + +The [`Makefile`](https://github.com/GenericMappingTools/pygmt/blob/main/Makefile) +contains rules for running the linter checks: + +```bash +make check # Runs ruff in check mode +``` + +### Testing your Code + +Automated testing helps ensure that our code is as free of bugs as it can be. +It also lets us know immediately if a change we make breaks any other part of the code. + +All of our test code and data are stored in the `tests` subpackage. +We use the [pytest](https://pytest.org/) framework to run the test suite. + +Please write tests for your code so that we can be sure that it won't break any of the +existing functionality. +Tests also help us be confident that we won't break your code in the future. + +When writing tests, don't test everything that the GMT function already tests, such as +the every unique combination arguments. An exception to this would be the most popular +methods, such as pygmt.Figure.plot and pygmt.Figure.basemap. +The highest priority for tests should be the Python-specific code, such as numpy, +pandas, and xarray objects and the virtualfile mechanism. + +If you're **new to testing**, see existing test files for examples of things to do. +**Don't let the tests keep you from submitting your contribution!** +If you're not sure how to do this or are having trouble, submit your pull request +anyway. +We will help you create the tests and sort out any kind of problem during code review. + +Pull the baseline images, run the tests, and calculate test coverage using: + + dvc status # should report any files 'not_in_cache' + dvc pull # pull down files from DVC remote cache (fetch + checkout) + make test + +The coverage report will let you know which lines of code are touched by the tests. +If all the tests pass, you can view the coverage reports by opening `htmlcov/index.html` +in your browser. **Strive to get 100% coverage for the lines you changed.** +It's OK if you can't or don't know how to test something. +Leave a comment in the PR and we'll help you out. + +You can also run tests in just one test script using: + + pytest pygmt/tests/NAME_OF_TEST_FILE.py + +or run tests which contain names that match a specific keyword expression: + + pytest -k KEYWORD pygmt/tests + +### Testing Plots + +Writing an image-based test is only slightly more difficult than a simple test. +The main consideration is that you must specify the "baseline" or reference +image, and compare it with a "generated" or test image. This is handled using +the *decorator* functions `@pytest.mark.mpl_image_compare` and `@check_figures_equal` +whose usage are further described below. + +#### Using mpl_image_compare + +> **This is the preferred way to test plots whenever possible.** + +This method uses the [pytest-mpl](https://github.com/matplotlib/pytest-mpl) +plug-in to test plot generating code. +Every time the tests are run, `pytest-mpl` compares the generated plots with known +correct ones stored in `pygmt/tests/baseline`. +If your test created a `pygmt.Figure` object, you can test it by adding a *decorator* and +returning the `pygmt.Figure` object: + +```python +@pytest.mark.mpl_image_compare +def test_my_plotting_case(): + """ + Test that my plotting method works. + """ + fig = Figure() + fig.basemap(region=[0, 360, -90, 90], projection="W15c", frame=True) + return fig +``` + +Your test function **must** return the `pygmt.Figure` object and you can only +test one figure per function. + +Before you can run your test, you'll need to generate a *baseline* (a correct +version) of your plot. +Run the following from the repository root: + +```bash +pytest --mpl-generate-path=baseline pygmt/tests/NAME_OF_TEST_FILE.py +``` + +This will create a `baseline` folder with all the plots generated in your test +file. +Visually inspect the one corresponding to your test function. +If it's correct, copy it (and only it) to `pygmt/tests/baseline`. +When you run `make test` the next time, your test should be executed and +passing. + +Don't forget to commit the baseline image as well! +The images should be pushed up into a remote repository using `dvc` (instead of +`git`) as will be explained in the next section. + +#### Using Data Version Control ([dvc](https://dvc.org)) to Manage Test Images + +As the baseline images are quite large blob files that can change often (e.g. +with new GMT versions), it is not ideal to store them in `git` (which is meant +for tracking plain text files). Instead, we will use [`dvc`](https://dvc.org) +which is like `git` but for data. What `dvc` does is to store the hash (md5sum) +of a file. For example, given an image file like `test_logo.png`, `dvc` will +generate a `test_logo.png.dvc` plain text file containing the hash of the +image. This `test_logo.png.dvc` file can be stored as usual on GitHub, while +the `test_logo.png` file can be stored separately on our `dvc` remote at +[https://dagshub.com/GenericMappingTools/pygmt](https://dagshub.com/GenericMappingTools/pygmt). + +To **pull** or sync files from the `dvc` remote to your local repository, use +the commands below. Note how `dvc` commands are very similar to `git`. + + dvc status # should report any files 'not_in_cache' + dvc pull # pull down files from DVC remote cache (fetch + checkout) + +Once the sync/download is complete, you should notice two things. There will be +images stored in the `pygmt/tests/baseline` folder (e.g. `test_logo.png`) and +these images are technically reflinks/symlinks/copies of the files under the +`.dvc/cache` folder. You can now run the image comparison test suite as per +usual. + + pytest pygmt/tests/test_logo.py # run only one test + make test # run the entire test suite + +To **push** or sync changes from your local repository up to the `dvc` remote +at DAGsHub, you will first need to set up authentication using the commands +below. This only needs to be done once, i.e. the first time you contribute a +test image to the PyGMT project. + + dvc remote modify upstream --local auth basic + dvc remote modify upstream --local user "$DAGSHUB_USER" + dvc remote modify upstream --local password "$DAGSHUB_PASS" + +The configuration will be stored inside your `.dvc/config.local` file. Note +that the $DAGSHUB_PASS token can be generated at +[https://dagshub.com/user/settings/tokens](https://dagshub.com/user/settings/tokens) +after creating a DAGsHub account (can be linked to your GitHub account). Once +you have an account set up, please ask one of the PyGMT maintainers to add you +as a collaborator at +[https://dagshub.com/GenericMappingTools/pygmt/settings/collaboration](https://dagshub.com/GenericMappingTools/pygmt/settings/collaboration) +before proceeding with the next steps. + +The entire workflow for generating or modifying baseline test images can be +summarized as follows: + + # Sync with both git and dvc remotes + git pull + dvc pull + + # Generate new baseline images + pytest --mpl-generate-path=baseline pygmt/tests/test_logo.py + mv baseline/*.png pygmt/tests/baseline/ + + # Generate hash for baseline image and stage the *.dvc file in git + dvc status # Check which files need to be added to dvc + dvc add pygmt/tests/baseline/test_logo.png + git add pygmt/tests/baseline/test_logo.png.dvc + + # Commit changes and push to both the git and dvc remotes + git commit -m "Add test_logo.png into DVC" + dvc status --remote upstream # Report which files will be pushed to the dvc remote + dvc push # Run before git push to enable automated testing with the new images + git push + +#### Using `check_figures_equal` + +This approach draws the same figure using two different methods (the reference +method and the tested method), and checks that both of them are the same. +It takes two `pygmt.Figure` objects (`fig_ref` and `fig_test`), generates a png +image, and checks for the Root Mean Square (RMS) error between the two. +Here's an example: + +```python +@check_figures_equal() +def test_my_plotting_case(): + """ + Test that my plotting method works. + """ + fig_ref, fig_test = Figure(), Figure() + fig_ref.grdimage("@earth_relief_01d_g", projection="W120/15c", cmap="geo") + fig_test.grdimage(grid, projection="W120/15c", cmap="geo") + return fig_ref, fig_test +``` diff --git a/v0.14.0/_sources/ecosystem.md.txt b/v0.14.0/_sources/ecosystem.md.txt new file mode 100644 index 00000000000..25490f9f7ad --- /dev/null +++ b/v0.14.0/_sources/ecosystem.md.txt @@ -0,0 +1,129 @@ +# Ecosystem + +PyGMT provides a Python interface to the Generic Mapping Tools (GMT), which is a command +line program that provides a wide range of tools for manipulating geospatial data and +making publication-quality maps and figures. PyGMT integrates well with the +[scientific Python ecosystem](https://scientific-python.org/), with [NumPy][] for its +fundamental array data structure, [pandas][] for tabular data I/O and [Xarray][] for +raster grids/images/cubes I/O. + +In addition to these core dependencies, PyGMT also relies on several optional packages to +provide additional functionality for users. + +*This page was adapted from [GeoPandas's Ecosystem](https://geopandas.org/en/latest/community/ecosystem.html) page.* + +## PyGMT dependencies + +_Asterisk (*) after the package name indicates the package is a required dependency of PyGMT._ + +### NumPy* + +[NumPy][] is the fundamental package for scientific computing in Python. It is a Python +library that provides a multidimensional array object, various derived objects (such as +masked arrays and matrices), and an assortment of routines for fast operations on arrays, +including mathematical, logical, shape manipulation, sorting, selecting, I/O, discrete +Fourier transforms, basic linear algebra, basic statistical operations, random simulation +and much more. + +### pandas* + +[pandas][] is a Python package providing fast, flexible, and expressive data structures +designed to make working with "relational" or "labeled" data both easy and intuitive. +It aims to be the fundamental high-level building block for doing practical, real-world +data analysis in Python. + +### Xarray* + +[Xarray][] is an open source project and Python package that introduces labels in the +form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, which +allows for more intuitive, more concise, and less error-prone user experience. + +### IPython + +[IPython][] provides a rich toolkit to help you make the most of using Python +interactively. Its main components are a powerful interactive Python shell and a Jupyter +kernel to work with Python code in Jupyter notebooks and other interactive frontends. + +PyGMT relies on IPython to provide a rich interactive experience in Jupyter notebooks. + +### GeoPandas + +[GeoPandas][] is an open source project to make working with geospatial data in Python +easier. GeoPandas extends the datatypes used by [pandas][] to allow spatial operations +on geometric types. Geometric operations are performed by [Shapely][]. GeoPandas further +depends on [pyogrio][] for file access and [Matplotlib][] for plotting. + +PyGMT doesn't directly rely on GeoPandas, but provides support of GeoPandas's two main +data structure, {class}`geopandas.GeoDataFrame` and {class}`geopandas.GeoSeries`, which +can be directly used in data processing and plotting functions/methods of PyGMT. + +### contextily + +[contextily][] is a small Python package to retrieve tile maps from the internet. It can +add those tiles as basemap to matplotlib figures or write tile maps to disk into +geospatial raster files. + +In PyGMT, {func}`pygmt.datasets.load_tile_map` and {meth}`pygmt.Figure.tilemap` rely on it. + +### rioxarray + +[rioxarray][] is a geospatial [Xarray][] extension powered by [rasterio][]. Built on top +of rasterio, it enables seamless reading, writing, and manipulation of multi-dimensional +arrays with geospatial attributes such as coordinate reference systems (CRS) and spatial +extent (bounds). + +PyGMT relies on [rioxarray][] in several aspects: + +1. To save multi-band rasters to temporary files in GeoTIFF format, to support processing + and plotting 3-D {class}`xarray.DataArray` images. +2. To write CRS information to the {class}`xarray.DataArray` objects. +3. To reproject raster tiles to the target CRS in {func}`pygmt.datasets.load_tile_map`. + +```{note} +We're working towards avoiding temporary files when processing/plotting multi-band +rasters in [PR #3468](https://github.com/GenericMappingTools/pygmt/pull/3468). +``` + +### PyArrow + +[Apache Arrow][] is a development platform for in-memory analytics. It contains a set of +technologies that enable big data systems to process and move data fast. It specifies a +standardized language-independent columnar memory format for flat and hierarchical data, +organized for efficient analytic operations on modern hardware. The Arrow Python bindings +(also named "[PyArrow][]") have first-class integration with NumPy, pandas, and built-in +Python objects. They are based on the C++ implementation of Arrow. + +```{note} +If you have [PyArrow][] installed, PyGMT does have some initial support for +`pandas.Series` and `pandas.DataFrame` objects with Apache Arrow-backed arrays. +Specifically, only uint/int/float, date32/date64 and string types are supported for now. +Support for Duration types and GeoArrow geometry types is still a work in progress. For +more details, see +[issue #2800](https://github.com/GenericMappingTools/pygmt/issues/2800). +``` + +## PyGMT ecosystem + +Various packages rely on PyGMT for geospatial data processing, analysis, and visualization. +Below is an incomplete list (in no particular order) of tools which form the PyGMT-related +ecosystem. + +```{note} +If your package relies on PyGMT, please +[let us know](https://github.com/GenericMappingTools/pygmt/issues/new) or +[add it by yourself](contributing.md). +``` + +[apache arrow]: https://arrow.apache.org/ +[contextily]: https://contextily.readthedocs.io/ +[geopandas]: https://geopandas.org/ +[ipython]: https://ipython.org/ +[matplotlib]: https://matplotlib.org/ +[numpy]: https://numpy.org/ +[pandas]: https://pandas.pydata.org/ +[pyarrow]: https://arrow.apache.org/docs/python/ +[pyogrio]: https://pyogrio.readthedocs.io/ +[rasterio]: https://rasterio.readthedocs.io/ +[rioxarray]: https://corteva.github.io/rioxarray/ +[shapely]: https://shapely.readthedocs.io/ +[xarray]: https://xarray.pydata.org/ diff --git a/v0.14.0/_sources/external_resources.md.txt b/v0.14.0/_sources/external_resources.md.txt new file mode 100644 index 00000000000..30c04764e50 --- /dev/null +++ b/v0.14.0/_sources/external_resources.md.txt @@ -0,0 +1,161 @@ +# External Resources + +Below is a curated collection of external PyGMT resources. + +*To add your contribution to this collection, follow [these instructions](contributing.md#contributing-documentation) +to submit a pull request with your recommended addition to the +[External Resources file](https://github.com/GenericMappingTools/pygmt/blob/main/doc/external_resources.md).* + +--- + +## Tutorials + +:::::{grid} 1 2 2 3 + +::::{grid-item-card} 2024 AGU PREWS9: Mastering Geospatial Visualizations with GMT/PyGMT +:link: https://www.generic-mapping-tools.org/agu24workshop/ +:text-align: center +:margin: 0 3 0 0 + +![](https://github.com/user-attachments/assets/9f3ab0ed-83f1-4cff-bc68-387fc13ca61f) ++++ +Wei Ji Leong, Yvonne Fröhlich, Jing-Hui Tong, Federico Esteban, Max Jones, Andre Belem +:::: + +::::{grid-item-card} 2024 PyGMT Webinar using Google Colab (in Portuguese) +:link: https://github.com/andrebelem/Oficina_PyGMT +:text-align: center +:margin: 0 3 0 0 + +![](https://github.com/andrebelem/Oficina_PyGMT/raw/main/Datasets/3D_sample.png) ++++ +Andre Belem +:::: + +::::{grid-item-card} 2022 EGU SC5.2: Crafting beautiful maps with PyGMT +:link: https://www.generic-mapping-tools.org/egu22pygmt/ +:text-align: center +:margin: 0 3 0 0 + +![](https://user-images.githubusercontent.com/3974108/171653272-efaceeb1-a253-44a1-bddc-36bc9498c19b.png) ++++ +Wei Ji Leong, Leonardo Uieda, Max Jones, Andre Belem +:::: + +::::{grid-item-card} 2021 PyGMT course at the UAF Geophysical Institute +:link: https://github.com/liamtoney/gi-pygmt-2021 +:text-align: center +:margin: 0 3 0 0 + +![](https://user-images.githubusercontent.com/3974108/172042115-3f700c16-0f78-49d3-9e8d-87c77e4c0444.png) ++++ +Liam Toney +:::: + +::::{grid-item-card} 2021 Remote Online Sessions for Emerging Seismologists (ROSES): Unit 5 - Mapping +:link: https://www.youtube.com/watch?v=Zvcy7VDuhiw +:text-align: center +:margin: 0 3 0 0 + +![](https://user-images.githubusercontent.com/3974108/172055872-b81057b6-aef3-473f-8f42-1cc82a68d188.jpg) ++++ +Liam Toney +:::: + +::::{grid-item-card} 2020 Remote Online Sessions for Emerging Seismologists (ROSES): Unit 8 - PyGMT +:link: https://www.iris.edu/hq/inclass/lesson/728 +:text-align: center +:margin: 0 3 0 0 + +![](https://user-images.githubusercontent.com/3974108/172055922-8df68c00-4115-42f4-83ae-13a971fef846.png) ++++ +Liam Toney +:::: + +::::{grid-item-card} PyGMT Tutorial in 2021 +:link: https://github.com/MIGG-NTU/PyGMT2021 +:text-align: center +:margin: 0 3 0 0 + +![](https://user-images.githubusercontent.com/23487320/172058757-9b68f7ae-7a3f-4f48-9df6-9a065d6cd448.png) ++++ +MIGG-NTU +:::: + +::::{grid-item-card} PyGMT Workshop at FOSS4G Oceania 2019 +:link: https://github.com/GenericMappingTools/foss4g2019oceania +:text-align: center +:margin: 0 3 0 0 + +![](https://github.com/GenericMappingTools/foss4g2019oceania/releases/download/v1/picton_3d_dsm_view.png) ++++ +Wei Ji Leong +:::: + +::::{grid-item-card} Crafting 3D maps of Antarctica with PyGMT and the IBCSO V2 +:link: https://github.com/andrebelem/3D-Antarctic-maps +:text-align: center +:margin: 0 3 0 0 + +![](https://github.com/andrebelem/3D-Antarctic-maps/raw/main/3D-Antarctic-Maps.png) ++++ +Andre Belem +:::: + +::::{grid-item-card} Planetary Maps (in PyGMT) +:link: https://github.com/andrebelem/PlanetaryMaps +:text-align: center +:margin: 0 3 0 0 + +![](https://github.com/andrebelem/MarsMaps/raw/main/JezeroCrater.png) ++++ +Andre Belem +:::: + +::::{grid-item-card} PyGMT-HOWTO +:link: https://tktmyd.github.io/pygmt-howto-jp/pygmt +:text-align: center +:margin: 0 3 0 0 + +![](https://github.com/tktmyd/pygmt-howto-jp/raw/main/docs/_images/915fa767426edefb4ec413f6094bafcfe1f3f1410b1d53073a29d2ffe9f8e6c9.png) ++++ +Takuto Maeda +:::: + +::::: + +## Examples from Publications and Posters + +:::::{grid} 1 2 2 3 + +::::{grid-item-card} GMT and PyGMT plotting examples +:link: https://github.com/michaelgrund/GMT-plotting +:text-align: center +:margin: 0 3 0 0 + +![](https://user-images.githubusercontent.com/3974108/172055991-c0646f6c-d130-474f-b46a-5587483998cb.jpg) ++++ +Michael Grund +:::: + +::::{grid-item-card} NZ Antarctic Science Conference 2021 poster +:link: https://github.com/weiji14/nzasc2021 +:text-align: center +:margin: 0 3 0 0 + +![](https://user-images.githubusercontent.com/23487320/107176140-6aa4e580-6a33-11eb-8f30-1a7913788d6c.png) ++++ +Wei Ji Leong +:::: + +::::{grid-item-card} PyGMT plotting examples +:link: https://github.com/yvonnefroehlich/gmt-pygmt-plotting +:text-align: center +:margin: 0 3 0 0 + +![](https://github.com/yvonnefroehlich/gmt-pygmt-plotting/raw/main/_images/github_maps_readme_main.png) ++++ +Yvonne Fröhlich +:::: + +::::: diff --git a/v0.14.0/_sources/gallery/3d_plots/grdview_surface.rst.txt b/v0.14.0/_sources/gallery/3d_plots/grdview_surface.rst.txt new file mode 100644 index 00000000000..715e10d9349 --- /dev/null +++ b/v0.14.0/_sources/gallery/3d_plots/grdview_surface.rst.txt @@ -0,0 +1,129 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/3d_plots/grdview_surface.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_gallery_3d_plots_grdview_surface.py: + + +Plotting a surface +================== + +The :meth:`pygmt.Figure.grdview()` method can plot 3-D surfaces with +``surftype="s"``. Here, we supply the data as an :class:`xarray.DataArray` with +the coordinate vectors ``x`` and ``y`` defined. Note that the ``perspective`` +parameter here controls the azimuth and elevation angle of the view. We provide +a list of two arguments to ``frame`` - the first argument specifies the +:math:`x`- and :math:`y`-axes frame attributes and the second argument, +prepended with ``"z"``, specifies the :math:`z`-axis frame attributes. +Specifying the same scale for the ``projection`` and ``zscale`` parameters +ensures equal axis scaling. The ``shading`` parameter specifies illumination; +here we choose an azimuth of 45° with ``shading="+a45"``. + +.. GENERATED FROM PYTHON SOURCE LINES 18-67 + + + +.. image-sg:: /gallery/3d_plots/images/sphx_glr_grdview_surface_001.png + :alt: grdview surface + :srcset: /gallery/3d_plots/images/sphx_glr_grdview_surface_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + import xarray as xr + + + # Define an interesting function of two variables, see: + # https://en.wikipedia.org/wiki/Ackley_function + def ackley(x, y): + """ + Ackley function. + """ + return ( + -20 * np.exp(-0.2 * np.sqrt(0.5 * (x**2 + y**2))) + - np.exp(0.5 * (np.cos(2 * np.pi * x) + np.cos(2 * np.pi * y))) + + np.exp(1) + + 20 + ) + + + # Create gridded data + INC = 0.05 + x = np.arange(-5, 5 + INC, INC) + y = np.arange(-5, 5 + INC, INC) + data = xr.DataArray(ackley(*np.meshgrid(x, y)), coords=(x, y)) + + fig = pygmt.Figure() + + # Plot grid as a 3-D surface + SCALE = 0.5 # in centimeters + fig.grdview( + data, + # Set annotations and gridlines in steps of five, and + # tick marks in steps of one + frame=["a5f1g5", "za5f1g5"], + projection=f"x{SCALE}c", + zscale=f"{SCALE}c", + surftype="s", + cmap="roma", + perspective=[135, 30], # Azimuth southeast (135°), at elevation 30° + shading="+a45", + ) + + # Add colorbar for gridded data + fig.colorbar( + frame="a2f1", # Set annotations in steps of two, tick marks in steps of one + position="JMR", # Place colorbar in the Middle Right (MR) corner + ) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 2.271 seconds) + + +.. _sphx_glr_download_gallery_3d_plots_grdview_surface.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: grdview_surface.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: grdview_surface.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: grdview_surface.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/3d_plots/scatter3d.rst.txt b/v0.14.0/_sources/gallery/3d_plots/scatter3d.rst.txt new file mode 100644 index 00000000000..1c545156a37 --- /dev/null +++ b/v0.14.0/_sources/gallery/3d_plots/scatter3d.rst.txt @@ -0,0 +1,163 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/3d_plots/scatter3d.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_gallery_3d_plots_scatter3d.py: + + +3-D scatter plots +================= + +The :meth:`pygmt.Figure.plot3d` method can be used to plot symbols in 3-D. +In the example below, we show how the +`Iris flower dataset `__ +can be visualized using a perspective 3-D plot. The ``region`` +parameter has to include the :math:`x`, :math:`y`, :math:`z` axis limits in the +form of (xmin, xmax, ymin, ymax, zmin, zmax), which can be done automatically +using :func:`pygmt.info`. To plot the z-axis frame, set ``frame`` as a +minimum to something like ``frame=["WsNeZ", "zaf"]``. Use ``perspective`` to +control the azimuth and elevation angle of the view, and ``zscale`` to adjust +the vertical exaggeration factor. + +.. GENERATED FROM PYTHON SOURCE LINES 18-101 + + + +.. image-sg:: /gallery/3d_plots/images/sphx_glr_scatter3d_001.png + :alt: scatter3d + :srcset: /gallery/3d_plots/images/sphx_glr_scatter3d_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pandas as pd + import pygmt + + # Load sample iris data + df = pd.read_csv("https://github.com/mwaskom/seaborn-data/raw/master/iris.csv") + + # Convert 'species' column to categorical dtype + # By default, pandas sorts the individual categories in an alphabetical order. + # For a non-alphabetical order, you have to manually adjust the list of + # categories. For handling and manipulating categorical data in pandas, + # have a look at: + # https://pandas.pydata.org/docs/user_guide/categorical.html + df.species = df.species.astype(dtype="category") + + # Make a list of the individual categories of the 'species' column + # ['setosa', 'versicolor', 'virginica'] + # They are (corresponding to the categorical number code) by default in + # alphabetical order and later used for the colorbar labels + labels = list(df.species.cat.categories) + + # Use pygmt.info to get region bounds (xmin, xmax, ymin, ymax, zmin, zmax) + # The below example will return a numpy array [0.0, 3.0, 4.0, 8.0, 1.0, 7.0] + region = pygmt.info( + data=df[["petal_width", "sepal_length", "petal_length"]], # x, y, z columns + per_column=True, # Report the min/max values per column as a numpy array + # Round the min/max values of the first three columns to the nearest + # multiple of 1, 2 and 0.5, respectively + spacing=(1, 2, 0.5), + ) + + # Make a 3-D scatter plot, coloring each of the 3 species differently + fig = pygmt.Figure() + + # Define a colormap for three categories, define the range of the + # new discrete CPT using series=(lowest_value, highest_value, interval), + # use color_model="+csetosa,versicolor,virginica" to write the discrete color + # palette "cubhelix" in categorical format and add the species names as + # annotations for the colorbar + pygmt.makecpt( + cmap="cubhelix", + # Use the minimum and maximum of the categorical number code + # to set the lowest_value and the highest_value of the CPT + series=(df.species.cat.codes.min(), df.species.cat.codes.max(), 1), + # Convert ['setosa', 'versicolor', 'virginica'] to + # 'setosa,versicolor,virginica' + color_model="+c" + ",".join(labels), + ) + + fig.plot3d( + # Use petal width, sepal length, and petal length as x, y, and z + # data input, respectively + x=df.petal_width, + y=df.sepal_length, + z=df.petal_length, + # Vary each symbol size according to the sepal width, scaled by 0.1 + size=0.1 * df.sepal_width, + # Use 3-D cubes ("u") as symbols with size in centimeters ("c") + style="uc", + # Points colored by categorical number code (refers to the species) + fill=df.species.cat.codes.astype(int), + # Use colormap created by makecpt + cmap=True, + # Set map dimensions (xmin, xmax, ymin, ymax, zmin, zmax) + region=region, + # Set frame parameters + frame=[ + "WsNeZ3+tIris flower data set", # z axis label positioned on 3rd corner, add title + "xafg+lPetal Width (cm)", + "yafg+lSepal Length (cm)", + "zafg+lPetal Length (cm)", + ], + # Set perspective to azimuth NorthWest (315°), at elevation 25° + perspective=[315, 25], + # Vertical exaggeration factor + zscale=1.5, + ) + + # Shift plot origin in x direction + fig.shift_origin(xshift="3.1c") + # Add colorbar legend + fig.colorbar() + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.371 seconds) + + +.. _sphx_glr_download_gallery_3d_plots_scatter3d.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: scatter3d.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: scatter3d.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: scatter3d.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/3d_plots/sg_execution_times.rst.txt b/v0.14.0/_sources/gallery/3d_plots/sg_execution_times.rst.txt new file mode 100644 index 00000000000..37f5f592574 --- /dev/null +++ b/v0.14.0/_sources/gallery/3d_plots/sg_execution_times.rst.txt @@ -0,0 +1,40 @@ + +:orphan: + +.. _sphx_glr_gallery_3d_plots_sg_execution_times: + + +Computation times +================= +**00:02.642** total execution time for 2 files **from gallery/3d_plots**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_gallery_3d_plots_grdview_surface.py` (``grdview_surface.py``) + - 00:02.271 + - 0.0 + * - :ref:`sphx_glr_gallery_3d_plots_scatter3d.py` (``scatter3d.py``) + - 00:00.371 + - 0.0 diff --git a/v0.14.0/_sources/gallery/basemaps/double_y_axes.rst.txt b/v0.14.0/_sources/gallery/basemaps/double_y_axes.rst.txt new file mode 100644 index 00000000000..900b9c0bd86 --- /dev/null +++ b/v0.14.0/_sources/gallery/basemaps/double_y_axes.rst.txt @@ -0,0 +1,133 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/basemaps/double_y_axes.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_gallery_basemaps_double_y_axes.py: + + +Double Y-axes graph +=================== + +The ``frame`` parameter of the plotting methods of the :class:`pygmt.Figure` +class can control which axes should be plotted and optionally show annotations, +tick marks, and gridlines. By default, all 4 axes are plotted, along with +annotations and tick marks (denoted **W**, **S**, **E**, **N**). Lower case +versions (**w**, **s**, **e**, **n**) can be used to denote to only plot the +axes with tick marks. We can also only plot the axes without annotations and +tick marks using **l** (left axis), **r** (right axis), **t** (top axis), +**b** (bottom axis). When ``frame`` is used to change the frame settings, any +axes that are not defined using one of these three options are not drawn. + +To plot a double Y-axes graph using PyGMT, we need to plot at least two base +maps separately. The base maps should share the same projection parameter and +x-axis limits, but different y-axis limits. + +.. GENERATED FROM PYTHON SOURCE LINES 21-71 + + + +.. image-sg:: /gallery/basemaps/images/sphx_glr_double_y_axes_001.png + :alt: double y axes + :srcset: /gallery/basemaps/images/sphx_glr_double_y_axes_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Generate two sample Y data from one common X data + x = np.linspace(1.0, 9.0, num=9) + y1 = x + y2 = x**2 + 110 + + fig = pygmt.Figure() + + # Plot the common X axes + # The bottom axis (S) is plotted with annotations and tick marks + # The top axis (t) is plotted without annotations and tick marks + # The left and right axes are not drawn + fig.basemap(region=[0, 10, 0, 10], projection="X15c/15c", frame=["St", "xaf+lx"]) + + # Plot the Y axis for y1 data + # The left axis (W) is plotted with blue annotations, ticks, and label + with pygmt.config( + MAP_FRAME_PEN="blue", + MAP_TICK_PEN="blue", + FONT_ANNOT_PRIMARY="blue", + FONT_LABEL="blue", + ): + fig.basemap(frame=["W", "yaf+ly1"]) + + # Plot the line for y1 data + fig.plot(x=x, y=y1, pen="1p,blue") + # Plot points for y1 data + fig.plot(x=x, y=y1, style="c0.2c", fill="blue", label="y1") + + # Plot the Y axis for y2 data + # The right axis (E) is plotted with red annotations, ticks, and label + with pygmt.config( + MAP_FRAME_PEN="red", + MAP_TICK_PEN="red", + FONT_ANNOT_PRIMARY="red", + FONT_LABEL="red", + ): + fig.basemap(region=[0, 10, 100, 200], frame=["E", "yaf+ly2"]) + # Plot the line for y2 data + fig.plot(x=x, y=y2, pen="1p,red") + # Plot points for y2 data + fig.plot(x=x, y=y2, style="s0.28c", fill="red", label="y2") + + # Create a legend in the Top Left (TL) corner of the plot with an + # offset of 0.1 centimeters + fig.legend(position="jTL+o0.1c", box=True) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.204 seconds) + + +.. _sphx_glr_download_gallery_basemaps_double_y_axes.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: double_y_axes.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: double_y_axes.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: double_y_axes.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/basemaps/sg_execution_times.rst.txt b/v0.14.0/_sources/gallery/basemaps/sg_execution_times.rst.txt new file mode 100644 index 00000000000..a7f7a5f9215 --- /dev/null +++ b/v0.14.0/_sources/gallery/basemaps/sg_execution_times.rst.txt @@ -0,0 +1,40 @@ + +:orphan: + +.. _sphx_glr_gallery_basemaps_sg_execution_times: + + +Computation times +================= +**00:00.404** total execution time for 2 files **from gallery/basemaps**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_gallery_basemaps_double_y_axes.py` (``double_y_axes.py``) + - 00:00.204 + - 0.0 + * - :ref:`sphx_glr_gallery_basemaps_ternary.py` (``ternary.py``) + - 00:00.200 + - 0.0 diff --git a/v0.14.0/_sources/gallery/basemaps/ternary.rst.txt b/v0.14.0/_sources/gallery/basemaps/ternary.rst.txt new file mode 100644 index 00000000000..a99a2fda1ae --- /dev/null +++ b/v0.14.0/_sources/gallery/basemaps/ternary.rst.txt @@ -0,0 +1,109 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/basemaps/ternary.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_gallery_basemaps_ternary.py: + + +Ternary diagram +=============== + +The :meth:`pygmt.Figure.ternary` method can draw ternary diagrams. The example +shows how to plot circles with a diameter of 0.1 centimeters +(``style="c0.1c"``) on a 10-centimeters-wide (``width="10c"``) ternary diagram +at the positions listed in the first three columns of the sample dataset +``rock_compositions``, with default annotations and gridline spacings, using +the specified labeling defined via ``alabel``, ``blabel``, and ``clabel``. +Points are colored based on the values given in the fourth columns of the +sample dataset via ``cmap=True``. + +.. GENERATED FROM PYTHON SOURCE LINES 16-47 + + + +.. image-sg:: /gallery/basemaps/images/sphx_glr_ternary_001.png + :alt: ternary + :srcset: /gallery/basemaps/images/sphx_glr_ternary_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + + # Load sample data + data = pygmt.datasets.load_sample_data(name="rock_compositions") + + # Define a colormap to be used for the values given in the fourth column + # of the input dataset + pygmt.makecpt(cmap="batlow", series=[0, 80, 10]) + + fig.ternary( + data, + region=[0, 100, 0, 100, 0, 100], + width="10c", + style="c0.1c", + alabel="Limestone", + blabel="Water", + clabel="Air", + cmap=True, + frame=[ + "aafg+lLimestone component+u %", + "bafg+lWater component+u %", + "cafg+lAir component+u %", + ], + ) + + # Add a colorbar indicating the values given in the fourth column of + # the input dataset + fig.colorbar(position="JBC+o0c/1.5c", frame="x+lPermittivity") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.200 seconds) + + +.. _sphx_glr_download_gallery_basemaps_ternary.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: ternary.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: ternary.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: ternary.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/embellishments/colorbar.rst.txt b/v0.14.0/_sources/gallery/embellishments/colorbar.rst.txt new file mode 100644 index 00000000000..625882bd6a4 --- /dev/null +++ b/v0.14.0/_sources/gallery/embellishments/colorbar.rst.txt @@ -0,0 +1,152 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/embellishments/colorbar.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_gallery_embellishments_colorbar.py: + + +Colorbar +======== + +The :meth:`pygmt.Figure.colorbar` method creates a color scalebar. +The colormap is set via the ``cmap`` parameter. A full list of available +color palette tables can be found at :gmt-docs:`reference/cpts.html`. +Use the ``frame`` parameter to add labels to the **x** and **y** axes +of the colorbar by appending **+l** followed by the desired text. To add +and adjust the annotations (**a**) and ticks (**f**) append the letter +followed by the desired interval. The placement of the colorbar is set +via the ``position`` parameter. There are the following options: + +- **j/J**: placed inside/outside the plot bounding box using any 2-character + combination of vertical (**T**\ op, **M**\ iddle, **B**\ ottom) and + horizontal (**L**\ eft, **C**\ enter, **R**\ ight) alignment codes, e.g. + ``position="jTR"`` for Top Right. +- **g**: using map coordinates, e.g. ``position="g170/-45"`` for longitude + 170° East, latitude 45° South. +- **x**: using paper coordinates, e.g. ``position="x5c/7c"`` for 5 cm, 7 cm + from anchor point. +- **n**: using normalized (0-1) coordinates, e.g. ``position="n0.4/0.8"``. + +Note that the anchor point defaults to Bottom Left (**BL**). Append ``+h`` to +``position`` to get a horizontal colorbar instead of a vertical one (``+v``). + +.. GENERATED FROM PYTHON SOURCE LINES 29-90 + + + +.. image-sg:: /gallery/embellishments/images/sphx_glr_colorbar_001.png + :alt: colorbar + :srcset: /gallery/embellishments/images/sphx_glr_colorbar_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.basemap(region=[0, 3, 6, 9], projection="x3c", frame=["af", "WSne+tColorbars"]) + + # ============ + # Create a colorbar designed for seismic tomography - roma + # Colorbar is placed at Bottom Center (BC) by default if no position is given + # Add quantity and unit as labels ("+l") to the x and y axes + # Add annotations ("+a") in steps of 0.5 and ticks ("+f") in steps of 0.1 + fig.colorbar(cmap="roma", frame=["xa0.5f0.1+lVelocity", "y+lm/s"]) + + # ============ + # Create a colorbar showing the scientific rainbow - batlow + fig.colorbar( + cmap="batlow", + # Colorbar positioned at map coordinates (g) longitude/latitude 0.3/8.7, + # with a length/width (+w) of 4 cm by 0.5 cm, and plotted horizontally (+h) + position="g0.3/8.7+w4c/0.5c+h", + box=True, + frame=["x+lTemperature", "y+l°C"], + scale=100, + ) + + # ============ + # Create a colorbar suitable for surface topography - oleron + fig.colorbar( + cmap="oleron", + # Colorbar placed outside the plot bounding box (J) at Middle Right (MR), + # offset (+o) by 1 cm horizontally and 0 cm vertically from anchor point, + # with a length/width (+w) of 7 cm by 0.5 cm and a box for NaN values (+n) + position="JMR+o1c/0c+w7c/0.5c+n+mc", + # Note that the label 'Elevation' is moved to the opposite side and plotted + # vertically as a column of text using '+mc' in the position parameter + # above + frame=["x+lElevation", "y+lm"], + scale=10, + ) + + # ============ + # Create a colorbar suitable for categorical data - hawaii + # Set up the colormap + pygmt.makecpt( + cmap="hawaii", + series=[0, 3, 1], + # Comma-separated string for the annotations of the colorbar + color_model="+cA,B,C,D", + ) + # Plot the colorbar + fig.colorbar( + cmap=True, # Use colormap set up above + # Colorbar placed inside the plot bounding box (j) in the Bottom Left (BL) corner, + # with an offset (+o) by 0.5 cm horizontally and 0.8 cm vertically from the anchor + # point, and plotted horizontally (+h) + position="jBL+o0.5c/0.8c+h", + box=True, + # Divide colorbar into equal-sized rectangles + equalsize=0.5, + ) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.165 seconds) + + +.. _sphx_glr_download_gallery_embellishments_colorbar.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: colorbar.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: colorbar.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: colorbar.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/embellishments/colorbars_multiple.rst.txt b/v0.14.0/_sources/gallery/embellishments/colorbars_multiple.rst.txt new file mode 100644 index 00000000000..53e21b5c11e --- /dev/null +++ b/v0.14.0/_sources/gallery/embellishments/colorbars_multiple.rst.txt @@ -0,0 +1,108 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/embellishments/colorbars_multiple.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_gallery_embellishments_colorbars_multiple.py: + + +Multiple colormaps +================== + +This gallery example shows how to create multiple colormaps for different +subplots. To better understand how GMT modern mode maintains several levels of +colormaps, please refer to +:gmt-docs:`reference/features.html#gmt-modern-mode-hierarchical-levels` for +details. + +.. GENERATED FROM PYTHON SOURCE LINES 13-46 + + + +.. image-sg:: /gallery/embellishments/images/sphx_glr_colorbars_multiple_001.png + :alt: colorbars multiple + :srcset: /gallery/embellishments/images/sphx_glr_colorbars_multiple_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + + # Load Earth relief data for the entire globe and a subset region + grid_globe = pygmt.datasets.load_earth_relief(resolution="01d") + subset_region = [-14, 30, 35, 60] + grid_subset = pygmt.datasets.load_earth_relief(resolution="10m", region=subset_region) + + # Define a 1-row, 2-column subplot layout. The overall figure dimensions are + # set to be 15 cm wide and 8 cm high. Each subplot is automatically labelled. + # The space between the subplots is set to be 0.5 cm. + with fig.subplot( + nrows=1, ncols=2, figsize=("15c", "8c"), autolabel=True, margins="0.5c" + ): + # Activate the first panel so that the colormap created by the makecpt + # function is a panel-level CPT + with fig.set_panel(panel=0): + pygmt.makecpt(cmap="geo", series=[-8000, 8000]) + # "R?" means Winkel Tripel projection with map width automatically + # determined from the subplot width. + fig.grdimage(grid=grid_globe, projection="R?", region="g", frame="a") + fig.colorbar(frame=["a4000f2000", "x+lElevation", "y+lm"]) + # Activate the second panel so that the colormap created by the makecpt + # function is a panel-level CPT + with fig.set_panel(panel=1): + pygmt.makecpt(cmap="globe", series=[-6000, 3000]) + # "M?" means Mercator projection with map width also automatically + # determined from the subplot width. + fig.grdimage(grid=grid_subset, projection="M?", region=subset_region, frame="a") + fig.colorbar(frame=["a2000f1000", "x+lElevation", "y+lm"]) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.309 seconds) + + +.. _sphx_glr_download_gallery_embellishments_colorbars_multiple.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: colorbars_multiple.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: colorbars_multiple.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: colorbars_multiple.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/embellishments/inset.rst.txt b/v0.14.0/_sources/gallery/embellishments/inset.rst.txt new file mode 100644 index 00000000000..91f0937608c --- /dev/null +++ b/v0.14.0/_sources/gallery/embellishments/inset.rst.txt @@ -0,0 +1,96 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/embellishments/inset.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_gallery_embellishments_inset.py: + + +Inset +===== + +The :meth:`pygmt.Figure.inset` method adds an inset figure inside a larger +figure. The method is called using a ``with`` statement, and its +``position``, ``box``, ``offset``, and ``margin`` parameters are set. Plotting +methods called within the ``with`` statement are applied to the inset figure. + +.. GENERATED FROM PYTHON SOURCE LINES 12-34 + + + +.. image-sg:: /gallery/embellishments/images/sphx_glr_inset_001.png + :alt: inset + :srcset: /gallery/embellishments/images/sphx_glr_inset_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Create the primary figure, setting the region to Madagascar, the land color + # to "brown", the water to "lightblue", the shorelines width to "thin", and + # adding a frame + fig.coast(region="MG+r2", land="brown", water="lightblue", shorelines="thin", frame="a") + # Create an inset, placing it in the Top Left (TL) corner with a width of 3.5 cm and + # x- and y-offsets of 0.2 cm. The margin is set to 0, and the border is "gold" with a + # pen size of 1.5 points. + with fig.inset(position="jTL+w3.5c+o0.2c", margin=0, box="+p1.5p,gold"): + # Create a figure in the inset using coast. This example uses the azimuthal + # orthogonal projection centered at 47E, 20S. The land color is set to + # "gray" and Madagascar is highlighted in "red3". + fig.coast( + region="g", + projection="G47/-20/?", + land="gray", + water="white", + dcw="MG+gred3", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.493 seconds) + + +.. _sphx_glr_download_gallery_embellishments_inset.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: inset.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: inset.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: inset.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/embellishments/inset_rectangle_region.rst.txt b/v0.14.0/_sources/gallery/embellishments/inset_rectangle_region.rst.txt new file mode 100644 index 00000000000..9b258640699 --- /dev/null +++ b/v0.14.0/_sources/gallery/embellishments/inset_rectangle_region.rst.txt @@ -0,0 +1,117 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/embellishments/inset_rectangle_region.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_gallery_embellishments_inset_rectangle_region.py: + + +Inset map showing a rectangular region +====================================== + +The :meth:`pygmt.Figure.inset` method adds an inset figure inside a larger +figure. The method is called using a ``with`` statement, and its +``position``, ``box``, ``offset``, and ``margin`` can be customized. Plotting +methods called within the ``with`` statement plot into the inset figure. + +.. GENERATED FROM PYTHON SOURCE LINES 12-55 + + + +.. image-sg:: /gallery/embellishments/images/sphx_glr_inset_rectangle_region_001.png + :alt: inset rectangle region + :srcset: /gallery/embellishments/images/sphx_glr_inset_rectangle_region_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + # Set the region of the main figure + region = [137.5, 141, 34, 37] + + fig = pygmt.Figure() + + # Plot the base map of the main figure. Universal Transverse Mercator (UTM) + # projection is used and the UTM zone is set to be "54S". + fig.basemap(region=region, projection="U54S/12c", frame=["WSne", "af"]) + + # Set the land color to "lightbrown", the water color to "azure1", the + # shoreline width to "2p", and the area threshold to 1000 km^2 for the main + # figure + fig.coast(land="lightbrown", water="azure1", shorelines="2p", area_thresh=1000) + + # Create an inset map, placing it in the Bottom Right (BR) corner with x- and + # y-offsets of 0.1 cm, respectively. + # The inset map contains the Japan main land. "U54S/3c" means UTM projection + # with a map width of 3 cm. The inset width and height are automatically + # calculated from the specified ``region`` and ``projection`` parameters. + # Draws a rectangular box around the inset with a fill color of "white" and + # a pen of "1p". + with fig.inset( + position="jBR+o0.1c", + box="+gwhite+p1p", + region=[129, 146, 30, 46], + projection="U54S/3c", + ): + # Highlight the Japan area in "lightbrown" + # and draw its outline with a pen of "0.2p". + fig.coast( + dcw="JP+glightbrown+p0.2p", + area_thresh=10000, + ) + # Plot a rectangle ("r") in the inset map to show the area of the main + # figure. "+s" means that the first two columns are the longitude and + # latitude of the bottom left corner of the rectangle, and the last two + # columns the longitude and latitude of the upper right corner. + rectangle = [[region[0], region[2], region[1], region[3]]] + fig.plot(data=rectangle, style="r+s", pen="2p,blue") + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.332 seconds) + + +.. _sphx_glr_download_gallery_embellishments_inset_rectangle_region.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: inset_rectangle_region.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: inset_rectangle_region.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: inset_rectangle_region.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/embellishments/legend.rst.txt b/v0.14.0/_sources/gallery/embellishments/legend.rst.txt new file mode 100644 index 00000000000..452080c5e2f --- /dev/null +++ b/v0.14.0/_sources/gallery/embellishments/legend.rst.txt @@ -0,0 +1,125 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/embellishments/legend.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_gallery_embellishments_legend.py: + + +Legend +====== + +The :meth:`pygmt.Figure.legend` method can automatically create a legend for +symbols plotted using :meth:`pygmt.Figure.plot`. A legend entry is only added +when the ``label`` parameter is used to state the desired text. Optionally, +to adjust the legend, users can append different modifiers. A list of all +available modifiers can be found at :gmt-docs:`gmt.html#l-full`. To create a +multiple-column legend **+N** is used with the desired number of columns. +For more complicated legends, users may want to write an ASCII file with +instructions for the layout of the legend items and pass it to the ``spec`` +parameter of :meth:`pygmt.Figure.legend`. For details on how to set up such a +file, please see the GMT documentation at :gmt-docs:`legend.html#legend-codes`. + +.. GENERATED FROM PYTHON SOURCE LINES 18-63 + + + +.. image-sg:: /gallery/embellishments/images/sphx_glr_legend_001.png + :alt: legend + :srcset: /gallery/embellishments/images/sphx_glr_legend_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Set up some test data + x = np.arange(-10, 10.2, 0.2) + y1 = np.sin(x) + 1.1 + y2 = np.cos(x) + 1.1 + y3 = np.sin(x / 2) - 1.1 + y4 = np.cos(x / 2) - 1.1 + + # Create new Figure() object + fig = pygmt.Figure() + + fig.basemap( + projection="X10c/7c", + region=[-10, 10, -3.5, 3.5], + frame=["WSne", "xaf+lx", "ya1f0.5+ly"], + ) + + # ----------------------------------------------------------------------------- + # Top: Vertical legend (one column, default) + + # Use the label parameter to state the text label for the legend entry + fig.plot(x=x, y=y1, pen="1p,green3", label="sin(x)+1.1") + + fig.plot(x=x, y=y2, style="c0.07c", fill="dodgerblue", label="cos(x)+1.1") + + # Add a legend to the plot; place it within the plot bounding box with both + # reference ("J") and anchor ("+j") points being the Top Right (TR) corner and an + # offset of 0.2 centimeters in x and y directions; surround the legend with a box + fig.legend(position="JTR+jTR+o0.2c", box=True) + + # ----------------------------------------------------------------------------- + # Bottom: Horizontal legend (here two columns) + + # +N sets the number of columns corresponding to the given number, here 2 + fig.plot(x=x, y=y3, pen="1p,darkred,-", label="sin(x/2)-1.1+N2") + + fig.plot(x=x, y=y4, style="s0.07c", fill="orange", label="cos(x/2)-1.1") + + # For a multi-column legend, users have to provide the width via "+w", here it is + # set to 6 centimeters; reference and anchor points are the Bottom Right (BR) corner + fig.legend(position="JBR+jBR+o0.2c+w6c", box=True) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.144 seconds) + + +.. _sphx_glr_download_gallery_embellishments_legend.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: legend.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: legend.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: legend.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/embellishments/logo.rst.txt b/v0.14.0/_sources/gallery/embellishments/logo.rst.txt new file mode 100644 index 00000000000..d302d43f6d7 --- /dev/null +++ b/v0.14.0/_sources/gallery/embellishments/logo.rst.txt @@ -0,0 +1,82 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/embellishments/logo.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_gallery_embellishments_logo.py: + + +Logo +==== + +The :meth:`pygmt.Figure.logo` method allows to place the GMT logo on a map. + +.. GENERATED FROM PYTHON SOURCE LINES 9-20 + + + +.. image-sg:: /gallery/embellishments/images/sphx_glr_logo_001.png + :alt: logo + :srcset: /gallery/embellishments/images/sphx_glr_logo_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 2], projection="X6c", frame=True) + + # Add the GMT logo in the Top Right (TR) corner of the current map, + # scaled up to be 3 cm wide and offset by 0.3 cm in x direction + # and 0.6 cm in y direction. + fig.logo(position="jTR+o0.3c/0.6c+w3c") + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.214 seconds) + + +.. _sphx_glr_download_gallery_embellishments_logo.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: logo.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: logo.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: logo.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/embellishments/scalebar.rst.txt b/v0.14.0/_sources/gallery/embellishments/scalebar.rst.txt new file mode 100644 index 00000000000..c798e979672 --- /dev/null +++ b/v0.14.0/_sources/gallery/embellishments/scalebar.rst.txt @@ -0,0 +1,192 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/embellishments/scalebar.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_gallery_embellishments_scalebar.py: + + +Scale bar +========= + +The ``map_scale`` parameter of the :meth:`pygmt.Figure.basemap` and +:meth:`pygmt.Figure.coast` methods is used to add a scale bar to a map. +This example shows how such a scale bar can be customized: + + - position: **g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**. Set the position + of the reference point. Choose from + + - **g**: Give map coordinates as *longitude*\/\ *latitude*. + - **j**\|\ **J**: Specify a two-character (order independent) code. + Choose from vertical **T**\(op), **M**\(iddle), or **B**\(ottom) and + horizontal **L**\(eft), **C**\(entre), or **R**\(ight). Lower / upper + case **j** / **J** mean inside / outside of the map bounding box. + - **n**: Give normalized bounding box coordinates as *nx*\/\ *ny*. + - **x**: Give plot coordinates as *x*\/\ *y*. + + - length: **+w**. Give a distance value, and, optionally a distance unit. + Choose from **e** (meters), **f** (feet), **k** (kilometers) [Default], + **M** (statute miles), **n** (nautical miles), or **u** (US survey feet). + - origin: **+c**\ [*slon*/]\ *slat*. Control where on the map the scale bar + applies. If **+c** is not given the reference point is used. If only + **+c** is appended the middle of the map is used. Note that *slon* is only + optional for projections with constant scale along parallels, e.g., + Mercator projection. + - justify: **+j**. Set the anchor point. Specify a two-character (order + independent) code. Choose from vertical **T**\(op), **M**\(iddle), or + **B**\(ottom) and horizontal **L**\(eft), **C**\(entre), or **R**\(ight). + - offset: **+o**\ *offset* or **+o**\ *xoffset*/\ *yoffset*. Give either a + common shift or individual shifts in x (longitude) and y (latitude) + directions. + - height: Use :gmt-term:`MAP_SCALE_HEIGHT` via :func:`pygmt.config`. + - fancy style: **+f**. Get a scale bar that looks like train tracks. + - unit: **+u**. Add the distance unit given via **+w** to the single + distance values. + - label: **+l**. Add the distance unit given via **+w** as label. Append + text to get a customized label instead. + - alignment: **+a**. Set the label alignment. Choose from **t**\(op) + [Default], **b**\(ottom), **l**\(eft), or **r**\(ight). + +.. GENERATED FROM PYTHON SOURCE LINES 45-86 + +.. code-block:: Python + + import pygmt + + # Create a new Figure instance + fig = pygmt.Figure() + + # Mercator projection with 10 centimeters width + fig.basemap(region=[-45, -25, -15, 0], projection="M0/0/10c", frame=["WSne", "af"]) + + # ----------------------------------------------------------------------------- + # Top Left: Add a plain scale bar + # It is placed based on geographic coordinates (g) 42° West and 1° South, + # applies at the reference point (+c is not given), and represents a + # length (+w) of 500 kilometers + fig.basemap(map_scale="g-42/-1+w500k") + + # ----------------------------------------------------------------------------- + # Top Right: Add a fancy scale bar + # It is placed based on normalized bounding box coordinates (n) + # Use a fancy style (+f) to get a scale bar that looks like train tracks + # Add the distance unit (+u) to the single distance values + fig.basemap(map_scale="n0.8/0.95+w500k+f+u") + + # ----------------------------------------------------------------------------- + # Bottom Left: Add a thick scale bar + # Adjust the GMT default parameter MAP_SCALE_HEIGHT locally (the change applies + # only to the code within the "with" statement) + # It applies (+c) at the middle of the map (no location is appended to +c) + # Without appending text, +l adds the distance unit as label + with pygmt.config(MAP_SCALE_HEIGHT="10p"): + fig.basemap(map_scale="n0.2/0.15+c+w500k+f+l") + + # ----------------------------------------------------------------------------- + # Bottom Right: Add a scale bar valid for a specific location + # It is placed at BottomRight (j) using MiddleRight as anchor point (+j) with + # an offset (+o) of 1 centimeter in both x and y directions + # It applies (+c) at -7° South, add a customized label by appending text to +l + fig.basemap(map_scale="jBR+jMR+o1c/1c+c-7+w500k+f+u+lvalid at 7° S") + + fig.show() + + + + + +.. image-sg:: /gallery/embellishments/images/sphx_glr_scalebar_001.png + :alt: scalebar + :srcset: /gallery/embellishments/images/sphx_glr_scalebar_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 87-92 + +The ``box`` parameter allows surrounding the scale bar. This can be useful +when adding a scale bar to a colorful map. To fill the box, append **+g** +with the desired color (or pattern). The outline of the box can be adjusted +by appending **+p** with the desired thickness, color, and style. To force +rounded edges append **+r** with the desired radius. + +.. GENERATED FROM PYTHON SOURCE LINES 92-112 + +.. code-block:: Python + + + # Create a new Figure instance + fig = pygmt.Figure() + + fig.coast( + region=[-45, -25, -15, 0], + projection="M10c", + land="tan", + water="steelblue", + frame=["WSne", "af"], + # Set the label alignment (+a) to right (r) + map_scale="jBL+o1c/1c+c-7+w500k+f+lkm+ar", + # Fill the box in white with a transparency of 30 percent, add a solid + # outline in darkgray (gray30) with a thickness of 0.5 points, and use + # rounded edges with a radius of 3 points + box="+gwhite@30+p0.5p,gray30,solid+r3p", + ) + + fig.show() + + + + +.. image-sg:: /gallery/embellishments/images/sphx_glr_scalebar_002.png + :alt: scalebar + :srcset: /gallery/embellishments/images/sphx_glr_scalebar_002.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.339 seconds) + + +.. _sphx_glr_download_gallery_embellishments_scalebar.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: scalebar.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: scalebar.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: scalebar.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/embellishments/sg_execution_times.rst.txt b/v0.14.0/_sources/gallery/embellishments/sg_execution_times.rst.txt new file mode 100644 index 00000000000..1014f6bc3c8 --- /dev/null +++ b/v0.14.0/_sources/gallery/embellishments/sg_execution_times.rst.txt @@ -0,0 +1,61 @@ + +:orphan: + +.. _sphx_glr_gallery_embellishments_sg_execution_times: + + +Computation times +================= +**00:02.695** total execution time for 9 files **from gallery/embellishments**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_gallery_embellishments_inset.py` (``inset.py``) + - 00:00.493 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_solar.py` (``solar.py``) + - 00:00.364 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_scalebar.py` (``scalebar.py``) + - 00:00.339 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_timestamp.py` (``timestamp.py``) + - 00:00.336 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_inset_rectangle_region.py` (``inset_rectangle_region.py``) + - 00:00.332 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_colorbars_multiple.py` (``colorbars_multiple.py``) + - 00:00.309 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_logo.py` (``logo.py``) + - 00:00.214 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_colorbar.py` (``colorbar.py``) + - 00:00.165 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_legend.py` (``legend.py``) + - 00:00.144 + - 0.0 diff --git a/v0.14.0/_sources/gallery/embellishments/solar.rst.txt b/v0.14.0/_sources/gallery/embellishments/solar.rst.txt new file mode 100644 index 00000000000..486861240b9 --- /dev/null +++ b/v0.14.0/_sources/gallery/embellishments/solar.rst.txt @@ -0,0 +1,116 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/embellishments/solar.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_gallery_embellishments_solar.py: + + +Day-night terminator line and twilights +======================================= + +Use :meth:`pygmt.Figure.solar` to show the different transition stages between +daytime and nighttime. The parameter ``terminator`` is used to set the twilight +stage, and can be either ``"day_night"`` (brightest), ``"civil"``, +``"nautical"``, or ``"astronomical"`` (darkest). +Refer to https://en.wikipedia.org/wiki/Twilight for more information. + +.. GENERATED FROM PYTHON SOURCE LINES 13-54 + + + +.. image-sg:: /gallery/embellishments/images/sphx_glr_solar_001.png + :alt: solar + :srcset: /gallery/embellishments/images/sphx_glr_solar_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import datetime + + import pygmt + + fig = pygmt.Figure() + # Create a figure showing the global region on a Mollweide projection + # Land color is set to dark green and water color is set to light blue + fig.coast(region="d", projection="W0/15c", land="darkgreen", water="lightblue") + # Set a time for the day-night terminator and twilights, 17:00 UTC on + # January 1, 2000 + terminator_datetime = datetime.datetime( + year=2000, month=1, day=1, hour=17, minute=0, second=0 + ) + # Set the pen line to be 0.5 points thick + # Set the fill for the night area to be navy blue at different transparency + # levels + fig.solar( + terminator="day_night", + terminator_datetime=terminator_datetime, + fill="navyblue@95", + pen="0.5p", + ) + fig.solar( + terminator="civil", + terminator_datetime=terminator_datetime, + fill="navyblue@85", + pen="0.5p", + ) + fig.solar( + terminator="nautical", + terminator_datetime=terminator_datetime, + fill="navyblue@80", + pen="0.5p", + ) + fig.solar( + terminator="astronomical", + terminator_datetime=terminator_datetime, + fill="navyblue@80", + pen="0.5p", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.364 seconds) + + +.. _sphx_glr_download_gallery_embellishments_solar.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: solar.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: solar.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: solar.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/embellishments/timestamp.rst.txt b/v0.14.0/_sources/gallery/embellishments/timestamp.rst.txt new file mode 100644 index 00000000000..4b6fdc75db1 --- /dev/null +++ b/v0.14.0/_sources/gallery/embellishments/timestamp.rst.txt @@ -0,0 +1,117 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/embellishments/timestamp.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_gallery_embellishments_timestamp.py: + + +Timestamp +========= + +The :meth:`pygmt.Figure.timestamp` method can draw the GMT timestamp logo on the plot. +The timestamp will always be shown relative to the Bottom Left (BL) corner of the plot. +By default, the ``offset`` and ``justify`` parameters are set to ``("-54p", "-54p")`` +(x, y directions) and ``"BL"`` (Bottom Left), respectively. + +.. GENERATED FROM PYTHON SOURCE LINES 12-21 + +.. code-block:: Python + + import os + + import pygmt + + fig = pygmt.Figure() + fig.basemap(region=[20, 30, -10, 10], projection="X10c/5c", frame=True) + fig.timestamp() + fig.show() + + + + +.. image-sg:: /gallery/embellishments/images/sphx_glr_timestamp_001.png + :alt: timestamp + :srcset: /gallery/embellishments/images/sphx_glr_timestamp_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 22-24 + +Additionally, a custom label can be added via the ``label`` parameter. The font can be +defined via the ``font`` parameter and the timestamp string format via ``timefmt``. + +.. GENERATED FROM PYTHON SOURCE LINES 24-37 + +.. code-block:: Python + + + os.environ["TZ"] = "Pacific/Honolulu" # optionally set the time zone + + fig = pygmt.Figure() + fig.coast(region="d", projection="H10c", land="black", water="cornsilk", frame="afg") + fig.timestamp( + label="Powered by PyGMT", + justify="TL", + font="Times-Bold", + timefmt="%Y-%m-%dT%H:%M:%S%z", + ) + fig.show() + + + + +.. image-sg:: /gallery/embellishments/images/sphx_glr_timestamp_002.png + :alt: timestamp + :srcset: /gallery/embellishments/images/sphx_glr_timestamp_002.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.336 seconds) + + +.. _sphx_glr_download_gallery_embellishments_timestamp.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: timestamp.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: timestamp.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: timestamp.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/histograms/blockm.rst.txt b/v0.14.0/_sources/gallery/histograms/blockm.rst.txt new file mode 100644 index 00000000000..4522975e616 --- /dev/null +++ b/v0.14.0/_sources/gallery/histograms/blockm.rst.txt @@ -0,0 +1,124 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/histograms/blockm.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_gallery_histograms_blockm.py: + + +Blockmean +========= + +The :func:`pygmt.blockmean` function calculates different quantities +inside blocks/bins whose dimensions are defined via the ``spacing`` parameter. +The following examples show how to calculate the averages of the given values +inside each bin and how to report the number of points inside each bin. + +.. GENERATED FROM PYTHON SOURCE LINES 12-62 + + + +.. image-sg:: /gallery/histograms/images/sphx_glr_blockm_001.png + :alt: blockm + :srcset: /gallery/histograms/images/sphx_glr_blockm_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + # Load sample data + data = pygmt.datasets.load_sample_data(name="japan_quakes") + # Select only needed columns + data = data[["longitude", "latitude", "depth_km"]] + + # Set the region for the plot + region = [130, 152.5, 32.5, 52.5] + # Define spacing in x and y direction (150x150 arc-minute blocks) + spacing = "150m" + + fig = pygmt.Figure() + + # Calculate mean depth in kilometers from all events within + # 150x150 arc-minute bins using blockmean + df = pygmt.blockmean(data=data, region=region, spacing=spacing) + # Convert to grid + grd = pygmt.xyz2grd(data=df, region=region, spacing=spacing) + + fig.grdimage( + grid=grd, + region=region, + frame=["af", "+tMean earthquake depth inside each block"], + cmap="batlow", + ) + # Plot slightly transparent landmasses on top + fig.coast(land="darkgray", transparency=40) + # Plot original data points + fig.plot(x=data.longitude, y=data.latitude, style="c0.3c", fill="white", pen="1p,black") + fig.colorbar(frame="x+lkm") + + fig.shift_origin(xshift="w+5c") + + # Calculate number of total locations within 150x150 arc-minute bins + # with blockmean's summary parameter + df = pygmt.blockmean(data=data, region=region, spacing=spacing, summary="n") + grd = pygmt.xyz2grd(data=df, region=region, spacing=spacing) + + fig.grdimage( + grid=grd, + region=region, + frame=["af", "+tNumber of points inside each block"], + cmap="batlow", + ) + fig.coast(land="darkgray", transparency=40) + fig.plot(x=data.longitude, y=data.latitude, style="c0.3c", fill="white", pen="1p,black") + fig.colorbar(frame="x+lcount") + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.559 seconds) + + +.. _sphx_glr_download_gallery_histograms_blockm.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: blockm.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: blockm.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: blockm.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/histograms/histogram.rst.txt b/v0.14.0/_sources/gallery/histograms/histogram.rst.txt new file mode 100644 index 00000000000..08cc19dd026 --- /dev/null +++ b/v0.14.0/_sources/gallery/histograms/histogram.rst.txt @@ -0,0 +1,102 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/histograms/histogram.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_gallery_histograms_histogram.py: + + +Histogram +========= + +The :meth:`pygmt.Figure.histogram` method can plot regular histograms. +Using the ``series`` parameter allows to set the interval for the width of +each bar. The type of the histogram (frequency count or percentage) can be +selected via the ``histtype`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 12-40 + + + +.. image-sg:: /gallery/histograms/images/sphx_glr_histogram_001.png + :alt: histogram + :srcset: /gallery/histograms/images/sphx_glr_histogram_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Generate random elevation data from a normal distribution + rng = np.random.default_rng(seed=100) + mean = 100 # mean of distribution + stddev = 25 # standard deviation of distribution + data = rng.normal(loc=mean, scale=stddev, size=521) + + + fig = pygmt.Figure() + + fig.histogram( + data=data, + # Define the frame, add a title, and set the background color to + # "lightgray". Add labels to the x-axis and y-axis + frame=["WSne+tHistogram+glightgray", "x+lElevation (m)", "y+lCounts"], + # Generate evenly spaced bins by increments of 5 + series=5, + # Use "red3" as color fill for the bars + fill="red3", + # Use the pen parameter to draw the outlines with a width of 1 point + pen="1p", + # Choose histogram type 0, i.e., counts [Default] + histtype=0, + ) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.216 seconds) + + +.. _sphx_glr_download_gallery_histograms_histogram.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: histogram.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: histogram.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: histogram.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/histograms/rose.rst.txt b/v0.14.0/_sources/gallery/histograms/rose.rst.txt new file mode 100644 index 00000000000..8b6e190d977 --- /dev/null +++ b/v0.14.0/_sources/gallery/histograms/rose.rst.txt @@ -0,0 +1,109 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/histograms/rose.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_gallery_histograms_rose.py: + + +Rose diagram +============ + +The :meth:`pygmt.Figure.rose` method can plot windrose diagrams or polar +histograms. + +.. GENERATED FROM PYTHON SOURCE LINES 10-47 + + + +.. image-sg:: /gallery/histograms/images/sphx_glr_rose_001.png + :alt: rose + :srcset: /gallery/histograms/images/sphx_glr_rose_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + # Load sample compilation of fracture lengths and azimuth as + # hypothetically digitized from geological maps + data = pygmt.datasets.load_sample_data(name="fractures") + + fig = pygmt.Figure() + + fig.rose( + # use columns of the sample dataset as input for the length and azimuth + # parameters + length=data.length, + azimuth=data.azimuth, + # specify the "region" of interest in the (r,azimuth) space + # [r0, r1, az0, az1], here, r0 is 0 and r1 is 1, for azimuth, az0 is 0 and + # az1 is 360 which means we plot a full circle between 0 and 360 degrees + region=[0, 1, 0, 360], + # set the diameter of the rose diagram to 7.5 cm + diameter="7.5c", + # define the sector width in degrees, we append +r here to draw a rose + # diagram instead of a sector diagram + sector="10+r", + # normalize bin counts by the largest value so all bin counts range from + # 0 to 1 + norm=True, + # use red3 as color fill for the sectors + fill="red3", + # define the frame with ticks and gridlines every 0.2 + # length unit in radial direction and every 30 degrees + # in azimuthal direction, set background color to + # lightgray + frame=["x0.2g0.2", "y30g30", "+glightgray"], + # use a pen size of 1p to draw the outlines + pen="1p", + ) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.131 seconds) + + +.. _sphx_glr_download_gallery_histograms_rose.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: rose.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: rose.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: rose.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/histograms/scatter_and_histograms.rst.txt b/v0.14.0/_sources/gallery/histograms/scatter_and_histograms.rst.txt new file mode 100644 index 00000000000..c03a7e6e1e6 --- /dev/null +++ b/v0.14.0/_sources/gallery/histograms/scatter_and_histograms.rst.txt @@ -0,0 +1,139 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/histograms/scatter_and_histograms.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_gallery_histograms_scatter_and_histograms.py: + + +Scatter plot with histograms +============================ + +To create a scatter plot with histograms at the sides of the plot one can use +:meth:`pygmt.Figure.plot` in combination with :meth:`pygmt.Figure.histogram`. The +positions of the histograms are plotted by offsetting them from the main scatter plot +using :meth:`pygmt.Figure.shift_origin`. + +.. GENERATED FROM PYTHON SOURCE LINES 12-77 + + + +.. image-sg:: /gallery/histograms/images/sphx_glr_scatter_and_histograms_001.png + :alt: scatter and histograms + :srcset: /gallery/histograms/images/sphx_glr_scatter_and_histograms_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Generate random x, y coordinates from a standard normal distribution. + # x values are centered on 0 with a standard deviation of 1, and y values are centered + # on 30 with a standard deviation of 2. + rng = np.random.default_rng() + x = rng.normal(loc=0, scale=1, size=1000) + y = rng.normal(loc=30, scale=2, size=1000) + + # Get axis limits from the data limits. Extend the limits by 0.5 to add some margin. + xmin = np.floor(x.min()) - 0.5 + xmax = np.ceil(x.max()) + 0.5 + ymin = np.floor(y.min()) - 0.5 + ymax = np.ceil(y.max()) + 0.5 + + # Set fill color for symbols and bars. + fill = "seagreen" + + # Set the dimensions of the scatter plot. + width, height = 10, 8 + + fig = pygmt.Figure() + fig.basemap( + region=[xmin, xmax, ymin, ymax], + projection=f"X{width}/{height}", + frame=["WSrt", "af"], + ) + + # Plot data points as circles with a diameter of 0.15 centimeters and set transparency + # level for all circles to deal with overplotting. + fig.plot(x=x, y=y, style="c0.15c", fill=fill, transparency=50) + + # Shift the plot origin and add top margin histogram. + fig.shift_origin(yshift=height + 0.25) + + fig.histogram( + projection=f"X{width}/3", + frame=["Wsrt", "xf", "yaf+lCounts"], + # Give the same value for ymin and ymax to have them calculated automatically. + region=[xmin, xmax, 0, 0], + data=x, + fill=fill, + pen="0.1p,white", + histtype=0, + series=0.2, + ) + + # Shift the plot origin and add right margin histogram. + fig.shift_origin(yshift=-height - 0.25, xshift=width + 0.25) + + # Plot the horizontal histogram. + fig.histogram( + horizontal=True, + projection=f"X3/{height}", + # Note that the x- and y-axis are flipped, with the y-axis plotted horizontally. + frame=["wSrt", "xf", "yaf+lCounts"], + region=[ymin, ymax, 0, 0], + data=y, + fill=fill, + pen="0.1p,white", + histtype=0, + series=0.2, + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.271 seconds) + + +.. _sphx_glr_download_gallery_histograms_scatter_and_histograms.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: scatter_and_histograms.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: scatter_and_histograms.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: scatter_and_histograms.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/histograms/sg_execution_times.rst.txt b/v0.14.0/_sources/gallery/histograms/sg_execution_times.rst.txt new file mode 100644 index 00000000000..b1a8bcd37f2 --- /dev/null +++ b/v0.14.0/_sources/gallery/histograms/sg_execution_times.rst.txt @@ -0,0 +1,46 @@ + +:orphan: + +.. _sphx_glr_gallery_histograms_sg_execution_times: + + +Computation times +================= +**00:01.177** total execution time for 4 files **from gallery/histograms**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_gallery_histograms_blockm.py` (``blockm.py``) + - 00:00.559 + - 0.0 + * - :ref:`sphx_glr_gallery_histograms_scatter_and_histograms.py` (``scatter_and_histograms.py``) + - 00:00.271 + - 0.0 + * - :ref:`sphx_glr_gallery_histograms_histogram.py` (``histogram.py``) + - 00:00.216 + - 0.0 + * - :ref:`sphx_glr_gallery_histograms_rose.py` (``rose.py``) + - 00:00.131 + - 0.0 diff --git a/v0.14.0/_sources/gallery/images/contours.rst.txt b/v0.14.0/_sources/gallery/images/contours.rst.txt new file mode 100644 index 00000000000..1fe767339fe --- /dev/null +++ b/v0.14.0/_sources/gallery/images/contours.rst.txt @@ -0,0 +1,111 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/images/contours.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_gallery_images_contours.py: + + +Contours +======== + +The :meth:`pygmt.Figure.contour` method can plot contour lines from a table of +points by direct triangulation. The data for the triangulation can be provided +using one of three methods: + +#. ``x``, ``y``, ``z`` 1-D :class:`numpy.ndarray` data columns. +#. ``data`` 2-D :class:`numpy.ndarray` data matrix with 3 columns corresponding + to ``x``, ``y``, ``z``. +#. ``data`` path string to a file containing the ``x``, ``y``, ``z`` in a + tabular format. + +The parameters ``levels`` and ``annotation`` set the intervals of the contours +and the annotation on the contours respectively. + +In this example we supply the data as 1-D :class:`numpy.ndarray` with the +``x``, ``y``, and ``z`` parameters and draw the contours using a 0.5p pen with +contours every 10 ``z`` values and annotations every 20 ``z`` values. + +.. GENERATED FROM PYTHON SOURCE LINES 24-49 + + + +.. image-sg:: /gallery/images/images/sphx_glr_contours_001.png + :alt: contours + :srcset: /gallery/images/images/sphx_glr_contours_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # build the contours underlying data with the function z = x^2 + y^2 + X, Y = np.meshgrid(np.linspace(-10, 10, 50), np.linspace(-10, 10, 50)) + Z = X**2 + Y**2 + x, y, z = X.flatten(), Y.flatten(), Z.flatten() + + + fig = pygmt.Figure() + fig.contour( + region=[-10, 10, -10, 10], + projection="X10c/10c", + frame="ag", + pen="0.5p", + # pass the data as 3 1-D data columns + x=x, + y=y, + z=z, + # set the contours z values intervals to 10 + levels=10, + # set the contours annotation intervals to 20 + annotation=20, + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.217 seconds) + + +.. _sphx_glr_download_gallery_images_contours.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: contours.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: contours.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: contours.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/images/cross_section.rst.txt b/v0.14.0/_sources/gallery/images/cross_section.rst.txt new file mode 100644 index 00000000000..50c2d33221b --- /dev/null +++ b/v0.14.0/_sources/gallery/images/cross_section.rst.txt @@ -0,0 +1,187 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/images/cross_section.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_gallery_images_cross_section.py: + + +Cross-section along a transect +============================== + +:func:`pygmt.project` and :func:`pygmt.grdtrack` can be used to focus on a quantity and +its variation along a desired survey line. In this example, the elevation is extracted +from a grid provided via :func:`pygmt.datasets.load_earth_relief`. The figure consists +of two parts, a map of the elevation in the study area showing the survey line and a +Cartesian plot showing the elevation along the survey line. + +*This example is orientated on an example in the GMT/China documentation*: +https://docs.gmt-china.org/latest/examples/ex026/ + +.. GENERATED FROM PYTHON SOURCE LINES 16-125 + + + +.. image-sg:: /gallery/images/images/sphx_glr_cross_section_001.png + :alt: cross section + :srcset: /gallery/images/images/sphx_glr_cross_section_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + # Define region of study area + # lon_min, lon_max, lat_min, lat_max in degrees East and North + region_map = [122, 149, 30, 49] + + # Create a new pygmt.Figure instance + fig = pygmt.Figure() + + # ---------------------------------------------------------------------------- + # Bottom: Map of elevation in study area + + # Set up basic map using a Mercator projection with a width of 12 centimeters + fig.basemap(region=region_map, projection="M12c", frame="af") + + # Download grid for Earth relief with a resolution of 10 arc-minutes and gridline + # registration [Default] + grid_map = pygmt.datasets.load_earth_relief(resolution="10m", region=region_map) + + # Plot the downloaded grid with color-coding based on the elevation + fig.grdimage(grid=grid_map, cmap="oleron") + + # Add a colorbar for the elevation + fig.colorbar( + # Place the colorbar inside the plot (lower-case "j") in the Bottom Right (BR) + # corner with an offset ("+o") of 0.7 centimeters and 0.3 centimeters in x or y + # directions, respectively; move the x label above the horizontal colorbar ("+ml") + position="jBR+o0.7c/0.8c+h+w5c/0.3c+ml", + # Add a box around the colobar with a fill ("+g") in "white" color and a + # transparency ("@") of 30 % and with a 0.8-points thick, black, outline ("+p") + box="+gwhite@30+p0.8p,black", + # Add x and y labels ("+l") + frame=["x+lElevation", "y+lm"], + ) + + # Choose a survey line + fig.plot( + x=[126, 146], # Longitude in degrees East + y=[42, 40], # Latitude in degrees North + # Draw a 2-points thick, red, dashed line for the survey line + pen="2p,red,dashed", + ) + + # Add labels "A" and "B" for the start and end points of the survey line + fig.text( + x=[126, 146], + y=[42, 40], + text=["A", "B"], + offset="0c/0.2c", # Move text 0.2 centimeters up (y direction) + font="15p", # Use a font size of 15 points + ) + + # ---------------------------------------------------------------------------- + # Top: Elevation along survey line + + # Shift plot origin to the top by the height of the map ("+h") plus 1.5 centimeters + fig.shift_origin(yshift="h+1.5c") + + fig.basemap( + region=[0, 15, -8000, 6000], # x_min, x_max, y_min, y_max + # Cartesian projection with a width of 12 centimeters and a height of 3 centimeters + projection="X12c/3c", + # Add annotations ("a") and ticks ("f") as well as labels ("+l") at the west or + # left and south or bottom sides ("WSrt") + frame=["WSrt", "xa2f1+lDistance+u°", "ya4000+lElevation / m"], + ) + + # Add labels "A" and "B" for the start and end points of the survey line + fig.text( + x=[0, 15], + y=[7000, 7000], + text=["A", "B"], + no_clip=True, # Do not clip text that fall outside the plot bounds + font="10p", # Use a font size of 10 points + ) + + # Generate points along a great circle corresponding to the survey line and store them + # in a pandas.DataFrame + track_df = pygmt.project( + center=[126, 42], # Start point of survey line (longitude, latitude) + endpoint=[146, 40], # End point of survey line (longitude, latitude) + generate=0.1, # Output data in steps of 0.1 degrees + ) + + # Extract the elevation at the generated points from the downloaded grid and add it as + # new column "elevation" to the pandas.DataFrame + track_df = pygmt.grdtrack(grid=grid_map, points=track_df, newcolname="elevation") + + # Plot water masses + fig.plot( + x=[0, 15], + y=[0, 0], + fill="lightblue", # Fill the polygon in "lightblue" + # Draw a 0.25-points thick, black, solid outline + pen="0.25p,black,solid", + close="+y-8000", # Force closed polygon + ) + + # Plot elevation along the survey line + fig.plot( + x=track_df.p, + y=track_df.elevation, + fill="gray", # Fill the polygon in "gray" + # Draw a 1-point thick, black, solid outline + pen="1p,black,solid", + close="+y-8000", # Force closed polygon + ) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.303 seconds) + + +.. _sphx_glr_download_gallery_images_cross_section.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cross_section.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cross_section.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cross_section.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/images/grdclip.rst.txt b/v0.14.0/_sources/gallery/images/grdclip.rst.txt new file mode 100644 index 00000000000..f8edf985a96 --- /dev/null +++ b/v0.14.0/_sources/gallery/images/grdclip.rst.txt @@ -0,0 +1,121 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/images/grdclip.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_gallery_images_grdclip.py: + + +Clipping grid values +==================== + +The :func:`pygmt.grdclip` function allows to clip defined ranges of grid +values. In the example shown below we set all elevation values (grid points) +smaller than 0 m (in general the bathymetric part of the grid) to a common +value of -2000 m via the ``below`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 12-47 + + + +.. image-sg:: /gallery/images/images/sphx_glr_grdclip_001.png + :alt: grdclip + :srcset: /gallery/images/images/sphx_glr_grdclip_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + grdblend [NOTICE]: Remote data courtesy of GMT data server oceania [http://oceania.generic-mapping-tools.org] + grdblend [NOTICE]: SRTM15 Earth Relief v2.6 at 03x03 arc minutes reduced by Gaussian Cartesian filtering (15.7 km fullwidth) [Tozer et al., 2019]. + grdblend [NOTICE]: -> Download 90x90 degree grid tile (earth_relief_03m_g): N00W090 + + + + + + +| + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + + # Define region of interest around Iceland + region = [-28, -10, 62, 68] + + # Load sample grid (3 arc-minutes global relief) in target area + grid = pygmt.datasets.load_earth_relief(resolution="03m", region=region) + + # Plot original grid + fig.basemap( + region=region, + projection="M12c", + frame=["WSne+toriginal grid", "xa5f1", "ya2f1"], + ) + fig.grdimage(grid=grid, cmap="oleron") + + # Shift plot origin of the second map by "width of the first map + 0.5 cm" + # in x direction + fig.shift_origin(xshift="w+0.5c") + + # Set all grid points < 0 m to a value of -2000 m. + grid = pygmt.grdclip(grid, below=[0, -2000]) + + # Plot clipped grid + fig.basemap( + region=region, + projection="M12c", + frame=["wSne+tclipped grid", "xa5f1", "ya2f1"], + ) + fig.grdimage(grid=grid) + fig.colorbar(frame=["x+lElevation", "y+lm"], position="JMR+o0.5c/0c+w8c") + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 3.212 seconds) + + +.. _sphx_glr_download_gallery_images_grdclip.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: grdclip.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: grdclip.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: grdclip.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/images/grdgradient.rst.txt b/v0.14.0/_sources/gallery/images/grdgradient.rst.txt new file mode 100644 index 00000000000..48d686b9959 --- /dev/null +++ b/v0.14.0/_sources/gallery/images/grdgradient.rst.txt @@ -0,0 +1,119 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/images/grdgradient.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_gallery_images_grdgradient.py: + + +Calculating grid gradient and radiance +====================================== + +The :func:`pygmt.grdgradient` function calculates the gradient of a grid file. +In the example shown below we will see how to calculate a hillshade map based +on a Data Elevation Model (DEM). As input :func:`pygmt.grdgradient` gets +an :class:`xarray.DataArray` object or a path string to a grid file, calculates +the respective gradient and returns it as an :class:`xarray.DataArray` object. +We will use the ``radiance`` parameter in order to set the illumination source +direction and altitude. + +.. GENERATED FROM PYTHON SOURCE LINES 15-57 + + + +.. image-sg:: /gallery/images/images/sphx_glr_grdgradient_001.png + :alt: grdgradient + :srcset: /gallery/images/images/sphx_glr_grdgradient_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + # Define region of interest around Yosemite valley + region = [-119.825, -119.4, 37.6, 37.825] + + # Load sample grid (3 arc-seconds global relief) in target area + grid = pygmt.datasets.load_earth_relief(resolution="03s", region=region) + + # calculate the reflection of a light source projecting from west to east + # (azimuth of 270 degrees) and at a latitude of 30 degrees from the horizon + dgrid = pygmt.grdgradient(grid=grid, radiance=[270, 30]) + + fig = pygmt.Figure() + # define figure configuration + pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") + + # --------------- plotting the original Data Elevation Model ----------- + + pygmt.makecpt(cmap="gray", series=[200, 4000, 10]) + fig.grdimage( + grid=grid, + projection="M12c", + frame=["WSrt+tOriginal Data Elevation Model", "xa0.1", "ya0.1"], + cmap=True, + ) + + fig.colorbar(position="JML+o1.4c/0c+w7c/0.5c", frame=["xa1000f500+lElevation", "y+lm"]) + + # --------------- plotting the hillshade map ----------- + + # Shift plot origin of the second map by 12.5 cm in x direction + fig.shift_origin(xshift="12.5c") + + pygmt.makecpt(cmap="gray", series=[-1.5, 0.3, 0.01]) + fig.grdimage( + grid=dgrid, + projection="M12c", + frame=["lSEt+tHillshade Map", "xa0.1", "ya0.1"], + cmap=True, + ) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.390 seconds) + + +.. _sphx_glr_download_gallery_images_grdgradient.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: grdgradient.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: grdgradient.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: grdgradient.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/images/grdgradient_shading.rst.txt b/v0.14.0/_sources/gallery/images/grdgradient_shading.rst.txt new file mode 100644 index 00000000000..8d4b2a4c52b --- /dev/null +++ b/v0.14.0/_sources/gallery/images/grdgradient_shading.rst.txt @@ -0,0 +1,139 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/images/grdgradient_shading.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_gallery_images_grdgradient_shading.py: + + +Calculating grid gradient with custom ``azimuth`` and ``normalize`` parameters +============================================================================== + +The :func:`pygmt.grdgradient` function calculates the gradient of a grid file. +As input, :func:`pygmt.grdgradient` gets an :class:`xarray.DataArray` object +or a path string to a grid file. It then calculates the respective gradient +and returns an :class:`xarray.DataArray` object. The example below sets two +main parameters: + +- ``azimuth`` to set the illumination light source direction (0° is North, + 90° is East, 180° is South, 270° is West). +- ``normalize`` to enhance the three-dimensional sense of the topography. + +The ``normalize`` parameter calculates the azimuthal gradient of each point +along a certain azimuth angle, then adjusts the brightness value of the color +according to the positive/negative of the azimuthal gradient and the amplitude +of each point. + +.. GENERATED FROM PYTHON SOURCE LINES 22-65 + + + +.. image-sg:: /gallery/images/images/sphx_glr_grdgradient_shading_001.png + :alt: grdgradient shading + :srcset: /gallery/images/images/sphx_glr_grdgradient_shading_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + grdblend [NOTICE]: Remote data courtesy of GMT data server oceania [http://oceania.generic-mapping-tools.org] + grdblend [NOTICE]: SRTM15 Earth Relief v2.6 at 03x03 arc minutes reduced by Gaussian Cartesian filtering (15.7 km fullwidth) [Tozer et al., 2019]. + grdblend [NOTICE]: -> Download 90x90 degree grid tile (earth_relief_03m_g): N00E000 + + + + + + +| + +.. code-block:: Python + + import pygmt + + # Load the 3 arc-minutes global relief grid in the target area around Caucasus + grid = pygmt.datasets.load_earth_relief(resolution="03m", region=[35, 50, 35, 45]) + + fig = pygmt.Figure() + + # Define a colormap to be used for topography + pygmt.makecpt(cmap="terra", series=[-7000, 7000]) + + # Define figure configuration + pygmt.config(FONT_TITLE="10p,5", MAP_TITLE_OFFSET="1p", MAP_FRAME_TYPE="plain") + + # Setup subplot panels with three rows and four columns + with fig.subplot( + nrows=3, + ncols=4, + figsize=("28c", "21c"), + sharex="b", + sharey="l", + ): + # E.g. "0/90" illuminates light source from the North (top) and East + # (right), and so on + for azi in ["0/90", "0/300", "180/225"]: + # "e" and "t" are cumulative Laplace distribution and cumulative + # Cauchy distribution, respectively + # "amp" (e.g. 1 or 10) controls the brightness value of the color + for nor in ["t1", "e1", "t10", "e10"]: + # Making an intensity DataArray using azimuth and normalize + # parameters + shade = pygmt.grdgradient(grid=grid, azimuth=azi, normalize=nor) + fig.grdimage( + grid=grid, + shading=shade, + projection="M?", + frame=["a4f2", f"+tazimuth={azi}, normalize={nor}"], + cmap=True, + panel=True, + ) + + fig.colorbar(position="JBC+w10c/0.25c+h", frame="xa2000f500+lElevation (m)") + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 4.859 seconds) + + +.. _sphx_glr_download_gallery_images_grdgradient_shading.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: grdgradient_shading.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: grdgradient_shading.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: grdgradient_shading.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/images/grdlandmask.rst.txt b/v0.14.0/_sources/gallery/images/grdlandmask.rst.txt new file mode 100644 index 00000000000..e18089de4e1 --- /dev/null +++ b/v0.14.0/_sources/gallery/images/grdlandmask.rst.txt @@ -0,0 +1,109 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/images/grdlandmask.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_gallery_images_grdlandmask.py: + + +Create 'wet-dry' mask grid +========================== + +The :func:`pygmt.grdlandmask` function allows setting all nodes on land +or water to a specified value using the ``maskvalues`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 10-37 + + + +.. image-sg:: /gallery/images/images/sphx_glr_grdlandmask_001.png + :alt: grdlandmask + :srcset: /gallery/images/images/sphx_glr_grdlandmask_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + grdimage [WARNING]: Your CPT is categorical. Enabling -nn+a to avoid interpolation across categories. + + + + + + +| + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + + # Define region of interest + region = [-65, -40, -40, -20] + + # Assign a value of 0 for all water masses and a value of 1 for all land + # masses. + # Use shoreline data with (l)ow resolution and set the grid spacing to + # 5 arc-minutes in x and y direction. + grid = pygmt.grdlandmask(region=region, spacing="5m", maskvalues=[0, 1], resolution="l") + + # Plot clipped grid + fig.basemap(region=region, projection="M12c", frame=True) + + # Define a colormap to be used for two categories, define the range of the + # new discrete CPT using series=(lowest_value, highest_value, interval), + # use color_model="+cwater,land" to write the discrete color palette + # "batlow" in categorical format and add water/land as annotations for the + # colorbar. + pygmt.makecpt(cmap="batlow", series=(0, 1, 1), color_model="+cwater,land") + + fig.grdimage(grid=grid, cmap=True) + fig.colorbar(position="JMR+o0.5c/0c+w8c") + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.186 seconds) + + +.. _sphx_glr_download_gallery_images_grdlandmask.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: grdlandmask.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: grdlandmask.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: grdlandmask.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/images/image.rst.txt b/v0.14.0/_sources/gallery/images/image.rst.txt new file mode 100644 index 00000000000..e2f64fd1058 --- /dev/null +++ b/v0.14.0/_sources/gallery/images/image.rst.txt @@ -0,0 +1,96 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/images/image.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_gallery_images_image.py: + + +Images on figures +================= + +The :meth:`pygmt.Figure.image` method can be used to read and place an image +file in many formats (e.g., png, jpg, eps, pdf) on a figure. We must specify +the filename via the ``imagefile`` parameter or simply use the filename as +the first argument. You can also use a full URL pointing to your desired image. +The ``position`` parameter allows us to set a reference point on the map for +the image. + +.. GENERATED FROM PYTHON SOURCE LINES 14-34 + + + +.. image-sg:: /gallery/images/images/sphx_glr_image_001.png + :alt: image + :srcset: /gallery/images/images/sphx_glr_image_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + from pathlib import Path + + import pygmt + + fig = pygmt.Figure() + fig.basemap(region=[0, 2, 0, 2], projection="X10c", frame=True) + + # place and center the GMT logo from the GMT website to the position 1/1 + # on a basemap, scaled up to be 3 cm wide and draw a rectangular border + # around the image + fig.image( + imagefile="https://www.generic-mapping-tools.org/_static/gmt-logo.png", + position="g1/1+w3c+jCM", + box=True, + ) + + # clean up the downloaded image in the current directory + Path("gmt-logo.png").unlink() + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.627 seconds) + + +.. _sphx_glr_download_gallery_images_image.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: image.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: image.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: image.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/images/rgb_image.rst.txt b/v0.14.0/_sources/gallery/images/rgb_image.rst.txt new file mode 100644 index 00000000000..3676db8f211 --- /dev/null +++ b/v0.14.0/_sources/gallery/images/rgb_image.rst.txt @@ -0,0 +1,580 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/images/rgb_image.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_gallery_images_rgb_image.py: + + +RGB image +========= + +The :meth:`pygmt.Figure.grdimage` method can be used to plot Red, Green, Blue +(RGB) images, or any 3-band false color combination. Here, we'll use +:py:func:`rioxarray.open_rasterio` to read a GeoTIFF file into an +:class:`xarray.DataArray` format, and plot it on a map. + +The example below shows a Worldview 2 satellite image over +`Lāhainā, Hawaiʻi during the August 2023 wildfires +`_. +Data is sourced from a Cloud-Optimized GeoTIFF (COG) file hosted on +`OpenAerialMap `_ under a +`CC BY-NC 4.0 `_ license. + +.. GENERATED FROM PYTHON SOURCE LINES 19-22 + +.. code-block:: Python + + import pygmt + import rioxarray + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 23-24 + +Read 3-band data from GeoTIFF into an xarray.DataArray object: + +.. GENERATED FROM PYTHON SOURCE LINES 24-33 + +.. code-block:: Python + + with rioxarray.open_rasterio( + filename="https://oin-hotosm.s3.us-east-1.amazonaws.com/64d6a49a19cb3a000147a65b/0/64d6a49a19cb3a000147a65c.tif", + overview_level=5, + ) as img: + # Subset to area of Lāhainā in EPSG:32604 coordinates + image = img.rio.clip_box(minx=738000, maxx=755000, miny=2300000, maxy=2318000) + image = image.load() # Force loading the DataArray into memory + image # noqa: B018 + + + + + + +.. raw:: html + +
+
+ + + + + + + + + + + + + + +
<xarray.DataArray (band: 3, y: 922, x: 871)> Size: 2MB
+    array([[[ 50,  53,  55, ..., 244, 243, 242],
+            [ 49,  52,  53, ..., 244, 243, 242],
+            [ 49,  53,  56, ..., 243, 242, 241],
+            ...,
+            [  0,   0,   0, ...,  27,  32,  30],
+            [  0,   0,   0, ...,  23,  28,  28],
+            [  0,   0,   0, ...,  20,  24,  23]],
+
+           [[ 57,  60,  62, ..., 240, 239, 238],
+            [ 56,  59,  60, ..., 240, 239, 238],
+            [ 53,  57,  60, ..., 239, 238, 237],
+            ...,
+            [  0,   0,   0, ...,  42,  48,  46],
+            [  0,   0,   0, ...,  36,  43,  43],
+            [  0,   0,   0, ...,  33,  39,  40]],
+
+           [[ 67,  70,  72, ..., 237, 236, 235],
+            [ 66,  69,  70, ..., 237, 236, 235],
+            [ 65,  69,  72, ..., 236, 235, 234],
+            ...,
+            [  0,   0,   0, ...,  61,  64,  62],
+            [  0,   0,   0, ...,  55,  62,  62],
+            [  0,   0,   0, ...,  52,  58,  58]]],
+          shape=(3, 922, 871), dtype=uint8)
+    Coordinates:
+      * band         (band) int64 24B 1 2 3
+      * x            (x) float64 7kB 7.38e+05 7.38e+05 ... 7.55e+05 7.55e+05
+      * y            (y) float64 7kB 2.318e+06 2.318e+06 ... 2.3e+06 2.3e+06
+        spatial_ref  int64 8B 0
+    Attributes:
+        AREA_OR_POINT:  Area
+        scale_factor:   1.0
+        add_offset:     0.0
+
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 34-35 + +Plot the RGB imagery: + +.. GENERATED FROM PYTHON SOURCE LINES 35-44 + +.. code-block:: Python + + fig = pygmt.Figure() + with pygmt.config(FONT_TITLE="Times-Roman"): # Set title font to Times-Roman + fig.grdimage( + grid=image, + # Use a map scale where 1 cm on the map equals 1 km on the ground + projection="x1:100000", + frame=[r"WSne+tL@!a¯hain@!a¯, Hawai`i on 9 Aug 2023", "af"], + ) + fig.show() + + + +.. image-sg:: /gallery/images/images/sphx_glr_rgb_image_001.png + :alt: rgb image + :srcset: /gallery/images/images/sphx_glr_rgb_image_001.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.046 seconds) + + +.. _sphx_glr_download_gallery_images_rgb_image.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: rgb_image.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: rgb_image.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: rgb_image.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/images/sg_execution_times.rst.txt b/v0.14.0/_sources/gallery/images/sg_execution_times.rst.txt new file mode 100644 index 00000000000..c721f8f4e2f --- /dev/null +++ b/v0.14.0/_sources/gallery/images/sg_execution_times.rst.txt @@ -0,0 +1,61 @@ + +:orphan: + +.. _sphx_glr_gallery_images_sg_execution_times: + + +Computation times +================= +**00:11.226** total execution time for 9 files **from gallery/images**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_gallery_images_grdgradient_shading.py` (``grdgradient_shading.py``) + - 00:04.859 + - 0.0 + * - :ref:`sphx_glr_gallery_images_grdclip.py` (``grdclip.py``) + - 00:03.212 + - 0.0 + * - :ref:`sphx_glr_gallery_images_rgb_image.py` (``rgb_image.py``) + - 00:01.046 + - 0.0 + * - :ref:`sphx_glr_gallery_images_image.py` (``image.py``) + - 00:00.627 + - 0.0 + * - :ref:`sphx_glr_gallery_images_grdgradient.py` (``grdgradient.py``) + - 00:00.390 + - 0.0 + * - :ref:`sphx_glr_gallery_images_track_sampling.py` (``track_sampling.py``) + - 00:00.386 + - 0.0 + * - :ref:`sphx_glr_gallery_images_cross_section.py` (``cross_section.py``) + - 00:00.303 + - 0.0 + * - :ref:`sphx_glr_gallery_images_contours.py` (``contours.py``) + - 00:00.217 + - 0.0 + * - :ref:`sphx_glr_gallery_images_grdlandmask.py` (``grdlandmask.py``) + - 00:00.186 + - 0.0 diff --git a/v0.14.0/_sources/gallery/images/track_sampling.rst.txt b/v0.14.0/_sources/gallery/images/track_sampling.rst.txt new file mode 100644 index 00000000000..7586d2b3dfa --- /dev/null +++ b/v0.14.0/_sources/gallery/images/track_sampling.rst.txt @@ -0,0 +1,106 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/images/track_sampling.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_gallery_images_track_sampling.py: + + +Sampling along tracks +===================== + +The :func:`pygmt.grdtrack` function samples a raster grid's value along +specified points. We will need to input a 2-D raster to ``grid`` which can be +an :class:`xarray.DataArray`. The argument passed to the ``points`` parameter +can be a :class:`pandas.DataFrame` table where the first two columns are +x and y (or longitude and latitude). Note also that there is a ``newcolname`` +parameter that will be used to name the new column of values sampled from the +grid. + +Alternatively, a netCDF file path can be passed to ``grid``. An ASCII file path +can also be accepted for ``points``. To save an output ASCII file, a file name +argument needs to be passed to the ``outfile`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 19-44 + + + +.. image-sg:: /gallery/images/images/sphx_glr_track_sampling_001.png + :alt: track sampling + :srcset: /gallery/images/images/sphx_glr_track_sampling_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + # Load sample grid and point datasets + grid = pygmt.datasets.load_earth_relief() + points = pygmt.datasets.load_sample_data(name="ocean_ridge_points") + # Sample the bathymetry along the world's ocean ridges at specified track + # points + track = pygmt.grdtrack(points=points, grid=grid, newcolname="bathymetry") + + fig = pygmt.Figure() + # Plot the earth relief grid on Cylindrical Stereographic projection, masking + # land areas + fig.basemap(region="g", projection="Cyl_stere/150/-20/15c", frame=True) + fig.grdimage(grid=grid, cmap="gray") + fig.coast(land="#666666") + # Plot the sampled bathymetry points using circles (c) of 0.15 cm size + # Points are colored using elevation values (normalized for visual purposes) + fig.plot( + x=track.longitude, + y=track.latitude, + style="c0.15c", + cmap="terra", + fill=(track.bathymetry - track.bathymetry.mean()) / track.bathymetry.std(), + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.386 seconds) + + +.. _sphx_glr_download_gallery_images_track_sampling.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: track_sampling.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: track_sampling.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: track_sampling.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/index.rst.txt b/v0.14.0/_sources/gallery/index.rst.txt new file mode 100644 index 00000000000..1c82a150c36 --- /dev/null +++ b/v0.14.0/_sources/gallery/index.rst.txt @@ -0,0 +1,1271 @@ +:orphan: + +Gallery +======= + +This gallery contains examples of what PyGMT can do. Click on any example to see the +code used to generate it. + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ +Maps and map elements +--------------------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/maps/images/thumb/sphx_glr_choropleth_map_thumb.png + :alt: + + :ref:`sphx_glr_gallery_maps_choropleth_map.py` + +.. raw:: html + +
Choropleth map
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/maps/images/thumb/sphx_glr_land_and_water_thumb.png + :alt: + + :ref:`sphx_glr_gallery_maps_land_and_water.py` + +.. raw:: html + +
Color land and water
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/maps/images/thumb/sphx_glr_country_polygons_thumb.png + :alt: + + :ref:`sphx_glr_gallery_maps_country_polygons.py` + +.. raw:: html + +
Highlight country, continent and state polygons
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/maps/images/thumb/sphx_glr_borders_thumb.png + :alt: + + :ref:`sphx_glr_gallery_maps_borders.py` + +.. raw:: html + +
Political boundaries
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/maps/images/thumb/sphx_glr_shorelines_thumb.png + :alt: + + :ref:`sphx_glr_gallery_maps_shorelines.py` + +.. raw:: html + +
Shorelines
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/maps/images/thumb/sphx_glr_tilemaps_thumb.png + :alt: + + :ref:`sphx_glr_gallery_maps_tilemaps.py` + +.. raw:: html + +
Tile maps
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /gallery/maps/choropleth_map + /gallery/maps/land_and_water + /gallery/maps/country_polygons + /gallery/maps/borders + /gallery/maps/shorelines + /gallery/maps/tilemaps + +Lines and vectors +----------------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/lines/images/thumb/sphx_glr_vector_styles_thumb.png + :alt: + + :ref:`sphx_glr_gallery_lines_vector_styles.py` + +.. raw:: html + +
Cartesian, circular, and geographic vectors
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/lines/images/thumb/sphx_glr_connection_lines_thumb.png + :alt: + + :ref:`sphx_glr_gallery_lines_connection_lines.py` + +.. raw:: html + +
Connection lines
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/lines/images/thumb/sphx_glr_decorated_lines_thumb.png + :alt: + + :ref:`sphx_glr_gallery_lines_decorated_lines.py` + +.. raw:: html + +
Decorated lines
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/lines/images/thumb/sphx_glr_envelope_thumb.png + :alt: + + :ref:`sphx_glr_gallery_lines_envelope.py` + +.. raw:: html + +
Envelope
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/lines/images/thumb/sphx_glr_great_circles_thumb.png + :alt: + + :ref:`sphx_glr_gallery_lines_great_circles.py` + +.. raw:: html + +
Generate points along great circles
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/lines/images/thumb/sphx_glr_linestrings_thumb.png + :alt: + + :ref:`sphx_glr_gallery_lines_linestrings.py` + +.. raw:: html + +
GeoPandas: Plotting lines with LineString or MultiLineString geometry
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/lines/images/thumb/sphx_glr_line_custom_cpt_thumb.png + :alt: + + :ref:`sphx_glr_gallery_lines_line_custom_cpt.py` + +.. raw:: html + +
Line colors with a custom CPT
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/lines/images/thumb/sphx_glr_linefronts_thumb.png + :alt: + + :ref:`sphx_glr_gallery_lines_linefronts.py` + +.. raw:: html + +
Line fronts
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/lines/images/thumb/sphx_glr_line_segment_ends_thumb.png + :alt: + + :ref:`sphx_glr_gallery_lines_line_segment_ends.py` + +.. raw:: html + +
Line segment caps and joints
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/lines/images/thumb/sphx_glr_linestyles_thumb.png + :alt: + + :ref:`sphx_glr_gallery_lines_linestyles.py` + +.. raw:: html + +
Line styles
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/lines/images/thumb/sphx_glr_quoted_lines_thumb.png + :alt: + + :ref:`sphx_glr_gallery_lines_quoted_lines.py` + +.. raw:: html + +
Quoted lines
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/lines/images/thumb/sphx_glr_vector_heads_tails_thumb.png + :alt: + + :ref:`sphx_glr_gallery_lines_vector_heads_tails.py` + +.. raw:: html + +
Vector heads and tails
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/lines/images/thumb/sphx_glr_wiggle_thumb.png + :alt: + + :ref:`sphx_glr_gallery_lines_wiggle.py` + +.. raw:: html + +
Wiggle along tracks
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /gallery/lines/vector_styles + /gallery/lines/connection_lines + /gallery/lines/decorated_lines + /gallery/lines/envelope + /gallery/lines/great_circles + /gallery/lines/linestrings + /gallery/lines/line_custom_cpt + /gallery/lines/linefronts + /gallery/lines/line_segment_ends + /gallery/lines/linestyles + /gallery/lines/quoted_lines + /gallery/lines/vector_heads_tails + /gallery/lines/wiggle + +Symbols and markers +------------------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/symbols/images/thumb/sphx_glr_basic_symbols_thumb.png + :alt: + + :ref:`sphx_glr_gallery_symbols_basic_symbols.py` + +.. raw:: html + +
Basic geometric symbols
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/symbols/images/thumb/sphx_glr_patterns_thumb.png + :alt: + + :ref:`sphx_glr_gallery_symbols_patterns.py` + +.. raw:: html + +
Bit and hachure patterns
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/symbols/images/thumb/sphx_glr_points_categorical_thumb.png + :alt: + + :ref:`sphx_glr_gallery_symbols_points_categorical.py` + +.. raw:: html + +
Color points by categories
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/symbols/images/thumb/sphx_glr_custom_symbols_thumb.png + :alt: + + :ref:`sphx_glr_gallery_symbols_custom_symbols.py` + +.. raw:: html + +
Custom symbols
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/symbols/images/thumb/sphx_glr_datetime_inputs_thumb.png + :alt: + + :ref:`sphx_glr_gallery_symbols_datetime_inputs.py` + +.. raw:: html + +
Datetime inputs
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/symbols/images/thumb/sphx_glr_multi_parameter_symbols_thumb.png + :alt: + + :ref:`sphx_glr_gallery_symbols_multi_parameter_symbols.py` + +.. raw:: html + +
Multi-parameter symbols
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/symbols/images/thumb/sphx_glr_points_thumb.png + :alt: + + :ref:`sphx_glr_gallery_symbols_points.py` + +.. raw:: html + +
Points
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/symbols/images/thumb/sphx_glr_points_transparency_thumb.png + :alt: + + :ref:`sphx_glr_gallery_symbols_points_transparency.py` + +.. raw:: html + +
Points with varying transparency
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/symbols/images/thumb/sphx_glr_scatter_thumb.png + :alt: + + :ref:`sphx_glr_gallery_symbols_scatter.py` + +.. raw:: html + +
Scatter plots with a legend
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/symbols/images/thumb/sphx_glr_text_symbols_thumb.png + :alt: + + :ref:`sphx_glr_gallery_symbols_text_symbols.py` + +.. raw:: html + +
Text symbols
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/symbols/images/thumb/sphx_glr_bars_thumb.png + :alt: + + :ref:`sphx_glr_gallery_symbols_bars.py` + +.. raw:: html + +
Vertical or horizontal bars
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /gallery/symbols/basic_symbols + /gallery/symbols/patterns + /gallery/symbols/points_categorical + /gallery/symbols/custom_symbols + /gallery/symbols/datetime_inputs + /gallery/symbols/multi_parameter_symbols + /gallery/symbols/points + /gallery/symbols/points_transparency + /gallery/symbols/scatter + /gallery/symbols/text_symbols + /gallery/symbols/bars + +Images, contours, and fields +---------------------------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/images/images/thumb/sphx_glr_grdgradient_thumb.png + :alt: + + :ref:`sphx_glr_gallery_images_grdgradient.py` + +.. raw:: html + +
Calculating grid gradient and radiance
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/images/images/thumb/sphx_glr_grdgradient_shading_thumb.png + :alt: + + :ref:`sphx_glr_gallery_images_grdgradient_shading.py` + +.. raw:: html + +
Calculating grid gradient with custom azimuth and normalize parameters
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/images/images/thumb/sphx_glr_grdclip_thumb.png + :alt: + + :ref:`sphx_glr_gallery_images_grdclip.py` + +.. raw:: html + +
Clipping grid values
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/images/images/thumb/sphx_glr_contours_thumb.png + :alt: + + :ref:`sphx_glr_gallery_images_contours.py` + +.. raw:: html + +
Contours
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/images/images/thumb/sphx_glr_grdlandmask_thumb.png + :alt: + + :ref:`sphx_glr_gallery_images_grdlandmask.py` + +.. raw:: html + +
Create 'wet-dry' mask grid
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/images/images/thumb/sphx_glr_cross_section_thumb.png + :alt: + + :ref:`sphx_glr_gallery_images_cross_section.py` + +.. raw:: html + +
Cross-section along a transect
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/images/images/thumb/sphx_glr_image_thumb.png + :alt: + + :ref:`sphx_glr_gallery_images_image.py` + +.. raw:: html + +
Images on figures
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/images/images/thumb/sphx_glr_rgb_image_thumb.png + :alt: + + :ref:`sphx_glr_gallery_images_rgb_image.py` + +.. raw:: html + +
RGB image
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/images/images/thumb/sphx_glr_track_sampling_thumb.png + :alt: + + :ref:`sphx_glr_gallery_images_track_sampling.py` + +.. raw:: html + +
Sampling along tracks
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /gallery/images/grdgradient + /gallery/images/grdgradient_shading + /gallery/images/grdclip + /gallery/images/contours + /gallery/images/grdlandmask + /gallery/images/cross_section + /gallery/images/image + /gallery/images/rgb_image + /gallery/images/track_sampling + +3D Plots +-------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/3d_plots/images/thumb/sphx_glr_scatter3d_thumb.png + :alt: + + :ref:`sphx_glr_gallery_3d_plots_scatter3d.py` + +.. raw:: html + +
3-D scatter plots
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/3d_plots/images/thumb/sphx_glr_grdview_surface_thumb.png + :alt: + + :ref:`sphx_glr_gallery_3d_plots_grdview_surface.py` + +.. raw:: html + +
Plotting a surface
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /gallery/3d_plots/scatter3d + /gallery/3d_plots/grdview_surface + +Seismology and geodesy +---------------------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/seismology/images/thumb/sphx_glr_meca_thumb.png + :alt: + + :ref:`sphx_glr_gallery_seismology_meca.py` + +.. raw:: html + +
Focal mechanisms
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/seismology/images/thumb/sphx_glr_velo_arrow_ellipse_thumb.png + :alt: + + :ref:`sphx_glr_gallery_seismology_velo_arrow_ellipse.py` + +.. raw:: html + +
Velocity arrows and confidence ellipses
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /gallery/seismology/meca + /gallery/seismology/velo_arrow_ellipse + +Base maps +--------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/basemaps/images/thumb/sphx_glr_double_y_axes_thumb.png + :alt: + + :ref:`sphx_glr_gallery_basemaps_double_y_axes.py` + +.. raw:: html + +
Double Y-axes graph
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/basemaps/images/thumb/sphx_glr_ternary_thumb.png + :alt: + + :ref:`sphx_glr_gallery_basemaps_ternary.py` + +.. raw:: html + +
Ternary diagram
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /gallery/basemaps/double_y_axes + /gallery/basemaps/ternary + +Histograms +---------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/histograms/images/thumb/sphx_glr_blockm_thumb.png + :alt: + + :ref:`sphx_glr_gallery_histograms_blockm.py` + +.. raw:: html + +
Blockmean
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/histograms/images/thumb/sphx_glr_histogram_thumb.png + :alt: + + :ref:`sphx_glr_gallery_histograms_histogram.py` + +.. raw:: html + +
Histogram
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/histograms/images/thumb/sphx_glr_rose_thumb.png + :alt: + + :ref:`sphx_glr_gallery_histograms_rose.py` + +.. raw:: html + +
Rose diagram
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/histograms/images/thumb/sphx_glr_scatter_and_histograms_thumb.png + :alt: + + :ref:`sphx_glr_gallery_histograms_scatter_and_histograms.py` + +.. raw:: html + +
Scatter plot with histograms
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /gallery/histograms/blockm + /gallery/histograms/histogram + /gallery/histograms/rose + /gallery/histograms/scatter_and_histograms + +Plot embellishments +------------------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/embellishments/images/thumb/sphx_glr_colorbar_thumb.png + :alt: + + :ref:`sphx_glr_gallery_embellishments_colorbar.py` + +.. raw:: html + +
Colorbar
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/embellishments/images/thumb/sphx_glr_solar_thumb.png + :alt: + + :ref:`sphx_glr_gallery_embellishments_solar.py` + +.. raw:: html + +
Day-night terminator line and twilights
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/embellishments/images/thumb/sphx_glr_inset_thumb.png + :alt: + + :ref:`sphx_glr_gallery_embellishments_inset.py` + +.. raw:: html + +
Inset
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/embellishments/images/thumb/sphx_glr_inset_rectangle_region_thumb.png + :alt: + + :ref:`sphx_glr_gallery_embellishments_inset_rectangle_region.py` + +.. raw:: html + +
Inset map showing a rectangular region
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/embellishments/images/thumb/sphx_glr_legend_thumb.png + :alt: + + :ref:`sphx_glr_gallery_embellishments_legend.py` + +.. raw:: html + +
Legend
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/embellishments/images/thumb/sphx_glr_logo_thumb.png + :alt: + + :ref:`sphx_glr_gallery_embellishments_logo.py` + +.. raw:: html + +
Logo
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/embellishments/images/thumb/sphx_glr_colorbars_multiple_thumb.png + :alt: + + :ref:`sphx_glr_gallery_embellishments_colorbars_multiple.py` + +.. raw:: html + +
Multiple colormaps
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/embellishments/images/thumb/sphx_glr_scalebar_thumb.png + :alt: + + :ref:`sphx_glr_gallery_embellishments_scalebar.py` + +.. raw:: html + +
Scale bar
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /gallery/embellishments/images/thumb/sphx_glr_timestamp_thumb.png + :alt: + + :ref:`sphx_glr_gallery_embellishments_timestamp.py` + +.. raw:: html + +
Timestamp
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /gallery/embellishments/colorbar + /gallery/embellishments/solar + /gallery/embellishments/inset + /gallery/embellishments/inset_rectangle_region + /gallery/embellishments/legend + /gallery/embellishments/logo + /gallery/embellishments/colorbars_multiple + /gallery/embellishments/scalebar + /gallery/embellishments/timestamp + + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/lines/connection_lines.rst.txt b/v0.14.0/_sources/gallery/lines/connection_lines.rst.txt new file mode 100644 index 00000000000..d96c233979c --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/connection_lines.rst.txt @@ -0,0 +1,118 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/lines/connection_lines.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_gallery_lines_connection_lines.py: + + +Connection lines +================ + +The ``connection`` parameter of the :meth:`pygmt.Figure.plot` method allows to plot +connection lines between a set of data points. Width, color, and style of the lines +can be adjusted via the ``pen`` parameter. The data points must be plotted separately +using the ``style`` parameter, with adjustments for the symbol fill and outline via +the ``fill`` and ``pen`` parameters, respectively. + +.. GENERATED FROM PYTHON SOURCE LINES 13-56 + + + +.. image-sg:: /gallery/lines/images/sphx_glr_connection_lines_001.png + :alt: connection lines + :srcset: /gallery/lines/images/sphx_glr_connection_lines_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + # Set up same sample data + x = [2.2, 3.3, -3.1, -3.7, -0.1] + y = [1.8, -1.2, -0.9, -4.5, 4.5] + + # Create new Figure instance + fig = pygmt.Figure() + + # ----------------------------------------------------------------------------- + # Left: record order + fig.basemap(region=[-5, 5, -5, 5], projection="X6c", frame=["WSne", "af"]) + + # Connect data points based on the record order [Default connection=None] + fig.plot(x=x, y=y, pen="1.5p,dodgerblue") + # Plot data points + fig.plot(x=x, y=y, style="c0.2c", fill="green3", pen="1.5p") + + fig.shift_origin(xshift="w+0.5c") + + # ----------------------------------------------------------------------------- + # Middle: network + fig.basemap(region=[-5, 5, -5, 5], projection="X6c", frame=["wSne", "af"]) + + # Connect data points as network + fig.plot(x=x, y=y, pen="1.5p,dodgerblue", connection="n") + # Plot data points + fig.plot(x=x, y=y, style="c0.2c", fill="green3", pen="1.5p") + + fig.shift_origin(xshift="w+0.5c") + + # ----------------------------------------------------------------------------- + # Right: reference point + fig.basemap(region=[-5, 5, -5, 5], projection="X6c", frame=["wSne", "af"]) + + # Connect data points with the reference point (0,0) + fig.plot(x=x, y=y, pen="1.5p,dodgerblue", connection="p0/0") + # Plot data points + fig.plot(x=x, y=y, style="c0.2c", fill="green3", pen="1.5p") + # Plot reference point + fig.plot(x=0, y=0, style="s0.3c", fill="gold", pen="1.5p") + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.157 seconds) + + +.. _sphx_glr_download_gallery_lines_connection_lines.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: connection_lines.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: connection_lines.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: connection_lines.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/lines/decorated_lines.rst.txt b/v0.14.0/_sources/gallery/lines/decorated_lines.rst.txt new file mode 100644 index 00000000000..d012df754f6 --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/decorated_lines.rst.txt @@ -0,0 +1,145 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/lines/decorated_lines.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_gallery_lines_decorated_lines.py: + + +Decorated lines +=============== + +To draw a so-called *decorated line*, i.e., symbols along a line or curve, use the +``style`` parameter of the :meth:`pygmt.Figure.plot` method with the argument ``"~"`` +and the desired modifiers. A colon (``":"``) is used to separate the algorithm +settings from the symbol information. This example shows how to adjust the symbols. +Beside the built-in symbols also custom symbols can be used. For modifying the main +decorated line via the ``pen`` parameter, see the +:doc:`Line styles example `. For details on the input data +see the upstream GMT documentation at :gmt-docs:`plot.html#s`. Furthermore, there are +so-called *line fronts*, which are often used to plot fault lines, subduction zones, +or weather fronts; for details see the +:doc:`Line fronts example `. + +.. GENERATED FROM PYTHON SOURCE LINES 19-83 + + + +.. image-sg:: /gallery/lines/images/sphx_glr_decorated_lines_001.png + :alt: decorated lines + :srcset: /gallery/lines/images/sphx_glr_decorated_lines_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Generate a two-point line for plotting + x = np.array([1, 4]) + y = np.array([24, 24]) + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 24], projection="X15c", frame="+tDecorated Lines") + + # Plot different decorated lines + for decoline in [ + # Line with circles ("c") of 0.5 centimeters radius in distance of 1 centimeter + "~d1c:+sc0.5c", + # Adjust thickness, color, and style of the outline via "+p" + # Here, we plot a 1-point thick, blue, dashed outline + "~d1c:+sc0.5c+p1p,blue,dashed", + # Add a fill color using "+g" with the desired color + "~d1c:+sc0.5c+glightblue", + # To use a pattern as fill append "p" and give the pattern number + "~d1c:+sc0.5c+gp8+p1p,blue", + # Line with triangles ("t") + "~d1c:+st0.5c+gtan+p1p,black", + # Rotate counter-clockwise from line-parallel ("+ap") by 30 degrees + "~d1c:+st0.5c+gtan+p1p,black+ap30", + # Line with inverse triangles with a size of 0.3 centimeters in a + # distance of 0.4 centimeters + "~d0.4c:+si0.3c+gtan+p1p,black", + # Line with squares ("s") with a size of 0.7 centimeters in a distance of + # 1 centimeter + "~d1c:+ss0.7c+gtan+p1p,black", + # Shift symbols using "+n" in x and y directions relative to the main decorated line + "~d1c:+sd0.5c+gtan+p1p,black+n-0.2c/0.1c", + # Give the number of equally spaced symbols by using "n" instead of "d" + "~n6:+sn0.5c+gtan+p1p,black", + # Use upper-case "N" to have symbols at the start and end of the line + "~N6:+sh0.5c+gtan+p1p,black", + # Suppress the main decorated line by appending "+i" + "~d1c:+sg0.5c+gtan+p1p,black+i", + # To only plot a symbol at the start of the line use "N-1" + "~N-1:+sp0.2c+gblack", + # To only plot a symbol at the end of the line use "N+1" + "~N+1:+sp0.2c+gblack", + # Line with stars ("a") + "~d1c:+sa0.5c+ggold+p1p,black", + # Line with crosses ("x") + "~d1c:+sx0.5c+p2p,red", + # Line with (vertical) lines or bars ("y") + "~d0.5c:+sy0.5c+p5p,brown", + # Use custom symbol ("k") "squaroid" with a size of 0.5 centimeters + "~d1c:+sksquaroid/0.5c+ggray+p1p,black", + ]: + y = y - 1.2 # Move current line down + fig.plot(x=x, y=y, style=decoline, pen="1.25p,black") + fig.text( + x=x[-1], + y=y[-1], + text=decoline, + font="Courier-Bold", + justify="ML", + offset="0.75c/0c", + ) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.307 seconds) + + +.. _sphx_glr_download_gallery_lines_decorated_lines.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: decorated_lines.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: decorated_lines.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: decorated_lines.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/lines/envelope.rst.txt b/v0.14.0/_sources/gallery/lines/envelope.rst.txt new file mode 100644 index 00000000000..4073b76cdf3 --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/envelope.rst.txt @@ -0,0 +1,161 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/lines/envelope.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_gallery_lines_envelope.py: + + +Envelope +======== + +The ``close`` parameter of the :meth:`pygmt.Figure.plot` method can be used to build a +symmetrical or an asymmetrical envelope. The user can give either the deviations or the +bounds in y-direction. For the first case append ``"+d"`` or ``"+D"`` and for the latter +case ``"+b"``. + +.. GENERATED FROM PYTHON SOURCE LINES 12-99 + + + +.. image-sg:: /gallery/lines/images/sphx_glr_envelope_001.png + :alt: envelope + :srcset: /gallery/lines/images/sphx_glr_envelope_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pandas as pd + import pygmt + + # Define a pandas.DataFrame with columns for x and y as well as the lower and upper + # deviations + df_devi = pd.DataFrame( + data={ + "x": [1, 3, 5, 7, 9], + "y": [0.5, -0.7, 0.8, -0.3, 0.1], + "y_deviation_low": [0.2, 0.2, 0.3, 0.4, 0.2], + "y_deviation_upp": [0.1, 0.3, 0.2, 0.4, 0.1], + } + ) + + # Define the same pandas.DataFrame but with lower and upper bounds + df_bound = pd.DataFrame( + data={ + "x": [1, 3, 5, 7, 9], + "y": [0.5, -0.7, 0.8, -0.3, 0.1], + "y_bound_low": [0.3, -0.9, 0.5, -0.7, -0.1], + "y_bound_upp": [0.6, -0.4, 1.1, 0.1, 0.2], + } + ) + + + fig = pygmt.Figure() + + # ----------------------------------------------------------------------------- + # Left + fig.basemap( + region=[0, 10, -1.5, 1.5], + projection="X10c", + frame=["WSne+tsymmetric deviations +d", "xa2f1", "ya1f0.1"], + ) + + # Plot a symmetrical envelope based on the deviations ("+d") + fig.plot( + data=df_devi, + close="+d", + # Fill the envelope in gray color with a transparency of 50 % + fill="gray@50", + pen="1p,gray30", + ) + + # Plot the data points on top + fig.plot(data=df_devi, style="c0.2c", pen="1p,gray30", fill="darkgray") + + # Shift plot origin by the figure width ("w") plus 1 centimeter in x direction + fig.shift_origin(xshift="w+1c") + + # ----------------------------------------------------------------------------- + # Middle + fig.basemap( + region=[0, 10, -1.5, 1.5], + projection="X10c", + frame=["WSne+tasymmetric deviations +D", "xa2f1", "yf0.1"], + ) + + # Plot an asymmetrical envelope based on the deviations ("+D") + fig.plot( + data=df_devi, + fill="gray@50", + # Add an outline around the envelope. Here, a dashed pen ("+p") with 0.5-points + # thickness and "gray30" color is used + close="+D+p0.5p,gray30,dashed", + pen="1p,gray30", + ) + + fig.plot(data=df_devi, style="c0.2c", pen="1p,gray30", fill="darkgray") + + fig.shift_origin(xshift="w+1c") + + # ----------------------------------------------------------------------------- + # Right + fig.basemap( + region=[0, 10, -1.5, 1.5], + projection="X10c", + # Use "\\053" to handle "+b" as a string not as a modifier + frame=["wSnE+tbounds \\053b", "xa2f1", "ya1f0.1"], + ) + + # Plot an envelope based on the bounds ("+b") + fig.plot(data=df_bound, close="+b+p0.5p,gray30,dashed", pen="1p,gray30") + + fig.plot(data=df_bound, style="c0.2c", pen="1p,gray30", fill="darkgray") + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.313 seconds) + + +.. _sphx_glr_download_gallery_lines_envelope.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: envelope.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: envelope.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: envelope.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/lines/great_circles.rst.txt b/v0.14.0/_sources/gallery/lines/great_circles.rst.txt new file mode 100644 index 00000000000..51b55a40ff1 --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/great_circles.rst.txt @@ -0,0 +1,107 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/lines/great_circles.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_gallery_lines_great_circles.py: + + +Generate points along great circles +=================================== + +The :func:`pygmt.project` function can generate points along a great circle +whose center and end points can be defined via the ``center`` and ``endpoint`` +parameters, respectively. Using the ``generate`` parameter allows to generate +(*r*, *s*, *p*) points every *dist* units of *p* along a profile as +output. By default, all units (*r*, *s* and *p*) are set to degrees while +``unit=True`` allows to set the unit for *p* to km. + +.. GENERATED FROM PYTHON SOURCE LINES 14-45 + + + +.. image-sg:: /gallery/lines/images/sphx_glr_great_circles_001.png + :alt: great circles + :srcset: /gallery/lines/images/sphx_glr_great_circles_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + + # generate points every 10 degrees along a great circle from 10N,50W to 30N,5W + points1 = pygmt.project(center=[-50, 10], endpoint=[-5, 30], generate=10) + # generate points every 750 km along a great circle from 10N,50W to 57.5N,90W + points2 = pygmt.project(center=[-50, 10], endpoint=[-90, 57.5], generate=750, unit=True) + # generate points every 350 km along a great circle from 10N,50W to 68N,5W + points3 = pygmt.project(center=[-50, 10], endpoint=[-5, 68], generate=350, unit=True) + + # create a plot with coast and Mercator projection (M) + fig.basemap(region=[-100, 0, 0, 70], projection="M12c", frame=True) + fig.coast(shorelines=True, area_thresh=5000) + + # plot individual points of first great circle as seagreen line + fig.plot(x=points1.r, y=points1.s, pen="2p,seagreen") + # plot individual points as seagreen squares atop + fig.plot(x=points1.r, y=points1.s, style="s.45c", fill="seagreen", pen="1p") + + # plot individual points of second great circle as orange line + fig.plot(x=points2.r, y=points2.s, pen="2p,orange") + # plot individual points as orange inverted triangles atop + fig.plot(x=points2.r, y=points2.s, style="i.6c", fill="orange", pen="1p") + + # plot individual points of third great circle as red3 line + fig.plot(x=points3.r, y=points3.s, pen="2p,red3") + # plot individual points as red3 circles atop + fig.plot(x=points3.r, y=points3.s, style="c.3c", fill="red3", pen="1p") + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.216 seconds) + + +.. _sphx_glr_download_gallery_lines_great_circles.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: great_circles.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: great_circles.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: great_circles.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/lines/line_custom_cpt.rst.txt b/v0.14.0/_sources/gallery/lines/line_custom_cpt.rst.txt new file mode 100644 index 00000000000..80c97124fae --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/line_custom_cpt.rst.txt @@ -0,0 +1,99 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/lines/line_custom_cpt.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_gallery_lines_line_custom_cpt.py: + + +Line colors with a custom CPT +============================= + +The color of the lines made by :meth:`pygmt.Figure.plot` can be set according +to a custom CPT and assigned with the ``pen`` parameter. + +The custom CPT can be used by setting the plot command's ``cmap`` parameter to +``True``. The ``zvalue`` parameter sets the z-value (color) to be used from the +custom CPT, and the line color is set as the z-value by using **+z** when +setting the ``pen`` color. + +.. GENERATED FROM PYTHON SOURCE LINES 16-38 + + + +.. image-sg:: /gallery/lines/images/sphx_glr_line_custom_cpt_001.png + :alt: line custom cpt + :srcset: /gallery/lines/images/sphx_glr_line_custom_cpt_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Create a list of values between 20 and 30 with 0.2 intervals + x = np.arange(start=20, stop=30, step=0.2) + + fig = pygmt.Figure() + fig.basemap(frame=["WSne", "af"], region=[20, 30, -10, 10]) + + # Create a custom CPT with the batlow CPT and 10 discrete z-values (colors), + # use color_model="+c0-9" to write the color palette in categorical format and + # add labels (0) to (9) for the colorbar legend + pygmt.makecpt(cmap="batlow", series=[0, 9, 1], color_model="+c0-9") + + # Plot 10 lines and set a different z-value for each line + for zvalue in range(10): + y = zvalue * np.sin(x) + fig.plot(x=x, y=y, cmap=True, zvalue=zvalue, pen="thick,+z,-") + + # Color bar to show the custom CPT and the associated z-values + fig.colorbar() + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.226 seconds) + + +.. _sphx_glr_download_gallery_lines_line_custom_cpt.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: line_custom_cpt.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: line_custom_cpt.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: line_custom_cpt.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/lines/line_segment_ends.rst.txt b/v0.14.0/_sources/gallery/lines/line_segment_ends.rst.txt new file mode 100644 index 00000000000..e3549c0db8e --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/line_segment_ends.rst.txt @@ -0,0 +1,139 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/lines/line_segment_ends.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_gallery_lines_line_segment_ends.py: + + +Line segment caps and joints +============================ +PyGMT offers different appearances of line segment caps and joints. The desired +appearance can be set via the GMT default parameters :gmt-term:`PS_LINE_CAP` +(``"butt"``, ``"round"``, or ``"square"`` [Default]) as well as :gmt-term:`PS_LINE_JOIN` +(``"bevel"``, ``"round"``, and ``"miter"`` [Default]) and :gmt-term:`PS_MITER_LIMIT` +(limit on the angle at the mitered joint below which a bevel is applied). + +.. GENERATED FROM PYTHON SOURCE LINES 12-77 + + + +.. image-sg:: /gallery/lines/images/sphx_glr_line_segment_ends_001.png + :alt: line segment ends + :srcset: /gallery/lines/images/sphx_glr_line_segment_ends_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Set up dictionary for colors + dict_col = { + "round": "green4", + "square": "steelblue", + "butt": "orange", + "miter": "steelblue", + "bevel": "orange", + } + + # Create new Figure instance + fig = pygmt.Figure() + + # ----------------------------------------------------------------------------- + # Top: PS_LINE_CAP + + # Create sample data + x = np.array([30, 170]) + y = np.array([70, 70]) + + fig.basemap(region=[0, 260, 0, 100], projection="x1p", frame="rltb") + + for line_cap in ["butt", "round", "square"]: + # Change GMT default locally + with pygmt.config(PS_LINE_CAP=line_cap): + color = dict_col[line_cap] + # Draw a 10-point thick line with 20-point long segments and gaps + # Use the local PS_LINE_CAP setting + fig.plot(x=x, y=y, pen=f"10p,{color},20_20") + + # Draw a 1-point thick black solid line to highlight segment cap appearance + fig.plot(x=x, y=y, pen="1p,black,solid") + # Plot data points as circles + fig.plot(x=x, y=y, style="c0.1c", fill="white", pen="0.5p,") + # Add label for PS_LINE_CAP setting + fig.text(text=line_cap, x=x[-1] + 20, y=y[-1], justify="LM") + + y = y - 20 + + fig.shift_origin(yshift="-h") + + # ----------------------------------------------------------------------------- + # Bottom: PS_LINE_JOIN and PS_MITER_LIMIT + + x = np.array([5, 95, 65]) + y = np.array([10, 70, 10]) + + fig.basemap(region=[0, 260, 0, 100], projection="x1p", frame="rltb") + + for line_join in ["bevel", "round", "miter"]: + with pygmt.config(PS_LINE_JOIN=line_join, PS_MITER_LIMIT=1): + color = dict_col[line_join] + # Draw a 7-point thick solid line + # Use the local PS_LINE_JOIN and PS_MITER_LIMIT settings + fig.plot(x=x, y=y, pen=f"7p,{color},solid") + + fig.plot(x=x, y=y, pen="1p,black,solid") + fig.plot(x=x, y=y, style="c0.1c", fill="white", pen="0.5p") + fig.text(text=line_join, x=x[1] - 10, y=y[1], justify="RB") + + x = x + 75 + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.206 seconds) + + +.. _sphx_glr_download_gallery_lines_line_segment_ends.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: line_segment_ends.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: line_segment_ends.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: line_segment_ends.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/lines/linefronts.rst.txt b/v0.14.0/_sources/gallery/lines/linefronts.rst.txt new file mode 100644 index 00000000000..2c6dd82e9a4 --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/linefronts.rst.txt @@ -0,0 +1,156 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/lines/linefronts.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_gallery_lines_linefronts.py: + + +Line fronts +=========== + +Using the :meth:`pygmt.Figure.plot` method you can draw a so-called +*front* which allows to plot specific symbols distributed along a line +or curve. Typical use cases are weather fronts, fault lines, +subduction zones, and more. To draw general symbols along a line or +curve, i.e., a so-called *decorated line*, see the +:doc:`Decorated lines example `. + +A front can be drawn by passing **f**\[±]\ *gap*\[/*size*] to the ``style`` +parameter where *gap* defines the distance gap between the symbols and +*size* the symbol size. If *gap* is negative, it is interpreted to mean +the number of symbols along the front instead. If *gap* has a leading + +then we use the value exactly as given [Default will start and end each +line with a symbol, hence the *gap* is adjusted to fit]. If *size* is +missing it is set to 30% of the *gap*, except when *gap* is negative +and *size* is thus required. Append **+l** or **+r** to plot symbols on +the left or right side of the front [Default is centered]. Append +**+**\ *type* to specify which symbol to plot: **b**\ ox, **c**\ ircle, +**f**\ ault [Default], **s**\ lip, or **t**\ riangle. Slip means left-lateral +or right-lateral strike-slip arrows (centered is not an option). The **+s** +modifier optionally accepts the angle used to draw the vector [Default is +20 degrees]. Alternatively, use **+S** which draws arcuate arrow heads. +Append **+o**\ *offset* to offset the first symbol from the beginning of +the front by that amount [Default is 0]. The chosen symbol is drawn with +the same pen as set for the line (i.e., via the ``pen`` parameter). To use +an alternate pen, append **+p**\ *pen*. To skip the outline, just use +**+p** with no argument. To make the main front line invisible, add **+i**. +For modifying the main front line via the ``pen`` parameter, see the +:doc:`Line styles example `. + +.. GENERATED FROM PYTHON SOURCE LINES 36-94 + + + +.. image-sg:: /gallery/lines/images/sphx_glr_linefronts_001.png + :alt: linefronts + :srcset: /gallery/lines/images/sphx_glr_linefronts_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Generate a two-point line for plotting + x = np.array([1, 4]) + y = np.array([20, 20]) + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 20], projection="X15c/15c", frame="+tLine Fronts") + + # Plot the line using different front styles + for frontstyle in [ + # line with "faults" front style, same as +f [Default] + "f1c/0.25c", + # line with box front style + "f1c/0.25c+b", + # line with circle front style + "f1c/0.25c+c", + # line with triangle front style + "f1c/0.3c+t", + # line with left-lateral ("+l") slip ("+s") front style, angle is set to + # 45 degrees and offset to 2.25 cm + "f5c/1c+l+s45+o2.25c", + # line with "faults" front style, symbols are plotted on the left side of + # the front + "f1c/0.4c+l", + # line with box front style, symbols are plotted on the left side of the + # front + "f1c/0.3c+l+b", + # line with circle front style, symbols are plotted on the right side of + # the front + "f1c/0.4c+r+c", + # line with triangle front style, symbols are plotted on the left side of + # the front + "f1c/0.3c+l+t", + # line with triangle front style, symbols are plotted on the right side of + # the front, use other pen for the outline of the symbol + "f1c/0.4c+r+t+p1.5p,dodgerblue", + # line with triangle front style, symbols are plotted on the right side of + # the front and offset is set to 0.3 cm, skip the outline + "f0.5c/0.3c+r+t+o0.3c+p", + # line with triangle front style, symbols are plotted on the right side of + # the front and offset is set to 0.3 cm, skip the outline and make the main + # front line invisible + "f0.5c/0.3c+r+t+o0.3c+p+i", + ]: + y -= 1 # move the current line down + fig.plot(x=x, y=y, pen="1.25p", style=frontstyle, fill="red3") + fig.text( + x=x[-1], + y=y[-1], + text=frontstyle, + font="Courier-Bold", + justify="ML", + offset="0.75c/0c", + ) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.210 seconds) + + +.. _sphx_glr_download_gallery_lines_linefronts.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: linefronts.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: linefronts.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: linefronts.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/lines/linestrings.rst.txt b/v0.14.0/_sources/gallery/lines/linestrings.rst.txt new file mode 100644 index 00000000000..35448b498cd --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/linestrings.rst.txt @@ -0,0 +1,132 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/lines/linestrings.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_gallery_lines_linestrings.py: + + +GeoPandas: Plotting lines with LineString or MultiLineString geometry +===================================================================== + +The :meth:`pygmt.Figure.plot` method allows us to plot geographical data such as lines +with LineString or MultiLineString geometry types stored in a +:class:`geopandas.GeoDataFrame` object or any object that implements the +`__geo_interface__ `__ property. + +Use :func:`geopandas.read_file` to load data from any supported OGR format such as a +shapefile (.shp), GeoJSON (.geojson), geopackage (.gpkg), etc. Then, pass the +:class:`geopandas.GeoDataFrame` object as an argument to the ``data`` parameter of +:meth:`pygmt.Figure.plot`, and style the lines using the ``pen`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 17-30 + +.. code-block:: Python + + import geodatasets + import geopandas as gpd + import pygmt + + # Read a sample dataset provided by the geodatasets package. + # The dataset contains large rivers in Europe, stored as LineString/MultiLineString + # geometry types. + gdf = gpd.read_file(geodatasets.get_path("eea large_rivers")) + + # Convert object to EPSG 4326 coordinate system + gdf = gdf.to_crs("EPSG:4326") + print(gdf.head()) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + NAME ... geometry + 0 Danube ... MULTILINESTRING ((8.1846 48.0807, 8.19049 48.0... + 1 Douro ... MULTILINESTRING ((-8.67141 41.14934, -8.64362 ... + 2 Ebro ... MULTILINESTRING ((-4.05971 42.97715, -4.06841 ... + 3 Elbe ... MULTILINESTRING ((8.69715 53.90109, 8.72716 53... + 4 Guadalquivir ... MULTILINESTRING ((-6.37899 36.80363, -6.34806 ... + + [5 rows x 3 columns] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 31-47 + +.. code-block:: Python + + fig = pygmt.Figure() + + fig.coast( + projection="M10c", + region=[-10, 30, 35, 57], + resolution="l", + land="gray95", + shorelines="1/0.1p,gray50", + borders="1/0.1,gray30", + frame=True, + ) + + # Add rivers to map + fig.plot(data=gdf, pen="1p,steelblue") + + fig.show() + + + +.. image-sg:: /gallery/lines/images/sphx_glr_linestrings_001.png + :alt: linestrings + :srcset: /gallery/lines/images/sphx_glr_linestrings_001.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 2.878 seconds) + + +.. _sphx_glr_download_gallery_lines_linestrings.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: linestrings.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: linestrings.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: linestrings.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/lines/linestyles.rst.txt b/v0.14.0/_sources/gallery/lines/linestyles.rst.txt new file mode 100644 index 00000000000..c8e16dff72a --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/linestyles.rst.txt @@ -0,0 +1,120 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/lines/linestyles.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_gallery_lines_linestyles.py: + + +Line styles +=========== + +The :meth:`pygmt.Figure.plot` method can plot lines in different styles. +The default line style is a 0.25-point wide, black, solid line, and can be +customized with the ``pen`` parameter. + +A *pen* in GMT has three attributes: *width*, *color*, and *style*. +The *style* attribute controls the appearance of the line. +Giving ``"dotted"`` or ``"."`` yields a dotted line, whereas a dashed pen is +requested with ``"dashed"`` or ``"-"``. Also combinations of dots and dashes, +like ``".-"`` for a dot-dashed line, are allowed. + +For more advanced *pen* attributes, see the GMT Technical Reference +:gmt-docs:`reference/features.html#wpen-attrib`. + +.. GENERATED FROM PYTHON SOURCE LINES 21-59 + + + +.. image-sg:: /gallery/lines/images/sphx_glr_linestyles_001.png + :alt: linestyles + :srcset: /gallery/lines/images/sphx_glr_linestyles_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Generate a two-point line for plotting + x = np.array([0, 7]) + y = np.array([9, 9]) + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 10], projection="X15c/8c", frame="+tLine Styles") + + # Plot the line using the default line style + fig.plot(x=x, y=y) + fig.text(x=x[-1], y=y[-1], text="solid (default)", justify="ML", offset="0.2c/0c") + + # Plot the line using different line styles + for linestyle in [ + "1p,red,-", # dashed line + "1p,blue,.", # dotted line + "1p,lightblue,-.", # dash-dotted line + "2p,blue,..-", # dot-dot-dashed line + "2p,tomato,--.", # dash-dash-dotted line + # A pattern of 4-point-long line segments and 2-point-long gaps between + # segments, with pattern offset by 2 points from the origin + "2p,tomato,4_2:2p", + ]: + y -= 1 # Move the current line down + fig.plot(x=x, y=y, pen=linestyle) + fig.text(x=x[-1], y=y[-1], text=linestyle, justify="ML", offset="0.2c/0c") + + # Plot the line like a railway track (black/white). + # The trick here is plotting the same line twice but with different line styles + y -= 1 # move the current line down + fig.plot(x=x, y=y, pen="5p,black") + fig.plot(x=x, y=y, pen="4p,white,20p_20p") + fig.text(x=x[-1], y=y[-1], text="5p,black", justify="ML", offset="0.2c/0.2c") + fig.text(x=x[-1], y=y[-1], text="4p,white,20p_20p", justify="ML", offset="0.2c/-0.2c") + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.180 seconds) + + +.. _sphx_glr_download_gallery_lines_linestyles.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: linestyles.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: linestyles.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: linestyles.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/lines/quoted_lines.rst.txt b/v0.14.0/_sources/gallery/lines/quoted_lines.rst.txt new file mode 100644 index 00000000000..f275701934e --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/quoted_lines.rst.txt @@ -0,0 +1,178 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/lines/quoted_lines.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_gallery_lines_quoted_lines.py: + + +Quoted lines +============ + +To plot a so-called *quoted line*, i.e., labels along a line +or curve, use the ``style`` parameter of the +:meth:`pygmt.Figure.plot` method with the argument ``"q"`` and the +desired modifiers. A colon (``":"``) is used to separate the +algorithm settings from the label information. +This example shows how to adjust the labels. +For modifying the main quoted line via the ``pen`` parameter, +see the :doc:`Line styles example `. +For details on the input data see the upstream GMT documentation +at :gmt-docs:`plot.html#s`. + +.. GENERATED FROM PYTHON SOURCE LINES 18-75 + +.. code-block:: Python + + import numpy as np + import pygmt + + # Generate a two-point line for plotting + x = np.array([1, 4]) + y = np.array([20, 20]) + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 20], projection="X15c/15c", frame="+tQuoted Lines") + + # Plot different quoted lines + for quotedline in [ + # Line with labels ("+l") "text" in distance ("d") of 1 centimeter + "qd1c:+ltext", + # Suppress the main quoted line by appending "+i" + "qd1c:+ltext+i", + # Give the number of equally spaced labels by using "n" instead of "d" + "qn5:+ltext", + # Use upper-case "N" to have labels at the start and end of the line + "qN5:+ltext", + # To only plot a label at the start of the line use "N-1" + "qN-1:+ltext", + # To only plot a label at the end of the line use "N+1" + "qN+1:+ltext", + # Adjust the justification of the labels via "+j", here Top Center + "qd1c:+ltext+jTC", + # Shift labels using "+n" in x and y directions relative to the main + # quoted line + "qd1c:+ltext+n-0.5c/0.1c", + # Rotate labels via "+a" (counter-clockwise from horizontal) + "qd1c:+ltext+a20", + # Adjust size, type, and color of the font via "+f" + "qd1c:+ltext+f12p,Times-Bold,red", + # Add a box around the label via "+p" + "qd1c:+ltext+p", + # Adjust thickness, color, and style of the outline + "qd1c:+ltext+p0.5p,blue,dashed", + # Append "+o" to get a box with rounded edges + "qd1c:+ltext+p0.5p,blue+o", + # Adjust the space between label and box in x and y directions via "+c" + "qd1c:+ltext+p0.5p,blue+o+c0.1c/0.1c", + # Give a fill of the box via "+g" together with the desired color + "qd1c:+ltext+gdodgerblue", + ]: + y -= 1 # Move current line down + fig.plot(x=x, y=y, pen="1.25p", style=quotedline) + fig.text( + x=x[-1], + y=y[-1], + text=quotedline, + font="Courier-Bold", + justify="ML", + offset="0.75c/0c", + ) + + fig.show() + + + + +.. image-sg:: /gallery/lines/images/sphx_glr_quoted_lines_001.png + :alt: quoted lines + :srcset: /gallery/lines/images/sphx_glr_quoted_lines_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 76-78 + +For curved labels following the line, append ``"+v"`` to the argument passed +to the ``style`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 78-98 + +.. code-block:: Python + + + # Generate sine curve + x = np.arange(0, 10 * np.pi, 0.1) + y = np.sin(0.8 * x) + + fig = pygmt.Figure() + + fig.basemap(region=[0, 30, -4, 4], projection="X10c/5c", frame=True) + + fig.plot(x=x, y=y + 2, style="qd1.2c:+lstraight text+f5p", pen="1p,blue") + + fig.plot( + x=x, + y=y - 2, + # Append "+v" to force curved labels + style="qd1.2c:+lcurved text+f5p+v", + pen="1p,blue", + ) + + fig.show() + + + +.. image-sg:: /gallery/lines/images/sphx_glr_quoted_lines_002.png + :alt: quoted lines + :srcset: /gallery/lines/images/sphx_glr_quoted_lines_002.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.148 seconds) + + +.. _sphx_glr_download_gallery_lines_quoted_lines.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: quoted_lines.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: quoted_lines.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: quoted_lines.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/lines/sg_execution_times.rst.txt b/v0.14.0/_sources/gallery/lines/sg_execution_times.rst.txt new file mode 100644 index 00000000000..e8047b117d1 --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/sg_execution_times.rst.txt @@ -0,0 +1,73 @@ + +:orphan: + +.. _sphx_glr_gallery_lines_sg_execution_times: + + +Computation times +================= +**00:06.531** total execution time for 13 files **from gallery/lines**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_gallery_lines_linestrings.py` (``linestrings.py``) + - 00:02.878 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_quoted_lines.py` (``quoted_lines.py``) + - 00:01.148 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_envelope.py` (``envelope.py``) + - 00:00.313 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_decorated_lines.py` (``decorated_lines.py``) + - 00:00.307 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_vector_styles.py` (``vector_styles.py``) + - 00:00.301 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_vector_heads_tails.py` (``vector_heads_tails.py``) + - 00:00.267 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_line_custom_cpt.py` (``line_custom_cpt.py``) + - 00:00.226 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_great_circles.py` (``great_circles.py``) + - 00:00.216 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_linefronts.py` (``linefronts.py``) + - 00:00.210 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_line_segment_ends.py` (``line_segment_ends.py``) + - 00:00.206 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_linestyles.py` (``linestyles.py``) + - 00:00.180 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_connection_lines.py` (``connection_lines.py``) + - 00:00.157 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_wiggle.py` (``wiggle.py``) + - 00:00.124 + - 0.0 diff --git a/v0.14.0/_sources/gallery/lines/vector_heads_tails.rst.txt b/v0.14.0/_sources/gallery/lines/vector_heads_tails.rst.txt new file mode 100644 index 00000000000..9783581f787 --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/vector_heads_tails.rst.txt @@ -0,0 +1,146 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/lines/vector_heads_tails.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_gallery_lines_vector_heads_tails.py: + + +Vector heads and tails +====================== + +Many methods in PyGMT allow plotting vectors with individual +heads and tails. For this purpose, several modifiers may be appended to +the corresponding vector-producing parameters for specifying the placement +of vector heads and tails, their shapes, and the justification of the vector. + +To place a vector head at the beginning of the vector path +simply append **+b** to the vector-producing option (use **+e** to place +one at the end). Optionally, append **t** for a terminal line, **c** for a +circle, **a** for arrow (default), **i** for tail, **A** for plain open +arrow, and **I** for plain open tail. Further append **l** or **r** (e.g. +``"+bar"``) to only draw the left or right half-sides of the selected head/tail +(default is both sides) or use **+l** or **+r** to apply simultaneously to both +beginning and end. In this context left and right refer to the side of the +vector line when viewed from the beginning point to the end point of a line +segment. The angle of the vector head apex can be set using **+a**\ *angle* +(default is 30). The shape of the vector head can be adjusted using +**+h**\ *shape* (e.g. ``"+h0.5"``). + +For further modifiers see :gmt-docs:`plot.html#vector-attributes`. + +In the following we use the :meth:`pygmt.Figure.plot` method to plot vectors +with individual heads and tails. We must specify the modifiers (together with +the vector type, here ``"v"`` for Cartesian vector, see also the +:doc:`Vector types example `) +by passing the corresponding shortcuts to the ``style`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 34-85 + + + +.. image-sg:: /gallery/lines/images/sphx_glr_vector_heads_tails_001.png + :alt: vector heads tails + :srcset: /gallery/lines/images/sphx_glr_vector_heads_tails_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.basemap( + region=[0, 10, 0, 15], projection="X15c/10c", frame="+tVector heads and tails" + ) + + x = 1 + y = 14 + angle = 0 # in degrees, measured counter-clockwise from horizontal + length = 7 + + for vecstyle in [ + # vector without head and tail (line) + "v0c", + # plain open arrow at beginning and end, angle of the vector head apex is + # set to 50 + "v0.6c+bA+eA+a50", + # plain open tail at beginning and end + "v0.4c+bI+eI", + # terminal line at beginning and end, angle of vector head apex is set + # to 80 + "v0.3c+bt+et+a80", + # arrow head at end + "v0.6c+e", + # circle at beginning and arrow head at end + "v0.6c+bc+ea", + # terminal line at beginning and arrow head at end + "v0.6c+bt+ea", + # arrow head at end, shape of vector head is set to 0.5 + "v1c+e+h0.5", + # modified arrow heads at beginning and end + "v1c+b+e+h0.5", + # tail at beginning and arrow with modified vector head at end + "v1c+bi+ea+h0.5", + # half-sided arrow head (right side) at beginning and arrow at the end + "v1c+bar+ea+h0.8", + # half-sided arrow heads at beginning (right side) and end (left side) + "v1c+bar+eal+h0.5", + # half-sided tail at beginning and arrow at end (right side for both) + "v1c+bi+ea+r+h0.5+a45", + ]: + fig.plot( + x=x, y=y, style=vecstyle, direction=([angle], [length]), pen="2p", fill="red3" + ) + fig.text( + x=6, y=y, text=vecstyle, font="Courier-Bold", justify="ML", offset="0.2c/0c" + ) + y -= 1 # move the next vector down + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.267 seconds) + + +.. _sphx_glr_download_gallery_lines_vector_heads_tails.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vector_heads_tails.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vector_heads_tails.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: vector_heads_tails.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/lines/vector_styles.rst.txt b/v0.14.0/_sources/gallery/lines/vector_styles.rst.txt new file mode 100644 index 00000000000..637ad1642bd --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/vector_styles.rst.txt @@ -0,0 +1,128 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/lines/vector_styles.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_gallery_lines_vector_styles.py: + + +Cartesian, circular, and geographic vectors +=========================================== + +The :meth:`pygmt.Figure.plot` method can plot Cartesian, circular, and geographic +vectors. The ``style`` parameter controls vector attributes. See also the +:doc:`Vector attributes example `. + +.. GENERATED FROM PYTHON SOURCE LINES 11-66 + + + +.. image-sg:: /gallery/lines/images/sphx_glr_vector_styles_001.png + :alt: vector styles + :srcset: /gallery/lines/images/sphx_glr_vector_styles_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Create a plot with coast, Mercator projection (M) over the continental US + fig = pygmt.Figure() + fig.coast( + region=[-127, -64, 24, 53], + projection="M15c", + frame=True, + borders=1, + area_thresh=4000, + shorelines="0.25p,black", + ) + + + # Left: plot 12 Cartesian vectors with different lengths + x = np.linspace(-116, -116, 12) # x vector coordinates + y = np.linspace(33.5, 42.5, 12) # y vector coordinates + direction = np.zeros(x.shape) # direction of vectors + length = np.linspace(0.5, 2.4, 12) # length of vectors + # Cartesian vectors (v) with red fill and pen (+g, +p), vector head at the end (+e), and + # 40 degree angle (+a) with no indentation for the vector head (+h) + style = "v0.2c+e+a40+gred+h0+p1p,red" + fig.plot(x=x, y=y, style=style, pen="1p,red", direction=[direction, length]) + fig.text(text="CARTESIAN", x=-112, y=44.2, font="13p,Helvetica-Bold,red", fill="white") + + + # Middle: plot 7 math angle arcs with different radii + num = 7 + x = np.full(num, -95) # x coordinates of the center + y = np.full(num, 37) # y coordinates of the center + radius = 1.8 - 0.2 * np.arange(0, num) # radius + startdir = np.full(num, 90) # start direction in degrees + stopdir = 180 + 40 * np.arange(0, num) # stop direction in degrees + # data for circular vectors + data = np.column_stack([x, y, radius, startdir, stopdir]) + arcstyle = "m0.5c+ea" # Circular vector (m) with an arrow at the end + fig.plot(data=data, style=arcstyle, fill="red3", pen="1.5p,black") + fig.text(text="CIRCULAR", x=-95, y=44.2, font="13p,Helvetica-Bold,black", fill="white") + + + # Right: plot geographic vectors using endpoints + NYC = [-74.0060, 40.7128] + CHI = [-87.6298, 41.8781] + SEA = [-122.3321, 47.6062] + NO = [-90.0715, 29.9511] + # '=' means geographic vectors. With the modifier '+s', the input data should contain + # coordinates of start and end points + style = "=0.5c+s+e+a30+gblue+h0.5+p1p,blue" + data = np.array([NYC + CHI, NYC + SEA, NYC + NO]) + fig.plot(data=data, style=style, pen="1.0p,blue") + fig.text( + text="GEOGRAPHIC", x=-74.5, y=44.2, font="13p,Helvetica-Bold,blue", fill="white" + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.301 seconds) + + +.. _sphx_glr_download_gallery_lines_vector_styles.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vector_styles.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vector_styles.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: vector_styles.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/lines/wiggle.rst.txt b/v0.14.0/_sources/gallery/lines/wiggle.rst.txt new file mode 100644 index 00000000000..532fe7e3781 --- /dev/null +++ b/v0.14.0/_sources/gallery/lines/wiggle.rst.txt @@ -0,0 +1,105 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/lines/wiggle.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_gallery_lines_wiggle.py: + + +Wiggle along tracks +=================== + +The :meth:`pygmt.Figure.wiggle` method can plot z = f(x,y) anomalies along +tracks. ``x``, ``y``, ``z`` can be specified as 1-D arrays or within a +specified file. The ``scale`` parameter can be used to set the scale of the +anomaly in data/distance units. The positive and/or negative areas can be +filled with color by setting the ``fillpositive`` and/or ``fillnegative`` +parameters. + +.. GENERATED FROM PYTHON SOURCE LINES 14-43 + + + +.. image-sg:: /gallery/lines/images/sphx_glr_wiggle_001.png + :alt: wiggle + :srcset: /gallery/lines/images/sphx_glr_wiggle_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Create (x, y, z) triplets + x = np.arange(-7, 7, 0.1) + y = np.zeros(x.size) + z = 50 * np.exp(-((x / 3) ** 2)) * np.cos(2 * np.pi * x) + + fig = pygmt.Figure() + fig.basemap(region=[-8, 12, -1, 1], projection="X10c", frame=["Snlr", "xa2f1"]) + fig.wiggle( + x=x, + y=y, + z=z, + # Set anomaly scale to 20 centimeters + scale="20c", + # Fill positive areas red + fillpositive="red", + # Fill negative areas gray + fillnegative="gray", + # Set the outline width to 1.0 point + pen="1.0p", + # Draw a blue track with a width of 0.5 points + track="0.5p,blue", + # Plot a vertical scale bar at Middle Right (MR). The bar length (+w) + # is 100 in data (z) units. Set the z unit label (+l) to "nT". + position="jMR+w100+lnT", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.124 seconds) + + +.. _sphx_glr_download_gallery_lines_wiggle.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: wiggle.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: wiggle.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: wiggle.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/maps/borders.rst.txt b/v0.14.0/_sources/gallery/maps/borders.rst.txt new file mode 100644 index 00000000000..7bc4ae56daa --- /dev/null +++ b/v0.14.0/_sources/gallery/maps/borders.rst.txt @@ -0,0 +1,91 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/maps/borders.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_gallery_maps_borders.py: + + +Political boundaries +==================== + +The ``borders`` parameter of :meth:`pygmt.Figure.coast` specifies levels of +political boundaries to plot and the pen used to draw them. Choose from the +list of boundaries below: + +* **1** = National boundaries +* **2** = State boundaries within the Americas +* **3** = Marine boundaries +* **a** = All boundaries (1-3) + +For example, to draw national boundaries with a line thickness of 1 point and +black line color use ``borders="1/1p,black"``. You can draw multiple boundaries +by passing in a list to ``borders``. + +.. GENERATED FROM PYTHON SOURCE LINES 20-29 + + + +.. image-sg:: /gallery/maps/images/sphx_glr_borders_001.png + :alt: borders + :srcset: /gallery/maps/images/sphx_glr_borders_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Make a Sinusoidal projection map of the Americas with automatic annotations, + # ticks and gridlines + fig.basemap(region=[-150, -30, -60, 60], projection="I-90/15c", frame="afg") + # Plot each level of the boundaries dataset with a different color. + fig.coast(borders=["1/0.5p,black", "2/0.5p,red", "3/0.5p,blue"], land="gray") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.362 seconds) + + +.. _sphx_glr_download_gallery_maps_borders.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: borders.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: borders.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: borders.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/maps/choropleth_map.rst.txt b/v0.14.0/_sources/gallery/maps/choropleth_map.rst.txt new file mode 100644 index 00000000000..45674e04792 --- /dev/null +++ b/v0.14.0/_sources/gallery/maps/choropleth_map.rst.txt @@ -0,0 +1,151 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/maps/choropleth_map.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_gallery_maps_choropleth_map.py: + + +Choropleth map +============== + +The :meth:`pygmt.Figure.plot` method allows us to plot geographical data such as +polygons which are stored in a :class:`geopandas.GeoDataFrame` object. Use +:func:`geopandas.read_file` to load data from any supported OGR format such as a +shapefile (.shp), GeoJSON (.geojson), geopackage (.gpkg), etc. You can also use a full +URL pointing to your desired data source. Then, pass the class:`geopandas.GeoDataFrame` +as an argument to the ``data`` parameter of :meth:`pygmt.Figure.plot`, and style the +geometry using the ``pen`` parameter. To fill the polygons based on a corresponding +column you need to set ``fill="+z"`` as well as select the appropriate column using the +``aspatial`` parameter as shown in the example below. + +.. GENERATED FROM PYTHON SOURCE LINES 17-25 + +.. code-block:: Python + + import geodatasets + import geopandas as gpd + import pygmt + + # Read the example dataset provided by geodatasets. + gdf = gpd.read_file(geodatasets.get_path("geoda airbnb")) + print(gdf) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Downloading file 'airbnb.zip' from 'https://geodacenter.github.io/data-and-lab//data/airbnb.zip' to '/home/runner/.cache/geodatasets'. + community ... geometry + 0 DOUGLAS ... POLYGON ((-87.60914 41.84469, -87.60915 41.844... + 1 OAKLAND ... POLYGON ((-87.59215 41.81693, -87.59231 41.816... + 2 FULLER PARK ... POLYGON ((-87.6288 41.80189, -87.62879 41.8017... + 3 GRAND BOULEVARD ... POLYGON ((-87.60671 41.81681, -87.6067 41.8165... + 4 KENWOOD ... POLYGON ((-87.59215 41.81693, -87.59215 41.816... + .. ... ... ... + 72 MOUNT GREENWOOD ... POLYGON ((-87.69646 41.70714, -87.69644 41.706... + 73 MORGAN PARK ... POLYGON ((-87.64215 41.68508, -87.64249 41.685... + 74 OHARE ... MULTIPOLYGON (((-87.83658 41.9864, -87.83658 4... + 75 EDGEWATER ... POLYGON ((-87.65456 41.99817, -87.65456 41.998... + 76 EDISON PARK ... POLYGON ((-87.80676 42.00084, -87.80676 42.000... + + [77 rows x 21 columns] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 26-59 + +.. code-block:: Python + + fig = pygmt.Figure() + + fig.basemap( + region=gdf.total_bounds[[0, 2, 1, 3]], + projection="M6c", + frame="+tPopulation of Chicago", + ) + + # The dataset contains different attributes, here we select the "population" column to + # plot. + + # First, we define the colormap to fill the polygons based on the "population" column. + pygmt.makecpt( + cmap="acton", + series=[gdf["population"].min(), gdf["population"].max(), 10], + continuous=True, + reverse=True, + ) + + # Next, we plot the polygons and fill them using the defined colormap. The target column + # is defined by the aspatial parameter. + fig.plot( + data=gdf, + pen="0.3p,gray10", + fill="+z", + cmap=True, + aspatial="Z=population", + ) + + # Add colorbar legend. + fig.colorbar(frame="x+lPopulation", position="jML+o-0.5c+w3.5c/0.2c") + + fig.show() + + + +.. image-sg:: /gallery/maps/images/sphx_glr_choropleth_map_001.png + :alt: choropleth map + :srcset: /gallery/maps/images/sphx_glr_choropleth_map_001.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.616 seconds) + + +.. _sphx_glr_download_gallery_maps_choropleth_map.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: choropleth_map.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: choropleth_map.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: choropleth_map.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/maps/country_polygons.rst.txt b/v0.14.0/_sources/gallery/maps/country_polygons.rst.txt new file mode 100644 index 00000000000..daebf04d7f8 --- /dev/null +++ b/v0.14.0/_sources/gallery/maps/country_polygons.rst.txt @@ -0,0 +1,197 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/maps/country_polygons.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_gallery_maps_country_polygons.py: + + +Highlight country, continent and state polygons +=============================================== + +The :meth:`pygmt.Figure.coast` method can highlight country polygons +via the ``dcw`` parameter. It accepts the country code or full +country name and can draw its borders and add a color to its landmass. +It's also possible to define multiple countries at once by separating +the individual names with commas. + +.. GENERATED FROM PYTHON SOURCE LINES 13-45 + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + + fig.coast( + region=[-12, 32, 34, 72], + # Lambert Azimuthal Equal Area lon0/lat0/horizon/width + projection="A10/52/25/6c", + land="gray", + water="white", + frame="afg", + dcw=[ + # Great Britain (country code) with seagreen land + "GB+gseagreen", + # Italy with a red border + "IT+p0.5p,red3", + # Spain with a magenta dashed border + "ES+p0.5p,magenta4,-", + # Romania with a black dotted border + "RO+p0.75p,black,.", + # Germany with orange land and a blue border + "DE+gorange+p0.5p,dodgerblue4", + # France (full country name) with a steelblue border + "France+p0.5p,steelblue", + # Norway, Sweden and Finland (multiple countries) with pink + # land and pink3 borders + "Norway,Sweden,Finland+gpink+p0.2p,pink3", + ], + ) + + fig.show() + + + + +.. image-sg:: /gallery/maps/images/sphx_glr_country_polygons_001.png + :alt: country polygons + :srcset: /gallery/maps/images/sphx_glr_country_polygons_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 46-48 + +Entire continents can also be highlighted by adding ``"="`` in +front of the continent code to differentiate it from a country code. + +.. GENERATED FROM PYTHON SOURCE LINES 48-77 + +.. code-block:: Python + + + fig = pygmt.Figure() + + fig.coast( + region="d", + projection="H10c", + land="gray", + water="white", + frame="afg", + dcw=[ + # Europe + "=EU+gseagreen", + # Africa + "=AF+gred3", + # North America + "=NA+gmagenta4", + # South America + "=SA+gorange", + # Asia + "=AS+gdodgerblue4", + # Oceania + "=OC+gtomato", + # Antarctica + "=AN+ggray30", + ], + ) + + fig.show() + + + + +.. image-sg:: /gallery/maps/images/sphx_glr_country_polygons_002.png + :alt: country polygons + :srcset: /gallery/maps/images/sphx_glr_country_polygons_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 78-79 + +If available, states/territories of a country can be highlighted, too. + +.. GENERATED FROM PYTHON SOURCE LINES 79-99 + +.. code-block:: Python + + + fig = pygmt.Figure() + + fig.coast( + region=[-130, -70, 24, 52], + projection="L-100/35/33/45/12c", + land="gray", + shorelines="1/0.5p,gray30", + borders=["1/0.8p,gray30", "2/0.2p,gray30"], + frame=True, + dcw=[ + # Texas with orange fill + "US.TX+gorange", + # Kentucky with blue outline + "US.KY+p1p,blue", + ], + ) + + fig.show() + + + + +.. image-sg:: /gallery/maps/images/sphx_glr_country_polygons_003.png + :alt: country polygons + :srcset: /gallery/maps/images/sphx_glr_country_polygons_003.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 7.103 seconds) + + +.. _sphx_glr_download_gallery_maps_country_polygons.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: country_polygons.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: country_polygons.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: country_polygons.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/maps/land_and_water.rst.txt b/v0.14.0/_sources/gallery/maps/land_and_water.rst.txt new file mode 100644 index 00000000000..71c66d2cbf0 --- /dev/null +++ b/v0.14.0/_sources/gallery/maps/land_and_water.rst.txt @@ -0,0 +1,83 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/maps/land_and_water.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_gallery_maps_land_and_water.py: + + +Color land and water +==================== + +The ``land`` and ``water`` parameters of :meth:`pygmt.Figure.coast` specify +a color to fill in the land and water masses, respectively. There are many +:gmt-docs:`color codes in GMT `, including standard GMT color +names (like ``"skyblue"``), R/G/B levels (like ``"0/0/255"``), a hex value +(like ``"#333333"``), and a gray level (like ``"gray50"``). + +.. GENERATED FROM PYTHON SOURCE LINES 13-21 + + + +.. image-sg:: /gallery/maps/images/sphx_glr_land_and_water_001.png + :alt: land and water + :srcset: /gallery/maps/images/sphx_glr_land_and_water_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Make a global Mollweide map with automatic ticks + fig.basemap(region="g", projection="W15c", frame=True) + # Plot the land as light gray, and the water as sky blue + fig.coast(land="#666666", water="skyblue") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.231 seconds) + + +.. _sphx_glr_download_gallery_maps_land_and_water.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: land_and_water.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: land_and_water.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: land_and_water.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/maps/sg_execution_times.rst.txt b/v0.14.0/_sources/gallery/maps/sg_execution_times.rst.txt new file mode 100644 index 00000000000..fa940b829d6 --- /dev/null +++ b/v0.14.0/_sources/gallery/maps/sg_execution_times.rst.txt @@ -0,0 +1,52 @@ + +:orphan: + +.. _sphx_glr_gallery_maps_sg_execution_times: + + +Computation times +================= +**00:09.967** total execution time for 6 files **from gallery/maps**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_gallery_maps_country_polygons.py` (``country_polygons.py``) + - 00:07.103 + - 0.0 + * - :ref:`sphx_glr_gallery_maps_tilemaps.py` (``tilemaps.py``) + - 00:01.423 + - 0.0 + * - :ref:`sphx_glr_gallery_maps_choropleth_map.py` (``choropleth_map.py``) + - 00:00.616 + - 0.0 + * - :ref:`sphx_glr_gallery_maps_borders.py` (``borders.py``) + - 00:00.362 + - 0.0 + * - :ref:`sphx_glr_gallery_maps_land_and_water.py` (``land_and_water.py``) + - 00:00.231 + - 0.0 + * - :ref:`sphx_glr_gallery_maps_shorelines.py` (``shorelines.py``) + - 00:00.231 + - 0.0 diff --git a/v0.14.0/_sources/gallery/maps/shorelines.rst.txt b/v0.14.0/_sources/gallery/maps/shorelines.rst.txt new file mode 100644 index 00000000000..46ad3e51bec --- /dev/null +++ b/v0.14.0/_sources/gallery/maps/shorelines.rst.txt @@ -0,0 +1,79 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/maps/shorelines.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_gallery_maps_shorelines.py: + + +Shorelines +========== + +Use :meth:`pygmt.Figure.coast` to display shorelines as black lines. + +.. GENERATED FROM PYTHON SOURCE LINES 9-17 + + + +.. image-sg:: /gallery/maps/images/sphx_glr_shorelines_001.png + :alt: shorelines + :srcset: /gallery/maps/images/sphx_glr_shorelines_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Make a global Mollweide map with automatic ticks + fig.basemap(region="g", projection="W15c", frame=True) + # Display the shorelines as black lines with 0.5 point thickness + fig.coast(shorelines="0.5p,black") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.231 seconds) + + +.. _sphx_glr_download_gallery_maps_shorelines.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: shorelines.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: shorelines.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: shorelines.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/maps/tilemaps.rst.txt b/v0.14.0/_sources/gallery/maps/tilemaps.rst.txt new file mode 100644 index 00000000000..f5ff6e7be36 --- /dev/null +++ b/v0.14.0/_sources/gallery/maps/tilemaps.rst.txt @@ -0,0 +1,152 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/maps/tilemaps.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_gallery_maps_tilemaps.py: + + +Tile maps +========= + +The :meth:`pygmt.Figure.tilemap` method allows to plot +tiles from a tile server or local file as a basemap or overlay. + +.. GENERATED FROM PYTHON SOURCE LINES 10-30 + +.. code-block:: Python + + import contextily + import pygmt + + fig = pygmt.Figure() + fig.tilemap( + region=[-157.84, -157.8, 21.255, 21.285], + projection="M12c", + # Set level of details (0-22) + # Higher levels mean a zoom level closer to the Earth's + # surface with more tiles covering a smaller + # geographic area and thus more details and vice versa + # Please note, not all zoom levels are always available + zoom=14, + # Use tiles from OpenStreetMap tile server + source="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", + frame="afg", + ) + + fig.show() + + + + +.. image-sg:: /gallery/maps/images/sphx_glr_tilemaps_001.png + :alt: tilemaps + :srcset: /gallery/maps/images/sphx_glr_tilemaps_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + grdimage [WARNING]: (w - x_min) must equal (NX + eps) * x_inc), where NX is an integer and |eps| <= 0.0001. + grdimage [WARNING]: w reset from -157.84 to -157.840070056 + grdimage [WARNING]: (e - x_min) must equal (NX + eps) * x_inc), where NX is an integer and |eps| <= 0.0001. + grdimage [WARNING]: e reset from -157.8 to -157.799990801 + grdimage [WARNING]: (s - y_min) must equal (NY + eps) * y_inc), where NY is an integer and |eps| <= 0.0001. + grdimage [WARNING]: s reset from 21.255 to 21.2549765742 + grdimage [WARNING]: (n - y_min) must equal (NY + eps) * y_inc), where NY is an integer and |eps| <= 0.0001. + grdimage [WARNING]: n reset from 21.285 to 21.2850360149 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 31-35 + +It's also possible to use tiles provided via the +`contextily `__ +library. See :doc:`Contextily providers ` +for a list of possible tilemap options. + +.. GENERATED FROM PYTHON SOURCE LINES 35-46 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.tilemap( + region=[-157.84, -157.8, 21.255, 21.285], + projection="M12c", + # Use the CartoDB Positron option from contextily + source=contextily.providers.CartoDB.Positron, + frame="afg", + ) + + fig.show() + + + +.. image-sg:: /gallery/maps/images/sphx_glr_tilemaps_002.png + :alt: tilemaps + :srcset: /gallery/maps/images/sphx_glr_tilemaps_002.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + grdimage [WARNING]: (w - x_min) must equal (NX + eps) * x_inc), where NX is an integer and |eps| <= 0.0001. + grdimage [WARNING]: w reset from -157.84 to -157.840016369 + grdimage [WARNING]: (e - x_min) must equal (NX + eps) * x_inc), where NX is an integer and |eps| <= 0.0001. + grdimage [WARNING]: e reset from -157.8 to -157.799990966 + grdimage [WARNING]: (s - y_min) must equal (NY + eps) * y_inc), where NY is an integer and |eps| <= 0.0001. + grdimage [WARNING]: s reset from 21.255 to 21.2549741829 + grdimage [WARNING]: (n - y_min) must equal (NY + eps) * y_inc), where NY is an integer and |eps| <= 0.0001. + grdimage [WARNING]: n reset from 21.285 to 21.2850347554 + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.423 seconds) + + +.. _sphx_glr_download_gallery_maps_tilemaps.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: tilemaps.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: tilemaps.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: tilemaps.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/seismology/meca.rst.txt b/v0.14.0/_sources/gallery/seismology/meca.rst.txt new file mode 100644 index 00000000000..7b09eb0d7e9 --- /dev/null +++ b/v0.14.0/_sources/gallery/seismology/meca.rst.txt @@ -0,0 +1,116 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/seismology/meca.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_gallery_seismology_meca.py: + + +Focal mechanisms +================ + +The :meth:`pygmt.Figure.meca` method can plot focal mechanisms or beachballs. +We can specify the focal mechanism nodal planes or moment tensor components +as a dictionary using the ``spec`` parameter (or they can be specified as a +1-D or 2-D array, or within a file). The size of the beachballs can be set +using the ``scale`` parameter. The compressive and extensive quadrants can +be filled either with a color or a pattern via the ``compressionfill`` and +``extensionfill`` parameters, respectively. Use the ``pen`` parameter to +adjust the outline of the beachballs. + +.. GENERATED FROM PYTHON SOURCE LINES 16-54 + + + +.. image-sg:: /gallery/seismology/images/sphx_glr_meca_001.png + :alt: meca + :srcset: /gallery/seismology/images/sphx_glr_meca_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + + # Generate a map near Washington State showing land, water, and shorelines + fig.coast( + region=[-125, -122, 47, 49], + projection="M6c", + land="grey", + water="lightblue", + shorelines=True, + frame="a", + ) + + # Store focal mechanism parameters in a dictionary based on the Aki & Richards + # convention + focal_mechanism = {"strike": 330, "dip": 30, "rake": 90, "magnitude": 3} + + # Pass the focal mechanism data through the spec parameter. In addition provide + # scale, event location, and event depth + fig.meca( + spec=focal_mechanism, + scale="1c", # in centimeters + longitude=-124.3, + latitude=48.1, + depth=12.0, + # Fill compressive quadrants with color "red" + # [Default is "black"] + compressionfill="red", + # Fill extensive quadrants with color "cornsilk" + # [Default is "white"] + extensionfill="cornsilk", + # Draw a 0.5 points thick dark gray ("gray30") solid outline via + # the pen parameter [Default is "0.25p,black,solid"] + pen="0.5p,gray30,solid", + ) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.159 seconds) + + +.. _sphx_glr_download_gallery_seismology_meca.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: meca.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: meca.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: meca.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/seismology/sg_execution_times.rst.txt b/v0.14.0/_sources/gallery/seismology/sg_execution_times.rst.txt new file mode 100644 index 00000000000..cbd12b684a6 --- /dev/null +++ b/v0.14.0/_sources/gallery/seismology/sg_execution_times.rst.txt @@ -0,0 +1,40 @@ + +:orphan: + +.. _sphx_glr_gallery_seismology_sg_execution_times: + + +Computation times +================= +**00:00.372** total execution time for 2 files **from gallery/seismology**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_gallery_seismology_velo_arrow_ellipse.py` (``velo_arrow_ellipse.py``) + - 00:00.212 + - 0.0 + * - :ref:`sphx_glr_gallery_seismology_meca.py` (``meca.py``) + - 00:00.159 + - 0.0 diff --git a/v0.14.0/_sources/gallery/seismology/velo_arrow_ellipse.rst.txt b/v0.14.0/_sources/gallery/seismology/velo_arrow_ellipse.rst.txt new file mode 100644 index 00000000000..4fa5f3db55d --- /dev/null +++ b/v0.14.0/_sources/gallery/seismology/velo_arrow_ellipse.rst.txt @@ -0,0 +1,105 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/seismology/velo_arrow_ellipse.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_gallery_seismology_velo_arrow_ellipse.py: + + +Velocity arrows and confidence ellipses +======================================= + +The :meth:`pygmt.Figure.velo` method can be used to plot mean velocity arrows and +confidence ellipses. The example below plots red velocity arrows with lightblue +confidence ellipses outlined in red with the east_velocity x north_velocity used for +the station names. Note that the velocity arrows are scaled by 0.2 and the 39% +confidence limit will give an ellipse which fits inside a rectangle of dimension +east_sigma by north_sigma. + +.. GENERATED FROM PYTHON SOURCE LINES 14-43 + + + +.. image-sg:: /gallery/seismology/images/sphx_glr_velo_arrow_ellipse_001.png + :alt: velo arrow ellipse + :srcset: /gallery/seismology/images/sphx_glr_velo_arrow_ellipse_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pandas as pd + import pygmt + + fig = pygmt.Figure() + df = pd.DataFrame( + data={ + "x": [0, -8, 0, -5, 5, 0], + "y": [-8, 5, 0, -5, 0, -5], + "east_velocity": [0, 3, 4, 6, -6, 6], + "north_velocity": [0, 3, 6, 4, 4, -4], + "east_sigma": [4, 0, 4, 6, 6, 6], + "north_sigma": [6, 0, 6, 4, 4, 4], + "correlation_EN": [0.5, 0.5, 0.5, 0.5, -0.5, -0.5], + "SITE": ["0x0", "3x3", "4x6", "6x4", "-6x4", "6x-4"], + } + ) + fig.velo( + data=df, + region=[-10, 8, -10, 6], + projection="x0.8c", + frame=["WSne", "2g2f"], + spec="e0.2/0.39+f18", + uncertaintyfill="lightblue1", + pen="0.6p,red", + line=True, + vector="0.3c+p1p+e+gred", + ) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.212 seconds) + + +.. _sphx_glr_download_gallery_seismology_velo_arrow_ellipse.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: velo_arrow_ellipse.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: velo_arrow_ellipse.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: velo_arrow_ellipse.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/sg_execution_times.rst.txt b/v0.14.0/_sources/gallery/sg_execution_times.rst.txt new file mode 100644 index 00000000000..24d6bf4c86b --- /dev/null +++ b/v0.14.0/_sources/gallery/sg_execution_times.rst.txt @@ -0,0 +1,37 @@ + +:orphan: + +.. _sphx_glr_gallery_sg_execution_times: + + +Computation times +================= +**00:00.000** total execution time for 0 files **from gallery**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - N/A + - N/A + - N/A diff --git a/v0.14.0/_sources/gallery/symbols/bars.rst.txt b/v0.14.0/_sources/gallery/symbols/bars.rst.txt new file mode 100644 index 00000000000..4ea406b8273 --- /dev/null +++ b/v0.14.0/_sources/gallery/symbols/bars.rst.txt @@ -0,0 +1,135 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/symbols/bars.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_gallery_symbols_bars.py: + + +Vertical or horizontal bars +=========================== + +The :meth:`pygmt.Figure.plot` method can plot vertical (**b**) or +horizontal (**B**) bars by passing the corresponding shortcut to +the ``style`` parameter. By default, *base* = 0 meaning that the +bar is starting from 0. Append **+b**\[*base*] to change this +value. To plot multi-band bars, please append +**+v**\|\ **i**\ *ny* (for verticals bars) or **+v**\|\ **i**\ *nx* +(for horizontal ones), where *ny* or *nx* indicate the total +number of bands in the bar (and hence the number of values required +to follow the *x,y* coordinate pair in the input). Here, **+i** +means we must accumulate the bar values from the increments +*dy* or *dx*, while **+v** means we get the complete values relative +to base. Normally, the bands are plotted as sections of a final +single bar. Use **+s** to instead split the bar into *ny* or *nx* +side-by-side, individual and thinner bars. Multi-band bars require +``cmap=True`` with one color per band. + +.. GENERATED FROM PYTHON SOURCE LINES 23-73 + + + +.. image-sg:: /gallery/symbols/images/sphx_glr_bars_001.png + :alt: bars + :srcset: /gallery/symbols/images/sphx_glr_bars_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + + pygmt.makecpt(cmap="roma", series=[0, 4, 1]) + + with fig.subplot( + nrows=2, + ncols=2, + subsize=("8c", "4c"), + frame="ag", + sharey=True, + sharex=True, + margins=["0.5c", "0.75c"], + ): + pen = "1.5p" + with fig.set_panel(panel=0): + fill = "skyblue" + fig.basemap(region=[0, 4, 0, 3], frame="+tvertical bars") + fig.plot(x=1, y=2, style="b0.5c", fill=fill, pen=pen) + fig.plot(x=2, y=2.5, style="b1c", fill=fill, pen=pen) + # +b1 means that the bar is starting from y=1 here + fig.plot(x=3, y=2.5, style="b0.75c+b1", fill=fill, pen=pen) + + with fig.set_panel(panel=1): + fill = "tomato" + fig.basemap(region=[0, 4, 0, 3], frame="+thorizontal bars") + fig.plot(x=1.5, y=0.5, style="B0.75c", fill=fill, pen=pen) + fig.plot(x=3, y=1.5, style="B1c", fill=fill, pen=pen) + # +b2 means that the bar is starting from x=2 here + fig.plot(x=3.5, y=2.5, style="B0.5c+b2", fill=fill, pen=pen) + + # generate dictionary for plotting multi-band bars + data = { + "x1": [0.25, 1.25], + "y": [1, 2], + "x2": [0.65, 0.5], + "x3": [0.4, 1.25], + "x4": [2.25, 0.75], + } + + with fig.set_panel(panel=2): + fig.basemap(region=[0, 4, 0, 3], frame="+tstacked bars") + fig.plot(data=data, style="B0.75c+i4", cmap=True, pen=pen) + + with fig.set_panel(panel=3): + fig.basemap(region=[0, 4, 0, 3], frame="+tsplit bars") + fig.plot(data=data, style="B1c+v4+s", cmap=True, pen=pen) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.216 seconds) + + +.. _sphx_glr_download_gallery_symbols_bars.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: bars.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: bars.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: bars.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/symbols/basic_symbols.rst.txt b/v0.14.0/_sources/gallery/symbols/basic_symbols.rst.txt new file mode 100644 index 00000000000..b4be235b8c8 --- /dev/null +++ b/v0.14.0/_sources/gallery/symbols/basic_symbols.rst.txt @@ -0,0 +1,171 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/symbols/basic_symbols.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_gallery_symbols_basic_symbols.py: + + +Basic geometric symbols +======================= + +The :meth:`pygmt.Figure.plot` method can plot individual geometric symbols +by passing the corresponding shortcuts to the ``style`` parameter. The 14 basic +geometric symbols are shown underneath their corresponding shortcut codes. +Four symbols (**-**, **+**, **x** and **y**) are line-symbols only for which we +can adjust the linewidth via the ``pen`` parameter. The point symbol (**p**) +only takes a color fill which we can define via the ``fill`` parameter. For +the remaining symbols we may define a linewidth as well as a color fill. + +.. GENERATED FROM PYTHON SOURCE LINES 16-110 + + + +.. image-sg:: /gallery/symbols/images/sphx_glr_basic_symbols_001.png + :alt: basic symbols + :srcset: /gallery/symbols/images/sphx_glr_basic_symbols_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.basemap(region=[0, 8, 0, 3], projection="X12c/4c", frame=True) + + # define fontstlye for annotations + font = "15p,Helvetica-Bold" + + # upper row + y = 2 + + # use a dash in x direction (-) with a size of 0.9 cm, + # linewidth is set to 2p and the linecolor to "gray40" + fig.plot(x=1, y=y, style="-0.9c", pen="2p,gray40") + fig.text(x=1, y=y + 0.6, text="-", font=font) + + # use a plus (+) with a size of 0.9 cm, + # linewidth is set to 2p and the linecolor to "gray40" + fig.plot(x=2, y=y, style="+0.9c", pen="2p,gray40") + fig.text(x=2, y=y + 0.6, text="+", font=font) + + # use a star (a) with a size of 0.9 cm, + # linewidth is set to 1p, the linecolor to "black" (default) and the + # color fill to "darkorange" + fig.plot(x=3, y=y, style="a0.9c", pen="1p,black", fill="darkorange") + fig.text(x=3, y=y + 0.6, text="a", font=font) + + # use a circle (c) with a size of 0.9 cm, + # linewidth is set to 1p, the linecolor to "black" and the + # color fill to "darkred" + fig.plot(x=4, y=y, style="c0.9c", pen="1p,black", fill="darkred") + fig.text(x=4, y=y + 0.6, text="c", font=font) + + # use a diamond (d) with a size of 0.9 cm, + # linewidth is set to 1p, the linecolor to "black" and the + # color fill to "seagreen" + fig.plot(x=5, y=y, style="d0.9c", pen="1p,black", fill="seagreen") + fig.text(x=5, y=y + 0.6, text="d", font=font) + + # use a octagon (g) with a size of 0.9 cm, + # linewidth is set to 1p, the linecolor to "black" and the + # color fill to "dodgerblue4" + fig.plot(x=6, y=y, style="g0.9c", pen="1p,black", fill="dodgerblue4") + fig.text(x=6, y=y + 0.6, text="g", font=font) + + # use a hexagon (h) with a size of 0.9 cm, + # linewidth is set to 1p, the linecolor to "black" and the + # color fill to "lightgray" + fig.plot(x=7, y=y, style="h0.9c", pen="1p,black", fill="lightgray") + fig.text(x=7, y=y + 0.6, text="h", font=font) + + # lower row + y = 0.5 + + # use an inverted triangle (i) with a size of 0.9 cm, + # linewidth is set to 1p, the linecolor to "black" and the + # color fill to "tomato" + fig.plot(x=1, y=y, style="i0.9c", pen="1p,black", fill="tomato") + fig.text(x=1, y=y + 0.6, text="i", font=font) + + # use pentagon (n) with a size of 0.9 cm, + # linewidth is set to 1p, the linecolor to "black" and the + # color fill to "lightseagreen" + fig.plot(x=2, y=y, style="n0.9c", pen="1p,black", fill="lightseagreen") + fig.text(x=2, y=y + 0.6, text="n", font=font) + + # use a point (p) with a size of 0.9 cm, + # color fill is set to "lightseagreen" + fig.plot(x=3, y=y, style="p0.9c", fill="slateblue") + fig.text(x=3, y=y + 0.6, text="p", font=font) + + # use square (s) with a size of 0.9 cm, + # linewidth is set to 1p, the linecolor to "black" and the + # color fill to "gold2" + fig.plot(x=4, y=y, style="s0.9c", pen="1p,black", fill="gold2") + fig.text(x=4, y=y + 0.6, text="s", font=font) + + # use triangle (t) with a size of 0.9 cm, + # linewidth is set to 1p, the linecolor to "black" and the + # color fill to "magenta4" + fig.plot(x=5, y=y, style="t0.9c", pen="1p,black", fill="magenta4") + fig.text(x=5, y=y + 0.6, text="t", font=font) + + # use cross (x) with a size of 0.9 cm, + # linewidth is set to 2p and the linecolor to "gray40" + fig.plot(x=6, y=y, style="x0.9c", pen="2p,gray40") + fig.text(x=6, y=y + 0.6, text="x", font=font) + + # use a dash in y direction (y) with a size of 0.9 cm, + # linewidth is set to 2p and the linecolor to "gray40" + fig.plot(x=7, y=y, style="y0.9c", pen="2p,gray40") + fig.text(x=7, y=y + 0.6, text="y", font=font) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.184 seconds) + + +.. _sphx_glr_download_gallery_symbols_basic_symbols.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: basic_symbols.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: basic_symbols.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: basic_symbols.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/symbols/custom_symbols.rst.txt b/v0.14.0/_sources/gallery/symbols/custom_symbols.rst.txt new file mode 100644 index 00000000000..9388fbd3cb3 --- /dev/null +++ b/v0.14.0/_sources/gallery/symbols/custom_symbols.rst.txt @@ -0,0 +1,115 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/symbols/custom_symbols.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_gallery_symbols_custom_symbols.py: + + +Custom symbols +============== + +The :meth:`pygmt.Figure.plot` method can plot individual custom symbols by +passing the corresponding symbol name together with the **k** shortcut to the +``style`` parameter. + +In total 41 custom symbols are already included of which the following plot shows +five exemplary ones. The symbols are shown underneath their corresponding names. +For the remaining symbols see the GMT Technical Reference +:gmt-docs:`reference/custom-symbols.html`. + +Beside these built-in custom symbols GMT allows users to define their own custom +symbols. For this, a specific macro language is used. A detailed introduction can +be found at :gmt-docs:`reference/custom-symbols.html#the-macro-language`. After +defining such a symbol it can be used in the same way as a built-in custom symbol. + +*Please note*: Custom symbols can not be used in auto-legends yet. + +.. GENERATED FROM PYTHON SOURCE LINES 23-53 + + + +.. image-sg:: /gallery/symbols/images/sphx_glr_custom_symbols_001.png + :alt: custom symbols + :srcset: /gallery/symbols/images/sphx_glr_custom_symbols_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.basemap(region=[0, 8, 0, 3], projection="X12c/4c", frame=True) + + # Define pen and fontstyle for annotations + pen = "1p,black" + font = "15p,Helvetica-Bold" + + # Use the volcano symbol with a size of 1.5c, fill color is set to "seagreen" + fig.plot(x=1, y=1.25, style="kvolcano/1.5c", pen=pen, fill="seagreen") + fig.text(x=1, y=2.5, text="volcano", font=font) + + # Use the astroid symbol with a size of 1.5c, fill color is set to "red3" + fig.plot(x=2.5, y=1.25, style="kastroid/1.5c", pen=pen, fill="red3") + fig.text(x=2.5, y=2.5, text="astroid", font=font) + + # Use the flash symbol with a size of 1.5c, fill color is set to "darkorange" + fig.plot(x=4, y=1.25, style="kflash/1.5c", pen=pen, fill="darkorange") + fig.text(x=4, y=2.5, text="flash", font=font) + + # Use the star4 symbol with a size of 1.5c, fill color is set to "dodgerblue4" + fig.plot(x=5.5, y=1.25, style="kstar4/1.5c", pen=pen, fill="dodgerblue4") + fig.text(x=5.5, y=2.5, text="star4", font=font) + + # Use the hurricane symbol with a size of 1.5c, fill color is set to "magenta4" + fig.plot(x=7, y=1.25, style="khurricane/1.5c", pen=pen, fill="magenta4") + fig.text(x=7, y=2.5, text="hurricane", font=font) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.147 seconds) + + +.. _sphx_glr_download_gallery_symbols_custom_symbols.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: custom_symbols.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: custom_symbols.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: custom_symbols.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/symbols/datetime_inputs.rst.txt b/v0.14.0/_sources/gallery/symbols/datetime_inputs.rst.txt new file mode 100644 index 00000000000..d1be40ab488 --- /dev/null +++ b/v0.14.0/_sources/gallery/symbols/datetime_inputs.rst.txt @@ -0,0 +1,131 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/symbols/datetime_inputs.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_gallery_symbols_datetime_inputs.py: + + +Datetime inputs +=============== + +Datetime inputs of the following types are supported in PyGMT: + +- :class:`numpy.datetime64` +- :class:`pandas.DatetimeIndex` +- :class:`xarray.DataArray`: datetimes included in an *xarray.DataArray* +- raw datetime strings in + `ISO 8601 format `__ (e.g. + ``"YYYY-MM-DD"``, ``"YYYY-MM-DDTHH"``, and ``"YYYY-MM-DDTHH:MM:SS"``) +- Python built-in :class:`datetime.datetime` and :class:`datetime.date` + +We can pass datetime inputs based on one of the types listed above directly to +the ``x`` and ``y`` parameters of e.g. the :meth:`pygmt.Figure.plot` method. + +The ``region`` parameter has to include the :math:`x` and :math:`y` axis limits +in the form [*date_min*, *date_max*, *ymin*, *ymax*]. Here *date_min* and +*date_max* can be directly defined as datetime input. + +.. GENERATED FROM PYTHON SOURCE LINES 25-70 + + + +.. image-sg:: /gallery/symbols/images/sphx_glr_datetime_inputs_001.png + :alt: datetime inputs + :srcset: /gallery/symbols/images/sphx_glr_datetime_inputs_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import datetime + + import numpy as np + import pandas as pd + import pygmt + import xarray as xr + + fig = pygmt.Figure() + + # create a basemap with limits of 2010-01-01 to 2020-06-01 on the x axis and + # 0 to 10 on the y axis + fig.basemap( + projection="X15c/5c", + region=[datetime.date(2010, 1, 1), datetime.date(2020, 6, 1), 0, 10], + frame=["WSen", "af"], + ) + + # numpy.datetime64 types + x = np.array( + ["2010-06-01", "2011-06-01T12", "2012-01-01T12:34:56"], dtype=np.datetime64 + ) + y = [1, 2, 3] + fig.plot(x=x, y=y, style="c0.4c", pen="1p", fill="red3") + + # pandas.DatetimeIndex + x = pd.date_range("2013", periods=3, freq="YS") + y = [4, 5, 6] + fig.plot(x=x, y=y, style="t0.4c", pen="1p", fill="gold") + + # xarray.DataArray + x = xr.DataArray(data=pd.date_range(start="2015-03", periods=3, freq="QS")) + y = [7.5, 6, 4.5] + fig.plot(x=x, y=y, style="s0.4c", pen="1p") + + # raw datetime strings + x = ["2016-02-01", "2016-06-04T14", "2016-10-04T00:00:15"] + y = [7, 8, 9] + fig.plot(x=x, y=y, style="a0.4c", pen="1p", fill="dodgerblue") + + # the Python built-in datetime and date + x = [datetime.date(2018, 1, 1), datetime.datetime(2019, 6, 1, 20, 5, 45)] + y = [6.5, 4.5] + fig.plot(x=x, y=y, style="i0.4c", pen="1p", fill="seagreen") + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.127 seconds) + + +.. _sphx_glr_download_gallery_symbols_datetime_inputs.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: datetime_inputs.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: datetime_inputs.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: datetime_inputs.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/symbols/multi_parameter_symbols.rst.txt b/v0.14.0/_sources/gallery/symbols/multi_parameter_symbols.rst.txt new file mode 100644 index 00000000000..40c96a26989 --- /dev/null +++ b/v0.14.0/_sources/gallery/symbols/multi_parameter_symbols.rst.txt @@ -0,0 +1,188 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/symbols/multi_parameter_symbols.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_gallery_symbols_multi_parameter_symbols.py: + + +Multi-parameter symbols +======================= + +The :meth:`pygmt.Figure.plot` method can plot individual multi-parameter symbols by +passing the corresponding shortcuts (**e**, **j**, **r**, **R**, **w**) to the ``style`` +parameter: + +- **e**: ellipse +- **j**: rotated rectangle +- **r**: rectangle +- **R**: rounded rectangle +- **w**: pie wedge + +.. GENERATED FROM PYTHON SOURCE LINES 18-20 + +.. code-block:: Python + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 21-38 + +We can plot multi-parameter symbols using the same symbol style. We need to define +locations (lon, lat) via the ``x`` and ``y`` parameters (scalar for a single symbol or +1-D list for several ones) and two or three symbol parameters after those shortcuts +via the ``style`` parameter. + +The multi-parameter symbols in the ``style`` parameter are defined as: + +- **e**: ellipse, ``direction/major_axis/minor_axis`` +- **j**: rotated rectangle, ``direction/width/height`` +- **r**: rectangle, ``width/height`` +- **R**: rounded rectangle, ``width/height/radius`` +- **w**: pie wedge, ``diameter/startdir/stopdir``, the last two arguments are + directions given in degrees counter-clockwise from horizontal. Append **+i** and the + desired value to apply an inner diameter. + +Upper-case versions **E**, **J**, and **W** are similar to **e**, **j**, and **w** +but expect geographic azimuths and distances. + +.. GENERATED FROM PYTHON SOURCE LINES 38-57 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[0, 7, 0, 2], projection="x3c", frame=True) + + # Ellipse + fig.plot(x=0.5, y=1, style="e45/3/1", fill="orange", pen="2p,black") + # Rotated rectangle + fig.plot(x=1.5, y=1, style="j120/5/0.5", fill="red3", pen="2p,black") + # Rectangle + fig.plot(x=3, y=1, style="r4/1.5", fill="dodgerblue", pen="2p,black") + # Rounded rectangle + fig.plot(x=4.5, y=1, style="R1.25/4/0.5", fill="seagreen", pen="2p,black") + # Pie wedge + fig.plot(x=5.5, y=1, style="w2.5/45/330", fill="lightgray", pen="2p,black") + # Ring sector + fig.plot(x=6.5, y=1, style="w2.5/45/330+i1", fill="lightgray", pen="2p,black") + + fig.show() + + + + +.. image-sg:: /gallery/symbols/images/sphx_glr_multi_parameter_symbols_001.png + :alt: multi parameter symbols + :srcset: /gallery/symbols/images/sphx_glr_multi_parameter_symbols_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 58-71 + +We can also plot symbols with varying parameters via defining those values in a 2-D +list or numpy array (``[[parameters]]`` for a single symbol or +``[[parameters_1],[parameters_2],[parameters_i]]`` for several ones) or using an +appropriately formatted input file and passing it to ``data``. + +The symbol parameters in the 2-D list or numpy array are defined as: + +- **e**: ellipse, ``[[lon, lat, direction, major_axis, minor_axis]]`` +- **j**: rotated rectangle, ``[[lon, lat, direction, width, height]]`` +- **r**: rectangle, ``[[lon, lat, width, height]]`` +- **R**: rounded rectangle, ``[[lon, lat, width, height, radius]]`` +- **w**: pie wedge, ``[[lon, lat, diameter, startdir, stopdir]]``, the last two + arguments are directions given in degrees counter-clockwise from horizontal + +.. GENERATED FROM PYTHON SOURCE LINES 71-96 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[0, 7, 0, 4], projection="x3c", frame=["xa1f0.2", "ya0.5f0.1"]) + + # Ellipse + data = [[0.5, 1, 45, 3, 1], [0.5, 3, 135, 2, 1]] + fig.plot(data=data, style="e", fill="orange", pen="2p,black") + # Rotated rectangle + data = [[1.5, 1, 120, 5, 0.5], [1.5, 3, 50, 3, 0.5]] + fig.plot(data=data, style="j", fill="red3", pen="2p,black") + # Rectangle + data = [[3, 1, 4, 1.5], [3, 3, 3, 1.5]] + fig.plot(data=data, style="r", fill="dodgerblue", pen="2p,black") + # Rounded rectangle + data = [[4.5, 1, 1.25, 4, 0.5], [4.5, 3, 1.25, 2.0, 0.2]] + fig.plot(data=data, style="R", fill="seagreen", pen="2p,black") + # Pie wedge + data = [[5.5, 1, 2.5, 45, 330], [5.5, 3, 1.5, 60, 300]] + fig.plot(data=data, style="w", fill="lightgray", pen="2p,black") + # Ring sector + data = [[6.5, 1, 2.5, 45, 330], [6.5, 3, 1.5, 60, 300]] + fig.plot(data=data, style="w+i1", fill="lightgray", pen="2p,black") + + fig.show() + + + + +.. image-sg:: /gallery/symbols/images/sphx_glr_multi_parameter_symbols_002.png + :alt: multi parameter symbols + :srcset: /gallery/symbols/images/sphx_glr_multi_parameter_symbols_002.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.424 seconds) + + +.. _sphx_glr_download_gallery_symbols_multi_parameter_symbols.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: multi_parameter_symbols.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: multi_parameter_symbols.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: multi_parameter_symbols.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/symbols/patterns.rst.txt b/v0.14.0/_sources/gallery/symbols/patterns.rst.txt new file mode 100644 index 00000000000..9dd0d14cc7a --- /dev/null +++ b/v0.14.0/_sources/gallery/symbols/patterns.rst.txt @@ -0,0 +1,130 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/symbols/patterns.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_gallery_symbols_patterns.py: + + +Bit and hachure patterns +======================== + +In addition to colors, PyGMT also allows using bit and hachure patterns to fill +symbols, polygons, and other areas, via the ``fill`` parameter or similar parameters. + +Example method parameters that support bit and hachure patterns include: + +- :meth:`pygmt.Figure.coast`: Land and water masses via ``land`` and ``water`` +- :meth:`pygmt.Figure.histogram`: Histogram bars via ``fill`` +- :meth:`pygmt.Figure.meca`: Focal mechanisms via ``compressionfill`` and + ``extensionfill`` +- :meth:`pygmt.Figure.plot`: Symbols and polygons via ``fill`` +- :meth:`pygmt.Figure.rose`: Histogram sectors via ``fill`` +- :meth:`pygmt.Figure.solar`: Day-light terminators via ``fill`` +- :meth:`pygmt.Figure.ternary`: Symbols via ``fill`` +- :meth:`pygmt.Figure.velo`: Uncertainty wedges and velocity error ellipses via + ``uncertaintyfill`` +- :meth:`pygmt.Figure.wiggle`: Anomalies via ``fillpositive`` and ``fillnegative`` + +GMT provides 90 predefined patterns that can be used in PyGMT. The patterns are numbered +from 1 to 90, and can be colored and inverted. The resolution of the pattern +can be changed, and the background and foreground colors can be set. For a complete list +of available patterns and the full syntax to specify a pattern, refer to the +:doc:`/techref/patterns`. + +.. GENERATED FROM PYTHON SOURCE LINES 30-68 + + + +.. image-sg:: /gallery/symbols/images/sphx_glr_patterns_001.png + :alt: patterns + :srcset: /gallery/symbols/images/sphx_glr_patterns_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + # A list of patterns that will be demonstrated. + # To use a pattern as fill append "p" and the number of the desired pattern. + # By default, the pattern is plotted in black and white with a resolution of 300 dpi. + patterns = [ + # Plot a hachted pattern via pattern number 8 + "p8", + # Plot a dotted pattern via pattern number 19 + "p19", + # Set the background color ("+b") to "red3" and the foreground color ("+f") to + # "lightgray" + "p19+bred3+flightbrown", + # Invert the pattern by using a capitalized "P" + "P19+bred3+flightbrown", + # Change the resolution ("+r") to 100 dpi + "p19+bred3+flightbrown+r100", + # Make the background transparent by not giving a color after "+b"; + # works analogous for the foreground + "p19+b+flightbrown+r100", + ] + + fig = pygmt.Figure() + fig.basemap( + region=[0, 10, 0, 12], + projection="X10c", + frame="rlbt+glightgray+tBit and Hachure Patterns", + ) + + y = 11 + for pattern in patterns: + # Plot a square with the pattern as fill. + # The square has a size of 2 centimeters with a 1 point thick, black outline. + fig.plot(x=2, y=y, style="s2c", pen="1p,black", fill=pattern) + # Add a description of the pattern. + fig.text(x=4, y=y, text=pattern, font="Courier-Bold", justify="ML") + y -= 2 + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.185 seconds) + + +.. _sphx_glr_download_gallery_symbols_patterns.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: patterns.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: patterns.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: patterns.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/symbols/points.rst.txt b/v0.14.0/_sources/gallery/symbols/points.rst.txt new file mode 100644 index 00000000000..2aa27b2ca47 --- /dev/null +++ b/v0.14.0/_sources/gallery/symbols/points.rst.txt @@ -0,0 +1,89 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/symbols/points.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_gallery_symbols_points.py: + + +Points +====== + +The :meth:`pygmt.Figure.plot` method can plot data points. The symbol and +size are set with the ``style`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 10-27 + + + +.. image-sg:: /gallery/symbols/images/sphx_glr_points_001.png + :alt: points + :srcset: /gallery/symbols/images/sphx_glr_points_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Generate a random set of points to plot + rng = np.random.default_rng(seed=42) + region = [150, 240, -10, 60] + x = rng.uniform(low=region[0], high=region[1], size=100) + y = rng.uniform(low=region[2], high=region[3], size=100) + + + fig = pygmt.Figure() + # Create a 15 cm x 15 cm basemap with a Cartesian projection (X) using the + # data region + fig.basemap(region=region, projection="X15c", frame=True) + # Plot using inverted triangles (i) of 0.5 cm size + fig.plot(x=x, y=y, style="i0.5c", fill="black") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.165 seconds) + + +.. _sphx_glr_download_gallery_symbols_points.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: points.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: points.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: points.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/symbols/points_categorical.rst.txt b/v0.14.0/_sources/gallery/symbols/points_categorical.rst.txt new file mode 100644 index 00000000000..e7d3a4f577f --- /dev/null +++ b/v0.14.0/_sources/gallery/symbols/points_categorical.rst.txt @@ -0,0 +1,160 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/symbols/points_categorical.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_gallery_symbols_points_categorical.py: + + +Color points by categories +========================== + +The :meth:`pygmt.Figure.plot` method can be used to plot symbols which are +color-coded by categories. In the example below, we show how the +`Palmer Penguins dataset `__ +can be visualized. Here, we can pass the individual categories included in +the "species" column directly to the ``fill`` parameter via +``fill=df.species.cat.codes.astype(int)``. Additionally, we have to set +``cmap=True``. A desired colormap can be selected via the :func:`pygmt.makecpt` +function. + +.. GENERATED FROM PYTHON SOURCE LINES 16-98 + + + +.. image-sg:: /gallery/symbols/images/sphx_glr_points_categorical_001.png + :alt: points categorical + :srcset: /gallery/symbols/images/sphx_glr_points_categorical_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pandas as pd + import pygmt + + # Load sample penguins data + df = pd.read_csv("https://github.com/mwaskom/seaborn-data/raw/master/penguins.csv") + + # Convert 'species' column to categorical dtype + # By default, pandas sorts the individual categories in an alphabetical order. + # For a non-alphabetical order, you have to manually adjust the list of + # categories. For handling and manipulating categorical data in pandas, + # have a look at: + # https://pandas.pydata.org/docs/user_guide/categorical.html + df.species = df.species.astype(dtype="category") + + # Make a list of the individual categories of the 'species' column + # ['Adelie', 'Chinstrap', 'Gentoo'] + # They are (corresponding to the categorical number code) by default in + # alphabetical order and later used for the colorbar annotations + cb_annots = list(df.species.cat.categories) + + # Use pygmt.info to get region bounds (xmin, xmax, ymin, ymax) + # The below example will return a numpy array like [30.0, 60.0, 12.0, 22.0] + region = pygmt.info( + data=df[["bill_length_mm", "bill_depth_mm"]], # x and y columns + per_column=True, # Report the min/max values per column as a numpy array + # Round the min/max values of the first two columns to the nearest multiple + # of 3 and 2, respectively + spacing=(3, 2), + ) + + # Make a 2-D categorical scatter plot, coloring each of the 3 species + # differently + fig = pygmt.Figure() + + # Generate a basemap of 10 cm x 10 cm size + fig.basemap( + region=region, + projection="X10c/10c", + frame=[ + "xafg+lBill length (mm)", + "yafg+lBill depth (mm)", + "WSen+tPenguin size at Palmer Station", + ], + ) + + # Define a colormap for three categories, define the range of the + # new discrete CPT using series=(lowest_value, highest_value, interval), + # use color_model="+cAdelie,Chinstrap,Gentoo" to write the discrete color + # palette "inferno" in categorical format and add the species names as + # annotations for the colorbar + pygmt.makecpt( + cmap="inferno", + # Use the minimum and maximum of the categorical number code + # to set the lowest_value and the highest_value of the CPT + series=(df.species.cat.codes.min(), df.species.cat.codes.max(), 1), + # Convert ['Adelie', 'Chinstrap', 'Gentoo'] to 'Adelie,Chinstrap,Gentoo' + color_model="+c" + ",".join(cb_annots), + ) + + fig.plot( + # Use bill length and bill depth as x and y data input, respectively + x=df.bill_length_mm, + y=df.bill_depth_mm, + # Vary symbol size according to the body mass, scaled by 7.5e-5 + size=df.body_mass_g * 7.5e-5, + # Points colored by categorical number code (refers to the species) + fill=df.species.cat.codes.astype(int), + # Use colormap created by makecpt + cmap=True, + # Do not clip symbols that fall close to the plot bounds + no_clip=True, + # Use circles as symbols (the first "c") with diameter in + # centimeters (the second "c") + style="cc", + # Set transparency level for all symbols to deal with overplotting + transparency=40, + ) + + # Add colorbar legend + fig.colorbar() + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.350 seconds) + + +.. _sphx_glr_download_gallery_symbols_points_categorical.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: points_categorical.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: points_categorical.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: points_categorical.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/symbols/points_transparency.rst.txt b/v0.14.0/_sources/gallery/symbols/points_transparency.rst.txt new file mode 100644 index 00000000000..2e526acff57 --- /dev/null +++ b/v0.14.0/_sources/gallery/symbols/points_transparency.rst.txt @@ -0,0 +1,89 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/symbols/points_transparency.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_gallery_symbols_points_transparency.py: + + +Points with varying transparency +================================ + +Points can be plotted with different transparency levels by passing in an array +argument to the ``transparency`` parameter of :meth:`pygmt.Figure.plot`. + +.. GENERATED FROM PYTHON SOURCE LINES 10-27 + + + +.. image-sg:: /gallery/symbols/images/sphx_glr_points_transparency_001.png + :alt: points transparency + :srcset: /gallery/symbols/images/sphx_glr_points_transparency_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # prepare the input x and y data + x = np.arange(0, 105, 5) + y = np.ones(x.size) + # transparency level in percentage from 0 (i.e., opaque) to 100 + transparency = x + + fig = pygmt.Figure() + fig.basemap( + region=[-5, 105, 0, 2], + frame=["xaf+lTransparency level+u%", "WSrt"], + projection="X15c/6c", + ) + fig.plot(x=x, y=y, style="c0.6c", fill="blue", pen="1p,red", transparency=transparency) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.176 seconds) + + +.. _sphx_glr_download_gallery_symbols_points_transparency.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: points_transparency.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: points_transparency.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: points_transparency.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/symbols/scatter.rst.txt b/v0.14.0/_sources/gallery/symbols/scatter.rst.txt new file mode 100644 index 00000000000..726e5cc923f --- /dev/null +++ b/v0.14.0/_sources/gallery/symbols/scatter.rst.txt @@ -0,0 +1,109 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/symbols/scatter.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_gallery_symbols_scatter.py: + + +Scatter plots with a legend +=========================== + +To create a scatter plot with a legend one may use a loop and create one +scatter plot per item to appear in the legend and set the label accordingly. + +Modified from the matplotlib example: +https://matplotlib.org/stable/gallery/lines_bars_and_markers/scatter_with_legend.html + +.. GENERATED FROM PYTHON SOURCE LINES 13-47 + + + +.. image-sg:: /gallery/symbols/images/sphx_glr_scatter_001.png + :alt: scatter + :srcset: /gallery/symbols/images/sphx_glr_scatter_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + rng = np.random.default_rng(seed=19680801) + n = 200 # number of random data points + + fig = pygmt.Figure() + fig.basemap( + region=[-1, 1, -1, 1], + projection="X10c/10c", + frame=["xa0.5fg", "ya0.5fg", "WSrt"], + ) + for fill in ["gray73", "darkorange", "slateblue"]: + # Generate standard normal distributions centered on 0 + # with standard deviations of 1 + x = rng.normal(loc=0, scale=0.5, size=n) # random x data + y = rng.normal(loc=0, scale=0.5, size=n) # random y data + size = rng.normal(loc=0, scale=0.5, size=n) * 0.5 # random size, in cm + + # plot data points as circles (style="c"), with different sizes + fig.plot( + x=x, + y=y, + style="c", + size=size, + fill=fill, + # Set the legend label, + # and set the symbol size to be 0.25 cm (+S0.25c) in legend + label=f"{fill}+S0.25c", + transparency=50, # set transparency level for all symbols + ) + + fig.legend(transparency=30) # set transparency level for legends + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.237 seconds) + + +.. _sphx_glr_download_gallery_symbols_scatter.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: scatter.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: scatter.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: scatter.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/gallery/symbols/sg_execution_times.rst.txt b/v0.14.0/_sources/gallery/symbols/sg_execution_times.rst.txt new file mode 100644 index 00000000000..b8415a72e3d --- /dev/null +++ b/v0.14.0/_sources/gallery/symbols/sg_execution_times.rst.txt @@ -0,0 +1,67 @@ + +:orphan: + +.. _sphx_glr_gallery_symbols_sg_execution_times: + + +Computation times +================= +**00:02.346** total execution time for 11 files **from gallery/symbols**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_gallery_symbols_multi_parameter_symbols.py` (``multi_parameter_symbols.py``) + - 00:00.424 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_points_categorical.py` (``points_categorical.py``) + - 00:00.350 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_scatter.py` (``scatter.py``) + - 00:00.237 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_bars.py` (``bars.py``) + - 00:00.216 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_patterns.py` (``patterns.py``) + - 00:00.185 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_basic_symbols.py` (``basic_symbols.py``) + - 00:00.184 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_points_transparency.py` (``points_transparency.py``) + - 00:00.176 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_points.py` (``points.py``) + - 00:00.165 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_custom_symbols.py` (``custom_symbols.py``) + - 00:00.147 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_text_symbols.py` (``text_symbols.py``) + - 00:00.135 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_datetime_inputs.py` (``datetime_inputs.py``) + - 00:00.127 + - 0.0 diff --git a/v0.14.0/_sources/gallery/symbols/text_symbols.rst.txt b/v0.14.0/_sources/gallery/symbols/text_symbols.rst.txt new file mode 100644 index 00000000000..83e8bf30436 --- /dev/null +++ b/v0.14.0/_sources/gallery/symbols/text_symbols.rst.txt @@ -0,0 +1,104 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "gallery/symbols/text_symbols.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_gallery_symbols_text_symbols.py: + + +Text symbols +============ + +The :meth:`pygmt.Figure.plot` method allows to plot text symbols. Text is normally +placed with the :meth:`pygmt.Figure.text` method but there are times we wish to treat a +character or even a string as a plottable symbol. A text symbol can be drawn by passing +**l**\ *size*\ **+t**\ *string* to the ``style`` parameter where *size* defines the size +of the text symbol (note: the size is only approximate; no individual scaling is done +for different characters) and *string* can be a letter or a text string (less than 256 +characters). Optionally, you can append **+f**\ *font,outlinecolor* to select a +particular font [Default is :gmt-term:`FONT_ANNOT_PRIMARY`] and outline color [Default +is black] as well as **+j**\ *justify* to change the justification [Default is CM]. For +all supported fonts see :doc:`/techref/fonts`. The fill color of the text symbols can be +set with the ``fill`` parameter, and the outline width can be customized with the +``pen`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 20-42 + + + +.. image-sg:: /gallery/symbols/images/sphx_glr_text_symbols_001.png + :alt: text symbols + :srcset: /gallery/symbols/images/sphx_glr_text_symbols_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + + fig.basemap(region=[0, 8, 0, 3], projection="X12c/4c", frame=True) + + pen = "1.5p" + # plot an uppercase "A" of size 3.5c, color fill is set to "dodgerblue3" + fig.plot(x=1, y=1.5, style="l3.5c+tA", fill="dodgerblue3", pen=pen) + # plot an "asterisk" of size 3.5c, color fill is set to "red3" + fig.plot(x=2.5, y=1, style="l3.5c+t*", fill="red3", pen=pen) + # plot an uppercase "Z" of size 3.5c and use the "Courier-Bold" font, + # color fill is set to "seagreen" + fig.plot(x=4, y=1.5, style="l3.5c+tZ+fCourier-Bold", fill="seagreen", pen=pen) + # plot a lowercase "s" of size 3.5c and use the "Times-Italic" font, + # color fill is set to "gold" + fig.plot(x=5.5, y=1.5, style="l3.5c+ts+fTimes-Italic", fill="gold", pen=pen) + # plot the pi symbol of size 3.5c, the outline color of the symbol is set to + # "darkorange", the color fill is set to "magenta4" + fig.plot(x=7, y=1.5, style="l3.5c+tπ+fdarkorange", fill="magenta4", pen=pen) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.135 seconds) + + +.. _sphx_glr_download_gallery_symbols_text_symbols.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: text_symbols.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: text_symbols.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: text_symbols.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/index.md.txt b/v0.14.0/_sources/index.md.txt new file mode 100644 index 00000000000..d04a4353182 --- /dev/null +++ b/v0.14.0/_sources/index.md.txt @@ -0,0 +1,59 @@ +```{title} Home +``` + + + +```{include} ../README.md +:start-after: +:end-before: +:relative-images: +``` + +```{toctree} +:maxdepth: 2 +:hidden: +:caption: Getting Started + +overview.md +install.md +intro/index.rst +``` + +```{toctree} +:maxdepth: 2 +:hidden: +:caption: User Guide + +tutorials/index.rst +gallery/index.rst +projections/index.rst +external_resources.md +``` + +```{toctree} +:maxdepth: 2 +:hidden: +:caption: Reference Documentation + +api/index.rst +techref/index.md +changes.md +minversions.md +ecosystem.md +``` + +```{toctree} +:maxdepth: 2 +:hidden: +:caption: Development + +team.md +contributing.md +maintenance.md +``` diff --git a/v0.14.0/_sources/install.md.txt b/v0.14.0/_sources/install.md.txt new file mode 100644 index 00000000000..55d2290295f --- /dev/null +++ b/v0.14.0/_sources/install.md.txt @@ -0,0 +1,328 @@ +--- +file_format: mystnb +--- + +# Installing + +## Quickstart + +The fastest way to install PyGMT is with the [mamba](https://mamba.readthedocs.io/en/latest/) +or [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/index.html) +package manager which takes care of setting up a virtual environment, as well as the +installation of GMT and all the dependencies PyGMT depends on: + +:::: {tab-set} +::: {tab-item} mamba +:sync: mamba +``` +mamba create --name pygmt --channel conda-forge pygmt +``` +::: + +::: {tab-item} conda +:sync: conda +``` +conda create --name pygmt --channel conda-forge pygmt +``` +::: +:::: + +To activate the virtual environment, you can do: + +:::: {tab-set} +::: {tab-item} mamba +:sync: mamba +``` +mamba activate pygmt +``` +::: + +::: {tab-item} conda +:sync: conda +``` +conda activate pygmt +``` +::: +:::: + +After this, check that everything works by running the following in a Python interpreter +(e.g., in a Jupyter notebook): + +```{code-cell} ipython +--- +tags: [hide-output] +--- + +import pygmt +pygmt.show_versions() +``` + +You are now ready to make your first figure! Start by looking at our [Intro](intro/index.rst), +[Tutorials](tutorials/index.rst), and [Gallery](gallery/index.rst). Good luck! + +:::{note} +The sections below provide more detailed, step by step instructions to install and test +PyGMT for those who may have a slightly different setup or want to install the latest +development version. +::: + +## Which Python? + +PyGMT is tested to run on Python {{ requires.python }}. + +We recommend using the [Miniforge](https://github.com/conda-forge/miniforge#miniforge3) +Python distribution to ensure you have all dependencies installed and +the [mamba](https://mamba.readthedocs.io/en/stable/user_guide/mamba.html) package manager +in the base environment. Installing Miniforge does not require administrative rights to +your computer and doesn't interfere with any other Python installations on your system. + +## Which GMT? + +PyGMT requires Generic Mapping Tools (GMT) {{ requires.gmt }} since there are many +changes being made to GMT itself in response to the development of PyGMT. + +Compiled conda packages of GMT for Linux, macOS and Windows are provided through +[conda-forge](https://anaconda.org/conda-forge/gmt). Advanced users can also +[build GMT from source](https://github.com/GenericMappingTools/gmt/blob/master/BUILDING.md) +instead. + +We recommend following the instructions further on to install GMT 6. + +## Dependencies + +PyGMT requires the following packages to be installed: + +- [NumPy](https://numpy.org) +- [pandas](https://pandas.pydata.org) +- [Xarray](https://xarray.dev/) +- [netCDF4](https://unidata.github.io/netcdf4-python) +- [packaging](https://packaging.pypa.io) + +:::{note} +For the minimum supported versions of the dependencies, please see [](minversions.md). +::: + +:::{note} +Some optional dependencies (e.g., [IPython](https://ipython.readthedocs.io/en/stable/), +[GeoPandas](https://geopandas.org/en/stable/)) add more functionality to PyGMT. +For a complete list of the optional dependencies, refer to [](ecosystem.md). +::: + +## Installing GMT and other dependencies + +Before installing PyGMT, we must install GMT itself along with the other dependencies. +The easiest way to do this is via the `mamba` or `conda` package manager. We recommend +working in an isolated +[virtual environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) +to avoid issues with conflicting versions of dependencies. + +First, we must configure conda to get packages from the [conda-forge channel](https://conda-forge.org/): +``` +conda config --prepend channels conda-forge +``` + +Now we can create a new virtual environment with Python and all our dependencies +installed (we'll call it `pygmt` but feel free to change it to whatever you want): + +:::: {tab-set} +::: {tab-item} mamba +:sync: mamba +``` +mamba create --name pygmt python=3.13 numpy pandas xarray netcdf4 packaging gmt +``` +::: + +::: {tab-item} conda +:sync: conda +``` +conda create --name pygmt python=3.13 numpy pandas xarray netcdf4 packaging gmt +``` +::: +:::: + +Activate the environment by running the following (**do not forget this step!**): + +:::: {tab-set} +::: {tab-item} mamba +:sync: mamba +``` +mamba activate pygmt +``` +::: + +::: {tab-item} conda +:sync: conda +``` +conda activate pygmt +``` +::: +:::: + +From now on, all commands will take place inside the virtual environment called `pygmt` +and won't affect your default `base` installation. + +::::: {tip} +You can also enable more PyGMT functionalities by installing PyGMT's optional +dependencies in the environment. +:::: {tab-set} +::: {tab-item} mamba +:sync: mamba +``` +mamba install contextily geopandas ipython pyarrow-core rioxarray +``` +::: + +::: {tab-item} conda +:sync: conda +``` +conda install contextily geopandas ipython pyarrow-core rioxarray +``` +::: +:::: +::::: + +## Installing PyGMT + +Now that you have GMT installed and your virtual environment activated, you can install +PyGMT using any of the following methods. + +### Using mamba/conda (recommended) + +This installs the latest stable release of PyGMT from [conda-forge](https://anaconda.org/conda-forge/pygmt): + +:::: {tab-set} +::: {tab-item} mamba +:sync: mamba +``` +mamba install pygmt +``` +::: + +::: {tab-item} conda +:sync: conda +``` +conda install pygmt +``` +::: +:::: + +This upgrades the installed PyGMT version to be the latest stable release: + +:::: {tab-set} +::: {tab-item} mamba +:sync: mamba +``` +mamba update pygmt +``` +::: + +::: {tab-item} conda +:sync: conda +``` +conda update pygmt +``` +::: +:::: + +### Using pip + +This installs the latest stable release from [PyPI](https://pypi.org/project/pygmt): +``` +python -m pip install pygmt +``` + +::: {tip} +You can also run `python -m pip install pygmt[all]` to install PyGMT with all of its +optional dependencies. +::: + +Alternatively, you can install the latest development version from +[TestPyPI](https://test.pypi.org/project/pygmt): +``` +python -m pip install --pre --extra-index-url https://test.pypi.org/simple/ pygmt +``` + +To upgrade the installed stable release or development version to be the latest one, +just add `--upgrade` to the corresponding command above. + +Any of the above methods (mamba/conda/pip) should allow you to use the PyGMT package +from Python. + +## Testing your install + +To ensure that PyGMT and its dependencies are installed correctly, run the following +in your Python interpreter: + +```{code-cell} ipython +--- +tags: [hide-output] +--- + +import pygmt +pygmt.show_versions() +``` + +```{code-cell} ipython +fig = pygmt.Figure() +fig.coast(projection="N15c", region="g", frame=True, land="tan", water="lightblue") +fig.text(position="MC", text="PyGMT", font="80p,Helvetica-Bold,red@75") +fig.show() +``` + +You should see a global map with land and water masses colored in tan and lightblue +respectively. On top, there should be the semi-transparent text "PyGMT". If the +semi-transparency does not show up, there is probably an incompatibility between your +GMT and Ghostscript versions. For details, please run `pygmt.show_versions()` and see +[Not working transparency](#not-working-transparency). + +## Common installation issues + +If you have any issues with the installation, please check out the following common +problems and solutions. + +### "Error loading GMT shared library at ..." + +Sometimes, PyGMT will be unable to find the correct version of the GMT shared library +(`libgmt`). This can happen if you have multiple versions of GMT installed. + +You can tell PyGMT exactly where to look for `libgmt` by setting the environment +variable {term}`GMT_LIBRARY_PATH` to the directory where `libgmt.so`, `libgmt.dylib` or +`gmt.dll` can be found on Linux, macOS or Windows, respectively. + +For Linux/macOS, add the following line to your shell configuration file (usually +`~/.bashrc` for Bash on Linux and `~/.zshrc` for Zsh on macOS): +``` +export GMT_LIBRARY_PATH=$HOME/miniforge3/envs/pygmt/lib +``` + +For Windows, add the environment variable {term}`GMT_LIBRARY_PATH` following these +[instructions](https://www.wikihow.com/Create-an-Environment-Variable-in-Windows-10) +and set its value to a path like: +``` +C:\Users\USERNAME\Miniforge3\envs\pygmt\Library\bin\ +``` + +### `ModuleNotFoundError` in Jupyter notebook environment + +If you can successfully import PyGMT in a Python interpreter or IPython, but get a +`ModuleNotFoundError` when importing PyGMT in Jupyter, you may need to activate your +`pygmt` virtual environment (using `mamba activate pygmt` or `conda activate pygmt`) +and install a `pygmt` kernel following the commands below: +``` +python -m ipykernel install --user --name pygmt # install virtual environment properly +jupyter kernelspec list --json +``` + +After that, you need to restart Jupyter, open your notebook, select the `pygmt` kernel +and then import pygmt. + + +### Not working transparency + +It is known that some combinations of GMT and Ghostscript versions cause issues, +especially regarding transparency. If the transparency doesn't work in your figures, +please check your GMT and Ghostscript versions (you can run `pygmt.show_versions()`). +We recommend: + +- Ghostscript 9.53-9.56 for GMT 6.4.0 (or below) +- Ghostscript 10.03 or later for GMT 6.5.0 diff --git a/v0.14.0/_sources/intro/01_first_figure.rst.txt b/v0.14.0/_sources/intro/01_first_figure.rst.txt new file mode 100644 index 00000000000..8cf594691a9 --- /dev/null +++ b/v0.14.0/_sources/intro/01_first_figure.rst.txt @@ -0,0 +1,357 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "intro/01_first_figure.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_intro_01_first_figure.py: + + +1. Making your first figure +=========================== + +This tutorial covers the basics of creating a figure using PyGMT - a +Python wrapper for the Generic Mapping Tools (GMT). It will only use +the :meth:`pygmt.Figure.coast` method for plotting. Later tutorials will +address other PyGMT methods. + +.. GENERATED FROM PYTHON SOURCE LINES 12-17 + +Loading the library +------------------- + +The first step is to import :mod:`pygmt`. All methods and figure generation +are accessible from the :mod:`pygmt` top level package. + +.. GENERATED FROM PYTHON SOURCE LINES 17-20 + +.. code-block:: Python + + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 21-26 + +Creating a figure +----------------- + +All figure generation in PyGMT is handled by the :class:`pygmt.Figure` class. +Start a new figure by creating an instance of this class: + +.. GENERATED FROM PYTHON SOURCE LINES 26-29 + +.. code-block:: Python + + + fig = pygmt.Figure() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 30-51 + +To add elements to the figure instance or object (``fig`` in this example) +different methods can be called on it. This example will use the +:meth:`pygmt.Figure.coast` method, which can be used to create a map without +any other methods or external data. The :meth:`pygmt.Figure.coast` +method plots the coastlines, borders, and bodies of water using a database +that is included in GMT. + +First, a region for the figure must be selected. This example will plot some +of the coast of Maine in the northeastern US. A Python list can be passed to +the ``region`` parameter with the minimum and maximum X-values (longitude) +and the minimum and maximum Y-values (latitude). For this example, the +minimum (bottom left) coordinates are (N43.75, W69) and the maximum (top +right) coordinates are (N44.75, W68). Negative values can be passed for +latitudes in the southern hemisphere or longitudes in the western hemisphere. + +In addition to the region, an argument needs to be passed to +:meth:`pygmt.Figure.coast` to tell it what to plot. In this example, +:meth:`pygmt.Figure.coast` will be told to plot the shorelines by passing the +Boolean value ``True`` to the ``shorelines`` parameter. The ``shorelines`` +parameter has other options for finer control, but setting it to ``True`` +uses the default values. + +.. GENERATED FROM PYTHON SOURCE LINES 51-54 + +.. code-block:: Python + + + fig.coast(region=[-69, -68, 43.75, 44.75], shorelines=True) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 55-56 + +To see the figure, call :meth:`pygmt.Figure.show`. + +.. GENERATED FROM PYTHON SOURCE LINES 56-60 + +.. code-block:: Python + + + fig.show() + + + + + +.. image-sg:: /intro/images/sphx_glr_01_first_figure_001.png + :alt: 01 first figure + :srcset: /intro/images/sphx_glr_01_first_figure_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 61-73 + +Color the land and water +------------------------ + +This figure plots all of the coastlines in the given region, but it does not +indicate where the land and water are. Color values can be passed to ``land`` +and ``water`` to set the colors on the figure. + +When plotting colors in PyGMT, there are multiple +:gmt-docs:`color codes `, that can be used. This includes +standard GMT color names (like ``"skyblue"``), R/G/B levels (like +``"0/0/255"``), a hex value (like ``"#333333"``), or a gray level (like +``"gray50"``). For this example, GMT color names are used. + +.. GENERATED FROM PYTHON SOURCE LINES 73-84 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + region=[-69, -68, 43.75, 44.75], + shorelines=True, + land="lightgreen", + water="lightblue", + ) + fig.show() + + + + + +.. image-sg:: /intro/images/sphx_glr_01_first_figure_002.png + :alt: 01 first figure + :srcset: /intro/images/sphx_glr_01_first_figure_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 85-101 + +Set the projection +------------------ + +This figure now has its colors set. By default the projection and size +of the map is set to ``"Q15c+du"``. Here, ``"Q"`` defines a +cylindrical equidistant map projection, ``"15c+du"`` means setting +the maximum (upper) map dimension to 15 cm. However, both of +these values can be customized according to the requirements using +the ``projection`` parameter. + +The appropriate projection varies for the type of map. The available +projections are explained in the :doc:`projection ` +gallery. For this example, the Mercator projection is set using ``"M"``. +The width of the figure will be 10 centimeters, as set by ``"10c"``. +The map size can also be set in inches using "i" (e.g. a 5-inch wide +Mercator projection would use ``"M5i"``). + +.. GENERATED FROM PYTHON SOURCE LINES 101-113 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + region=[-69, -68, 43.75, 44.75], + shorelines=True, + land="lightgreen", + water="lightblue", + projection="M10c", + ) + fig.show() + + + + + +.. image-sg:: /intro/images/sphx_glr_01_first_figure_003.png + :alt: 01 first figure + :srcset: /intro/images/sphx_glr_01_first_figure_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 114-123 + +Add a frame +----------- + +While the map's colors, projection, and size have been set, the region +that is being displayed is not apparent. A frame can be added to +annotate the latitude and longitude of the region. + +The ``frame`` parameter is used to add a frame to the figure. For now, it +will be set to ``"a"`` to **a**\ nnotate the axes automatically. + +.. GENERATED FROM PYTHON SOURCE LINES 123-136 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + region=[-69, -68, 43.75, 44.75], + shorelines=True, + land="lightgreen", + water="lightblue", + projection="M10c", + frame="a", + ) + fig.show() + + + + + +.. image-sg:: /intro/images/sphx_glr_01_first_figure_004.png + :alt: 01 first figure + :srcset: /intro/images/sphx_glr_01_first_figure_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 137-147 + +Add a title +----------- + +The ``frame`` parameter can be used to add a title to the figure. The title +is set by passing ``"+t"`` followed by the title (e.g. setting the map +title to "Title" would be ``"+tTitle"``). + +To pass multiple arguments to ``frame``, a list can be used, as shown in the +example below. This format uses ``frame`` to set both the axes annotations +and the figure title. + +.. GENERATED FROM PYTHON SOURCE LINES 147-160 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + region=[-69, -68, 43.75, 44.75], + shorelines=True, + land="lightgreen", + water="lightblue", + projection="M10c", + frame=["a", "+tMaine"], + ) + fig.show() + + + + + +.. image-sg:: /intro/images/sphx_glr_01_first_figure_005.png + :alt: 01 first figure + :srcset: /intro/images/sphx_glr_01_first_figure_005.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 161-179 + +Additional exercises +-------------------- + +This is the end of the first tutorial. Here are some additional exercises +for the concepts that were discussed: + +1. Make a map of Germany using its ISO country code ("DE"). Pass the ISO + code as a Python string to the ``region`` parameter. + +2. Change the color of the landmass to "khaki" and the water to "azure". + +3. Change the color of the lakes (using the ``lakes`` parameter) to "red". + +4. Create a global map. Set the region to "d" to center the map at the Prime + Meridian or "g" to center the map at the International Date Line. When the + region is set without using a list full of integers or floating numbers, + the argument needs to be passed as a Python string. Create a map with a + width of 15 centimeters using the Mollweide ("W") projection. + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.055 seconds) + + +.. _sphx_glr_download_intro_01_first_figure.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: 01_first_figure.ipynb <01_first_figure.ipynb>` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: 01_first_figure.py <01_first_figure.py>` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: 01_first_figure.zip <01_first_figure.zip>` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/intro/02_contour_map.rst.txt b/v0.14.0/_sources/intro/02_contour_map.rst.txt new file mode 100644 index 00000000000..dd5aa15d1fd --- /dev/null +++ b/v0.14.0/_sources/intro/02_contour_map.rst.txt @@ -0,0 +1,276 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "intro/02_contour_map.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_intro_02_contour_map.py: + + +2. Create a contour map +======================= + +This tutorial page covers the basics of creating a figure of the Earth relief, using a +remote dataset hosted by GMT, using the method :meth:`pygmt.datasets.load_earth_relief`. +It will use the :meth:`pygmt.Figure.grdimage`, :meth:`pygmt.Figure.grdcontour`, +:meth:`pygmt.Figure.colorbar`, and :meth:`pygmt.Figure.coast` methods for plotting. + +.. GENERATED FROM PYTHON SOURCE LINES 12-14 + +.. code-block:: Python + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 15-24 + +Loading the Earth relief dataset +-------------------------------- + +The first step is to use :meth:`pygmt.datasets.load_earth_relief`. The ``resolution`` +parameter sets the resolution of the remote grid file, which will affect the +resolution of the plot made later in the tutorial. The ``registration`` parameter +determines the grid registration. + +This grid region covers the islands of Guam and Rota in the western Pacific Ocean. + +.. GENERATED FROM PYTHON SOURCE LINES 24-30 + +.. code-block:: Python + + + grid = pygmt.datasets.load_earth_relief( + resolution="30s", region=[144.5, 145.5, 13, 14.5], registration="gridline" + ) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 31-44 + +Plotting Earth relief +--------------------- + +To plot Earth relief data, the method :meth:`pygmt.Figure.grdimage` can be used to +plot a color-coded figure to display the topography and bathymetry in the grid file. +The ``grid`` parameter accepts the input grid, which in this case is the remote file +downloaded in the previous step. If the ``region`` parameter is not set, the region +boundaries of the input grid are used. + +The ``cmap`` parameter sets the color palette table (CPT) used for portraying the +Earth relief. The :meth:`pygmt.Figure.grdimage` method uses the input grid to relate +the Earth relief values to a specific color within the CPT. In this case, the CPT +"oleron" is used; a full list of CPTs can be found at :gmt-docs:`reference/cpts.html`. + +.. GENERATED FROM PYTHON SOURCE LINES 44-50 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron") + fig.show() + + + + + +.. image-sg:: /intro/images/sphx_glr_02_contour_map_001.png + :alt: 02 contour map + :srcset: /intro/images/sphx_glr_02_contour_map_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 51-65 + +Adding a colorbar +----------------- + +To show how the plotted colors relate to the Earth relief, a colorbar can be added +using the :meth:`pygmt.Figure.colorbar` method. + +To control the annotation and labels on the colorbar, a list is passed to the +``frame`` parameter. The value beginning with ``"a"`` sets the interval for the +annotation on the colorbar, in this case every 1,000 meters. To set the label for an +axis on the colorbar, the argument begins with either ``"x+l"`` (x-axis) or ``"y+l"`` +(y-axis), followed by the intended label. + +By default, the CPT for the colorbar is the same as the one set in +:meth:`pygmt.Figure.grdimage`. + +.. GENERATED FROM PYTHON SOURCE LINES 65-72 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron") + fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"]) + fig.show() + + + + + +.. image-sg:: /intro/images/sphx_glr_02_contour_map_002.png + :alt: 02 contour map + :srcset: /intro/images/sphx_glr_02_contour_map_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 73-86 + +Adding contour lines +-------------------- + +To add contour lines to the color-coded figure, the :meth:`pygmt.Figure.grdcontour` +method is used. The ``frame`` and ``projection`` are already set using +:meth:`pygmt.Figure.grdimage` and are not needed again. However, the same input for +``grid`` (in this case, the variable named "grid") must be input again. The ``levels`` +parameter sets the spacing between adjacent contour lines (in this case, 500 meters). +The ``annotation`` parameter annotates the contour lines corresponding to the given +interval (in this case, 1,000 meters) with the related values, here elevation or +bathymetry. By default, these contour lines are drawn thicker. Optionally, the +appearance (thickness, color, style) of the annotated and the not-annotated contour +lines can be adjusted (separately) by specifying the desired ``pen``. + +.. GENERATED FROM PYTHON SOURCE LINES 86-94 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron") + fig.grdcontour(grid=grid, levels=500, annotation=1000) + fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"]) + fig.show() + + + + + +.. image-sg:: /intro/images/sphx_glr_02_contour_map_003.png + :alt: 02 contour map + :srcset: /intro/images/sphx_glr_02_contour_map_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 95-101 + +Color in land +------------- + +To make it clear where the islands are located, the :meth:`pygmt.Figure.coast` method +can be used to color in the landmasses. The ``land`` is colored in as "lightgray", and +the ``shorelines`` parameter draws a border around the islands. + +.. GENERATED FROM PYTHON SOURCE LINES 101-110 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron") + fig.grdcontour(grid=grid, levels=500, annotation=1000) + fig.coast(shorelines="2p", land="lightgray") + fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"]) + fig.show() + + + + + +.. image-sg:: /intro/images/sphx_glr_02_contour_map_004.png + :alt: 02 contour map + :srcset: /intro/images/sphx_glr_02_contour_map_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 111-132 + +Additional exercises +-------------------- + +This is the end of the second tutorial. Here are some additional exercises for the +concepts that were discussed: + +1. Change the resolution of the grid file to either ``"01m"`` (1 arc-minute, a lower + resolution) or ``"15s"`` (15 arc-seconds, a higher resolution). Note that higher + resolution grids will have larger file sizes. Available resolutions can be found + at :meth:`pygmt.datasets.load_earth_relief`. + +2. Create a contour map of the area around Mt. Rainier. A suggestion for the + ``region`` would be ``[-122, -121, 46.5, 47.5]``. Adjust the + :meth:`pygmt.Figure.grdcontour` and :meth:`pygmt.Figure.colorbar` settings as + needed to make the figure look good. + +3. Create a contour map of São Miguel Island in the Azores; a suggested ``region`` is + ``[-26, -25, 37.5, 38]``. Instead of coloring in ``land``, set ``water`` to + "lightblue" to only display Earth relief information for the land. + +4. Try other CPTs, such as "SCM/fes" or "geo". + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.993 seconds) + + +.. _sphx_glr_download_intro_02_contour_map.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: 02_contour_map.ipynb <02_contour_map.ipynb>` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: 02_contour_map.py <02_contour_map.py>` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: 02_contour_map.zip <02_contour_map.zip>` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/intro/03_figure_element.rst.txt b/v0.14.0/_sources/intro/03_figure_element.rst.txt new file mode 100644 index 00000000000..e103c106232 --- /dev/null +++ b/v0.14.0/_sources/intro/03_figure_element.rst.txt @@ -0,0 +1,149 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "intro/03_figure_element.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_intro_03_figure_element.py: + + +3. Figure elements +================== + +The figure below shows the naming of figure elements in PyGMT. + +- :meth:`pygmt.Figure()`: having a number of plotting methods. Every new + figure must start with the creation of a :meth:`pygmt.Figure()` instance +- ``frame``: setting plot or map boundaries (a combination of the single + letters of **WSNE**, **wsne**, or **lbtr**), adding annotations, ticks, + gridlines (**afg**), axis labels (**+l**), and title (**+t**), e.g., + in :meth:`pygmt.Figure.basemap`. Detailed examples can be found at + :doc:`frame and axes attributes ` +- :meth:`pygmt.Figure.plot`: plotting lines or symbols based on ``pen`` + or ``style`` parameters, respectively +- :meth:`pygmt.Figure.text`: plotting text strings whereby the ``font`` + parameter adjusts fontsize, fontstyle, and color +- :meth:`pygmt.Figure.legend`: showing the naming of lines or symbols while + the ``label`` is given in :meth:`pygmt.Figure.plot` +- :meth:`pygmt.Figure.show`: previewing the content added to the current + figure instance + +.. GENERATED FROM PYTHON SOURCE LINES 25-87 + + + +.. image-sg:: /intro/images/sphx_glr_03_figure_element_001.png + :alt: 03 figure element + :srcset: /intro/images/sphx_glr_03_figure_element_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + + x = range(0, 11, 2) + y_1 = [10, 11, 15, 8, 9, 13] + y_2 = [4, 5, 6, 3, 5, 5] + + fig.basemap( + region=[0, 10, 0, 20], + projection="X10c/8c", + frame=["WStr+tTitle", "xa2f1g2+lxlabel", "ya5f1g5+lylabel"], + ) + fig.plot(x=x, y=y_1, style="t0.3c", label="fig.plot (style)") + fig.plot(x=x, y=y_2, pen="1.5p,red", label="fig.plot (pen)") + + mainexplain = {"font": "12p,2,darkblue", "justify": "TC", "no_clip": True} + minorexplain = {"font": "10p,8", "justify": "TC", "no_clip": True} + # ============ Figure + fig.text(x=12, y=22, text="Figure", **mainexplain) + fig.text(x=12, y=20.8, text="pygmt.Figure()", **minorexplain) + # ============ Title + fig.text(x=7.5, y=22, text='frame="+tTitle"', **minorexplain) + # ============ xlabel + fig.text(x=5, y=-3, text='frame="x+lxlabel"', **minorexplain) + # ============ ylabel + fig.text(x=-1.7, y=10, text='frame="y+lylabel"', angle=90, **minorexplain) + # ============ x-majorticks + fig.plot(x=10, y=-0.2, style="c1c", pen="2p,darkblue", no_clip=True) + fig.text(x=10, y=-1.6, text="Annotation", **mainexplain) + fig.text(x=10, y=-2.8, text='frame="xa2"', **minorexplain) + # ============ y-majorticks + fig.plot(x=-0.2, y=20, style="c1c", pen="2p,darkblue", no_clip=True) + fig.text(x=0, y=23.4, text="Annotation", **mainexplain) + fig.text(x=0, y=22.2, text='frame="ya5"', **minorexplain) + # ============ x-minorticks + fig.plot(x=1, y=-0.2, style="c0.7c", pen="2p,darkblue", no_clip=True) + fig.text(x=1, y=-1.4, text="Frame", **mainexplain) + fig.text(x=1, y=-2.6, text='frame="xf1"', **minorexplain) + # ============ y-minorticks + fig.plot(x=0, y=2, style="c0.7c", pen="2p,darkblue", no_clip=True) + fig.text(x=-1.5, y=1, text='frame="yf1"', **minorexplain) + # ============ Grid + fig.plot(x=2, y=15, style="c0.5c", pen="2p,darkblue") + fig.text(x=2, y=17, text="Grid", **mainexplain) + fig.text(x=2.4, y=18, text='frame=["xg2", "yg5"]', **minorexplain) + # ============ Map Boundaries + fig.plot(x=10, y=9, style="c0.5c", pen="2p,darkblue", no_clip=True) + fig.text(x=11.5, y=8, text="Map Boundary", **mainexplain) + fig.text(x=11.5, y=6.8, text='frame="WStr"', **minorexplain) + # ============ fig.plot (style) + fig.plot(x=6, y=8, style="c0.7c", pen="2p,darkblue") + fig.text(x=7, y=6.5, text="fig.plot(style)", **minorexplain) + # ============ fig.plot (pen) + fig.plot(x=4, y=6, style="c0.7c", pen="2p,darkblue") + fig.text(x=3, y=4.5, text="fig.plot(pen)", **minorexplain) + # ============ Legend + fig.legend() + fig.text(x=8, y=16.9, text="Legend", **mainexplain) + fig.text(x=8, y=15.8, text="fig.legend()", **minorexplain) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.274 seconds) + + +.. _sphx_glr_download_intro_03_figure_element.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: 03_figure_element.ipynb <03_figure_element.ipynb>` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: 03_figure_element.py <03_figure_element.py>` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: 03_figure_element.zip <03_figure_element.zip>` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/intro/04_table_inputs.rst.txt b/v0.14.0/_sources/intro/04_table_inputs.rst.txt new file mode 100644 index 00000000000..3aba99e8d1e --- /dev/null +++ b/v0.14.0/_sources/intro/04_table_inputs.rst.txt @@ -0,0 +1,287 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "intro/04_table_inputs.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_intro_04_table_inputs.py: + + +4. PyGMT I/O: Table inputs +========================== + +Generally, PyGMT accepts two different types of data inputs: tables and grids. + +- A table is a 2-D array with rows and columns. Each column represents a different + variable (e.g., *x*, *y* and *z*) and each row represents a different record. +- A grid is a 2-D array of data that is regularly spaced in the x and y directions (or + longitude and latitude). + +In this tutorial, we'll focus on working with table inputs, and cover grid inputs in a +separate tutorial. + +PyGMT supports a variety of table input types that allow you to work with data in a +format that suits your needs. In this tutorial, we'll explore the different table input +types available in PyGMT and provide examples for each. By understanding the different +table input types, you can choose the one that best fits your data and analysis needs, +and work more efficiently with PyGMT. + +.. GENERATED FROM PYTHON SOURCE LINES 23-30 + +.. code-block:: Python + + from pathlib import Path + + import geopandas as gpd + import numpy as np + import pandas as pd + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 31-38 + +ASCII table file +---------------- + +Most PyGMT functions/methods that accept table input data have a ``data`` parameter. +The easiest way to provide table input data to PyGMT is by specifying the file name of +an ASCII table (e.g., ``data="input_data.dat"``). This is useful when your data is +stored in a separate text file. + +.. GENERATED FROM PYTHON SOURCE LINES 38-52 + +.. code-block:: Python + + + # Create an example file with 3 rows and 2 columns + data = np.array([[1.0, 2.0], [5.0, 4.0], [8.0, 3.0]]) + np.savetxt("input_data.dat", data, fmt="%f") + + # Pass the file name to the data parameter + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True) + fig.plot(data="input_data.dat", style="p0.2c", fill="blue") + fig.show() + + # Now let's delete the example file + Path("input_data.dat").unlink() + + + + +.. image-sg:: /intro/images/sphx_glr_04_table_inputs_001.png + :alt: 04 table inputs + :srcset: /intro/images/sphx_glr_04_table_inputs_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 53-63 + +Besides a plain string to a table file, the following variants are also accepted: + +- A :class:`pathlib.Path` object. +- A full URL. PyGMT will download the file to the current directory first. +- A file name prefixed with ``@`` (e.g., ``data="@input_data.dat"``), which is a + special syntax in GMT to indicate that the file is a remote file hosted on the GMT + data server. + +Additionally, PyGMT also supports a list of file names, :class:`pathlib.Path` objects, +URLs, or remote files, to provide more flexibility in specifying input files. + +.. GENERATED FROM PYTHON SOURCE LINES 65-75 + +2-D array: `list`, `numpy.ndarray`, and `pandas.DataFrame` +---------------------------------------------------------- + +The ``data`` parameter also accepts a 2-D array, e.g., + +- A 2-D :class:`list` (i.e., a list of lists) +- A :class:`numpy.ndarray` object with with a dimension of 2 +- A :class:`pandas.DataFrame` object + +This is useful when you want to plot data that is already in memory. + +.. GENERATED FROM PYTHON SOURCE LINES 75-91 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True) + + # Pass a 2-D list to the 'data' parameter + fig.plot(data=[[1.0, 2.0], [3.0, 4.0]], style="c0.2c", fill="black") + + # Pass a 2-D numpy array to the 'data' parameter + fig.plot(data=np.array([[4.0, 2.0], [6.0, 4.0]]), style="t0.2c", fill="red") + + # Pass a pandas.DataFrame to the 'data' parameter + df = pd.DataFrame(np.array([[7.0, 3.0], [9.0, 2.0]]), columns=["x", "y"]) + fig.plot(data=df, style="a0.2c", fill="blue") + + fig.show() + + + + +.. image-sg:: /intro/images/sphx_glr_04_table_inputs_002.png + :alt: 04 table inputs + :srcset: /intro/images/sphx_glr_04_table_inputs_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 92-99 + +:class:`geopandas.GeoDataFrame` +------------------------------- + +If you're working with geospatial data, you can read your data as a +:class:`geopandas.GeoDataFrame` object and pass it to the ``data`` parameter. This is +useful if your data is stored in a geospatial data format (e.g., GeoJSON, etc.) that +GMT and PyGMT do not support natively. + +.. GENERATED FROM PYTHON SOURCE LINES 99-114 + +.. code-block:: Python + + + # Example GeoDataFrame + gdf = gpd.GeoDataFrame( + { + "geometry": gpd.points_from_xy([2, 5, 9], [2, 3, 4]), + "value": [10, 20, 30], + } + ) + + # Use the GeoDataFrame to specify the 'data' parameter + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True) + fig.plot(data=gdf, style="c0.2c", fill="purple") + fig.show() + + + + +.. image-sg:: /intro/images/sphx_glr_04_table_inputs_003.png + :alt: 04 table inputs + :srcset: /intro/images/sphx_glr_04_table_inputs_003.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + /home/runner/micromamba/envs/pygmt/lib/python3.13/site-packages/pyogrio/geopandas.py:662: UserWarning: 'crs' was not provided. The output dataset will not have projection information defined and may not be usable in other systems. + write( + + + + +.. GENERATED FROM PYTHON SOURCE LINES 115-122 + +Scalar values or 1-D arrays +--------------------------- + +In addition to the ``data`` parameter, some PyGMT functions/methods also provide +individual parameters (e.g., ``x`` and ``y`` for data coordinates) which allow you to +specify the data. These parameters accept individual scalar values or 1-D arrays +(lists or 1-D numpy arrays). + +.. GENERATED FROM PYTHON SOURCE LINES 122-139 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True) + + # Pass scalar values to plot a single data point + fig.plot(x=1.0, y=2.0, style="a0.2c", fill="blue") + + # Pass 1-D lists to plot multiple data points + fig.plot(x=[5.0, 5.0, 5.0], y=[2.0, 3.0, 4.0], style="t0.2c", fill="green") + + # Pass 1-D numpy arrays to plot multiple data points + fig.plot( + x=np.array([8.0, 8.0, 8.0]), y=np.array([2.0, 3.0, 4.0]), style="c0.2c", fill="red" + ) + + fig.show() + + + + +.. image-sg:: /intro/images/sphx_glr_04_table_inputs_004.png + :alt: 04 table inputs + :srcset: /intro/images/sphx_glr_04_table_inputs_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 140-148 + +Conclusion +---------- + +In PyGMT, you have the flexibility to provide data in various table input types, +including file names, 2-D arrays (2-D :class:`list`, :class:`numpy.ndarray`, +:class:`pandas.DataFrames`), scalar values or a series of 1-D arrays, and +:class:`geopandas.GeoDataFrame`. Choose the input type that best suits your data +source and analysis requirements. + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.470 seconds) + + +.. _sphx_glr_download_intro_04_table_inputs.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: 04_table_inputs.ipynb <04_table_inputs.ipynb>` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: 04_table_inputs.py <04_table_inputs.py>` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: 04_table_inputs.zip <04_table_inputs.zip>` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/intro/index.rst.txt b/v0.14.0/_sources/intro/index.rst.txt new file mode 100644 index 00000000000..8102b7f1055 --- /dev/null +++ b/v0.14.0/_sources/intro/index.rst.txt @@ -0,0 +1,116 @@ +:orphan: + +Intro to PyGMT +============== + +Welcome to PyGMT! The tutorials in this intro are designed to teach basic concepts to +create maps in PyGMT. + +**About this intro** + +It is assumed that PyGMT has been successfully :doc:`installed ` on your +system. To test this, run ``import pygmt`` in a Python IDE or +`Jupyter `__ notebook. + +This intro will progressively cover PyGMT data manipulation and plotting concepts, and +later tutorials will use concepts explained in previous ones. It will not cover all +PyGMT functions and methods. + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /intro/images/thumb/sphx_glr_01_first_figure_thumb.png + :alt: + + :ref:`sphx_glr_intro_01_first_figure.py` + +.. raw:: html + +
1. Making your first figure
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /intro/images/thumb/sphx_glr_02_contour_map_thumb.png + :alt: + + :ref:`sphx_glr_intro_02_contour_map.py` + +.. raw:: html + +
2. Create a contour map
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /intro/images/thumb/sphx_glr_03_figure_element_thumb.png + :alt: + + :ref:`sphx_glr_intro_03_figure_element.py` + +.. raw:: html + +
3. Figure elements
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /intro/images/thumb/sphx_glr_04_table_inputs_thumb.png + :alt: + + :ref:`sphx_glr_intro_04_table_inputs.py` + +.. raw:: html + +
4. PyGMT I/O: Table inputs
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /intro/01_first_figure + /intro/02_contour_map + /intro/03_figure_element + /intro/04_table_inputs + + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/intro/sg_execution_times.rst.txt b/v0.14.0/_sources/intro/sg_execution_times.rst.txt new file mode 100644 index 00000000000..5b449d7970a --- /dev/null +++ b/v0.14.0/_sources/intro/sg_execution_times.rst.txt @@ -0,0 +1,46 @@ + +:orphan: + +.. _sphx_glr_intro_sg_execution_times: + + +Computation times +================= +**00:02.791** total execution time for 4 files **from intro**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_intro_01_first_figure.py` (``01_first_figure.py``) + - 00:01.055 + - 0.0 + * - :ref:`sphx_glr_intro_02_contour_map.py` (``02_contour_map.py``) + - 00:00.993 + - 0.0 + * - :ref:`sphx_glr_intro_04_table_inputs.py` (``04_table_inputs.py``) + - 00:00.470 + - 0.0 + * - :ref:`sphx_glr_intro_03_figure_element.py` (``03_figure_element.py``) + - 00:00.274 + - 0.0 diff --git a/v0.14.0/_sources/maintenance.md.txt b/v0.14.0/_sources/maintenance.md.txt new file mode 100644 index 00000000000..0664a2850eb --- /dev/null +++ b/v0.14.0/_sources/maintenance.md.txt @@ -0,0 +1,304 @@ +# Maintainers Guide + +This page contains instructions for project maintainers about how our setup works, +making releases, creating packages, etc. + +If you want to make a contribution to the project, see the [](contributing.md) instead. + +## Onboarding/Offboarding Access Checklist + +Note that anyone can contribute to PyGMT, even without being added to the +[GenericMappingTools team](https://github.com/orgs/GenericMappingTools/teams). +The onboarding items below are for people who would like to make regular +contributions, and could benefit from extra permissions to the developer and +communication tools we use. + +### As a Contributor + +- Add to the [pygmt-contributors team](https://github.com/orgs/GenericMappingTools/teams/pygmt-contributors) (gives 'write' permission to the repository) +- Add as a collaborator on [DAGsHub](https://dagshub.com/GenericMappingTools/pygmt) (gives 'write' permission to dvc remote storage) +- Add as a member on [HackMD](https://hackmd.io/@pygmt) (for draft announcements) [optional] + +### As a Maintainer + +- Add to the [pygmt-maintainers team](https://github.com/orgs/GenericMappingTools/teams/pygmt-maintainers) (gives 'maintain' permission to the repository) +- Add to "Active Maintainers" on the [Team Gallery page](team.md) +- Add as a moderator on the [GMT forum](https://forum.generic-mapping-tools.org) (to see mod-only discussions) [optional] +- Add as a maintainer on [ReadtheDocs](https://readthedocs.org/projects/pygmt-dev) [optional] +- Add as a curator to the [GMT community](https://zenodo.org/communities/generic-mapping-tools/) on Zenodo (for making releases) [optional] + +### As an Administrator + +- Add to the [pygmt-admin team](https://github.com/orgs/GenericMappingTools/teams/pygmt-admin) (gives 'admin' permission to the repository) +- Add as an admin on [DAGsHub](https://www.dagshub.com/GenericMappingTools/pygmt) +- Add as a maintainer on [PyPI](https://pypi.org/project/pygmt/) and [Test PyPI](https://test.pypi.org/project/pygmt) [optional] + +**Note**: When a maintainer is no longer active (no activity in one year), we will mirror +the onboarding access checklist: + +- Move from the [pygmt-maintainers team](https://github.com/orgs/GenericMappingTools/teams/pygmt-maintainers) + to the [pygmt-contributors team](https://github.com/orgs/GenericMappingTools/teams/pygmt-contributors) +- Move from "Active Maintainers" to "Distinguished Contributors" on the [Team Gallery page](team.md) +- Remove 'maintain' permission from GMT forum, ReadTheDocs, Zenodo + +## Branches + +* *main*: Always tested and ready to become a new version. Don't push directly to this + branch. Make a new branch and submit a pull request instead. +* *gh-pages*: Holds the HTML documentation and is served by GitHub. Pages for the main + branch are in the `dev` folder. Pages for each release are in their own folders. + **Automatically updated by GitHub Actions** so you shouldn't have to make commits here. + +## Managing GitHub Issues + +A few guidelines for managing GitHub issues: + +* Assign [labels](https://github.com/GenericMappingTools/pygmt/labels) and the expected + [milestone](https://github.com/GenericMappingTools/pygmt/milestones) to issues as + appropriate. +* When people request to work on an open issue, either assign the issue to that person + and post a comment about the assignment or explain why you are not assigning the + issue to them and, if possible, recommend other issues for them to work on. +* People with write access should self-assign issues and/or comment on the issues that + they will address. +* For upstream bugs, close the issue after an upstream release fixes the bug. If + possible, post a comment when an upstream PR is merged that fixes the problem, and + consider adding a regression test for serious bugs. + +## Reviewing and Merging Pull Requests + +A few guidelines for reviewing: + +* Always **be polite** and give constructive feedback. +* Welcome new users and thank them for their time, even if we don't plan on merging the + PR. +* Don't be harsh with code style or performance. If the code is bad, either (1) merge + the pull request and open a new one fixing the code and pinging the original submitter + or (2) comment on the PR detailing how the code could be improved. Both ways are + focused on showing the contributor **how to write good code**, not shaming them. + +Pull requests should be **squash merged**. +This means that all commits will be collapsed into one. +The main advantages of this are: + +* Eliminates experimental commits or commits to undo previous changes. +* Makes sure every commit on the main branch passes the tests and has a defined purpose. +* The maintainer writes the final commit message, so we can make sure it's good and + descriptive. + + +## Continuous Integration + +We use GitHub Actions continuous integration (CI) services to build, test and +manage the project on Linux, macOS and Windows. The GitHub Actions CI are +controlled by workflow files located in `.github/workflows`. Here we briefly +summarize the functions of the workflows. Please refer to the comments in the +workflow files for more details. + +- `benchmarks.yml`: Benchmarks the execution speed of tests to track performance of PyGMT functions +- `cache_data.yaml`: Cache GMT remote data files and uplodas as artifacts +- `check-links.yml`: Check links in the repository and documentation +- `ci_docs.yml`: Build documentation on Linux/macOS/Windows and deploy to GitHub +- `ci_doctest.yaml`: Run all doctests on Linux/macOS/Windows +- `ci_tests.yaml`: Run regular PyGMT tests on Linux/macOS/Windows +- `ci_tests_dev.yaml`: Run regular PyGMT tests with GMT dev version on Linux/macOS/Windows +- `ci_tests_legacy.yaml`: Run regular PyGMT tests with GMT legacy versions on Linux/macOS/Windows +- `dvc-diff.yml`: Report changes in test images +- `format-command.yml`: Format the codes using slash command +- `publish-to-pypi.yml`: Publish archives to PyPI and TestPyPI +- `release-baseline-images.yml`: Upload the ZIP archive of baseline images as a release asset +- `release-drafter.yml`: Draft the next release notes +- `slash-command-dispatch.yml`: Support slash commands in pull requests +- `style_checks.yaml`: Code lint and style checks +- `type_checks.yml`: Static type checks + + +## Continuous Documentation + +We use the [ReadtheDocs](https://readthedocs.org/) service to preview changes +made to our documentation website every time we make a commit in a pull request. +The service has a configuration file `.readthedocs.yaml`, with a list of options +to change the default behaviour at . + +## Continuous Benchmarking + +We use the [CodSpeed](https://codspeed.io) service to continuously track PyGMT's +performance. The `pytest-codspeed` plugin collects benchmark data and uploads it to the +CodSpeed server, where results are available at . + +Benchmarking is handled through the `benchmarks.yml` GitHub Actions workflow. It's +automatically executed when a pull request is merged into the main branch. To trigger +benchmarking in a pull request, add the `run/benchmark` label to the pull request. + +To include a new test in the benchmark suite, apply the `@pytest.mark.benchmark` +decorator to a test function. + +## Dependencies Policy + +PyGMT has adopted [SPEC 0](https://scientific-python.org/specs/spec-0000/) alongside the +rest of the scientific Python ecosystem, and made a few extensions based on the needs of +the project. Please see [Minimum Supported Versions](minversions.md) for the detailed +policy and the minimum supported versions of GMT, Python and core package dependencies. + +In `pyproject.toml`, the `requires-python` key should be set to the minimum supported +version of Python. Minimum supported versions of GMT, Python and core package +dependencies should be adjusted upward on every major and minor release, but never on a +patch release. + + +## Backwards Compatibility and Deprecation Policy + +PyGMT is still undergoing rapid development. All of the API is subject to change until +the v1.0.0 release. Versioning in PyGMT is based on the +[semantic versioning specification](https://semver.org/spec/v2.0.0.html) +(i.e., v*MAJOR*.*MINOR*.*PATCH*). Basic policy for backwards compatibility: + +- Any incompatible changes should go through the deprecation process below. +- Incompatible changes are only allowed in major and minor releases, not in patch releases. +- Incompatible changes should be documented in the release notes. + +When making incompatible changes, we should follow the process: + +- Discuss whether the incompatible changes are necessary on GitHub. +- Make the changes in a backwards compatible way, and raise a `FutureWarning` warning + for the old usage. At least one test using the old usage should be added. +- The warning message should clearly explain the changes and include the versions in + which the old usage is deprecated and is expected to be removed. +- The `FutureWarning` warning should appear for 2-4 minor versions, depending on the + impact of the changes. It means the deprecation period usually lasts 3-12 months. +- Remove the old usage and warning when reaching the declared version. + +### Deprecating a function parameter + +To rename a function parameter, add the `@deprecate_parameter` decorator near the top +after the `@fmt_docstring` decorator but before the `@use_alias` decorator (if those two +exist). A `TODO` comment should also be added to indicate the deprecation period (see below). +Here is an example: + +```python +# TODO(PyGMT>=0.6.0): Remove the deprecated "columns" parameter. +@fmt_docstring +@deprecate_parameter("columns", "incols", "v0.4.0", remove_version="v0.6.0") +@use_alias(J="projection", R="region", V="verbose", i="incols") +@kwargs_to_strings(R="sequence", i="sequence_comma") +def plot(self, x=None, y=None, data=None, size=None, direction=None, **kwargs): + pass +``` + +In this case, the old parameter name `columns` is deprecated since v0.4.0, and will be +fully removed in v0.6.0. The new parameter name is `incols`. + +### TODO comments + +Occasionally, we need to implement temporary code that should be removed in the future. +This can occur in situations such as: + +- When a parameter, function, or method is deprecated and scheduled for removal. +- When workarounds are necessary to address issues in older or upcoming versions of GMT + or other dependencies. + +To track these temporary codes or workarounds, we use TODO comments. These comments +should adhere to the following format: + +```python +# TODO(package>=X.Y.Z): A brief description of the TODO item. +# Additional details if necessary. +``` +The TODO comment indicates that we should address the item when *package* version +*X.Y.Z* or later is required. + +It's important not to overuse TODO comments for tracking unimplemented features. +Instead, open issues to monitor these features. + + +## Making a Release + +We try to automate the release process as much as possible. +GitHub Actions workflow handles publishing new releases to PyPI and updating the documentation. +The version number is set automatically using [setuptools_scm](https://pypi.org/project/setuptools-scm/) +based information obtained from git. +There are a few steps that still must be done manually, though. + +### Updating the Changelog + +The [Release Drafter](https://github.com/release-drafter/release-drafter) GitHub Action +will automatically keep a draft changelog at +, adding a new entry +every time a pull request (with a proper label) is merged into the main branch. +This release drafter tool has two configuration files, one for the GitHub Action +at `.github/workflows/release-drafter.yml`, and one for the changelog template +at `.github/release-drafter.yml`. Configuration settings can be found at +. + +The drafted release notes are not perfect, so we will need to tidy it prior to +publishing the actual release notes at [](changes.md). + +1. Go to and click on the + 'Edit' button next to the current draft release note. Copy the text of the + automatically drafted release notes under the 'Write' tab to + `doc/changes.md`. Add a section separator `---` between the new and old + changelog sections. +2. Update the DOI badge in the changelog. Remember to replace the DOI number + inside the badge url. + + ``` + [![Digital Object Identifier for PyGMT vX.Y.Z](https://zenodo.org/badge/DOI/10.5281/zenodo..svg)](https://doi.org/10.5281/zenodo.) + ``` +3. Open a new pull request using the title 'Changelog entry for vX.Y.Z' with + the updated release notes, so that other people can help to review and + collaborate on the changelog curation process described next. +4. Edit the change list to remove any trivial changes (updates to the README, + typo fixes, CI configuration, test updates due to GMT releases, etc). +5. Sort the items within each section (i.e., New Features, Enhancements, etc.) + such that similar items are located near each other (e.g., new wrapped + modules and methods, gallery examples, API docs changes) and entries within each group + are alphabetical. +6. Move a few important items from the main sections to the Highlights section. +7. Edit the list of people who contributed to the release, linking to their + GitHub accounts. Sort their names by the number of commits made since the + last release (e.g., use `git shortlog HEAD...v0.4.0 -sne`). +8. Update `doc/minversions.md` with new information on the new release version, + including a vX.Y.Z documentation link, and minimum required versions of GMT, Python + and core package dependencies (NumPy, pandas, Xarray). Follow + [SPEC 0](https://scientific-python.org/specs/spec-0000/) for updates. +9. Refresh citation information. Specifically, the BibTeX in `README.md` and + `CITATION.cff` needs to be updated with any metadata changes, including the + DOI, release date, and version information. Please also follow + guidelines in `AUTHORSHIP.md` for updating the author list in the BibTeX. + More information about the `CITATION.cff` specification can be found at + . + +### Pushing to PyPI and Updating the Documentation + +After the changelog is updated, making a release can be done by going to +, editing the draft release, +and clicking on publish. A git tag will also be created, make sure that this +tag is a proper version number (following [Semantic Versioning](https://semver.org/)) +with a leading `v` (e.g., `v0.2.1`). + +Once the release/tag is created, this should trigger GitHub Actions to do all the work for us. +A new source distribution will be uploaded to PyPI, a new folder with the documentation +HTML will be pushed to *gh-pages*, and the `latest` link will be updated to point to +this new folder. + +### Archiving on Zenodo + +Grab both the source code and baseline images ZIP files from the GitHub release page +and upload them to Zenodo using the previously reserved DOI. + +### Updating the Conda Package + +When a new version is released on PyPI, conda-forge's bot automatically creates version +updates for the feedstock. In most cases, the maintainers can simply merge that PR. + +If changes need to be done manually, you can: + +1. Fork the [pygmt feedstock repository](https://github.com/conda-forge/pygmt-feedstock) if + you haven't already. If you have a fork, update it. +2. Update the version number and sha256 hash on `recipe/meta.yaml`. You can get the hash + from the [PyPI "Download files" section](https://pypi.org/project/pygmt/#files). +3. Add or remove any new dependencies (most are probably only `run` dependencies). +4. Make sure the minimum support versions of all dependencies are correctly pinned. +5. Make a new branch, commit, and push the changes **to your personal fork**. +6. Create a PR against the original feedstock main. +7. Once the CI tests pass, merge the PR or ask a maintainer to do so. diff --git a/v0.14.0/_sources/minversions.md.txt b/v0.14.0/_sources/minversions.md.txt new file mode 100644 index 00000000000..b10150b5ce1 --- /dev/null +++ b/v0.14.0/_sources/minversions.md.txt @@ -0,0 +1,67 @@ +--- +myst: + # Customized URI schemes that are converted to external links + # References: + # - https://myst-parser.readthedocs.io/en/latest/syntax/cross-referencing.html#customising-external-url-resolution + # - https://myst-parser.readthedocs.io/en/latest/configuration.html#frontmatter-local-configuration + url_schemes: + http: null + https: null + tag: + url: "https://github.com/GenericMappingTools/pygmt/releases/tag/{{path}}" + title: "{{path}}" + doc: + url: "https://www.pygmt.org/{{path}}" + title: "Docs" +--- + +# Minimum Supported Versions + +PyGMT has adopted [SPEC 0](https://scientific-python.org/specs/spec-0000/) alongside the +rest of the scientific Python ecosystem, and will therefore: + +- Drop support for Python versions 3 years after their initial release. +- Drop support for core package dependencies (NumPy, pandas, Xarray) 2 years after their + initial release. + +In addition to the above, the PyGMT team has also decided to: + +- Drop support for GMT versions 3 years after their initial release, while ensuring at + least two latest minor versions remain supported. +- Maintain support for [optional dependencies](/ecosystem.md#pygmt-dependencies) for at + least 1 year after their initial release. Users are encouraged to use the most + up-to-date optional dependencies where possible. + +:::{note} +The SPEC 0 policy is enforced on a best-effort basis, and the PyGMT team may decide to +drop support for core (and optional) package dependencies earlier than recommended for +compatibility reasons. +::: + +| PyGMT Version | GMT | Python | NumPy | pandas | Xarray | +|---|---|---|---|---|---| +| [Dev][]* [] | {{ requires.gmt }} | {{ requires.python }} | {{ requires.numpy }} | {{ requires.pandas }} | {{ requires.xarray }} | +| [] | >=6.4.0 | >=3.11 | >=1.25 | >=2.0 | >=2023.04 | +| [] | >=6.3.0 | >=3.10 | >=1.24 | >=1.5 | >=2022.09 | +| [] | >=6.3.0 | >=3.10 | >=1.23 | >=1.5 | >=2022.06 | +| [] | >=6.3.0 | >=3.9 | >=1.23 | | | +| [] | >=6.3.0 | >=3.9 | >=1.22 | | | +| [] | >=6.3.0 | >=3.8 | >=1.21 | | | +| [] | >=6.3.0 | >=3.8 | >=1.20 | | | +| [] | >=6.3.0 | >=3.8 | >=1.20 | | | +| [] | >=6.3.0 | >=3.8 | >=1.19 | | | +| [] | >=6.3.0 | >=3.8 | >=1.19 | | | +| [] | >=6.2.0 | >=3.7 | >=1.18 | | | +| [] | >=6.2.0 | >=3.7 | >=1.17 | | | +| [] | >=6.2.0 | >=3.7 | >=1.17 | | | +| [] | >=6.1.1 | >=3.7 | | | | +| [] | >=6.1.1 | >=3.7 | | | | +| [] | >=6.1.1 | >=3.6 | | | | +| [] | >=6.1.1 | 3.6 - 3.8 | | | | +| [] | >=6.0.0 | 3.6 - 3.8 | | | | +| [] | >=6.0.0 | 3.6 - 3.8 | | | | +| [] | >=6.0.0 | 3.6 - 3.8 | | | | + +*Dev reflects the main branch and is for the upcoming release. + +[Dev]: https://github.com/GenericMappingTools/pygmt/milestones diff --git a/v0.14.0/_sources/overview.md.txt b/v0.14.0/_sources/overview.md.txt new file mode 100644 index 00000000000..f12c4dd2c8f --- /dev/null +++ b/v0.14.0/_sources/overview.md.txt @@ -0,0 +1,89 @@ +# Overview + +## About + +PyGMT is a Python wrapper for the +[Generic Mapping Tools (GMT)](https://github.com/GenericMappingTools/gmt), +a command-line program widely used across the Earth, Ocean, and Planetary sciences and +beyond. It provides capabilities for processing spatial data (gridding, filtering, +masking, FFTs, etc) and making high quality plots and maps. + +PyGMT is different from Python libraries like [Bokeh](https://bokeh.pydata.org/en/latest/) +and [Matplotlib](https://matplotlib.org/), which have a larger focus on interactivity +and allowing different backends. GMT uses the +[PostScript](https://en.wikipedia.org/wiki/PostScript) format to generate high quality +(static) vector graphics for publications, posters, talks, etc. It is memory efficient +and very fast. The PostScript figures can be converted to other formats like PDF, PNG, +and JPG for use on the web and elsewhere. In fact, PyGMT users will usually not have any +contact with the original PostScript files and get only the more convenient formats like +PDF and PNG. + +The project was started in 2017 by [Leonardo Uieda](https://www.leouieda.com) and +[Paul Wessel](https://www.soest.hawaii.edu/wessel) (the co-creator and main developer of +GMT) at the University of Hawaiʻi at Mānoa. The development of PyGMT has been supported +by NSF grants [OCE-1558403](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1558403) +and [EAR-1948602](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1948602). + +We welcome any feedback and ideas! Let us know by submitting +[issues on GitHub](https://github.com/GenericMappingTools/pygmt/issues) or by posting on +our [Discourse forum](https://forum.generic-mapping-tools.org/c/questions/pygmt-q-a). + +## Presentations + +These are conference presentations about the development of PyGMT (previously "GMT/Python"): + +- "Accessing and Integrating GMT with Python and the Scientific Python Ecosystem". + 2024. + Yvonne Fröhlich, Dongdong Tian, Wei Ji Leong, Max Jones, and Michael Grund. + Presented at *AGU 2024*. + doi:[10.6084/m9.figshare.28049495](https://doi.org/10.6084/m9.figshare.28049495) + + ![](https://github.com/user-attachments/assets/19e1391e-648d-43da-b6f6-ecfb4f3e83e8){.align-center width="80%"} + +- "Geospatial Analysis & Visualization with PyGMT". + 2022. + Max Jones, Wei Ji Leong, and Leonardo Uieda. + Presented at *SciPy 2022*. + doi:[10.6084/m9.figshare.20483793](https://doi.org/10.6084/m9.figshare.20483793) + + ![](_static/scipy2022-youtube-thumbnail.jpg){.align-center width="80%"} + +- "PyGMT: Accessing the Generic Mapping Tools from Python". + 2019. + Leonardo Uieda and Paul Wessel. + Presented at *AGU 2019*. + doi:[10.6084/m9.figshare.11320280](https://doi.org/10.6084/m9.figshare.11320280) + + ![](_static/agu2019-poster.jpg){.align-center width="80%"} + +- "Building an object-oriented Python interface for the Generic Mapping Tools". + 2018. + Leonardo Uieda and Paul Wessel. + Presented at *SciPy 2018*. + doi:[10.6084/m9.figshare.6814052](https://doi.org/10.6084/m9.figshare.6814052) + + ![](_static/scipy2018-youtube-thumbnail.png){.align-center width="80%"} + +- "Integrating the Generic Mapping Tools with the Scientific Python Ecosystem". + 2018. + Leonardo Uieda and Paul Wessel. + Presented at *AOGS Annual Meeting 2018*. + doi:[10.6084/m9.figshare.6399944](https://doi.org/10.6084/m9.figshare.6399944) + + ![](_static/aogs2018-poster.jpg){.align-center width="80%"} + +- "Bringing the Generic Mapping Tools to Python". + 2017. + Leonardo Uieda and Paul Wessel. + Presented at *SciPy 2017*. + doi:[10.6084/m9.figshare.7635833](https://doi.org/10.6084/m9.figshare.7635833) + + ![](_static/scipy2017-youtube-thumbnail.png){.align-center width="80%"} + +- "A modern Python interface for the Generic Mapping Tools". + 2017. + Leonardo Uieda and Paul Wessel. + Presented at *AGU 2017*. + doi:[10.6084/m9.figshare.5662411](https://doi.org/10.6084/m9.figshare.5662411) + + ![](_static/agu2017-poster.jpg){.align-center width="80%"} diff --git a/v0.14.0/_sources/projections/azim/azim_equidistant.rst.txt b/v0.14.0/_sources/projections/azim/azim_equidistant.rst.txt new file mode 100644 index 00000000000..54c4bf73f46 --- /dev/null +++ b/v0.14.0/_sources/projections/azim/azim_equidistant.rst.txt @@ -0,0 +1,103 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/azim/azim_equidistant.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_projections_azim_azim_equidistant.py: + + +Azimuthal equidistant projection +================================ + +The main advantage of this projection is that distances from the projection +center are displayed in correct proportions. Also directions measured from the +projection center are correct. It is very useful for a global view on locations +that lie within a certain distance or for comparing distances of different +locations relative to the projection center. + +**e**\ *lon0/lat0*\ [*/horizon*]\ */scale* or +**E**\ *lon0/lat0*\ [*/horizon*]\ */width* + +The projection type is set with **e** or **E**. *lon0/lat0* specifies the +projection center, and the optional parameter *horizon* specifies the maximum +distance to the projection center (i.e. the visible portion of the rest of the +world map) in degrees <= 180° (default 180°). The size of the figure is set by +*scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 22-29 + + + +.. image-sg:: /projections/azim/images/sphx_glr_azim_equidistant_001.png + :alt: azim equidistant + :srcset: /projections/azim/images/sphx_glr_azim_equidistant_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + coast [WARNING]: Fill/clip continent option (-G) may not work for this projection. + coast [WARNING]: If the antipode (0/4.64276e-310) is in the ocean then chances are good it will work. + coast [WARNING]: Otherwise, avoid projection center coordinates that are exact multiples of 80 degrees. + + + + + + +| + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.coast( + region="g", projection="E-100/40/15c", frame="afg", land="khaki", water="white" + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.368 seconds) + + +.. _sphx_glr_download_projections_azim_azim_equidistant.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: azim_equidistant.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: azim_equidistant.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: azim_equidistant.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/azim/azim_general_perspective.rst.txt b/v0.14.0/_sources/projections/azim/azim_general_perspective.rst.txt new file mode 100644 index 00000000000..8f5a762c518 --- /dev/null +++ b/v0.14.0/_sources/projections/azim/azim_general_perspective.rst.txt @@ -0,0 +1,105 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/azim/azim_general_perspective.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_projections_azim_azim_general_perspective.py: + + +Perspective projection +====================== + +The perspective projection imitates the view of the Earth from a finite +point in space. In a full view of the earth one third of its surface area can +be seen. + +**g**\ *lon0/lat0*\ */scale*\ [**+a**\ *azimuth*]\ +[**+t**\ *tilt*]\ [**+v**\ *vwidth/vheight*]\ [**+w**\ *twist*]\ +[**+z**\ *altitude*] or **G**\ *lon0/lat0*\ */width*\ +[**+a**\ *azimuth*]\ [**+t**\ *tilt*]\ [**+v**\ *vwidth/vheight*]\ +[**+w**\ *twist*]\ [**+z**\ *altitude*] + +The projection type is set with **g** or **G**. *lon0/lat0* specifies the +projection center and *scale* or *width* determine the size of the figure. +With **+a**\ *azimuth* the direction (in degrees) in which you are looking is +specified, measured clockwise from north. **+t**\ *tilt* is given in degrees +and is the viewing angle relative to zenith. A tilt of 0° is looking straight +down, 60° is looking 30° above horizon. The viewport angle in degrees is +described via **+v**\ *vwidth/vheight* and **+w**\ *twist* is the clockwise +rotation of the image (in degrees). **+z**\ *altitude* sets the height in km +of the viewpoint above local sea level (If altitude is less than 10, then it is +the distance from the center of the earth to the viewpoint in earth radii). + +The example shows the coast of Northern Europe viewed from 250 km above sea +level looking 30° from north at a tilt of 45°. The height and width of the +viewing angle is both 60°, which imitates viewing with naked eye. + +.. GENERATED FROM PYTHON SOURCE LINES 32-43 + + + +.. image-sg:: /projections/azim/images/sphx_glr_azim_general_perspective_001.png + :alt: azim general perspective + :srcset: /projections/azim/images/sphx_glr_azim_general_perspective_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.coast( + region="g", + projection="G4/52/12c+a30+t45+v60/60+w0+z250", + frame="afg", + land="khaki", + water="white", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.542 seconds) + + +.. _sphx_glr_download_projections_azim_azim_general_perspective.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: azim_general_perspective.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: azim_general_perspective.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: azim_general_perspective.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/azim/azim_general_stereographic.rst.txt b/v0.14.0/_sources/projections/azim/azim_general_stereographic.rst.txt new file mode 100644 index 00000000000..bf478b9190c --- /dev/null +++ b/v0.14.0/_sources/projections/azim/azim_general_stereographic.rst.txt @@ -0,0 +1,95 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/azim/azim_general_stereographic.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_projections_azim_azim_general_stereographic.py: + + +General stereographic projection +================================ + +This map projection is a conformal, azimuthal projection. It is mainly used +with a projection center in one of the poles. Then meridians appear as straight +lines and cross latitudes at a right angle. Unlike the azimuthal equidistant +projection, the distances in this projection are not displayed in correct +proportions. It is often used as a hemisphere map like the Lambert Azimuthal +Equal Area projection. + +**s**\ *lon0/lat0*\ [*/horizon*]\ */scale* +or **S**\ *lon0/lat0*\ [*/horizon*\]\ */width* + +The projection type is set with **s** or **S**. *lon0/lat0* specifies the +projection center, the optional *horizon* parameter specifies the maximum +distance from projection center (in degrees, < 180, default 90), and the +*scale* or *width* sets the size of the figure. + +.. GENERATED FROM PYTHON SOURCE LINES 22-33 + + + +.. image-sg:: /projections/azim/images/sphx_glr_azim_general_stereographic_001.png + :alt: azim general stereographic + :srcset: /projections/azim/images/sphx_glr_azim_general_stereographic_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.coast( + region=[4, 14, 52, 57], + projection="S0/90/12c", + frame="afg", + land="khaki", + water="white", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.193 seconds) + + +.. _sphx_glr_download_projections_azim_azim_general_stereographic.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: azim_general_stereographic.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: azim_general_stereographic.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: azim_general_stereographic.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/azim/azim_gnomonic.rst.txt b/v0.14.0/_sources/projections/azim/azim_gnomonic.rst.txt new file mode 100644 index 00000000000..00f77a64ac8 --- /dev/null +++ b/v0.14.0/_sources/projections/azim/azim_gnomonic.rst.txt @@ -0,0 +1,96 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/azim/azim_gnomonic.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_projections_azim_azim_gnomonic.py: + + +Gnomonic projection +=================== + +The point of perspective of the gnomonic projection lies at the center of the +Earth. As a consequence great circles (orthodromes) on the surface of the Earth +are displayed as straight lines, which makes it suitable for distance +estimation for navigational purposes. It is neither conformal nor equal-area +and the distortion increases greatly with distance to the projection center. It +follows that the scope of application is restricted to a small area around the +projection center (at a maximum of 60°). + +**f**\ *lon0/lat0*\ [*/horizon*\ ]\ */scale* +or **F**\ *lon0/lat0*\ [*/horizon*\ ]\ */width* + +**f** or **F** specifies the projection type, *lon0/lat0* specifies the +projection center, the optional parameter *horizon* specifies the maximum +distance from projection center (in degrees, < 90, default 60), and *scale* or +*width* sets the size of the figure. + +.. GENERATED FROM PYTHON SOURCE LINES 23-34 + + + +.. image-sg:: /projections/azim/images/sphx_glr_azim_gnomonic_001.png + :alt: azim gnomonic + :srcset: /projections/azim/images/sphx_glr_azim_gnomonic_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.coast( + region="g", + projection="F-90/15/12c", + frame="afg", + land="khaki", + water="white", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.237 seconds) + + +.. _sphx_glr_download_projections_azim_azim_gnomonic.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: azim_gnomonic.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: azim_gnomonic.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: azim_gnomonic.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/azim/azim_lambert.rst.txt b/v0.14.0/_sources/projections/azim/azim_lambert.rst.txt new file mode 100644 index 00000000000..2203d489b70 --- /dev/null +++ b/v0.14.0/_sources/projections/azim/azim_lambert.rst.txt @@ -0,0 +1,93 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/azim/azim_lambert.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_projections_azim_azim_lambert.py: + + +Lambert azimuthal equal-area projection +======================================= + +This projection was developed by Johann Heinrich Lambert in 1772 and is +typically used for mapping large regions like continents and hemispheres. It is +an azimuthal, equal-area projection, but is not perspective. Distortion is zero +at the center of the projection, and increases radially away from this point. + +**a**\ *lon0/lat0*\ [*/horizon*\ ]\ */scale* +or **A**\ *lon0/lat0*\ [*/horizon*\ ]\ */width* + +**a** or **A** specifies the projection type, and *lon0/lat0* specifies the +projection center, *horizon* specifies the maximum distance from projection +center (in degrees, <= 180, default 90), and *scale* or *width* sets the size +of the figure. + +.. GENERATED FROM PYTHON SOURCE LINES 20-31 + + + +.. image-sg:: /projections/azim/images/sphx_glr_azim_lambert_001.png + :alt: azim lambert + :srcset: /projections/azim/images/sphx_glr_azim_lambert_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.coast( + region="g", + projection="A30/-20/60/12c", + frame="afg", + land="khaki", + water="white", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.219 seconds) + + +.. _sphx_glr_download_projections_azim_azim_lambert.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: azim_lambert.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: azim_lambert.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: azim_lambert.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/azim/azim_orthographic.rst.txt b/v0.14.0/_sources/projections/azim/azim_orthographic.rst.txt new file mode 100644 index 00000000000..a5ce68a63db --- /dev/null +++ b/v0.14.0/_sources/projections/azim/azim_orthographic.rst.txt @@ -0,0 +1,94 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/azim/azim_orthographic.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_projections_azim_azim_orthographic.py: + + +Orthographic projection +======================= + +This is a perspective projection like the general perspective, but with the +difference that the point of perspective lies in infinite distance. +It is therefore often used to give the appearance of a globe viewed from outer +space, were one hemisphere can be seen as a whole. It is neither conformal nor +equal-area and the distortion increases near the edges. + +**g**\ *lon0/lat0*\ [*/horizon*\ ]\ */scale* +or **G**\ *lon0/lat0*\ [*/horizon*\ ]\ */width* + +**g** or **G** specifies the projection type, *lon0/lat0* specifies the +projection center, the optional parameter *horizon* specifies the maximum +distance from projection center (in degrees, <= 90, default 90), and *scale* +and *width* set the figure size. + +.. GENERATED FROM PYTHON SOURCE LINES 21-32 + + + +.. image-sg:: /projections/azim/images/sphx_glr_azim_orthographic_001.png + :alt: azim orthographic + :srcset: /projections/azim/images/sphx_glr_azim_orthographic_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.coast( + region="g", + projection="G10/52/12c", + frame="afg", + land="khaki", + water="white", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.246 seconds) + + +.. _sphx_glr_download_projections_azim_azim_orthographic.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: azim_orthographic.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: azim_orthographic.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: azim_orthographic.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/azim/sg_execution_times.rst.txt b/v0.14.0/_sources/projections/azim/sg_execution_times.rst.txt new file mode 100644 index 00000000000..d51786cd33c --- /dev/null +++ b/v0.14.0/_sources/projections/azim/sg_execution_times.rst.txt @@ -0,0 +1,52 @@ + +:orphan: + +.. _sphx_glr_projections_azim_sg_execution_times: + + +Computation times +================= +**00:02.805** total execution time for 6 files **from projections/azim**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_projections_azim_azim_general_perspective.py` (``azim_general_perspective.py``) + - 00:01.542 + - 0.0 + * - :ref:`sphx_glr_projections_azim_azim_equidistant.py` (``azim_equidistant.py``) + - 00:00.368 + - 0.0 + * - :ref:`sphx_glr_projections_azim_azim_orthographic.py` (``azim_orthographic.py``) + - 00:00.246 + - 0.0 + * - :ref:`sphx_glr_projections_azim_azim_gnomonic.py` (``azim_gnomonic.py``) + - 00:00.237 + - 0.0 + * - :ref:`sphx_glr_projections_azim_azim_lambert.py` (``azim_lambert.py``) + - 00:00.219 + - 0.0 + * - :ref:`sphx_glr_projections_azim_azim_general_stereographic.py` (``azim_general_stereographic.py``) + - 00:00.193 + - 0.0 diff --git a/v0.14.0/_sources/projections/conic/conic_albers.rst.txt b/v0.14.0/_sources/projections/conic/conic_albers.rst.txt new file mode 100644 index 00000000000..7b75f1ff691 --- /dev/null +++ b/v0.14.0/_sources/projections/conic/conic_albers.rst.txt @@ -0,0 +1,98 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/conic/conic_albers.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_projections_conic_conic_albers.py: + + +Albers conic equal-area projection +================================== + +This projection, developed by Heinrich C. Albers in 1805, is predominantly used +to map regions of large east-west extent, in particular the United States. It +is a conic, equal-area projection, in which parallels are unequally spaced arcs +of concentric circles, more closely spaced at the north and south edges of the +map. Meridians, on the other hand, are equally spaced radii about a common +center, and cut the parallels at right angles. Distortion in scale and shape +vanishes along the two standard parallels. Between them, the scale along +parallels is too small; beyond them it is too large. The opposite is true for +the scale along meridians. + +**b**\ *lon0/lat0*\ /\ *lat1/lat2*\ */scale* +or **B**\ *lon0/lat0*\ /\ *lat1/lat2*\ */width* + +The projection is set with **b** or **B**. The projection center is set by +*lon0/lat0* and two standard parallels for the map are set with *lat1/lat2*. +The figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 24-36 + + + +.. image-sg:: /projections/conic/images/sphx_glr_conic_albers_001.png + :alt: conic albers + :srcset: /projections/conic/images/sphx_glr_conic_albers_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Use the ISO country code for Brazil and add a padding of 2 degrees (+R2) + fig.coast( + region="BR+R2", + projection="B-55/-15/-25/0/12c", + frame="afg", + land="seagreen", + water="gray90", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.287 seconds) + + +.. _sphx_glr_download_projections_conic_conic_albers.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: conic_albers.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: conic_albers.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: conic_albers.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/conic/conic_equidistant.rst.txt b/v0.14.0/_sources/projections/conic/conic_equidistant.rst.txt new file mode 100644 index 00000000000..052f100a3c5 --- /dev/null +++ b/v0.14.0/_sources/projections/conic/conic_equidistant.rst.txt @@ -0,0 +1,92 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/conic/conic_equidistant.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_projections_conic_conic_equidistant.py: + + +Equidistant conic projection +============================ + +The equidistant conic projection was described by the Greek philosopher +Claudius Ptolemy about A.D. 150. It is neither conformal or equal-area, but +serves as a compromise between them. The scale is true along all meridians and +the standard parallels. + +**d**\ *lon0/lat0*\ /\ *lat1/lat2*\ */scale* +or **D**\ *lon0/lat0*\ /\ *lat1/lat2*\ */width* + +The projection is set with **d** or **D**. The projection center is set by +*lon0/lat0* and two standard parallels for the map are set with *lat1/lat2*. +The figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 19-30 + + + +.. image-sg:: /projections/conic/images/sphx_glr_conic_equidistant_001.png + :alt: conic equidistant + :srcset: /projections/conic/images/sphx_glr_conic_equidistant_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.coast( + region=[-88, -70, 18, 24], + projection="D-79/21/19/23/12c", + frame="afg", + land="seagreen", + water="gray90", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.157 seconds) + + +.. _sphx_glr_download_projections_conic_conic_equidistant.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: conic_equidistant.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: conic_equidistant.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: conic_equidistant.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/conic/conic_lambert.rst.txt b/v0.14.0/_sources/projections/conic/conic_lambert.rst.txt new file mode 100644 index 00000000000..9a30927e656 --- /dev/null +++ b/v0.14.0/_sources/projections/conic/conic_lambert.rst.txt @@ -0,0 +1,96 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/conic/conic_lambert.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_projections_conic_conic_lambert.py: + + +Lambert conic conformal projection +================================== + +This conic projection was designed by the Alsatian mathematician Johann +Heinrich Lambert (1772) and has been used extensively for mapping of regions +with predominantly east-west orientation, just like the Albers projection. +Unlike the Albers projection, Lambert's conformal projection is not equal-area. +The parallels are arcs of circles with a common origin, and meridians are the +equally spaced radii of these circles. As with Albers projection, it is only +the two standard parallels that are distortion-free. + +**l**\ *lon0/lat0*\ /\ *lat1/lat2*\ */scale* +or **L**\ *lon0/lat0*\ /\ *lat1/lat2*\ */width* + +The projection is set with **l** or **L**. The projection center is set by +*lon0/lat0* and two standard parallels for the map are set with *lat1/lat2*. +The figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 22-34 + + + +.. image-sg:: /projections/conic/images/sphx_glr_conic_lambert_001.png + :alt: conic lambert + :srcset: /projections/conic/images/sphx_glr_conic_lambert_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.coast( + region=[-130, -70, 24, 52], + projection="L-100/35/33/45/12c", + frame="afg", + land="seagreen", + water="gray90", + ) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.193 seconds) + + +.. _sphx_glr_download_projections_conic_conic_lambert.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: conic_lambert.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: conic_lambert.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: conic_lambert.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/conic/polyconic.rst.txt b/v0.14.0/_sources/projections/conic/polyconic.rst.txt new file mode 100644 index 00000000000..d1f7d46ad66 --- /dev/null +++ b/v0.14.0/_sources/projections/conic/polyconic.rst.txt @@ -0,0 +1,102 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/conic/polyconic.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_projections_conic_polyconic.py: + + +Polyconic projection +==================== + +The polyconic projection, in Europe usually referred to as the American +polyconic projection, was introduced shortly before 1820 by the Swiss-American +cartographer Ferdinand Rodulph Hassler (1770-1843). As head of the Survey of +the Coast, he was looking for a projection that would give the least distortion +for mapping the coast of the United States. The projection acquired its name +from the construction of each parallel, which is achieved by projecting the +parallel onto the cone while it is rolled around the globe, along the central +meridian, tangent to that parallel. As a consequence, the projection involves +many cones rather than a single one used in regular conic projections. + +The polyconic projection is neither equal-area, nor conformal. It is true to +scale without distortion along the central meridian. Each parallel is true to +scale as well, but the meridians are not as they get further away from the +central meridian. As a consequence, no parallel is standard because conformity +is lost with the lengthening of the meridians. + +**poly**/\ [*lon0*/\ [*lat0*/]]\ *scale* or +**Poly**/\ [*lon0*/\ [*lat0*/]]\ *width* + +The projection is set with **poly** or **Poly**. The figure size is set +with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 29-40 + + + +.. image-sg:: /projections/conic/images/sphx_glr_polyconic_001.png + :alt: polyconic + :srcset: /projections/conic/images/sphx_glr_polyconic_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.coast( + region=[-180, -20, 0, 90], + projection="Poly/12c", + frame="afg", + land="seagreen", + water="gray90", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.168 seconds) + + +.. _sphx_glr_download_projections_conic_polyconic.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: polyconic.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: polyconic.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: polyconic.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/conic/sg_execution_times.rst.txt b/v0.14.0/_sources/projections/conic/sg_execution_times.rst.txt new file mode 100644 index 00000000000..3c5a470a5eb --- /dev/null +++ b/v0.14.0/_sources/projections/conic/sg_execution_times.rst.txt @@ -0,0 +1,46 @@ + +:orphan: + +.. _sphx_glr_projections_conic_sg_execution_times: + + +Computation times +================= +**00:00.805** total execution time for 4 files **from projections/conic**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_projections_conic_conic_albers.py` (``conic_albers.py``) + - 00:00.287 + - 0.0 + * - :ref:`sphx_glr_projections_conic_conic_lambert.py` (``conic_lambert.py``) + - 00:00.193 + - 0.0 + * - :ref:`sphx_glr_projections_conic_polyconic.py` (``polyconic.py``) + - 00:00.168 + - 0.0 + * - :ref:`sphx_glr_projections_conic_conic_equidistant.py` (``conic_equidistant.py``) + - 00:00.157 + - 0.0 diff --git a/v0.14.0/_sources/projections/cyl/cyl_cassini.rst.txt b/v0.14.0/_sources/projections/cyl/cyl_cassini.rst.txt new file mode 100644 index 00000000000..f16d909ae12 --- /dev/null +++ b/v0.14.0/_sources/projections/cyl/cyl_cassini.rst.txt @@ -0,0 +1,96 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/cyl/cyl_cassini.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_projections_cyl_cyl_cassini.py: + + +Cassini cylindrical projection +============================== + +This cylindrical projection was developed in 1745 by César-François Cassini de +Thury for the survey of France. It is occasionally called Cassini-Soldner since +the latter provided the more accurate mathematical analysis that led to the +development of the ellipsoidal formulae. The projection is neither conformal +nor equal-area, and behaves as a compromise between the two end-members. The +distortion is zero along the central meridian. It is best suited for mapping +regions of north-south extent. The central meridian, each meridian 90° away, +and equator are straight lines; all other meridians and parallels are complex +curves. + +**c**\ *lon0/lat0*\ */scale* or **C**\ *lon0/lat0*\ */width* + +The projection is set with **c** or **C**. The projection center is set by +*lon0/lat0*, and the figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 22-34 + + + +.. image-sg:: /projections/cyl/images/sphx_glr_cyl_cassini_001.png + :alt: cyl cassini + :srcset: /projections/cyl/images/sphx_glr_cyl_cassini_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Use the ISO code for Madagascar (MG) and pad it by 2 degrees (+R2) + fig.coast( + region="MG+R2", + projection="C47/-19/12c", + frame="afg", + land="gray80", + water="steelblue", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.287 seconds) + + +.. _sphx_glr_download_projections_cyl_cyl_cassini.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cyl_cassini.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cyl_cassini.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cyl_cassini.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/cyl/cyl_equal_area.rst.txt b/v0.14.0/_sources/projections/cyl/cyl_equal_area.rst.txt new file mode 100644 index 00000000000..27e1e046974 --- /dev/null +++ b/v0.14.0/_sources/projections/cyl/cyl_equal_area.rst.txt @@ -0,0 +1,90 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/cyl/cyl_equal_area.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_projections_cyl_cyl_equal_area.py: + + +Cylindrical equal-area projection +================================= + +This cylindrical projection is actually several projections, depending on what +latitude is selected as the standard parallel. However, they are all equal area +and hence non-conformal. All meridians and parallels are straight lines. + +**y**\ *lon0/lat0*\ */scale* or **Y**\ *lon0/lat0*\ */width* + +The projection is set with **y** or **Y**. The projection center is set by +*lon0/lat0*, and the figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 16-28 + + + +.. image-sg:: /projections/cyl/images/sphx_glr_cyl_equal_area_001.png + :alt: cyl equal area + :srcset: /projections/cyl/images/sphx_glr_cyl_equal_area_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Use region "d" to specify global region (-180/180/-90/90) + fig.coast( + region="d", + projection="Y35/30/12c", + frame="afg", + land="gray80", + water="steelblue", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.196 seconds) + + +.. _sphx_glr_download_projections_cyl_cyl_equal_area.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cyl_equal_area.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cyl_equal_area.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cyl_equal_area.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/cyl/cyl_equidistant.rst.txt b/v0.14.0/_sources/projections/cyl/cyl_equidistant.rst.txt new file mode 100644 index 00000000000..67d0d91e205 --- /dev/null +++ b/v0.14.0/_sources/projections/cyl/cyl_equidistant.rst.txt @@ -0,0 +1,94 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/cyl/cyl_equidistant.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_projections_cyl_cyl_equidistant.py: + + +Cylindrical equidistant projection +================================== + +This simple cylindrical projection is really a linear scaling of longitudes and +latitudes. The most common form is the Plate Carrée projection, where the +scaling of longitudes and latitudes is the same. All meridians and parallels +are straight lines. + +**q**\ [*lon0*/\ [*lat0*/]]\ *scale* or **Q**\ [*lon0*/\ [*lat0*/]]\ *width* + +The projection is set with **q** or **Q**, and the figure size is set with +*scale* or *width*. Optionally, the central meridian can be set with *lon0* +[Default is the middle of the map]. Optionally, the standard parallel can +be set with *lat0* [Default is the equator]. When supplied, the central +meridian must be supplied as well. + +.. GENERATED FROM PYTHON SOURCE LINES 20-32 + + + +.. image-sg:: /projections/cyl/images/sphx_glr_cyl_equidistant_001.png + :alt: cyl equidistant + :srcset: /projections/cyl/images/sphx_glr_cyl_equidistant_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Use region "d" to specify global region (-180/180/-90/90) + fig.coast( + region="d", + projection="Q12c", + frame="afg", + land="gray80", + water="steelblue", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.201 seconds) + + +.. _sphx_glr_download_projections_cyl_cyl_equidistant.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cyl_equidistant.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cyl_equidistant.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cyl_equidistant.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/cyl/cyl_mercator.rst.txt b/v0.14.0/_sources/projections/cyl/cyl_mercator.rst.txt new file mode 100644 index 00000000000..b597db6a563 --- /dev/null +++ b/v0.14.0/_sources/projections/cyl/cyl_mercator.rst.txt @@ -0,0 +1,97 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/cyl/cyl_mercator.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_projections_cyl_cyl_mercator.py: + + +Mercator projection +=================== + +The Mercator projection takes its name from the Flemish cartographer Gheert +Cremer, better known as Gerardus Mercator, who presented it in 1569. The +projection is a cylindrical and conformal, with no distortion along the +equator. A major navigational feature of the projection is that a line of +constant azimuth is straight. Such a line is called a rhumb line or loxodrome. +Thus, to sail from one point to another one only had to connect the points with +a straight line, determine the azimuth of the line, and keep this constant +course for the entire voyage. The Mercator projection has been used extensively +for world maps in which the distortion towards the polar regions grows +rather large. + +**m**\ [*lon0*/\ [*lat0*/]]\ *scale* or **M**\ [*lon0*/\ [*lat0*/]]\ *width* + +The projection is set with **m** or **M**. The central meridian is set with the +optional *lon0* and the standard parallel is set with the optional *lat0*. +The figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 24-35 + + + +.. image-sg:: /projections/cyl/images/sphx_glr_cyl_mercator_001.png + :alt: cyl mercator + :srcset: /projections/cyl/images/sphx_glr_cyl_mercator_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.coast( + region=[0, 360, -80, 80], + projection="M0/0/12c", + frame="afg", + land="gray80", + water="steelblue", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.220 seconds) + + +.. _sphx_glr_download_projections_cyl_cyl_mercator.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cyl_mercator.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cyl_mercator.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cyl_mercator.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/cyl/cyl_miller.rst.txt b/v0.14.0/_sources/projections/cyl/cyl_miller.rst.txt new file mode 100644 index 00000000000..90c5888edc6 --- /dev/null +++ b/v0.14.0/_sources/projections/cyl/cyl_miller.rst.txt @@ -0,0 +1,93 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/cyl/cyl_miller.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_projections_cyl_cyl_miller.py: + + +Miller cylindrical projection +============================= + +This cylindrical projection, presented by Osborn Maitland Miller of the +American Geographic Society in 1942, is neither equal nor conformal. All +meridians and parallels are straight lines. The projection was designed to be a +compromise between Mercator and other cylindrical projections. Specifically, +Miller spaced the parallels by using Mercator's formula with 0.8 times the +actual latitude, thus avoiding the singular poles; the result was then divided +by 0.8. + +**j**\ [*lon0/*]\ */scale* or **J**\ [*lon0/*]\ */width* + +The projection is set with **j** or **J**. The central meridian is set by the +optional *lon0*, and the figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 20-31 + + + +.. image-sg:: /projections/cyl/images/sphx_glr_cyl_miller_001.png + :alt: cyl miller + :srcset: /projections/cyl/images/sphx_glr_cyl_miller_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.coast( + region=[-180, 180, -80, 80], + projection="J-65/12c", + frame="afg", + land="gray80", + water="steelblue", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.206 seconds) + + +.. _sphx_glr_download_projections_cyl_cyl_miller.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cyl_miller.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cyl_miller.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cyl_miller.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/cyl/cyl_oblique_mercator.rst.txt b/v0.14.0/_sources/projections/cyl/cyl_oblique_mercator.rst.txt new file mode 100644 index 00000000000..7fb515ecd78 --- /dev/null +++ b/v0.14.0/_sources/projections/cyl/cyl_oblique_mercator.rst.txt @@ -0,0 +1,180 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/cyl/cyl_oblique_mercator.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_projections_cyl_cyl_oblique_mercator.py: + + +Oblique Mercator projection +=========================== + +Oblique configurations of the cylinder give rise to the oblique Mercator projection. +It is particularly useful when mapping regions of large lateral extent in an oblique +direction. Both parallels and meridians are complex curves. The projection was +developed in the early 1900s by several workers. + +The projection is set with **o** or **O**. There are three different specification +ways (**a**\|\ **A**, **b**\|\ **B**, **c**\|\ **C**) available. For all three +definitions, the upper case letter mean the projection pole is set in the southern +hemisphere [Default is northern hemisphere]. Align the y-axis with the optional +modifier **+v**. The figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 18-25 + +1. Using the origin and azimuth +------------------------------- + +**oa**\|\ **oA**\ *lon0/lat0/azimuth/scale*\[**+v**] or +**Oa**\|\ **OA**\ *lon0/lat0/azimuth/width*\[**+v**] + +The central meridian is set by *lon0/lat0*. The oblique equator is set by *azimuth*. + +.. GENERATED FROM PYTHON SOURCE LINES 25-40 + +.. code-block:: Python + + + import pygmt + + fig = pygmt.Figure() + fig.coast( + projection="Oa-120/25/-30/3c+v", + # Set bottom left and top right coordinates of the figure with "+r" + region="-122/35/-107/22+r", + frame="afg", + land="gray80", + water="steelblue", + ) + fig.show() + + + + + +.. image-sg:: /projections/cyl/images/sphx_glr_cyl_oblique_mercator_001.png + :alt: cyl oblique mercator + :srcset: /projections/cyl/images/sphx_glr_cyl_oblique_mercator_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 41-48 + +2. Using two points +------------------- + +**ob**\|\ **oB**\ *lon0/lat0/lon1/lat1/scale*\ [**+v**] or +**Ob**\|\ **OB**\ *lon0/lat0/lon1/lat1/width*\ [**+v**] + +The central meridian is set by *lon0/lat0*. The oblique equator is set by *lon1/lat1*. + +.. GENERATED FROM PYTHON SOURCE LINES 48-60 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + projection="Ob130/35/25/35/3c", + region="130/35/145/40+r", + frame="afg", + land="gray80", + water="steelblue", + ) + fig.show() + + + + + +.. image-sg:: /projections/cyl/images/sphx_glr_cyl_oblique_mercator_002.png + :alt: cyl oblique mercator + :srcset: /projections/cyl/images/sphx_glr_cyl_oblique_mercator_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 61-68 + +3. Using the origin and projection pole +--------------------------------------- + +**oc**\|\ **oC**\ *lon0/lat0/lonp/latp/scale*\ [**+v**] or +**Oc**\|\ **OC**\ *lon0/lat0/lonp/latp/width*\ [**+v**] + +The central meridian is set by *lon0/lat0*. The projection pole is set by *lonp/latp*. + +.. GENERATED FROM PYTHON SOURCE LINES 68-79 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + projection="Oc280/25.5/22/69/4c", + region="270/20/305/25+r", + frame="afg", + land="gray80", + water="steelblue", + ) + fig.show() + + + + +.. image-sg:: /projections/cyl/images/sphx_glr_cyl_oblique_mercator_003.png + :alt: cyl oblique mercator + :srcset: /projections/cyl/images/sphx_glr_cyl_oblique_mercator_003.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.399 seconds) + + +.. _sphx_glr_download_projections_cyl_cyl_oblique_mercator.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cyl_oblique_mercator.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cyl_oblique_mercator.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cyl_oblique_mercator.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/cyl/cyl_stereographic.rst.txt b/v0.14.0/_sources/projections/cyl/cyl_stereographic.rst.txt new file mode 100644 index 00000000000..51e38da8bc2 --- /dev/null +++ b/v0.14.0/_sources/projections/cyl/cyl_stereographic.rst.txt @@ -0,0 +1,104 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/cyl/cyl_stereographic.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_projections_cyl_cyl_stereographic.py: + + +Cylindrical stereographic projection +==================================== + +The cylindrical stereographic projections are certainly not as notable as other +cylindrical projections, but are still used because of their relative +simplicity and their ability to overcome some of the downsides of other +cylindrical projections, like extreme distortions of the higher latitudes. The +stereographic projections are perspective projections, projecting the sphere +onto a cylinder in the direction of the antipodal point on the equator. The +cylinder crosses the sphere at two standard parallels, equidistant from the +equator. + +**cyl_stere**/\ [*lon0*/\ [*lat0*/]]\ *scale* or +**Cyl_stere**/\ [*lon0*/\ [*lat0*/]]\ *width* + +The projection is set with **cyl_stere** or **Cyl_stere**. The central meridian +is set by the optional *lon0*, and the figure size is set with *scale* or +*width*. + +The standard parallel is typically one of these (but can be any value): + +* 66.159467 - Miller's modified Gall +* 55 - Kamenetskiy's First +* 45 - Gall's Stereographic +* 30 - Bolshoi Sovietskii Atlas Mira or Kamenetskiy's Second +* 0 - Braun's Cylindrical + +.. GENERATED FROM PYTHON SOURCE LINES 32-43 + + + +.. image-sg:: /projections/cyl/images/sphx_glr_cyl_stereographic_001.png + :alt: cyl stereographic + :srcset: /projections/cyl/images/sphx_glr_cyl_stereographic_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.coast( + region="g", + projection="Cyl_stere/30/-20/12c", + frame="afg", + land="gray80", + water="steelblue", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.215 seconds) + + +.. _sphx_glr_download_projections_cyl_cyl_stereographic.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cyl_stereographic.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cyl_stereographic.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cyl_stereographic.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/cyl/cyl_transverse_mercator.rst.txt b/v0.14.0/_sources/projections/cyl/cyl_transverse_mercator.rst.txt new file mode 100644 index 00000000000..4f305e87e81 --- /dev/null +++ b/v0.14.0/_sources/projections/cyl/cyl_transverse_mercator.rst.txt @@ -0,0 +1,93 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/cyl/cyl_transverse_mercator.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_projections_cyl_cyl_transverse_mercator.py: + + +Transverse Mercator projection +============================== + +The transverse Mercator was invented by Johann Heinrich Lambert in 1772. In +this projection the cylinder touches a meridian along which there is no +distortion. The distortion increases away from the central meridian and goes to +infinity at 90° from center. The central meridian, each meridian 90° away from +the center, and equator are straight lines; other parallels and meridians are +complex curves. + +**t**\ *lon0*\ [/\ *lat0*]/\ *scale* or **T**\ *lon0*\ [/\ *lat0*]/\ *width* + +The projection is set with **t** or **T**. The central meridian is set +by *lon0*, the latitude of the origin is set by the optional *lat0*, and the +figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 20-31 + + + +.. image-sg:: /projections/cyl/images/sphx_glr_cyl_transverse_mercator_001.png + :alt: cyl transverse mercator + :srcset: /projections/cyl/images/sphx_glr_cyl_transverse_mercator_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.coast( + region=[20, 50, 30, 45], + projection="T35/12c", + frame="afg", + land="gray80", + water="steelblue", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.177 seconds) + + +.. _sphx_glr_download_projections_cyl_cyl_transverse_mercator.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cyl_transverse_mercator.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cyl_transverse_mercator.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cyl_transverse_mercator.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/cyl/cyl_universal_transverse_mercator.rst.txt b/v0.14.0/_sources/projections/cyl/cyl_universal_transverse_mercator.rst.txt new file mode 100644 index 00000000000..314d16b8957 --- /dev/null +++ b/v0.14.0/_sources/projections/cyl/cyl_universal_transverse_mercator.rst.txt @@ -0,0 +1,114 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/cyl/cyl_universal_transverse_mercator.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_projections_cyl_cyl_universal_transverse_mercator.py: + + +Universal Transverse Mercator projection +======================================== + +A particular subset of the +:doc:`transverse Merctor ` +is the Universal Transverse Mercator (UTM) which was adopted by the US Army +for large-scale military maps. Here, the globe is divided into 60 zones +between 84°S and 84°N, most of which are 6° (in longitude) wide. +Each of these UTM zones have their unique central meridian. +Furthermore, each zone is divided into latitude bands but these are +not needed to specify the projection for most cases. See Figure +:ref:`Universal Transverse Mercator ` for all zone designations. + +.. _GMT_utm_zones: + +.. figure:: https://docs.generic-mapping-tools.org/latest/_images/GMT_utm_zones.png + :width: 700 px + :align: center + + Universal Transverse Mercator zone layout. + +In order to minimize the distortion in any given zone, a scale factor of 0.9996 +has been factored into the formulae (although a standard, you can change this +with :gmt-term:`PROJ_SCALE_FACTOR`). This makes the UTM projection a *secant* +projection and not a *tangent* projection like the +:doc:`transverse Merctor `. +The scale only varies by 1 part in 1,000 from true scale at equator. The +ellipsoidal projection expressions are accurate for map areas that extend +less than 10° away from the central meridian. For larger regions we use the +conformal latitude in the general spherical formulae instead. + +**u**\ *zone/scale* or **U**\ *zone/width* + +The projection is set with **u** or **U**. *zone* sets the zone for the figure, +and the figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 40-52 + + + +.. image-sg:: /projections/cyl/images/sphx_glr_cyl_universal_transverse_mercator_001.png + :alt: cyl universal transverse mercator + :srcset: /projections/cyl/images/sphx_glr_cyl_universal_transverse_mercator_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # UTM Zone is set to 52R + fig.coast( + region=[127.5, 128.5, 26, 27], + projection="U52R/12c", + frame="afg", + land="gray80", + water="steelblue", + ) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.202 seconds) + + +.. _sphx_glr_download_projections_cyl_cyl_universal_transverse_mercator.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cyl_universal_transverse_mercator.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cyl_universal_transverse_mercator.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cyl_universal_transverse_mercator.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/cyl/sg_execution_times.rst.txt b/v0.14.0/_sources/projections/cyl/sg_execution_times.rst.txt new file mode 100644 index 00000000000..ddeca5d1112 --- /dev/null +++ b/v0.14.0/_sources/projections/cyl/sg_execution_times.rst.txt @@ -0,0 +1,61 @@ + +:orphan: + +.. _sphx_glr_projections_cyl_sg_execution_times: + + +Computation times +================= +**00:02.102** total execution time for 9 files **from projections/cyl**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_projections_cyl_cyl_oblique_mercator.py` (``cyl_oblique_mercator.py``) + - 00:00.399 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_cassini.py` (``cyl_cassini.py``) + - 00:00.287 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_mercator.py` (``cyl_mercator.py``) + - 00:00.220 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_stereographic.py` (``cyl_stereographic.py``) + - 00:00.215 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_miller.py` (``cyl_miller.py``) + - 00:00.206 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_universal_transverse_mercator.py` (``cyl_universal_transverse_mercator.py``) + - 00:00.202 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_equidistant.py` (``cyl_equidistant.py``) + - 00:00.201 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_equal_area.py` (``cyl_equal_area.py``) + - 00:00.196 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_transverse_mercator.py` (``cyl_transverse_mercator.py``) + - 00:00.177 + - 0.0 diff --git a/v0.14.0/_sources/projections/index.rst.txt b/v0.14.0/_sources/projections/index.rst.txt new file mode 100644 index 00000000000..294f422b75d --- /dev/null +++ b/v0.14.0/_sources/projections/index.rst.txt @@ -0,0 +1,703 @@ +:orphan: + +Projections +=========== + +PyGMT supports many map projections; see :doc:`/techref/projections` for an overview. +Use the ``projection`` parameter to specify which one you want to use in all plotting +methods. The projection is specified by a one-letter code along with (sometimes optional) +reference longitude and latitude and the width of the map (for example, +**A**\ *lon0/lat0*\ [*/horizon*\ ]\ */width*). The map height is determined based on the +region and projection. + +These are all the available projections: + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ +Azimuthal Projections +--------------------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/azim/images/thumb/sphx_glr_azim_equidistant_thumb.png + :alt: + + :ref:`sphx_glr_projections_azim_azim_equidistant.py` + +.. raw:: html + +
Azimuthal equidistant projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/azim/images/thumb/sphx_glr_azim_general_stereographic_thumb.png + :alt: + + :ref:`sphx_glr_projections_azim_azim_general_stereographic.py` + +.. raw:: html + +
General stereographic projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/azim/images/thumb/sphx_glr_azim_gnomonic_thumb.png + :alt: + + :ref:`sphx_glr_projections_azim_azim_gnomonic.py` + +.. raw:: html + +
Gnomonic projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/azim/images/thumb/sphx_glr_azim_lambert_thumb.png + :alt: + + :ref:`sphx_glr_projections_azim_azim_lambert.py` + +.. raw:: html + +
Lambert azimuthal equal-area projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/azim/images/thumb/sphx_glr_azim_orthographic_thumb.png + :alt: + + :ref:`sphx_glr_projections_azim_azim_orthographic.py` + +.. raw:: html + +
Orthographic projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/azim/images/thumb/sphx_glr_azim_general_perspective_thumb.png + :alt: + + :ref:`sphx_glr_projections_azim_azim_general_perspective.py` + +.. raw:: html + +
Perspective projection
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /projections/azim/azim_equidistant + /projections/azim/azim_general_stereographic + /projections/azim/azim_gnomonic + /projections/azim/azim_lambert + /projections/azim/azim_orthographic + /projections/azim/azim_general_perspective + +Conic Projections +----------------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/conic/images/thumb/sphx_glr_conic_albers_thumb.png + :alt: + + :ref:`sphx_glr_projections_conic_conic_albers.py` + +.. raw:: html + +
Albers conic equal-area projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/conic/images/thumb/sphx_glr_conic_equidistant_thumb.png + :alt: + + :ref:`sphx_glr_projections_conic_conic_equidistant.py` + +.. raw:: html + +
Equidistant conic projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/conic/images/thumb/sphx_glr_conic_lambert_thumb.png + :alt: + + :ref:`sphx_glr_projections_conic_conic_lambert.py` + +.. raw:: html + +
Lambert conic conformal projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/conic/images/thumb/sphx_glr_polyconic_thumb.png + :alt: + + :ref:`sphx_glr_projections_conic_polyconic.py` + +.. raw:: html + +
Polyconic projection
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /projections/conic/conic_albers + /projections/conic/conic_equidistant + /projections/conic/conic_lambert + /projections/conic/polyconic + +Cylindric Projections +--------------------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/cyl/images/thumb/sphx_glr_cyl_cassini_thumb.png + :alt: + + :ref:`sphx_glr_projections_cyl_cyl_cassini.py` + +.. raw:: html + +
Cassini cylindrical projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/cyl/images/thumb/sphx_glr_cyl_equal_area_thumb.png + :alt: + + :ref:`sphx_glr_projections_cyl_cyl_equal_area.py` + +.. raw:: html + +
Cylindrical equal-area projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/cyl/images/thumb/sphx_glr_cyl_equidistant_thumb.png + :alt: + + :ref:`sphx_glr_projections_cyl_cyl_equidistant.py` + +.. raw:: html + +
Cylindrical equidistant projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/cyl/images/thumb/sphx_glr_cyl_stereographic_thumb.png + :alt: + + :ref:`sphx_glr_projections_cyl_cyl_stereographic.py` + +.. raw:: html + +
Cylindrical stereographic projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/cyl/images/thumb/sphx_glr_cyl_mercator_thumb.png + :alt: + + :ref:`sphx_glr_projections_cyl_cyl_mercator.py` + +.. raw:: html + +
Mercator projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/cyl/images/thumb/sphx_glr_cyl_miller_thumb.png + :alt: + + :ref:`sphx_glr_projections_cyl_cyl_miller.py` + +.. raw:: html + +
Miller cylindrical projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/cyl/images/thumb/sphx_glr_cyl_oblique_mercator_thumb.png + :alt: + + :ref:`sphx_glr_projections_cyl_cyl_oblique_mercator.py` + +.. raw:: html + +
Oblique Mercator projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/cyl/images/thumb/sphx_glr_cyl_transverse_mercator_thumb.png + :alt: + + :ref:`sphx_glr_projections_cyl_cyl_transverse_mercator.py` + +.. raw:: html + +
Transverse Mercator projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/cyl/images/thumb/sphx_glr_cyl_universal_transverse_mercator_thumb.png + :alt: + + :ref:`sphx_glr_projections_cyl_cyl_universal_transverse_mercator.py` + +.. raw:: html + +
Universal Transverse Mercator projection
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /projections/cyl/cyl_cassini + /projections/cyl/cyl_equal_area + /projections/cyl/cyl_equidistant + /projections/cyl/cyl_stereographic + /projections/cyl/cyl_mercator + /projections/cyl/cyl_miller + /projections/cyl/cyl_oblique_mercator + /projections/cyl/cyl_transverse_mercator + /projections/cyl/cyl_universal_transverse_mercator + +Miscellaneous Projections +------------------------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/misc/images/thumb/sphx_glr_misc_eckertIV_thumb.png + :alt: + + :ref:`sphx_glr_projections_misc_misc_eckertIV.py` + +.. raw:: html + +
Eckert IV equal-area projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/misc/images/thumb/sphx_glr_misc_eckertVI_thumb.png + :alt: + + :ref:`sphx_glr_projections_misc_misc_eckertVI.py` + +.. raw:: html + +
Eckert VI equal-area projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/misc/images/thumb/sphx_glr_misc_hammer_thumb.png + :alt: + + :ref:`sphx_glr_projections_misc_misc_hammer.py` + +.. raw:: html + +
Hammer projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/misc/images/thumb/sphx_glr_misc_mollweide_thumb.png + :alt: + + :ref:`sphx_glr_projections_misc_misc_mollweide.py` + +.. raw:: html + +
Mollweide projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/misc/images/thumb/sphx_glr_misc_robinson_thumb.png + :alt: + + :ref:`sphx_glr_projections_misc_misc_robinson.py` + +.. raw:: html + +
Robinson projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/misc/images/thumb/sphx_glr_misc_sinusoidal_thumb.png + :alt: + + :ref:`sphx_glr_projections_misc_misc_sinusoidal.py` + +.. raw:: html + +
Sinusoidal projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/misc/images/thumb/sphx_glr_misc_van_der_grinten_thumb.png + :alt: + + :ref:`sphx_glr_projections_misc_misc_van_der_grinten.py` + +.. raw:: html + +
Van der Grinten projection
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/misc/images/thumb/sphx_glr_misc_winkel_tripel_thumb.png + :alt: + + :ref:`sphx_glr_projections_misc_misc_winkel_tripel.py` + +.. raw:: html + +
Winkel Tripel projection
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /projections/misc/misc_eckertIV + /projections/misc/misc_eckertVI + /projections/misc/misc_hammer + /projections/misc/misc_mollweide + /projections/misc/misc_robinson + /projections/misc/misc_sinusoidal + /projections/misc/misc_van_der_grinten + /projections/misc/misc_winkel_tripel + +Non-geographic Projections +-------------------------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/nongeo/images/thumb/sphx_glr_cartesian_linear_thumb.png + :alt: + + :ref:`sphx_glr_projections_nongeo_cartesian_linear.py` + +.. raw:: html + +
Cartesian linear
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/nongeo/images/thumb/sphx_glr_cartesian_logarithmic_thumb.png + :alt: + + :ref:`sphx_glr_projections_nongeo_cartesian_logarithmic.py` + +.. raw:: html + +
Cartesian logarithmic
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/nongeo/images/thumb/sphx_glr_cartesian_power_thumb.png + :alt: + + :ref:`sphx_glr_projections_nongeo_cartesian_power.py` + +.. raw:: html + +
Cartesian power
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /projections/nongeo/images/thumb/sphx_glr_polar_thumb.png + :alt: + + :ref:`sphx_glr_projections_nongeo_polar.py` + +.. raw:: html + +
Polar
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /projections/nongeo/cartesian_linear + /projections/nongeo/cartesian_logarithmic + /projections/nongeo/cartesian_power + /projections/nongeo/polar + + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/misc/misc_eckertIV.rst.txt b/v0.14.0/_sources/projections/misc/misc_eckertIV.rst.txt new file mode 100644 index 00000000000..30bc4c3630f --- /dev/null +++ b/v0.14.0/_sources/projections/misc/misc_eckertIV.rst.txt @@ -0,0 +1,85 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/misc/misc_eckertIV.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_projections_misc_misc_eckertIV.py: + + +Eckert IV equal-area projection +=============================== + +The Eckert IV projection, presented by the German cartographer Max +Eckert-Greiffendorff in 1906, is a pseudo-cylindrical equal-area projection. +Central meridian and all parallels are straight lines; other meridians are +equally spaced elliptical arcs. The scale is true along latitude 40°30'. + +**kf**\ [*lon0/*]\ *scale* or **Kf**\ [*lon0/*]\ *width* + +The projection is set with **kf** or **Kf**. The central meridian is set with +the optional *lon0*, and the figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 17-23 + + + +.. image-sg:: /projections/misc/images/sphx_glr_misc_eckertIV_001.png + :alt: misc eckertIV + :srcset: /projections/misc/images/sphx_glr_misc_eckertIV_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Use region "d" to specify global region (-180/180/-90/90) + fig.coast(region="d", projection="Kf12c", frame="afg", land="ivory", water="bisque4") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.217 seconds) + + +.. _sphx_glr_download_projections_misc_misc_eckertIV.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: misc_eckertIV.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: misc_eckertIV.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: misc_eckertIV.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/misc/misc_eckertVI.rst.txt b/v0.14.0/_sources/projections/misc/misc_eckertVI.rst.txt new file mode 100644 index 00000000000..3f0d74a3ba2 --- /dev/null +++ b/v0.14.0/_sources/projections/misc/misc_eckertVI.rst.txt @@ -0,0 +1,86 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/misc/misc_eckertVI.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_projections_misc_misc_eckertVI.py: + + +Eckert VI equal-area projection +=============================== + +The Eckert VI projections, presented by the German cartographer Max +Eckert-Greiffendorff in 1906, is a pseudo-cylindrical equal-area projection. +Central meridian and all parallels are straight lines; other meridians are +equally spaced sinusoids. The scale is true along latitude 49°16'. + + +**ks**\ [*lon0/*]\ *scale* or **Ks**\ [*lon0/*]\ *width* + +The projection is set with **ks** or **Ks**. The central meridian is set with +the optional *lon0*, and the figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 18-24 + + + +.. image-sg:: /projections/misc/images/sphx_glr_misc_eckertVI_001.png + :alt: misc eckertVI + :srcset: /projections/misc/images/sphx_glr_misc_eckertVI_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Use region "d" to specify global region (-180/180/-90/90) + fig.coast(region="d", projection="Ks12c", frame="afg", land="ivory", water="bisque4") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.212 seconds) + + +.. _sphx_glr_download_projections_misc_misc_eckertVI.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: misc_eckertVI.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: misc_eckertVI.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: misc_eckertVI.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/misc/misc_hammer.rst.txt b/v0.14.0/_sources/projections/misc/misc_hammer.rst.txt new file mode 100644 index 00000000000..ed74d6f4b57 --- /dev/null +++ b/v0.14.0/_sources/projections/misc/misc_hammer.rst.txt @@ -0,0 +1,86 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/misc/misc_hammer.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_projections_misc_misc_hammer.py: + + +Hammer projection +================= + +The equal-area Hammer projection, first presented by the German mathematician +Ernst von Hammer in 1892, is also known as Hammer-Aitoff (the Aitoff projection +looks similar, but is not equal-area). The border is an ellipse, equator and +central meridian are straight lines, while other parallels and meridians are +complex curves. + +**h**\ [*lon0/*]\ *scale* or **H**\ [*lon0/*]\ *width* + +The projection is set with **h** or **H**. The central meridian is set with the +optional *lon0*, and the figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 18-24 + + + +.. image-sg:: /projections/misc/images/sphx_glr_misc_hammer_001.png + :alt: misc hammer + :srcset: /projections/misc/images/sphx_glr_misc_hammer_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Use region "d" to specify global region (-180/180/-90/90) + fig.coast(region="d", projection="H12c", frame="afg", land="ivory", water="bisque4") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.210 seconds) + + +.. _sphx_glr_download_projections_misc_misc_hammer.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: misc_hammer.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: misc_hammer.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: misc_hammer.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/misc/misc_mollweide.rst.txt b/v0.14.0/_sources/projections/misc/misc_mollweide.rst.txt new file mode 100644 index 00000000000..d3e4c717898 --- /dev/null +++ b/v0.14.0/_sources/projections/misc/misc_mollweide.rst.txt @@ -0,0 +1,87 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/misc/misc_mollweide.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_projections_misc_misc_mollweide.py: + + +Mollweide projection +==================== + +This pseudo-cylindrical, equal-area projection was developed by the German +mathematician and astronomer Karl Brandan Mollweide in 1805. Parallels are +unequally spaced straight lines with the meridians being equally spaced +elliptical arcs. The scale is only true along latitudes 40°44' north and south. +The projection is used mainly for global maps showing data distributions. It is +occasionally referenced under the name homalographic projection. + +**w**\ [*lon0/*]\ *scale* or **W**\ [*lon0/*]\ *width* + +The projection is set with **w** or **W**. The central meridian is set with the +optional *lon0*, and the figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 19-25 + + + +.. image-sg:: /projections/misc/images/sphx_glr_misc_mollweide_001.png + :alt: misc mollweide + :srcset: /projections/misc/images/sphx_glr_misc_mollweide_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Use region "d" to specify global region (-180/180/-90/90) + fig.coast(region="d", projection="W12c", frame="afg", land="ivory", water="bisque4") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.218 seconds) + + +.. _sphx_glr_download_projections_misc_misc_mollweide.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: misc_mollweide.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: misc_mollweide.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: misc_mollweide.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/misc/misc_robinson.rst.txt b/v0.14.0/_sources/projections/misc/misc_robinson.rst.txt new file mode 100644 index 00000000000..04e09ef5597 --- /dev/null +++ b/v0.14.0/_sources/projections/misc/misc_robinson.rst.txt @@ -0,0 +1,97 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/misc/misc_robinson.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_projections_misc_misc_robinson.py: + + +Robinson projection +=================== + +The Robinson projection, presented by the American geographer and cartographer +Arthur H. Robinson in 1963, is a modified cylindrical projection that is +neither conformal nor equal-area. Central meridian and all parallels are +straight lines; other meridians are curved. It uses lookup tables rather than +analytic expressions to make the world map "look" right [#f1]_. +The scale is true along latitudes 38° north and south. The projection was +originally developed for use by Rand McNally and is currently used by the +National Geographic Society. + +**n**\ [*lon0/*]\ *scale* or **N**\ [*lon0/*]\ *width* + +The projection is set with **n** or **N**. The central meridian is set with the +optional *lon0*, and the figure size is set with *scale* or *width*. + +.. rubric:: Footnotes + +.. [#f1] Robinson provided a table of y-coordinates for latitudes every 5°. + To project values for intermediate latitudes one must interpolate + the table. Different interpolants may result in slightly different + maps. GMT uses the interpolant selected by the parameter + :gmt-term:`GMT_INTERPOLANT` in the gmt.conf file. + +.. GENERATED FROM PYTHON SOURCE LINES 29-35 + + + +.. image-sg:: /projections/misc/images/sphx_glr_misc_robinson_001.png + :alt: misc robinson + :srcset: /projections/misc/images/sphx_glr_misc_robinson_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Use region "d" to specify global region (-180/180/-90/90) + fig.coast(region="d", projection="N12c", frame="afg", land="ivory", water="bisque4") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.207 seconds) + + +.. _sphx_glr_download_projections_misc_misc_robinson.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: misc_robinson.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: misc_robinson.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: misc_robinson.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/misc/misc_sinusoidal.rst.txt b/v0.14.0/_sources/projections/misc/misc_sinusoidal.rst.txt new file mode 100644 index 00000000000..b2783f00090 --- /dev/null +++ b/v0.14.0/_sources/projections/misc/misc_sinusoidal.rst.txt @@ -0,0 +1,87 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/misc/misc_sinusoidal.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_projections_misc_misc_sinusoidal.py: + + +Sinusoidal projection +===================== + +The sinusoidal projection is one of the oldest known projections, is +equal-area, and has been used since the mid-16th century. It has also been +called the "Equal-area Mercator" projection. The central meridian is a straight +line; all other meridians are sinusoidal curves. Parallels are all equally +spaced straight lines, with scale being true along all parallels (and central +meridian). + +**i**\ [*lon0/*]\ *scale* or **I**\ [*lon0/*]\ *width* + +The projection is set with **i** or **I**. The central meridian is set with the +optional *lon0*, and the figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 19-25 + + + +.. image-sg:: /projections/misc/images/sphx_glr_misc_sinusoidal_001.png + :alt: misc sinusoidal + :srcset: /projections/misc/images/sphx_glr_misc_sinusoidal_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Use region "d" to specify global region (-180/180/-90/90) + fig.coast(region="d", projection="I12c", frame="afg", land="ivory", water="bisque4") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.205 seconds) + + +.. _sphx_glr_download_projections_misc_misc_sinusoidal.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: misc_sinusoidal.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: misc_sinusoidal.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: misc_sinusoidal.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/misc/misc_van_der_grinten.rst.txt b/v0.14.0/_sources/projections/misc/misc_van_der_grinten.rst.txt new file mode 100644 index 00000000000..405c9f07cb3 --- /dev/null +++ b/v0.14.0/_sources/projections/misc/misc_van_der_grinten.rst.txt @@ -0,0 +1,86 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/misc/misc_van_der_grinten.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_projections_misc_misc_van_der_grinten.py: + + +Van der Grinten projection +========================== + +The Van der Grinten projection, presented by Alphons J. van der Grinten in +1904, is neither equal-area nor conformal. Central meridian and Equator are +straight lines; other meridians are arcs of circles. The scale is true along +the Equator only. Its main use is to show the entire world enclosed in a +circle. + +**v**\ [*lon0/*]\ *scale* or **V**\ [*lon0/*]\ *width* + +The projection is set with **v** or **V**. The central meridian is set with the +optional *lon0*, and the figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 18-24 + + + +.. image-sg:: /projections/misc/images/sphx_glr_misc_van_der_grinten_001.png + :alt: misc van der grinten + :srcset: /projections/misc/images/sphx_glr_misc_van_der_grinten_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Use region "d" to specify global region (-180/180/-90/90) + fig.coast(region="d", projection="V12c", frame="afg", land="ivory", water="bisque4") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.244 seconds) + + +.. _sphx_glr_download_projections_misc_misc_van_der_grinten.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: misc_van_der_grinten.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: misc_van_der_grinten.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: misc_van_der_grinten.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/misc/misc_winkel_tripel.rst.txt b/v0.14.0/_sources/projections/misc/misc_winkel_tripel.rst.txt new file mode 100644 index 00000000000..1fa02e89cc5 --- /dev/null +++ b/v0.14.0/_sources/projections/misc/misc_winkel_tripel.rst.txt @@ -0,0 +1,95 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/misc/misc_winkel_tripel.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_projections_misc_misc_winkel_tripel.py: + + +Winkel Tripel projection +======================== + +In 1921, the German mathematician Oswald Winkel made a projection that was to +strike a compromise between the properties of three elements (area, angle and +distance). The German word "tripel" refers to this junction of where each of +these elements are least distorted when plotting global maps. The projection +was popularized when Bartholomew and Son started to use it in its +world-renowned "The Times Atlas of the World" in the mid-20th century. In 1998, +the National Geographic Society made the Winkel Tripel as its map projection of +choice for global maps. + +Naturally, this projection is neither conformal, nor equal-area. Central +meridian and equator are straight lines; other parallels and meridians are +curved. The projection is obtained by averaging the coordinates of the +Equidistant Cylindrical and Aitoff (not Hammer-Aitoff) projections. The poles +map into straight lines 0.4 times the length of equator. + +**r**\ [*lon0/*]\ *scale* or **R**\ [*lon0/*]\ *width* + +The projection is set with **r** or **R**. The central meridian is set with the +optional *lon0*, and the figure size is set with *scale* or *width*. + +.. GENERATED FROM PYTHON SOURCE LINES 27-33 + + + +.. image-sg:: /projections/misc/images/sphx_glr_misc_winkel_tripel_001.png + :alt: misc winkel tripel + :srcset: /projections/misc/images/sphx_glr_misc_winkel_tripel_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # Use region "d" to specify global region (-180/180/-90/90) + fig.coast(region="d", projection="R12c", frame="afg", land="ivory", water="bisque4") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.245 seconds) + + +.. _sphx_glr_download_projections_misc_misc_winkel_tripel.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: misc_winkel_tripel.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: misc_winkel_tripel.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: misc_winkel_tripel.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/misc/sg_execution_times.rst.txt b/v0.14.0/_sources/projections/misc/sg_execution_times.rst.txt new file mode 100644 index 00000000000..489ca215163 --- /dev/null +++ b/v0.14.0/_sources/projections/misc/sg_execution_times.rst.txt @@ -0,0 +1,58 @@ + +:orphan: + +.. _sphx_glr_projections_misc_sg_execution_times: + + +Computation times +================= +**00:01.758** total execution time for 8 files **from projections/misc**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_projections_misc_misc_winkel_tripel.py` (``misc_winkel_tripel.py``) + - 00:00.245 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_van_der_grinten.py` (``misc_van_der_grinten.py``) + - 00:00.244 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_mollweide.py` (``misc_mollweide.py``) + - 00:00.218 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_eckertIV.py` (``misc_eckertIV.py``) + - 00:00.217 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_eckertVI.py` (``misc_eckertVI.py``) + - 00:00.212 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_hammer.py` (``misc_hammer.py``) + - 00:00.210 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_robinson.py` (``misc_robinson.py``) + - 00:00.207 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_sinusoidal.py` (``misc_sinusoidal.py``) + - 00:00.205 + - 0.0 diff --git a/v0.14.0/_sources/projections/nongeo/cartesian_linear.rst.txt b/v0.14.0/_sources/projections/nongeo/cartesian_linear.rst.txt new file mode 100644 index 00000000000..126c6e9e699 --- /dev/null +++ b/v0.14.0/_sources/projections/nongeo/cartesian_linear.rst.txt @@ -0,0 +1,93 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/nongeo/cartesian_linear.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_projections_nongeo_cartesian_linear.py: + + +Cartesian linear +================ + +**X**\ *width*\ [/*height*] or **x**\ *x-scale*\ [/*y-scale*] + +Give the *width* of the figure and the optional *height*. The lower-case version +**x** is similar to **X** but expects an *x-scale* and an optional *y-scale*. + +The Cartesian linear projection is primarily designed for regular floating point +data. To plot geographical data in a linear projection, see the upstream GMT +documentation :gmt-docs:`Geographic coordinates +`. +To make the linear plot using calendar date/time as input coordinates, see the +tutorial :doc:`Plotting datetime charts `. +GMT documentation :gmt-docs:`Calendar time coordinates +`. + +.. GENERATED FROM PYTHON SOURCE LINES 21-31 + + + +.. image-sg:: /projections/nongeo/images/sphx_glr_cartesian_linear_001.png + :alt: cartesian linear + :srcset: /projections/nongeo/images/sphx_glr_cartesian_linear_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + # The region parameter is specified as x_min, x_max, y_min, y_max + fig.basemap(region=[0, 10, 0, 50], projection="X15c/10c", frame=["afg", "+gbisque"]) + fig.plot(x=[3, 9, 2], y=[4, 9, 37], pen="2p,black") + # Plot data points on top of the line + # Use squares with a size of 0.3 centimeters, an "orange" fill and a "black" outline + fig.plot(x=[3, 9, 2], y=[4, 9, 37], style="s0.3c", fill="orange", pen="black") + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.149 seconds) + + +.. _sphx_glr_download_projections_nongeo_cartesian_linear.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cartesian_linear.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cartesian_linear.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cartesian_linear.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/nongeo/cartesian_logarithmic.rst.txt b/v0.14.0/_sources/projections/nongeo/cartesian_logarithmic.rst.txt new file mode 100644 index 00000000000..b4d117cf099 --- /dev/null +++ b/v0.14.0/_sources/projections/nongeo/cartesian_logarithmic.rst.txt @@ -0,0 +1,108 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/nongeo/cartesian_logarithmic.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_projections_nongeo_cartesian_logarithmic.py: + + +Cartesian logarithmic +===================== + +**X**\ *width*\ [**l**][/*height*\ [**l**]] or +**x**\ *x-scale*\ [**l**][/*y-scale*\ [**l**]] + +Give the *width* of the figure and the optional *height*. +The lower-case version **x** is similar to **X** but expects +an *x-scale* and an optional *y-scale*. +Each axis with a logarithmic transformation requires **l** after +its size argument. + +.. GENERATED FROM PYTHON SOURCE LINES 16-46 + + + +.. image-sg:: /projections/nongeo/images/sphx_glr_cartesian_logarithmic_001.png + :alt: cartesian logarithmic + :srcset: /projections/nongeo/images/sphx_glr_cartesian_logarithmic_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Create a list of x-values 0-100 + xline = np.arange(0, 101) + # Create a list of y-values that are the square root of the x-values + yline = xline**0.5 + # Create a list of x-values for every 10 in 0-100 + xpoints = np.arange(0, 101, 10) + # Create a list of y-values that are the square root of the x-values + ypoints = xpoints**0.5 + + fig = pygmt.Figure() + fig.basemap( + region=[1, 100, 0, 10], + # Set a logarithmic transformation on the x-axis + projection="X15cl/10c", + # Set the figures frame and color as well as + # annotations, ticks, and gridlines + frame=["WSne+gbisque", "xa2g3", "ya2f1g2"], + ) + + # Set the line thickness to "2p", the color to "black", and the style to "dashed" + fig.plot(x=xline, y=yline, pen="2p,black,dashed") + + # Plot the square root values on top of the line + # Use squares with a size of 0.3 centimeters, an "orange" fill and a "black" outline + # Symbols are not clipped if they go off the figure + fig.plot(x=xpoints, y=ypoints, style="s0.3c", fill="orange", pen="black", no_clip=True) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.158 seconds) + + +.. _sphx_glr_download_projections_nongeo_cartesian_logarithmic.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cartesian_logarithmic.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cartesian_logarithmic.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cartesian_logarithmic.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/nongeo/cartesian_power.rst.txt b/v0.14.0/_sources/projections/nongeo/cartesian_power.rst.txt new file mode 100644 index 00000000000..90fa7043345 --- /dev/null +++ b/v0.14.0/_sources/projections/nongeo/cartesian_power.rst.txt @@ -0,0 +1,105 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/nongeo/cartesian_power.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_projections_nongeo_cartesian_power.py: + + +Cartesian power +=============== + +**X**\ *width*\ [**p**\ *pvalue*][/*height*\ [**p**\ *pvalue*]] or +**x**\ *x-scale*\ [**p**\ *pvalue*][/*y-scale*\ [**p**\ *pvalue*]] + +Give the *width* of the figure and the optional argument *height*. +The lower-case version **x** is similar to **X** but expects +an *x-scale* and an optional *y-scale*. +Each axis with a power transformation requires **p** and the exponent +for that axis after its size argument. + +.. GENERATED FROM PYTHON SOURCE LINES 16-43 + + + +.. image-sg:: /projections/nongeo/images/sphx_glr_cartesian_power_001.png + :alt: cartesian power + :srcset: /projections/nongeo/images/sphx_glr_cartesian_power_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import numpy as np + import pygmt + + # Create a list of y-values 0-10 + yvalues = np.arange(0, 11) + # Create a list of x-values that are the square of the y-values + xvalues = yvalues**2 + + fig = pygmt.Figure() + fig.basemap( + region=[0, 100, 0, 10], + # Set the power transformation of the x-axis, with a power of 0.5 + projection="X15cp0.5/10c", + # Set the figures frame as well as annotations and ticks + # The "p" forces to show only square numbers as annotations of the x-axis + frame=["WSne+gbisque", "xfga1p", "ya2f1g"], + ) + + # Set the line thickness to "thick" (equals "1p", i.e. 1 point) + # Use as color "black" (default) and as style "solid" (default) + fig.plot(x=xvalues, y=yvalues, pen="thick,black,solid") + + # Plot the data points on top of the line + # Use circles with 0.3 centimeters diameter, with an "orange" fill and a "black" outline + # Symbols are not clipped if they go off the figure + fig.plot(x=xvalues, y=yvalues, style="c0.3c", fill="orange", pen="black", no_clip=True) + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.149 seconds) + + +.. _sphx_glr_download_projections_nongeo_cartesian_power.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cartesian_power.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cartesian_power.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cartesian_power.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/nongeo/polar.rst.txt b/v0.14.0/_sources/projections/nongeo/polar.rst.txt new file mode 100644 index 00000000000..19099d00e51 --- /dev/null +++ b/v0.14.0/_sources/projections/nongeo/polar.rst.txt @@ -0,0 +1,215 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "projections/nongeo/polar.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_projections_nongeo_polar.py: + + +Polar +===== + +Polar projections allow plotting polar coordinate data (e.g. angle :math:`\theta` and +radius *r*). + +The full syntax for polar projections is: + +**P**\ *width*\ [**+a**]\ [**+f**\ [**e**\|\ **p**\|\ *radius*]]\ +[**+r**\ *offset*][**+t**\ *origin*][**+z**\ [**p**\|\ *radius*]] + +Limits are set via the ``region`` parameter +([*theta_min*, *theta_max*, *radius_min*, *radius_max*]). When using **P**\ *width* you +have to give the *width* of the figure. The lower-case version **p** is similar to **P** +but expects a *scale* instead of a width (**p**\ *scale*). + +The following customizing modifiers are available: + +- **+a**: by default, :math:`\theta` refers to the angle that is equivalent to a + counterclockwise rotation with respect to the east direction (standard definition); + **+a** indicates that the input data are rotated clockwise relative to the north + direction (geographical azimuth angle). + +- **+r**\ *offset*: represents the offset of the r-axis. This modifier allows you to + offset the center of the circle from r=0. + +- **+t**\ *origin*: sets the angle corresponding to the east direction which is + equivalent to rotating the entire coordinate axis clockwise; if the **+a** modifier + is used, setting the angle corresponding to the north direction is equivalent to + rotating the entire coordinate axis counterclockwise. + +- **+f**: reverses the radial direction. + + - Append **e** to indicate that the r-axis is an elevation angle, and the range of the + r-axis should be between 0° and 90°. + - Appending **p** sets the current Earth radius (determined by + :gmt-term:`PROJ_ELLIPSOID`) to the maximum value of the r-axis when the r-axis is + reversed. + - Append *radius* to set the maximum value of the r-axis. + +- **+z**: indicates that the r-axis is marked as depth instead of radius (e.g., + *r = radius - z*). + + - Append **p** to set radius to the current Earth radius. + - Append *radius* to set the value of the radius. + +.. GENERATED FROM PYTHON SOURCE LINES 50-153 + + + +.. image-sg:: /projections/nongeo/images/sphx_glr_polar_001.png + :alt: polar + :srcset: /projections/nongeo/images/sphx_glr_polar_001.png + :class: sphx-glr-single-img + + + + + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + + pygmt.config(FONT_TITLE="14p,Courier,black", FORMAT_GEO_MAP="+D") + + # ============ + # Top left + fig.basemap( + # Set map limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1 + region=[0, 360, 0, 1], + # Set map width to 5 cm + projection="P5c", + # Set the frame and title; @^ allows for a line break within the title + frame=["xa45f", "+gbisque+tprojection='P5c' @^ region=[0, 360, 0, 1]"], + ) + + fig.shift_origin(xshift="w+3c") + + # ============ + # Top middle + fig.basemap( + # Set map limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1 + region=[0, 360, 0, 1], + # Set map width to 5 cm and interpret input data as geographic azimuth instead of + # standard angle + projection="P5c+a", + # Set the frame and title; @^ allows for a line break within the title + frame=["xa45f", "+gbisque+tprojection='P5c+a' @^ region=[0, 360, 0, 1]"], + ) + + fig.shift_origin(xshift="w+3c") + + # ============ + # Top right + fig.basemap( + # Set map limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1 + region=[0, 90, 0, 1], + # Set map width to 5 cm and interpret input data as geographic azimuth instead of + # standard angle + projection="P5c+a", + # Set the frame and title; @^ allows for a line break within the title + frame=["xa45f", "ya0.2", "WNe+gbisque+tprojection='P5c+a' @^ region=[0, 90, 0, 1]"], + ) + + fig.shift_origin(xshift="-2w-6c", yshift="-h-2c") + + # ============ + # Bottom left + fig.basemap( + # Set map limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1 + region=[0, 90, 0, 1], + # Set map width to 5 cm and interpret input data as geographic azimuth instead of + # standard angle, rotate coordinate system counterclockwise by 45 degrees + projection="P5c+a+t45", + # Set the frame and title; @^ allows for a line break within the title + frame=[ + "xa30f", + "ya0.2", + "WNe+gbisque+tprojection='P5c+a+t45' @^ region=[0, 90, 0, 1]", + ], + ) + + fig.shift_origin(xshift="w+3c", yshift="1.3c") + + # ============ + # Bottom middle + fig.basemap( + # Set map limits to theta_min = 0, theta_max = 90, radius_min = 3480, + # radius_max = 6371 (Earth's radius) + region=[0, 90, 3480, 6371], + # Set map width to 5 cm and interpret input data as geographic azimuth instead of + # standard angle, rotate coordinate system counterclockwise by 45 degrees + projection="P5c+a+t45", + # Set the frame, and title; @^ allows for a line break within the title + frame=[ + "xa30f", + "ya", + "WNse+gbisque+tprojection='P5c+a+t45' @^ region=[0, 90, 3480, 6371]", + ], + ) + + fig.shift_origin(xshift="w+3c") + + # ============ + # Bottom right + fig.basemap( + # Set map limits to theta_min = 0, theta_max = 90, radius_min = 3480, + # radius_max = 6371 (Earth's radius) + region=[0, 90, 3480, 6371], + # Set map width to 5 cm and interpret input data as geographic azimuth instead of + # standard angle, rotate coordinate system counterclockwise by 45 degrees, r-axis + # is marked as depth + projection="P5c+a+t45+z", + # Set the frame, and title; @^ allows for a line break within the title + frame=[ + "xa30f", + "ya", + "WNse+gbisque+tprojection='P5c+a+t45+\\z' @^ region=[0, 90, 3480, 6371]", + ], + ) + + fig.show() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.264 seconds) + + +.. _sphx_glr_download_projections_nongeo_polar.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: polar.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: polar.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: polar.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/projections/nongeo/sg_execution_times.rst.txt b/v0.14.0/_sources/projections/nongeo/sg_execution_times.rst.txt new file mode 100644 index 00000000000..1b06b88c0e1 --- /dev/null +++ b/v0.14.0/_sources/projections/nongeo/sg_execution_times.rst.txt @@ -0,0 +1,46 @@ + +:orphan: + +.. _sphx_glr_projections_nongeo_sg_execution_times: + + +Computation times +================= +**00:00.720** total execution time for 4 files **from projections/nongeo**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_projections_nongeo_polar.py` (``polar.py``) + - 00:00.264 + - 0.0 + * - :ref:`sphx_glr_projections_nongeo_cartesian_logarithmic.py` (``cartesian_logarithmic.py``) + - 00:00.158 + - 0.0 + * - :ref:`sphx_glr_projections_nongeo_cartesian_power.py` (``cartesian_power.py``) + - 00:00.149 + - 0.0 + * - :ref:`sphx_glr_projections_nongeo_cartesian_linear.py` (``cartesian_linear.py``) + - 00:00.149 + - 0.0 diff --git a/v0.14.0/_sources/projections/sg_execution_times.rst.txt b/v0.14.0/_sources/projections/sg_execution_times.rst.txt new file mode 100644 index 00000000000..bbb7b9853a5 --- /dev/null +++ b/v0.14.0/_sources/projections/sg_execution_times.rst.txt @@ -0,0 +1,37 @@ + +:orphan: + +.. _sphx_glr_projections_sg_execution_times: + + +Computation times +================= +**00:00.000** total execution time for 0 files **from projections**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - N/A + - N/A + - N/A diff --git a/v0.14.0/_sources/sg_execution_times.rst.txt b/v0.14.0/_sources/sg_execution_times.rst.txt new file mode 100644 index 00000000000..a3fbbf84512 --- /dev/null +++ b/v0.14.0/_sources/sg_execution_times.rst.txt @@ -0,0 +1,373 @@ + +:orphan: + +.. _sphx_glr_sg_execution_times: + + +Computation times +================= +**01:19.993** total execution time for 113 files **from all galleries**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_tutorials_advanced_draping_on_3d_surface.py` (``../examples/tutorials/advanced/draping_on_3d_surface.py``) + - 00:07.605 + - 0.0 + * - :ref:`sphx_glr_gallery_maps_country_polygons.py` (``../examples/gallery/maps/country_polygons.py``) + - 00:07.103 + - 0.0 + * - :ref:`sphx_glr_gallery_images_grdgradient_shading.py` (``../examples/gallery/images/grdgradient_shading.py``) + - 00:04.859 + - 0.0 + * - :ref:`sphx_glr_tutorials_basics_regions.py` (``../examples/tutorials/basics/regions.py``) + - 00:03.423 + - 0.0 + * - :ref:`sphx_glr_gallery_images_grdclip.py` (``../examples/gallery/images/grdclip.py``) + - 00:03.212 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_linestrings.py` (``../examples/gallery/lines/linestrings.py``) + - 00:02.878 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_vectors.py` (``../examples/tutorials/advanced/vectors.py``) + - 00:02.503 + - 0.0 + * - :ref:`sphx_glr_gallery_3d_plots_grdview_surface.py` (``../examples/gallery/3d_plots/grdview_surface.py``) + - 00:02.271 + - 0.0 + * - :ref:`sphx_glr_tutorials_basics_frames.py` (``../examples/tutorials/basics/frames.py``) + - 00:01.872 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_working_with_panel.py` (``../examples/tutorials/advanced/working_with_panel.py``) + - 00:01.682 + - 0.0 + * - :ref:`sphx_glr_projections_azim_azim_general_perspective.py` (``../examples/projections/azim/azim_general_perspective.py``) + - 00:01.542 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_cartesian_histograms.py` (``../examples/tutorials/advanced/cartesian_histograms.py``) + - 00:01.492 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_contour_map.py` (``../examples/tutorials/advanced/contour_map.py``) + - 00:01.444 + - 0.0 + * - :ref:`sphx_glr_gallery_maps_tilemaps.py` (``../examples/gallery/maps/tilemaps.py``) + - 00:01.423 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_date_time_charts.py` (``../examples/tutorials/advanced/date_time_charts.py``) + - 00:01.258 + - 0.0 + * - :ref:`sphx_glr_tutorials_basics_text.py` (``../examples/tutorials/basics/text.py``) + - 00:01.245 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_grid_equalization.py` (``../examples/tutorials/advanced/grid_equalization.py``) + - 00:01.243 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_earth_relief.py` (``../examples/tutorials/advanced/earth_relief.py``) + - 00:01.209 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_quoted_lines.py` (``../examples/gallery/lines/quoted_lines.py``) + - 00:01.148 + - 0.0 + * - :ref:`sphx_glr_tutorials_basics_coastlines.py` (``../examples/tutorials/basics/coastlines.py``) + - 00:01.101 + - 0.0 + * - :ref:`sphx_glr_intro_01_first_figure.py` (``../examples/intro/01_first_figure.py``) + - 00:01.055 + - 0.0 + * - :ref:`sphx_glr_gallery_images_rgb_image.py` (``../examples/gallery/images/rgb_image.py``) + - 00:01.046 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_insets.py` (``../examples/tutorials/advanced/insets.py``) + - 00:00.995 + - 0.0 + * - :ref:`sphx_glr_intro_02_contour_map.py` (``../examples/intro/02_contour_map.py``) + - 00:00.993 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_3d_perspective_image.py` (``../examples/tutorials/advanced/3d_perspective_image.py``) + - 00:00.959 + - 0.0 + * - :ref:`sphx_glr_tutorials_basics_lines.py` (``../examples/tutorials/basics/lines.py``) + - 00:00.948 + - 0.0 + * - :ref:`sphx_glr_tutorials_basics_plot.py` (``../examples/tutorials/basics/plot.py``) + - 00:00.752 + - 0.0 + * - :ref:`sphx_glr_gallery_images_image.py` (``../examples/gallery/images/image.py``) + - 00:00.627 + - 0.0 + * - :ref:`sphx_glr_gallery_maps_choropleth_map.py` (``../examples/gallery/maps/choropleth_map.py``) + - 00:00.616 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_subplots.py` (``../examples/tutorials/advanced/subplots.py``) + - 00:00.616 + - 0.0 + * - :ref:`sphx_glr_tutorials_basics_polygons.py` (``../examples/tutorials/basics/polygons.py``) + - 00:00.589 + - 0.0 + * - :ref:`sphx_glr_gallery_histograms_blockm.py` (``../examples/gallery/histograms/blockm.py``) + - 00:00.559 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_configuration.py` (``../examples/tutorials/advanced/configuration.py``) + - 00:00.537 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_inset.py` (``../examples/gallery/embellishments/inset.py``) + - 00:00.493 + - 0.0 + * - :ref:`sphx_glr_intro_04_table_inputs.py` (``../examples/intro/04_table_inputs.py``) + - 00:00.470 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_multi_parameter_symbols.py` (``../examples/gallery/symbols/multi_parameter_symbols.py``) + - 00:00.424 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_oblique_mercator.py` (``../examples/projections/cyl/cyl_oblique_mercator.py``) + - 00:00.399 + - 0.0 + * - :ref:`sphx_glr_gallery_images_grdgradient.py` (``../examples/gallery/images/grdgradient.py``) + - 00:00.390 + - 0.0 + * - :ref:`sphx_glr_gallery_images_track_sampling.py` (``../examples/gallery/images/track_sampling.py``) + - 00:00.386 + - 0.0 + * - :ref:`sphx_glr_gallery_3d_plots_scatter3d.py` (``../examples/gallery/3d_plots/scatter3d.py``) + - 00:00.371 + - 0.0 + * - :ref:`sphx_glr_projections_azim_azim_equidistant.py` (``../examples/projections/azim/azim_equidistant.py``) + - 00:00.368 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_solar.py` (``../examples/gallery/embellishments/solar.py``) + - 00:00.364 + - 0.0 + * - :ref:`sphx_glr_gallery_maps_borders.py` (``../examples/gallery/maps/borders.py``) + - 00:00.362 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_points_categorical.py` (``../examples/gallery/symbols/points_categorical.py``) + - 00:00.350 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_scalebar.py` (``../examples/gallery/embellishments/scalebar.py``) + - 00:00.339 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_timestamp.py` (``../examples/gallery/embellishments/timestamp.py``) + - 00:00.336 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_inset_rectangle_region.py` (``../examples/gallery/embellishments/inset_rectangle_region.py``) + - 00:00.332 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_envelope.py` (``../examples/gallery/lines/envelope.py``) + - 00:00.313 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_colorbars_multiple.py` (``../examples/gallery/embellishments/colorbars_multiple.py``) + - 00:00.309 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_decorated_lines.py` (``../examples/gallery/lines/decorated_lines.py``) + - 00:00.307 + - 0.0 + * - :ref:`sphx_glr_gallery_images_cross_section.py` (``../examples/gallery/images/cross_section.py``) + - 00:00.303 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_vector_styles.py` (``../examples/gallery/lines/vector_styles.py``) + - 00:00.301 + - 0.0 + * - :ref:`sphx_glr_projections_conic_conic_albers.py` (``../examples/projections/conic/conic_albers.py``) + - 00:00.287 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_cassini.py` (``../examples/projections/cyl/cyl_cassini.py``) + - 00:00.287 + - 0.0 + * - :ref:`sphx_glr_intro_03_figure_element.py` (``../examples/intro/03_figure_element.py``) + - 00:00.274 + - 0.0 + * - :ref:`sphx_glr_gallery_histograms_scatter_and_histograms.py` (``../examples/gallery/histograms/scatter_and_histograms.py``) + - 00:00.271 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_vector_heads_tails.py` (``../examples/gallery/lines/vector_heads_tails.py``) + - 00:00.267 + - 0.0 + * - :ref:`sphx_glr_projections_nongeo_polar.py` (``../examples/projections/nongeo/polar.py``) + - 00:00.264 + - 0.0 + * - :ref:`sphx_glr_projections_azim_azim_orthographic.py` (``../examples/projections/azim/azim_orthographic.py``) + - 00:00.246 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_winkel_tripel.py` (``../examples/projections/misc/misc_winkel_tripel.py``) + - 00:00.245 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_van_der_grinten.py` (``../examples/projections/misc/misc_van_der_grinten.py``) + - 00:00.244 + - 0.0 + * - :ref:`sphx_glr_projections_azim_azim_gnomonic.py` (``../examples/projections/azim/azim_gnomonic.py``) + - 00:00.237 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_scatter.py` (``../examples/gallery/symbols/scatter.py``) + - 00:00.237 + - 0.0 + * - :ref:`sphx_glr_gallery_maps_land_and_water.py` (``../examples/gallery/maps/land_and_water.py``) + - 00:00.231 + - 0.0 + * - :ref:`sphx_glr_gallery_maps_shorelines.py` (``../examples/gallery/maps/shorelines.py``) + - 00:00.231 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_line_custom_cpt.py` (``../examples/gallery/lines/line_custom_cpt.py``) + - 00:00.226 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_mercator.py` (``../examples/projections/cyl/cyl_mercator.py``) + - 00:00.220 + - 0.0 + * - :ref:`sphx_glr_projections_azim_azim_lambert.py` (``../examples/projections/azim/azim_lambert.py``) + - 00:00.219 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_mollweide.py` (``../examples/projections/misc/misc_mollweide.py``) + - 00:00.218 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_eckertIV.py` (``../examples/projections/misc/misc_eckertIV.py``) + - 00:00.217 + - 0.0 + * - :ref:`sphx_glr_gallery_images_contours.py` (``../examples/gallery/images/contours.py``) + - 00:00.217 + - 0.0 + * - :ref:`sphx_glr_gallery_histograms_histogram.py` (``../examples/gallery/histograms/histogram.py``) + - 00:00.216 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_bars.py` (``../examples/gallery/symbols/bars.py``) + - 00:00.216 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_great_circles.py` (``../examples/gallery/lines/great_circles.py``) + - 00:00.216 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_stereographic.py` (``../examples/projections/cyl/cyl_stereographic.py``) + - 00:00.215 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_logo.py` (``../examples/gallery/embellishments/logo.py``) + - 00:00.214 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_eckertVI.py` (``../examples/projections/misc/misc_eckertVI.py``) + - 00:00.212 + - 0.0 + * - :ref:`sphx_glr_gallery_seismology_velo_arrow_ellipse.py` (``../examples/gallery/seismology/velo_arrow_ellipse.py``) + - 00:00.212 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_hammer.py` (``../examples/projections/misc/misc_hammer.py``) + - 00:00.210 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_linefronts.py` (``../examples/gallery/lines/linefronts.py``) + - 00:00.210 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_robinson.py` (``../examples/projections/misc/misc_robinson.py``) + - 00:00.207 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_miller.py` (``../examples/projections/cyl/cyl_miller.py``) + - 00:00.206 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_line_segment_ends.py` (``../examples/gallery/lines/line_segment_ends.py``) + - 00:00.206 + - 0.0 + * - :ref:`sphx_glr_projections_misc_misc_sinusoidal.py` (``../examples/projections/misc/misc_sinusoidal.py``) + - 00:00.205 + - 0.0 + * - :ref:`sphx_glr_gallery_basemaps_double_y_axes.py` (``../examples/gallery/basemaps/double_y_axes.py``) + - 00:00.204 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_universal_transverse_mercator.py` (``../examples/projections/cyl/cyl_universal_transverse_mercator.py``) + - 00:00.202 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_equidistant.py` (``../examples/projections/cyl/cyl_equidistant.py``) + - 00:00.201 + - 0.0 + * - :ref:`sphx_glr_gallery_basemaps_ternary.py` (``../examples/gallery/basemaps/ternary.py``) + - 00:00.200 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_equal_area.py` (``../examples/projections/cyl/cyl_equal_area.py``) + - 00:00.196 + - 0.0 + * - :ref:`sphx_glr_projections_azim_azim_general_stereographic.py` (``../examples/projections/azim/azim_general_stereographic.py``) + - 00:00.193 + - 0.0 + * - :ref:`sphx_glr_projections_conic_conic_lambert.py` (``../examples/projections/conic/conic_lambert.py``) + - 00:00.193 + - 0.0 + * - :ref:`sphx_glr_gallery_images_grdlandmask.py` (``../examples/gallery/images/grdlandmask.py``) + - 00:00.186 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_patterns.py` (``../examples/gallery/symbols/patterns.py``) + - 00:00.185 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_basic_symbols.py` (``../examples/gallery/symbols/basic_symbols.py``) + - 00:00.184 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_linestyles.py` (``../examples/gallery/lines/linestyles.py``) + - 00:00.180 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_non_ascii_text.py` (``../examples/tutorials/advanced/non_ascii_text.py``) + - 00:00.180 + - 0.0 + * - :ref:`sphx_glr_projections_cyl_cyl_transverse_mercator.py` (``../examples/projections/cyl/cyl_transverse_mercator.py``) + - 00:00.177 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_points_transparency.py` (``../examples/gallery/symbols/points_transparency.py``) + - 00:00.176 + - 0.0 + * - :ref:`sphx_glr_projections_conic_polyconic.py` (``../examples/projections/conic/polyconic.py``) + - 00:00.168 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_colorbar.py` (``../examples/gallery/embellishments/colorbar.py``) + - 00:00.165 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_points.py` (``../examples/gallery/symbols/points.py``) + - 00:00.165 + - 0.0 + * - :ref:`sphx_glr_gallery_seismology_meca.py` (``../examples/gallery/seismology/meca.py``) + - 00:00.159 + - 0.0 + * - :ref:`sphx_glr_projections_nongeo_cartesian_logarithmic.py` (``../examples/projections/nongeo/cartesian_logarithmic.py``) + - 00:00.158 + - 0.0 + * - :ref:`sphx_glr_projections_conic_conic_equidistant.py` (``../examples/projections/conic/conic_equidistant.py``) + - 00:00.157 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_connection_lines.py` (``../examples/gallery/lines/connection_lines.py``) + - 00:00.157 + - 0.0 + * - :ref:`sphx_glr_projections_nongeo_cartesian_power.py` (``../examples/projections/nongeo/cartesian_power.py``) + - 00:00.149 + - 0.0 + * - :ref:`sphx_glr_projections_nongeo_cartesian_linear.py` (``../examples/projections/nongeo/cartesian_linear.py``) + - 00:00.149 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_custom_symbols.py` (``../examples/gallery/symbols/custom_symbols.py``) + - 00:00.147 + - 0.0 + * - :ref:`sphx_glr_gallery_embellishments_legend.py` (``../examples/gallery/embellishments/legend.py``) + - 00:00.144 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_text_symbols.py` (``../examples/gallery/symbols/text_symbols.py``) + - 00:00.135 + - 0.0 + * - :ref:`sphx_glr_gallery_histograms_rose.py` (``../examples/gallery/histograms/rose.py``) + - 00:00.131 + - 0.0 + * - :ref:`sphx_glr_gallery_symbols_datetime_inputs.py` (``../examples/gallery/symbols/datetime_inputs.py``) + - 00:00.127 + - 0.0 + * - :ref:`sphx_glr_gallery_lines_wiggle.py` (``../examples/gallery/lines/wiggle.py``) + - 00:00.124 + - 0.0 diff --git a/v0.14.0/_sources/team.md.txt b/v0.14.0/_sources/team.md.txt new file mode 100644 index 00000000000..38ca274699a --- /dev/null +++ b/v0.14.0/_sources/team.md.txt @@ -0,0 +1,120 @@ +# PyGMT Team + +We are an international team dedicated to building a Pythonic API for the Generic Mapping +Tools (GMT). + +All are welcome to become involved with the PyGMT project! For more information about how +to get involved, see the [](contributing.md). A more complete list of contributors +is available in the [`AUTHORS.md`](https://github.com/GenericMappingTools/pygmt/blob/main/AUTHORS.md) +file in the source repository. + +Distinguished Contributors are recognized for their substantial contributions to PyGMT, +which may include code, documentation, pull request review, triaging, forum responses, +community building and engagement, outreach, and inclusion and diversity. Maintainers +are recognized for their responsibilities in maintaining the project, as detailed in +the [](maintenance.md). + +New Distinguished Contributors and Active Maintainers are selected and voted by current +Active Maintainers before each release. Maintainers that are inactive for more than one +year will be moved to Distinguished Contributors. + + +## Founders + +:::::{grid} 5 + +::::{grid-item-card} Leonardo Uieda +:padding: 1 +:text-align: center +:img-top: https://avatars.githubusercontent.com/u/290082?v=4 + +[@leouieda](https://github.com/leouieda) +:::: + +::::{grid-item-card} Paul Wessel +:padding: 1 +:text-align: center +:img-top: https://avatars.githubusercontent.com/u/26473567?v=4 + +[@PaulWessel](https://github.com/PaulWessel) +:::: + +::::: + + +## Active Maintainers + +:::::{grid} 5 + +::::{grid-item-card} Dongdong Tian +:padding: 1 +:text-align: center +:img-top: https://avatars.githubusercontent.com/u/3974108?v=4 + +[@seisman](https://github.com/seisman) +:::: + +::::{grid-item-card} Wei Ji Leong +:padding: 1 +:text-align: center +:img-top: https://avatars.githubusercontent.com/u/23487320?v=4 + +[@weiji14](https://github.com/weiji14) +:::: + +::::{grid-item-card} Michael Grund +:padding: 1 +:text-align: center +:img-top: https://avatars.githubusercontent.com/u/23025878?v=4 + +[@michaelgrund](https://github.com/michaelgrund) +:::: + +::::{grid-item-card} Yvonne Fröhlich +:padding: 1 +:text-align: center +:img-top: https://avatars.githubusercontent.com/u/94163266?v=4 + +[@yvonnefroehlich](https://github.com/yvonnefroehlich) +:::: + +::::: + + +## Distinguished Contributors + +:::::{grid} 5 + +::::{grid-item-card} Max Jones +:padding: 1 +:text-align: center +:img-top: https://avatars.githubusercontent.com/u/14077947?v=4 + +[@maxrjones](https://github.com/maxrjones) +:::: + +::::{grid-item-card} Jiayuan Yao +:padding: 1 +:text-align: center +:img-top: https://avatars.githubusercontent.com/u/50591376?v=4 + +[@core-man](https://github.com/core-man) +:::: + +::::{grid-item-card} Liam Toney +:padding: 1 +:text-align: center +:img-top: https://avatars.githubusercontent.com/u/38269494?v=4 + +[@liamtoney](https://github.com/liamtoney) +:::: + +::::{grid-item-card} Will Schlitzer +:padding: 1 +:text-align: center +:img-top: https://avatars.githubusercontent.com/u/29518865?v=4 + +[@willschlitzer](https://github.com/willschlitzer) +:::: + +::::: diff --git a/v0.14.0/_sources/techref/encodings.md.txt b/v0.14.0/_sources/techref/encodings.md.txt new file mode 100644 index 00000000000..18f0a80f20b --- /dev/null +++ b/v0.14.0/_sources/techref/encodings.md.txt @@ -0,0 +1,94 @@ +--- +file_format: mystnb +--- + +```{code-cell} +--- +tags: [remove-input] +--- +from IPython.display import display, Markdown +from pygmt.encodings import charset + + +def get_charset_mdtable(name): + """ + Create a markdown table for a charset. + """ + mappings = charset[name] + + text = "| Octal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |\n" + text += "|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n" + for i in range(0o00, 0o400, 8): + chars = [mappings.get(j) for j in range(i, i + 8)] + if all(v is None for v in chars): # All characters in this row are undefined + continue + row = f"\\{i:03o}"[:-1] + "x" + chars = [f"&#x{ord(char):04x};" for char in chars] + text += f"| **{row}** | {' | '.join(chars)} |\n" + text += "\n" + return Markdown(text) +``` + +# Supported Encodings and Non-ASCII Characters + +PyGMT supports a number of encodings and each encoding contains a set of ASCII and +non-ASCII characters. In PyGMT, you can use any of these ASCII and non-ASCII characters +in arguments and text strings. When using non-ASCII characters in PyGMT, the easiest way +is to copy and paste the character from the encoding tables below. + +**Note**: The special character � (REPLACEMENT CHARACTER) is used to indicate +that the character is undefined in the encoding. + +## Adobe ISOLatin1+ Encoding + +```{code-cell} +--- +tags: [remove-input] +--- +display(get_charset_mdtable("ISOLatin1+")) +``` + +## Adobe Symbol Encoding + +```{code-cell} +--- +tags: [remove-input] +--- +display(get_charset_mdtable("Symbol")) +``` + +**Note**: The octal code `\140` represents the RADICAL EXTENDER character, which is not +available in the Unicode character set. + +## Adobe ZapfDingbats Encoding + +```{code-cell} +--- +tags: [remove-input] +--- +display(get_charset_mdtable("ZapfDingbats")) +``` + +## ISO/IEC 8859 + +PyGMT also supports the ISO/IEC 8859 standard for 8-bit character encodings. Refer to +[ISO/IEC 8859](https://en.wikipedia.org/wiki/ISO/IEC_8859) for descriptions of the +different parts of the standard. + +For a list of the characters in each part of the standard, refer to the following links: + +- [ISO/IEC 8859-1](https://en.wikipedia.org/wiki/ISO/IEC_8859-1) +- [ISO/IEC 8859-2](https://en.wikipedia.org/wiki/ISO/IEC_8859-2) +- [ISO/IEC 8859-3](https://en.wikipedia.org/wiki/ISO/IEC_8859-3) +- [ISO/IEC 8859-4](https://en.wikipedia.org/wiki/ISO/IEC_8859-4) +- [ISO/IEC 8859-5](https://en.wikipedia.org/wiki/ISO/IEC_8859-5) +- [ISO/IEC 8859-6](https://en.wikipedia.org/wiki/ISO/IEC_8859-6) +- [ISO/IEC 8859-7](https://en.wikipedia.org/wiki/ISO/IEC_8859-7) +- [ISO/IEC 8859-8](https://en.wikipedia.org/wiki/ISO/IEC_8859-8) +- [ISO/IEC 8859-9](https://en.wikipedia.org/wiki/ISO/IEC_8859-9) +- [ISO/IEC 8859-10](https://en.wikipedia.org/wiki/ISO/IEC_8859-10) +- [ISO/IEC 8859-11](https://en.wikipedia.org/wiki/ISO/IEC_8859-11) +- [ISO/IEC 8859-13](https://en.wikipedia.org/wiki/ISO/IEC_8859-13) +- [ISO/IEC 8859-14](https://en.wikipedia.org/wiki/ISO/IEC_8859-14) +- [ISO/IEC 8859-15](https://en.wikipedia.org/wiki/ISO/IEC_8859-15) +- [ISO/IEC 8859-16](https://en.wikipedia.org/wiki/ISO/IEC_8859-16) diff --git a/v0.14.0/_sources/techref/environment_variables.md.txt b/v0.14.0/_sources/techref/environment_variables.md.txt new file mode 100644 index 00000000000..cc0ab0605a7 --- /dev/null +++ b/v0.14.0/_sources/techref/environment_variables.md.txt @@ -0,0 +1,46 @@ +# Environment Variables + +PyGMT's behavior can be controlled through various environment variables. These variables +can be set either in your shell environment or within your Python script using the +{py:data}`os.environ` dictionary. + +Here we list the environment variables used by PyGMT which are categorized into three groups: + +1. System environment variables +2. GMT/PyGMT environment variables +3. Module-specific environment variables + +## System Environment Variables + +```{glossary} +TZ + Specify the time zone for the current calendar time. It can be set to a string that + defines the timezone, such as `"UTC"`, `"America/New_York"`, or `"Europe/London"`. + Refer to [Specifying the Time Zone with TZ](https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html) + for the valid format. If not set, the system's default timezone is used. +``` + +## GMT/PyGMT Environment Variables + +```{glossary} +GMT_LIBRARY_PATH + Specify the directory where the GMT shared library is located. This is useful when + GMT is installed in a non-standard location or when you want to use a specific + version of GMT. If not set, PyGMT will attempt to find the GMT library in standard + system locations. + +PYGMT_USE_EXTERNAL_DISPLAY + Whether to use external viewers for displaying images. If set to `"false"`, PyGMT + will not attempt to open images in external viewers. This can be useful when running + tests or building the documentation to avoid popping up windows. +``` + +## Module-Specific Environment Variables + +```{glossary} +X2SYS_HOME + Specify the directory where x2sys databases and related settings will be stored. + This environment variable is used by x2sys-related functions (e.g., + {func}`pygmt.x2sys_init`) to manage and access x2sys data. If not set, these + functions will use a default directory or prompt for a location. +``` diff --git a/v0.14.0/_sources/techref/fonts.md.txt b/v0.14.0/_sources/techref/fonts.md.txt new file mode 100644 index 00000000000..2cb7d7e94a0 --- /dev/null +++ b/v0.14.0/_sources/techref/fonts.md.txt @@ -0,0 +1,114 @@ +--- +file_format: mystnb +--- + +# Supported Fonts + +PyGMT supports the 35 standard PostScript fonts. The table below lists them with their +font numbers and font names. When specifying fonts in PyGMT, you can either give the +font name or just the font number. For example, to use the font "Helvetica", you can use +either `"Helvetica"` or `"0"`. For the special fonts "Symbol" (**12**) and +"ZapfDingbats" (**34**), see the [](/techref/encodings.md) for the character set. +The image below the table shows a visual sample for each font. + +```{code-cell} +--- +tags: [remove-input] +--- +from IPython.display import display, Markdown + +fonts = [ + "Helvetica", + "Helvetica-Bold", + "Helvetica-Oblique", + "Helvetica-BoldOblique", + "Times-Roman", + "Times-Bold", + "Times-Italic", + "Times-BoldItalic", + "Courier", + "Courier-Bold", + "Courier-Oblique", + "Courier-BoldOblique", + "Symbol", + "AvantGarde-Book", + "AvantGarde-BookOblique", + "AvantGarde-Demi", + "AvantGarde-DemiOblique", + "Bookman-Demi", + "Bookman-DemiItalic", + "Bookman-Light", + "Bookman-LightItalic", + "Helvetica-Narrow", + "Helvetica-Narrow-Bold", + "Helvetica-Narrow-Oblique", + "Helvetica-Narrow-BoldOblique", + "NewCenturySchlbk-Roman", + "NewCenturySchlbk-Italic", + "NewCenturySchlbk-Bold", + "NewCenturySchlbk-BoldItalic", + "Palatino-Roman", + "Palatino-Italic", + "Palatino-Bold", + "Palatino-BoldItalic", + "ZapfChancery-MediumItalic", + "ZapfDingbats", +] + +text = "| Font No. | Font Name | Font No. | Font Name |\n" +text += "|:---:|:---|:---:|:---|\n" +for i in range(17): + j = i + 17 + text += f"| {i} | {fonts[i]} | {j} | {fonts[j]} |\n" +text += f"| | | 34 | {fonts[34]} |\n" + +display(Markdown(text)) +``` + +```{code-cell} +--- +tags: [remove-input] +--- +""" +Script to generate visual samples of the fonts. +""" +import pygmt + +x1, x2, dx = 0, 7, 0.75 + +fig = pygmt.Figure() +# Draw the table +fig.basemap(region=[-0.5, 14, -1.5, 18], projection="X14c/-10c", frame=0) +fig.plot(x=[-0.5, 14], y=[-0.5, -0.5]) +for x in (0.5, 6.5, 7.5): + fig.plot(x=[x, x], y=[-1.5, 18]) +# Table header +fig.text( + x=[x1, x1 + dx, x2, x2 + dx], + y=[-1] * 4, + text=["#", "Font Name"] * 2, + justify=["MC", "ML"] * 2, + font="Helvetica-Bold", +) +# Fonts +for i, font in enumerate(fonts): + x0 = x1 if i < 17 else x2 + y0 = i % 17 + font_no, font_name = i, font + + # Deal with special cases + if font in ["Symbol", "ZapfDingbats"]: + font_name = f"{font} @%0%({font})@%%" + if font == "ZapfDingbats": + font_no = "@%0%34@%%" + y0 = 17 + + fig.text( + x=[x0, x0 + dx], + y=[y0] * 2, + text=[font_no, font_name], + justify=["MC", "ML"], + font=font, + ) +fig.show(width=600) +``` diff --git a/v0.14.0/_sources/techref/index.md.txt b/v0.14.0/_sources/techref/index.md.txt new file mode 100644 index 00000000000..bbba3ead6b4 --- /dev/null +++ b/v0.14.0/_sources/techref/index.md.txt @@ -0,0 +1,16 @@ +# Technical Reference + +The Technical Reference section provides detailed information on the technical aspects of +GMT and PyGMT, including supported encodings, fonts, bit and hachure patterns, and other +essential components for creating high-quality visualizations. For additional details, +visit the {gmt-docs}`GMT Technical Reference `. + +```{toctree} +:maxdepth: 1 + +projections.md +fonts.md +patterns.md +encodings.md +environment_variables.md +``` diff --git a/v0.14.0/_sources/techref/patterns.md.txt b/v0.14.0/_sources/techref/patterns.md.txt new file mode 100644 index 00000000000..17deb045aa3 --- /dev/null +++ b/v0.14.0/_sources/techref/patterns.md.txt @@ -0,0 +1,25 @@ +# Bit and hachure patterns + +PyGMT supports a variety of bit and hachure patterns that can be used to fill polygons. + +These patterns can be defined using the following syntax: + +**P**|**p**_pattern_[**+b**_color_][**+f**_color_][**+r**_dpi_] + +*pattern* can either be a number in the range 1-90 or the name of a 1-, 8-, or 24-bit +image raster file. The former will result in one of the 90 predefined 64x64 bit-patterns +provided by GMT (see the figure below). The latter allows the user to create customized, +repeating images using image raster files. + +By specifying upper case **P** instead of **p** the image will be bit-reversed, i.e., +white and black areas will be interchanged (only applies to 1-bit images or predefined +bit-image patterns). For these patterns and other 1-bit images one may specify +alternative **b**ackground and **f**oreground colors (by appending **+b**_color_ and/or +**+f**_color_) that will replace the default white and black pixels, respectively. +Excluding *color* from a fore- or background specification yields a transparent image +where only the back- or foreground pixels will be painted. The **+r**_dpi_ modifier sets +the resolution in dpi. + +The image below shows the 90 predefined bit patterns that can be used in PyGMT. + +![](https://docs.generic-mapping-tools.org/6.5/_images/GMT_App_E.png) diff --git a/v0.14.0/_sources/techref/projections.md.txt b/v0.14.0/_sources/techref/projections.md.txt new file mode 100644 index 00000000000..a6c765f33d8 --- /dev/null +++ b/v0.14.0/_sources/techref/projections.md.txt @@ -0,0 +1,49 @@ +--- +myst: + substitutions: + lon0: "lon{sub}`0`" + lat0: "lat{sub}`0`" + lon1: "lon{sub}`1`" + lat1: "lat{sub}`1`" + lat2: "lat{sub}`2`" + lonp: "lon{sub}`p`" + latp: "lat{sub}`p`" +--- + +# GMT Map Projections + +The table below shows the projection codes for the 31 GMT map projections: + +| PyGMT Projection Argument | Projection Name | +| --- | --- | +| **A**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | [](/projections/azim/azim_lambert.rst) | +| **B**{{ lon0 }}/{{ lat0 }}/{{ lat1 }}/{{ lat2 }}/*width* | [](/projections/conic/conic_albers.rst) | +| **C**{{ lon0 }}/{{ lat0 }}/*width* | [](/projections/cyl/cyl_cassini.rst) | +| **Cyl_stere**/[{{ lon0 }}/[{{ lat0 }}/]]*width* | [](/projections/cyl/cyl_stereographic.rst) | +| **D**{{ lon0 }}/{{ lat0 }}/{{ lat1 }}/{{ lat2 }}/*width* | [](/projections/conic/conic_equidistant.rst) | +| **E**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | [](/projections/azim/azim_equidistant.rst) | +| **F**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | [](/projections/azim/azim_gnomonic.rst) | +| **G**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | [](/projections/azim/azim_orthographic.rst) | +| **G**{{ lon0 }}/{{ lat0 }}/*width*[**+a***azimuth*][**+t***tilt*][**+v***vwidth*/*vheight*][**+w***twist*][**+z***altitude*] | [](/projections/azim/azim_general_perspective.rst) | +| **H**[{{ lon0 }}/]*width* | [](/projections/misc/misc_hammer.rst) | +| **I**[{{ lon0 }}/]*width* | [](/projections/misc/misc_sinusoidal.rst) | +| **J**[{{ lon0 }}/]*width* | [](/projections/cyl/cyl_miller.rst) | +| **Kf**[{{ lon0 }}/]*width* | [](/projections/misc/misc_eckertIV.rst) | +| **Ks**[{{ lon0 }}/]*width* | [](/projections/misc/misc_eckertVI.rst) | +| **L**{{ lon0 }}/{{ lat0 }}/{{ lat1 }}/{{ lat2 }}/*width* | [](/projections/conic/conic_lambert.rst) | +| **M**[{{ lon0 }}/[{{ lat0 }}/]]*width* | [](/projections/cyl/cyl_mercator.rst) | +| **N**[{{ lon0 }}/]*width* | [](/projections/misc/misc_robinson.rst) | +| **Oa**{{ lon0 }}/{{ lat0 }}/*azimuth*/*width*[**+v**] | Oblique Mercator projection: [1. origin and azimuth](/projections/cyl/cyl_oblique_mercator.rst) | +| **Ob**{{ lon0 }}/{{ lat0 }}/{{ lon1 }}/{{ lat1 }}/*width*[**+v**] | Oblique Mercator projection: [2. two points](/projections/cyl/cyl_oblique_mercator.rst) | +| **Oc**{{ lon0 }}/{{ lat0 }}/{{ lonp }}/{{ latp }}/*width*[**+v**] | Oblique Mercator projection: [3. origin and projection pole](/projections/cyl/cyl_oblique_mercator.rst) | +| **P***width*[**+a**][**+f**[**e**\|**p**\|*radius*]][**+r***offset*][**+t***origin*][**+z**[**p**\|*radius*]] | Polar [azimuthal](/projections/nongeo/polar.rst) ({math}`\theta, r`) or cylindrical | +| **Poly**/[{{ lon0 }}/[{{ lat0 }}/]]*width* | [](/projections/conic/polyconic.rst) | +| **Q**[{{ lon0 }}/[{{ lat0 }}/]]*width* | [](/projections/cyl/cyl_equidistant.rst) | +| **R**[{{ lon0 }}/]*width* | [](/projections/misc/misc_winkel_tripel.rst) | +| **S**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | [](/projections/azim/azim_general_stereographic.rst) | +| **T**{{ lon0 }}[/{{ lat0 }}]/*width* | [](/projections/cyl/cyl_transverse_mercator.rst) | +| **U***zone*/*width* | [](/projections/cyl/cyl_universal_transverse_mercator.rst) | +| **V**[{{ lon0 }}/]*width* | [](/projections/misc/misc_van_der_grinten.rst) | +| **W**[{{ lon0 }}/]*width* | [](/projections/misc/misc_mollweide.rst) | +| **X***width*[**l**\|**p***exp*\|**T**\|**t**][/*height*[**l**\|**p***exp*\|**T**\|**t**]][**d**] | Cartesian [linear](/projections/nongeo/cartesian_linear.rst), [logarithmic](/projections/nongeo/cartesian_logarithmic.rst), [power](/projections/nongeo/cartesian_power.rst), and time | +| **Y**{{ lon0 }}/{{ lat0 }}/*width* | [](/projections/cyl/cyl_equal_area.rst) | diff --git a/v0.14.0/_sources/tutorials/advanced/3d_perspective_image.rst.txt b/v0.14.0/_sources/tutorials/advanced/3d_perspective_image.rst.txt new file mode 100644 index 00000000000..79ba70e1c07 --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/3d_perspective_image.rst.txt @@ -0,0 +1,230 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/advanced/3d_perspective_image.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_tutorials_advanced_3d_perspective_image.py: + + +Creating a 3-D perspective image +================================ + +Create 3-D perspective image or surface mesh from a grid +using :meth:`pygmt.Figure.grdview`. + +.. GENERATED FROM PYTHON SOURCE LINES 10-15 + +.. code-block:: Python + + import pygmt + + # Load sample earth relief data + grid = pygmt.datasets.load_earth_relief(resolution="10m", region=[-108, -103, 35, 40]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 16-23 + +The :meth:`pygmt.Figure.grdview` method takes the ``grid`` input. +The ``perspective`` parameter changes the azimuth and elevation of the +viewpoint; the default is [180, 90], which is looking directly down on the +figure and north is "up". The ``zsize`` parameter sets how tall the +three-dimensional portion appears. + +The default grid surface type is *mesh plot*. + +.. GENERATED FROM PYTHON SOURCE LINES 23-40 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdview( + grid=grid, + # Sets the view azimuth as 130 degrees, and the view elevation as 30 + # degrees + perspective=[130, 30], + # Sets the x- and y-axis labels, and annotates the west, south, and east + # axes + frame=["xa", "ya", "WSnE"], + # Sets a Mercator projection on a 15-centimeter figure + projection="M15c", + # Sets the height of the three-dimensional relief at 1.5 centimeters + zsize="1.5c", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_3d_perspective_image_001.png + :alt: 3d perspective image + :srcset: /tutorials/advanced/images/sphx_glr_3d_perspective_image_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 41-43 + +The grid surface type can be set with the ``surftype`` parameter. +The default CPT is *turbo* and can be customized with the ``cmap`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 43-58 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdview( + grid=grid, + perspective=[130, 30], + frame=["xa", "yaf", "WSnE"], + projection="M15c", + zsize="1.5c", + # Set the surftype to "surface" + surftype="s", + # Set the CPT to "geo" + cmap="geo", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_3d_perspective_image_002.png + :alt: 3d perspective image + :srcset: /tutorials/advanced/images/sphx_glr_3d_perspective_image_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 59-61 + +The ``plane`` parameter sets the elevation and color of a plane that provides +a fill below the surface relief. + +.. GENERATED FROM PYTHON SOURCE LINES 61-76 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdview( + grid=grid, + perspective=[130, 30], + frame=["xa", "yaf", "WSnE"], + projection="M15c", + zsize="1.5c", + surftype="s", + cmap="geo", + # Set the plane elevation to 1,000 meters and make the fill "gray" + plane="1000+ggray", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_3d_perspective_image_003.png + :alt: 3d perspective image + :srcset: /tutorials/advanced/images/sphx_glr_3d_perspective_image_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 77-83 + +The ``perspective`` azimuth can be changed to set the direction that is "up" +in the figure. The ``contourpen`` parameter sets the pen used to draw contour +lines on the surface. :meth:`pygmt.Figure.colorbar` can be used to add a +color bar to the figure. The ``cmap`` parameter does not need to be passed +again. To keep the color bar's alignment similar to the figure, use ``True`` +as argument for the ``perspective`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 83-101 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdview( + grid=grid, + # Set the azimuth to -130 (230) degrees and the elevation to 30 degrees + perspective=[-130, 30], + frame=["xaf", "yaf", "WSnE"], + projection="M15c", + zsize="1.5c", + surftype="s", + cmap="geo", + plane="1000+ggrey", + # Set the contour pen thickness to "0.1p" + contourpen="0.1p", + ) + fig.colorbar(perspective=True, frame=["a500", "x+lElevation", "y+lm"]) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_3d_perspective_image_004.png + :alt: 3d perspective image + :srcset: /tutorials/advanced/images/sphx_glr_3d_perspective_image_004.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.959 seconds) + + +.. _sphx_glr_download_tutorials_advanced_3d_perspective_image.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: 3d_perspective_image.ipynb <3d_perspective_image.ipynb>` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: 3d_perspective_image.py <3d_perspective_image.py>` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: 3d_perspective_image.zip <3d_perspective_image.zip>` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/advanced/cartesian_histograms.rst.txt b/v0.14.0/_sources/tutorials/advanced/cartesian_histograms.rst.txt new file mode 100644 index 00000000000..a22bbd49906 --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/cartesian_histograms.rst.txt @@ -0,0 +1,570 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/advanced/cartesian_histograms.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_tutorials_advanced_cartesian_histograms.py: + + +Cartesian histograms +==================== + +Cartesian histograms can be generated using the :meth:`pygmt.Figure.histogram` method. +In this tutorial, different histogram related aspects are addressed: + +- Using vertical and horizontal bars +- Using stair-steps +- Showing counts and frequency percent +- Adding annotations to the bars +- Showing cumulative values +- Using color and pattern as fill for the bars +- Using overlaid, stacked, and grouped bars + +.. GENERATED FROM PYTHON SOURCE LINES 18-19 + +Import the required packages + +.. GENERATED FROM PYTHON SOURCE LINES 19-22 + +.. code-block:: Python + + import numpy as np + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 23-24 + +Generate random data from a normal distribution: + +.. GENERATED FROM PYTHON SOURCE LINES 24-37 + +.. code-block:: Python + + + rng = np.random.default_rng(seed=100) + + # Mean of distribution + mean = 100 + # Standard deviation of distribution + stddev = 20 + + # Create two data sets + data01 = rng.normal(loc=mean, scale=stddev, size=42) + data02 = rng.normal(loc=mean, scale=stddev * 2, size=42) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 38-46 + +Vertical and horizontal bars +---------------------------- + +To define the width of the bins, the ``series`` parameter has to be specified. The +bars can be filled via the ``fill`` parameter with either a color or a pattern (see +later in this tutorial). Use the ``pen`` parameter to adjust width, color, and style +of the outlines. By default, a histogram with vertical bars is created. Horizontal +bars can be achieved via ``horizontal=True``. + +.. GENERATED FROM PYTHON SOURCE LINES 46-90 + +.. code-block:: Python + + + fig = pygmt.Figure() + + # Create histogram for data01 with vertical bars + fig.histogram( + # Define the plot range as a list of xmin, xmax, ymin, ymax + # Let ymin and ymax determined automatically by setting both to the same value + region=[0, 200, 0, 0], + projection="X10c", # Cartesian projection with a width of 10 centimeters + # Add frame, annotations ("a"), ticks ("f"), and y-axis label ("+l") "Counts"; the + # numbers give the steps of annotations and ticks + frame=["WStr", "xaf10", "ya1f1+lCounts"], + data=data01, + # Set the bin width via the "series" parameter + series=10, + # Fill the bars with color "red3" + fill="red3", + # Draw a 1-point thick, solid outline in "darkgray" around the bars + pen="1p,darkgray,solid", + # Choose counts via the "histtype" parameter + histtype=0, + ) + + # Shift plot origin by the figure width ("w") plus 2 centimeters to the right + fig.shift_origin(xshift="w+2c") + + # Create histogram for data01 with horizontal bars + fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WStr", "xaf10", "ya1f1+lCounts"], + data=data01, + series=10, + fill="red3", + pen="1p,darkgray,solid", + histtype=0, + # Use horizontal bars. Note that the x- and y-axis are flipped, with the x-axis + # plotted vertically and the y-axis plotted horizontally. + horizontal=True, + ) + + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_cartesian_histograms_001.png + :alt: cartesian histograms + :srcset: /tutorials/advanced/images/sphx_glr_cartesian_histograms_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 91-96 + +Stair-steps +----------- + +A stair-step diagram can be created by setting ``stairs=True``. Then only the +outer outlines of the bars are drawn, and no internal bars are visible. + +.. GENERATED FROM PYTHON SOURCE LINES 96-131 + +.. code-block:: Python + + + fig = pygmt.Figure() + + # Create histogram for data01 + fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WSne", "xaf10", "ya1f1+lCounts"], + data=data01, + series=10, + # Draw a 1-point thick, dotted outline in "red3" + pen="1p,red3,dotted", + histtype=0, + # Draw stair-steps in stead of bars + stairs=True, + ) + + fig.shift_origin(xshift="w+2c") + + # Create histogram for data02 + fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WSne", "xaf10", "ya1f1+lCounts"], + data=data02, + series=10, + # Draw a 1.5-points thick, dashed outline in "orange" + pen="1.5p,orange,dashed", + histtype=0, + stairs=True, + ) + + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_cartesian_histograms_002.png + :alt: cartesian histograms + :srcset: /tutorials/advanced/images/sphx_glr_cartesian_histograms_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 132-138 + +Counts and frequency percent +---------------------------- + +By default, a histogram showing the counts in each bin is created (``histtype=0``). +To show the frequency percent set the ``histtype`` parameter to ``1``. For further +options please have a look at the documentation of :meth:`pygmt.Figure.histogram`. + +.. GENERATED FROM PYTHON SOURCE LINES 138-173 + +.. code-block:: Python + + + fig = pygmt.Figure() + + # Create histogram for data02 showing counts + fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WSnr", "xaf10", "ya1f1+lCounts"], + data=data02, + series=10, + fill="orange", + pen="1p,darkgray,solid", + # Choose counts via the "histtype" parameter + histtype=0, + ) + + fig.shift_origin(xshift="w+1c") + + # Create histogram for data02 showing frequency percent + fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + # Add suffix % (+u) + frame=["lSnE", "xaf10", "ya2f1+u%+lFrequency percent"], + data=data02, + series=10, + fill="orange", + pen="1p,darkgray,solid", + # Choose frequency percent via the "histtype" parameter + histtype=1, + ) + + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_cartesian_histograms_003.png + :alt: cartesian histograms + :srcset: /tutorials/advanced/images/sphx_glr_cartesian_histograms_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 174-181 + +Cumulative values +----------------- + +To create a histogram showing the cumulative values set ``cumulative=True``. Here, +the bars of the cumulative histogram are filled with a pattern via the ``fill`` +parameter. Annotate each bar with the counts it represents using the ``annotate`` +parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 181-222 + +.. code-block:: Python + + + fig = pygmt.Figure() + + # Create histogram for data01 showing the counts per bin + fig.histogram( + region=[0, 200, 0, len(data01) + 1], + projection="X10c", + frame=["WSne", "xaf10", "ya5f1+lCounts"], + data=data01, + series=10, + fill="red3", + pen="1p,darkgray,solid", + histtype=0, + # Annotate each bar with the counts it represents + annotate=True, + ) + + fig.shift_origin(xshift="w+1c") + + # Create histogram for data01 showing the cumulative counts + fig.histogram( + region=[0, 200, 0, len(data01) + 1], + projection="X10c", + frame=["wSnE", "xaf10", "ya5f1+lCumulative counts"], + data=data01, + series=10, + # Use pattern ("p") number 8 as fill for the bars + # Set the background ("+b") to white [Default] + # Set the foreground ("+f") to black [Default] + fill="p8+bwhite+fblack", + pen="1p,darkgray,solid", + histtype=0, + # Show cumulative counts + cumulative=True, + # Offset ("+o") the label by 10 points in negative y-direction + annotate="+o-10p", + ) + + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_cartesian_histograms_004.png + :alt: cartesian histograms + :srcset: /tutorials/advanced/images/sphx_glr_cartesian_histograms_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 223-235 + +Overlaid bars +------------- + +Overlaid or overlapping bars can be achieved by plotting two or several histograms, +each for one data set, on top of each other. The legend entry can be specified via +the ``label`` parameter. + +Limitations of histograms with overlaid bars are: + +- Mixing of colors or/and patterns +- Visually more colors or/and patterns than data sets +- Visually a "third histogram" (or more in case of more than two data sets) + +.. GENERATED FROM PYTHON SOURCE LINES 235-270 + +.. code-block:: Python + + + fig = pygmt.Figure() + + # Create histogram for data01 + fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WSne", "xaf10", "ya1f1+lCounts"], + data=data01, + series=10, + fill="red3", + pen="1p,darkgray,solid", + histtype=0, + # Set legend entry + label="data01", + ) + + # Create histogram for data02 + # It is plotted on top of the histogram for data01 + fig.histogram( + data=data02, + series=10, + # Fill bars with color "orange", use a transparency of 50% ("@50") + fill="orange@50", + pen="1p,darkgray,solid", + histtype=0, + label="data02", + ) + + # Add legend + fig.legend() + + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_cartesian_histograms_005.png + :alt: cartesian histograms + :srcset: /tutorials/advanced/images/sphx_glr_cartesian_histograms_005.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 271-283 + +Stacked bars +------------ + +Histograms with stacked bars are not directly supported by PyGMT. Thus, before +plotting, combined data sets have to be created from the single data sets. Then, +stacked bars can be achieved similar to overlaid bars via plotting two or several +histograms on top of each other. + +Limitations of histograms with stacked bars are: + +- No common baseline +- Partly not directly clear whether overlaid or stacked bars + +.. GENERATED FROM PYTHON SOURCE LINES 283-320 + +.. code-block:: Python + + + # Combine the two data sets to one data set + data_merge = np.concatenate((data01, data02), axis=None) + + fig = pygmt.Figure() + + # Create histogram for data02 by using the combined data set + fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WSne", "xaf10", "ya1f1+lCounts"], + data=data_merge, + series=10, + fill="orange", + pen="1p,darkgray,solid", + histtype=0, + # The combined data set appears in the final histogram visually as data set data02 + label="data02", + ) + + # Create histogram for data01 + # It is plotted on top of the histogram for data02 + fig.histogram( + data=data01, + series=10, + fill="red3", + pen="1p,darkgray,solid", + histtype=0, + label="data01", + ) + + # Add legend + fig.legend() + + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_cartesian_histograms_006.png + :alt: cartesian histograms + :srcset: /tutorials/advanced/images/sphx_glr_cartesian_histograms_006.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 321-331 + +Grouped bars +------------ + +By setting the ``barwidth`` parameter in respect to the values passed to the +``series`` parameter histograms with grouped bars can be created. + +Limitations of histograms with grouped bars are: + +- Careful setting width and position of the bars in respect to the bin width +- Difficult to see the variations of the single data sets + +.. GENERATED FROM PYTHON SOURCE LINES 331-371 + +.. code-block:: Python + + + # Width used for binning the data + binwidth = 10 + + fig = pygmt.Figure() + + # Create histogram for data01 + fig.histogram( + region=[0, 200, 0, 0], + projection="X10c", + frame=["WSne", "xaf10g10", "ya1f1+lCounts"], + data=data01, + series=binwidth, + fill="red3", + pen="1p,darkgray,solid", + histtype=0, + # Calculate the bar width in respect to the bin width, here for two data sets half + # of the bin width + # Offset ("+o") the bars to align each bar with the left limit of the corresponding + # bin + barwidth=f"{binwidth/2}+o-{binwidth/4}", + label="data01", + ) + + # Create histogram for data02 + fig.histogram( + data=data02, + series=binwidth, + fill="orange", + pen="1p,darkgray,solid", + histtype=0, + barwidth=f"{binwidth/2}+o{binwidth/4}", + label="data02", + ) + + # Add legend + fig.legend() + + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_cartesian_histograms_007.png + :alt: cartesian histograms + :srcset: /tutorials/advanced/images/sphx_glr_cartesian_histograms_007.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.492 seconds) + + +.. _sphx_glr_download_tutorials_advanced_cartesian_histograms.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: cartesian_histograms.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: cartesian_histograms.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: cartesian_histograms.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/advanced/configuration.rst.txt b/v0.14.0/_sources/tutorials/advanced/configuration.rst.txt new file mode 100644 index 00000000000..b7babdce845 --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/configuration.rst.txt @@ -0,0 +1,192 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/advanced/configuration.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_tutorials_advanced_configuration.py: + + +Configuring PyGMT defaults +========================== + +Default GMT parameters can be set globally or locally using :class:`pygmt.config`. + +.. GENERATED FROM PYTHON SOURCE LINES 9-11 + +.. code-block:: Python + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 12-20 + +Configuring default GMT parameters +---------------------------------- + +Users can override default parameters either temporarily (locally) or permanently +(globally) using :class:`pygmt.config`. The full list of default parameters that can +be changed can be found at :gmt-docs:`gmt.conf.html`. + +We demonstrate the usage of :class:`pygmt.config` by configuring a map plot. + +.. GENERATED FROM PYTHON SOURCE LINES 20-29 + +.. code-block:: Python + + + # Start with a basic figure with the default style + fig = pygmt.Figure() + fig.basemap(region=[115, 119.5, 4, 7.5], projection="M10c", frame=True) + fig.coast(land="black", water="skyblue") + + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_configuration_001.png + :alt: configuration + :srcset: /tutorials/advanced/images/sphx_glr_configuration_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 30-40 + +Globally overriding defaults +---------------------------- + +The ``MAP_FRAME_TYPE`` parameter specifies the style of map frame to use, of which +there are 5 options: ``fancy`` (default, see above), ``fancy+``, ``plain``, ``graph`` +(which does not apply to geographical maps) and ``inside``. + +The ``FORMAT_GEO_MAP`` parameter controls the format of geographical tick annotations. +The default uses degrees and minutes. Here we specify the ticks to be a decimal number +of degrees. + +.. GENERATED FROM PYTHON SOURCE LINES 40-53 + +.. code-block:: Python + + + fig = pygmt.Figure() + + # Configuration for the 'current figure' + pygmt.config(MAP_FRAME_TYPE="plain") + pygmt.config(FORMAT_GEO_MAP="ddd.xx") + + fig.basemap(region=[115, 119.5, 4, 7.5], projection="M10c", frame=True) + fig.coast(land="black", water="skyblue") + + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_configuration_002.png + :alt: configuration + :srcset: /tutorials/advanced/images/sphx_glr_configuration_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 54-64 + +Locally overriding defaults +--------------------------- + +It is also possible to temporarily override the default parameters, which is very +useful for limiting the scope of changes to a particular plot. :class:`pygmt.config` +is implemented as a context manager, which handles the setup and teardown of a GMT +session. Python users are likely familiar with the ``with open(...) as file:`` +snippet, which returns a ``file`` context manager. In this way, it can be used to +override a parameter for a single command, or a sequence of commands. An application +of :class:`pygmt.config` as a context manager is shown below: + +.. GENERATED FROM PYTHON SOURCE LINES 64-81 + +.. code-block:: Python + + + fig = pygmt.Figure() + + # This will have a fancy+ frame + with pygmt.config(MAP_FRAME_TYPE="fancy+"): + fig.basemap(region=[115, 119.5, 4, 7.5], projection="M10c", frame=True) + fig.coast(land="black", water="skyblue") + + # Shift plot origin down by the height of the figure to plot another map + fig.shift_origin(yshift="-h") + + # This figure retains the default "fancy" frame + fig.basemap(region=[115, 119.5, 4, 7.5], projection="M10c", frame=True) + fig.coast(land="black", water="skyblue") + + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_configuration_003.png + :alt: configuration + :srcset: /tutorials/advanced/images/sphx_glr_configuration_003.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.537 seconds) + + +.. _sphx_glr_download_tutorials_advanced_configuration.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: configuration.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: configuration.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: configuration.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/advanced/contour_map.rst.txt b/v0.14.0/_sources/tutorials/advanced/contour_map.rst.txt new file mode 100644 index 00000000000..79669795766 --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/contour_map.rst.txt @@ -0,0 +1,239 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/advanced/contour_map.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_tutorials_advanced_contour_map.py: + + +Creating a map with contour lines +================================= + +Plotting a contour map is handled by :meth:`pygmt.Figure.grdcontour`. + +.. GENERATED FROM PYTHON SOURCE LINES 9-15 + +.. code-block:: Python + + import pygmt + + # Load sample earth relief data + grid = pygmt.datasets.load_earth_relief(resolution="05m", region=[-92.5, -82.5, -3, 7]) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 16-24 + +Create contour plot +------------------- + +The :meth:`pygmt.Figure.grdcontour` method takes the grid input. It plots annotated +contour lines, which are thicker and have the elevation/depth written on them, and +unannotated contour lines. In the example below, the default contour line intervals +are 500 meters, with an annotated contour line every 1,000 meters. By default, it +plots the map with the equidistant cylindrical projection and with no frame. + +.. GENERATED FROM PYTHON SOURCE LINES 24-30 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdcontour(grid=grid) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_contour_map_001.png + :alt: contour map + :srcset: /tutorials/advanced/images/sphx_glr_contour_map_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 31-37 + +Contour line settings +--------------------- + +Use the ``annotation`` and ``levels`` parameters to adjust contour line intervals. In +the example below, there are contour intervals every 250 meters and annotated contour +lines every 1,000 meters. + +.. GENERATED FROM PYTHON SOURCE LINES 37-43 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdcontour(grid=grid, annotation=1000, levels=250) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_contour_map_002.png + :alt: contour map + :srcset: /tutorials/advanced/images/sphx_glr_contour_map_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 44-50 + +Contour limits +-------------- + +The ``limit`` parameter sets the minimum and maximum values for the contour lines. The +parameter takes the low and high values, and is either a list (as below) or a string +``limit="-4000/-2000"``. + +.. GENERATED FROM PYTHON SOURCE LINES 50-56 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdcontour(grid=grid, annotation=1000, levels=250, limit=[-4000, -2000]) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_contour_map_003.png + :alt: contour map + :srcset: /tutorials/advanced/images/sphx_glr_contour_map_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 57-62 + +Map settings +------------ + +The :meth:`pygmt.Figure.grdcontour` method accepts additional parameters, including +setting the projection and frame. + +.. GENERATED FROM PYTHON SOURCE LINES 62-75 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdcontour( + grid=grid, + annotation=1000, + levels=250, + limit=[-4000, -2000], + projection="M10c", + frame=True, + ) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_contour_map_004.png + :alt: contour map + :srcset: /tutorials/advanced/images/sphx_glr_contour_map_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 76-85 + +Adding a colormap +----------------- + +The :meth:`pygmt.Figure.grdimage` method can be used to add a colormap to the contour +map. It must be called prior to :meth:`pygmt.Figure.grdcontour` to keep the contour +lines visible on the final map. If the ``projection`` parameter is specified in the +:meth:`pygmt.Figure.grdimage` method, it does not need to be repeated in the +:meth:`pygmt.Figure.grdcontour` method. Finally, a colorbar is added using the +:meth:`pygmt.Figure.colorbar` method. + +.. GENERATED FROM PYTHON SOURCE LINES 85-92 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdimage(grid=grid, cmap="haxby", projection="M10c", frame=True) + fig.grdcontour(grid=grid, annotation=1000, levels=250, limit=[-4000, -2000]) + fig.colorbar(frame=["x+lelevation", "y+lm"]) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_contour_map_005.png + :alt: contour map + :srcset: /tutorials/advanced/images/sphx_glr_contour_map_005.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.444 seconds) + + +.. _sphx_glr_download_tutorials_advanced_contour_map.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: contour_map.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: contour_map.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: contour_map.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/advanced/date_time_charts.rst.txt b/v0.14.0/_sources/tutorials/advanced/date_time_charts.rst.txt new file mode 100644 index 00000000000..c66090d26fb --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/date_time_charts.rst.txt @@ -0,0 +1,599 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/advanced/date_time_charts.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_tutorials_advanced_date_time_charts.py: + + +Plotting datetime charts +======================== + +PyGMT accepts a variety of datetime objects to plot data and create charts. Aside from +the built-in Python ``datetime`` module, PyGMT supports inputs containing ISO formatted +strings as well as objects generated with ``numpy``, ``pandas``, and ``xarray``. These +data types can be used to plot specific points as well as get passed into the ``region`` +parameter to create a range of the data on an axis. + +The following examples will demonstrate how to create plots using these different +datetime objects. + +.. GENERATED FROM PYTHON SOURCE LINES 16-23 + +.. code-block:: Python + + import datetime + + import numpy as np + import pandas as pd + import pygmt + import xarray as xr + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 24-32 + +Using Python's ``datetime`` +--------------------------- + +In this example, Python's built-in ``datetime`` module is used to create data points +stored in the list ``x``. Additionally, dates are passed into the ``region`` parameter +in the format ``[x_start, x_end, y_start, y_end]``, where the date range is plotted on +the x-axis. An additional notable parameter is ``style``, where it's specified that +data points are plotted as circles with a diameter of 0.3 centimeters. + +.. GENERATED FROM PYTHON SOURCE LINES 32-53 + +.. code-block:: Python + + + x = [ + datetime.date(2010, 6, 1), + datetime.date(2011, 6, 1), + datetime.date(2012, 6, 1), + datetime.date(2013, 6, 1), + ] + y = [1, 2, 3, 5] + + fig = pygmt.Figure() + fig.plot( + projection="X10c/5c", + region=[datetime.date(2010, 1, 1), datetime.date(2014, 12, 1), 0, 6], + frame=["WSen", "afg"], + x=x, + y=y, + style="c0.3c", + pen="1p", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_date_time_charts_001.png + :alt: date time charts + :srcset: /tutorials/advanced/images/sphx_glr_date_time_charts_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 54-64 + +In addition to specifying the date, ``datetime`` supports the time at which the data +points were recorded. Using :meth:`datetime.datetime` the ``region`` parameter as well +as data points can be created with both date and time information. + +Some notable differences to the previous example include: + +- Modifying ``frame`` to only include West (left) and South (bottom) borders, and + removing grid lines +- Using circles to plot data points defined by ``c`` in the argument passed through + the ``style`` parameter + +.. GENERATED FROM PYTHON SOURCE LINES 64-92 + +.. code-block:: Python + + + x = [ + datetime.datetime(2021, 1, 1, 3, 45, 1), + datetime.datetime(2021, 1, 1, 6, 15, 1), + datetime.datetime(2021, 1, 1, 13, 30, 1), + datetime.datetime(2021, 1, 1, 20, 30, 1), + ] + y = [5, 3, 1, 2] + + fig = pygmt.Figure() + fig.plot( + projection="X10c/5c", + region=[ + datetime.datetime(2021, 1, 1, 0, 0, 0), + datetime.datetime(2021, 1, 2, 0, 0, 0), + 0, + 6, + ], + frame=["WS", "af"], + x=x, + y=y, + style="c0.4c", + pen="1p", + fill="blue", + ) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_date_time_charts_002.png + :alt: date time charts + :srcset: /tutorials/advanced/images/sphx_glr_date_time_charts_002.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + pygmt-session [WARNING]: Unable to parse 4 longitude strings + + + + +.. GENERATED FROM PYTHON SOURCE LINES 93-107 + +Using ISO Format +---------------- + +In addition to Python's ``datetime`` module, PyGMT also supports passing dates in ISO +format. Basic ISO strings are formatted as ``YYYY-MM-DD`` with each ``-`` delineated +section marking the four-digit year value, two-digit month value, and two-digit day +value, respectively. + +For including the time into an ISO string, the ``T`` character is used, as it can be +seen in the following example. This character is immediately followed by a string +formatted as ``hh:mm:ss`` where each ``:`` delineated section marking the two-digit +hour value, two-digit minute value, and two-digit second value, respectively. The +figure in the following example is plotted over a horizontal range of one year from +2016-01-01 to 2017-01-01. + +.. GENERATED FROM PYTHON SOURCE LINES 107-124 + +.. code-block:: Python + + + x = ["2016-02-01", "2016-06-04T14", "2016-10-04T00:00:15", "2016-12-01T05:00:15"] + y = [1, 3, 5, 2] + + fig = pygmt.Figure() + fig.plot( + projection="X10c/5c", + region=["2016-01-01", "2017-01-01", 0, 6], + frame=["WSen", "afg"], + x=x, + y=y, + style="a0.45c", + pen="1p", + fill="dodgerblue", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_date_time_charts_003.png + :alt: date time charts + :srcset: /tutorials/advanced/images/sphx_glr_date_time_charts_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 125-130 + +.. note:: + + PyGMT doesn't recognize non-ISO datetime strings like "Jun 05, 2018". If your data + contain non-ISO datetime strings, you can convert them to a recognized format + using :func:`pandas.to_datetime` and then pass it to PyGMT. + +.. GENERATED FROM PYTHON SOURCE LINES 133-140 + +Mixing and matching Python ``datetime`` and ISO dates +----------------------------------------------------- + +The following example provides context on how both ``datetime`` and ISO date data can +be plotted using PyGMT. This can be helpful when dates and times are coming from +different sources, meaning conversions do not need to take place between ISO and +datetime in order to create valid plots. + +.. GENERATED FROM PYTHON SOURCE LINES 140-158 + +.. code-block:: Python + + + x = ["2020-02-01", "2020-06-04", "2020-10-04", datetime.datetime(2021, 1, 15)] + y = [1.3, 2.2, 4.1, 3] + + fig = pygmt.Figure() + fig.plot( + projection="X10c/5c", + region=[datetime.datetime(2020, 1, 1), datetime.datetime(2021, 3, 1), 0, 6], + frame=["WSen", "afg"], + x=x, + y=y, + style="i0.4c", + pen="1p", + fill="yellow", + ) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_date_time_charts_004.png + :alt: date time charts + :srcset: /tutorials/advanced/images/sphx_glr_date_time_charts_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 159-170 + +Using :meth:`pandas.date_range` +------------------------------- + +In the following example, :func:`pandas.date_range` produces a list of +:class:`pandas.DatetimeIndex` objects, which is used to pass date data to the PyGMT +figure. Specifically ``x`` contains 7 different :class:`pandas.DatetimeIndex` objects, +with the number being manipulated by the ``periods`` parameter. Each period begins at +the start of a business quarter as denoted by BQS when passed to the ``freq`` +parameter. The initial date is the first argument that is passed to +:func:`pandas.date_range` and it marks the first data point in the list ``x`` that +will be plotted. + +.. GENERATED FROM PYTHON SOURCE LINES 170-188 + +.. code-block:: Python + + + x = pd.date_range("2018-03-01", periods=7, freq="BQS") + y = [4, 5, 6, 8, 6, 3, 5] + + fig = pygmt.Figure() + fig.plot( + projection="X10c/10c", + region=[datetime.datetime(2017, 12, 31), datetime.datetime(2019, 12, 31), 0, 10], + frame=["WSen", "ag"], + x=x, + y=y, + style="i0.4c", + pen="1p", + fill="purple", + ) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_date_time_charts_005.png + :alt: date time charts + :srcset: /tutorials/advanced/images/sphx_glr_date_time_charts_005.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 189-198 + +Using :class:`xarray.DataArray` +------------------------------- + +In this example, instead of using a list of :class:`pandas.DatetimeIndex` objects, +``x`` is initialized as an :class:`xarray.DataArray` object. This object provides a +wrapper around numpy ndarrays. It also allows the data to have labeled dimensions +while supporting operations that use various pieces of metadata. The following code +uses :func:`pandas.date_range` to fill the DataArray with data, but this is not +essential for the creation of a valid DataArray. + +.. GENERATED FROM PYTHON SOURCE LINES 198-216 + +.. code-block:: Python + + + x = xr.DataArray(data=pd.date_range(start="2020-01-01", periods=4, freq="QE")) + y = [4, 7, 5, 6] + + fig = pygmt.Figure() + fig.plot( + projection="X10c/10c", + region=[datetime.datetime(2020, 1, 1), datetime.datetime(2021, 4, 1), 0, 10], + frame=["WSen", "ag"], + x=x, + y=y, + style="n0.4c", + pen="1p", + fill="red", + ) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_date_time_charts_006.png + :alt: date time charts + :srcset: /tutorials/advanced/images/sphx_glr_date_time_charts_006.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 217-224 + +Using :class:`numpy.datetime64` +------------------------------- + +In this example, instead of using :func:`pd.date_range`, ``x`` is initialized as an +``np.array`` object. Similar to :class:`xarray.DataArray` this wraps the dataset +before passing it as an argument. However, ``np.array`` objects use less memory and +allow developers to specify data types. + +.. GENERATED FROM PYTHON SOURCE LINES 224-244 + +.. code-block:: Python + + + x = np.array( + ["2010-06-01", "2011-06-01T12", "2012-01-01T12:34:56"], dtype=np.datetime64 + ) + y = [2, 7, 5] + + fig = pygmt.Figure() + fig.plot( + projection="X10c/10c", + region=[datetime.datetime(2010, 1, 1), datetime.datetime(2012, 6, 1), 0, 10], + frame=["WS", "ag"], + x=x, + y=y, + style="s0.5c", + pen="1p", + fill="blue", + ) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_date_time_charts_007.png + :alt: date time charts + :srcset: /tutorials/advanced/images/sphx_glr_date_time_charts_007.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 245-253 + +Generating an automatic region +------------------------------ + +Another way of creating charts involving datetime data can be done by automatically +generating the region of the plot. This can be done by passing the DataFrame to +:func:`pygmt.info`, which will find the maximum and minimum values for each column and +create a list that could be passed as region. Additionally, the ``spacing`` parameter +can be used to increase the range past the maximum and minimum data points. + +.. GENERATED FROM PYTHON SOURCE LINES 253-283 + +.. code-block:: Python + + + data = [ + ["20200712", 1000], + ["20200714", 1235], + ["20200716", 1336], + ["20200719", 1176], + ["20200721", 1573], + ["20200724", 1893], + ["20200729", 1634], + ] + df = pd.DataFrame(data, columns=["Date", "Score"]) + df.Date = pd.to_datetime(df["Date"], format="%Y%m%d") + region = pygmt.info( + data=df[["Date", "Score"]], per_column=True, spacing=(700, 700), coltypes="T" + ) + + fig = pygmt.Figure() + fig.plot( + region=region, + projection="X15c/10c", + frame=["WSen", "afg"], + x=df.Date, + y=df.Score, + style="c0.4c", + pen="1p", + fill="green3", + ) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_date_time_charts_008.png + :alt: date time charts + :srcset: /tutorials/advanced/images/sphx_glr_date_time_charts_008.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 284-303 + +Setting Primary and Secondary Time Axes +--------------------------------------- + +This example focuses on annotating the axes and setting the interval in which the +annotations should appear. All of these modifications are passed to the ``frame`` +parameter and each item in that list modifies a specific aspect of the frame. + +Adding ``"WS"`` means that only the Western/Left (**W**) and Southern/Bottom (**S**) +borders of the plot are annotated. For more information on this, please refer to the +:doc:`Frames, ticks, titles, and labels tutorial `. + +Another important item in the list passed to ``frame`` is ``"sxa1Of1D"``. This string +modifies the secondary annotation (**s**) of the x-axis (**x**). Specifically, it sets +the main annotation and major tick spacing interval to one month (**a1O**) (capital +letter O, not zero). Additionally, it sets the minor tick spacing interval to 1 day +(**f1D**). To use the month name instead of its number set :gmt-term:`FORMAT_DATE_MAP` +to **o**. More information on configuring date formats can be found at +:gmt-term:`FORMAT_DATE_MAP`, :gmt-term:`FORMAT_DATE_IN`, and +:gmt-term:`FORMAT_DATE_OUT`. + +.. GENERATED FROM PYTHON SOURCE LINES 303-321 + +.. code-block:: Python + + + x = pd.date_range("2013-05-02", periods=10, freq="2D") + y = [4, 5, 6, 8, 9, 5, 8, 9, 4, 2] + + fig = pygmt.Figure() + with pygmt.config(FORMAT_DATE_MAP="o"): + fig.plot( + projection="X15c/10c", + region=[datetime.datetime(2013, 5, 1), datetime.datetime(2013, 5, 25), 0, 10], + frame=["WS", "sxa1Of1D", "pxa5d", "sy+lLength", "pya1+ucm"], + x=x, + y=y, + style="c0.4c", + pen="1p", + fill="green3", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_date_time_charts_009.png + :alt: date time charts + :srcset: /tutorials/advanced/images/sphx_glr_date_time_charts_009.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 322-333 + +The same concept shown above can be applied to smaller as well as larger intervals. In +this example, data are plotted for different times throughout two days. The primary +x-axis annotations are modified to repeat every 6 hours, and the secondary x-axis +annotations repeat every day and show the day of the week. + +Another notable mention in this example is setting :gmt-term:`FORMAT_CLOCK_MAP` to +**-hhAM** which specifies the format used for time. In this case, leading zeros are +removed using (**-**), and only hours are displayed. Additionally, an AM/PM system is +used instead of a 24-hour system. More information on configuring time formats can be +found at :gmt-term:`FORMAT_CLOCK_MAP`, :gmt-term:`FORMAT_CLOCK_IN`, and +:gmt-term:`FORMAT_CLOCK_OUT`. + +.. GENERATED FROM PYTHON SOURCE LINES 333-356 + +.. code-block:: Python + + + x = pd.date_range("2021-04-15", periods=8, freq="6h") + y = [2, 5, 3, 1, 5, 7, 9, 6] + + fig = pygmt.Figure() + with pygmt.config(FORMAT_CLOCK_MAP="-hhAM"): + fig.plot( + projection="X15c/10c", + region=[ + datetime.datetime(2021, 4, 14, 23, 0, 0), + datetime.datetime(2021, 4, 17), + 0, + 10, + ], + frame=["WS", "sxa1K", "pxa6H", "sy+lSpeed", "pya1+ukm/h"], + x=x, + y=y, + style="n0.4c", + pen="1p", + fill="lightseagreen", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_date_time_charts_010.png + :alt: date time charts + :srcset: /tutorials/advanced/images/sphx_glr_date_time_charts_010.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.258 seconds) + + +.. _sphx_glr_download_tutorials_advanced_date_time_charts.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: date_time_charts.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: date_time_charts.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: date_time_charts.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/advanced/draping_on_3d_surface.rst.txt b/v0.14.0/_sources/tutorials/advanced/draping_on_3d_surface.rst.txt new file mode 100644 index 00000000000..885251478da --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/draping_on_3d_surface.rst.txt @@ -0,0 +1,281 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/advanced/draping_on_3d_surface.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_tutorials_advanced_draping_on_3d_surface.py: + + +Draping a dataset on top of a topographic surface +================================================== + +It can be visually appealing to "drape" a dataset over a topographic surface. This can +be accomplished using the ``drapegrid`` parameter of :meth:`pygmt.Figure.grdview`. + +This tutorial consists of two examples: + +1. Draping a grid + +2. Draping an image + +.. GENERATED FROM PYTHON SOURCE LINES 16-22 + +.. code-block:: Python + + + # Load the required packages + import pygmt + import rasterio + import xarray as xr + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 23-28 + +1. Drapping a grid +------------------ + +In the first example, the seafloor crustal age is plotted with color-coding on top of +the topographic map of an area of the Mid-Atlantic Ridge. + +.. GENERATED FROM PYTHON SOURCE LINES 28-40 + +.. code-block:: Python + + + # Define the study area in degrees East or North + region_2d = [-50, 0, 36, 70] # [lon_min, lon_max, lat_min, lat_max] + + # Download elevation and crustal age grids for the study region with a resolution of 10 + # arc-minutes and load them into xarray.DataArrays + grd_relief = pygmt.datasets.load_earth_relief(resolution="10m", region=region_2d) + grd_age = pygmt.datasets.load_earth_age(resolution="10m", region=region_2d) + + # Determine the 3-D region from the minimum and maximum values of the relief grid + region_3d = [*region_2d, grd_relief.min().to_numpy(), grd_relief.max().to_numpy()] + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + gmtread [NOTICE]: Remote data courtesy of GMT data server oceania [http://oceania.generic-mapping-tools.org] + gmtread [NOTICE]: EarthByte Earth Seafloor Age at 10x10 arc minutes reduced by Gaussian Cartesian filtering (52.4 km fullwidth) [Seton et al., 2020]. + gmtread [NOTICE]: -> Download grid file [1.3M]: earth_age_10m_g.grd + + + + +.. GENERATED FROM PYTHON SOURCE LINES 41-48 + +The topographic surface is created based on the grid passed to the ``grid`` parameter +of :meth:`pygmt.Figure.grdview`; here we use a grid of the Earth relief. To add a +color-coding based on *another* grid we have to pass a second grid to the +``drapegrid`` parameter; here we use a grid of the crustal age. In this case the +colormap specified via the ``cmap`` parameter applies to the grid passed to +``drapegrid``, not to ``grid``. The azimuth and elevation of the 3-D plot are set via +the ``perspective`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 48-78 + +.. code-block:: Python + + + fig = pygmt.Figure() + + # Set up colormap for the crustal age + pygmt.config(COLOR_NAN="lightgray") + pygmt.makecpt(cmap="batlow", series=[0, 200, 1], reverse=True, overrule_bg=True) + + fig.grdview( + projection="M12c", # Mercator projection with a width of 12 centimeters + region=region_3d, + grid=grd_relief, # Use elevation grid for z values + drapegrid=grd_age, # Use crustal age grid for color-coding + cmap=True, # Use colormap created for the crustal age + surftype="i", # Create an image plot + # Use an illumination from the azimuthal directions 0° (north) and 270° + # (west) with a normalization via a cumulative Laplace distribution for + # the shading + shading="+a0/270+ne0.6", + perspective=[157.5, 30], # Azimuth and elevation for the 3-D plot + zsize="1.5c", + plane="+gdarkgray", + frame=True, + ) + + # Add colorbar for the crustal age + fig.colorbar(frame=["x+lseafloor crustal age", "y+lMyr"], position="+n") + + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_draping_on_3d_surface_001.png + :alt: draping on 3d surface + :srcset: /tutorials/advanced/images/sphx_glr_draping_on_3d_surface_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 79-87 + +2. Draping an image +------------------- + +In the second example, the flag of the European Union (EU) is plotted on top of a +topographic map of northwest Europe. This example is modified from +:gmt-docs:`GMT example 32 `. +We have to consider the dimension of the image we want to drap. The image we will +download in this example has 1000 x 667 pixels, i.e. an aspect ratio of 3 x 2. + +.. GENERATED FROM PYTHON SOURCE LINES 87-106 + +.. code-block:: Python + + + # Define the study area in degrees East or North, with an extend of 6 degrees for + # the longitude and 4 degrees for the latitude + region_2d = [3, 9, 50, 54] # [lon_min, lon_max, lat_min, lat_max] + + # Download elevation grid for the study region with a resolution of 30 arc-seconds and + # pixel registration and load it into an xarray.DataArray + grd_relief = pygmt.datasets.load_earth_relief(resolution="30s", region=region_2d) + + # Determine the 3-D region from the minimum and maximum values of the relief grid + region_3d = [*region_2d, grd_relief.min().to_numpy(), grd_relief.max().to_numpy()] + + # Download an PNG image of the flag of the EU using rasterio and load it into a + # xarray.DataArray + url_to_image = "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Flag_of_Europe.svg/1000px-Flag_of_Europe.svg.png" + with rasterio.open(url_to_image) as dataset: + data = dataset.read() + drapegrid = xr.DataArray(data, dims=("band", "y", "x")) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + grdblend [NOTICE]: Remote data courtesy of GMT data server oceania [http://oceania.generic-mapping-tools.org] + grdblend [NOTICE]: SRTM15 Earth Relief v2.6 at 30x30 arc seconds reduced by Gaussian Cartesian filtering (2.6 km fullwidth) [Tozer et al., 2019]. + grdblend [NOTICE]: -> Download 15x15 degree grid tile (earth_relief_30s_g): N45E000 + /home/runner/micromamba/envs/pygmt/lib/python3.13/site-packages/rasterio/__init__.py:356: NotGeoreferencedWarning: Dataset has no geotransform, gcps, or rpcs. The identity matrix will be returned. + dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs) + + + + +.. GENERATED FROM PYTHON SOURCE LINES 107-111 + +Again we create a 3-D plot with :meth:`pygmt.Figure.grdview` and pass an Earth relief +grid to the ``grid`` parameter to create the topographic surface. But now we pass the +PNG image which was loaded into an :class:`xarray.DataArray` to the ``drapgrid`` +parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 111-137 + +.. code-block:: Python + + + fig = pygmt.Figure() + + # Set up a colormap with two colors for the EU flag: blue (0/51/153) for the background + # (value 0 in the netCDF file -> lower half of 0-255 range) and yellow (255/204/0) for + # the stars (value 255 -> upper half) + pygmt.makecpt(cmap="0/51/153,255/204/0", series=[0, 256, 128]) + + fig.grdview( + projection="M12c", # Mercator projection with a width of 12 centimeters + region=region_3d, + grid=grd_relief, # Use elevation grid for z values + drapegrid=drapegrid, # Drap image grid for the EU flag on top + cmap=True, # Use colormap defined for the EU flag + surftype="i", # Create an image plot + # Use an illumination from the azimuthal directions 0° (north) and 270° (west) with + # a normalization via a cumulative Laplace distribution for the shading + shading="+a0/270+ne0.6", + perspective=[157.5, 30], # Define azimuth, elevation for the 3-D plot + zsize="1c", + plane="+gdarkgray", + frame=True, + ) + + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_draping_on_3d_surface_002.png + :alt: draping on 3d surface + :srcset: /tutorials/advanced/images/sphx_glr_draping_on_3d_surface_002.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + /home/runner/micromamba/envs/pygmt/lib/python3.13/site-packages/rasterio/__init__.py:366: NotGeoreferencedWarning: The given matrix is equal to Affine.identity or its flipped counterpart. GDAL may ignore this matrix and save no geotransform without raising an error. This behavior is somewhat driver-specific. + dataset = writer( + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 7.605 seconds) + + +.. _sphx_glr_download_tutorials_advanced_draping_on_3d_surface.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: draping_on_3d_surface.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: draping_on_3d_surface.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: draping_on_3d_surface.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/advanced/earth_relief.rst.txt b/v0.14.0/_sources/tutorials/advanced/earth_relief.rst.txt new file mode 100644 index 00000000000..a18e0b1251c --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/earth_relief.rst.txt @@ -0,0 +1,282 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/advanced/earth_relief.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_tutorials_advanced_earth_relief.py: + + +Plotting Earth relief +===================== + +PyGMT provides the :func:`pygmt.datasets.load_earth_relief` function to download the +Earth relief data from the GMT remote server and load as an :class:`xarray.DataArray` +object. The data can then be plotted using the :meth:`pygmt.Figure.grdimage` method. + +.. GENERATED FROM PYTHON SOURCE LINES 11-13 + +.. code-block:: Python + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 14-16 + +Load sample Earth relief data for the entire globe at a resolution of 1 arc-degree. +Refer to :func:`pygmt.datasets.load_earth_relief` for the other available resolutions. + +.. GENERATED FROM PYTHON SOURCE LINES 16-19 + +.. code-block:: Python + + grid = pygmt.datasets.load_earth_relief(resolution="01d") + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-27 + +Create a plot +------------- + +The :meth:`pygmt.Figure.grdimage` method takes the ``grid`` input to create a figure. +It creates and applies a color palette to the figure based upon the z-values of the +data. By default, it plots the map with the *turbo* CPT, an equidistant cylindrical +projection, and with no frame. + +.. GENERATED FROM PYTHON SOURCE LINES 27-32 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdimage(grid=grid) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_earth_relief_001.png + :alt: earth relief + :srcset: /tutorials/advanced/images/sphx_glr_earth_relief_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 33-37 + +:meth:`pygmt.Figure.grdimage` can take the optional parameter ``projection`` for the +map. In the example below, ``projection`` is set to ``"R12c"`` for a +12-centimeters-wide figure with a Winkel Tripel projection. For a list of available +projections, see :doc:`/techref/projections`. + +.. GENERATED FROM PYTHON SOURCE LINES 37-43 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdimage(grid=grid, projection="R12c") + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_earth_relief_002.png + :alt: earth relief + :srcset: /tutorials/advanced/images/sphx_glr_earth_relief_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 44-50 + +Set a color map +--------------- + +:meth:`pygmt.Figure.grdimage` takes the ``cmap`` parameter to set the CPT of the +figure. Examples of common CPTs for Earth relief are shown below. A full list of CPTs +can be found at :gmt-docs:`reference/cpts.html`. + +.. GENERATED FROM PYTHON SOURCE LINES 52-53 + +Using the *geo* CPT: + +.. GENERATED FROM PYTHON SOURCE LINES 53-58 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdimage(grid=grid, projection="R12c", cmap="geo") + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_earth_relief_003.png + :alt: earth relief + :srcset: /tutorials/advanced/images/sphx_glr_earth_relief_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 59-60 + +Using the *relief* CPT: + +.. GENERATED FROM PYTHON SOURCE LINES 60-66 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdimage(grid=grid, projection="R12c", cmap="relief") + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_earth_relief_004.png + :alt: earth relief + :srcset: /tutorials/advanced/images/sphx_glr_earth_relief_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 67-77 + +Add a color bar +--------------- + +The :meth:`pygmt.Figure.colorbar` method displays the CPT and the associated z-values +of the figure, and by default uses the same CPT set by the ``cmap`` parameter for +:meth:`pygmt.Figure.grdimage`. The ``frame`` parameter for +:meth:`pygmt.Figure.colorbar` can be used to set the axis intervals and labels. A list +is used to pass multiple arguments to ``frame``. In the example below, ``"a2500"`` +sets the axis interval to 2,500, ``"x+lElevation"`` sets the x-axis label, and +``"y+lm"`` sets the y-axis label. + +.. GENERATED FROM PYTHON SOURCE LINES 77-84 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.grdimage(grid=grid, projection="R12c", cmap="geo") + fig.colorbar(frame=["a2500", "x+lElevation", "y+lm"]) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_earth_relief_005.png + :alt: earth relief + :srcset: /tutorials/advanced/images/sphx_glr_earth_relief_005.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 85-96 + +Create a region map +------------------- + +In addition to providing global data, the ``region`` parameter of +:func:`pygmt.datasets.load_earth_relief` can be used to provide data for a specific +area. The ``region`` parameter is required for resolutions at 5 arc-minutes or higher, +and accepts a list in the form of [*xmin*, *xmax*, *ymin*, *ymax*]. + +The example below uses data with a 10 arc-minutes resolution, and plots it on a +15-centimeters-wide figure with a Mercator projection and a CPT set to *geo*. +``frame="a"`` is used to add a frame with annotations to the figure. + +.. GENERATED FROM PYTHON SOURCE LINES 96-103 + +.. code-block:: Python + + + grid = pygmt.datasets.load_earth_relief(resolution="10m", region=[-14, 30, 35, 60]) + fig = pygmt.Figure() + fig.grdimage(grid=grid, projection="M15c", frame="a", cmap="geo") + fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"]) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_earth_relief_006.png + :alt: earth relief + :srcset: /tutorials/advanced/images/sphx_glr_earth_relief_006.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.209 seconds) + + +.. _sphx_glr_download_tutorials_advanced_earth_relief.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: earth_relief.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: earth_relief.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: earth_relief.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/advanced/grid_equalization.rst.txt b/v0.14.0/_sources/tutorials/advanced/grid_equalization.rst.txt new file mode 100644 index 00000000000..ebcb5c092b7 --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/grid_equalization.rst.txt @@ -0,0 +1,614 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/advanced/grid_equalization.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_tutorials_advanced_grid_equalization.py: + + +Performing grid histogram equalization +====================================== + +The :meth:`pygmt.grdhisteq.equalize_grid` method creates a grid using +statistics based on a cumulative distribution function. + +.. GENERATED FROM PYTHON SOURCE LINES 10-12 + +.. code-block:: Python + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 13-19 + +Load sample data +---------------- + +Load the sample Earth relief data for a region around Yosemite Valley +and use :func:`pygmt.grd2xyz` to create a :class:`pandas.Series` with the +z-values. + +.. GENERATED FROM PYTHON SOURCE LINES 19-26 + +.. code-block:: Python + + + grid = pygmt.datasets.load_earth_relief( + resolution="03s", region=[-119.825, -119.4, 37.6, 37.825] + ) + grid_dist = pygmt.grd2xyz(grid=grid, output_type="pandas")["z"] + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 27-32 + +Plot the original digital elevation model and data distribution +--------------------------------------------------------------- + +For comparison, we will create a map of the original digital elevation +model and a histogram showing the distribution of elevation data values. + +.. GENERATED FROM PYTHON SOURCE LINES 32-63 + +.. code-block:: Python + + + # Create an instance of the Figure class + fig = pygmt.Figure() + # Define figure configuration + pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") + # Define the colormap for the figure + pygmt.makecpt(series=[500, 3540], cmap="turku") + # Setup subplots with two panels + with fig.subplot( + nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Digital Elevation Model" + ): + # Plot the original digital elevation model in the first panel + with fig.set_panel(panel=0): + fig.grdimage(grid=grid, projection="M?", frame="WSne", cmap=True) + # Plot a histogram showing the z-value distribution in the original digital + # elevation model + with fig.set_panel(panel=1): + fig.histogram( + data=grid_dist, + projection="X?", + region=[500, 3600, 0, 20], + series=[500, 3600, 100], + frame=["wnSE", "xaf+lElevation (m)", "yaf+lPercent frequency"], + cmap=True, + histtype=1, + pen="1p,black", + ) + fig.colorbar(position="JMR+o1.5c/0c+w3c/0.3c", frame=True) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_grid_equalization_001.png + :alt: grid equalization + :srcset: /tutorials/advanced/images/sphx_glr_grid_equalization_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 64-73 + +Equalize grid based on a linear distribution +-------------------------------------------- + +The :meth:`pygmt.grdhisteq.equalize_grid` method creates a new grid with the +z-values representing the position of the original z-values in a given +cumulative distribution. By default, it computes the position in a linear +distribution. Here, we equalize the grid into nine divisions based on a +linear distribution and produce a :class:`pandas.Series` with the z-values +for the new grid. + +.. GENERATED FROM PYTHON SOURCE LINES 73-79 + +.. code-block:: Python + + + divisions = 9 + linear = pygmt.grdhisteq.equalize_grid(grid=grid, divisions=divisions) + linear_dist = pygmt.grd2xyz(grid=linear, output_type="pandas")["z"] + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 80-90 + +Calculate the bins used for data transformation +----------------------------------------------- + +The :meth:`pygmt.grdhisteq.compute_bins` method reports statistics about the +grid equalization. Here, we report the bins that would linearly divide the +original data into 9 divisions with equal area. In our new grid produced by +:meth:`pygmt.grdhisteq.equalize_grid`, all the grid cells with values between +``start`` and ``stop`` of ``bin_id=0`` are assigned the value 0, all grid +cells with values between ``start`` and ``stop`` of ``bin_id=1`` are assigned +the value 1, and so on. + +.. GENERATED FROM PYTHON SOURCE LINES 90-94 + +.. code-block:: Python + + + pygmt.grdhisteq.compute_bins(grid=grid, divisions=divisions) + + + + + + + +.. raw:: html + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
startstop
bin_id
0508.01352.0
11352.01719.0
21719.01972.0
31972.02156.0
42156.02270.0
52270.02391.0
62391.02520.0
72520.02739.0
82739.03533.0
+
+
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 95-101 + +Plot the equally distributed data +--------------------------------- + +Here we create a map showing the grid that has been transformed to +have a linear distribution with nine divisions and a histogram of the data +values. + +.. GENERATED FROM PYTHON SOURCE LINES 101-132 + +.. code-block:: Python + + + # Create an instance of the Figure class + fig = pygmt.Figure() + # Define figure configuration + pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") + # Define the colormap for the figure + pygmt.makecpt(series=[0, divisions, 1], cmap="lajolla") + # Setup subplots with two panels + with fig.subplot( + nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Linear distribution" + ): + # Plot the grid with a linear distribution in the first panel + with fig.set_panel(panel=0): + fig.grdimage(grid=linear, projection="M?", frame="WSne", cmap=True) + # Plot a histogram showing the linear z-value distribution + with fig.set_panel(panel=1): + fig.histogram( + data=linear_dist, + projection="X?", + region=[-1, divisions, 0, 40], + series=[0, divisions, 1], + frame=["wnSE", "xaf+lRelative elevation", "yaf+lPercent frequency"], + cmap=True, + histtype=1, + pen="1p,black", + center=True, + ) + fig.colorbar(position="JMR+o1.5c/0c+w3c/0.3c", frame=True) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_grid_equalization_002.png + :alt: grid equalization + :srcset: /tutorials/advanced/images/sphx_glr_grid_equalization_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 133-140 + +Transform grid based on a normal distribution +--------------------------------------------- + +The ``gaussian`` parameter of :meth:`pygmt.grdhisteq.equalize_grid` can be +used to transform the z-values relative to their position in a normal +distribution rather than a linear distribution. In this case, the output +data are continuous rather than discrete. + +.. GENERATED FROM PYTHON SOURCE LINES 140-145 + +.. code-block:: Python + + + normal = pygmt.grdhisteq.equalize_grid(grid=grid, gaussian=True) + normal_dist = pygmt.grd2xyz(grid=normal, output_type="pandas")["z"] + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 146-151 + +Plot the normally distributed data +---------------------------------- + +Here we create a map showing the grid that has been transformed to have +a normal distribution and a histogram of the data values. + +.. GENERATED FROM PYTHON SOURCE LINES 151-181 + +.. code-block:: Python + + + # Create an instance of the Figure class + fig = pygmt.Figure() + # Define figure configuration + pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") + # Define the colormap for the figure + pygmt.makecpt(series=[-4.5, 4.5], cmap="vik") + # Setup subplots with two panels + with fig.subplot( + nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Normal distribution" + ): + # Plot the grid with a normal distribution in the first panel + with fig.set_panel(panel=0): + fig.grdimage(grid=normal, projection="M?", frame="WSne", cmap=True) + # Plot a histogram showing the normal z-value distribution + with fig.set_panel(panel=1): + fig.histogram( + data=normal_dist, + projection="X?", + region=[-4.5, 4.5, 0, 20], + series=[-4.5, 4.5, 0.2], + frame=["wnSE", "xaf+lRelative elevation", "yaf+lPercent frequency"], + cmap=True, + histtype=1, + pen="1p,black", + ) + fig.colorbar(position="JMR+o1.5c/0c+w3c/0.3c", frame=True) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_grid_equalization_003.png + :alt: grid equalization + :srcset: /tutorials/advanced/images/sphx_glr_grid_equalization_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 182-190 + +Equalize grid based on a quadratic distribution +----------------------------------------------- + +The ``quadratic`` parameter of :meth:`pygmt.grdhisteq.equalize_grid` can be +used to transform the z-values relative to their position in a quadratic +distribution rather than a linear distribution. Here, we equalize the grid +into nine divisions based on a quadratic distribution and produce a +:class:`pandas.Series` with the z-values for the new grid. + +.. GENERATED FROM PYTHON SOURCE LINES 190-197 + +.. code-block:: Python + + + quadratic = pygmt.grdhisteq.equalize_grid( + grid=grid, quadratic=True, divisions=divisions + ) + quadratic_dist = pygmt.grd2xyz(grid=quadratic, output_type="pandas")["z"] + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 198-205 + +Calculate the bins used for data transformation +----------------------------------------------- + +We can also use the ``quadratic`` parameter of +:meth:`pygmt.grdhisteq.compute_bins` to report the bins used for dividing +the grid into 9 divisions based on their position in a quadratic +distribution. + +.. GENERATED FROM PYTHON SOURCE LINES 205-209 + +.. code-block:: Python + + + pygmt.grdhisteq.compute_bins(grid=grid, divisions=divisions, quadratic=True) + + + + + + + +.. raw:: html + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
startstop
bin_id
0508.01155.0
11155.01375.0
21375.01605.0
31605.01821.0
41821.01972.0
51972.02131.0
62131.02245.0
72245.02391.0
82391.03533.0
+
+
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 210-215 + +Plot the quadratic distribution of data +--------------------------------------- + +Here we create a map showing the grid that has been transformed to have +a quadratic distribution and a histogram of the data values. + +.. GENERATED FROM PYTHON SOURCE LINES 215-245 + +.. code-block:: Python + + + # Create an instance of the Figure class + fig = pygmt.Figure() + # Define figure configuration + pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") + # Define the colormap for the figure + pygmt.makecpt(series=[0, divisions, 1], cmap="lajolla") + # Setup subplots with two panels + with fig.subplot( + nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Quadratic distribution" + ): + # Plot the grid with a quadratic distribution in the first panel + with fig.set_panel(panel=0): + fig.grdimage(grid=quadratic, projection="M?", frame="WSne", cmap=True) + # Plot a histogram showing the quadratic z-value distribution + with fig.set_panel(panel=1): + fig.histogram( + data=quadratic_dist, + projection="X?", + region=[-1, divisions, 0, 40], + series=[0, divisions, 1], + frame=["wnSE", "xaf+lRelative elevation", "yaf+lPercent frequency"], + cmap=True, + histtype=1, + pen="1p,black", + center=True, + ) + fig.colorbar(position="JMR+o1.5c/0c+w3c/0.3c", frame=True) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_grid_equalization_004.png + :alt: grid equalization + :srcset: /tutorials/advanced/images/sphx_glr_grid_equalization_004.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.243 seconds) + + +.. _sphx_glr_download_tutorials_advanced_grid_equalization.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: grid_equalization.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: grid_equalization.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: grid_equalization.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/advanced/insets.rst.txt b/v0.14.0/_sources/tutorials/advanced/insets.rst.txt new file mode 100644 index 00000000000..a2616921d4f --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/insets.rst.txt @@ -0,0 +1,244 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/advanced/insets.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_tutorials_advanced_insets.py: + + +Adding an inset to the figure +============================= + +To plot an inset figure inside another larger figure, we can use the +:meth:`pygmt.Figure.inset` method. After a large figure has been created, +call ``inset`` using a ``with`` statement, and new plot elements will be +added to the inset figure instead of the larger figure. + +.. GENERATED FROM PYTHON SOURCE LINES 12-14 + +.. code-block:: Python + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 15-18 + +Prior to creating an inset figure, a larger figure must first be plotted. In +the example below, :meth:`pygmt.Figure.coast` is used to create a map of the +US state of Massachusetts. + +.. GENERATED FROM PYTHON SOURCE LINES 18-31 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + region=[-74, -69.5, 41, 43], # Set bounding box of the large figure + borders="2/thin", # Plot state boundaries with thin lines + shorelines="thin", # Plot coastline with thin lines + projection="M15c", # Set Mercator projection and size of 15 centimeter + land="lightyellow", # Color land areas light yellow + water="lightblue", # Color water areas light blue + frame="a", # Set frame with annotation and major tick spacing + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_insets_001.png + :alt: insets + :srcset: /tutorials/advanced/images/sphx_glr_insets_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 32-40 + +The :meth:`pygmt.Figure.inset` method uses a context manager, and is called +using a ``with`` statement. The ``position`` parameter, including the inset +width, is required to plot the inset. Using the **j** modifier, the location +of the inset is set to one of the 9 anchors (Top - Middle - Bottom and Left - +Center - Right). In the example below, ``BL`` places the inset at the Bottom +Left corner. The ``box`` parameter can set the fill and border of the inset. +In the example below, ``+pblack`` sets the border color to black and +``+glightred`` sets the fill to light red. + +.. GENERATED FROM PYTHON SOURCE LINES 40-57 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + region=[-74, -69.5, 41, 43], + borders="2/thin", + shorelines="thin", + projection="M15c", + land="lightyellow", + water="lightblue", + frame="a", + ) + with fig.inset(position="jBL+w3c", box="+pblack+glightred"): + # pass is used to exit the with statement as no plotting methods are + # called + pass + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_insets_002.png + :alt: insets + :srcset: /tutorials/advanced/images/sphx_glr_insets_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 58-64 + +When using **j** to set the anchor of the inset, the default location is in +contact with the nearby axis or axes. The offset of the inset can be set with +**+o**, followed by the offsets along the x- and y-axis. If only one offset +is passed, it is applied to both axes. Each offset can have its own unit. In +the example below, the inset is shifted 0.5 centimeters on the x-axis and +0.2 centimeters on the y-axis. + +.. GENERATED FROM PYTHON SOURCE LINES 64-79 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + region=[-74, -69.5, 41, 43], + borders="2/thin", + shorelines="thin", + projection="M15c", + land="lightyellow", + water="lightblue", + frame="a", + ) + with fig.inset(position="jBL+w3c+o0.5c/0.2c", box="+pblack+glightred"): + pass + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_insets_003.png + :alt: insets + :srcset: /tutorials/advanced/images/sphx_glr_insets_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 80-84 + +Standard plotting methods can be called from within the ``inset`` context +manager. The example below uses :meth:`pygmt.Figure.coast` to plot a zoomed +out map that selectively paints the state of Massachusetts to show its +location relative to other states. + +.. GENERATED FROM PYTHON SOURCE LINES 84-115 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + region=[-74, -69.5, 41, 43], + borders="2/thin", + shorelines="thin", + projection="M15c", + land="lightyellow", + water="lightblue", + frame="a", + ) + # This does not include an inset fill as it is covered by the inset figure + # Inset width/height are determined by the ``region`` and ``projection`` + # parameters. + with fig.inset( + position="jBL+o0.5c/0.2c", + box="+pblack", + region=[-80, -65, 35, 50], + projection="M3c", + ): + # Use a plotting method to create a figure inside the inset. + fig.coast( + land="gray", + borders=[1, 2], + shorelines="1/thin", + water="white", + # Use dcw to selectively highlight an area + dcw="US.MA+gred", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_insets_004.png + :alt: insets + :srcset: /tutorials/advanced/images/sphx_glr_insets_004.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.995 seconds) + + +.. _sphx_glr_download_tutorials_advanced_insets.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: insets.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: insets.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: insets.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/advanced/non_ascii_text.rst.txt b/v0.14.0/_sources/tutorials/advanced/non_ascii_text.rst.txt new file mode 100644 index 00000000000..35640fe69c4 --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/non_ascii_text.rst.txt @@ -0,0 +1,139 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/advanced/non_ascii_text.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_tutorials_advanced_non_ascii_text.py: + + +Typesetting non-ASCII text +-------------------------- + +In addition to ASCII printable characters, sometimes you may also want to typeset +non-ASCII characters on the plot, such as Greek letters, mathematical symbols, or +special characters. + +Due to the limitations of the underlying PostScript language, PyGMT doesn't support +all characters in the Unicode standard. Instead, PyGMT supports a limited set of +characters in the "Adobe Symbol", "Adobe ZapfDingbats", "Adobe ISOLatin1+", and +"ISO-8859-*x*" (*x* can be 1-11, 13-16) encodings. Refer to :doc:`/techref/encodings` +for the complete list of supported characters. + +In PyGMT, the supported (ASCII and non-ASCII) characters can be directly used in the +``text`` parameter of the :meth:`pygmt.Figure.text` method for typesetting text strings. +They can also be used in the arguments of other plotting functions (e.g., in the +``frame`` parameter to set the labels or title). + +In this example, we demonstrate how to typeset non-ASCII characters in PyGMT. + +.. GENERATED FROM PYTHON SOURCE LINES 25-57 + +.. code-block:: Python + + import pygmt + + fig = pygmt.Figure() + fig.basemap( + region=[0, 5, 0, 6], + projection="X14c/7c", + frame=["xaf+lDistance (°)", "yaf+lValue (‰)", "WSen+tTitle: α² ± β²"], + ) + + fig.text( + x=[0.2] * 5, + y=[5, 4, 3, 2, 1], + text=["ASCII:", "ISOLatin1+:", "Symbol:", "ZapfDingbats:", "Mixed:"], + font="20p,Helvetica-Bold,red", + justify="LM", + ) + fig.text( + x=[2] * 5, + y=[5, 4, 3, 2, 1], + text=[ + "ABCDE12345!#$:;<=>?", # ASCII only + "±°ÀÁÂÃÄÅÈÌÒÙàèìòù", # Non-ASCII characters from Adobe ISOLatin1+ + "αβγδεζηθ⊗⊕∅⊃⊇⊄⊂⊆", # Non-ASCII characters from Adobe Symbol + "✈♥♦♣♠❛❜❝❞❨❩❪❫❬❭❮❯→↔", # Non-ASCII characters from Adobe ZapfDingbats + "ABCD αβγδ ①②③ ➊➋➌", # Mix characters from ISOLatin1+, Symbol and ZapfDingbats + ], + font="18p,Helvetica", + justify="LM", + ) + + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_non_ascii_text_001.png + :alt: non ascii text + :srcset: /tutorials/advanced/images/sphx_glr_non_ascii_text_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 58-76 + +Here are some important tips when using non-ASCII characters: + +- **Similar-looking characters**: Be cautious when using characters that appear + visually similar but are distinct. For example, ``Ω`` (OHM SIGN) and ``Ω`` (GREEK + CAPITAL LETTER OMEGA) may look alike, but PyGMT only supports the latter. Using the + incorrect character can lead to unexpected results. To avoid this, it's recommended + to copy and paste characters from the :doc:`/techref/encodings` documentation. +- **Mix characters from different encodings**: As shown in the example above, you can + mix characters from different encodings in the same text string. However, due to the + limitations of the underlying PostScript language, you cannot mix characters from + the "Adobe ISOLatin1+" and "ISO-8859-*x*" encodings in the same text string. For + example, you cannot mix characters from "Adobe ISOLatin1+" and "ISO-8859-2". If + you need to use characters from different encodings, you can use them in different + PyGMT function/method calls. +- **Non-ASCII characters in text files**: Non-ASCII characters are not supported if + you have them in a text file and pass it to :meth:`pygmt.Figure.text`. In this case, + you may want to load the text file into :class:`pandas.DataFrame` and then pass it + to the ``text`` parameter. + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.180 seconds) + + +.. _sphx_glr_download_tutorials_advanced_non_ascii_text.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: non_ascii_text.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: non_ascii_text.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: non_ascii_text.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/advanced/sg_execution_times.rst.txt b/v0.14.0/_sources/tutorials/advanced/sg_execution_times.rst.txt new file mode 100644 index 00000000000..4dd70c23c74 --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/sg_execution_times.rst.txt @@ -0,0 +1,73 @@ + +:orphan: + +.. _sphx_glr_tutorials_advanced_sg_execution_times: + + +Computation times +================= +**00:21.722** total execution time for 13 files **from tutorials/advanced**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_tutorials_advanced_draping_on_3d_surface.py` (``draping_on_3d_surface.py``) + - 00:07.605 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_vectors.py` (``vectors.py``) + - 00:02.503 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_working_with_panel.py` (``working_with_panel.py``) + - 00:01.682 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_cartesian_histograms.py` (``cartesian_histograms.py``) + - 00:01.492 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_contour_map.py` (``contour_map.py``) + - 00:01.444 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_date_time_charts.py` (``date_time_charts.py``) + - 00:01.258 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_grid_equalization.py` (``grid_equalization.py``) + - 00:01.243 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_earth_relief.py` (``earth_relief.py``) + - 00:01.209 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_insets.py` (``insets.py``) + - 00:00.995 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_3d_perspective_image.py` (``3d_perspective_image.py``) + - 00:00.959 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_subplots.py` (``subplots.py``) + - 00:00.616 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_configuration.py` (``configuration.py``) + - 00:00.537 + - 0.0 + * - :ref:`sphx_glr_tutorials_advanced_non_ascii_text.py` (``non_ascii_text.py``) + - 00:00.180 + - 0.0 diff --git a/v0.14.0/_sources/tutorials/advanced/subplots.rst.txt b/v0.14.0/_sources/tutorials/advanced/subplots.rst.txt new file mode 100644 index 00000000000..8c376e19d4a --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/subplots.rst.txt @@ -0,0 +1,393 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/advanced/subplots.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_tutorials_advanced_subplots.py: + + +Making subplots +=============== + +When you're preparing a figure for a paper, there will often be times when +you'll need to put many individual plots into one large figure, and label them +'abcd'. These individual plots are called subplots. + +There are two main ways to create subplots in GMT: + +- Use :meth:`pygmt.Figure.shift_origin` to manually move each individual plot + to the right position. +- Use :meth:`pygmt.Figure.subplot` to define the layout of the subplots. + +The first method is easier to use and should handle simple cases involving a +couple of subplots. For more advanced subplot layouts, however, we recommend +the use of :meth:`pygmt.Figure.subplot` which offers finer grained control, and +this is what the tutorial below will cover. + +.. GENERATED FROM PYTHON SOURCE LINES 22-24 + +.. code-block:: Python + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 25-26 + +Let's start by initializing a :class:`pygmt.Figure` instance. + +.. GENERATED FROM PYTHON SOURCE LINES 26-30 + +.. code-block:: Python + + + fig = pygmt.Figure() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 31-38 + +Define subplot layout +--------------------- + +The :meth:`pygmt.Figure.subplot` method is used to set up the layout, size, +and other attributes of the figure. It divides the whole canvas into regular +grid areas with *n* rows and *m* columns. Each grid area can contain an +individual subplot. For example: + +.. GENERATED FROM PYTHON SOURCE LINES 40-44 + +.. code-block:: default + + with fig.subplot(nrows=2, ncols=3, figsize=("15c", "6c"), frame="lrtb"): + ... + +.. GENERATED FROM PYTHON SOURCE LINES 46-51 + +will define our figure to have a 2 row and 3 column grid layout. +``figsize=("15c", "6c")`` defines the overall size of the figure to be 15 cm +wide by 6 cm high. Using ``frame="lrtb"`` allows us to customize the map +frame for all subplots instead of setting them individually. The figure +layout will look like the following: + +.. GENERATED FROM PYTHON SOURCE LINES 51-64 + +.. code-block:: Python + + + with fig.subplot(nrows=2, ncols=3, figsize=("15c", "6c"), frame="lrtb"): + for i in range(2): # row number starting from 0 + for j in range(3): # column number starting from 0 + index = i * 3 + j # index number starting from 0 + with fig.set_panel(panel=index): # sets the current panel + fig.text( + position="MC", + text=f"index: {index}; row: {i}, col: {j}", + region=[0, 1, 0, 1], + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_subplots_001.png + :alt: subplots + :srcset: /tutorials/advanced/images/sphx_glr_subplots_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 65-71 + +The :meth:`pygmt.Figure.set_panel` method activates a specified subplot, +and all subsequent plotting methods will take place in that subplot panel. +This is similar to matplotlib's ``plt.sca`` method. In order to specify a +subplot, you will need to provide the identifier for that subplot via the +``panel`` parameter. Pass in either the *index* number, or a tuple/list like +(*row*, *col*) to ``panel``. + +.. GENERATED FROM PYTHON SOURCE LINES 73-78 + +.. note:: + + The row and column numbering starts from 0. So for a subplot layout with + N rows and M columns, row numbers will go from 0 to N-1, and column + numbers will go from 0 to M-1. + +.. GENERATED FROM PYTHON SOURCE LINES 80-83 + +For example, to activate the subplot on the top right corner (index: 2) at +*row*\=0 and *col*\=2, so that all subsequent plotting commands happen +there, you can use the following command: + +.. GENERATED FROM PYTHON SOURCE LINES 85-89 + +.. code-block:: default + + with fig.set_panel(panel=[0, 2]): + ... + +.. GENERATED FROM PYTHON SOURCE LINES 92-97 + +Making your first subplot +------------------------- + +Next, let's use what we learned above to make a 2 row by 2 column subplot +figure. We'll also pick up on some new parameters to configure our subplot. + +.. GENERATED FROM PYTHON SOURCE LINES 97-114 + +.. code-block:: Python + + + fig = pygmt.Figure() + with fig.subplot( + nrows=2, + ncols=2, + figsize=("15c", "6c"), + autolabel=True, + frame=["af", "WSne"], + margins=["0.1c", "0.2c"], + title="My Subplot Heading", + ): + fig.basemap(region=[0, 10, 0, 10], projection="X?", panel=[0, 0]) + fig.basemap(region=[0, 20, 0, 10], projection="X?", panel=[0, 1]) + fig.basemap(region=[0, 10, 0, 20], projection="X?", panel=[1, 0]) + fig.basemap(region=[0, 20, 0, 20], projection="X?", panel=[1, 1]) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_subplots_002.png + :alt: subplots + :srcset: /tutorials/advanced/images/sphx_glr_subplots_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 115-130 + +In this example, we define a 2-row, 2-column (2x2) subplot layout using +:meth:`pygmt.Figure.subplot`. The overall figure dimensions is set to be +15 cm wide and 6 cm high (``figsize=["15c", "6c"]``). In addition, we use +some optional parameters to fine-tune some details of the figure creation: + +- ``autolabel=True``: Each subplot is automatically labelled 'abcd'. +- ``margins=["0.1c", "0.2c"]``: Adjusts the space between adjacent subplots. + In this case, it is set as 0.1 cm in the x-direction and 0.2 cm in the + y-direction. +- ``title="My Subplot Heading"``: Adds a title on top of the whole figure. + +Notice that each subplot was set to use a linear projection ``"X?"``. +Usually, we need to specify the width and height of the map frame, but it is +also possible to use a question mark ``"?"`` to let GMT decide automatically +on what is the most appropriate width/height for each subplot's map frame. + +.. GENERATED FROM PYTHON SOURCE LINES 132-145 + +.. tip:: + + In the above example, we used the following commands to activate the + four subplots explicitly one after another:: + + fig.basemap(..., panel=[0, 0]) + fig.basemap(..., panel=[0, 1]) + fig.basemap(..., panel=[1, 0]) + fig.basemap(..., panel=[1, 1]) + + In fact, we can just use ``fig.basemap(..., panel=True)`` without + specifying any subplot index number, and GMT will automatically activate + the next subplot panel. + +.. GENERATED FROM PYTHON SOURCE LINES 147-155 + +.. note:: + + All plotting methods (e.g. :meth:`pygmt.Figure.coast`, + :meth:`pygmt.Figure.text`, etc) are able to use ``panel`` parameter when + in subplot mode. Once a panel is activated using ``panel`` or + :meth:`pygmt.Figure.set_panel`, subsequent plotting commands that don't + set a ``panel`` will have their elements added to the same panel as + before. + +.. GENERATED FROM PYTHON SOURCE LINES 158-165 + +Shared x- and y-axes +-------------------- + +In the example above with the four subplots, the two subplots for each row +have the same y-axis range, and the two subplots for each column have the +same x-axis range. You can use the ``sharex``/``sharey`` parameters to set a +common x- and/or y-axis between subplots. + +.. GENERATED FROM PYTHON SOURCE LINES 165-184 + +.. code-block:: Python + + + fig = pygmt.Figure() + with fig.subplot( + nrows=2, + ncols=2, + figsize=("15c", "6c"), # width of 15 cm, height of 6 cm + autolabel=True, + margins=["0.3c", "0.2c"], # horizontal 0.3 cm and vertical 0.2 cm margins + title="My Subplot Heading", + sharex="b", # shared x-axis on the bottom side + sharey="l", # shared y-axis on the left side + frame="WSrt", + ): + fig.basemap(region=[0, 10, 0, 10], projection="X?", panel=True) + fig.basemap(region=[0, 20, 0, 10], projection="X?", panel=True) + fig.basemap(region=[0, 10, 0, 20], projection="X?", panel=True) + fig.basemap(region=[0, 20, 0, 20], projection="X?", panel=True) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_subplots_003.png + :alt: subplots + :srcset: /tutorials/advanced/images/sphx_glr_subplots_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 185-193 + +``sharex="b"`` indicates that subplots in a column will share the x-axis, and +only the **b**\ ottom axis is displayed. ``sharey="l"`` indicates that +subplots within a row will share the y-axis, and only the **l**\ eft axis is +displayed. + +Of course, instead of using the ``sharex``/``sharey`` parameters, you can +also set a different ``frame`` for each subplot to control the axis +properties individually for each subplot. + +.. GENERATED FROM PYTHON SOURCE LINES 196-204 + +Advanced subplot layouts +------------------------ + +Nested subplots are currently not supported. If you want to create more +complex subplot layouts, some manual adjustments are needed. + +The following example draws three subplots in a 2-row, 2-column layout, with +the first subplot occupying the first row. + +.. GENERATED FROM PYTHON SOURCE LINES 204-225 + +.. code-block:: Python + + + fig = pygmt.Figure() + # Bottom row, two subplots + with fig.subplot(nrows=1, ncols=2, figsize=("15c", "3c"), autolabel="b)"): + fig.basemap( + region=[0, 5, 0, 5], projection="X?", frame=["af", "WSne"], panel=[0, 0] + ) + fig.basemap( + region=[0, 5, 0, 5], projection="X?", frame=["af", "WSne"], panel=[0, 1] + ) + # Move plot origin by 1 cm above the height of the entire figure + fig.shift_origin(yshift="h+1c") + # Top row, one subplot + with fig.subplot(nrows=1, ncols=1, figsize=("15c", "3c"), autolabel="a)"): + fig.basemap( + region=[0, 10, 0, 10], projection="X?", frame=["af", "WSne"], panel=[0, 0] + ) + fig.text(text="TEXT", x=5, y=5) + + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_subplots_004.png + :alt: subplots + :srcset: /tutorials/advanced/images/sphx_glr_subplots_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 226-235 + +We start by drawing the bottom two subplots, setting ``autolabel="b)"`` so +that the subplots are labelled 'b)' and 'c)'. Next, we use +:meth:`pygmt.Figure.shift_origin` to move the plot origin 1 cm above the +**h**\ eight of the entire figure that is currently plotted (i.e. the bottom +row subplots). A single subplot is then plotted on the top row. You may need +to adjust the ``yshift`` parameter to make your plot look nice. This top row +uses ``autolabel="a)"``, and we also plotted some text inside. Note that +``projection="X?"`` was used to let GMT automatically determine the size of +the subplot according to the size of the subplot area. + +.. GENERATED FROM PYTHON SOURCE LINES 237-241 + +You can also manually override the ``autolabel`` for each subplot using for +example, ``fig.set_panel(..., fixedlabel="b) Panel 2")`` which would allow +you to manually label a single subplot as you wish. This can be useful for +adding a more descriptive subtitle to individual subplots. + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.616 seconds) + + +.. _sphx_glr_download_tutorials_advanced_subplots.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: subplots.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: subplots.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: subplots.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/advanced/vectors.rst.txt b/v0.14.0/_sources/tutorials/advanced/vectors.rst.txt new file mode 100644 index 00000000000..02b83dfa6cc --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/vectors.rst.txt @@ -0,0 +1,742 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/advanced/vectors.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_tutorials_advanced_vectors.py: + + +Plotting vectors +================ + +Plotting vectors is handled by :meth:`pygmt.Figure.plot`. + +.. GENERATED FROM PYTHON SOURCE LINES 9-12 + +.. code-block:: Python + + import numpy as np + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 13-33 + +Plot Cartesian Vectors +---------------------- + +Create a simple Cartesian vector using a start point through +``x``, ``y``, and ``direction`` parameters. +On the shown figure, the plot is projected on a 10cm X 10cm region, +which is specified by the ``projection`` parameter. +The direction is specified +by a list of two 1-D arrays structured as ``[[angle_in_degrees], [length]]``. +The angle is measured in degrees and moves counter-clockwise from the +horizontal. +The length of the vector uses centimeters by default but +could be changed using :class:`pygmt.config` +(Check the next examples for unit changes). + +Notice that the ``v`` in the ``style`` parameter stands for +vector; it distinguishes it from regular lines and allows for +different customization. ``0c`` is used to specify the size +of the arrow head which explains why there is no arrow on either +side of the vector. + +.. GENERATED FROM PYTHON SOURCE LINES 33-46 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.plot( + region=[0, 10, 0, 10], + projection="X10c/10c", + frame="ag", + x=2, + y=8, + style="v0c", + direction=[[-45], [6]], + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_vectors_001.png + :alt: vectors + :srcset: /tutorials/advanced/images/sphx_glr_vectors_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 47-57 + +In this example, we apply the same concept shown previously to plot multiple +vectors. Notice that instead of passing int/float to ``x`` and ``y``, a list +of all x and y coordinates will be passed. Similarly, the length of direction +list will increase accordingly. + +Additionally, we change the style of the vector to include a red +arrow head at the end (**+e**) of the vector and increase the +thickness (``pen="2p"``) of the vector stem. A list of different +styling attributes can be found in +:doc:`Vector heads and tails `. + +.. GENERATED FROM PYTHON SOURCE LINES 57-72 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.plot( + region=[0, 10, 0, 10], + projection="X10c/10c", + frame="ag", + x=[2, 4], + y=[8, 1], + style="v0.6c+e", + direction=[[-45, 23], [6, 3]], + pen="2p", + fill="red3", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_vectors_002.png + :alt: vectors + :srcset: /tutorials/advanced/images/sphx_glr_vectors_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 73-81 + +The default unit of vector length is centimeters, +however, this can be changed to inches or points. Note that, in PyGMT, +one point is defined as 1/72 inch. + +In this example, the graphed region is 5in X 5in, but +the length of the first vector is still graphed in centimeters. +Using ``pygmt.config(PROJ_LENGTH_UNIT="i")``, the default unit +can be changed to inches in the second plotted vector. + +.. GENERATED FROM PYTHON SOURCE LINES 81-107 + +.. code-block:: Python + + + fig = pygmt.Figure() + # Vector 1 with default unit as cm + fig.plot( + region=[0, 10, 0, 10], + projection="X5i/5i", + frame="ag", + x=2, + y=8, + style="v1c+e", + direction=[[0], [3]], + pen="2p", + fill="red3", + ) + # Vector 2 after changing default unit to inches + with pygmt.config(PROJ_LENGTH_UNIT="i"): + fig.plot( + x=2, + y=7, + direction=[[0], [3]], + style="v1c+e", + pen="2p", + fill="red3", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_vectors_003.png + :alt: vectors + :srcset: /tutorials/advanced/images/sphx_glr_vectors_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 108-116 + +Vectors can also be plotted by including all the information +about a vector in a single list. However, this requires creating +a 2-D list or numpy array containing all vectors. +Each vector list contains the information structured as: +``[x_start, y_start, direction_degrees, length]``. + +If this approach is chosen, the ``data`` parameter must be +used instead of ``x``, ``y``, and ``direction``. + +.. GENERATED FROM PYTHON SOURCE LINES 116-132 + +.. code-block:: Python + + + # Create a list of lists that include each vector information + vectors = [[2, 3, 45, 4]] + + fig = pygmt.Figure() + fig.plot( + region=[0, 10, 0, 10], + projection="X10c/10c", + frame="ag", + data=vectors, + style="v0.6c+e", + pen="2p", + fill="red3", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_vectors_004.png + :alt: vectors + :srcset: /tutorials/advanced/images/sphx_glr_vectors_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 133-137 + +Using the functionality mentioned in the previous example, +multiple vectors can be plotted at the same time. Another +vector could be simply added to the 2-D list or numpy +array object and passed using ``data`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 137-158 + +.. code-block:: Python + + + # Vector specifications structured as: + # [x_start, y_start, direction_degrees, length] + vector_1 = [2, 3, 45, 4] + vector_2 = [7.5, 8.3, -120.5, 7.2] + # Create a list of lists that include each vector information + vectors = [vector_1, vector_2] + # Vectors structure: [[2, 3, 45, 4], [7.5, 8.3, -120.5, 7.2]] + + fig = pygmt.Figure() + fig.plot( + region=[0, 10, 0, 10], + projection="X10c/10c", + frame="ag", + data=vectors, + style="v0.6c+e", + pen="2p", + fill="red3", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_vectors_005.png + :alt: vectors + :srcset: /tutorials/advanced/images/sphx_glr_vectors_005.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 159-170 + +In this example, Cartesian vectors are plotted over a Mercator +projection of the continental US. The x values represent the +longitude and y values represent the latitude where the vector starts. + +This example also shows some of the styles a vector supports. +The beginning point of the vector (**+b**) +should take the shape of a circle (**c**). Similarly, the end +point of the vector (**+e**) should have an arrow shape (**a**) +(to draw a plain arrow, use **A** instead). Lastly, the **+a** +specifies the angle of the vector head apex (30 degrees in +this example). + +.. GENERATED FROM PYTHON SOURCE LINES 170-211 + +.. code-block:: Python + + + # Create a plot with coast, Mercator projection (M) over the continental US + fig = pygmt.Figure() + fig.coast( + region=[-127, -64, 24, 53], + projection="M10c", + frame="ag", + borders=1, + shorelines="0.25p,black", + area_thresh=4000, + land="grey", + water="lightblue", + ) + + # Plot a vector using the x, y, direction parameters + style = "v0.4c+bc+ea+a30" + fig.plot( + x=-110, + y=40, + style=style, + direction=[[-25], [3]], + pen="1p", + fill="red3", + ) + + # vector specifications structured as: + # [x_start, y_start, direction_degrees, length] + vector_2 = [-82, 40.5, 138, 2.5] + vector_3 = [-71.2, 45, -115.7, 4] + # Create a list of lists that include each vector information + vectors = [vector_2, vector_3] + + # Plot vectors using the data parameter. + fig.plot( + data=vectors, + style=style, + pen="1p", + fill="yellow", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_vectors_006.png + :alt: vectors + :srcset: /tutorials/advanced/images/sphx_glr_vectors_006.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 212-215 + +Another example of plotting Cartesian vectors over a coast plot. This time a +Transverse Mercator projection is used. Additionally, :func:`numpy.linspace` +is used to create 5 vectors with equal stops. + +.. GENERATED FROM PYTHON SOURCE LINES 215-247 + +.. code-block:: Python + + + x = np.linspace(36, 42, 5) # x values = [36. 37.5 39. 40.5 42. ] + y = np.linspace(39, 39, 5) # y values = [39. 39. 39. 39.] + direction = np.linspace(-90, -90, 5) # direction values = [-90. -90. -90. -90.] + length = np.linspace(1.5, 1.5, 5) # length values = [1.5 1.5 1.5 1.5] + + # Create a plot with coast, + # Transverse Mercator projection (T) over Turkey and Syria + fig = pygmt.Figure() + fig.coast( + region=[20, 50, 30, 45], + projection="T35/10c", + frame=True, + borders=1, + shorelines="0.25p,black", + area_thresh=4000, + land="lightbrown", + water="lightblue", + ) + + fig.plot( + x=x, + y=y, + style="v0.4c+ea+bc", + direction=[direction, length], + pen="0.6p", + fill="red3", + ) + + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_vectors_007.png + :alt: vectors + :srcset: /tutorials/advanced/images/sphx_glr_vectors_007.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 248-262 + +Plot Circular Vectors +--------------------- + +When plotting circular vectors, all of the information for a single vector is +to be stored in a list. Each circular vector list is structured as: +``[x_start, y_start, radius, degree_start, degree_stop]``. The first two +values in the vector list represent the origin of the circle that will be +plotted. The next value is the radius which is represented on the plot in cm. + +The last two values in the vector list represent the degree at which the plot +will start and stop. These values are measured counter-clockwise from the +horizontal axis. In this example, the result shown is the left half of a +circle as the plot starts at 90 degrees and goes until 270. Notice that the +``m`` in the ``style`` parameter stands for circular vectors. + +.. GENERATED FROM PYTHON SOURCE LINES 262-289 + +.. code-block:: Python + + + fig = pygmt.Figure() + + circular_vector_1 = [0, 0, 2, 90, 270] + data = [circular_vector_1] + fig.plot( + region=[-5, 5, -5, 5], + projection="X10c", + frame="ag", + data=data, + style="m0.5c+ea", + pen="2p", + fill="red3", + ) + + # Another example using np.array() + circular_vector_2 = [0, 0, 4, -90, 90] + data = np.array([circular_vector_2]) + + fig.plot( + data=data, + style="m0.5c+ea", + pen="2p", + fill="red3", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_vectors_008.png + :alt: vectors + :srcset: /tutorials/advanced/images/sphx_glr_vectors_008.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 290-297 + +When plotting multiple circular vectors, a two dimensional array or numpy +array object should be passed as the ``data`` parameter. In this example, +:func:`numpy.column_stack` is used to generate this two dimensional array. +Other numpy objects are used to generate linear values for the ``radius`` +parameter and random values for the ``degree_stop`` parameter discussed in +the previous example. This is the reason in which each vector has a different +appearance on the projection. + +.. GENERATED FROM PYTHON SOURCE LINES 297-318 + +.. code-block:: Python + + + vector_num = 5 + radius = 3 - (0.5 * np.arange(0, vector_num)) + startdir = np.full(vector_num, 90) + stopdir = 180 + (50 * np.arange(0, vector_num)) + data = np.column_stack( + [np.full(vector_num, 0), np.full(vector_num, 0), radius, startdir, stopdir] + ) + + fig = pygmt.Figure() + fig.plot( + region=[-5, 5, -5, 5], + projection="X10c", + frame="ag", + data=data, + style="m0.5c+ea", + pen="2p", + fill="red3", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_vectors_009.png + :alt: vectors + :srcset: /tutorials/advanced/images/sphx_glr_vectors_009.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 319-325 + +Much like when plotting Cartesian vectors, the default unit used is +centimeters. When this is changed to inches, the size of the plot appears +larger when the projection units do not change. Below is an example of two +circular vectors. One is plotted using the default unit, and the second is +plotted using inches. Despite using the same list to plot the vectors, a +different measurement unit causes one to be larger than the other. + +.. GENERATED FROM PYTHON SOURCE LINES 325-349 + +.. code-block:: Python + + + circular_vector = [6, 5, 1, 90, 270] + + fig = pygmt.Figure() + fig.plot( + region=[0, 10, 0, 10], + projection="X10c", + frame="ag", + data=[circular_vector], + style="m0.5c+ea", + pen="2p", + fill="red3", + ) + + with pygmt.config(PROJ_LENGTH_UNIT="i"): + fig.plot( + data=[circular_vector], + style="m0.5c+ea", + pen="2p", + fill="red3", + ) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_vectors_010.png + :alt: vectors + :srcset: /tutorials/advanced/images/sphx_glr_vectors_010.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 350-364 + +Plot Geographic Vectors +----------------------- + +On this map, +``point_1`` and ``point_2`` are coordinate pairs used to set the +start and end points of the geographic vector. +The geographical vector is going from Idaho to +Chicago. To style geographic +vectors, use ``=`` at the beginning of the ``style`` parameter. +Other styling features such as vector stem thickness and head color +can be passed into the ``pen`` and ``fill`` parameters. + +Note that the **+s** is added to use a start point and an end point +to represent the vector instead of input angle and length. + +.. GENERATED FROM PYTHON SOURCE LINES 364-386 + +.. code-block:: Python + + + point_1 = [-114.7420, 44.0682] + point_2 = [-87.6298, 41.8781] + data = np.array([point_1 + point_2]) + + fig = pygmt.Figure() + fig.coast( + region=[-127, -64, 24, 53], + projection="M10c", + frame=True, + borders=1, + shorelines="0.25p,black", + area_thresh=4000, + ) + fig.plot( + data=data, + style="=0.5c+ea+s", + pen="2p", + fill="red3", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_vectors_011.png + :alt: vectors + :srcset: /tutorials/advanced/images/sphx_glr_vectors_011.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 387-394 + +Using the same technique shown in the previous example, +multiple vectors can be plotted in a chain where the end point +of one is the start point of another. This can be done +by adding the coordinate lists together to create this structure: +``[[start_latitude, start_longitude, end_latitude, end_longitude]]``. +Each list within the 2-D list contains the start and end information +for each vector. + +.. GENERATED FROM PYTHON SOURCE LINES 394-423 + +.. code-block:: Python + + + # Coordinate pairs for all the locations used + ME = [-69.4455, 45.2538] + CHI = [-87.6298, 41.8781] + SEA = [-122.3321, 47.6062] + NO = [-90.0715, 29.9511] + KC = [-94.5786, 39.0997] + CA = [-119.4179, 36.7783] + + # Add array to piece together the vectors + data = [ME + CHI, CHI + SEA, SEA + KC, KC + NO, NO + CA] + + fig = pygmt.Figure() + fig.coast( + region=[-127, -64, 24, 53], + projection="M10c", + frame=True, + borders=1, + shorelines="0.25p,black", + area_thresh=4000, + ) + fig.plot( + data=data, + style="=0.5c+ea+s", + pen="2p", + fill="red3", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_vectors_012.png + :alt: vectors + :srcset: /tutorials/advanced/images/sphx_glr_vectors_012.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 424-427 + +This example plots vectors over a Mercator projection. The start points +are located at SA which is South Africa and going to four different +locations. + +.. GENERATED FROM PYTHON SOURCE LINES 427-451 + +.. code-block:: Python + + + SA = [22.9375, -30.5595] + EUR = [15.2551, 54.5260] + ME = [-69.4455, 45.2538] + AS = [100.6197, 34.0479] + NM = [-105.8701, 34.5199] + data = np.array([SA + EUR, SA + ME, SA + AS, SA + NM]) + + fig = pygmt.Figure() + fig.coast( + region=[-180, 180, -80, 80], + projection="M0/0/12c", + frame="afg", + land="lightbrown", + water="lightblue", + ) + fig.plot( + data=data, + style="=0.5c+ea+s", + pen="2p", + fill="red3", + ) + fig.show() + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_vectors_013.png + :alt: vectors + :srcset: /tutorials/advanced/images/sphx_glr_vectors_013.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 2.503 seconds) + + +.. _sphx_glr_download_tutorials_advanced_vectors.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vectors.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vectors.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: vectors.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/advanced/working_with_panel.rst.txt b/v0.14.0/_sources/tutorials/advanced/working_with_panel.rst.txt new file mode 100644 index 00000000000..20ba47e090e --- /dev/null +++ b/v0.14.0/_sources/tutorials/advanced/working_with_panel.rst.txt @@ -0,0 +1,268 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/advanced/working_with_panel.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_tutorials_advanced_working_with_panel.py: + + +Interactive data visualization using ``Panel`` +============================================== + +.. note:: + + Please run the following code examples in a notebook environment + otherwise the interactive parts of this tutorial will not work. You can + use the button "Download Jupyter notebook" at the bottom of this page + to download this script as a Jupyter notebook. + +The library `Panel `__ can be used to +create interactive dashboards by connecting user-defined widgets to plots. +``Panel`` can be used as an extension to Jupyter notebook/lab. + +This tutorial is split into three parts: + +- Make a static map +- Make an interactive map +- Add a grid for Earth relief + +.. GENERATED FROM PYTHON SOURCE LINES 24-25 + +Import the required packages + +.. GENERATED FROM PYTHON SOURCE LINES 25-32 + +.. code-block:: Python + + import numpy as np + import panel as pn + import pygmt + + pn.extension() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 33-42 + +Make a static map +----------------- + +The `Orthographic projection +`__ +can be used to show the Earth as a globe. Land and water masses are +filled with colors via the ``land`` and ``water`` parameters of +:meth:`pygmt.Figure.coast`, respectively. Coastlines are added using the +``shorelines`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 42-59 + +.. code-block:: Python + + + # Create a new instance or object of the pygmt.Figure() class + fig = pygmt.Figure() + fig.coast( + # Orthographic projection (G) with projection center at 0° East and + # 15° North and a width of 12 centimeters + projection="G0/15/12c", + region="g", # global + frame="g30", # Add frame and gridlines in steps of 30 degrees on top + land="gray", # Color land masses in "gray" + water="lightblue", # Color water masses in "lightblue" + # Add coastlines with a 0.25 points thick pen in "gray50" + shorelines="1/0.25p,gray50", + ) + fig.show() + + + + + +.. image-sg:: /tutorials/advanced/images/sphx_glr_working_with_panel_001.png + :alt: working with panel + :srcset: /tutorials/advanced/images/sphx_glr_working_with_panel_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 60-67 + +Make an interactive map +----------------------- + +To generate a rotation of the Earth around the vertical axis, the central +longitude of the Orthographic projection is varied iteratively in steps of +10 degrees. The library ``Panel`` is used to create an interactive dashboard +with a slider (works only in a notebook environment, e.g., Jupyter notebook). + +.. GENERATED FROM PYTHON SOURCE LINES 67-99 + +.. code-block:: Python + + + # Create a slider + slider_lon = pn.widgets.DiscreteSlider( + name="Central longitude", # Give name for quantity shown at the slider + options=list(np.arange(0, 361, 10)), # Range corresponding to longitude + value=0, # Set start value + ) + + + @pn.depends(central_lon=slider_lon) + def view(central_lon): + """ + Define a function for plotting the single slices. + """ + # Create a new instance or object of the pygmt.Figure() class + fig = pygmt.Figure() + fig.coast( + # Vary the central longitude used for the Orthographic projection + projection=f"G{central_lon}/15/12c", + region="g", + frame="g30", + land="gray", + water="lightblue", + shorelines="1/0.25p,gray50", + ) + return fig + + + # Make an interactive dashboard + pn.Column(slider_lon, view) + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + Column + [0] DiscreteSlider(formatter='%d', name='Central longitude', options=[np.int64(0), ...], value=0) + [1] ParamFunction(function, _pane=PNG, defer_load=False) + + + +.. GENERATED FROM PYTHON SOURCE LINES 100-105 + +Add a grid for Earth relief +--------------------------- + +Instead of using colors as fill for the land and water masses a grid can be +displayed. Here, the Earth relief is shown by color-coding the elevation. + +.. GENERATED FROM PYTHON SOURCE LINES 105-148 + +.. code-block:: Python + + + # Download a grid for Earth relief with a resolution of 10 arc-minutes + grd_relief = pygmt.datasets.load_earth_relief(resolution="10m") + + # Create a slider + slider_lon = pn.widgets.DiscreteSlider( + name="Central longitude", + options=list(np.arange(0, 361, 10)), + value=0, + ) + + + @pn.depends(central_lon=slider_lon) + def view(central_lon): + """ + Define a function for plotting the single slices. + """ + # Create a new instance or object of the pygmt.Figure() class + fig = pygmt.Figure() + # Set up a colormap for the elevation in meters + pygmt.makecpt( + cmap="oleron", + # minimum, maximum, step + series=[int(grd_relief.data.min()) - 1, int(grd_relief.data.max()) + 1, 100], + ) + # Plot the grid for the elevation + fig.grdimage( + projection=f"G{central_lon}/15/12c", + region="g", + grid=grd_relief, # Use grid downloaded above + cmap=True, # Use colormap defined above + frame="g30", + ) + # Add a horizontal colorbar for the elevation + # with annotations (a) in steps of 2000 and ticks (f) in steps of 1000 + # and labels (+l) at the x-axis "Elevation" and y-axis "m" (meters) + fig.colorbar(frame=["a2000f1000", "x+lElevation", "y+lm"]) + return fig + + + # Make an interactive dashboard + pn.Column(slider_lon, view) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + Column + [0] DiscreteSlider(formatter='%d', name='Central longitude', options=[np.int64(0), ...], value=0) + [1] ParamFunction(function, _pane=PNG, defer_load=False) + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.682 seconds) + + +.. _sphx_glr_download_tutorials_advanced_working_with_panel.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: working_with_panel.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: working_with_panel.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: working_with_panel.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/basics/coastlines.rst.txt b/v0.14.0/_sources/tutorials/basics/coastlines.rst.txt new file mode 100644 index 00000000000..8bf1f01d3c5 --- /dev/null +++ b/v0.14.0/_sources/tutorials/basics/coastlines.rst.txt @@ -0,0 +1,230 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/basics/coastlines.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_tutorials_basics_coastlines.py: + + +Coastlines and borders +====================== + +Plotting coastlines and borders is handled by :meth:`pygmt.Figure.coast`. + +.. GENERATED FROM PYTHON SOURCE LINES 9-11 + +.. code-block:: Python + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 12-16 + +Shorelines +---------- + +Use the ``shorelines`` parameter to plot only the shorelines: + +.. GENERATED FROM PYTHON SOURCE LINES 16-22 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region="g", projection="W15c", frame=True) + fig.coast(shorelines=True) + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_coastlines_001.png + :alt: coastlines + :srcset: /tutorials/basics/images/sphx_glr_coastlines_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 23-33 + +The shorelines are divided in 4 levels: + +1. coastline +2. lakeshore +3. island-in-lake shore +4. lake-in-island-in-lake shore + +You can specify which level you want to plot by passing the level number and +a GMT pen configuration. For example, to plot just the coastlines with 0.5p +thickness and black lines: + +.. GENERATED FROM PYTHON SOURCE LINES 33-39 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region="g", projection="W15c", frame=True) + fig.coast(shorelines="1/0.5p,black") + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_coastlines_002.png + :alt: coastlines + :srcset: /tutorials/basics/images/sphx_glr_coastlines_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 40-42 + +You can specify multiple levels (with their own pens) by passing a list to +``shorelines``: + +.. GENERATED FROM PYTHON SOURCE LINES 42-49 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region="g", projection="W15c", frame=True) + fig.coast(shorelines=["1/1p,black", "2/0.5p,red"]) + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_coastlines_003.png + :alt: coastlines + :srcset: /tutorials/basics/images/sphx_glr_coastlines_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 50-61 + +Resolutions +----------- + +The coastline database comes with 5 resolutions. The resolution drops by 80% +between levels: + +1. ``"c"``: crude +2. ``"l"``: low (default) +3. ``"i"``: intermediate +4. ``"h"``: high +5. ``"f"``: full + +.. GENERATED FROM PYTHON SOURCE LINES 61-70 + +.. code-block:: Python + + + oahu = [-158.3, -157.6, 21.2, 21.8] + fig = pygmt.Figure() + for res in ["c", "l", "i", "h", "f"]: + fig.coast(resolution=res, shorelines="1p", region=oahu, projection="M5c") + fig.shift_origin(xshift="5c") + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_coastlines_004.png + :alt: coastlines + :srcset: /tutorials/basics/images/sphx_glr_coastlines_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 71-77 + +Land and water +-------------- + +Use the ``land`` and ``water`` parameters to specify a fill color for land +and water bodies. The colors can be given by name or hex codes (like the ones +used in HTML and CSS): + +.. GENERATED FROM PYTHON SOURCE LINES 77-83 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region="g", projection="W15c", frame=True) + fig.coast(land="#666666", water="skyblue") + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_coastlines_005.png + :alt: coastlines + :srcset: /tutorials/basics/images/sphx_glr_coastlines_005.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.101 seconds) + + +.. _sphx_glr_download_tutorials_basics_coastlines.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: coastlines.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: coastlines.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: coastlines.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/basics/frames.rst.txt b/v0.14.0/_sources/tutorials/basics/frames.rst.txt new file mode 100644 index 00000000000..031dee7ced7 --- /dev/null +++ b/v0.14.0/_sources/tutorials/basics/frames.rst.txt @@ -0,0 +1,298 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/basics/frames.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_tutorials_basics_frames.py: + + +Frames, ticks, titles, and labels +================================= + +Setting frame, ticks, title, etc., of the plot is handled by the ``frame`` +parameter that most plotting methods of the :class:`pygmt.Figure` class +contain. + +.. GENERATED FROM PYTHON SOURCE LINES 11-13 + +.. code-block:: Python + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 14-19 + +Plot frame +---------- + +By default, PyGMT does not add a frame to your plot. For example, we can plot +the coastlines of the world with a Mercator projection: + +.. GENERATED FROM PYTHON SOURCE LINES 19-24 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c") + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_frames_001.png + :alt: frames + :srcset: /tutorials/basics/images/sphx_glr_frames_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 25-28 + +To add the default GMT frame style to the plot, use ``frame="f"`` in +:meth:`pygmt.Figure.basemap` or another plotting method (which has the +``frame`` parameter, with the exception of :meth:`pygmt.Figure.colorbar`): + +.. GENERATED FROM PYTHON SOURCE LINES 28-35 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c") + fig.basemap(frame="f") + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_frames_002.png + :alt: frames + :srcset: /tutorials/basics/images/sphx_glr_frames_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 36-42 + +Ticks and grid lines +-------------------- + +The automatic frame (``frame=True`` or ``frame="af"``) adds the default GMT +frame style and automatically determines tick labels from the plot region. +In GMT the tick labels are called **a**\ nnotations. + +.. GENERATED FROM PYTHON SOURCE LINES 42-48 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c") + fig.basemap(frame="af") + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_frames_003.png + :alt: frames + :srcset: /tutorials/basics/images/sphx_glr_frames_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 49-51 + +Add automatic grid lines to the plot by passing ``g`` through the ``frame`` +parameter: + +.. GENERATED FROM PYTHON SOURCE LINES 51-57 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c") + fig.basemap(frame="ag") + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_frames_004.png + :alt: frames + :srcset: /tutorials/basics/images/sphx_glr_frames_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 58-61 + +To adjust the step widths of annotations, frame, and grid lines we can +add the desired step widths after ``a``, ``f``, or ``g``. In the example +below, the step widths are set to 30°, 7.5°, and 15°, respectively. + +.. GENERATED FROM PYTHON SOURCE LINES 61-68 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c") + fig.basemap(frame="a30f7.5g15") + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_frames_005.png + :alt: frames + :srcset: /tutorials/basics/images/sphx_glr_frames_005.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 69-75 + +Title +----- + +The figure title can be set by passing **+t**\ *title* to the ``frame`` +parameter of :meth:`pygmt.Figure.basemap`. Passing multiple arguments to +``frame`` can be done by using a list, as shown in the example below. + +.. GENERATED FROM PYTHON SOURCE LINES 75-83 + +.. code-block:: Python + + + fig = pygmt.Figure() + # region="TT" specifies Trinidad and Tobago using the ISO country code + fig.coast(shorelines="1/0.5p", region="TT", projection="M25c") + fig.basemap(frame=["a", "+tTrinidad and Tobago"]) + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_frames_006.png + :alt: frames + :srcset: /tutorials/basics/images/sphx_glr_frames_006.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 84-103 + +Axis labels +----------- + +Axis labels, in GMT simply called labels, can be set by passing +**x+l**\ *label* (or starting with **y** if +labeling the y-axis) to the ``frame`` parameter of +:meth:`pygmt.Figure.basemap`. The map boundaries (or plot axes) are named as +West/west/left (**W**, **w**, **l**), South/south/bottom +(**S**, **s**, **b**), North/north/top (**N**, **n**, **t**), and +East/east/right (**E**, **e**, **r**) sides of a figure. If an upper-case +letter (**W**, **S**, **N**, **E**) is passed, the axis is plotted with +tick marks and annotations. The lower-case version +(**w**, **s**, **n**, **e**) plots the axis only with tick marks. +To only plot the axis pass **l**, **b**, **t**, **r**. By default +(``frame=True`` or ``frame="af"``), the West and the South axes are +plotted with both tick marks and annotations. + +The example below uses a Cartesian projection, as GMT does not allow +labels to be set for geographic maps. + +.. GENERATED FROM PYTHON SOURCE LINES 103-115 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap( + region=[0, 10, 0, 20], + projection="X10c/8c", + # Plot axis with tick marks, annotations, and labels on the + # West and South axes + # Plot axis with tick marks on the north and east axes + frame=["WSne", "xaf+lx-axis", "yaf+ly-axis"], + ) + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_frames_007.png + :alt: frames + :srcset: /tutorials/basics/images/sphx_glr_frames_007.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.872 seconds) + + +.. _sphx_glr_download_tutorials_basics_frames.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: frames.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: frames.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: frames.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/basics/lines.rst.txt b/v0.14.0/_sources/tutorials/basics/lines.rst.txt new file mode 100644 index 00000000000..3dfd7be0e91 --- /dev/null +++ b/v0.14.0/_sources/tutorials/basics/lines.rst.txt @@ -0,0 +1,287 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/basics/lines.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_tutorials_basics_lines.py: + + +Plotting lines +============== + +Plotting lines is handled by the :meth:`pygmt.Figure.plot` method. + +.. GENERATED FROM PYTHON SOURCE LINES 9-11 + +.. code-block:: Python + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 12-19 + +Plot lines +---------- + +Create a Cartesian figure using the :meth:`pygmt.Figure.basemap` method. Pass lists +containing two values to the ``x`` and ``y`` parameters of the +:meth:`pygmt.Figure.plot` method. By default, a 0.25-points thick, black, solid +line is drawn between these two data points. + +.. GENERATED FROM PYTHON SOURCE LINES 19-27 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + + fig.plot(x=[1, 5], y=[5, 9]) + + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_lines_001.png + :alt: lines + :srcset: /tutorials/basics/images/sphx_glr_lines_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 28-30 + +Additional line segments can be added by including more data points in the lists +passed to ``x`` and ``y``. + +.. GENERATED FROM PYTHON SOURCE LINES 30-38 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + + fig.plot(x=[1, 5, 8], y=[5, 9, 4]) + + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_lines_002.png + :alt: lines + :srcset: /tutorials/basics/images/sphx_glr_lines_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 39-41 + +To plot multiple lines, :meth:`pygmt.Figure.plot` needs to be used for each line +separately. + +.. GENERATED FROM PYTHON SOURCE LINES 41-51 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + + fig.plot(x=[1, 5, 8], y=[5, 9, 4]) + fig.plot(x=[2, 4, 9], y=[3, 7, 5]) + + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_lines_003.png + :alt: lines + :srcset: /tutorials/basics/images/sphx_glr_lines_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 52-57 + +Change line attributes +---------------------- + +The line attributes can be set by the ``pen`` parameter which takes a string +argument with the optional values *width*,\ *color*,\ *style*. + +.. GENERATED FROM PYTHON SOURCE LINES 57-67 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + + # Set the pen width to "5p" (5 points), and use the default color "black" and the + # default style "solid" + fig.plot(x=[1, 8], y=[3, 9], pen="5p") + + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_lines_004.png + :alt: lines + :srcset: /tutorials/basics/images/sphx_glr_lines_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 68-70 + +The line color can be set and is added after the line width to the ``pen`` +parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 70-79 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + + # Set the line color to "red", use the default style "solid" + fig.plot(x=[1, 8], y=[3, 9], pen="5p,red") + + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_lines_005.png + :alt: lines + :srcset: /tutorials/basics/images/sphx_glr_lines_005.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 80-82 + +The line style can be set and is added after the line width or color to the +``pen`` parameter. + +.. GENERATED FROM PYTHON SOURCE LINES 82-91 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + + # Set the line style to "..-" (dot dot dash), use the default color "black" + fig.plot(x=[1, 8], y=[3, 9], pen="5p,..-") + + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_lines_006.png + :alt: lines + :srcset: /tutorials/basics/images/sphx_glr_lines_006.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 92-95 + +The line width, color, and style can all be set in the same ``pen`` parameter. +For a gallery example showing other ``pen`` settings, see +:doc:`/gallery/lines/linestyles`. + +.. GENERATED FROM PYTHON SOURCE LINES 95-104 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True) + + # Draw a 7-points thick, green line with style "-.-" (dash dot dash) + fig.plot(x=[1, 8], y=[3, 9], pen="7p,green,-.-") + + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_lines_007.png + :alt: lines + :srcset: /tutorials/basics/images/sphx_glr_lines_007.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.948 seconds) + + +.. _sphx_glr_download_tutorials_basics_lines.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: lines.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: lines.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: lines.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/basics/plot.rst.txt b/v0.14.0/_sources/tutorials/basics/plot.rst.txt new file mode 100644 index 00000000000..b9a0984b7d1 --- /dev/null +++ b/v0.14.0/_sources/tutorials/basics/plot.rst.txt @@ -0,0 +1,232 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/basics/plot.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_tutorials_basics_plot.py: + + +Plotting data points +==================== + +GMT shines when it comes to plotting data on a map. We can use some sample data +that is packaged with GMT to try this out. PyGMT provides access to these +datasets through the :mod:`pygmt.datasets` package. If you don't have the data +files already, they are automatically downloaded and saved to a cache directory +the first time you use them (usually ``~/.gmt/cache``). + +.. GENERATED FROM PYTHON SOURCE LINES 13-15 + +.. code-block:: Python + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 16-19 + +For example, let's load the sample dataset of tsunami generating earthquakes +around Japan using :func:`pygmt.datasets.load_sample_data`. +The data are loaded as a :class:`pandas.DataFrame`. + +.. GENERATED FROM PYTHON SOURCE LINES 19-33 + +.. code-block:: Python + + + data = pygmt.datasets.load_sample_data(name="japan_quakes") + + # Set the region for the plot to be slightly larger than the data bounds. + region = [ + data.longitude.min() - 1, + data.longitude.max() + 1, + data.latitude.min() - 1, + data.latitude.max() + 1, + ] + + print(region) + print(data.head()) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + [np.float64(131.29), np.float64(150.89), np.float64(34.02), np.float64(50.77)] + year month day latitude longitude depth_km magnitude + 0 1987 1 4 49.77 149.29 489 4.1 + 1 1987 1 9 39.90 141.68 67 6.8 + 2 1987 1 9 39.82 141.64 84 4.0 + 3 1987 1 14 42.56 142.85 102 6.5 + 4 1987 1 16 42.79 145.10 54 5.1 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 34-36 + +We'll use the :meth:`pygmt.Figure.plot` method to plot circles on the +earthquake epicenters. + +.. GENERATED FROM PYTHON SOURCE LINES 36-43 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=region, projection="M15c", frame=True) + fig.coast(land="black", water="skyblue") + fig.plot(x=data.longitude, y=data.latitude, style="c0.3c", fill="white", pen="black") + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_plot_001.png + :alt: plot + :srcset: /tutorials/basics/images/sphx_glr_plot_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 44-52 + +We used the style ``c0.3c`` which means "circles with a diameter of 0.3 +centimeters". The ``pen`` parameter controls the outline of the symbols and +the ``fill`` parameter controls the fill. + +We can map the size of the circles to the earthquake magnitude by passing an +array to the ``size`` parameter. Because the magnitude is on a logarithmic +scale, it helps to show the differences by scaling the values using a power +law. + +.. GENERATED FROM PYTHON SOURCE LINES 52-66 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=region, projection="M15c", frame=True) + fig.coast(land="black", water="skyblue") + fig.plot( + x=data.longitude, + y=data.latitude, + size=0.02 * (2**data.magnitude), + style="cc", + fill="white", + pen="black", + ) + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_plot_002.png + :alt: plot + :srcset: /tutorials/basics/images/sphx_glr_plot_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 67-79 + +Notice that we didn't include the size in the ``style`` parameter this time, +just the symbol ``c`` (circles) and the unit ``c`` (centimeters). So in +this case, the size will be interpreted as being in centimeters. + +We can also map the colors of the markers to the depths by passing an array +to the ``fill`` parameter and providing a colormap name (``cmap``). We can +even use the new matplotlib colormap "viridis". Here, we first create a +continuous colormap ranging from the minimum depth to the maximum depth of +the earthquakes using :func:`pygmt.makecpt`, then set ``cmap=True`` in +:meth:`pygmt.Figure.plot` to use the colormap. At the end of the plot, we +also plot a colorbar showing the colormap used in the plot. + + +.. GENERATED FROM PYTHON SOURCE LINES 79-96 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=region, projection="M15c", frame=True) + fig.coast(land="black", water="skyblue") + pygmt.makecpt(cmap="viridis", series=[data.depth_km.min(), data.depth_km.max()]) + fig.plot( + x=data.longitude, + y=data.latitude, + size=0.02 * 2**data.magnitude, + fill=data.depth_km, + cmap=True, + style="cc", + pen="black", + ) + fig.colorbar(frame="xaf+lDepth (km)") + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_plot_003.png + :alt: plot + :srcset: /tutorials/basics/images/sphx_glr_plot_003.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.752 seconds) + + +.. _sphx_glr_download_tutorials_basics_plot.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/basics/polygons.rst.txt b/v0.14.0/_sources/tutorials/basics/polygons.rst.txt new file mode 100644 index 00000000000..1953bb839c5 --- /dev/null +++ b/v0.14.0/_sources/tutorials/basics/polygons.rst.txt @@ -0,0 +1,273 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/basics/polygons.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_tutorials_basics_polygons.py: + + +Plotting polygons +================= + +Plotting polygons is handled by the :meth:`pygmt.Figure.plot` method. + +This tutorial focuses on input data given as NumPy arrays. Besides NumPy arrays, +array-like objects are supported. Here, a polygon is a closed shape defined by a series +of data points with x and y coordinates, connected by line segments, with the start and +end points being identical. For plotting a :class:`geopandas.GeoDataFrame` object with +polygon geometries, e.g., to create a choropleth map, see the gallery example +:doc:`Choropleth map `. + +.. GENERATED FROM PYTHON SOURCE LINES 16-19 + +.. code-block:: Python + + import numpy as np + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-24 + +Plot polygons +------------- + +Set up sample data points as NumPy arrays for the x and y values. + +.. GENERATED FROM PYTHON SOURCE LINES 24-28 + +.. code-block:: Python + + + x = np.array([-2, 1, 3, 0, -4, -2]) + y = np.array([-3, -1, 1, 3, 2, -3]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 29-34 + +Create a Cartesian plot via the :meth:`pygmt.Figure.basemap` method. Pass arrays to +the ``x`` and ``y`` parameters of the :meth:`pygmt.Figure.plot` method. Without +further adjustments, lines are drawn between the data points. By default, the lines +are 0.25-points thick, black, and solid. In this example, the data points are chosen +to make the lines form a polygon. + +.. GENERATED FROM PYTHON SOURCE LINES 34-40 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) + fig.plot(x=x, y=y) + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_polygons_001.png + :alt: polygons + :srcset: /tutorials/basics/images/sphx_glr_polygons_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 41-44 + +The ``pen`` parameter can be used to adjust the lines or outline of the polygon. The +argument passed to ``pen`` is one string with the comma-separated optional values +*width*,\ *color*,\ *style*. + +.. GENERATED FROM PYTHON SOURCE LINES 44-51 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) + # Use a 2-points thick, darkred, dashed outline + fig.plot(x=x, y=y, pen="2p,darkred,dashed") + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_polygons_002.png + :alt: polygons + :srcset: /tutorials/basics/images/sphx_glr_polygons_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 52-56 + +Use the ``fill`` parameter to fill the polygon with a color or +:doc:`pattern `. Note, that there are no lines drawn between the +data points by default if ``fill`` is used. Use the ``pen`` parameter to add an +outline around the polygon. + +.. GENERATED FROM PYTHON SOURCE LINES 56-64 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) + # Fill the polygon with color "orange" + fig.plot(x=x, y=y, fill="orange") + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_polygons_003.png + :alt: polygons + :srcset: /tutorials/basics/images/sphx_glr_polygons_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 65-70 + +Close polygons +-------------- + +Set up sample data points as NumPy arrays for the x and y values. Now, the data points +do not form a polygon. + +.. GENERATED FROM PYTHON SOURCE LINES 70-74 + +.. code-block:: Python + + + x = np.array([-2, 1, 3, 0, -4]) + y = np.array([-3, -1, 1, 3, 2]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 75-76 + +The ``close`` parameter can be used to force the polygon to be closed. + +.. GENERATED FROM PYTHON SOURCE LINES 76-87 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) + fig.plot(x=x, y=y, pen=True) + + fig.shift_origin(xshift="w+1c") + + fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) + fig.plot(x=x, y=y, pen=True, close=True) + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_polygons_004.png + :alt: polygons + :srcset: /tutorials/basics/images/sphx_glr_polygons_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 88-89 + +When using the ``fill`` parameter, the polygon is automatically closed. + +.. GENERATED FROM PYTHON SOURCE LINES 89-100 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) + fig.plot(x=x, y=y, pen=True) + + fig.shift_origin(xshift="w+1c") + + fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) + fig.plot(x=x, y=y, pen=True, fill="orange") + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_polygons_005.png + :alt: polygons + :srcset: /tutorials/basics/images/sphx_glr_polygons_005.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.589 seconds) + + +.. _sphx_glr_download_tutorials_basics_polygons.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: polygons.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: polygons.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: polygons.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/basics/regions.rst.txt b/v0.14.0/_sources/tutorials/basics/regions.rst.txt new file mode 100644 index 00000000000..33c27e543c8 --- /dev/null +++ b/v0.14.0/_sources/tutorials/basics/regions.rst.txt @@ -0,0 +1,492 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/basics/regions.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_tutorials_basics_regions.py: + + +Setting the region +================== + +Many of the plotting methods take the ``region`` parameter, which sets the +area that will be shown in the figure. This tutorial covers the different types +of inputs that it can accept. + +.. GENERATED FROM PYTHON SOURCE LINES 11-13 + +.. code-block:: Python + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 14-19 + +Coordinates +----------- + +A string of coordinates can be passed to ``region``, in the form of +*xmin*/*xmax*/*ymin*/*ymax*. + +.. GENERATED FROM PYTHON SOURCE LINES 19-39 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + # Set the x-range from 10E to 20E and the y-range to 35N to 45N + region="10/20/35/45", + # Set projection to Mercator, and the figure size to 15 centimeters + projection="M15c", + # Set the color of the land to light gray + land="lightgray", + # Set the color of the water to white + water="white", + # Display the national borders and set the pen thickness to 0.5p + borders="1/0.5p", + # Display the shorelines and set the pen thickness to 0.5p + shorelines="1/0.5p", + # Set the frame to display annotations and gridlines + frame="ag", + ) + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_regions_001.png + :alt: regions + :srcset: /tutorials/basics/images/sphx_glr_regions_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 40-42 + +The coordinates can be passed to ``region`` as a list, in the form of +[*xmin*, *xmax*, *ymin*, *ymax*]. + +.. GENERATED FROM PYTHON SOURCE LINES 42-56 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + # Set the x-range from 10E to 20E and the y-range to 35N to 45N + region=[10, 20, 35, 45], + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", + ) + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_regions_002.png + :alt: regions + :srcset: /tutorials/basics/images/sphx_glr_regions_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 57-61 + +Instead of passing axes minima and maxima, the coordinates can be passed for +the bottom-left and top-right corners. The string format takes the +coordinates for the bottom-left and top-right coordinates. To specify corner +coordinates, append **+r** at the end of the ``region`` string. + +.. GENERATED FROM PYTHON SOURCE LINES 61-77 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + # Set the bottom-left corner as 10E, 35N and the top-right corner as + # 20E, 45N + region="10/35/20/45+r", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", + ) + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_regions_003.png + :alt: regions + :srcset: /tutorials/basics/images/sphx_glr_regions_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 78-87 + +Global regions +-------------- + +In addition to passing coordinates, the argument **d** can be passed to set +the region to the entire globe. The range is 180W to 180E (-180, 180) and 90S +to 90N (-90 to 90). With no parameters set for the projection, the figure +defaults to be centered at the mid-point of both x- and y-axes. Using +**d**\ , the figure is centered at (0, 0), or the intersection of the equator +and prime meridian. + +.. GENERATED FROM PYTHON SOURCE LINES 87-100 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + region="d", + projection="Cyl_stere/12c", + land="darkgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", + ) + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_regions_004.png + :alt: regions + :srcset: /tutorials/basics/images/sphx_glr_regions_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 101-105 + +The argument **g** can be passed, which encompasses the entire globe. The +range is 0E to 360E (0, 360) and 90S to 90N (-90 to 90). With no parameters +set for the projection, the figure is centered at (180, 0), or the +intersection of the equator and International Date Line. + +.. GENERATED FROM PYTHON SOURCE LINES 105-119 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + region="g", + projection="Cyl_stere/12c", + land="darkgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", + ) + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_regions_005.png + :alt: regions + :srcset: /tutorials/basics/images/sphx_glr_regions_005.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 120-126 + +ISO code +-------- + +The ``region`` can be set to include a specific area specified by the +two-character ISO 3166-1 alpha-2 convention +(for further information: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + +.. GENERATED FROM PYTHON SOURCE LINES 126-140 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + # Set the figure region to encompass Japan with the ISO code "JP" + region="JP", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", + ) + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_regions_006.png + :alt: regions + :srcset: /tutorials/basics/images/sphx_glr_regions_006.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 141-146 + +The area encompassed by the ISO code can be expanded by appending +**+r**\ *increment* to the ISO code. The *increment* unit is in degrees, and +if only one value is added it expands the range of the region in all +directions. Using **+r** expands the final region boundaries to be multiples +of *increment* . + +.. GENERATED FROM PYTHON SOURCE LINES 146-161 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + # Expand the region boundaries to be multiples of 3 degrees in all + # directions + region="JP+r3", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", + ) + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_regions_007.png + :alt: regions + :srcset: /tutorials/basics/images/sphx_glr_regions_007.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 162-165 + +Instead of expanding the range of the plot uniformly in all directions, two +values can be passed to expand differently on each axis. The format is +*xinc*/*yinc*. + +.. GENERATED FROM PYTHON SOURCE LINES 165-180 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + # Expand the region boundaries to be multiples of 3 degrees on the x-axis + # and 5 degrees on the y-axis. + region="JP+r3/5", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", + ) + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_regions_008.png + :alt: regions + :srcset: /tutorials/basics/images/sphx_glr_regions_008.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 181-185 + +Instead of expanding the range of the plot uniformly in all directions, four +values can be passed to expand differently in each direction. +The format is *winc*/*einc*/*sinc*/*ninc*, which expands on the west, +east, south, and north axes. + +.. GENERATED FROM PYTHON SOURCE LINES 185-200 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + # Expand the region boundaries to be multiples of 3 degrees to the west, 5 + # degrees to the east, 7 degrees to the south, and 9 degrees to the north. + region="JP+r3/5/7/9", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", + ) + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_regions_009.png + :alt: regions + :srcset: /tutorials/basics/images/sphx_glr_regions_009.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 201-203 + +The ``region`` increment can be appended with **+R**, which adds the +increment without rounding. + +.. GENERATED FROM PYTHON SOURCE LINES 203-218 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + # Expand the region setting outside the range of Japan by 3 degrees in all + # directions, without rounding to the nearest increment. + region="JP+R3", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", + ) + fig.show() + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_regions_010.png + :alt: regions + :srcset: /tutorials/basics/images/sphx_glr_regions_010.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 219-223 + +The ``region`` increment can be appended with **+e**, which is like **+r** +and expands the final region boundaries to be multiples of *increment*. +However, it ensures that the bounding box extends by at least 0.25 times the +increment. + +.. GENERATED FROM PYTHON SOURCE LINES 223-237 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.coast( + # Expand the region boundaries to be multiples of 3 degrees in all + # directions + region="JP+e3", + projection="M12c", + land="lightgray", + water="white", + borders="1/0.5p", + shorelines="1/0.5p", + frame="ag", + ) + fig.show() + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_regions_011.png + :alt: regions + :srcset: /tutorials/basics/images/sphx_glr_regions_011.png + :class: sphx-glr-single-img + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 3.423 seconds) + + +.. _sphx_glr_download_tutorials_basics_regions.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: regions.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: regions.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: regions.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/basics/sg_execution_times.rst.txt b/v0.14.0/_sources/tutorials/basics/sg_execution_times.rst.txt new file mode 100644 index 00000000000..be5e39aa428 --- /dev/null +++ b/v0.14.0/_sources/tutorials/basics/sg_execution_times.rst.txt @@ -0,0 +1,55 @@ + +:orphan: + +.. _sphx_glr_tutorials_basics_sg_execution_times: + + +Computation times +================= +**00:09.930** total execution time for 7 files **from tutorials/basics**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_tutorials_basics_regions.py` (``regions.py``) + - 00:03.423 + - 0.0 + * - :ref:`sphx_glr_tutorials_basics_frames.py` (``frames.py``) + - 00:01.872 + - 0.0 + * - :ref:`sphx_glr_tutorials_basics_text.py` (``text.py``) + - 00:01.245 + - 0.0 + * - :ref:`sphx_glr_tutorials_basics_coastlines.py` (``coastlines.py``) + - 00:01.101 + - 0.0 + * - :ref:`sphx_glr_tutorials_basics_lines.py` (``lines.py``) + - 00:00.948 + - 0.0 + * - :ref:`sphx_glr_tutorials_basics_plot.py` (``plot.py``) + - 00:00.752 + - 0.0 + * - :ref:`sphx_glr_tutorials_basics_polygons.py` (``polygons.py``) + - 00:00.589 + - 0.0 diff --git a/v0.14.0/_sources/tutorials/basics/text.rst.txt b/v0.14.0/_sources/tutorials/basics/text.rst.txt new file mode 100644 index 00000000000..f4083971138 --- /dev/null +++ b/v0.14.0/_sources/tutorials/basics/text.rst.txt @@ -0,0 +1,408 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "tutorials/basics/text.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_tutorials_basics_text.py: + + +Plotting text +============= + +It is often useful to add text annotations to a plot or map. This is handled by the +:meth:`pygmt.Figure.text` method of the :class:`pygmt.Figure` class. + +.. GENERATED FROM PYTHON SOURCE LINES 10-14 + +.. code-block:: Python + + from pathlib import Path + + import pygmt + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 15-20 + +Adding a single text label +-------------------------- + +To add a single text label to a plot, use the ``text`` and ``x`` and ``y`` parameters +to specify the text and position. + +.. GENERATED FROM PYTHON SOURCE LINES 20-27 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) + fig.text(x=0, y=0, text="My text") + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_text_001.png + :alt: text + :srcset: /tutorials/basics/images/sphx_glr_text_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 28-46 + +Adjusting the text label +------------------------ + +There are several optional parameters to adjust the text label: + +* ``font``: Sets the size, family/weight, and color of the font for the text. + A list of all recognized fonts can be found at :doc:`/techref/fonts`. + For details of how to use non-default fonts, refer to + :gmt-docs:`PostScript Fonts Used by GMT `. +* ``angle``: Specifies the rotation of the text. It is measured counter-clockwise + from the horizontal in degrees. +* ``justify``: Defines the anchor point of the bounding box for the text. It is + specified by a two-letter (order independent) code, chosen from: + + * Vertical: **T**\(op), **M**\(iddle), **B**\(ottom) + * Horizontal: **L**\(eft), **C**\(entre), **R**\(ight) + +* ``offset``: Shifts the text relatively to the reference point. + +.. GENERATED FROM PYTHON SOURCE LINES 46-97 + +.. code-block:: Python + + + fig = pygmt.Figure() + + # ----------------------------------------------------------------------------- + # Left: "font", "angle", and "offset" parameters + fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame="rtlb") + + # Change font size, family/weight, color of the text + fig.text(x=0, y=3, text="my text", font="12p,Helvetica-Bold,blue") + + # Rotate the text by 30 degrees counter-clockwise from the horizontal + fig.text(x=0, y=0, text="my text", angle=30) + + # Plot marker and text label for reference + fig.plot(x=0, y=-3, style="s0.2c", fill="darkorange", pen="0.7p,darkgray") + fig.text(x=0, y=-3, text="my text") + # Shift the text label relatively to the position given via the x and y parameters + # by 1 centimeter to the right (positive x direction) and 0.5 centimeters down + # (negative y direction) + fig.text(x=0, y=-3, text="my text", offset="1c/-0.5c") + + fig.shift_origin(xshift="w+0.5c") + + # ----------------------------------------------------------------------------- + # Right: "justify" parameter + fig.basemap(region=[-1, 1, -1, 1], projection="X5c", frame="rtlb") + + # Plot markers for reference + fig.plot( + x=[-0.5, 0, 0.5, -0.5, 0, 0.5, -0.5, 0, 0.5], + y=[0.5, 0.5, 0.5, 0, 0, 0, -0.5, -0.5, -0.5], + style="s0.2c", + fill="darkorange", + pen="0.7p,darkgray", + ) + + # Plot text labels at the x and y positions of the markers while varying the anchor + # point via the justify parameter + fig.text(x=-0.5, y=0.5, text="TL", justify="TL") # TopLeft + fig.text(x=0, y=0.5, text="TC", justify="TC") # TopCenter + fig.text(x=0.5, y=0.5, text="TR", justify="TR") # TopRight + fig.text(x=-0.5, y=0, text="ML", justify="ML") # MiddleLeft + fig.text(x=0, y=0, text="MC", justify="MC") # MiddleCenter + fig.text(x=0.5, y=0, text="MR", justify="MR") # MiddleRight + fig.text(x=-0.5, y=-0.5, text="BL", justify="BL") # BottomLeft + fig.text(x=0, y=-0.5, text="BC", justify="BC") # BottomCenter + fig.text(x=0.5, y=-0.5, text="BR", justify="BR") # BottomRight + + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_text_002.png + :alt: text + :srcset: /tutorials/basics/images/sphx_glr_text_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 98-107 + +Adding a text box +----------------- + +There are different optional parameters to add and customize a text box: + +* ``fill``: Fills the text box with a color. +* ``pen``: Outlines the text box. +* ``clearance``: Adds margins in x and y directions between the text and the outline + of the text box. Can be used to get a text box with rounded edges. + +.. GENERATED FROM PYTHON SOURCE LINES 107-128 + +.. code-block:: Python + + + fig = pygmt.Figure() + + fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame="rtlb") + + # Add a box with a fill in green color + fig.text(x=0, y=3, text="My text", fill="green") + + # Add box with a seagreen, 1-point thick, solid outline + fig.text(x=0, y=1, text="My text", pen="1p,seagreen,solid") + + # Add margins between the text and the outline of the text box of 0.1 + # centimeters in x direction and 0.2 centimeters in y direction + fig.text(x=0, y=-1, text="My text", pen="1p,seagreen,dashed", clearance="0.1c/0.2c") + + # Get rounded edges by passing "+tO" to the "clearance" parameter + fig.text(x=0, y=-3, text="My text", pen="1p,seagreen,solid", clearance="0.2c/0.2c+tO") + + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_text_003.png + :alt: text + :srcset: /tutorials/basics/images/sphx_glr_text_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 129-134 + +Adding multiple text labels with individual configurations +---------------------------------------------------------- + +To add multiple text labels with individual ``font``, ``angle``, and ``justify``, +one can provide lists with the corresponding arguments. + +.. GENERATED FROM PYTHON SOURCE LINES 134-154 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True) + + fig.text( + x=[0, 0, 0], + y=[3, 2, -2], + font=["5p,Helvetica,black", "5p,Helvetica,blue", "6p,Courier-Bold,red"], + angle=[0, 0, 30], + justify=["CM", "LT", "CM"], + text=[ + "black text with justify='CM'", + "blue text with justify='LT'", + "red text with angle=30", + ], + ) + + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_text_004.png + :alt: text + :srcset: /tutorials/basics/images/sphx_glr_text_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 155-161 + +Using an external input file +---------------------------- + +It is also possible to add text labels via an external input file containing ``x``, +``y``, and ``text`` columns. Addionaly, columns to set the ``angle``, ``front``, +and ``justify`` parameters can be provided. Here, we give a complete example. + +.. GENERATED FROM PYTHON SOURCE LINES 161-188 + +.. code-block:: Python + + + fig = pygmt.Figure() + fig.basemap(region=[108, 121, -5, 8], projection="M10c", frame="a2f1") + fig.coast(land="darkgray", water="steelblue", shorelines="1/0.1p,gray30") + + # Create space-delimited file with region / sea names: + # - longitude (x) and latitude (y) coordinates are in the first two columns + # - angle, font, and justify muss be present in this order in the next three columns + # - the text to be printed is given in the last column + with Path.open("examples.txt", "w") as f: + f.write("114.00 0.50 0 15p,Helvetica-Bold,white CM BORNEO\n") + f.write("119.00 3.25 0 8p,Helvetica-Bold,black CM CELEBES SEA\n") + f.write("112.00 -4.60 0 8p,Helvetica-Bold,black CM JAVA SEA\n") + f.write("112.00 6.00 40 8p,Helvetica-Bold,black CM SOUTH CHINA SEA\n") + f.write("119.12 7.25 -40 8p,Helvetica-Bold,black CM SULU SEA\n") + f.write("118.40 -1.00 65 8p,Helvetica-Bold,black CM MAKASSAR STRAIT\n") + + # Setting the angle, font, and justify parameters to True indicates that those columns + # are present in the text file + fig.text(textfiles="examples.txt", angle=True, font=True, justify=True) + + # Cleanups + Path("examples.txt").unlink() + + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_text_005.png + :alt: text + :srcset: /tutorials/basics/images/sphx_glr_text_005.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 189-202 + +Using the position parameter +---------------------------- + +Instead of using the ``x`` and ``y`` parameters, the ``position`` parameter can be +specified to set the reference point for the text on the plot. As for the ``justify`` +parameter, the ``position`` parameter is specified by a two-letter (order independent) +code, chosen from: + +* Vertical: **T**\(op), **M**\(iddle), **B**\(ottom) +* Horizontal: **L**\(eft), **C**\(entre), **R**\(ight) + +This can be helpful to add a tag to a subplot or text labels out of the plot or map +frame, e.g., for depth slices. + +.. GENERATED FROM PYTHON SOURCE LINES 202-233 + +.. code-block:: Python + + + fig = pygmt.Figure() + + # ----------------------------------------------------------------------------- + # Left: Add a tag to a subplot + fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=["WStr", "af"]) + + fig.text( + text="(a)", + position="TL", # Top Left + justify="TL", # Top Left + offset="0.1c/-0.1c", + ) + + fig.shift_origin(xshift="w+1c") + + # ----------------------------------------------------------------------------- + # Right: Add a text label outside of the plot or map frame + fig.basemap(region=[-30, 30, 10, 60], projection="L0/35/23/47/5c", frame=["wSnE", "af"]) + + fig.text( + text="@@100 km", # "@@" gives "@" in GMT or PyGMT + position="TC", # Top Center + justify="MC", # Middle Center + offset="0c/0.2c", + no_clip=True, # Allow plotting outside of the map or plot frame + ) + + fig.show() + + + + + +.. image-sg:: /tutorials/basics/images/sphx_glr_text_006.png + :alt: text + :srcset: /tutorials/basics/images/sphx_glr_text_006.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 234-241 + +Advanced configuration +---------------------- + +For crafting more advanced styles, including using special symbols and other character +sets, be sure to check out the GMT documentation at :gmt-docs:`text.html` and also the +Technical References at :gmt-docs:`reference/features.html#placement-of-text`. Good +luck! + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.245 seconds) + + +.. _sphx_glr_download_tutorials_basics_text.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: text.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: text.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: text.zip ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/index.rst.txt b/v0.14.0/_sources/tutorials/index.rst.txt new file mode 100644 index 00000000000..5940a13a908 --- /dev/null +++ b/v0.14.0/_sources/tutorials/index.rst.txt @@ -0,0 +1,432 @@ +:orphan: + +Tutorials +========= + +These examples teach us how to complete various tasks using PyGMT! + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ +Basics +------ + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/basics/images/thumb/sphx_glr_coastlines_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_basics_coastlines.py` + +.. raw:: html + +
Coastlines and borders
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/basics/images/thumb/sphx_glr_frames_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_basics_frames.py` + +.. raw:: html + +
Frames, ticks, titles, and labels
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/basics/images/thumb/sphx_glr_plot_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_basics_plot.py` + +.. raw:: html + +
Plotting data points
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/basics/images/thumb/sphx_glr_lines_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_basics_lines.py` + +.. raw:: html + +
Plotting lines
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/basics/images/thumb/sphx_glr_polygons_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_basics_polygons.py` + +.. raw:: html + +
Plotting polygons
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/basics/images/thumb/sphx_glr_text_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_basics_text.py` + +.. raw:: html + +
Plotting text
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/basics/images/thumb/sphx_glr_regions_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_basics_regions.py` + +.. raw:: html + +
Setting the region
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /tutorials/basics/coastlines + /tutorials/basics/frames + /tutorials/basics/plot + /tutorials/basics/lines + /tutorials/basics/polygons + /tutorials/basics/text + /tutorials/basics/regions + +Advanced +-------- + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/advanced/images/thumb/sphx_glr_insets_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_advanced_insets.py` + +.. raw:: html + +
Adding an inset to the figure
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/advanced/images/thumb/sphx_glr_cartesian_histograms_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_advanced_cartesian_histograms.py` + +.. raw:: html + +
Cartesian histograms
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/advanced/images/thumb/sphx_glr_configuration_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_advanced_configuration.py` + +.. raw:: html + +
Configuring PyGMT defaults
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/advanced/images/thumb/sphx_glr_3d_perspective_image_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_advanced_3d_perspective_image.py` + +.. raw:: html + +
Creating a 3-D perspective image
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/advanced/images/thumb/sphx_glr_contour_map_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_advanced_contour_map.py` + +.. raw:: html + +
Creating a map with contour lines
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/advanced/images/thumb/sphx_glr_draping_on_3d_surface_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_advanced_draping_on_3d_surface.py` + +.. raw:: html + +
Draping a dataset on top of a topographic surface
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/advanced/images/thumb/sphx_glr_working_with_panel_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_advanced_working_with_panel.py` + +.. raw:: html + +
Interactive data visualization using Panel
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/advanced/images/thumb/sphx_glr_subplots_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_advanced_subplots.py` + +.. raw:: html + +
Making subplots
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/advanced/images/thumb/sphx_glr_grid_equalization_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_advanced_grid_equalization.py` + +.. raw:: html + +
Performing grid histogram equalization
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/advanced/images/thumb/sphx_glr_earth_relief_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_advanced_earth_relief.py` + +.. raw:: html + +
Plotting Earth relief
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/advanced/images/thumb/sphx_glr_date_time_charts_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_advanced_date_time_charts.py` + +.. raw:: html + +
Plotting datetime charts
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/advanced/images/thumb/sphx_glr_vectors_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_advanced_vectors.py` + +.. raw:: html + +
Plotting vectors
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/advanced/images/thumb/sphx_glr_non_ascii_text_thumb.png + :alt: + + :ref:`sphx_glr_tutorials_advanced_non_ascii_text.py` + +.. raw:: html + +
Typesetting non-ASCII text
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /tutorials/advanced/insets + /tutorials/advanced/cartesian_histograms + /tutorials/advanced/configuration + /tutorials/advanced/3d_perspective_image + /tutorials/advanced/contour_map + /tutorials/advanced/draping_on_3d_surface + /tutorials/advanced/working_with_panel + /tutorials/advanced/subplots + /tutorials/advanced/grid_equalization + /tutorials/advanced/earth_relief + /tutorials/advanced/date_time_charts + /tutorials/advanced/vectors + /tutorials/advanced/non_ascii_text + + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/v0.14.0/_sources/tutorials/sg_execution_times.rst.txt b/v0.14.0/_sources/tutorials/sg_execution_times.rst.txt new file mode 100644 index 00000000000..a215c88efdc --- /dev/null +++ b/v0.14.0/_sources/tutorials/sg_execution_times.rst.txt @@ -0,0 +1,37 @@ + +:orphan: + +.. _sphx_glr_tutorials_sg_execution_times: + + +Computation times +================= +**00:00.000** total execution time for 0 files **from tutorials**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - N/A + - N/A + - N/A diff --git a/v0.14.0/_sphinx_design_static/design-tabs.js b/v0.14.0/_sphinx_design_static/design-tabs.js new file mode 100644 index 00000000000..b25bd6a4fa1 --- /dev/null +++ b/v0.14.0/_sphinx_design_static/design-tabs.js @@ -0,0 +1,101 @@ +// @ts-check + +// Extra JS capability for selected tabs to be synced +// The selection is stored in local storage so that it persists across page loads. + +/** + * @type {Record} + */ +let sd_id_to_elements = {}; +const storageKeyPrefix = "sphinx-design-tab-id-"; + +/** + * Create a key for a tab element. + * @param {HTMLElement} el - The tab element. + * @returns {[string, string, string] | null} - The key. + * + */ +function create_key(el) { + let syncId = el.getAttribute("data-sync-id"); + let syncGroup = el.getAttribute("data-sync-group"); + if (!syncId || !syncGroup) return null; + return [syncGroup, syncId, syncGroup + "--" + syncId]; +} + +/** + * Initialize the tab selection. + * + */ +function ready() { + // Find all tabs with sync data + + /** @type {string[]} */ + let groups = []; + + document.querySelectorAll(".sd-tab-label").forEach((label) => { + if (label instanceof HTMLElement) { + let data = create_key(label); + if (data) { + let [group, id, key] = data; + + // add click event listener + // @ts-ignore + label.onclick = onSDLabelClick; + + // store map of key to elements + if (!sd_id_to_elements[key]) { + sd_id_to_elements[key] = []; + } + sd_id_to_elements[key].push(label); + + if (groups.indexOf(group) === -1) { + groups.push(group); + // Check if a specific tab has been selected via URL parameter + const tabParam = new URLSearchParams(window.location.search).get( + group + ); + if (tabParam) { + console.log( + "sphinx-design: Selecting tab id for group '" + + group + + "' from URL parameter: " + + tabParam + ); + window.sessionStorage.setItem(storageKeyPrefix + group, tabParam); + } + } + + // Check is a specific tab has been selected previously + let previousId = window.sessionStorage.getItem( + storageKeyPrefix + group + ); + if (previousId === id) { + // console.log( + // "sphinx-design: Selecting tab from session storage: " + id + // ); + // @ts-ignore + label.previousElementSibling.checked = true; + } + } + } + }); +} + +/** + * Activate other tabs with the same sync id. + * + * @this {HTMLElement} - The element that was clicked. + */ +function onSDLabelClick() { + let data = create_key(this); + if (!data) return; + let [group, id, key] = data; + for (const label of sd_id_to_elements[key]) { + if (label === this) continue; + // @ts-ignore + label.previousElementSibling.checked = true; + } + window.sessionStorage.setItem(storageKeyPrefix + group, id); +} + +document.addEventListener("DOMContentLoaded", ready, false); diff --git a/v0.14.0/_sphinx_design_static/sphinx-design.min.css b/v0.14.0/_sphinx_design_static/sphinx-design.min.css new file mode 100644 index 00000000000..860c36da0fa --- /dev/null +++ b/v0.14.0/_sphinx_design_static/sphinx-design.min.css @@ -0,0 +1 @@ +.sd-bg-primary{background-color:var(--sd-color-primary) !important}.sd-bg-text-primary{color:var(--sd-color-primary-text) !important}button.sd-bg-primary:focus,button.sd-bg-primary:hover{background-color:var(--sd-color-primary-highlight) !important}a.sd-bg-primary:focus,a.sd-bg-primary:hover{background-color:var(--sd-color-primary-highlight) !important}.sd-bg-secondary{background-color:var(--sd-color-secondary) !important}.sd-bg-text-secondary{color:var(--sd-color-secondary-text) !important}button.sd-bg-secondary:focus,button.sd-bg-secondary:hover{background-color:var(--sd-color-secondary-highlight) !important}a.sd-bg-secondary:focus,a.sd-bg-secondary:hover{background-color:var(--sd-color-secondary-highlight) !important}.sd-bg-success{background-color:var(--sd-color-success) !important}.sd-bg-text-success{color:var(--sd-color-success-text) !important}button.sd-bg-success:focus,button.sd-bg-success:hover{background-color:var(--sd-color-success-highlight) !important}a.sd-bg-success:focus,a.sd-bg-success:hover{background-color:var(--sd-color-success-highlight) !important}.sd-bg-info{background-color:var(--sd-color-info) !important}.sd-bg-text-info{color:var(--sd-color-info-text) !important}button.sd-bg-info:focus,button.sd-bg-info:hover{background-color:var(--sd-color-info-highlight) !important}a.sd-bg-info:focus,a.sd-bg-info:hover{background-color:var(--sd-color-info-highlight) !important}.sd-bg-warning{background-color:var(--sd-color-warning) !important}.sd-bg-text-warning{color:var(--sd-color-warning-text) !important}button.sd-bg-warning:focus,button.sd-bg-warning:hover{background-color:var(--sd-color-warning-highlight) !important}a.sd-bg-warning:focus,a.sd-bg-warning:hover{background-color:var(--sd-color-warning-highlight) !important}.sd-bg-danger{background-color:var(--sd-color-danger) !important}.sd-bg-text-danger{color:var(--sd-color-danger-text) !important}button.sd-bg-danger:focus,button.sd-bg-danger:hover{background-color:var(--sd-color-danger-highlight) !important}a.sd-bg-danger:focus,a.sd-bg-danger:hover{background-color:var(--sd-color-danger-highlight) !important}.sd-bg-light{background-color:var(--sd-color-light) !important}.sd-bg-text-light{color:var(--sd-color-light-text) !important}button.sd-bg-light:focus,button.sd-bg-light:hover{background-color:var(--sd-color-light-highlight) !important}a.sd-bg-light:focus,a.sd-bg-light:hover{background-color:var(--sd-color-light-highlight) !important}.sd-bg-muted{background-color:var(--sd-color-muted) !important}.sd-bg-text-muted{color:var(--sd-color-muted-text) !important}button.sd-bg-muted:focus,button.sd-bg-muted:hover{background-color:var(--sd-color-muted-highlight) !important}a.sd-bg-muted:focus,a.sd-bg-muted:hover{background-color:var(--sd-color-muted-highlight) !important}.sd-bg-dark{background-color:var(--sd-color-dark) !important}.sd-bg-text-dark{color:var(--sd-color-dark-text) !important}button.sd-bg-dark:focus,button.sd-bg-dark:hover{background-color:var(--sd-color-dark-highlight) !important}a.sd-bg-dark:focus,a.sd-bg-dark:hover{background-color:var(--sd-color-dark-highlight) !important}.sd-bg-black{background-color:var(--sd-color-black) !important}.sd-bg-text-black{color:var(--sd-color-black-text) !important}button.sd-bg-black:focus,button.sd-bg-black:hover{background-color:var(--sd-color-black-highlight) !important}a.sd-bg-black:focus,a.sd-bg-black:hover{background-color:var(--sd-color-black-highlight) !important}.sd-bg-white{background-color:var(--sd-color-white) !important}.sd-bg-text-white{color:var(--sd-color-white-text) !important}button.sd-bg-white:focus,button.sd-bg-white:hover{background-color:var(--sd-color-white-highlight) !important}a.sd-bg-white:focus,a.sd-bg-white:hover{background-color:var(--sd-color-white-highlight) !important}.sd-text-primary,.sd-text-primary>p{color:var(--sd-color-primary) !important}a.sd-text-primary:focus,a.sd-text-primary:hover{color:var(--sd-color-primary-highlight) !important}.sd-text-secondary,.sd-text-secondary>p{color:var(--sd-color-secondary) !important}a.sd-text-secondary:focus,a.sd-text-secondary:hover{color:var(--sd-color-secondary-highlight) !important}.sd-text-success,.sd-text-success>p{color:var(--sd-color-success) !important}a.sd-text-success:focus,a.sd-text-success:hover{color:var(--sd-color-success-highlight) !important}.sd-text-info,.sd-text-info>p{color:var(--sd-color-info) !important}a.sd-text-info:focus,a.sd-text-info:hover{color:var(--sd-color-info-highlight) !important}.sd-text-warning,.sd-text-warning>p{color:var(--sd-color-warning) !important}a.sd-text-warning:focus,a.sd-text-warning:hover{color:var(--sd-color-warning-highlight) !important}.sd-text-danger,.sd-text-danger>p{color:var(--sd-color-danger) !important}a.sd-text-danger:focus,a.sd-text-danger:hover{color:var(--sd-color-danger-highlight) !important}.sd-text-light,.sd-text-light>p{color:var(--sd-color-light) !important}a.sd-text-light:focus,a.sd-text-light:hover{color:var(--sd-color-light-highlight) !important}.sd-text-muted,.sd-text-muted>p{color:var(--sd-color-muted) !important}a.sd-text-muted:focus,a.sd-text-muted:hover{color:var(--sd-color-muted-highlight) !important}.sd-text-dark,.sd-text-dark>p{color:var(--sd-color-dark) !important}a.sd-text-dark:focus,a.sd-text-dark:hover{color:var(--sd-color-dark-highlight) !important}.sd-text-black,.sd-text-black>p{color:var(--sd-color-black) !important}a.sd-text-black:focus,a.sd-text-black:hover{color:var(--sd-color-black-highlight) !important}.sd-text-white,.sd-text-white>p{color:var(--sd-color-white) !important}a.sd-text-white:focus,a.sd-text-white:hover{color:var(--sd-color-white-highlight) !important}.sd-outline-primary{border-color:var(--sd-color-primary) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-primary:focus,a.sd-outline-primary:hover{border-color:var(--sd-color-primary-highlight) !important}.sd-outline-secondary{border-color:var(--sd-color-secondary) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-secondary:focus,a.sd-outline-secondary:hover{border-color:var(--sd-color-secondary-highlight) !important}.sd-outline-success{border-color:var(--sd-color-success) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-success:focus,a.sd-outline-success:hover{border-color:var(--sd-color-success-highlight) !important}.sd-outline-info{border-color:var(--sd-color-info) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-info:focus,a.sd-outline-info:hover{border-color:var(--sd-color-info-highlight) !important}.sd-outline-warning{border-color:var(--sd-color-warning) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-warning:focus,a.sd-outline-warning:hover{border-color:var(--sd-color-warning-highlight) !important}.sd-outline-danger{border-color:var(--sd-color-danger) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-danger:focus,a.sd-outline-danger:hover{border-color:var(--sd-color-danger-highlight) !important}.sd-outline-light{border-color:var(--sd-color-light) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-light:focus,a.sd-outline-light:hover{border-color:var(--sd-color-light-highlight) !important}.sd-outline-muted{border-color:var(--sd-color-muted) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-muted:focus,a.sd-outline-muted:hover{border-color:var(--sd-color-muted-highlight) !important}.sd-outline-dark{border-color:var(--sd-color-dark) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-dark:focus,a.sd-outline-dark:hover{border-color:var(--sd-color-dark-highlight) !important}.sd-outline-black{border-color:var(--sd-color-black) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-black:focus,a.sd-outline-black:hover{border-color:var(--sd-color-black-highlight) !important}.sd-outline-white{border-color:var(--sd-color-white) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-white:focus,a.sd-outline-white:hover{border-color:var(--sd-color-white-highlight) !important}.sd-bg-transparent{background-color:transparent !important}.sd-outline-transparent{border-color:transparent !important}.sd-text-transparent{color:transparent !important}.sd-p-0{padding:0 !important}.sd-pt-0,.sd-py-0{padding-top:0 !important}.sd-pr-0,.sd-px-0{padding-right:0 !important}.sd-pb-0,.sd-py-0{padding-bottom:0 !important}.sd-pl-0,.sd-px-0{padding-left:0 !important}.sd-p-1{padding:.25rem !important}.sd-pt-1,.sd-py-1{padding-top:.25rem !important}.sd-pr-1,.sd-px-1{padding-right:.25rem !important}.sd-pb-1,.sd-py-1{padding-bottom:.25rem !important}.sd-pl-1,.sd-px-1{padding-left:.25rem !important}.sd-p-2{padding:.5rem !important}.sd-pt-2,.sd-py-2{padding-top:.5rem !important}.sd-pr-2,.sd-px-2{padding-right:.5rem !important}.sd-pb-2,.sd-py-2{padding-bottom:.5rem !important}.sd-pl-2,.sd-px-2{padding-left:.5rem !important}.sd-p-3{padding:1rem !important}.sd-pt-3,.sd-py-3{padding-top:1rem !important}.sd-pr-3,.sd-px-3{padding-right:1rem !important}.sd-pb-3,.sd-py-3{padding-bottom:1rem !important}.sd-pl-3,.sd-px-3{padding-left:1rem !important}.sd-p-4{padding:1.5rem !important}.sd-pt-4,.sd-py-4{padding-top:1.5rem !important}.sd-pr-4,.sd-px-4{padding-right:1.5rem !important}.sd-pb-4,.sd-py-4{padding-bottom:1.5rem !important}.sd-pl-4,.sd-px-4{padding-left:1.5rem !important}.sd-p-5{padding:3rem !important}.sd-pt-5,.sd-py-5{padding-top:3rem !important}.sd-pr-5,.sd-px-5{padding-right:3rem !important}.sd-pb-5,.sd-py-5{padding-bottom:3rem !important}.sd-pl-5,.sd-px-5{padding-left:3rem !important}.sd-m-auto{margin:auto !important}.sd-mt-auto,.sd-my-auto{margin-top:auto !important}.sd-mr-auto,.sd-mx-auto{margin-right:auto !important}.sd-mb-auto,.sd-my-auto{margin-bottom:auto !important}.sd-ml-auto,.sd-mx-auto{margin-left:auto !important}.sd-m-0{margin:0 !important}.sd-mt-0,.sd-my-0{margin-top:0 !important}.sd-mr-0,.sd-mx-0{margin-right:0 !important}.sd-mb-0,.sd-my-0{margin-bottom:0 !important}.sd-ml-0,.sd-mx-0{margin-left:0 !important}.sd-m-1{margin:.25rem !important}.sd-mt-1,.sd-my-1{margin-top:.25rem !important}.sd-mr-1,.sd-mx-1{margin-right:.25rem !important}.sd-mb-1,.sd-my-1{margin-bottom:.25rem !important}.sd-ml-1,.sd-mx-1{margin-left:.25rem !important}.sd-m-2{margin:.5rem !important}.sd-mt-2,.sd-my-2{margin-top:.5rem !important}.sd-mr-2,.sd-mx-2{margin-right:.5rem !important}.sd-mb-2,.sd-my-2{margin-bottom:.5rem !important}.sd-ml-2,.sd-mx-2{margin-left:.5rem !important}.sd-m-3{margin:1rem !important}.sd-mt-3,.sd-my-3{margin-top:1rem !important}.sd-mr-3,.sd-mx-3{margin-right:1rem !important}.sd-mb-3,.sd-my-3{margin-bottom:1rem !important}.sd-ml-3,.sd-mx-3{margin-left:1rem !important}.sd-m-4{margin:1.5rem !important}.sd-mt-4,.sd-my-4{margin-top:1.5rem !important}.sd-mr-4,.sd-mx-4{margin-right:1.5rem !important}.sd-mb-4,.sd-my-4{margin-bottom:1.5rem !important}.sd-ml-4,.sd-mx-4{margin-left:1.5rem !important}.sd-m-5{margin:3rem !important}.sd-mt-5,.sd-my-5{margin-top:3rem !important}.sd-mr-5,.sd-mx-5{margin-right:3rem !important}.sd-mb-5,.sd-my-5{margin-bottom:3rem !important}.sd-ml-5,.sd-mx-5{margin-left:3rem !important}.sd-w-25{width:25% !important}.sd-w-50{width:50% !important}.sd-w-75{width:75% !important}.sd-w-100{width:100% !important}.sd-w-auto{width:auto !important}.sd-h-25{height:25% !important}.sd-h-50{height:50% !important}.sd-h-75{height:75% !important}.sd-h-100{height:100% !important}.sd-h-auto{height:auto !important}.sd-d-none{display:none !important}.sd-d-inline{display:inline !important}.sd-d-inline-block{display:inline-block !important}.sd-d-block{display:block !important}.sd-d-grid{display:grid !important}.sd-d-flex-row{display:-ms-flexbox !important;display:flex !important;flex-direction:row !important}.sd-d-flex-column{display:-ms-flexbox !important;display:flex !important;flex-direction:column !important}.sd-d-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}@media(min-width: 576px){.sd-d-sm-none{display:none !important}.sd-d-sm-inline{display:inline !important}.sd-d-sm-inline-block{display:inline-block !important}.sd-d-sm-block{display:block !important}.sd-d-sm-grid{display:grid !important}.sd-d-sm-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-sm-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 768px){.sd-d-md-none{display:none !important}.sd-d-md-inline{display:inline !important}.sd-d-md-inline-block{display:inline-block !important}.sd-d-md-block{display:block !important}.sd-d-md-grid{display:grid !important}.sd-d-md-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-md-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 992px){.sd-d-lg-none{display:none !important}.sd-d-lg-inline{display:inline !important}.sd-d-lg-inline-block{display:inline-block !important}.sd-d-lg-block{display:block !important}.sd-d-lg-grid{display:grid !important}.sd-d-lg-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-lg-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 1200px){.sd-d-xl-none{display:none !important}.sd-d-xl-inline{display:inline !important}.sd-d-xl-inline-block{display:inline-block !important}.sd-d-xl-block{display:block !important}.sd-d-xl-grid{display:grid !important}.sd-d-xl-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-xl-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}.sd-align-major-start{justify-content:flex-start !important}.sd-align-major-end{justify-content:flex-end !important}.sd-align-major-center{justify-content:center !important}.sd-align-major-justify{justify-content:space-between !important}.sd-align-major-spaced{justify-content:space-evenly !important}.sd-align-minor-start{align-items:flex-start !important}.sd-align-minor-end{align-items:flex-end !important}.sd-align-minor-center{align-items:center !important}.sd-align-minor-stretch{align-items:stretch !important}.sd-text-justify{text-align:justify !important}.sd-text-left{text-align:left !important}.sd-text-right{text-align:right !important}.sd-text-center{text-align:center !important}.sd-font-weight-light{font-weight:300 !important}.sd-font-weight-lighter{font-weight:lighter !important}.sd-font-weight-normal{font-weight:400 !important}.sd-font-weight-bold{font-weight:700 !important}.sd-font-weight-bolder{font-weight:bolder !important}.sd-font-italic{font-style:italic !important}.sd-text-decoration-none{text-decoration:none !important}.sd-text-lowercase{text-transform:lowercase !important}.sd-text-uppercase{text-transform:uppercase !important}.sd-text-capitalize{text-transform:capitalize !important}.sd-text-wrap{white-space:normal !important}.sd-text-nowrap{white-space:nowrap !important}.sd-text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-fs-1,.sd-fs-1>p{font-size:calc(1.375rem + 1.5vw) !important;line-height:unset !important}.sd-fs-2,.sd-fs-2>p{font-size:calc(1.325rem + 0.9vw) !important;line-height:unset !important}.sd-fs-3,.sd-fs-3>p{font-size:calc(1.3rem + 0.6vw) !important;line-height:unset !important}.sd-fs-4,.sd-fs-4>p{font-size:calc(1.275rem + 0.3vw) !important;line-height:unset !important}.sd-fs-5,.sd-fs-5>p{font-size:1.25rem !important;line-height:unset !important}.sd-fs-6,.sd-fs-6>p{font-size:1rem !important;line-height:unset !important}.sd-border-0{border:0 solid !important}.sd-border-top-0{border-top:0 solid !important}.sd-border-bottom-0{border-bottom:0 solid !important}.sd-border-right-0{border-right:0 solid !important}.sd-border-left-0{border-left:0 solid !important}.sd-border-1{border:1px solid !important}.sd-border-top-1{border-top:1px solid !important}.sd-border-bottom-1{border-bottom:1px solid !important}.sd-border-right-1{border-right:1px solid !important}.sd-border-left-1{border-left:1px solid !important}.sd-border-2{border:2px solid !important}.sd-border-top-2{border-top:2px solid !important}.sd-border-bottom-2{border-bottom:2px solid !important}.sd-border-right-2{border-right:2px solid !important}.sd-border-left-2{border-left:2px solid !important}.sd-border-3{border:3px solid !important}.sd-border-top-3{border-top:3px solid !important}.sd-border-bottom-3{border-bottom:3px solid !important}.sd-border-right-3{border-right:3px solid !important}.sd-border-left-3{border-left:3px solid !important}.sd-border-4{border:4px solid !important}.sd-border-top-4{border-top:4px solid !important}.sd-border-bottom-4{border-bottom:4px solid !important}.sd-border-right-4{border-right:4px solid !important}.sd-border-left-4{border-left:4px solid !important}.sd-border-5{border:5px solid !important}.sd-border-top-5{border-top:5px solid !important}.sd-border-bottom-5{border-bottom:5px solid !important}.sd-border-right-5{border-right:5px solid !important}.sd-border-left-5{border-left:5px solid !important}.sd-rounded-0{border-radius:0 !important}.sd-rounded-1{border-radius:.2rem !important}.sd-rounded-2{border-radius:.3rem !important}.sd-rounded-3{border-radius:.5rem !important}.sd-rounded-pill{border-radius:50rem !important}.sd-rounded-circle{border-radius:50% !important}.shadow-none{box-shadow:none !important}.sd-shadow-sm{box-shadow:0 .125rem .25rem var(--sd-color-shadow) !important}.sd-shadow-md{box-shadow:0 .5rem 1rem var(--sd-color-shadow) !important}.sd-shadow-lg{box-shadow:0 1rem 3rem var(--sd-color-shadow) !important}@keyframes sd-slide-from-left{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@keyframes sd-slide-from-right{0%{transform:translateX(200%)}100%{transform:translateX(0)}}@keyframes sd-grow100{0%{transform:scale(0);opacity:.5}100%{transform:scale(1);opacity:1}}@keyframes sd-grow50{0%{transform:scale(0.5);opacity:.5}100%{transform:scale(1);opacity:1}}@keyframes sd-grow50-rot20{0%{transform:scale(0.5) rotateZ(-20deg);opacity:.5}75%{transform:scale(1) rotateZ(5deg);opacity:1}95%{transform:scale(1) rotateZ(-1deg);opacity:1}100%{transform:scale(1) rotateZ(0);opacity:1}}.sd-animate-slide-from-left{animation:1s ease-out 0s 1 normal none running sd-slide-from-left}.sd-animate-slide-from-right{animation:1s ease-out 0s 1 normal none running sd-slide-from-right}.sd-animate-grow100{animation:1s ease-out 0s 1 normal none running sd-grow100}.sd-animate-grow50{animation:1s ease-out 0s 1 normal none running sd-grow50}.sd-animate-grow50-rot20{animation:1s ease-out 0s 1 normal none running sd-grow50-rot20}.sd-badge{display:inline-block;padding:.35em .65em;font-size:.75em;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem}.sd-badge:empty{display:none}a.sd-badge{text-decoration:none}.sd-btn .sd-badge{position:relative;top:-1px}.sd-btn{background-color:transparent;border:1px solid transparent;border-radius:.25rem;cursor:pointer;display:inline-block;font-weight:400;font-size:1rem;line-height:1.5;padding:.375rem .75rem;text-align:center;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;vertical-align:middle;user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none}.sd-btn:hover{text-decoration:none}@media(prefers-reduced-motion: reduce){.sd-btn{transition:none}}.sd-btn-primary,.sd-btn-outline-primary:hover,.sd-btn-outline-primary:focus{color:var(--sd-color-primary-text) !important;background-color:var(--sd-color-primary) !important;border-color:var(--sd-color-primary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-primary:hover,.sd-btn-primary:focus{color:var(--sd-color-primary-text) !important;background-color:var(--sd-color-primary-highlight) !important;border-color:var(--sd-color-primary-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-primary{color:var(--sd-color-primary) !important;border-color:var(--sd-color-primary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-secondary,.sd-btn-outline-secondary:hover,.sd-btn-outline-secondary:focus{color:var(--sd-color-secondary-text) !important;background-color:var(--sd-color-secondary) !important;border-color:var(--sd-color-secondary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-secondary:hover,.sd-btn-secondary:focus{color:var(--sd-color-secondary-text) !important;background-color:var(--sd-color-secondary-highlight) !important;border-color:var(--sd-color-secondary-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-secondary{color:var(--sd-color-secondary) !important;border-color:var(--sd-color-secondary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-success,.sd-btn-outline-success:hover,.sd-btn-outline-success:focus{color:var(--sd-color-success-text) !important;background-color:var(--sd-color-success) !important;border-color:var(--sd-color-success) !important;border-width:1px !important;border-style:solid !important}.sd-btn-success:hover,.sd-btn-success:focus{color:var(--sd-color-success-text) !important;background-color:var(--sd-color-success-highlight) !important;border-color:var(--sd-color-success-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-success{color:var(--sd-color-success) !important;border-color:var(--sd-color-success) !important;border-width:1px !important;border-style:solid !important}.sd-btn-info,.sd-btn-outline-info:hover,.sd-btn-outline-info:focus{color:var(--sd-color-info-text) !important;background-color:var(--sd-color-info) !important;border-color:var(--sd-color-info) !important;border-width:1px !important;border-style:solid !important}.sd-btn-info:hover,.sd-btn-info:focus{color:var(--sd-color-info-text) !important;background-color:var(--sd-color-info-highlight) !important;border-color:var(--sd-color-info-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-info{color:var(--sd-color-info) !important;border-color:var(--sd-color-info) !important;border-width:1px !important;border-style:solid !important}.sd-btn-warning,.sd-btn-outline-warning:hover,.sd-btn-outline-warning:focus{color:var(--sd-color-warning-text) !important;background-color:var(--sd-color-warning) !important;border-color:var(--sd-color-warning) !important;border-width:1px !important;border-style:solid !important}.sd-btn-warning:hover,.sd-btn-warning:focus{color:var(--sd-color-warning-text) !important;background-color:var(--sd-color-warning-highlight) !important;border-color:var(--sd-color-warning-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-warning{color:var(--sd-color-warning) !important;border-color:var(--sd-color-warning) !important;border-width:1px !important;border-style:solid !important}.sd-btn-danger,.sd-btn-outline-danger:hover,.sd-btn-outline-danger:focus{color:var(--sd-color-danger-text) !important;background-color:var(--sd-color-danger) !important;border-color:var(--sd-color-danger) !important;border-width:1px !important;border-style:solid !important}.sd-btn-danger:hover,.sd-btn-danger:focus{color:var(--sd-color-danger-text) !important;background-color:var(--sd-color-danger-highlight) !important;border-color:var(--sd-color-danger-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-danger{color:var(--sd-color-danger) !important;border-color:var(--sd-color-danger) !important;border-width:1px !important;border-style:solid !important}.sd-btn-light,.sd-btn-outline-light:hover,.sd-btn-outline-light:focus{color:var(--sd-color-light-text) !important;background-color:var(--sd-color-light) !important;border-color:var(--sd-color-light) !important;border-width:1px !important;border-style:solid !important}.sd-btn-light:hover,.sd-btn-light:focus{color:var(--sd-color-light-text) !important;background-color:var(--sd-color-light-highlight) !important;border-color:var(--sd-color-light-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-light{color:var(--sd-color-light) !important;border-color:var(--sd-color-light) !important;border-width:1px !important;border-style:solid !important}.sd-btn-muted,.sd-btn-outline-muted:hover,.sd-btn-outline-muted:focus{color:var(--sd-color-muted-text) !important;background-color:var(--sd-color-muted) !important;border-color:var(--sd-color-muted) !important;border-width:1px !important;border-style:solid !important}.sd-btn-muted:hover,.sd-btn-muted:focus{color:var(--sd-color-muted-text) !important;background-color:var(--sd-color-muted-highlight) !important;border-color:var(--sd-color-muted-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-muted{color:var(--sd-color-muted) !important;border-color:var(--sd-color-muted) !important;border-width:1px !important;border-style:solid !important}.sd-btn-dark,.sd-btn-outline-dark:hover,.sd-btn-outline-dark:focus{color:var(--sd-color-dark-text) !important;background-color:var(--sd-color-dark) !important;border-color:var(--sd-color-dark) !important;border-width:1px !important;border-style:solid !important}.sd-btn-dark:hover,.sd-btn-dark:focus{color:var(--sd-color-dark-text) !important;background-color:var(--sd-color-dark-highlight) !important;border-color:var(--sd-color-dark-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-dark{color:var(--sd-color-dark) !important;border-color:var(--sd-color-dark) !important;border-width:1px !important;border-style:solid !important}.sd-btn-black,.sd-btn-outline-black:hover,.sd-btn-outline-black:focus{color:var(--sd-color-black-text) !important;background-color:var(--sd-color-black) !important;border-color:var(--sd-color-black) !important;border-width:1px !important;border-style:solid !important}.sd-btn-black:hover,.sd-btn-black:focus{color:var(--sd-color-black-text) !important;background-color:var(--sd-color-black-highlight) !important;border-color:var(--sd-color-black-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-black{color:var(--sd-color-black) !important;border-color:var(--sd-color-black) !important;border-width:1px !important;border-style:solid !important}.sd-btn-white,.sd-btn-outline-white:hover,.sd-btn-outline-white:focus{color:var(--sd-color-white-text) !important;background-color:var(--sd-color-white) !important;border-color:var(--sd-color-white) !important;border-width:1px !important;border-style:solid !important}.sd-btn-white:hover,.sd-btn-white:focus{color:var(--sd-color-white-text) !important;background-color:var(--sd-color-white-highlight) !important;border-color:var(--sd-color-white-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-white{color:var(--sd-color-white) !important;border-color:var(--sd-color-white) !important;border-width:1px !important;border-style:solid !important}.sd-stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.sd-hide-link-text{font-size:0}.sd-octicon,.sd-material-icon{display:inline-block;fill:currentColor;vertical-align:middle}.sd-avatar-xs{border-radius:50%;object-fit:cover;object-position:center;width:1rem;height:1rem}.sd-avatar-sm{border-radius:50%;object-fit:cover;object-position:center;width:3rem;height:3rem}.sd-avatar-md{border-radius:50%;object-fit:cover;object-position:center;width:5rem;height:5rem}.sd-avatar-lg{border-radius:50%;object-fit:cover;object-position:center;width:7rem;height:7rem}.sd-avatar-xl{border-radius:50%;object-fit:cover;object-position:center;width:10rem;height:10rem}.sd-avatar-inherit{border-radius:50%;object-fit:cover;object-position:center;width:inherit;height:inherit}.sd-avatar-initial{border-radius:50%;object-fit:cover;object-position:center;width:initial;height:initial}.sd-card{background-clip:border-box;background-color:var(--sd-color-card-background);border:1px solid var(--sd-color-card-border);border-radius:.25rem;color:var(--sd-color-card-text);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;position:relative;word-wrap:break-word}.sd-card>hr{margin-left:0;margin-right:0}.sd-card-hover:hover{border-color:var(--sd-color-card-border-hover);transform:scale(1.01)}.sd-card-body{-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem 1rem}.sd-card-title{margin-bottom:.5rem}.sd-card-subtitle{margin-top:-0.25rem;margin-bottom:0}.sd-card-text:last-child{margin-bottom:0}.sd-card-link:hover{text-decoration:none}.sd-card-link+.card-link{margin-left:1rem}.sd-card-header{padding:.5rem 1rem;margin-bottom:0;background-color:var(--sd-color-card-header);border-bottom:1px solid var(--sd-color-card-border)}.sd-card-header:first-child{border-radius:calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0}.sd-card-footer{padding:.5rem 1rem;background-color:var(--sd-color-card-footer);border-top:1px solid var(--sd-color-card-border)}.sd-card-footer:last-child{border-radius:0 0 calc(0.25rem - 1px) calc(0.25rem - 1px)}.sd-card-header-tabs{margin-right:-0.5rem;margin-bottom:-0.5rem;margin-left:-0.5rem;border-bottom:0}.sd-card-header-pills{margin-right:-0.5rem;margin-left:-0.5rem}.sd-card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1rem;border-radius:calc(0.25rem - 1px)}.sd-card-img,.sd-card-img-bottom,.sd-card-img-top{width:100%}.sd-card-img,.sd-card-img-top{border-top-left-radius:calc(0.25rem - 1px);border-top-right-radius:calc(0.25rem - 1px)}.sd-card-img,.sd-card-img-bottom{border-bottom-left-radius:calc(0.25rem - 1px);border-bottom-right-radius:calc(0.25rem - 1px)}.sd-cards-carousel{width:100%;display:flex;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row;overflow-x:hidden;scroll-snap-type:x mandatory}.sd-cards-carousel.sd-show-scrollbar{overflow-x:auto}.sd-cards-carousel:hover,.sd-cards-carousel:focus{overflow-x:auto}.sd-cards-carousel>.sd-card{flex-shrink:0;scroll-snap-align:start}.sd-cards-carousel>.sd-card:not(:last-child){margin-right:3px}.sd-card-cols-1>.sd-card{width:90%}.sd-card-cols-2>.sd-card{width:45%}.sd-card-cols-3>.sd-card{width:30%}.sd-card-cols-4>.sd-card{width:22.5%}.sd-card-cols-5>.sd-card{width:18%}.sd-card-cols-6>.sd-card{width:15%}.sd-card-cols-7>.sd-card{width:12.8571428571%}.sd-card-cols-8>.sd-card{width:11.25%}.sd-card-cols-9>.sd-card{width:10%}.sd-card-cols-10>.sd-card{width:9%}.sd-card-cols-11>.sd-card{width:8.1818181818%}.sd-card-cols-12>.sd-card{width:7.5%}.sd-container,.sd-container-fluid,.sd-container-lg,.sd-container-md,.sd-container-sm,.sd-container-xl{margin-left:auto;margin-right:auto;padding-left:var(--sd-gutter-x, 0.75rem);padding-right:var(--sd-gutter-x, 0.75rem);width:100%}@media(min-width: 576px){.sd-container-sm,.sd-container{max-width:540px}}@media(min-width: 768px){.sd-container-md,.sd-container-sm,.sd-container{max-width:720px}}@media(min-width: 992px){.sd-container-lg,.sd-container-md,.sd-container-sm,.sd-container{max-width:960px}}@media(min-width: 1200px){.sd-container-xl,.sd-container-lg,.sd-container-md,.sd-container-sm,.sd-container{max-width:1140px}}.sd-row{--sd-gutter-x: 1.5rem;--sd-gutter-y: 0;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:calc(var(--sd-gutter-y) * -1);margin-right:calc(var(--sd-gutter-x) * -0.5);margin-left:calc(var(--sd-gutter-x) * -0.5)}.sd-row>*{box-sizing:border-box;flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--sd-gutter-x) * 0.5);padding-left:calc(var(--sd-gutter-x) * 0.5);margin-top:var(--sd-gutter-y)}.sd-col{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-auto>*{flex:0 0 auto;width:auto}.sd-row-cols-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}@media(min-width: 576px){.sd-col-sm{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-sm-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-sm-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-sm-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-sm-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-sm-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-sm-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-sm-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-sm-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-sm-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-sm-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-sm-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-sm-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-sm-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}@media(min-width: 768px){.sd-col-md{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-md-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-md-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-md-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-md-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-md-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-md-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-md-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-md-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-md-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-md-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-md-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-md-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-md-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}@media(min-width: 992px){.sd-col-lg{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-lg-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-lg-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-lg-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-lg-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-lg-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-lg-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-lg-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-lg-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-lg-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-lg-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-lg-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-lg-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-lg-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}@media(min-width: 1200px){.sd-col-xl{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-xl-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-xl-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-xl-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-xl-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-xl-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-xl-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-xl-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-xl-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-xl-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-xl-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-xl-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-xl-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-xl-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}.sd-col-auto{flex:0 0 auto;-ms-flex:0 0 auto;width:auto}.sd-col-1{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}.sd-col-2{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-col-3{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-col-4{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-col-5{flex:0 0 auto;-ms-flex:0 0 auto;width:41.6666666667%}.sd-col-6{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-col-7{flex:0 0 auto;-ms-flex:0 0 auto;width:58.3333333333%}.sd-col-8{flex:0 0 auto;-ms-flex:0 0 auto;width:66.6666666667%}.sd-col-9{flex:0 0 auto;-ms-flex:0 0 auto;width:75%}.sd-col-10{flex:0 0 auto;-ms-flex:0 0 auto;width:83.3333333333%}.sd-col-11{flex:0 0 auto;-ms-flex:0 0 auto;width:91.6666666667%}.sd-col-12{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-g-0,.sd-gy-0{--sd-gutter-y: 0}.sd-g-0,.sd-gx-0{--sd-gutter-x: 0}.sd-g-1,.sd-gy-1{--sd-gutter-y: 0.25rem}.sd-g-1,.sd-gx-1{--sd-gutter-x: 0.25rem}.sd-g-2,.sd-gy-2{--sd-gutter-y: 0.5rem}.sd-g-2,.sd-gx-2{--sd-gutter-x: 0.5rem}.sd-g-3,.sd-gy-3{--sd-gutter-y: 1rem}.sd-g-3,.sd-gx-3{--sd-gutter-x: 1rem}.sd-g-4,.sd-gy-4{--sd-gutter-y: 1.5rem}.sd-g-4,.sd-gx-4{--sd-gutter-x: 1.5rem}.sd-g-5,.sd-gy-5{--sd-gutter-y: 3rem}.sd-g-5,.sd-gx-5{--sd-gutter-x: 3rem}@media(min-width: 576px){.sd-col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-sm-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-sm-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-sm-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-sm-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-sm-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-sm-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-sm-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-sm-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-sm-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-sm-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-sm-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-sm-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-sm-0,.sd-gy-sm-0{--sd-gutter-y: 0}.sd-g-sm-0,.sd-gx-sm-0{--sd-gutter-x: 0}.sd-g-sm-1,.sd-gy-sm-1{--sd-gutter-y: 0.25rem}.sd-g-sm-1,.sd-gx-sm-1{--sd-gutter-x: 0.25rem}.sd-g-sm-2,.sd-gy-sm-2{--sd-gutter-y: 0.5rem}.sd-g-sm-2,.sd-gx-sm-2{--sd-gutter-x: 0.5rem}.sd-g-sm-3,.sd-gy-sm-3{--sd-gutter-y: 1rem}.sd-g-sm-3,.sd-gx-sm-3{--sd-gutter-x: 1rem}.sd-g-sm-4,.sd-gy-sm-4{--sd-gutter-y: 1.5rem}.sd-g-sm-4,.sd-gx-sm-4{--sd-gutter-x: 1.5rem}.sd-g-sm-5,.sd-gy-sm-5{--sd-gutter-y: 3rem}.sd-g-sm-5,.sd-gx-sm-5{--sd-gutter-x: 3rem}}@media(min-width: 768px){.sd-col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-md-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-md-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-md-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-md-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-md-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-md-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-md-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-md-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-md-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-md-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-md-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-md-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-md-0,.sd-gy-md-0{--sd-gutter-y: 0}.sd-g-md-0,.sd-gx-md-0{--sd-gutter-x: 0}.sd-g-md-1,.sd-gy-md-1{--sd-gutter-y: 0.25rem}.sd-g-md-1,.sd-gx-md-1{--sd-gutter-x: 0.25rem}.sd-g-md-2,.sd-gy-md-2{--sd-gutter-y: 0.5rem}.sd-g-md-2,.sd-gx-md-2{--sd-gutter-x: 0.5rem}.sd-g-md-3,.sd-gy-md-3{--sd-gutter-y: 1rem}.sd-g-md-3,.sd-gx-md-3{--sd-gutter-x: 1rem}.sd-g-md-4,.sd-gy-md-4{--sd-gutter-y: 1.5rem}.sd-g-md-4,.sd-gx-md-4{--sd-gutter-x: 1.5rem}.sd-g-md-5,.sd-gy-md-5{--sd-gutter-y: 3rem}.sd-g-md-5,.sd-gx-md-5{--sd-gutter-x: 3rem}}@media(min-width: 992px){.sd-col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-lg-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-lg-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-lg-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-lg-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-lg-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-lg-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-lg-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-lg-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-lg-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-lg-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-lg-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-lg-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-lg-0,.sd-gy-lg-0{--sd-gutter-y: 0}.sd-g-lg-0,.sd-gx-lg-0{--sd-gutter-x: 0}.sd-g-lg-1,.sd-gy-lg-1{--sd-gutter-y: 0.25rem}.sd-g-lg-1,.sd-gx-lg-1{--sd-gutter-x: 0.25rem}.sd-g-lg-2,.sd-gy-lg-2{--sd-gutter-y: 0.5rem}.sd-g-lg-2,.sd-gx-lg-2{--sd-gutter-x: 0.5rem}.sd-g-lg-3,.sd-gy-lg-3{--sd-gutter-y: 1rem}.sd-g-lg-3,.sd-gx-lg-3{--sd-gutter-x: 1rem}.sd-g-lg-4,.sd-gy-lg-4{--sd-gutter-y: 1.5rem}.sd-g-lg-4,.sd-gx-lg-4{--sd-gutter-x: 1.5rem}.sd-g-lg-5,.sd-gy-lg-5{--sd-gutter-y: 3rem}.sd-g-lg-5,.sd-gx-lg-5{--sd-gutter-x: 3rem}}@media(min-width: 1200px){.sd-col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-xl-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-xl-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-xl-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-xl-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-xl-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-xl-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-xl-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-xl-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-xl-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-xl-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-xl-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-xl-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-xl-0,.sd-gy-xl-0{--sd-gutter-y: 0}.sd-g-xl-0,.sd-gx-xl-0{--sd-gutter-x: 0}.sd-g-xl-1,.sd-gy-xl-1{--sd-gutter-y: 0.25rem}.sd-g-xl-1,.sd-gx-xl-1{--sd-gutter-x: 0.25rem}.sd-g-xl-2,.sd-gy-xl-2{--sd-gutter-y: 0.5rem}.sd-g-xl-2,.sd-gx-xl-2{--sd-gutter-x: 0.5rem}.sd-g-xl-3,.sd-gy-xl-3{--sd-gutter-y: 1rem}.sd-g-xl-3,.sd-gx-xl-3{--sd-gutter-x: 1rem}.sd-g-xl-4,.sd-gy-xl-4{--sd-gutter-y: 1.5rem}.sd-g-xl-4,.sd-gx-xl-4{--sd-gutter-x: 1.5rem}.sd-g-xl-5,.sd-gy-xl-5{--sd-gutter-y: 3rem}.sd-g-xl-5,.sd-gx-xl-5{--sd-gutter-x: 3rem}}.sd-flex-row-reverse{flex-direction:row-reverse !important}details.sd-dropdown{position:relative;font-size:var(--sd-fontsize-dropdown)}details.sd-dropdown:hover{cursor:pointer}details.sd-dropdown .sd-summary-content{cursor:default}details.sd-dropdown summary.sd-summary-title{padding:.5em .6em .5em 1em;font-size:var(--sd-fontsize-dropdown-title);font-weight:var(--sd-fontweight-dropdown-title);user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;list-style:none;display:inline-flex;justify-content:space-between}details.sd-dropdown summary.sd-summary-title::-webkit-details-marker{display:none}details.sd-dropdown summary.sd-summary-title:focus{outline:none}details.sd-dropdown summary.sd-summary-title .sd-summary-icon{margin-right:.6em;display:inline-flex;align-items:center}details.sd-dropdown summary.sd-summary-title .sd-summary-icon svg{opacity:.8}details.sd-dropdown summary.sd-summary-title .sd-summary-text{flex-grow:1;line-height:1.5;padding-right:.5rem}details.sd-dropdown summary.sd-summary-title .sd-summary-state-marker{pointer-events:none;display:inline-flex;align-items:center}details.sd-dropdown summary.sd-summary-title .sd-summary-state-marker svg{opacity:.6}details.sd-dropdown summary.sd-summary-title:hover .sd-summary-state-marker svg{opacity:1;transform:scale(1.1)}details.sd-dropdown[open] summary .sd-octicon.no-title{visibility:hidden}details.sd-dropdown .sd-summary-chevron-right{transition:.25s}details.sd-dropdown[open]>.sd-summary-title .sd-summary-chevron-right{transform:rotate(90deg)}details.sd-dropdown[open]>.sd-summary-title .sd-summary-chevron-down{transform:rotate(180deg)}details.sd-dropdown:not([open]).sd-card{border:none}details.sd-dropdown:not([open])>.sd-card-header{border:1px solid var(--sd-color-card-border);border-radius:.25rem}details.sd-dropdown.sd-fade-in[open] summary~*{-moz-animation:sd-fade-in .5s ease-in-out;-webkit-animation:sd-fade-in .5s ease-in-out;animation:sd-fade-in .5s ease-in-out}details.sd-dropdown.sd-fade-in-slide-down[open] summary~*{-moz-animation:sd-fade-in .5s ease-in-out,sd-slide-down .5s ease-in-out;-webkit-animation:sd-fade-in .5s ease-in-out,sd-slide-down .5s ease-in-out;animation:sd-fade-in .5s ease-in-out,sd-slide-down .5s ease-in-out}.sd-col>.sd-dropdown{width:100%}.sd-summary-content>.sd-tab-set:first-child{margin-top:0}@keyframes sd-fade-in{0%{opacity:0}100%{opacity:1}}@keyframes sd-slide-down{0%{transform:translate(0, -10px)}100%{transform:translate(0, 0)}}.sd-tab-set{border-radius:.125rem;display:flex;flex-wrap:wrap;margin:1em 0;position:relative}.sd-tab-set>input{opacity:0;position:absolute}.sd-tab-set>input:checked+label{border-color:var(--sd-color-tabs-underline-active);color:var(--sd-color-tabs-label-active)}.sd-tab-set>input:checked+label+.sd-tab-content{display:block}.sd-tab-set>input:not(:checked)+label:hover{color:var(--sd-color-tabs-label-hover);border-color:var(--sd-color-tabs-underline-hover)}.sd-tab-set>input:focus+label{outline-style:auto}.sd-tab-set>input:not(.focus-visible)+label{outline:none;-webkit-tap-highlight-color:transparent}.sd-tab-set>label{border-bottom:.125rem solid transparent;margin-bottom:0;color:var(--sd-color-tabs-label-inactive);border-color:var(--sd-color-tabs-underline-inactive);cursor:pointer;font-size:var(--sd-fontsize-tabs-label);font-weight:700;padding:1em 1.25em .5em;transition:color 250ms;width:auto;z-index:1}html .sd-tab-set>label:hover{color:var(--sd-color-tabs-label-active)}.sd-col>.sd-tab-set{width:100%}.sd-tab-content{box-shadow:0 -0.0625rem var(--sd-color-tabs-overline),0 .0625rem var(--sd-color-tabs-underline);display:none;order:99;padding-bottom:.75rem;padding-top:.75rem;width:100%}.sd-tab-content>:first-child{margin-top:0 !important}.sd-tab-content>:last-child{margin-bottom:0 !important}.sd-tab-content>.sd-tab-set{margin:0}.sd-sphinx-override,.sd-sphinx-override *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sd-sphinx-override p{margin-top:0}:root{--sd-color-primary: #0071bc;--sd-color-secondary: #6c757d;--sd-color-success: #28a745;--sd-color-info: #17a2b8;--sd-color-warning: #f0b37e;--sd-color-danger: #dc3545;--sd-color-light: #f8f9fa;--sd-color-muted: #6c757d;--sd-color-dark: #212529;--sd-color-black: black;--sd-color-white: white;--sd-color-primary-highlight: #0060a0;--sd-color-secondary-highlight: #5c636a;--sd-color-success-highlight: #228e3b;--sd-color-info-highlight: #148a9c;--sd-color-warning-highlight: #cc986b;--sd-color-danger-highlight: #bb2d3b;--sd-color-light-highlight: #d3d4d5;--sd-color-muted-highlight: #5c636a;--sd-color-dark-highlight: #1c1f23;--sd-color-black-highlight: black;--sd-color-white-highlight: #d9d9d9;--sd-color-primary-bg: rgba(0, 113, 188, 0.2);--sd-color-secondary-bg: rgba(108, 117, 125, 0.2);--sd-color-success-bg: rgba(40, 167, 69, 0.2);--sd-color-info-bg: rgba(23, 162, 184, 0.2);--sd-color-warning-bg: rgba(240, 179, 126, 0.2);--sd-color-danger-bg: rgba(220, 53, 69, 0.2);--sd-color-light-bg: rgba(248, 249, 250, 0.2);--sd-color-muted-bg: rgba(108, 117, 125, 0.2);--sd-color-dark-bg: rgba(33, 37, 41, 0.2);--sd-color-black-bg: rgba(0, 0, 0, 0.2);--sd-color-white-bg: rgba(255, 255, 255, 0.2);--sd-color-primary-text: #fff;--sd-color-secondary-text: #fff;--sd-color-success-text: #fff;--sd-color-info-text: #fff;--sd-color-warning-text: #212529;--sd-color-danger-text: #fff;--sd-color-light-text: #212529;--sd-color-muted-text: #fff;--sd-color-dark-text: #fff;--sd-color-black-text: #fff;--sd-color-white-text: #212529;--sd-color-shadow: rgba(0, 0, 0, 0.15);--sd-color-card-border: rgba(0, 0, 0, 0.125);--sd-color-card-border-hover: hsla(231, 99%, 66%, 1);--sd-color-card-background: transparent;--sd-color-card-text: inherit;--sd-color-card-header: transparent;--sd-color-card-footer: transparent;--sd-color-tabs-label-active: hsla(231, 99%, 66%, 1);--sd-color-tabs-label-hover: hsla(231, 99%, 66%, 1);--sd-color-tabs-label-inactive: hsl(0, 0%, 66%);--sd-color-tabs-underline-active: hsla(231, 99%, 66%, 1);--sd-color-tabs-underline-hover: rgba(178, 206, 245, 0.62);--sd-color-tabs-underline-inactive: transparent;--sd-color-tabs-overline: rgb(222, 222, 222);--sd-color-tabs-underline: rgb(222, 222, 222);--sd-fontsize-tabs-label: 1rem;--sd-fontsize-dropdown: inherit;--sd-fontsize-dropdown-title: 1rem;--sd-fontweight-dropdown-title: 700} diff --git a/v0.14.0/_static/_sphinx_javascript_frameworks_compat.js b/v0.14.0/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 00000000000..81415803ec2 --- /dev/null +++ b/v0.14.0/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,123 @@ +/* Compatability shim for jQuery and underscores.js. + * + * Copyright Sphinx contributors + * Released under the two clause BSD licence + */ + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} diff --git a/v0.14.0/_static/agu2017-poster.jpg b/v0.14.0/_static/agu2017-poster.jpg new file mode 100644 index 00000000000..fbbccf7d68f Binary files /dev/null and b/v0.14.0/_static/agu2017-poster.jpg differ diff --git a/v0.14.0/_static/agu2019-poster.jpg b/v0.14.0/_static/agu2019-poster.jpg new file mode 100644 index 00000000000..64ff56fb99e Binary files /dev/null and b/v0.14.0/_static/agu2019-poster.jpg differ diff --git a/v0.14.0/_static/aogs2018-poster.jpg b/v0.14.0/_static/aogs2018-poster.jpg new file mode 100644 index 00000000000..b1ae2208f94 Binary files /dev/null and b/v0.14.0/_static/aogs2018-poster.jpg differ diff --git a/v0.14.0/_static/basic.css b/v0.14.0/_static/basic.css new file mode 100644 index 00000000000..f316efcb47b --- /dev/null +++ b/v0.14.0/_static/basic.css @@ -0,0 +1,925 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/v0.14.0/_static/binder_badge_logo.svg b/v0.14.0/_static/binder_badge_logo.svg new file mode 100644 index 00000000000..327f6b639a9 --- /dev/null +++ b/v0.14.0/_static/binder_badge_logo.svg @@ -0,0 +1 @@ + launchlaunchbinderbinder \ No newline at end of file diff --git a/v0.14.0/_static/broken_example.png b/v0.14.0/_static/broken_example.png new file mode 100644 index 00000000000..4fea24e7df4 Binary files /dev/null and b/v0.14.0/_static/broken_example.png differ diff --git a/v0.14.0/_static/check-solid.svg b/v0.14.0/_static/check-solid.svg new file mode 100644 index 00000000000..92fad4b5c0b --- /dev/null +++ b/v0.14.0/_static/check-solid.svg @@ -0,0 +1,4 @@ + + + + diff --git a/v0.14.0/_static/clipboard.min.js b/v0.14.0/_static/clipboard.min.js new file mode 100644 index 00000000000..54b3c463811 --- /dev/null +++ b/v0.14.0/_static/clipboard.min.js @@ -0,0 +1,7 @@ +/*! + * clipboard.js v2.0.8 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1 + + + + diff --git a/v0.14.0/_static/copybutton.css b/v0.14.0/_static/copybutton.css new file mode 100644 index 00000000000..f1916ec7d1b --- /dev/null +++ b/v0.14.0/_static/copybutton.css @@ -0,0 +1,94 @@ +/* Copy buttons */ +button.copybtn { + position: absolute; + display: flex; + top: .3em; + right: .3em; + width: 1.7em; + height: 1.7em; + opacity: 0; + transition: opacity 0.3s, border .3s, background-color .3s; + user-select: none; + padding: 0; + border: none; + outline: none; + border-radius: 0.4em; + /* The colors that GitHub uses */ + border: #1b1f2426 1px solid; + background-color: #f6f8fa; + color: #57606a; +} + +button.copybtn.success { + border-color: #22863a; + color: #22863a; +} + +button.copybtn svg { + stroke: currentColor; + width: 1.5em; + height: 1.5em; + padding: 0.1em; +} + +div.highlight { + position: relative; +} + +/* Show the copybutton */ +.highlight:hover button.copybtn, button.copybtn.success { + opacity: 1; +} + +.highlight button.copybtn:hover { + background-color: rgb(235, 235, 235); +} + +.highlight button.copybtn:active { + background-color: rgb(187, 187, 187); +} + +/** + * A minimal CSS-only tooltip copied from: + * https://codepen.io/mildrenben/pen/rVBrpK + * + * To use, write HTML like the following: + * + *

Short

+ */ + .o-tooltip--left { + position: relative; + } + + .o-tooltip--left:after { + opacity: 0; + visibility: hidden; + position: absolute; + content: attr(data-tooltip); + padding: .2em; + font-size: .8em; + left: -.2em; + background: grey; + color: white; + white-space: nowrap; + z-index: 2; + border-radius: 2px; + transform: translateX(-102%) translateY(0); + transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); +} + +.o-tooltip--left:hover:after { + display: block; + opacity: 1; + visibility: visible; + transform: translateX(-100%) translateY(0); + transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); + transition-delay: .5s; +} + +/* By default the copy button shouldn't show up when printing a page */ +@media print { + button.copybtn { + display: none; + } +} diff --git a/v0.14.0/_static/copybutton.js b/v0.14.0/_static/copybutton.js new file mode 100644 index 00000000000..19f1fbddd1d --- /dev/null +++ b/v0.14.0/_static/copybutton.js @@ -0,0 +1,248 @@ +// Localization support +const messages = { + 'en': { + 'copy': 'Copy', + 'copy_to_clipboard': 'Copy to clipboard', + 'copy_success': 'Copied!', + 'copy_failure': 'Failed to copy', + }, + 'es' : { + 'copy': 'Copiar', + 'copy_to_clipboard': 'Copiar al portapapeles', + 'copy_success': '¡Copiado!', + 'copy_failure': 'Error al copiar', + }, + 'de' : { + 'copy': 'Kopieren', + 'copy_to_clipboard': 'In die Zwischenablage kopieren', + 'copy_success': 'Kopiert!', + 'copy_failure': 'Fehler beim Kopieren', + }, + 'fr' : { + 'copy': 'Copier', + 'copy_to_clipboard': 'Copier dans le presse-papier', + 'copy_success': 'Copié !', + 'copy_failure': 'Échec de la copie', + }, + 'ru': { + 'copy': 'Скопировать', + 'copy_to_clipboard': 'Скопировать в буфер', + 'copy_success': 'Скопировано!', + 'copy_failure': 'Не удалось скопировать', + }, + 'zh-CN': { + 'copy': '复制', + 'copy_to_clipboard': '复制到剪贴板', + 'copy_success': '复制成功!', + 'copy_failure': '复制失败', + }, + 'it' : { + 'copy': 'Copiare', + 'copy_to_clipboard': 'Copiato negli appunti', + 'copy_success': 'Copiato!', + 'copy_failure': 'Errore durante la copia', + } +} + +let locale = 'en' +if( document.documentElement.lang !== undefined + && messages[document.documentElement.lang] !== undefined ) { + locale = document.documentElement.lang +} + +let doc_url_root = DOCUMENTATION_OPTIONS.URL_ROOT; +if (doc_url_root == '#') { + doc_url_root = ''; +} + +/** + * SVG files for our copy buttons + */ +let iconCheck = ` + ${messages[locale]['copy_success']} + + +` + +// If the user specified their own SVG use that, otherwise use the default +let iconCopy = ``; +if (!iconCopy) { + iconCopy = ` + ${messages[locale]['copy_to_clipboard']} + + + +` +} + +/** + * Set up copy/paste for code blocks + */ + +const runWhenDOMLoaded = cb => { + if (document.readyState != 'loading') { + cb() + } else if (document.addEventListener) { + document.addEventListener('DOMContentLoaded', cb) + } else { + document.attachEvent('onreadystatechange', function() { + if (document.readyState == 'complete') cb() + }) + } +} + +const codeCellId = index => `codecell${index}` + +// Clears selected text since ClipboardJS will select the text when copying +const clearSelection = () => { + if (window.getSelection) { + window.getSelection().removeAllRanges() + } else if (document.selection) { + document.selection.empty() + } +} + +// Changes tooltip text for a moment, then changes it back +// We want the timeout of our `success` class to be a bit shorter than the +// tooltip and icon change, so that we can hide the icon before changing back. +var timeoutIcon = 2000; +var timeoutSuccessClass = 1500; + +const temporarilyChangeTooltip = (el, oldText, newText) => { + el.setAttribute('data-tooltip', newText) + el.classList.add('success') + // Remove success a little bit sooner than we change the tooltip + // So that we can use CSS to hide the copybutton first + setTimeout(() => el.classList.remove('success'), timeoutSuccessClass) + setTimeout(() => el.setAttribute('data-tooltip', oldText), timeoutIcon) +} + +// Changes the copy button icon for two seconds, then changes it back +const temporarilyChangeIcon = (el) => { + el.innerHTML = iconCheck; + setTimeout(() => {el.innerHTML = iconCopy}, timeoutIcon) +} + +const addCopyButtonToCodeCells = () => { + // If ClipboardJS hasn't loaded, wait a bit and try again. This + // happens because we load ClipboardJS asynchronously. + if (window.ClipboardJS === undefined) { + setTimeout(addCopyButtonToCodeCells, 250) + return + } + + // Add copybuttons to all of our code cells + const COPYBUTTON_SELECTOR = 'div.highlight pre'; + const codeCells = document.querySelectorAll(COPYBUTTON_SELECTOR) + codeCells.forEach((codeCell, index) => { + const id = codeCellId(index) + codeCell.setAttribute('id', id) + + const clipboardButton = id => + `` + codeCell.insertAdjacentHTML('afterend', clipboardButton(id)) + }) + +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string +} + +/** + * Removes excluded text from a Node. + * + * @param {Node} target Node to filter. + * @param {string} exclude CSS selector of nodes to exclude. + * @returns {DOMString} Text from `target` with text removed. + */ +function filterText(target, exclude) { + const clone = target.cloneNode(true); // clone as to not modify the live DOM + if (exclude) { + // remove excluded nodes + clone.querySelectorAll(exclude).forEach(node => node.remove()); + } + return clone.innerText; +} + +// Callback when a copy button is clicked. Will be passed the node that was clicked +// should then grab the text and replace pieces of text that shouldn't be used in output +function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { + var regexp; + var match; + + // Do we check for line continuation characters and "HERE-documents"? + var useLineCont = !!lineContinuationChar + var useHereDoc = !!hereDocDelim + + // create regexp to capture prompt and remaining line + if (isRegexp) { + regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') + } else { + regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') + } + + const outputLines = []; + var promptFound = false; + var gotLineCont = false; + var gotHereDoc = false; + const lineGotPrompt = []; + for (const line of textContent.split('\n')) { + match = line.match(regexp) + if (match || gotLineCont || gotHereDoc) { + promptFound = regexp.test(line) + lineGotPrompt.push(promptFound) + if (removePrompts && promptFound) { + outputLines.push(match[2]) + } else { + outputLines.push(line) + } + gotLineCont = line.endsWith(lineContinuationChar) & useLineCont + if (line.includes(hereDocDelim) & useHereDoc) + gotHereDoc = !gotHereDoc + } else if (!onlyCopyPromptLines) { + outputLines.push(line) + } else if (copyEmptyLines && line.trim() === '') { + outputLines.push(line) + } + } + + // If no lines with the prompt were found then just use original lines + if (lineGotPrompt.some(v => v === true)) { + textContent = outputLines.join('\n'); + } + + // Remove a trailing newline to avoid auto-running when pasting + if (textContent.endsWith("\n")) { + textContent = textContent.slice(0, -1) + } + return textContent +} + + +var copyTargetText = (trigger) => { + var target = document.querySelector(trigger.attributes['data-clipboard-target'].value); + + // get filtered text + let exclude = '.linenos'; + + let text = filterText(target, exclude); + return formatCopyText(text, '>>> |\\.\\.\\. ', true, true, true, true, '', '') +} + + // Initialize with a callback so we can modify the text before copy + const clipboard = new ClipboardJS('.copybtn', {text: copyTargetText}) + + // Update UI with error/success messages + clipboard.on('success', event => { + clearSelection() + temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_success']) + temporarilyChangeIcon(event.trigger) + }) + + clipboard.on('error', event => { + temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_failure']) + }) +} + +runWhenDOMLoaded(addCopyButtonToCodeCells) \ No newline at end of file diff --git a/v0.14.0/_static/copybutton_funcs.js b/v0.14.0/_static/copybutton_funcs.js new file mode 100644 index 00000000000..dbe1aaad79c --- /dev/null +++ b/v0.14.0/_static/copybutton_funcs.js @@ -0,0 +1,73 @@ +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string +} + +/** + * Removes excluded text from a Node. + * + * @param {Node} target Node to filter. + * @param {string} exclude CSS selector of nodes to exclude. + * @returns {DOMString} Text from `target` with text removed. + */ +export function filterText(target, exclude) { + const clone = target.cloneNode(true); // clone as to not modify the live DOM + if (exclude) { + // remove excluded nodes + clone.querySelectorAll(exclude).forEach(node => node.remove()); + } + return clone.innerText; +} + +// Callback when a copy button is clicked. Will be passed the node that was clicked +// should then grab the text and replace pieces of text that shouldn't be used in output +export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { + var regexp; + var match; + + // Do we check for line continuation characters and "HERE-documents"? + var useLineCont = !!lineContinuationChar + var useHereDoc = !!hereDocDelim + + // create regexp to capture prompt and remaining line + if (isRegexp) { + regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') + } else { + regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') + } + + const outputLines = []; + var promptFound = false; + var gotLineCont = false; + var gotHereDoc = false; + const lineGotPrompt = []; + for (const line of textContent.split('\n')) { + match = line.match(regexp) + if (match || gotLineCont || gotHereDoc) { + promptFound = regexp.test(line) + lineGotPrompt.push(promptFound) + if (removePrompts && promptFound) { + outputLines.push(match[2]) + } else { + outputLines.push(line) + } + gotLineCont = line.endsWith(lineContinuationChar) & useLineCont + if (line.includes(hereDocDelim) & useHereDoc) + gotHereDoc = !gotHereDoc + } else if (!onlyCopyPromptLines) { + outputLines.push(line) + } else if (copyEmptyLines && line.trim() === '') { + outputLines.push(line) + } + } + + // If no lines with the prompt were found then just use original lines + if (lineGotPrompt.some(v => v === true)) { + textContent = outputLines.join('\n'); + } + + // Remove a trailing newline to avoid auto-running when pasting + if (textContent.endsWith("\n")) { + textContent = textContent.slice(0, -1) + } + return textContent +} diff --git a/v0.14.0/_static/css/badge_only.css b/v0.14.0/_static/css/badge_only.css new file mode 100644 index 00000000000..c718cee4418 --- /dev/null +++ b/v0.14.0/_static/css/badge_only.css @@ -0,0 +1 @@ +.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} \ No newline at end of file diff --git a/v0.14.0/_static/css/fonts/Roboto-Slab-Bold.woff b/v0.14.0/_static/css/fonts/Roboto-Slab-Bold.woff new file mode 100644 index 00000000000..6cb60000181 Binary files /dev/null and b/v0.14.0/_static/css/fonts/Roboto-Slab-Bold.woff differ diff --git a/v0.14.0/_static/css/fonts/Roboto-Slab-Bold.woff2 b/v0.14.0/_static/css/fonts/Roboto-Slab-Bold.woff2 new file mode 100644 index 00000000000..7059e23142a Binary files /dev/null and b/v0.14.0/_static/css/fonts/Roboto-Slab-Bold.woff2 differ diff --git a/v0.14.0/_static/css/fonts/Roboto-Slab-Regular.woff b/v0.14.0/_static/css/fonts/Roboto-Slab-Regular.woff new file mode 100644 index 00000000000..f815f63f99d Binary files /dev/null and b/v0.14.0/_static/css/fonts/Roboto-Slab-Regular.woff differ diff --git a/v0.14.0/_static/css/fonts/Roboto-Slab-Regular.woff2 b/v0.14.0/_static/css/fonts/Roboto-Slab-Regular.woff2 new file mode 100644 index 00000000000..f2c76e5bda1 Binary files /dev/null and b/v0.14.0/_static/css/fonts/Roboto-Slab-Regular.woff2 differ diff --git a/v0.14.0/_static/css/fonts/fontawesome-webfont.eot b/v0.14.0/_static/css/fonts/fontawesome-webfont.eot new file mode 100644 index 00000000000..e9f60ca953f Binary files /dev/null and b/v0.14.0/_static/css/fonts/fontawesome-webfont.eot differ diff --git a/v0.14.0/_static/css/fonts/fontawesome-webfont.svg b/v0.14.0/_static/css/fonts/fontawesome-webfont.svg new file mode 100644 index 00000000000..855c845e538 --- /dev/null +++ b/v0.14.0/_static/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/v0.14.0/_static/css/fonts/fontawesome-webfont.ttf b/v0.14.0/_static/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 00000000000..35acda2fa11 Binary files /dev/null and b/v0.14.0/_static/css/fonts/fontawesome-webfont.ttf differ diff --git a/v0.14.0/_static/css/fonts/fontawesome-webfont.woff b/v0.14.0/_static/css/fonts/fontawesome-webfont.woff new file mode 100644 index 00000000000..400014a4b06 Binary files /dev/null and b/v0.14.0/_static/css/fonts/fontawesome-webfont.woff differ diff --git a/v0.14.0/_static/css/fonts/fontawesome-webfont.woff2 b/v0.14.0/_static/css/fonts/fontawesome-webfont.woff2 new file mode 100644 index 00000000000..4d13fc60404 Binary files /dev/null and b/v0.14.0/_static/css/fonts/fontawesome-webfont.woff2 differ diff --git a/v0.14.0/_static/css/fonts/lato-bold-italic.woff b/v0.14.0/_static/css/fonts/lato-bold-italic.woff new file mode 100644 index 00000000000..88ad05b9ff4 Binary files /dev/null and b/v0.14.0/_static/css/fonts/lato-bold-italic.woff differ diff --git a/v0.14.0/_static/css/fonts/lato-bold-italic.woff2 b/v0.14.0/_static/css/fonts/lato-bold-italic.woff2 new file mode 100644 index 00000000000..c4e3d804b57 Binary files /dev/null and b/v0.14.0/_static/css/fonts/lato-bold-italic.woff2 differ diff --git a/v0.14.0/_static/css/fonts/lato-bold.woff b/v0.14.0/_static/css/fonts/lato-bold.woff new file mode 100644 index 00000000000..c6dff51f063 Binary files /dev/null and b/v0.14.0/_static/css/fonts/lato-bold.woff differ diff --git a/v0.14.0/_static/css/fonts/lato-bold.woff2 b/v0.14.0/_static/css/fonts/lato-bold.woff2 new file mode 100644 index 00000000000..bb195043cfc Binary files /dev/null and b/v0.14.0/_static/css/fonts/lato-bold.woff2 differ diff --git a/v0.14.0/_static/css/fonts/lato-normal-italic.woff b/v0.14.0/_static/css/fonts/lato-normal-italic.woff new file mode 100644 index 00000000000..76114bc0336 Binary files /dev/null and b/v0.14.0/_static/css/fonts/lato-normal-italic.woff differ diff --git a/v0.14.0/_static/css/fonts/lato-normal-italic.woff2 b/v0.14.0/_static/css/fonts/lato-normal-italic.woff2 new file mode 100644 index 00000000000..3404f37e2e3 Binary files /dev/null and b/v0.14.0/_static/css/fonts/lato-normal-italic.woff2 differ diff --git a/v0.14.0/_static/css/fonts/lato-normal.woff b/v0.14.0/_static/css/fonts/lato-normal.woff new file mode 100644 index 00000000000..ae1307ff5f4 Binary files /dev/null and b/v0.14.0/_static/css/fonts/lato-normal.woff differ diff --git a/v0.14.0/_static/css/fonts/lato-normal.woff2 b/v0.14.0/_static/css/fonts/lato-normal.woff2 new file mode 100644 index 00000000000..3bf9843328a Binary files /dev/null and b/v0.14.0/_static/css/fonts/lato-normal.woff2 differ diff --git a/v0.14.0/_static/css/theme.css b/v0.14.0/_static/css/theme.css new file mode 100644 index 00000000000..19a446a0e70 --- /dev/null +++ b/v0.14.0/_static/css/theme.css @@ -0,0 +1,4 @@ +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs>li{display:inline-block;padding-top:5px}.wy-breadcrumbs>li.wy-breadcrumbs-aside{float:right}.rst-content .wy-breadcrumbs>li code,.rst-content .wy-breadcrumbs>li tt,.wy-breadcrumbs>li .rst-content tt,.wy-breadcrumbs>li code{all:inherit;color:inherit}.breadcrumb-item:before{content:"/";color:#bbb;font-size:13px;padding:0 6px 0 3px}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search>a:hover{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.version{margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content p a{overflow-wrap:anywhere}.rst-content .wy-table td p,.rst-content .wy-table td ul,.rst-content .wy-table th p,.rst-content .wy-table th ul,.rst-content table.docutils td p,.rst-content table.docutils td ul,.rst-content table.docutils th p,.rst-content table.docutils th ul,.rst-content table.field-list td p,.rst-content table.field-list td ul,.rst-content table.field-list th p,.rst-content table.field-list th ul{font-size:inherit}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .citation-reference>span.fn-bracket,.rst-content .footnote-reference>span.fn-bracket{display:none}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:" : "}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:auto minmax(80%,95%)}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{display:inline-grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{display:grid;grid-template-columns:auto auto minmax(.65rem,auto) minmax(40%,95%)}html.writer-html5 .rst-content aside.citation>span.label,html.writer-html5 .rst-content aside.footnote>span.label,html.writer-html5 .rst-content div.citation>span.label{grid-column-start:1;grid-column-end:2}html.writer-html5 .rst-content aside.citation>span.backrefs,html.writer-html5 .rst-content aside.footnote>span.backrefs,html.writer-html5 .rst-content div.citation>span.backrefs{grid-column-start:2;grid-column-end:3;grid-row-start:1;grid-row-end:3}html.writer-html5 .rst-content aside.citation>p,html.writer-html5 .rst-content aside.footnote>p,html.writer-html5 .rst-content div.citation>p{grid-column-start:4;grid-column-end:5}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{margin-bottom:24px}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.citation>dt>span.brackets:before,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.citation>dt>span.brackets:after,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a{word-break:keep-all}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a:not(:first-child):before,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.citation>dd p,html.writer-html5 .rst-content dl.footnote>dd p{font-size:.9rem}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{padding-left:1rem;padding-right:1rem;font-size:.9rem;line-height:1.2rem}html.writer-html5 .rst-content aside.citation p,html.writer-html5 .rst-content aside.footnote p,html.writer-html5 .rst-content div.citation p{font-size:.9rem;line-height:1.2rem;margin-bottom:12px}html.writer-html5 .rst-content aside.citation span.backrefs,html.writer-html5 .rst-content aside.footnote span.backrefs,html.writer-html5 .rst-content div.citation span.backrefs{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content aside.citation span.backrefs>a,html.writer-html5 .rst-content aside.footnote span.backrefs>a,html.writer-html5 .rst-content div.citation span.backrefs>a{word-break:keep-all}html.writer-html5 .rst-content aside.citation span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content aside.footnote span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content div.citation span.backrefs>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content aside.citation span.label,html.writer-html5 .rst-content aside.footnote span.label,html.writer-html5 .rst-content div.citation span.label{line-height:1.2rem}html.writer-html5 .rst-content aside.citation-list,html.writer-html5 .rst-content aside.footnote-list,html.writer-html5 .rst-content div.citation-list{margin-bottom:24px}html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content aside.footnote-list aside.footnote,html.writer-html5 .rst-content div.citation-list>div.citation,html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content aside.footnote-list aside.footnote code,html.writer-html5 .rst-content aside.footnote-list aside.footnote tt,html.writer-html5 .rst-content aside.footnote code,html.writer-html5 .rst-content aside.footnote tt,html.writer-html5 .rst-content div.citation-list>div.citation code,html.writer-html5 .rst-content div.citation-list>div.citation tt,html.writer-html5 .rst-content dl.citation code,html.writer-html5 .rst-content dl.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040;overflow-wrap:normal}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}.rst-content dl dd>ol:last-child,.rst-content dl dd>p:last-child,.rst-content dl dd>table:last-child,.rst-content dl dd>ul:last-child{margin-bottom:0}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel,.rst-content .menuselection{font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content .guilabel,.rst-content .menuselection{border:1px solid #7fbbe3;background:#e7f2fa}.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>.kbd,.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>kbd{color:inherit;font-size:80%;background-color:#fff;border:1px solid #a6a6a6;border-radius:4px;box-shadow:0 2px grey;padding:2.4px 6px;margin:auto 0}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block} \ No newline at end of file diff --git a/v0.14.0/_static/design-tabs.js b/v0.14.0/_static/design-tabs.js new file mode 100644 index 00000000000..b25bd6a4fa1 --- /dev/null +++ b/v0.14.0/_static/design-tabs.js @@ -0,0 +1,101 @@ +// @ts-check + +// Extra JS capability for selected tabs to be synced +// The selection is stored in local storage so that it persists across page loads. + +/** + * @type {Record} + */ +let sd_id_to_elements = {}; +const storageKeyPrefix = "sphinx-design-tab-id-"; + +/** + * Create a key for a tab element. + * @param {HTMLElement} el - The tab element. + * @returns {[string, string, string] | null} - The key. + * + */ +function create_key(el) { + let syncId = el.getAttribute("data-sync-id"); + let syncGroup = el.getAttribute("data-sync-group"); + if (!syncId || !syncGroup) return null; + return [syncGroup, syncId, syncGroup + "--" + syncId]; +} + +/** + * Initialize the tab selection. + * + */ +function ready() { + // Find all tabs with sync data + + /** @type {string[]} */ + let groups = []; + + document.querySelectorAll(".sd-tab-label").forEach((label) => { + if (label instanceof HTMLElement) { + let data = create_key(label); + if (data) { + let [group, id, key] = data; + + // add click event listener + // @ts-ignore + label.onclick = onSDLabelClick; + + // store map of key to elements + if (!sd_id_to_elements[key]) { + sd_id_to_elements[key] = []; + } + sd_id_to_elements[key].push(label); + + if (groups.indexOf(group) === -1) { + groups.push(group); + // Check if a specific tab has been selected via URL parameter + const tabParam = new URLSearchParams(window.location.search).get( + group + ); + if (tabParam) { + console.log( + "sphinx-design: Selecting tab id for group '" + + group + + "' from URL parameter: " + + tabParam + ); + window.sessionStorage.setItem(storageKeyPrefix + group, tabParam); + } + } + + // Check is a specific tab has been selected previously + let previousId = window.sessionStorage.getItem( + storageKeyPrefix + group + ); + if (previousId === id) { + // console.log( + // "sphinx-design: Selecting tab from session storage: " + id + // ); + // @ts-ignore + label.previousElementSibling.checked = true; + } + } + } + }); +} + +/** + * Activate other tabs with the same sync id. + * + * @this {HTMLElement} - The element that was clicked. + */ +function onSDLabelClick() { + let data = create_key(this); + if (!data) return; + let [group, id, key] = data; + for (const label of sd_id_to_elements[key]) { + if (label === this) continue; + // @ts-ignore + label.previousElementSibling.checked = true; + } + window.sessionStorage.setItem(storageKeyPrefix + group, id); +} + +document.addEventListener("DOMContentLoaded", ready, false); diff --git a/v0.14.0/_static/doctools.js b/v0.14.0/_static/doctools.js new file mode 100644 index 00000000000..4d67807d17d --- /dev/null +++ b/v0.14.0/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/v0.14.0/_static/documentation_options.js b/v0.14.0/_static/documentation_options.js new file mode 100644 index 00000000000..2d7d8f494f4 --- /dev/null +++ b/v0.14.0/_static/documentation_options.js @@ -0,0 +1,13 @@ +const DOCUMENTATION_OPTIONS = { + VERSION: 'v0.14.0', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/v0.14.0/_static/favicon.png b/v0.14.0/_static/favicon.png new file mode 100644 index 00000000000..6cd8062c804 Binary files /dev/null and b/v0.14.0/_static/favicon.png differ diff --git a/v0.14.0/_static/file.png b/v0.14.0/_static/file.png new file mode 100644 index 00000000000..a858a410e4f Binary files /dev/null and b/v0.14.0/_static/file.png differ diff --git a/v0.14.0/_static/fonts/Atkinson-Hyperlegible-Bold-102a.woff2 b/v0.14.0/_static/fonts/Atkinson-Hyperlegible-Bold-102a.woff2 new file mode 100644 index 00000000000..19a58eace2f Binary files /dev/null and b/v0.14.0/_static/fonts/Atkinson-Hyperlegible-Bold-102a.woff2 differ diff --git a/v0.14.0/_static/fonts/Atkinson-Hyperlegible-BoldItalic-102a.woff2 b/v0.14.0/_static/fonts/Atkinson-Hyperlegible-BoldItalic-102a.woff2 new file mode 100644 index 00000000000..43f253e52c2 Binary files /dev/null and b/v0.14.0/_static/fonts/Atkinson-Hyperlegible-BoldItalic-102a.woff2 differ diff --git a/v0.14.0/_static/fonts/Atkinson-Hyperlegible-Italic-102a.woff2 b/v0.14.0/_static/fonts/Atkinson-Hyperlegible-Italic-102a.woff2 new file mode 100644 index 00000000000..d35d3a78dc5 Binary files /dev/null and b/v0.14.0/_static/fonts/Atkinson-Hyperlegible-Italic-102a.woff2 differ diff --git a/v0.14.0/_static/fonts/Atkinson-Hyperlegible-Regular-102a.woff2 b/v0.14.0/_static/fonts/Atkinson-Hyperlegible-Regular-102a.woff2 new file mode 100644 index 00000000000..99b3c6f5e44 Binary files /dev/null and b/v0.14.0/_static/fonts/Atkinson-Hyperlegible-Regular-102a.woff2 differ diff --git a/v0.14.0/_static/jquery.js b/v0.14.0/_static/jquery.js new file mode 100644 index 00000000000..c4c6022f298 --- /dev/null +++ b/v0.14.0/_static/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/v0.14.0/_static/js/html5shiv.min.js b/v0.14.0/_static/js/html5shiv.min.js new file mode 100644 index 00000000000..cd1c674f5e3 --- /dev/null +++ b/v0.14.0/_static/js/html5shiv.min.js @@ -0,0 +1,4 @@ +/** +* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/v0.14.0/_static/js/theme.js b/v0.14.0/_static/js/theme.js new file mode 100644 index 00000000000..1fddb6ee4a6 --- /dev/null +++ b/v0.14.0/_static/js/theme.js @@ -0,0 +1 @@ +!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t + +launchlaunchlitelite \ No newline at end of file diff --git a/v0.14.0/_static/language_data.js b/v0.14.0/_static/language_data.js new file mode 100644 index 00000000000..367b8ed81b4 --- /dev/null +++ b/v0.14.0/_static/language_data.js @@ -0,0 +1,199 @@ +/* + * language_data.js + * ~~~~~~~~~~~~~~~~ + * + * This script contains the language-specific data used by searchtools.js, + * namely the list of stopwords, stemmer, scorer and splitter. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; + + +/* Non-minified version is copied as a separate JS file, if available */ + +/** + * Porter Stemmer + */ +var Stemmer = function() { + + var step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log' + }; + + var step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '' + }; + + var c = "[^aeiou]"; // consonant + var v = "[aeiouy]"; // vowel + var C = c + "[^aeiouy]*"; // consonant sequence + var V = v + "[aeiou]*"; // vowel sequence + + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/v0.14.0/_static/minus.png b/v0.14.0/_static/minus.png new file mode 100644 index 00000000000..d96755fdaf8 Binary files /dev/null and b/v0.14.0/_static/minus.png differ diff --git a/v0.14.0/_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css b/v0.14.0/_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css new file mode 100644 index 00000000000..33566310604 --- /dev/null +++ b/v0.14.0/_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css @@ -0,0 +1,2342 @@ +/* Variables */ +:root { + --mystnb-source-bg-color: #f7f7f7; + --mystnb-stdout-bg-color: #fcfcfc; + --mystnb-stderr-bg-color: #fdd; + --mystnb-traceback-bg-color: #fcfcfc; + --mystnb-source-border-color: #ccc; + --mystnb-source-margin-color: green; + --mystnb-stdout-border-color: #f7f7f7; + --mystnb-stderr-border-color: #f7f7f7; + --mystnb-traceback-border-color: #ffd6d6; + --mystnb-hide-prompt-opacity: 70%; + --mystnb-source-border-radius: .4em; + --mystnb-source-border-width: 1px; +} + +/* Whole cell */ +div.container.cell { + padding-left: 0; + margin-bottom: 1em; +} + +/* Removing all background formatting so we can control at the div level */ +.cell_input div.highlight, +.cell_output pre, +.cell_input pre, +.cell_output .output { + border: none; + box-shadow: none; +} + +.cell_output .output pre, +.cell_input pre { + margin: 0px; +} + +/* Input cells */ +div.cell div.cell_input, +div.cell details.above-input>summary { + padding-left: 0em; + padding-right: 0em; + border: var(--mystnb-source-border-width) var(--mystnb-source-border-color) solid; + background-color: var(--mystnb-source-bg-color); + border-left-color: var(--mystnb-source-margin-color); + border-left-width: medium; + border-radius: var(--mystnb-source-border-radius); +} + +div.cell_input>div, +div.cell_output div.output>div.highlight { + margin: 0em !important; + border: none !important; +} + +/* All cell outputs */ +.cell_output { + padding-left: 1em; + padding-right: 0em; + margin-top: 1em; +} + +/* Text outputs from cells */ +.cell_output .output.text_plain, +.cell_output .output.traceback, +.cell_output .output.stream, +.cell_output .output.stderr { + margin-top: 1em; + margin-bottom: 0em; + box-shadow: none; +} + +.cell_output .output.text_plain, +.cell_output .output.stream { + background: var(--mystnb-stdout-bg-color); + border: 1px solid var(--mystnb-stdout-border-color); +} + +.cell_output .output.stderr { + background: var(--mystnb-stderr-bg-color); + border: 1px solid var(--mystnb-stderr-border-color); +} + +.cell_output .output.traceback { + background: var(--mystnb-traceback-bg-color); + border: 1px solid var(--mystnb-traceback-border-color); +} + +/* Collapsible cell content */ +div.cell details.above-input div.cell_input { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-top: var(--mystnb-source-border-width) var(--mystnb-source-border-color) dashed; +} + +div.cell div.cell_input.above-output-prompt { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + +div.cell details.above-input>summary { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-bottom: var(--mystnb-source-border-width) var(--mystnb-source-border-color) dashed; + padding-left: 1em; + margin-bottom: 0; +} + +div.cell details.above-output>summary { + background-color: var(--mystnb-source-bg-color); + padding-left: 1em; + padding-right: 0em; + border: var(--mystnb-source-border-width) var(--mystnb-source-border-color) solid; + border-radius: var(--mystnb-source-border-radius); + border-left-color: var(--mystnb-source-margin-color); + border-left-width: medium; +} + +div.cell details.below-input>summary { + background-color: var(--mystnb-source-bg-color); + padding-left: 1em; + padding-right: 0em; + border: var(--mystnb-source-border-width) var(--mystnb-source-border-color) solid; + border-top: none; + border-bottom-left-radius: var(--mystnb-source-border-radius); + border-bottom-right-radius: var(--mystnb-source-border-radius); + border-left-color: var(--mystnb-source-margin-color); + border-left-width: medium; +} + +div.cell details.hide>summary>span { + opacity: var(--mystnb-hide-prompt-opacity); +} + +div.cell details.hide[open]>summary>span.collapsed { + display: none; +} + +div.cell details.hide:not([open])>summary>span.expanded { + display: none; +} + +@keyframes collapsed-fade-in { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} +div.cell details.hide[open]>summary~* { + -moz-animation: collapsed-fade-in 0.3s ease-in-out; + -webkit-animation: collapsed-fade-in 0.3s ease-in-out; + animation: collapsed-fade-in 0.3s ease-in-out; +} + +/* Math align to the left */ +.cell_output .MathJax_Display { + text-align: left !important; +} + +/* Pandas tables. Pulled from the Jupyter / nbsphinx CSS */ +div.cell_output table { + border: none; + border-collapse: collapse; + border-spacing: 0; + color: black; + font-size: 1em; + table-layout: fixed; +} + +div.cell_output thead { + border-bottom: 1px solid black; + vertical-align: bottom; +} + +div.cell_output tr, +div.cell_output th, +div.cell_output td { + text-align: right; + vertical-align: middle; + padding: 0.5em 0.5em; + line-height: normal; + white-space: normal; + max-width: none; + border: none; +} + +div.cell_output th { + font-weight: bold; +} + +div.cell_output tbody tr:nth-child(odd) { + background: #f5f5f5; +} + +div.cell_output tbody tr:hover { + background: rgba(66, 165, 245, 0.2); +} + +/** source code line numbers **/ +span.linenos { + opacity: 0.5; +} + +/* Inline text from `paste` operation */ + +span.pasted-text { + font-weight: bold; +} + +span.pasted-inline img { + max-height: 2em; +} + +tbody span.pasted-inline img { + max-height: none; +} + +/* Font colors for translated ANSI escape sequences +Color values are copied from Jupyter Notebook +https://github.com/jupyter/notebook/blob/52581f8eda9b319eb0390ac77fe5903c38f81e3e/notebook/static/notebook/less/ansicolors.less#L14-L21 +Background colors from +https://nbsphinx.readthedocs.io/en/latest/code-cells.html#ANSI-Colors +*/ +div.highlight .-Color-Bold { + font-weight: bold; +} + +div.highlight .-Color[class*=-Black] { + color: #3E424D +} + +div.highlight .-Color[class*=-Red] { + color: #E75C58 +} + +div.highlight .-Color[class*=-Green] { + color: #00A250 +} + +div.highlight .-Color[class*=-Yellow] { + color: #DDB62B +} + +div.highlight .-Color[class*=-Blue] { + color: #208FFB +} + +div.highlight .-Color[class*=-Magenta] { + color: #D160C4 +} + +div.highlight .-Color[class*=-Cyan] { + color: #60C6C8 +} + +div.highlight .-Color[class*=-White] { + color: #C5C1B4 +} + +div.highlight .-Color[class*=-BGBlack] { + background-color: #3E424D +} + +div.highlight .-Color[class*=-BGRed] { + background-color: #E75C58 +} + +div.highlight .-Color[class*=-BGGreen] { + background-color: #00A250 +} + +div.highlight .-Color[class*=-BGYellow] { + background-color: #DDB62B +} + +div.highlight .-Color[class*=-BGBlue] { + background-color: #208FFB +} + +div.highlight .-Color[class*=-BGMagenta] { + background-color: #D160C4 +} + +div.highlight .-Color[class*=-BGCyan] { + background-color: #60C6C8 +} + +div.highlight .-Color[class*=-BGWhite] { + background-color: #C5C1B4 +} + +/* Font colors for 8-bit ANSI */ + +div.highlight .-Color[class*=-C0] { + color: #000000 +} + +div.highlight .-Color[class*=-BGC0] { + background-color: #000000 +} + +div.highlight .-Color[class*=-C1] { + color: #800000 +} + +div.highlight .-Color[class*=-BGC1] { + background-color: #800000 +} + +div.highlight .-Color[class*=-C2] { + color: #008000 +} + +div.highlight .-Color[class*=-BGC2] { + background-color: #008000 +} + +div.highlight .-Color[class*=-C3] { + color: #808000 +} + +div.highlight .-Color[class*=-BGC3] { + background-color: #808000 +} + +div.highlight .-Color[class*=-C4] { + color: #000080 +} + +div.highlight .-Color[class*=-BGC4] { + background-color: #000080 +} + +div.highlight .-Color[class*=-C5] { + color: #800080 +} + +div.highlight .-Color[class*=-BGC5] { + background-color: #800080 +} + +div.highlight .-Color[class*=-C6] { + color: #008080 +} + +div.highlight .-Color[class*=-BGC6] { + background-color: #008080 +} + +div.highlight .-Color[class*=-C7] { + color: #C0C0C0 +} + +div.highlight .-Color[class*=-BGC7] { + background-color: #C0C0C0 +} + +div.highlight .-Color[class*=-C8] { + color: #808080 +} + +div.highlight .-Color[class*=-BGC8] { + background-color: #808080 +} + +div.highlight .-Color[class*=-C9] { + color: #FF0000 +} + +div.highlight .-Color[class*=-BGC9] { + background-color: #FF0000 +} + +div.highlight .-Color[class*=-C10] { + color: #00FF00 +} + +div.highlight .-Color[class*=-BGC10] { + background-color: #00FF00 +} + +div.highlight .-Color[class*=-C11] { + color: #FFFF00 +} + +div.highlight .-Color[class*=-BGC11] { + background-color: #FFFF00 +} + +div.highlight .-Color[class*=-C12] { + color: #0000FF +} + +div.highlight .-Color[class*=-BGC12] { + background-color: #0000FF +} + +div.highlight .-Color[class*=-C13] { + color: #FF00FF +} + +div.highlight .-Color[class*=-BGC13] { + background-color: #FF00FF +} + +div.highlight .-Color[class*=-C14] { + color: #00FFFF +} + +div.highlight .-Color[class*=-BGC14] { + background-color: #00FFFF +} + +div.highlight .-Color[class*=-C15] { + color: #FFFFFF +} + +div.highlight .-Color[class*=-BGC15] { + background-color: #FFFFFF +} + +div.highlight .-Color[class*=-C16] { + color: #000000 +} + +div.highlight .-Color[class*=-BGC16] { + background-color: #000000 +} + +div.highlight .-Color[class*=-C17] { + color: #00005F +} + +div.highlight .-Color[class*=-BGC17] { + background-color: #00005F +} + +div.highlight .-Color[class*=-C18] { + color: #000087 +} + +div.highlight .-Color[class*=-BGC18] { + background-color: #000087 +} + +div.highlight .-Color[class*=-C19] { + color: #0000AF +} + +div.highlight .-Color[class*=-BGC19] { + background-color: #0000AF +} + +div.highlight .-Color[class*=-C20] { + color: #0000D7 +} + +div.highlight .-Color[class*=-BGC20] { + background-color: #0000D7 +} + +div.highlight .-Color[class*=-C21] { + color: #0000FF +} + +div.highlight .-Color[class*=-BGC21] { + background-color: #0000FF +} + +div.highlight .-Color[class*=-C22] { + color: #005F00 +} + +div.highlight .-Color[class*=-BGC22] { + background-color: #005F00 +} + +div.highlight .-Color[class*=-C23] { + color: #005F5F +} + +div.highlight .-Color[class*=-BGC23] { + background-color: #005F5F +} + +div.highlight .-Color[class*=-C24] { + color: #005F87 +} + +div.highlight .-Color[class*=-BGC24] { + background-color: #005F87 +} + +div.highlight .-Color[class*=-C25] { + color: #005FAF +} + +div.highlight .-Color[class*=-BGC25] { + background-color: #005FAF +} + +div.highlight .-Color[class*=-C26] { + color: #005FD7 +} + +div.highlight .-Color[class*=-BGC26] { + background-color: #005FD7 +} + +div.highlight .-Color[class*=-C27] { + color: #005FFF +} + +div.highlight .-Color[class*=-BGC27] { + background-color: #005FFF +} + +div.highlight .-Color[class*=-C28] { + color: #008700 +} + +div.highlight .-Color[class*=-BGC28] { + background-color: #008700 +} + +div.highlight .-Color[class*=-C29] { + color: #00875F +} + +div.highlight .-Color[class*=-BGC29] { + background-color: #00875F +} + +div.highlight .-Color[class*=-C30] { + color: #008787 +} + +div.highlight .-Color[class*=-BGC30] { + background-color: #008787 +} + +div.highlight .-Color[class*=-C31] { + color: #0087AF +} + +div.highlight .-Color[class*=-BGC31] { + background-color: #0087AF +} + +div.highlight .-Color[class*=-C32] { + color: #0087D7 +} + +div.highlight .-Color[class*=-BGC32] { + background-color: #0087D7 +} + +div.highlight .-Color[class*=-C33] { + color: #0087FF +} + +div.highlight .-Color[class*=-BGC33] { + background-color: #0087FF +} + +div.highlight .-Color[class*=-C34] { + color: #00AF00 +} + +div.highlight .-Color[class*=-BGC34] { + background-color: #00AF00 +} + +div.highlight .-Color[class*=-C35] { + color: #00AF5F +} + +div.highlight .-Color[class*=-BGC35] { + background-color: #00AF5F +} + +div.highlight .-Color[class*=-C36] { + color: #00AF87 +} + +div.highlight .-Color[class*=-BGC36] { + background-color: #00AF87 +} + +div.highlight .-Color[class*=-C37] { + color: #00AFAF +} + +div.highlight .-Color[class*=-BGC37] { + background-color: #00AFAF +} + +div.highlight .-Color[class*=-C38] { + color: #00AFD7 +} + +div.highlight .-Color[class*=-BGC38] { + background-color: #00AFD7 +} + +div.highlight .-Color[class*=-C39] { + color: #00AFFF +} + +div.highlight .-Color[class*=-BGC39] { + background-color: #00AFFF +} + +div.highlight .-Color[class*=-C40] { + color: #00D700 +} + +div.highlight .-Color[class*=-BGC40] { + background-color: #00D700 +} + +div.highlight .-Color[class*=-C41] { + color: #00D75F +} + +div.highlight .-Color[class*=-BGC41] { + background-color: #00D75F +} + +div.highlight .-Color[class*=-C42] { + color: #00D787 +} + +div.highlight .-Color[class*=-BGC42] { + background-color: #00D787 +} + +div.highlight .-Color[class*=-C43] { + color: #00D7AF +} + +div.highlight .-Color[class*=-BGC43] { + background-color: #00D7AF +} + +div.highlight .-Color[class*=-C44] { + color: #00D7D7 +} + +div.highlight .-Color[class*=-BGC44] { + background-color: #00D7D7 +} + +div.highlight .-Color[class*=-C45] { + color: #00D7FF +} + +div.highlight .-Color[class*=-BGC45] { + background-color: #00D7FF +} + +div.highlight .-Color[class*=-C46] { + color: #00FF00 +} + +div.highlight .-Color[class*=-BGC46] { + background-color: #00FF00 +} + +div.highlight .-Color[class*=-C47] { + color: #00FF5F +} + +div.highlight .-Color[class*=-BGC47] { + background-color: #00FF5F +} + +div.highlight .-Color[class*=-C48] { + color: #00FF87 +} + +div.highlight .-Color[class*=-BGC48] { + background-color: #00FF87 +} + +div.highlight .-Color[class*=-C49] { + color: #00FFAF +} + +div.highlight .-Color[class*=-BGC49] { + background-color: #00FFAF +} + +div.highlight .-Color[class*=-C50] { + color: #00FFD7 +} + +div.highlight .-Color[class*=-BGC50] { + background-color: #00FFD7 +} + +div.highlight .-Color[class*=-C51] { + color: #00FFFF +} + +div.highlight .-Color[class*=-BGC51] { + background-color: #00FFFF +} + +div.highlight .-Color[class*=-C52] { + color: #5F0000 +} + +div.highlight .-Color[class*=-BGC52] { + background-color: #5F0000 +} + +div.highlight .-Color[class*=-C53] { + color: #5F005F +} + +div.highlight .-Color[class*=-BGC53] { + background-color: #5F005F +} + +div.highlight .-Color[class*=-C54] { + color: #5F0087 +} + +div.highlight .-Color[class*=-BGC54] { + background-color: #5F0087 +} + +div.highlight .-Color[class*=-C55] { + color: #5F00AF +} + +div.highlight .-Color[class*=-BGC55] { + background-color: #5F00AF +} + +div.highlight .-Color[class*=-C56] { + color: #5F00D7 +} + +div.highlight .-Color[class*=-BGC56] { + background-color: #5F00D7 +} + +div.highlight .-Color[class*=-C57] { + color: #5F00FF +} + +div.highlight .-Color[class*=-BGC57] { + background-color: #5F00FF +} + +div.highlight .-Color[class*=-C58] { + color: #5F5F00 +} + +div.highlight .-Color[class*=-BGC58] { + background-color: #5F5F00 +} + +div.highlight .-Color[class*=-C59] { + color: #5F5F5F +} + +div.highlight .-Color[class*=-BGC59] { + background-color: #5F5F5F +} + +div.highlight .-Color[class*=-C60] { + color: #5F5F87 +} + +div.highlight .-Color[class*=-BGC60] { + background-color: #5F5F87 +} + +div.highlight .-Color[class*=-C61] { + color: #5F5FAF +} + +div.highlight .-Color[class*=-BGC61] { + background-color: #5F5FAF +} + +div.highlight .-Color[class*=-C62] { + color: #5F5FD7 +} + +div.highlight .-Color[class*=-BGC62] { + background-color: #5F5FD7 +} + +div.highlight .-Color[class*=-C63] { + color: #5F5FFF +} + +div.highlight .-Color[class*=-BGC63] { + background-color: #5F5FFF +} + +div.highlight .-Color[class*=-C64] { + color: #5F8700 +} + +div.highlight .-Color[class*=-BGC64] { + background-color: #5F8700 +} + +div.highlight .-Color[class*=-C65] { + color: #5F875F +} + +div.highlight .-Color[class*=-BGC65] { + background-color: #5F875F +} + +div.highlight .-Color[class*=-C66] { + color: #5F8787 +} + +div.highlight .-Color[class*=-BGC66] { + background-color: #5F8787 +} + +div.highlight .-Color[class*=-C67] { + color: #5F87AF +} + +div.highlight .-Color[class*=-BGC67] { + background-color: #5F87AF +} + +div.highlight .-Color[class*=-C68] { + color: #5F87D7 +} + +div.highlight .-Color[class*=-BGC68] { + background-color: #5F87D7 +} + +div.highlight .-Color[class*=-C69] { + color: #5F87FF +} + +div.highlight .-Color[class*=-BGC69] { + background-color: #5F87FF +} + +div.highlight .-Color[class*=-C70] { + color: #5FAF00 +} + +div.highlight .-Color[class*=-BGC70] { + background-color: #5FAF00 +} + +div.highlight .-Color[class*=-C71] { + color: #5FAF5F +} + +div.highlight .-Color[class*=-BGC71] { + background-color: #5FAF5F +} + +div.highlight .-Color[class*=-C72] { + color: #5FAF87 +} + +div.highlight .-Color[class*=-BGC72] { + background-color: #5FAF87 +} + +div.highlight .-Color[class*=-C73] { + color: #5FAFAF +} + +div.highlight .-Color[class*=-BGC73] { + background-color: #5FAFAF +} + +div.highlight .-Color[class*=-C74] { + color: #5FAFD7 +} + +div.highlight .-Color[class*=-BGC74] { + background-color: #5FAFD7 +} + +div.highlight .-Color[class*=-C75] { + color: #5FAFFF +} + +div.highlight .-Color[class*=-BGC75] { + background-color: #5FAFFF +} + +div.highlight .-Color[class*=-C76] { + color: #5FD700 +} + +div.highlight .-Color[class*=-BGC76] { + background-color: #5FD700 +} + +div.highlight .-Color[class*=-C77] { + color: #5FD75F +} + +div.highlight .-Color[class*=-BGC77] { + background-color: #5FD75F +} + +div.highlight .-Color[class*=-C78] { + color: #5FD787 +} + +div.highlight .-Color[class*=-BGC78] { + background-color: #5FD787 +} + +div.highlight .-Color[class*=-C79] { + color: #5FD7AF +} + +div.highlight .-Color[class*=-BGC79] { + background-color: #5FD7AF +} + +div.highlight .-Color[class*=-C80] { + color: #5FD7D7 +} + +div.highlight .-Color[class*=-BGC80] { + background-color: #5FD7D7 +} + +div.highlight .-Color[class*=-C81] { + color: #5FD7FF +} + +div.highlight .-Color[class*=-BGC81] { + background-color: #5FD7FF +} + +div.highlight .-Color[class*=-C82] { + color: #5FFF00 +} + +div.highlight .-Color[class*=-BGC82] { + background-color: #5FFF00 +} + +div.highlight .-Color[class*=-C83] { + color: #5FFF5F +} + +div.highlight .-Color[class*=-BGC83] { + background-color: #5FFF5F +} + +div.highlight .-Color[class*=-C84] { + color: #5FFF87 +} + +div.highlight .-Color[class*=-BGC84] { + background-color: #5FFF87 +} + +div.highlight .-Color[class*=-C85] { + color: #5FFFAF +} + +div.highlight .-Color[class*=-BGC85] { + background-color: #5FFFAF +} + +div.highlight .-Color[class*=-C86] { + color: #5FFFD7 +} + +div.highlight .-Color[class*=-BGC86] { + background-color: #5FFFD7 +} + +div.highlight .-Color[class*=-C87] { + color: #5FFFFF +} + +div.highlight .-Color[class*=-BGC87] { + background-color: #5FFFFF +} + +div.highlight .-Color[class*=-C88] { + color: #870000 +} + +div.highlight .-Color[class*=-BGC88] { + background-color: #870000 +} + +div.highlight .-Color[class*=-C89] { + color: #87005F +} + +div.highlight .-Color[class*=-BGC89] { + background-color: #87005F +} + +div.highlight .-Color[class*=-C90] { + color: #870087 +} + +div.highlight .-Color[class*=-BGC90] { + background-color: #870087 +} + +div.highlight .-Color[class*=-C91] { + color: #8700AF +} + +div.highlight .-Color[class*=-BGC91] { + background-color: #8700AF +} + +div.highlight .-Color[class*=-C92] { + color: #8700D7 +} + +div.highlight .-Color[class*=-BGC92] { + background-color: #8700D7 +} + +div.highlight .-Color[class*=-C93] { + color: #8700FF +} + +div.highlight .-Color[class*=-BGC93] { + background-color: #8700FF +} + +div.highlight .-Color[class*=-C94] { + color: #875F00 +} + +div.highlight .-Color[class*=-BGC94] { + background-color: #875F00 +} + +div.highlight .-Color[class*=-C95] { + color: #875F5F +} + +div.highlight .-Color[class*=-BGC95] { + background-color: #875F5F +} + +div.highlight .-Color[class*=-C96] { + color: #875F87 +} + +div.highlight .-Color[class*=-BGC96] { + background-color: #875F87 +} + +div.highlight .-Color[class*=-C97] { + color: #875FAF +} + +div.highlight .-Color[class*=-BGC97] { + background-color: #875FAF +} + +div.highlight .-Color[class*=-C98] { + color: #875FD7 +} + +div.highlight .-Color[class*=-BGC98] { + background-color: #875FD7 +} + +div.highlight .-Color[class*=-C99] { + color: #875FFF +} + +div.highlight .-Color[class*=-BGC99] { + background-color: #875FFF +} + +div.highlight .-Color[class*=-C100] { + color: #878700 +} + +div.highlight .-Color[class*=-BGC100] { + background-color: #878700 +} + +div.highlight .-Color[class*=-C101] { + color: #87875F +} + +div.highlight .-Color[class*=-BGC101] { + background-color: #87875F +} + +div.highlight .-Color[class*=-C102] { + color: #878787 +} + +div.highlight .-Color[class*=-BGC102] { + background-color: #878787 +} + +div.highlight .-Color[class*=-C103] { + color: #8787AF +} + +div.highlight .-Color[class*=-BGC103] { + background-color: #8787AF +} + +div.highlight .-Color[class*=-C104] { + color: #8787D7 +} + +div.highlight .-Color[class*=-BGC104] { + background-color: #8787D7 +} + +div.highlight .-Color[class*=-C105] { + color: #8787FF +} + +div.highlight .-Color[class*=-BGC105] { + background-color: #8787FF +} + +div.highlight .-Color[class*=-C106] { + color: #87AF00 +} + +div.highlight .-Color[class*=-BGC106] { + background-color: #87AF00 +} + +div.highlight .-Color[class*=-C107] { + color: #87AF5F +} + +div.highlight .-Color[class*=-BGC107] { + background-color: #87AF5F +} + +div.highlight .-Color[class*=-C108] { + color: #87AF87 +} + +div.highlight .-Color[class*=-BGC108] { + background-color: #87AF87 +} + +div.highlight .-Color[class*=-C109] { + color: #87AFAF +} + +div.highlight .-Color[class*=-BGC109] { + background-color: #87AFAF +} + +div.highlight .-Color[class*=-C110] { + color: #87AFD7 +} + +div.highlight .-Color[class*=-BGC110] { + background-color: #87AFD7 +} + +div.highlight .-Color[class*=-C111] { + color: #87AFFF +} + +div.highlight .-Color[class*=-BGC111] { + background-color: #87AFFF +} + +div.highlight .-Color[class*=-C112] { + color: #87D700 +} + +div.highlight .-Color[class*=-BGC112] { + background-color: #87D700 +} + +div.highlight .-Color[class*=-C113] { + color: #87D75F +} + +div.highlight .-Color[class*=-BGC113] { + background-color: #87D75F +} + +div.highlight .-Color[class*=-C114] { + color: #87D787 +} + +div.highlight .-Color[class*=-BGC114] { + background-color: #87D787 +} + +div.highlight .-Color[class*=-C115] { + color: #87D7AF +} + +div.highlight .-Color[class*=-BGC115] { + background-color: #87D7AF +} + +div.highlight .-Color[class*=-C116] { + color: #87D7D7 +} + +div.highlight .-Color[class*=-BGC116] { + background-color: #87D7D7 +} + +div.highlight .-Color[class*=-C117] { + color: #87D7FF +} + +div.highlight .-Color[class*=-BGC117] { + background-color: #87D7FF +} + +div.highlight .-Color[class*=-C118] { + color: #87FF00 +} + +div.highlight .-Color[class*=-BGC118] { + background-color: #87FF00 +} + +div.highlight .-Color[class*=-C119] { + color: #87FF5F +} + +div.highlight .-Color[class*=-BGC119] { + background-color: #87FF5F +} + +div.highlight .-Color[class*=-C120] { + color: #87FF87 +} + +div.highlight .-Color[class*=-BGC120] { + background-color: #87FF87 +} + +div.highlight .-Color[class*=-C121] { + color: #87FFAF +} + +div.highlight .-Color[class*=-BGC121] { + background-color: #87FFAF +} + +div.highlight .-Color[class*=-C122] { + color: #87FFD7 +} + +div.highlight .-Color[class*=-BGC122] { + background-color: #87FFD7 +} + +div.highlight .-Color[class*=-C123] { + color: #87FFFF +} + +div.highlight .-Color[class*=-BGC123] { + background-color: #87FFFF +} + +div.highlight .-Color[class*=-C124] { + color: #AF0000 +} + +div.highlight .-Color[class*=-BGC124] { + background-color: #AF0000 +} + +div.highlight .-Color[class*=-C125] { + color: #AF005F +} + +div.highlight .-Color[class*=-BGC125] { + background-color: #AF005F +} + +div.highlight .-Color[class*=-C126] { + color: #AF0087 +} + +div.highlight .-Color[class*=-BGC126] { + background-color: #AF0087 +} + +div.highlight .-Color[class*=-C127] { + color: #AF00AF +} + +div.highlight .-Color[class*=-BGC127] { + background-color: #AF00AF +} + +div.highlight .-Color[class*=-C128] { + color: #AF00D7 +} + +div.highlight .-Color[class*=-BGC128] { + background-color: #AF00D7 +} + +div.highlight .-Color[class*=-C129] { + color: #AF00FF +} + +div.highlight .-Color[class*=-BGC129] { + background-color: #AF00FF +} + +div.highlight .-Color[class*=-C130] { + color: #AF5F00 +} + +div.highlight .-Color[class*=-BGC130] { + background-color: #AF5F00 +} + +div.highlight .-Color[class*=-C131] { + color: #AF5F5F +} + +div.highlight .-Color[class*=-BGC131] { + background-color: #AF5F5F +} + +div.highlight .-Color[class*=-C132] { + color: #AF5F87 +} + +div.highlight .-Color[class*=-BGC132] { + background-color: #AF5F87 +} + +div.highlight .-Color[class*=-C133] { + color: #AF5FAF +} + +div.highlight .-Color[class*=-BGC133] { + background-color: #AF5FAF +} + +div.highlight .-Color[class*=-C134] { + color: #AF5FD7 +} + +div.highlight .-Color[class*=-BGC134] { + background-color: #AF5FD7 +} + +div.highlight .-Color[class*=-C135] { + color: #AF5FFF +} + +div.highlight .-Color[class*=-BGC135] { + background-color: #AF5FFF +} + +div.highlight .-Color[class*=-C136] { + color: #AF8700 +} + +div.highlight .-Color[class*=-BGC136] { + background-color: #AF8700 +} + +div.highlight .-Color[class*=-C137] { + color: #AF875F +} + +div.highlight .-Color[class*=-BGC137] { + background-color: #AF875F +} + +div.highlight .-Color[class*=-C138] { + color: #AF8787 +} + +div.highlight .-Color[class*=-BGC138] { + background-color: #AF8787 +} + +div.highlight .-Color[class*=-C139] { + color: #AF87AF +} + +div.highlight .-Color[class*=-BGC139] { + background-color: #AF87AF +} + +div.highlight .-Color[class*=-C140] { + color: #AF87D7 +} + +div.highlight .-Color[class*=-BGC140] { + background-color: #AF87D7 +} + +div.highlight .-Color[class*=-C141] { + color: #AF87FF +} + +div.highlight .-Color[class*=-BGC141] { + background-color: #AF87FF +} + +div.highlight .-Color[class*=-C142] { + color: #AFAF00 +} + +div.highlight .-Color[class*=-BGC142] { + background-color: #AFAF00 +} + +div.highlight .-Color[class*=-C143] { + color: #AFAF5F +} + +div.highlight .-Color[class*=-BGC143] { + background-color: #AFAF5F +} + +div.highlight .-Color[class*=-C144] { + color: #AFAF87 +} + +div.highlight .-Color[class*=-BGC144] { + background-color: #AFAF87 +} + +div.highlight .-Color[class*=-C145] { + color: #AFAFAF +} + +div.highlight .-Color[class*=-BGC145] { + background-color: #AFAFAF +} + +div.highlight .-Color[class*=-C146] { + color: #AFAFD7 +} + +div.highlight .-Color[class*=-BGC146] { + background-color: #AFAFD7 +} + +div.highlight .-Color[class*=-C147] { + color: #AFAFFF +} + +div.highlight .-Color[class*=-BGC147] { + background-color: #AFAFFF +} + +div.highlight .-Color[class*=-C148] { + color: #AFD700 +} + +div.highlight .-Color[class*=-BGC148] { + background-color: #AFD700 +} + +div.highlight .-Color[class*=-C149] { + color: #AFD75F +} + +div.highlight .-Color[class*=-BGC149] { + background-color: #AFD75F +} + +div.highlight .-Color[class*=-C150] { + color: #AFD787 +} + +div.highlight .-Color[class*=-BGC150] { + background-color: #AFD787 +} + +div.highlight .-Color[class*=-C151] { + color: #AFD7AF +} + +div.highlight .-Color[class*=-BGC151] { + background-color: #AFD7AF +} + +div.highlight .-Color[class*=-C152] { + color: #AFD7D7 +} + +div.highlight .-Color[class*=-BGC152] { + background-color: #AFD7D7 +} + +div.highlight .-Color[class*=-C153] { + color: #AFD7FF +} + +div.highlight .-Color[class*=-BGC153] { + background-color: #AFD7FF +} + +div.highlight .-Color[class*=-C154] { + color: #AFFF00 +} + +div.highlight .-Color[class*=-BGC154] { + background-color: #AFFF00 +} + +div.highlight .-Color[class*=-C155] { + color: #AFFF5F +} + +div.highlight .-Color[class*=-BGC155] { + background-color: #AFFF5F +} + +div.highlight .-Color[class*=-C156] { + color: #AFFF87 +} + +div.highlight .-Color[class*=-BGC156] { + background-color: #AFFF87 +} + +div.highlight .-Color[class*=-C157] { + color: #AFFFAF +} + +div.highlight .-Color[class*=-BGC157] { + background-color: #AFFFAF +} + +div.highlight .-Color[class*=-C158] { + color: #AFFFD7 +} + +div.highlight .-Color[class*=-BGC158] { + background-color: #AFFFD7 +} + +div.highlight .-Color[class*=-C159] { + color: #AFFFFF +} + +div.highlight .-Color[class*=-BGC159] { + background-color: #AFFFFF +} + +div.highlight .-Color[class*=-C160] { + color: #D70000 +} + +div.highlight .-Color[class*=-BGC160] { + background-color: #D70000 +} + +div.highlight .-Color[class*=-C161] { + color: #D7005F +} + +div.highlight .-Color[class*=-BGC161] { + background-color: #D7005F +} + +div.highlight .-Color[class*=-C162] { + color: #D70087 +} + +div.highlight .-Color[class*=-BGC162] { + background-color: #D70087 +} + +div.highlight .-Color[class*=-C163] { + color: #D700AF +} + +div.highlight .-Color[class*=-BGC163] { + background-color: #D700AF +} + +div.highlight .-Color[class*=-C164] { + color: #D700D7 +} + +div.highlight .-Color[class*=-BGC164] { + background-color: #D700D7 +} + +div.highlight .-Color[class*=-C165] { + color: #D700FF +} + +div.highlight .-Color[class*=-BGC165] { + background-color: #D700FF +} + +div.highlight .-Color[class*=-C166] { + color: #D75F00 +} + +div.highlight .-Color[class*=-BGC166] { + background-color: #D75F00 +} + +div.highlight .-Color[class*=-C167] { + color: #D75F5F +} + +div.highlight .-Color[class*=-BGC167] { + background-color: #D75F5F +} + +div.highlight .-Color[class*=-C168] { + color: #D75F87 +} + +div.highlight .-Color[class*=-BGC168] { + background-color: #D75F87 +} + +div.highlight .-Color[class*=-C169] { + color: #D75FAF +} + +div.highlight .-Color[class*=-BGC169] { + background-color: #D75FAF +} + +div.highlight .-Color[class*=-C170] { + color: #D75FD7 +} + +div.highlight .-Color[class*=-BGC170] { + background-color: #D75FD7 +} + +div.highlight .-Color[class*=-C171] { + color: #D75FFF +} + +div.highlight .-Color[class*=-BGC171] { + background-color: #D75FFF +} + +div.highlight .-Color[class*=-C172] { + color: #D78700 +} + +div.highlight .-Color[class*=-BGC172] { + background-color: #D78700 +} + +div.highlight .-Color[class*=-C173] { + color: #D7875F +} + +div.highlight .-Color[class*=-BGC173] { + background-color: #D7875F +} + +div.highlight .-Color[class*=-C174] { + color: #D78787 +} + +div.highlight .-Color[class*=-BGC174] { + background-color: #D78787 +} + +div.highlight .-Color[class*=-C175] { + color: #D787AF +} + +div.highlight .-Color[class*=-BGC175] { + background-color: #D787AF +} + +div.highlight .-Color[class*=-C176] { + color: #D787D7 +} + +div.highlight .-Color[class*=-BGC176] { + background-color: #D787D7 +} + +div.highlight .-Color[class*=-C177] { + color: #D787FF +} + +div.highlight .-Color[class*=-BGC177] { + background-color: #D787FF +} + +div.highlight .-Color[class*=-C178] { + color: #D7AF00 +} + +div.highlight .-Color[class*=-BGC178] { + background-color: #D7AF00 +} + +div.highlight .-Color[class*=-C179] { + color: #D7AF5F +} + +div.highlight .-Color[class*=-BGC179] { + background-color: #D7AF5F +} + +div.highlight .-Color[class*=-C180] { + color: #D7AF87 +} + +div.highlight .-Color[class*=-BGC180] { + background-color: #D7AF87 +} + +div.highlight .-Color[class*=-C181] { + color: #D7AFAF +} + +div.highlight .-Color[class*=-BGC181] { + background-color: #D7AFAF +} + +div.highlight .-Color[class*=-C182] { + color: #D7AFD7 +} + +div.highlight .-Color[class*=-BGC182] { + background-color: #D7AFD7 +} + +div.highlight .-Color[class*=-C183] { + color: #D7AFFF +} + +div.highlight .-Color[class*=-BGC183] { + background-color: #D7AFFF +} + +div.highlight .-Color[class*=-C184] { + color: #D7D700 +} + +div.highlight .-Color[class*=-BGC184] { + background-color: #D7D700 +} + +div.highlight .-Color[class*=-C185] { + color: #D7D75F +} + +div.highlight .-Color[class*=-BGC185] { + background-color: #D7D75F +} + +div.highlight .-Color[class*=-C186] { + color: #D7D787 +} + +div.highlight .-Color[class*=-BGC186] { + background-color: #D7D787 +} + +div.highlight .-Color[class*=-C187] { + color: #D7D7AF +} + +div.highlight .-Color[class*=-BGC187] { + background-color: #D7D7AF +} + +div.highlight .-Color[class*=-C188] { + color: #D7D7D7 +} + +div.highlight .-Color[class*=-BGC188] { + background-color: #D7D7D7 +} + +div.highlight .-Color[class*=-C189] { + color: #D7D7FF +} + +div.highlight .-Color[class*=-BGC189] { + background-color: #D7D7FF +} + +div.highlight .-Color[class*=-C190] { + color: #D7FF00 +} + +div.highlight .-Color[class*=-BGC190] { + background-color: #D7FF00 +} + +div.highlight .-Color[class*=-C191] { + color: #D7FF5F +} + +div.highlight .-Color[class*=-BGC191] { + background-color: #D7FF5F +} + +div.highlight .-Color[class*=-C192] { + color: #D7FF87 +} + +div.highlight .-Color[class*=-BGC192] { + background-color: #D7FF87 +} + +div.highlight .-Color[class*=-C193] { + color: #D7FFAF +} + +div.highlight .-Color[class*=-BGC193] { + background-color: #D7FFAF +} + +div.highlight .-Color[class*=-C194] { + color: #D7FFD7 +} + +div.highlight .-Color[class*=-BGC194] { + background-color: #D7FFD7 +} + +div.highlight .-Color[class*=-C195] { + color: #D7FFFF +} + +div.highlight .-Color[class*=-BGC195] { + background-color: #D7FFFF +} + +div.highlight .-Color[class*=-C196] { + color: #FF0000 +} + +div.highlight .-Color[class*=-BGC196] { + background-color: #FF0000 +} + +div.highlight .-Color[class*=-C197] { + color: #FF005F +} + +div.highlight .-Color[class*=-BGC197] { + background-color: #FF005F +} + +div.highlight .-Color[class*=-C198] { + color: #FF0087 +} + +div.highlight .-Color[class*=-BGC198] { + background-color: #FF0087 +} + +div.highlight .-Color[class*=-C199] { + color: #FF00AF +} + +div.highlight .-Color[class*=-BGC199] { + background-color: #FF00AF +} + +div.highlight .-Color[class*=-C200] { + color: #FF00D7 +} + +div.highlight .-Color[class*=-BGC200] { + background-color: #FF00D7 +} + +div.highlight .-Color[class*=-C201] { + color: #FF00FF +} + +div.highlight .-Color[class*=-BGC201] { + background-color: #FF00FF +} + +div.highlight .-Color[class*=-C202] { + color: #FF5F00 +} + +div.highlight .-Color[class*=-BGC202] { + background-color: #FF5F00 +} + +div.highlight .-Color[class*=-C203] { + color: #FF5F5F +} + +div.highlight .-Color[class*=-BGC203] { + background-color: #FF5F5F +} + +div.highlight .-Color[class*=-C204] { + color: #FF5F87 +} + +div.highlight .-Color[class*=-BGC204] { + background-color: #FF5F87 +} + +div.highlight .-Color[class*=-C205] { + color: #FF5FAF +} + +div.highlight .-Color[class*=-BGC205] { + background-color: #FF5FAF +} + +div.highlight .-Color[class*=-C206] { + color: #FF5FD7 +} + +div.highlight .-Color[class*=-BGC206] { + background-color: #FF5FD7 +} + +div.highlight .-Color[class*=-C207] { + color: #FF5FFF +} + +div.highlight .-Color[class*=-BGC207] { + background-color: #FF5FFF +} + +div.highlight .-Color[class*=-C208] { + color: #FF8700 +} + +div.highlight .-Color[class*=-BGC208] { + background-color: #FF8700 +} + +div.highlight .-Color[class*=-C209] { + color: #FF875F +} + +div.highlight .-Color[class*=-BGC209] { + background-color: #FF875F +} + +div.highlight .-Color[class*=-C210] { + color: #FF8787 +} + +div.highlight .-Color[class*=-BGC210] { + background-color: #FF8787 +} + +div.highlight .-Color[class*=-C211] { + color: #FF87AF +} + +div.highlight .-Color[class*=-BGC211] { + background-color: #FF87AF +} + +div.highlight .-Color[class*=-C212] { + color: #FF87D7 +} + +div.highlight .-Color[class*=-BGC212] { + background-color: #FF87D7 +} + +div.highlight .-Color[class*=-C213] { + color: #FF87FF +} + +div.highlight .-Color[class*=-BGC213] { + background-color: #FF87FF +} + +div.highlight .-Color[class*=-C214] { + color: #FFAF00 +} + +div.highlight .-Color[class*=-BGC214] { + background-color: #FFAF00 +} + +div.highlight .-Color[class*=-C215] { + color: #FFAF5F +} + +div.highlight .-Color[class*=-BGC215] { + background-color: #FFAF5F +} + +div.highlight .-Color[class*=-C216] { + color: #FFAF87 +} + +div.highlight .-Color[class*=-BGC216] { + background-color: #FFAF87 +} + +div.highlight .-Color[class*=-C217] { + color: #FFAFAF +} + +div.highlight .-Color[class*=-BGC217] { + background-color: #FFAFAF +} + +div.highlight .-Color[class*=-C218] { + color: #FFAFD7 +} + +div.highlight .-Color[class*=-BGC218] { + background-color: #FFAFD7 +} + +div.highlight .-Color[class*=-C219] { + color: #FFAFFF +} + +div.highlight .-Color[class*=-BGC219] { + background-color: #FFAFFF +} + +div.highlight .-Color[class*=-C220] { + color: #FFD700 +} + +div.highlight .-Color[class*=-BGC220] { + background-color: #FFD700 +} + +div.highlight .-Color[class*=-C221] { + color: #FFD75F +} + +div.highlight .-Color[class*=-BGC221] { + background-color: #FFD75F +} + +div.highlight .-Color[class*=-C222] { + color: #FFD787 +} + +div.highlight .-Color[class*=-BGC222] { + background-color: #FFD787 +} + +div.highlight .-Color[class*=-C223] { + color: #FFD7AF +} + +div.highlight .-Color[class*=-BGC223] { + background-color: #FFD7AF +} + +div.highlight .-Color[class*=-C224] { + color: #FFD7D7 +} + +div.highlight .-Color[class*=-BGC224] { + background-color: #FFD7D7 +} + +div.highlight .-Color[class*=-C225] { + color: #FFD7FF +} + +div.highlight .-Color[class*=-BGC225] { + background-color: #FFD7FF +} + +div.highlight .-Color[class*=-C226] { + color: #FFFF00 +} + +div.highlight .-Color[class*=-BGC226] { + background-color: #FFFF00 +} + +div.highlight .-Color[class*=-C227] { + color: #FFFF5F +} + +div.highlight .-Color[class*=-BGC227] { + background-color: #FFFF5F +} + +div.highlight .-Color[class*=-C228] { + color: #FFFF87 +} + +div.highlight .-Color[class*=-BGC228] { + background-color: #FFFF87 +} + +div.highlight .-Color[class*=-C229] { + color: #FFFFAF +} + +div.highlight .-Color[class*=-BGC229] { + background-color: #FFFFAF +} + +div.highlight .-Color[class*=-C230] { + color: #FFFFD7 +} + +div.highlight .-Color[class*=-BGC230] { + background-color: #FFFFD7 +} + +div.highlight .-Color[class*=-C231] { + color: #FFFFFF +} + +div.highlight .-Color[class*=-BGC231] { + background-color: #FFFFFF +} + +div.highlight .-Color[class*=-C232] { + color: #080808 +} + +div.highlight .-Color[class*=-BGC232] { + background-color: #080808 +} + +div.highlight .-Color[class*=-C233] { + color: #121212 +} + +div.highlight .-Color[class*=-BGC233] { + background-color: #121212 +} + +div.highlight .-Color[class*=-C234] { + color: #1C1C1C +} + +div.highlight .-Color[class*=-BGC234] { + background-color: #1C1C1C +} + +div.highlight .-Color[class*=-C235] { + color: #262626 +} + +div.highlight .-Color[class*=-BGC235] { + background-color: #262626 +} + +div.highlight .-Color[class*=-C236] { + color: #303030 +} + +div.highlight .-Color[class*=-BGC236] { + background-color: #303030 +} + +div.highlight .-Color[class*=-C237] { + color: #3A3A3A +} + +div.highlight .-Color[class*=-BGC237] { + background-color: #3A3A3A +} + +div.highlight .-Color[class*=-C238] { + color: #444444 +} + +div.highlight .-Color[class*=-BGC238] { + background-color: #444444 +} + +div.highlight .-Color[class*=-C239] { + color: #4E4E4E +} + +div.highlight .-Color[class*=-BGC239] { + background-color: #4E4E4E +} + +div.highlight .-Color[class*=-C240] { + color: #585858 +} + +div.highlight .-Color[class*=-BGC240] { + background-color: #585858 +} + +div.highlight .-Color[class*=-C241] { + color: #626262 +} + +div.highlight .-Color[class*=-BGC241] { + background-color: #626262 +} + +div.highlight .-Color[class*=-C242] { + color: #6C6C6C +} + +div.highlight .-Color[class*=-BGC242] { + background-color: #6C6C6C +} + +div.highlight .-Color[class*=-C243] { + color: #767676 +} + +div.highlight .-Color[class*=-BGC243] { + background-color: #767676 +} + +div.highlight .-Color[class*=-C244] { + color: #808080 +} + +div.highlight .-Color[class*=-BGC244] { + background-color: #808080 +} + +div.highlight .-Color[class*=-C245] { + color: #8A8A8A +} + +div.highlight .-Color[class*=-BGC245] { + background-color: #8A8A8A +} + +div.highlight .-Color[class*=-C246] { + color: #949494 +} + +div.highlight .-Color[class*=-BGC246] { + background-color: #949494 +} + +div.highlight .-Color[class*=-C247] { + color: #9E9E9E +} + +div.highlight .-Color[class*=-BGC247] { + background-color: #9E9E9E +} + +div.highlight .-Color[class*=-C248] { + color: #A8A8A8 +} + +div.highlight .-Color[class*=-BGC248] { + background-color: #A8A8A8 +} + +div.highlight .-Color[class*=-C249] { + color: #B2B2B2 +} + +div.highlight .-Color[class*=-BGC249] { + background-color: #B2B2B2 +} + +div.highlight .-Color[class*=-C250] { + color: #BCBCBC +} + +div.highlight .-Color[class*=-BGC250] { + background-color: #BCBCBC +} + +div.highlight .-Color[class*=-C251] { + color: #C6C6C6 +} + +div.highlight .-Color[class*=-BGC251] { + background-color: #C6C6C6 +} + +div.highlight .-Color[class*=-C252] { + color: #D0D0D0 +} + +div.highlight .-Color[class*=-BGC252] { + background-color: #D0D0D0 +} + +div.highlight .-Color[class*=-C253] { + color: #DADADA +} + +div.highlight .-Color[class*=-BGC253] { + background-color: #DADADA +} + +div.highlight .-Color[class*=-C254] { + color: #E4E4E4 +} + +div.highlight .-Color[class*=-BGC254] { + background-color: #E4E4E4 +} + +div.highlight .-Color[class*=-C255] { + color: #EEEEEE +} + +div.highlight .-Color[class*=-BGC255] { + background-color: #EEEEEE +} diff --git a/v0.14.0/_static/no_image.png b/v0.14.0/_static/no_image.png new file mode 100644 index 00000000000..8c2d48d5d3f Binary files /dev/null and b/v0.14.0/_static/no_image.png differ diff --git a/v0.14.0/_static/plus.png b/v0.14.0/_static/plus.png new file mode 100644 index 00000000000..7107cec93a9 Binary files /dev/null and b/v0.14.0/_static/plus.png differ diff --git a/v0.14.0/_static/pygments.css b/v0.14.0/_static/pygments.css new file mode 100644 index 00000000000..84ab3030a93 --- /dev/null +++ b/v0.14.0/_static/pygments.css @@ -0,0 +1,75 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #008000; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #9C6500 } /* Comment.Preproc */ +.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.highlight .gr { color: #E40000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #008400 } /* Generic.Inserted */ +.highlight .go { color: #717171 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #008000 } /* Keyword.Pseudo */ +.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #B00040 } /* Keyword.Type */ +.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .s { color: #BA2121 } /* Literal.String */ +.highlight .na { color: #687822 } /* Name.Attribute */ +.highlight .nb { color: #008000 } /* Name.Builtin */ +.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.highlight .no { color: #880000 } /* Name.Constant */ +.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0000FF } /* Name.Function */ +.highlight .nl { color: #767600 } /* Name.Label */ +.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #19177C } /* Name.Variable */ +.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #666666 } /* Literal.Number.Bin */ +.highlight .mf { color: #666666 } /* Literal.Number.Float */ +.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .sa { color: #BA2121 } /* Literal.String.Affix */ +.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ +.highlight .sc { color: #BA2121 } /* Literal.String.Char */ +.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ +.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ +.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #A45A77 } /* Literal.String.Regex */ +.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ +.highlight .ss { color: #19177C } /* Literal.String.Symbol */ +.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0000FF } /* Name.Function.Magic */ +.highlight .vc { color: #19177C } /* Name.Variable.Class */ +.highlight .vg { color: #19177C } /* Name.Variable.Global */ +.highlight .vi { color: #19177C } /* Name.Variable.Instance */ +.highlight .vm { color: #19177C } /* Name.Variable.Magic */ +.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/v0.14.0/_static/scipy2017-youtube-thumbnail.png b/v0.14.0/_static/scipy2017-youtube-thumbnail.png new file mode 100644 index 00000000000..adf37ef9819 Binary files /dev/null and b/v0.14.0/_static/scipy2017-youtube-thumbnail.png differ diff --git a/v0.14.0/_static/scipy2018-youtube-thumbnail.png b/v0.14.0/_static/scipy2018-youtube-thumbnail.png new file mode 100644 index 00000000000..7e331663ae6 Binary files /dev/null and b/v0.14.0/_static/scipy2018-youtube-thumbnail.png differ diff --git a/v0.14.0/_static/scipy2022-youtube-thumbnail.jpg b/v0.14.0/_static/scipy2022-youtube-thumbnail.jpg new file mode 100644 index 00000000000..3570f3250cc Binary files /dev/null and b/v0.14.0/_static/scipy2022-youtube-thumbnail.jpg differ diff --git a/v0.14.0/_static/searchtools.js b/v0.14.0/_static/searchtools.js new file mode 100644 index 00000000000..92da3f8b22c --- /dev/null +++ b/v0.14.0/_static/searchtools.js @@ -0,0 +1,619 @@ +/* + * searchtools.js + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for the full-text search. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _displayItem = (item, searchTerms, highlightTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; + + const [docName, title, anchor, descr, score, _filename] = item; + + let listItem = document.createElement("li"); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = contentRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = contentRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = title; + if (descr) { + listItem.appendChild(document.createElement("span")).innerHTML = + " (" + descr + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms, anchor) + ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." + ); + else + Search.status.innerText = _( + "Search finished, found ${resultCount} page(s) matching the search query." + ).replace('${resultCount}', resultCount); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms, + highlightTerms, +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms, highlightTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), + 5 + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; +// Helper function used by query() to order search results. +// Each input is an array of [docname, title, anchor, descr, score, filename]. +// Order the results by score (in opposite order of appearance, since the +// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. +const _orderResultsByScoreThenName = (a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter(term => term) // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString, anchor) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + for (const removalQuery of [".headerlinks", "script", "style"]) { + htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); + } + if (anchor) { + const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); + if (anchorContent) return anchorContent.textContent; + + console.warn( + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` + ); + } + + // if anchor not specified or not found, fall back to main content + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent) return docContent.textContent; + + console.warn( + "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + _parseQuery: (query) => { + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords array is from language_data.js + if ( + stopwords.indexOf(queryTermLower) !== -1 || + queryTerm.match(/^\d+$/) + ) + return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; + }, + + /** + * execute search (requires search index to be loaded) + */ + _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // Collect multiple result groups to be sorted separately and then ordered. + // Each is an array of [docname, title, anchor, descr, score, filename]. + const normalResults = []; + const nonMainIndexResults = []; + + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase().trim(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + let score = Math.round(100 * queryLower.length / title.length) + normalResults.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id, isMain] of foundEntries) { + const score = Math.round(100 * queryLower.length / entry.length); + const result = [ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + ]; + if (isMain) { + normalResults.push(result); + } else { + nonMainIndexResults.push(result); + } + } + } + } + + // lookup as object + objectTerms.forEach((term) => + normalResults.push(...Search.performObjectSearch(term, objectTerms)) + ); + + // lookup as search terms in fulltext + normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) { + normalResults.forEach((item) => (item[4] = Scorer.score(item))); + nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); + } + + // Sort each group of results by score and then alphabetically by name. + normalResults.sort(_orderResultsByScoreThenName); + nonMainIndexResults.sort(_orderResultsByScoreThenName); + + // Combine the result groups in (reverse) order. + // Non-main index entries are typically arbitrary cross-references, + // so display them after other results. + let results = [...nonMainIndexResults, ...normalResults]; + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + return results.reverse(); + }, + + query: (query) => { + const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); + const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms, highlightTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4] + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => + objectSearchCallback(prefix, array) + ) + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + const arr = [ + { files: terms[word], score: Scorer.term }, + { files: titleTerms[word], score: Scorer.title }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + if (!terms.hasOwnProperty(word)) { + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + } + if (!titleTerms.hasOwnProperty(word)) { + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); + }); + } + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, {}); + scoreMap.get(file)[word] = record.score; + }); + }); + + // create the mapping + files.forEach((file) => { + if (!fileMap.has(file)) fileMap.set(file, [word]); + else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2 + ).length; + if ( + wordList.length !== searchTerms.size && + wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file || + titleTerms[term] === file || + (terms[term] || []).includes(file) || + (titleTerms[term] || []).includes(file) + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords, anchor) => { + const text = Search.htmlToText(htmlText, anchor); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/v0.14.0/_static/sg_gallery-binder.css b/v0.14.0/_static/sg_gallery-binder.css new file mode 100644 index 00000000000..420005d2270 --- /dev/null +++ b/v0.14.0/_static/sg_gallery-binder.css @@ -0,0 +1,11 @@ +/* CSS for binder integration */ + +div.binder-badge { + margin: 1em auto; + vertical-align: middle; +} + +div.lite-badge { + margin: 1em auto; + vertical-align: middle; +} diff --git a/v0.14.0/_static/sg_gallery-dataframe.css b/v0.14.0/_static/sg_gallery-dataframe.css new file mode 100644 index 00000000000..fac74c43b7c --- /dev/null +++ b/v0.14.0/_static/sg_gallery-dataframe.css @@ -0,0 +1,47 @@ +/* Pandas dataframe css */ +/* Taken from: https://github.com/spatialaudio/nbsphinx/blob/fb3ba670fc1ba5f54d4c487573dbc1b4ecf7e9ff/src/nbsphinx.py#L587-L619 */ +html[data-theme="light"] { + --sg-text-color: #000; + --sg-tr-odd-color: #f5f5f5; + --sg-tr-hover-color: rgba(66, 165, 245, 0.2); +} +html[data-theme="dark"] { + --sg-text-color: #fff; + --sg-tr-odd-color: #373737; + --sg-tr-hover-color: rgba(30, 81, 122, 0.2); +} + +table.dataframe { + border: none !important; + border-collapse: collapse; + border-spacing: 0; + border-color: transparent; + color: var(--sg-text-color); + font-size: 12px; + table-layout: fixed; + width: auto; +} +table.dataframe thead { + border-bottom: 1px solid var(--sg-text-color); + vertical-align: bottom; +} +table.dataframe tr, +table.dataframe th, +table.dataframe td { + text-align: right; + vertical-align: middle; + padding: 0.5em 0.5em; + line-height: normal; + white-space: normal; + max-width: none; + border: none; +} +table.dataframe th { + font-weight: bold; +} +table.dataframe tbody tr:nth-child(odd) { + background: var(--sg-tr-odd-color); +} +table.dataframe tbody tr:hover { + background: var(--sg-tr-hover-color); +} diff --git a/v0.14.0/_static/sg_gallery-rendered-html.css b/v0.14.0/_static/sg_gallery-rendered-html.css new file mode 100644 index 00000000000..93dc2ffb024 --- /dev/null +++ b/v0.14.0/_static/sg_gallery-rendered-html.css @@ -0,0 +1,224 @@ +/* Adapted from notebook/static/style/style.min.css */ +html[data-theme="light"] { + --sg-text-color: #000; + --sg-background-color: #ffffff; + --sg-code-background-color: #eff0f1; + --sg-tr-hover-color: rgba(66, 165, 245, 0.2); + --sg-tr-odd-color: #f5f5f5; +} +html[data-theme="dark"] { + --sg-text-color: #fff; + --sg-background-color: #121212; + --sg-code-background-color: #2f2f30; + --sg-tr-hover-color: rgba(66, 165, 245, 0.2); + --sg-tr-odd-color: #1f1f1f; +} + +.rendered_html { + color: var(--sg-text-color); + /* any extras will just be numbers: */ +} +.rendered_html em { + font-style: italic; +} +.rendered_html strong { + font-weight: bold; +} +.rendered_html u { + text-decoration: underline; +} +.rendered_html :link { + text-decoration: underline; +} +.rendered_html :visited { + text-decoration: underline; +} +.rendered_html h1 { + font-size: 185.7%; + margin: 1.08em 0 0 0; + font-weight: bold; + line-height: 1.0; +} +.rendered_html h2 { + font-size: 157.1%; + margin: 1.27em 0 0 0; + font-weight: bold; + line-height: 1.0; +} +.rendered_html h3 { + font-size: 128.6%; + margin: 1.55em 0 0 0; + font-weight: bold; + line-height: 1.0; +} +.rendered_html h4 { + font-size: 100%; + margin: 2em 0 0 0; + font-weight: bold; + line-height: 1.0; +} +.rendered_html h5 { + font-size: 100%; + margin: 2em 0 0 0; + font-weight: bold; + line-height: 1.0; + font-style: italic; +} +.rendered_html h6 { + font-size: 100%; + margin: 2em 0 0 0; + font-weight: bold; + line-height: 1.0; + font-style: italic; +} +.rendered_html h1:first-child { + margin-top: 0.538em; +} +.rendered_html h2:first-child { + margin-top: 0.636em; +} +.rendered_html h3:first-child { + margin-top: 0.777em; +} +.rendered_html h4:first-child { + margin-top: 1em; +} +.rendered_html h5:first-child { + margin-top: 1em; +} +.rendered_html h6:first-child { + margin-top: 1em; +} +.rendered_html ul:not(.list-inline), +.rendered_html ol:not(.list-inline) { + padding-left: 2em; +} +.rendered_html ul { + list-style: disc; +} +.rendered_html ul ul { + list-style: square; + margin-top: 0; +} +.rendered_html ul ul ul { + list-style: circle; +} +.rendered_html ol { + list-style: decimal; +} +.rendered_html ol ol { + list-style: upper-alpha; + margin-top: 0; +} +.rendered_html ol ol ol { + list-style: lower-alpha; +} +.rendered_html ol ol ol ol { + list-style: lower-roman; +} +.rendered_html ol ol ol ol ol { + list-style: decimal; +} +.rendered_html * + ul { + margin-top: 1em; +} +.rendered_html * + ol { + margin-top: 1em; +} +.rendered_html hr { + color: var(--sg-text-color); + background-color: var(--sg-text-color); +} +.rendered_html pre { + margin: 1em 2em; + padding: 0px; + background-color: var(--sg-background-color); +} +.rendered_html code { + background-color: var(--sg-code-background-color); +} +.rendered_html p code { + padding: 1px 5px; +} +.rendered_html pre code { + background-color: var(--sg-background-color); +} +.rendered_html pre, +.rendered_html code { + border: 0; + color: var(--sg-text-color); + font-size: 100%; +} +.rendered_html blockquote { + margin: 1em 2em; +} +.rendered_html table { + margin-left: auto; + margin-right: auto; + border: none; + border-collapse: collapse; + border-spacing: 0; + color: var(--sg-text-color); + font-size: 12px; + table-layout: fixed; +} +.rendered_html thead { + border-bottom: 1px solid var(--sg-text-color); + vertical-align: bottom; +} +.rendered_html tr, +.rendered_html th, +.rendered_html td { + text-align: right; + vertical-align: middle; + padding: 0.5em 0.5em; + line-height: normal; + white-space: normal; + max-width: none; + border: none; +} +.rendered_html th { + font-weight: bold; +} +.rendered_html tbody tr:nth-child(odd) { + background: var(--sg-tr-odd-color); +} +.rendered_html tbody tr:hover { + color: var(--sg-text-color); + background: var(--sg-tr-hover-color); +} +.rendered_html * + table { + margin-top: 1em; +} +.rendered_html p { + text-align: left; +} +.rendered_html * + p { + margin-top: 1em; +} +.rendered_html img { + display: block; + margin-left: auto; + margin-right: auto; +} +.rendered_html * + img { + margin-top: 1em; +} +.rendered_html img, +.rendered_html svg { + max-width: 100%; + height: auto; +} +.rendered_html img.unconfined, +.rendered_html svg.unconfined { + max-width: none; +} +.rendered_html .alert { + margin-bottom: initial; +} +.rendered_html * + .alert { + margin-top: 1em; +} +[dir="rtl"] .rendered_html p { + text-align: right; +} diff --git a/v0.14.0/_static/sg_gallery.css b/v0.14.0/_static/sg_gallery.css new file mode 100644 index 00000000000..9bcd33c8a61 --- /dev/null +++ b/v0.14.0/_static/sg_gallery.css @@ -0,0 +1,367 @@ +/* +Sphinx-Gallery has compatible CSS to fix default sphinx themes +Tested for Sphinx 1.3.1 for all themes: default, alabaster, sphinxdoc, +scrolls, agogo, traditional, nature, haiku, pyramid +Tested for Read the Docs theme 0.1.7 */ + +/* Define light colors */ +:root, html[data-theme="light"], body[data-theme="light"]{ + --sg-tooltip-foreground: black; + --sg-tooltip-background: rgba(250, 250, 250, 0.9); + --sg-tooltip-border: #ccc transparent; + --sg-thumb-box-shadow-color: #6c757d40; + --sg-thumb-hover-border: #0069d9; + --sg-script-out: #888; + --sg-script-pre: #fafae2; + --sg-pytb-foreground: #000; + --sg-pytb-background: #ffe4e4; + --sg-pytb-border-color: #f66; + --sg-download-a-background-color: #ffc; + --sg-download-a-background-image: linear-gradient(to bottom, #ffc, #d5d57e); + --sg-download-a-border-color: 1px solid #c2c22d; + --sg-download-a-color: #000; + --sg-download-a-hover-background-color: #d5d57e; + --sg-download-a-hover-box-shadow-1: rgba(255, 255, 255, 0.1); + --sg-download-a-hover-box-shadow-2: rgba(0, 0, 0, 0.25); +} +@media(prefers-color-scheme: light) { + :root[data-theme="auto"], html[data-theme="auto"], body[data-theme="auto"] { + --sg-tooltip-foreground: black; + --sg-tooltip-background: rgba(250, 250, 250, 0.9); + --sg-tooltip-border: #ccc transparent; + --sg-thumb-box-shadow-color: #6c757d40; + --sg-thumb-hover-border: #0069d9; + --sg-script-out: #888; + --sg-script-pre: #fafae2; + --sg-pytb-foreground: #000; + --sg-pytb-background: #ffe4e4; + --sg-pytb-border-color: #f66; + --sg-download-a-background-color: #ffc; + --sg-download-a-background-image: linear-gradient(to bottom, #ffc, #d5d57e); + --sg-download-a-border-color: 1px solid #c2c22d; + --sg-download-a-color: #000; + --sg-download-a-hover-background-color: #d5d57e; + --sg-download-a-hover-box-shadow-1: rgba(255, 255, 255, 0.1); + --sg-download-a-hover-box-shadow-2: rgba(0, 0, 0, 0.25); + } +} + +html[data-theme="dark"], body[data-theme="dark"] { + --sg-tooltip-foreground: white; + --sg-tooltip-background: rgba(10, 10, 10, 0.9); + --sg-tooltip-border: #333 transparent; + --sg-thumb-box-shadow-color: #79848d40; + --sg-thumb-hover-border: #003975; + --sg-script-out: rgb(179, 179, 179); + --sg-script-pre: #2e2e22; + --sg-pytb-foreground: #fff; + --sg-pytb-background: #1b1717; + --sg-pytb-border-color: #622; + --sg-download-a-background-color: #443; + --sg-download-a-background-image: linear-gradient(to bottom, #443, #221); + --sg-download-a-border-color: 1px solid #3a3a0d; + --sg-download-a-color: #fff; + --sg-download-a-hover-background-color: #616135; + --sg-download-a-hover-box-shadow-1: rgba(0, 0, 0, 0.1); + --sg-download-a-hover-box-shadow-2: rgba(255, 255, 255, 0.25); +} +@media(prefers-color-scheme: dark){ + html[data-theme="auto"], body[data-theme="auto"] { + --sg-tooltip-foreground: white; + --sg-tooltip-background: rgba(10, 10, 10, 0.9); + --sg-tooltip-border: #333 transparent; + --sg-thumb-box-shadow-color: #79848d40; + --sg-thumb-hover-border: #003975; + --sg-script-out: rgb(179, 179, 179); + --sg-script-pre: #2e2e22; + --sg-pytb-foreground: #fff; + --sg-pytb-background: #1b1717; + --sg-pytb-border-color: #622; + --sg-download-a-background-color: #443; + --sg-download-a-background-image: linear-gradient(to bottom, #443, #221); + --sg-download-a-border-color: 1px solid #3a3a0d; + --sg-download-a-color: #fff; + --sg-download-a-hover-background-color: #616135; + --sg-download-a-hover-box-shadow-1: rgba(0, 0, 0, 0.1); + --sg-download-a-hover-box-shadow-2: rgba(255, 255, 255, 0.25); + } +} + +.sphx-glr-thumbnails { + width: 100%; + margin: 0px 0px 20px 0px; + + /* align thumbnails on a grid */ + justify-content: space-between; + display: grid; + /* each grid column should be at least 160px (this will determine + the actual number of columns) and then take as much of the + remaining width as possible */ + grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); + gap: 15px; +} +.sphx-glr-thumbnails .toctree-wrapper { + /* hide empty toctree divs added to the DOM + by sphinx even though the toctree is hidden + (they would fill grid places with empty divs) */ + display: none; +} +.sphx-glr-thumbcontainer { + background: transparent; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + box-shadow: 0 0 10px var(--sg-thumb-box-shadow-color); + + /* useful to absolutely position link in div */ + position: relative; + + /* thumbnail width should include padding and borders + and take all available space */ + box-sizing: border-box; + width: 100%; + padding: 10px; + border: 1px solid transparent; + + /* align content in thumbnail */ + display: flex; + flex-direction: column; + align-items: center; + gap: 7px; +} +.sphx-glr-thumbcontainer p { + position: absolute; + top: 0; + left: 0; +} +.sphx-glr-thumbcontainer p, +.sphx-glr-thumbcontainer p a { + /* link should cover the whole thumbnail div */ + width: 100%; + height: 100%; +} +.sphx-glr-thumbcontainer p a span { + /* text within link should be masked + (we are just interested in the href) */ + display: none; +} +.sphx-glr-thumbcontainer:hover { + border: 1px solid; + border-color: var(--sg-thumb-hover-border); + cursor: pointer; +} +.sphx-glr-thumbcontainer a.internal { + bottom: 0; + display: block; + left: 0; + box-sizing: border-box; + padding: 150px 10px 0; + position: absolute; + right: 0; + top: 0; +} +/* Next one is to avoid Sphinx traditional theme to cover all the +thumbnail with its default link Background color */ +.sphx-glr-thumbcontainer a.internal:hover { + background-color: transparent; +} + +.sphx-glr-thumbcontainer p { + margin: 0 0 0.1em 0; +} +.sphx-glr-thumbcontainer .figure { + margin: 10px; + width: 160px; +} +.sphx-glr-thumbcontainer img { + display: inline; + max-height: 112px; + max-width: 160px; +} + +.sphx-glr-thumbcontainer[tooltip]::before { + content: ""; + position: absolute; + pointer-events: none; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 97; + background-color: var(--sg-tooltip-background); + backdrop-filter: blur(3px); + opacity: 0; + transition: opacity 0.3s; +} + +.sphx-glr-thumbcontainer[tooltip]:hover::before { + opacity: 1; +} + +.sphx-glr-thumbcontainer[tooltip]:hover::after { + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + color: var(--sg-tooltip-foreground); + content: attr(tooltip); + padding: 10px 10px 5px; + z-index: 98; + width: 100%; + max-height: 100%; + position: absolute; + pointer-events: none; + top: 0; + box-sizing: border-box; + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 6; +} + +.sphx-glr-script-out { + color: var(--sg-script-out); + display: flex; + gap: 0.5em; +} +.sphx-glr-script-out::before { + content: "Out:"; + /* These numbers come from the pre style in the pydata sphinx theme. This + * turns out to match perfectly on the rtd theme, but be a bit too low for + * the pydata sphinx theme. As I could not find a dimension to use that was + * scaled the same way, I just picked one option that worked pretty close for + * both. */ + line-height: 1.4; + padding-top: 10px; +} +.sphx-glr-script-out .highlight { + background-color: transparent; + /* These options make the div expand... */ + flex-grow: 1; + /* ... but also keep it from overflowing its flex container. */ + overflow: auto; +} +.sphx-glr-script-out .highlight pre { + background-color: var(--sg-script-pre); + border: 0; + max-height: 30em; + overflow: auto; + padding-left: 1ex; + /* This margin is necessary in the pydata sphinx theme because pre has a box + * shadow which would be clipped by the overflow:auto in the parent div + * above. */ + margin: 2px; + word-break: break-word; +} +.sphx-glr-script-out + p { + margin-top: 1.8em; +} +blockquote.sphx-glr-script-out { + margin-left: 0pt; +} +.sphx-glr-script-out.highlight-pytb .highlight pre { + color: var(--sg-pytb-foreground); + background-color: var(--sg-pytb-background); + border: 1px solid var(--sg-pytb-border-color); + margin-top: 10px; + padding: 7px; +} + +div.sphx-glr-footer { + text-align: center; +} + +div.sphx-glr-download { + margin: 1em auto; + vertical-align: middle; +} + +div.sphx-glr-download a { + background-color: var(--sg-download-a-background-color); + background-image: var(--sg-download-a-background-image); + border-radius: 4px; + border: 1px solid var(--sg-download-a-border-color); + color: var(--sg-download-a-color); + display: inline-block; + font-weight: bold; + padding: 1ex; + text-align: center; +} + +div.sphx-glr-download code.download { + display: inline-block; + white-space: normal; + word-break: normal; + overflow-wrap: break-word; + /* border and background are given by the enclosing 'a' */ + border: none; + background: none; +} + +div.sphx-glr-download a:hover { + box-shadow: inset 0 1px 0 var(--sg-download-a-hover-box-shadow-1), 0 1px 5px var(--sg-download-a-hover-box-shadow-2); + text-decoration: none; + background-image: none; + background-color: var(--sg-download-a-hover-background-color); +} + +div.sphx-glr-sidebar-item img { + max-height: 20px; +} + +.sphx-glr-example-title:target::before { + display: block; + content: ""; + margin-top: -50px; + height: 50px; + visibility: hidden; +} + +ul.sphx-glr-horizontal { + list-style: none; + padding: 0; +} +ul.sphx-glr-horizontal li { + display: inline; +} +ul.sphx-glr-horizontal img { + height: auto !important; +} + +.sphx-glr-single-img { + margin: auto; + display: block; + max-width: 100%; +} + +.sphx-glr-multi-img { + max-width: 42%; + height: auto; +} + +div.sphx-glr-animation { + margin: auto; + display: block; + max-width: 100%; +} +div.sphx-glr-animation .animation { + display: block; +} + +p.sphx-glr-signature a.reference.external { + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + padding: 3px; + font-size: 75%; + text-align: right; + margin-left: auto; + display: table; +} + +.sphx-glr-clear { + clear: both; +} + +a.sphx-glr-backref-instance { + text-decoration: none; +} diff --git a/v0.14.0/_static/sphinx-design.min.css b/v0.14.0/_static/sphinx-design.min.css new file mode 100644 index 00000000000..860c36da0fa --- /dev/null +++ b/v0.14.0/_static/sphinx-design.min.css @@ -0,0 +1 @@ +.sd-bg-primary{background-color:var(--sd-color-primary) !important}.sd-bg-text-primary{color:var(--sd-color-primary-text) !important}button.sd-bg-primary:focus,button.sd-bg-primary:hover{background-color:var(--sd-color-primary-highlight) !important}a.sd-bg-primary:focus,a.sd-bg-primary:hover{background-color:var(--sd-color-primary-highlight) !important}.sd-bg-secondary{background-color:var(--sd-color-secondary) !important}.sd-bg-text-secondary{color:var(--sd-color-secondary-text) !important}button.sd-bg-secondary:focus,button.sd-bg-secondary:hover{background-color:var(--sd-color-secondary-highlight) !important}a.sd-bg-secondary:focus,a.sd-bg-secondary:hover{background-color:var(--sd-color-secondary-highlight) !important}.sd-bg-success{background-color:var(--sd-color-success) !important}.sd-bg-text-success{color:var(--sd-color-success-text) !important}button.sd-bg-success:focus,button.sd-bg-success:hover{background-color:var(--sd-color-success-highlight) !important}a.sd-bg-success:focus,a.sd-bg-success:hover{background-color:var(--sd-color-success-highlight) !important}.sd-bg-info{background-color:var(--sd-color-info) !important}.sd-bg-text-info{color:var(--sd-color-info-text) !important}button.sd-bg-info:focus,button.sd-bg-info:hover{background-color:var(--sd-color-info-highlight) !important}a.sd-bg-info:focus,a.sd-bg-info:hover{background-color:var(--sd-color-info-highlight) !important}.sd-bg-warning{background-color:var(--sd-color-warning) !important}.sd-bg-text-warning{color:var(--sd-color-warning-text) !important}button.sd-bg-warning:focus,button.sd-bg-warning:hover{background-color:var(--sd-color-warning-highlight) !important}a.sd-bg-warning:focus,a.sd-bg-warning:hover{background-color:var(--sd-color-warning-highlight) !important}.sd-bg-danger{background-color:var(--sd-color-danger) !important}.sd-bg-text-danger{color:var(--sd-color-danger-text) !important}button.sd-bg-danger:focus,button.sd-bg-danger:hover{background-color:var(--sd-color-danger-highlight) !important}a.sd-bg-danger:focus,a.sd-bg-danger:hover{background-color:var(--sd-color-danger-highlight) !important}.sd-bg-light{background-color:var(--sd-color-light) !important}.sd-bg-text-light{color:var(--sd-color-light-text) !important}button.sd-bg-light:focus,button.sd-bg-light:hover{background-color:var(--sd-color-light-highlight) !important}a.sd-bg-light:focus,a.sd-bg-light:hover{background-color:var(--sd-color-light-highlight) !important}.sd-bg-muted{background-color:var(--sd-color-muted) !important}.sd-bg-text-muted{color:var(--sd-color-muted-text) !important}button.sd-bg-muted:focus,button.sd-bg-muted:hover{background-color:var(--sd-color-muted-highlight) !important}a.sd-bg-muted:focus,a.sd-bg-muted:hover{background-color:var(--sd-color-muted-highlight) !important}.sd-bg-dark{background-color:var(--sd-color-dark) !important}.sd-bg-text-dark{color:var(--sd-color-dark-text) !important}button.sd-bg-dark:focus,button.sd-bg-dark:hover{background-color:var(--sd-color-dark-highlight) !important}a.sd-bg-dark:focus,a.sd-bg-dark:hover{background-color:var(--sd-color-dark-highlight) !important}.sd-bg-black{background-color:var(--sd-color-black) !important}.sd-bg-text-black{color:var(--sd-color-black-text) !important}button.sd-bg-black:focus,button.sd-bg-black:hover{background-color:var(--sd-color-black-highlight) !important}a.sd-bg-black:focus,a.sd-bg-black:hover{background-color:var(--sd-color-black-highlight) !important}.sd-bg-white{background-color:var(--sd-color-white) !important}.sd-bg-text-white{color:var(--sd-color-white-text) !important}button.sd-bg-white:focus,button.sd-bg-white:hover{background-color:var(--sd-color-white-highlight) !important}a.sd-bg-white:focus,a.sd-bg-white:hover{background-color:var(--sd-color-white-highlight) !important}.sd-text-primary,.sd-text-primary>p{color:var(--sd-color-primary) !important}a.sd-text-primary:focus,a.sd-text-primary:hover{color:var(--sd-color-primary-highlight) !important}.sd-text-secondary,.sd-text-secondary>p{color:var(--sd-color-secondary) !important}a.sd-text-secondary:focus,a.sd-text-secondary:hover{color:var(--sd-color-secondary-highlight) !important}.sd-text-success,.sd-text-success>p{color:var(--sd-color-success) !important}a.sd-text-success:focus,a.sd-text-success:hover{color:var(--sd-color-success-highlight) !important}.sd-text-info,.sd-text-info>p{color:var(--sd-color-info) !important}a.sd-text-info:focus,a.sd-text-info:hover{color:var(--sd-color-info-highlight) !important}.sd-text-warning,.sd-text-warning>p{color:var(--sd-color-warning) !important}a.sd-text-warning:focus,a.sd-text-warning:hover{color:var(--sd-color-warning-highlight) !important}.sd-text-danger,.sd-text-danger>p{color:var(--sd-color-danger) !important}a.sd-text-danger:focus,a.sd-text-danger:hover{color:var(--sd-color-danger-highlight) !important}.sd-text-light,.sd-text-light>p{color:var(--sd-color-light) !important}a.sd-text-light:focus,a.sd-text-light:hover{color:var(--sd-color-light-highlight) !important}.sd-text-muted,.sd-text-muted>p{color:var(--sd-color-muted) !important}a.sd-text-muted:focus,a.sd-text-muted:hover{color:var(--sd-color-muted-highlight) !important}.sd-text-dark,.sd-text-dark>p{color:var(--sd-color-dark) !important}a.sd-text-dark:focus,a.sd-text-dark:hover{color:var(--sd-color-dark-highlight) !important}.sd-text-black,.sd-text-black>p{color:var(--sd-color-black) !important}a.sd-text-black:focus,a.sd-text-black:hover{color:var(--sd-color-black-highlight) !important}.sd-text-white,.sd-text-white>p{color:var(--sd-color-white) !important}a.sd-text-white:focus,a.sd-text-white:hover{color:var(--sd-color-white-highlight) !important}.sd-outline-primary{border-color:var(--sd-color-primary) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-primary:focus,a.sd-outline-primary:hover{border-color:var(--sd-color-primary-highlight) !important}.sd-outline-secondary{border-color:var(--sd-color-secondary) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-secondary:focus,a.sd-outline-secondary:hover{border-color:var(--sd-color-secondary-highlight) !important}.sd-outline-success{border-color:var(--sd-color-success) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-success:focus,a.sd-outline-success:hover{border-color:var(--sd-color-success-highlight) !important}.sd-outline-info{border-color:var(--sd-color-info) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-info:focus,a.sd-outline-info:hover{border-color:var(--sd-color-info-highlight) !important}.sd-outline-warning{border-color:var(--sd-color-warning) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-warning:focus,a.sd-outline-warning:hover{border-color:var(--sd-color-warning-highlight) !important}.sd-outline-danger{border-color:var(--sd-color-danger) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-danger:focus,a.sd-outline-danger:hover{border-color:var(--sd-color-danger-highlight) !important}.sd-outline-light{border-color:var(--sd-color-light) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-light:focus,a.sd-outline-light:hover{border-color:var(--sd-color-light-highlight) !important}.sd-outline-muted{border-color:var(--sd-color-muted) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-muted:focus,a.sd-outline-muted:hover{border-color:var(--sd-color-muted-highlight) !important}.sd-outline-dark{border-color:var(--sd-color-dark) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-dark:focus,a.sd-outline-dark:hover{border-color:var(--sd-color-dark-highlight) !important}.sd-outline-black{border-color:var(--sd-color-black) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-black:focus,a.sd-outline-black:hover{border-color:var(--sd-color-black-highlight) !important}.sd-outline-white{border-color:var(--sd-color-white) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-white:focus,a.sd-outline-white:hover{border-color:var(--sd-color-white-highlight) !important}.sd-bg-transparent{background-color:transparent !important}.sd-outline-transparent{border-color:transparent !important}.sd-text-transparent{color:transparent !important}.sd-p-0{padding:0 !important}.sd-pt-0,.sd-py-0{padding-top:0 !important}.sd-pr-0,.sd-px-0{padding-right:0 !important}.sd-pb-0,.sd-py-0{padding-bottom:0 !important}.sd-pl-0,.sd-px-0{padding-left:0 !important}.sd-p-1{padding:.25rem !important}.sd-pt-1,.sd-py-1{padding-top:.25rem !important}.sd-pr-1,.sd-px-1{padding-right:.25rem !important}.sd-pb-1,.sd-py-1{padding-bottom:.25rem !important}.sd-pl-1,.sd-px-1{padding-left:.25rem !important}.sd-p-2{padding:.5rem !important}.sd-pt-2,.sd-py-2{padding-top:.5rem !important}.sd-pr-2,.sd-px-2{padding-right:.5rem !important}.sd-pb-2,.sd-py-2{padding-bottom:.5rem !important}.sd-pl-2,.sd-px-2{padding-left:.5rem !important}.sd-p-3{padding:1rem !important}.sd-pt-3,.sd-py-3{padding-top:1rem !important}.sd-pr-3,.sd-px-3{padding-right:1rem !important}.sd-pb-3,.sd-py-3{padding-bottom:1rem !important}.sd-pl-3,.sd-px-3{padding-left:1rem !important}.sd-p-4{padding:1.5rem !important}.sd-pt-4,.sd-py-4{padding-top:1.5rem !important}.sd-pr-4,.sd-px-4{padding-right:1.5rem !important}.sd-pb-4,.sd-py-4{padding-bottom:1.5rem !important}.sd-pl-4,.sd-px-4{padding-left:1.5rem !important}.sd-p-5{padding:3rem !important}.sd-pt-5,.sd-py-5{padding-top:3rem !important}.sd-pr-5,.sd-px-5{padding-right:3rem !important}.sd-pb-5,.sd-py-5{padding-bottom:3rem !important}.sd-pl-5,.sd-px-5{padding-left:3rem !important}.sd-m-auto{margin:auto !important}.sd-mt-auto,.sd-my-auto{margin-top:auto !important}.sd-mr-auto,.sd-mx-auto{margin-right:auto !important}.sd-mb-auto,.sd-my-auto{margin-bottom:auto !important}.sd-ml-auto,.sd-mx-auto{margin-left:auto !important}.sd-m-0{margin:0 !important}.sd-mt-0,.sd-my-0{margin-top:0 !important}.sd-mr-0,.sd-mx-0{margin-right:0 !important}.sd-mb-0,.sd-my-0{margin-bottom:0 !important}.sd-ml-0,.sd-mx-0{margin-left:0 !important}.sd-m-1{margin:.25rem !important}.sd-mt-1,.sd-my-1{margin-top:.25rem !important}.sd-mr-1,.sd-mx-1{margin-right:.25rem !important}.sd-mb-1,.sd-my-1{margin-bottom:.25rem !important}.sd-ml-1,.sd-mx-1{margin-left:.25rem !important}.sd-m-2{margin:.5rem !important}.sd-mt-2,.sd-my-2{margin-top:.5rem !important}.sd-mr-2,.sd-mx-2{margin-right:.5rem !important}.sd-mb-2,.sd-my-2{margin-bottom:.5rem !important}.sd-ml-2,.sd-mx-2{margin-left:.5rem !important}.sd-m-3{margin:1rem !important}.sd-mt-3,.sd-my-3{margin-top:1rem !important}.sd-mr-3,.sd-mx-3{margin-right:1rem !important}.sd-mb-3,.sd-my-3{margin-bottom:1rem !important}.sd-ml-3,.sd-mx-3{margin-left:1rem !important}.sd-m-4{margin:1.5rem !important}.sd-mt-4,.sd-my-4{margin-top:1.5rem !important}.sd-mr-4,.sd-mx-4{margin-right:1.5rem !important}.sd-mb-4,.sd-my-4{margin-bottom:1.5rem !important}.sd-ml-4,.sd-mx-4{margin-left:1.5rem !important}.sd-m-5{margin:3rem !important}.sd-mt-5,.sd-my-5{margin-top:3rem !important}.sd-mr-5,.sd-mx-5{margin-right:3rem !important}.sd-mb-5,.sd-my-5{margin-bottom:3rem !important}.sd-ml-5,.sd-mx-5{margin-left:3rem !important}.sd-w-25{width:25% !important}.sd-w-50{width:50% !important}.sd-w-75{width:75% !important}.sd-w-100{width:100% !important}.sd-w-auto{width:auto !important}.sd-h-25{height:25% !important}.sd-h-50{height:50% !important}.sd-h-75{height:75% !important}.sd-h-100{height:100% !important}.sd-h-auto{height:auto !important}.sd-d-none{display:none !important}.sd-d-inline{display:inline !important}.sd-d-inline-block{display:inline-block !important}.sd-d-block{display:block !important}.sd-d-grid{display:grid !important}.sd-d-flex-row{display:-ms-flexbox !important;display:flex !important;flex-direction:row !important}.sd-d-flex-column{display:-ms-flexbox !important;display:flex !important;flex-direction:column !important}.sd-d-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}@media(min-width: 576px){.sd-d-sm-none{display:none !important}.sd-d-sm-inline{display:inline !important}.sd-d-sm-inline-block{display:inline-block !important}.sd-d-sm-block{display:block !important}.sd-d-sm-grid{display:grid !important}.sd-d-sm-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-sm-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 768px){.sd-d-md-none{display:none !important}.sd-d-md-inline{display:inline !important}.sd-d-md-inline-block{display:inline-block !important}.sd-d-md-block{display:block !important}.sd-d-md-grid{display:grid !important}.sd-d-md-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-md-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 992px){.sd-d-lg-none{display:none !important}.sd-d-lg-inline{display:inline !important}.sd-d-lg-inline-block{display:inline-block !important}.sd-d-lg-block{display:block !important}.sd-d-lg-grid{display:grid !important}.sd-d-lg-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-lg-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 1200px){.sd-d-xl-none{display:none !important}.sd-d-xl-inline{display:inline !important}.sd-d-xl-inline-block{display:inline-block !important}.sd-d-xl-block{display:block !important}.sd-d-xl-grid{display:grid !important}.sd-d-xl-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-xl-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}.sd-align-major-start{justify-content:flex-start !important}.sd-align-major-end{justify-content:flex-end !important}.sd-align-major-center{justify-content:center !important}.sd-align-major-justify{justify-content:space-between !important}.sd-align-major-spaced{justify-content:space-evenly !important}.sd-align-minor-start{align-items:flex-start !important}.sd-align-minor-end{align-items:flex-end !important}.sd-align-minor-center{align-items:center !important}.sd-align-minor-stretch{align-items:stretch !important}.sd-text-justify{text-align:justify !important}.sd-text-left{text-align:left !important}.sd-text-right{text-align:right !important}.sd-text-center{text-align:center !important}.sd-font-weight-light{font-weight:300 !important}.sd-font-weight-lighter{font-weight:lighter !important}.sd-font-weight-normal{font-weight:400 !important}.sd-font-weight-bold{font-weight:700 !important}.sd-font-weight-bolder{font-weight:bolder !important}.sd-font-italic{font-style:italic !important}.sd-text-decoration-none{text-decoration:none !important}.sd-text-lowercase{text-transform:lowercase !important}.sd-text-uppercase{text-transform:uppercase !important}.sd-text-capitalize{text-transform:capitalize !important}.sd-text-wrap{white-space:normal !important}.sd-text-nowrap{white-space:nowrap !important}.sd-text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-fs-1,.sd-fs-1>p{font-size:calc(1.375rem + 1.5vw) !important;line-height:unset !important}.sd-fs-2,.sd-fs-2>p{font-size:calc(1.325rem + 0.9vw) !important;line-height:unset !important}.sd-fs-3,.sd-fs-3>p{font-size:calc(1.3rem + 0.6vw) !important;line-height:unset !important}.sd-fs-4,.sd-fs-4>p{font-size:calc(1.275rem + 0.3vw) !important;line-height:unset !important}.sd-fs-5,.sd-fs-5>p{font-size:1.25rem !important;line-height:unset !important}.sd-fs-6,.sd-fs-6>p{font-size:1rem !important;line-height:unset !important}.sd-border-0{border:0 solid !important}.sd-border-top-0{border-top:0 solid !important}.sd-border-bottom-0{border-bottom:0 solid !important}.sd-border-right-0{border-right:0 solid !important}.sd-border-left-0{border-left:0 solid !important}.sd-border-1{border:1px solid !important}.sd-border-top-1{border-top:1px solid !important}.sd-border-bottom-1{border-bottom:1px solid !important}.sd-border-right-1{border-right:1px solid !important}.sd-border-left-1{border-left:1px solid !important}.sd-border-2{border:2px solid !important}.sd-border-top-2{border-top:2px solid !important}.sd-border-bottom-2{border-bottom:2px solid !important}.sd-border-right-2{border-right:2px solid !important}.sd-border-left-2{border-left:2px solid !important}.sd-border-3{border:3px solid !important}.sd-border-top-3{border-top:3px solid !important}.sd-border-bottom-3{border-bottom:3px solid !important}.sd-border-right-3{border-right:3px solid !important}.sd-border-left-3{border-left:3px solid !important}.sd-border-4{border:4px solid !important}.sd-border-top-4{border-top:4px solid !important}.sd-border-bottom-4{border-bottom:4px solid !important}.sd-border-right-4{border-right:4px solid !important}.sd-border-left-4{border-left:4px solid !important}.sd-border-5{border:5px solid !important}.sd-border-top-5{border-top:5px solid !important}.sd-border-bottom-5{border-bottom:5px solid !important}.sd-border-right-5{border-right:5px solid !important}.sd-border-left-5{border-left:5px solid !important}.sd-rounded-0{border-radius:0 !important}.sd-rounded-1{border-radius:.2rem !important}.sd-rounded-2{border-radius:.3rem !important}.sd-rounded-3{border-radius:.5rem !important}.sd-rounded-pill{border-radius:50rem !important}.sd-rounded-circle{border-radius:50% !important}.shadow-none{box-shadow:none !important}.sd-shadow-sm{box-shadow:0 .125rem .25rem var(--sd-color-shadow) !important}.sd-shadow-md{box-shadow:0 .5rem 1rem var(--sd-color-shadow) !important}.sd-shadow-lg{box-shadow:0 1rem 3rem var(--sd-color-shadow) !important}@keyframes sd-slide-from-left{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@keyframes sd-slide-from-right{0%{transform:translateX(200%)}100%{transform:translateX(0)}}@keyframes sd-grow100{0%{transform:scale(0);opacity:.5}100%{transform:scale(1);opacity:1}}@keyframes sd-grow50{0%{transform:scale(0.5);opacity:.5}100%{transform:scale(1);opacity:1}}@keyframes sd-grow50-rot20{0%{transform:scale(0.5) rotateZ(-20deg);opacity:.5}75%{transform:scale(1) rotateZ(5deg);opacity:1}95%{transform:scale(1) rotateZ(-1deg);opacity:1}100%{transform:scale(1) rotateZ(0);opacity:1}}.sd-animate-slide-from-left{animation:1s ease-out 0s 1 normal none running sd-slide-from-left}.sd-animate-slide-from-right{animation:1s ease-out 0s 1 normal none running sd-slide-from-right}.sd-animate-grow100{animation:1s ease-out 0s 1 normal none running sd-grow100}.sd-animate-grow50{animation:1s ease-out 0s 1 normal none running sd-grow50}.sd-animate-grow50-rot20{animation:1s ease-out 0s 1 normal none running sd-grow50-rot20}.sd-badge{display:inline-block;padding:.35em .65em;font-size:.75em;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem}.sd-badge:empty{display:none}a.sd-badge{text-decoration:none}.sd-btn .sd-badge{position:relative;top:-1px}.sd-btn{background-color:transparent;border:1px solid transparent;border-radius:.25rem;cursor:pointer;display:inline-block;font-weight:400;font-size:1rem;line-height:1.5;padding:.375rem .75rem;text-align:center;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;vertical-align:middle;user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none}.sd-btn:hover{text-decoration:none}@media(prefers-reduced-motion: reduce){.sd-btn{transition:none}}.sd-btn-primary,.sd-btn-outline-primary:hover,.sd-btn-outline-primary:focus{color:var(--sd-color-primary-text) !important;background-color:var(--sd-color-primary) !important;border-color:var(--sd-color-primary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-primary:hover,.sd-btn-primary:focus{color:var(--sd-color-primary-text) !important;background-color:var(--sd-color-primary-highlight) !important;border-color:var(--sd-color-primary-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-primary{color:var(--sd-color-primary) !important;border-color:var(--sd-color-primary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-secondary,.sd-btn-outline-secondary:hover,.sd-btn-outline-secondary:focus{color:var(--sd-color-secondary-text) !important;background-color:var(--sd-color-secondary) !important;border-color:var(--sd-color-secondary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-secondary:hover,.sd-btn-secondary:focus{color:var(--sd-color-secondary-text) !important;background-color:var(--sd-color-secondary-highlight) !important;border-color:var(--sd-color-secondary-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-secondary{color:var(--sd-color-secondary) !important;border-color:var(--sd-color-secondary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-success,.sd-btn-outline-success:hover,.sd-btn-outline-success:focus{color:var(--sd-color-success-text) !important;background-color:var(--sd-color-success) !important;border-color:var(--sd-color-success) !important;border-width:1px !important;border-style:solid !important}.sd-btn-success:hover,.sd-btn-success:focus{color:var(--sd-color-success-text) !important;background-color:var(--sd-color-success-highlight) !important;border-color:var(--sd-color-success-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-success{color:var(--sd-color-success) !important;border-color:var(--sd-color-success) !important;border-width:1px !important;border-style:solid !important}.sd-btn-info,.sd-btn-outline-info:hover,.sd-btn-outline-info:focus{color:var(--sd-color-info-text) !important;background-color:var(--sd-color-info) !important;border-color:var(--sd-color-info) !important;border-width:1px !important;border-style:solid !important}.sd-btn-info:hover,.sd-btn-info:focus{color:var(--sd-color-info-text) !important;background-color:var(--sd-color-info-highlight) !important;border-color:var(--sd-color-info-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-info{color:var(--sd-color-info) !important;border-color:var(--sd-color-info) !important;border-width:1px !important;border-style:solid !important}.sd-btn-warning,.sd-btn-outline-warning:hover,.sd-btn-outline-warning:focus{color:var(--sd-color-warning-text) !important;background-color:var(--sd-color-warning) !important;border-color:var(--sd-color-warning) !important;border-width:1px !important;border-style:solid !important}.sd-btn-warning:hover,.sd-btn-warning:focus{color:var(--sd-color-warning-text) !important;background-color:var(--sd-color-warning-highlight) !important;border-color:var(--sd-color-warning-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-warning{color:var(--sd-color-warning) !important;border-color:var(--sd-color-warning) !important;border-width:1px !important;border-style:solid !important}.sd-btn-danger,.sd-btn-outline-danger:hover,.sd-btn-outline-danger:focus{color:var(--sd-color-danger-text) !important;background-color:var(--sd-color-danger) !important;border-color:var(--sd-color-danger) !important;border-width:1px !important;border-style:solid !important}.sd-btn-danger:hover,.sd-btn-danger:focus{color:var(--sd-color-danger-text) !important;background-color:var(--sd-color-danger-highlight) !important;border-color:var(--sd-color-danger-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-danger{color:var(--sd-color-danger) !important;border-color:var(--sd-color-danger) !important;border-width:1px !important;border-style:solid !important}.sd-btn-light,.sd-btn-outline-light:hover,.sd-btn-outline-light:focus{color:var(--sd-color-light-text) !important;background-color:var(--sd-color-light) !important;border-color:var(--sd-color-light) !important;border-width:1px !important;border-style:solid !important}.sd-btn-light:hover,.sd-btn-light:focus{color:var(--sd-color-light-text) !important;background-color:var(--sd-color-light-highlight) !important;border-color:var(--sd-color-light-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-light{color:var(--sd-color-light) !important;border-color:var(--sd-color-light) !important;border-width:1px !important;border-style:solid !important}.sd-btn-muted,.sd-btn-outline-muted:hover,.sd-btn-outline-muted:focus{color:var(--sd-color-muted-text) !important;background-color:var(--sd-color-muted) !important;border-color:var(--sd-color-muted) !important;border-width:1px !important;border-style:solid !important}.sd-btn-muted:hover,.sd-btn-muted:focus{color:var(--sd-color-muted-text) !important;background-color:var(--sd-color-muted-highlight) !important;border-color:var(--sd-color-muted-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-muted{color:var(--sd-color-muted) !important;border-color:var(--sd-color-muted) !important;border-width:1px !important;border-style:solid !important}.sd-btn-dark,.sd-btn-outline-dark:hover,.sd-btn-outline-dark:focus{color:var(--sd-color-dark-text) !important;background-color:var(--sd-color-dark) !important;border-color:var(--sd-color-dark) !important;border-width:1px !important;border-style:solid !important}.sd-btn-dark:hover,.sd-btn-dark:focus{color:var(--sd-color-dark-text) !important;background-color:var(--sd-color-dark-highlight) !important;border-color:var(--sd-color-dark-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-dark{color:var(--sd-color-dark) !important;border-color:var(--sd-color-dark) !important;border-width:1px !important;border-style:solid !important}.sd-btn-black,.sd-btn-outline-black:hover,.sd-btn-outline-black:focus{color:var(--sd-color-black-text) !important;background-color:var(--sd-color-black) !important;border-color:var(--sd-color-black) !important;border-width:1px !important;border-style:solid !important}.sd-btn-black:hover,.sd-btn-black:focus{color:var(--sd-color-black-text) !important;background-color:var(--sd-color-black-highlight) !important;border-color:var(--sd-color-black-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-black{color:var(--sd-color-black) !important;border-color:var(--sd-color-black) !important;border-width:1px !important;border-style:solid !important}.sd-btn-white,.sd-btn-outline-white:hover,.sd-btn-outline-white:focus{color:var(--sd-color-white-text) !important;background-color:var(--sd-color-white) !important;border-color:var(--sd-color-white) !important;border-width:1px !important;border-style:solid !important}.sd-btn-white:hover,.sd-btn-white:focus{color:var(--sd-color-white-text) !important;background-color:var(--sd-color-white-highlight) !important;border-color:var(--sd-color-white-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-white{color:var(--sd-color-white) !important;border-color:var(--sd-color-white) !important;border-width:1px !important;border-style:solid !important}.sd-stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.sd-hide-link-text{font-size:0}.sd-octicon,.sd-material-icon{display:inline-block;fill:currentColor;vertical-align:middle}.sd-avatar-xs{border-radius:50%;object-fit:cover;object-position:center;width:1rem;height:1rem}.sd-avatar-sm{border-radius:50%;object-fit:cover;object-position:center;width:3rem;height:3rem}.sd-avatar-md{border-radius:50%;object-fit:cover;object-position:center;width:5rem;height:5rem}.sd-avatar-lg{border-radius:50%;object-fit:cover;object-position:center;width:7rem;height:7rem}.sd-avatar-xl{border-radius:50%;object-fit:cover;object-position:center;width:10rem;height:10rem}.sd-avatar-inherit{border-radius:50%;object-fit:cover;object-position:center;width:inherit;height:inherit}.sd-avatar-initial{border-radius:50%;object-fit:cover;object-position:center;width:initial;height:initial}.sd-card{background-clip:border-box;background-color:var(--sd-color-card-background);border:1px solid var(--sd-color-card-border);border-radius:.25rem;color:var(--sd-color-card-text);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;position:relative;word-wrap:break-word}.sd-card>hr{margin-left:0;margin-right:0}.sd-card-hover:hover{border-color:var(--sd-color-card-border-hover);transform:scale(1.01)}.sd-card-body{-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem 1rem}.sd-card-title{margin-bottom:.5rem}.sd-card-subtitle{margin-top:-0.25rem;margin-bottom:0}.sd-card-text:last-child{margin-bottom:0}.sd-card-link:hover{text-decoration:none}.sd-card-link+.card-link{margin-left:1rem}.sd-card-header{padding:.5rem 1rem;margin-bottom:0;background-color:var(--sd-color-card-header);border-bottom:1px solid var(--sd-color-card-border)}.sd-card-header:first-child{border-radius:calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0}.sd-card-footer{padding:.5rem 1rem;background-color:var(--sd-color-card-footer);border-top:1px solid var(--sd-color-card-border)}.sd-card-footer:last-child{border-radius:0 0 calc(0.25rem - 1px) calc(0.25rem - 1px)}.sd-card-header-tabs{margin-right:-0.5rem;margin-bottom:-0.5rem;margin-left:-0.5rem;border-bottom:0}.sd-card-header-pills{margin-right:-0.5rem;margin-left:-0.5rem}.sd-card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1rem;border-radius:calc(0.25rem - 1px)}.sd-card-img,.sd-card-img-bottom,.sd-card-img-top{width:100%}.sd-card-img,.sd-card-img-top{border-top-left-radius:calc(0.25rem - 1px);border-top-right-radius:calc(0.25rem - 1px)}.sd-card-img,.sd-card-img-bottom{border-bottom-left-radius:calc(0.25rem - 1px);border-bottom-right-radius:calc(0.25rem - 1px)}.sd-cards-carousel{width:100%;display:flex;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row;overflow-x:hidden;scroll-snap-type:x mandatory}.sd-cards-carousel.sd-show-scrollbar{overflow-x:auto}.sd-cards-carousel:hover,.sd-cards-carousel:focus{overflow-x:auto}.sd-cards-carousel>.sd-card{flex-shrink:0;scroll-snap-align:start}.sd-cards-carousel>.sd-card:not(:last-child){margin-right:3px}.sd-card-cols-1>.sd-card{width:90%}.sd-card-cols-2>.sd-card{width:45%}.sd-card-cols-3>.sd-card{width:30%}.sd-card-cols-4>.sd-card{width:22.5%}.sd-card-cols-5>.sd-card{width:18%}.sd-card-cols-6>.sd-card{width:15%}.sd-card-cols-7>.sd-card{width:12.8571428571%}.sd-card-cols-8>.sd-card{width:11.25%}.sd-card-cols-9>.sd-card{width:10%}.sd-card-cols-10>.sd-card{width:9%}.sd-card-cols-11>.sd-card{width:8.1818181818%}.sd-card-cols-12>.sd-card{width:7.5%}.sd-container,.sd-container-fluid,.sd-container-lg,.sd-container-md,.sd-container-sm,.sd-container-xl{margin-left:auto;margin-right:auto;padding-left:var(--sd-gutter-x, 0.75rem);padding-right:var(--sd-gutter-x, 0.75rem);width:100%}@media(min-width: 576px){.sd-container-sm,.sd-container{max-width:540px}}@media(min-width: 768px){.sd-container-md,.sd-container-sm,.sd-container{max-width:720px}}@media(min-width: 992px){.sd-container-lg,.sd-container-md,.sd-container-sm,.sd-container{max-width:960px}}@media(min-width: 1200px){.sd-container-xl,.sd-container-lg,.sd-container-md,.sd-container-sm,.sd-container{max-width:1140px}}.sd-row{--sd-gutter-x: 1.5rem;--sd-gutter-y: 0;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:calc(var(--sd-gutter-y) * -1);margin-right:calc(var(--sd-gutter-x) * -0.5);margin-left:calc(var(--sd-gutter-x) * -0.5)}.sd-row>*{box-sizing:border-box;flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--sd-gutter-x) * 0.5);padding-left:calc(var(--sd-gutter-x) * 0.5);margin-top:var(--sd-gutter-y)}.sd-col{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-auto>*{flex:0 0 auto;width:auto}.sd-row-cols-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}@media(min-width: 576px){.sd-col-sm{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-sm-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-sm-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-sm-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-sm-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-sm-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-sm-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-sm-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-sm-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-sm-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-sm-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-sm-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-sm-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-sm-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}@media(min-width: 768px){.sd-col-md{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-md-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-md-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-md-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-md-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-md-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-md-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-md-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-md-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-md-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-md-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-md-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-md-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-md-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}@media(min-width: 992px){.sd-col-lg{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-lg-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-lg-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-lg-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-lg-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-lg-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-lg-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-lg-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-lg-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-lg-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-lg-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-lg-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-lg-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-lg-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}@media(min-width: 1200px){.sd-col-xl{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-xl-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-xl-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-xl-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-xl-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-xl-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-xl-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-xl-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-xl-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-xl-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-xl-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-xl-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-xl-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-xl-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}.sd-col-auto{flex:0 0 auto;-ms-flex:0 0 auto;width:auto}.sd-col-1{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}.sd-col-2{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-col-3{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-col-4{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-col-5{flex:0 0 auto;-ms-flex:0 0 auto;width:41.6666666667%}.sd-col-6{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-col-7{flex:0 0 auto;-ms-flex:0 0 auto;width:58.3333333333%}.sd-col-8{flex:0 0 auto;-ms-flex:0 0 auto;width:66.6666666667%}.sd-col-9{flex:0 0 auto;-ms-flex:0 0 auto;width:75%}.sd-col-10{flex:0 0 auto;-ms-flex:0 0 auto;width:83.3333333333%}.sd-col-11{flex:0 0 auto;-ms-flex:0 0 auto;width:91.6666666667%}.sd-col-12{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-g-0,.sd-gy-0{--sd-gutter-y: 0}.sd-g-0,.sd-gx-0{--sd-gutter-x: 0}.sd-g-1,.sd-gy-1{--sd-gutter-y: 0.25rem}.sd-g-1,.sd-gx-1{--sd-gutter-x: 0.25rem}.sd-g-2,.sd-gy-2{--sd-gutter-y: 0.5rem}.sd-g-2,.sd-gx-2{--sd-gutter-x: 0.5rem}.sd-g-3,.sd-gy-3{--sd-gutter-y: 1rem}.sd-g-3,.sd-gx-3{--sd-gutter-x: 1rem}.sd-g-4,.sd-gy-4{--sd-gutter-y: 1.5rem}.sd-g-4,.sd-gx-4{--sd-gutter-x: 1.5rem}.sd-g-5,.sd-gy-5{--sd-gutter-y: 3rem}.sd-g-5,.sd-gx-5{--sd-gutter-x: 3rem}@media(min-width: 576px){.sd-col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-sm-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-sm-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-sm-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-sm-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-sm-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-sm-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-sm-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-sm-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-sm-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-sm-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-sm-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-sm-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-sm-0,.sd-gy-sm-0{--sd-gutter-y: 0}.sd-g-sm-0,.sd-gx-sm-0{--sd-gutter-x: 0}.sd-g-sm-1,.sd-gy-sm-1{--sd-gutter-y: 0.25rem}.sd-g-sm-1,.sd-gx-sm-1{--sd-gutter-x: 0.25rem}.sd-g-sm-2,.sd-gy-sm-2{--sd-gutter-y: 0.5rem}.sd-g-sm-2,.sd-gx-sm-2{--sd-gutter-x: 0.5rem}.sd-g-sm-3,.sd-gy-sm-3{--sd-gutter-y: 1rem}.sd-g-sm-3,.sd-gx-sm-3{--sd-gutter-x: 1rem}.sd-g-sm-4,.sd-gy-sm-4{--sd-gutter-y: 1.5rem}.sd-g-sm-4,.sd-gx-sm-4{--sd-gutter-x: 1.5rem}.sd-g-sm-5,.sd-gy-sm-5{--sd-gutter-y: 3rem}.sd-g-sm-5,.sd-gx-sm-5{--sd-gutter-x: 3rem}}@media(min-width: 768px){.sd-col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-md-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-md-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-md-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-md-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-md-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-md-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-md-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-md-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-md-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-md-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-md-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-md-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-md-0,.sd-gy-md-0{--sd-gutter-y: 0}.sd-g-md-0,.sd-gx-md-0{--sd-gutter-x: 0}.sd-g-md-1,.sd-gy-md-1{--sd-gutter-y: 0.25rem}.sd-g-md-1,.sd-gx-md-1{--sd-gutter-x: 0.25rem}.sd-g-md-2,.sd-gy-md-2{--sd-gutter-y: 0.5rem}.sd-g-md-2,.sd-gx-md-2{--sd-gutter-x: 0.5rem}.sd-g-md-3,.sd-gy-md-3{--sd-gutter-y: 1rem}.sd-g-md-3,.sd-gx-md-3{--sd-gutter-x: 1rem}.sd-g-md-4,.sd-gy-md-4{--sd-gutter-y: 1.5rem}.sd-g-md-4,.sd-gx-md-4{--sd-gutter-x: 1.5rem}.sd-g-md-5,.sd-gy-md-5{--sd-gutter-y: 3rem}.sd-g-md-5,.sd-gx-md-5{--sd-gutter-x: 3rem}}@media(min-width: 992px){.sd-col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-lg-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-lg-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-lg-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-lg-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-lg-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-lg-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-lg-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-lg-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-lg-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-lg-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-lg-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-lg-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-lg-0,.sd-gy-lg-0{--sd-gutter-y: 0}.sd-g-lg-0,.sd-gx-lg-0{--sd-gutter-x: 0}.sd-g-lg-1,.sd-gy-lg-1{--sd-gutter-y: 0.25rem}.sd-g-lg-1,.sd-gx-lg-1{--sd-gutter-x: 0.25rem}.sd-g-lg-2,.sd-gy-lg-2{--sd-gutter-y: 0.5rem}.sd-g-lg-2,.sd-gx-lg-2{--sd-gutter-x: 0.5rem}.sd-g-lg-3,.sd-gy-lg-3{--sd-gutter-y: 1rem}.sd-g-lg-3,.sd-gx-lg-3{--sd-gutter-x: 1rem}.sd-g-lg-4,.sd-gy-lg-4{--sd-gutter-y: 1.5rem}.sd-g-lg-4,.sd-gx-lg-4{--sd-gutter-x: 1.5rem}.sd-g-lg-5,.sd-gy-lg-5{--sd-gutter-y: 3rem}.sd-g-lg-5,.sd-gx-lg-5{--sd-gutter-x: 3rem}}@media(min-width: 1200px){.sd-col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-xl-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-xl-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-xl-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-xl-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-xl-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-xl-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-xl-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-xl-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-xl-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-xl-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-xl-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-xl-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-xl-0,.sd-gy-xl-0{--sd-gutter-y: 0}.sd-g-xl-0,.sd-gx-xl-0{--sd-gutter-x: 0}.sd-g-xl-1,.sd-gy-xl-1{--sd-gutter-y: 0.25rem}.sd-g-xl-1,.sd-gx-xl-1{--sd-gutter-x: 0.25rem}.sd-g-xl-2,.sd-gy-xl-2{--sd-gutter-y: 0.5rem}.sd-g-xl-2,.sd-gx-xl-2{--sd-gutter-x: 0.5rem}.sd-g-xl-3,.sd-gy-xl-3{--sd-gutter-y: 1rem}.sd-g-xl-3,.sd-gx-xl-3{--sd-gutter-x: 1rem}.sd-g-xl-4,.sd-gy-xl-4{--sd-gutter-y: 1.5rem}.sd-g-xl-4,.sd-gx-xl-4{--sd-gutter-x: 1.5rem}.sd-g-xl-5,.sd-gy-xl-5{--sd-gutter-y: 3rem}.sd-g-xl-5,.sd-gx-xl-5{--sd-gutter-x: 3rem}}.sd-flex-row-reverse{flex-direction:row-reverse !important}details.sd-dropdown{position:relative;font-size:var(--sd-fontsize-dropdown)}details.sd-dropdown:hover{cursor:pointer}details.sd-dropdown .sd-summary-content{cursor:default}details.sd-dropdown summary.sd-summary-title{padding:.5em .6em .5em 1em;font-size:var(--sd-fontsize-dropdown-title);font-weight:var(--sd-fontweight-dropdown-title);user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;list-style:none;display:inline-flex;justify-content:space-between}details.sd-dropdown summary.sd-summary-title::-webkit-details-marker{display:none}details.sd-dropdown summary.sd-summary-title:focus{outline:none}details.sd-dropdown summary.sd-summary-title .sd-summary-icon{margin-right:.6em;display:inline-flex;align-items:center}details.sd-dropdown summary.sd-summary-title .sd-summary-icon svg{opacity:.8}details.sd-dropdown summary.sd-summary-title .sd-summary-text{flex-grow:1;line-height:1.5;padding-right:.5rem}details.sd-dropdown summary.sd-summary-title .sd-summary-state-marker{pointer-events:none;display:inline-flex;align-items:center}details.sd-dropdown summary.sd-summary-title .sd-summary-state-marker svg{opacity:.6}details.sd-dropdown summary.sd-summary-title:hover .sd-summary-state-marker svg{opacity:1;transform:scale(1.1)}details.sd-dropdown[open] summary .sd-octicon.no-title{visibility:hidden}details.sd-dropdown .sd-summary-chevron-right{transition:.25s}details.sd-dropdown[open]>.sd-summary-title .sd-summary-chevron-right{transform:rotate(90deg)}details.sd-dropdown[open]>.sd-summary-title .sd-summary-chevron-down{transform:rotate(180deg)}details.sd-dropdown:not([open]).sd-card{border:none}details.sd-dropdown:not([open])>.sd-card-header{border:1px solid var(--sd-color-card-border);border-radius:.25rem}details.sd-dropdown.sd-fade-in[open] summary~*{-moz-animation:sd-fade-in .5s ease-in-out;-webkit-animation:sd-fade-in .5s ease-in-out;animation:sd-fade-in .5s ease-in-out}details.sd-dropdown.sd-fade-in-slide-down[open] summary~*{-moz-animation:sd-fade-in .5s ease-in-out,sd-slide-down .5s ease-in-out;-webkit-animation:sd-fade-in .5s ease-in-out,sd-slide-down .5s ease-in-out;animation:sd-fade-in .5s ease-in-out,sd-slide-down .5s ease-in-out}.sd-col>.sd-dropdown{width:100%}.sd-summary-content>.sd-tab-set:first-child{margin-top:0}@keyframes sd-fade-in{0%{opacity:0}100%{opacity:1}}@keyframes sd-slide-down{0%{transform:translate(0, -10px)}100%{transform:translate(0, 0)}}.sd-tab-set{border-radius:.125rem;display:flex;flex-wrap:wrap;margin:1em 0;position:relative}.sd-tab-set>input{opacity:0;position:absolute}.sd-tab-set>input:checked+label{border-color:var(--sd-color-tabs-underline-active);color:var(--sd-color-tabs-label-active)}.sd-tab-set>input:checked+label+.sd-tab-content{display:block}.sd-tab-set>input:not(:checked)+label:hover{color:var(--sd-color-tabs-label-hover);border-color:var(--sd-color-tabs-underline-hover)}.sd-tab-set>input:focus+label{outline-style:auto}.sd-tab-set>input:not(.focus-visible)+label{outline:none;-webkit-tap-highlight-color:transparent}.sd-tab-set>label{border-bottom:.125rem solid transparent;margin-bottom:0;color:var(--sd-color-tabs-label-inactive);border-color:var(--sd-color-tabs-underline-inactive);cursor:pointer;font-size:var(--sd-fontsize-tabs-label);font-weight:700;padding:1em 1.25em .5em;transition:color 250ms;width:auto;z-index:1}html .sd-tab-set>label:hover{color:var(--sd-color-tabs-label-active)}.sd-col>.sd-tab-set{width:100%}.sd-tab-content{box-shadow:0 -0.0625rem var(--sd-color-tabs-overline),0 .0625rem var(--sd-color-tabs-underline);display:none;order:99;padding-bottom:.75rem;padding-top:.75rem;width:100%}.sd-tab-content>:first-child{margin-top:0 !important}.sd-tab-content>:last-child{margin-bottom:0 !important}.sd-tab-content>.sd-tab-set{margin:0}.sd-sphinx-override,.sd-sphinx-override *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sd-sphinx-override p{margin-top:0}:root{--sd-color-primary: #0071bc;--sd-color-secondary: #6c757d;--sd-color-success: #28a745;--sd-color-info: #17a2b8;--sd-color-warning: #f0b37e;--sd-color-danger: #dc3545;--sd-color-light: #f8f9fa;--sd-color-muted: #6c757d;--sd-color-dark: #212529;--sd-color-black: black;--sd-color-white: white;--sd-color-primary-highlight: #0060a0;--sd-color-secondary-highlight: #5c636a;--sd-color-success-highlight: #228e3b;--sd-color-info-highlight: #148a9c;--sd-color-warning-highlight: #cc986b;--sd-color-danger-highlight: #bb2d3b;--sd-color-light-highlight: #d3d4d5;--sd-color-muted-highlight: #5c636a;--sd-color-dark-highlight: #1c1f23;--sd-color-black-highlight: black;--sd-color-white-highlight: #d9d9d9;--sd-color-primary-bg: rgba(0, 113, 188, 0.2);--sd-color-secondary-bg: rgba(108, 117, 125, 0.2);--sd-color-success-bg: rgba(40, 167, 69, 0.2);--sd-color-info-bg: rgba(23, 162, 184, 0.2);--sd-color-warning-bg: rgba(240, 179, 126, 0.2);--sd-color-danger-bg: rgba(220, 53, 69, 0.2);--sd-color-light-bg: rgba(248, 249, 250, 0.2);--sd-color-muted-bg: rgba(108, 117, 125, 0.2);--sd-color-dark-bg: rgba(33, 37, 41, 0.2);--sd-color-black-bg: rgba(0, 0, 0, 0.2);--sd-color-white-bg: rgba(255, 255, 255, 0.2);--sd-color-primary-text: #fff;--sd-color-secondary-text: #fff;--sd-color-success-text: #fff;--sd-color-info-text: #fff;--sd-color-warning-text: #212529;--sd-color-danger-text: #fff;--sd-color-light-text: #212529;--sd-color-muted-text: #fff;--sd-color-dark-text: #fff;--sd-color-black-text: #fff;--sd-color-white-text: #212529;--sd-color-shadow: rgba(0, 0, 0, 0.15);--sd-color-card-border: rgba(0, 0, 0, 0.125);--sd-color-card-border-hover: hsla(231, 99%, 66%, 1);--sd-color-card-background: transparent;--sd-color-card-text: inherit;--sd-color-card-header: transparent;--sd-color-card-footer: transparent;--sd-color-tabs-label-active: hsla(231, 99%, 66%, 1);--sd-color-tabs-label-hover: hsla(231, 99%, 66%, 1);--sd-color-tabs-label-inactive: hsl(0, 0%, 66%);--sd-color-tabs-underline-active: hsla(231, 99%, 66%, 1);--sd-color-tabs-underline-hover: rgba(178, 206, 245, 0.62);--sd-color-tabs-underline-inactive: transparent;--sd-color-tabs-overline: rgb(222, 222, 222);--sd-color-tabs-underline: rgb(222, 222, 222);--sd-fontsize-tabs-label: 1rem;--sd-fontsize-dropdown: inherit;--sd-fontsize-dropdown-title: 1rem;--sd-fontweight-dropdown-title: 700} diff --git a/v0.14.0/_static/sphinx_highlight.js b/v0.14.0/_static/sphinx_highlight.js new file mode 100644 index 00000000000..8a96c69a194 --- /dev/null +++ b/v0.14.0/_static/sphinx_highlight.js @@ -0,0 +1,154 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); + parent.insertBefore( + span, + parent.insertBefore( + rest, + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/v0.14.0/_static/style.css b/v0.14.0/_static/style.css new file mode 100644 index 00000000000..221c9dca37c --- /dev/null +++ b/v0.14.0/_static/style.css @@ -0,0 +1,174 @@ +/* To stick the footer to the bottom of the page */ +html { +} + +body { + font-family: "Atkinson Hyperlegible", sans-serif; + font-size: 1.05em; +} + +h1, h2, h3, h4 { + font-weight: normal; + font-family: "Atkinson Hyperlegible", sans-serif; +} + +/* Set the header font sizes */ +h1 { + font-size: 200%; +} + +h2 { + font-size: 185%; +} + +h3 { + font-size: 150%; +} + +h4 { + font-size: 130%; +} + +p { + font-size: 1.05em; +} + +.sidebar-title { + margin-top: 10px; + margin-bottom: 0px; +} + +.banner { + padding-bottom: 60px; + text-align: center; +} + +.banner h1 { + margin-top: 40px; + font-size: 4em; +} + +.wy-nav-content { + max-width: 1000px; +} + +/* Format parameters section similar to sphinx_rtd_theme v4.x.x (not a grid) */ +html.writer-html5 .rst-content dl.field-list { + display: initial; +} + +/* Add a grey box around parameters similar to sphinx_rtd_theme v4.x.x) */ +.rst-content dl:not(.docutils) dl dt { + margin-bottom: 4px; + border: none; + border-left: solid 3px #ccc; + background: #f0f0f0; + color: #555; +} + +.rst-content dl:not(.docutils) dt { + display: table; + margin: 6px 0; + font-size: 90%; + line-height: normal; + background: #e7f2fa; + color: #2980B9; + border-top: solid 3px #6ab0de; + padding: 6px; + position: relative; +} + +/* Remove the padding from the Parameters table */ +.rst-content table.field-list .field-name { + padding-left: 0px; +} + +/* Lign up the Parameters section with the descriptions */ +.rst-content table.field-list td { + padding-top: 8px; +} + +.rst-content .highlight > pre { + font-size: 14px; +} + +.source-link { + float: right; +} + +/* Don't let the edit and notebook download links disappear on mobile. */ +@media screen and (max-width: 480px) { + .wy-breadcrumbs li.source-link { + float:none; + display: block; + margin-top: 20px; + } +} + +/* Atkinson Hyperlegible regular */ +@font-face { + font-family: "Atkinson Hyperlegible"; + src: url("./fonts/Atkinson-Hyperlegible-Regular-102a.woff2") format('woff2'); + font-weight: normal; + font-style: normal; +} + +/* Atkinson Hyperlegible bold */ +@font-face { + font-family: "Atkinson Hyperlegible"; + src: url("./fonts/Atkinson-Hyperlegible-Bold-102a.woff2") format('woff2'); + font-weight: bold; + font-style: normal; +} + +/* Atkinson Hyperlegible italic */ +@font-face { + font-family: "Atkinson Hyperlegible"; + src: url("./fonts/Atkinson-Hyperlegible-Italic-102a.woff2") format('woff2'); + font-weight: normal; + font-style: italic; +} + +/* Atkinson Hyperlegible bold italic */ +@font-face { + font-family: "Atkinson Hyperlegible"; + src: url("./fonts/Atkinson-Hyperlegible-BoldItalic-102a.woff2") format('woff2'); + font-weight: bold; + font-style: italic; +} + +/* Style for images and thumbnails of sphinx-gallery */ +.sphx-glr-thumbcontainer { + border: solid #d6d6d6 1px!important; + text-align: center!important; + min-height: 240px!important; + min-width: 180px!important; +} + +.sphx-glr-thumbcontainer img { + max-width:95%!important; +} + +.sphx-glr-single-img { + max-width: 80%!important; +} + +/* + * Styles for aligning table cells. + * https://myst-parser.readthedocs.io/en/latest/syntax/tables.html#markdown-syntax + */ +th.text-left, td.text-left { + text-align: left !important; +} + +th.text-center, td.text-center { + text-align: center !important; +} + +th.text-right, td.text-right { + text-align: right !important; +} + +.std-term { + font-weight: 600; +} diff --git a/v0.14.0/_static/version_switch.js b/v0.14.0/_static/version_switch.js new file mode 100644 index 00000000000..5450cb9d6af --- /dev/null +++ b/v0.14.0/_static/version_switch.js @@ -0,0 +1,95 @@ +// Copyright 2013 PSF. Licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +// File originates from the cpython source found in Doc/tools/sphinxext/static/version_switch.js + +(function() { + 'use strict'; + + var doc_url = "www.pygmt.org"; + //var doc_url = "0.0.0.0:8000"; // for local testing only + var url_re = new RegExp(doc_url + "\\/(dev|latest|(v\\d+\\.\\d+\\.\\d+))\\/"); + // List all versions. + // Add one entry "version: title" for any minor releases + var all_versions = { + 'latest': 'latest', + 'dev': 'dev', + 'v0.14.0': 'v0.14.0', + 'v0.13.0': 'v0.13.0', + 'v0.12.0': 'v0.12.0', + 'v0.11.0': 'v0.11.0', + 'v0.10.0': 'v0.10.0', + 'v0.9.0': 'v0.9.0', + 'v0.8.0': 'v0.8.0', + 'v0.7.0': 'v0.7.0', + 'v0.6.1': 'v0.6.1', + 'v0.6.0': 'v0.6.0', + 'v0.5.0': 'v0.5.0', + 'v0.4.1': 'v0.4.1', + 'v0.4.0': 'v0.4.0', + 'v0.3.1': 'v0.3.1', + 'v0.3.0': 'v0.3.0', + 'v0.2.1': 'v0.2.1', + 'v0.2.0': 'v0.2.0', + 'v0.1.2': 'v0.1.2', + 'v0.1.1': 'v0.1.1', + 'v0.1.0': 'v0.1.0', + '0.0.1a0': 'v0.0.1a0', + }; + + function build_select(current_version, current_release) { + var buf = [''); + return buf.join(''); + } + + function patch_url(url, new_version) { + return url.replace(url_re, doc_url + '/' + new_version + '/'); + } + + function on_switch() { + var selected = $(this).children('option:selected').attr('value'); + + var url = window.location.href, + new_url = patch_url(url, selected); + + if (new_url != url) { + // check beforehand if url exists, else redirect to version's start page + $.ajax({ + url: new_url, + success: function() { + window.location.href = new_url; + }, + error: function() { + window.location.href = 'https://' + doc_url + '/' + selected; + } + }); + } + } + + $(document).ready(function() { + var match = url_re.exec(window.location.href); + if (match) { + var release = DOCUMENTATION_OPTIONS.VERSION; + var version = match[1]; + var select = build_select(version, release); + $('.version_switch_note').html('Or, select a version from the drop-down menu above.'); + $('.version').html(select); + $('.version select').bind('change', on_switch); + } + }); +})(); diff --git a/v0.14.0/api/generated/pygmt.Figure.basemap.html b/v0.14.0/api/generated/pygmt.Figure.basemap.html new file mode 100644 index 00000000000..0a7f4f776ec --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.basemap.html @@ -0,0 +1,524 @@ + + + + + + + + + pygmt.Figure.basemap — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.basemap

+
+
+Figure.basemap(*, region=None, projection=None, zscale=None, zsize=None, frame=None, map_scale=None, box=None, rose=None, compass=None, verbose=None, panel=None, coltypes=None, perspective=None, transparency=None, **kwargs)
+

Plot base maps and frames for the figure.

+

Creates a basic or fancy basemap with axes, fill, and titles. Several +map projections are available, and the user may specify separate +tick-mark intervals for boundary annotation, ticking, and [optionally] +gridlines. A simple map scale or directional rose may also be plotted.

+

At least one of the parameters frame, map_scale, rose, or +compass must be specified if not in subplot mode.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/basemap.html

+

Aliases:

+
    +
  • B = frame

  • +
  • F = box

  • +
  • J = projection

  • +
  • JZ = zsize

  • +
  • Jz = zscale

  • +
+
    +
  • L = map_scale

  • +
  • R = region

  • +
  • Td = rose

  • +
  • Tm = compass

  • +
  • V = verbose

  • +
+
    +
  • c = panel

  • +
  • f = coltypes

  • +
  • p = perspective

  • +
  • t = transparency

  • +
+
+
+
Parameters:
+
    +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • zscale/zsize (float or str) – Set z-axis scaling or z-axis size.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest. +Required if this is the first plot command.

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • map_scale (str) – [g|j|J|n|x]refpoint+wlength. +Draw a simple map scale centered on the reference point specified.

  • +
  • box (bool or str) – [+cclearances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]][+s[[dx/dy/][shade]]]. +If set to True, draw a rectangular border around the +map scale or rose. Alternatively, specify a different pen with ++ppen. Add +gfill to fill the scale panel [Default is +no fill]. Append +cclearance where clearance is either gap, +xgap/ygap, or lgap/rgap/bgap/tgap where these items are uniform, +separate in x- and y-direction, or individual side spacings between +scale and border. Append +i to draw a secondary, inner border as +well. We use a uniform gap between borders of 2p and the +MAP_DEFAULTS_PEN unless other values are specified. Append ++r to draw rounded rectangular borders instead, with a 6p corner +radius. You can override this radius by appending another value. +Finally, append +s to draw an offset background shaded region. +Here, dx/dy indicates the shift relative to the foreground frame +[Default is "4p/-4p"] and shade sets the fill style to use for +shading [Default is "gray50"].

  • +
  • rose (str) – Draw a map directional rose on the map at the location defined by +the reference and anchor points.

  • +
  • compass (str) – Draw a map magnetic rose on the map at the location defined by the +reference and anchor points.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.basemap

+
+

3. Figure elements

+
3. Figure elements
+
+

4. PyGMT I/O: Table inputs

+
4. PyGMT I/O: Table inputs
+
+

Coastlines and borders

+
Coastlines and borders
+
+

Frames, ticks, titles, and labels

+
Frames, ticks, titles, and labels
+
+

Plotting data points

+
Plotting data points
+
+

Plotting lines

+
Plotting lines
+
+

Plotting polygons

+
Plotting polygons
+
+

Plotting text

+
Plotting text
+
+

Configuring PyGMT defaults

+
Configuring PyGMT defaults
+
+

Making subplots

+
Making subplots
+
+

Typesetting non-ASCII text

+
Typesetting non-ASCII text
+
+

Choropleth map

+
Choropleth map
+
+

Color land and water

+
Color land and water
+
+

Political boundaries

+
Political boundaries
+
+

Shorelines

+
Shorelines
+
+

Connection lines

+
Connection lines
+
+

Decorated lines

+
Decorated lines
+
+

Envelope

+
Envelope
+
+

Generate points along great circles

+
Generate points along great circles
+
+

Line colors with a custom CPT

+
Line colors with a custom CPT
+
+

Line fronts

+
Line fronts
+
+

Line segment caps and joints

+
Line segment caps and joints
+
+

Line styles

+
Line styles
+
+

Quoted lines

+
Quoted lines
+
+

Vector heads and tails

+
Vector heads and tails
+
+

Wiggle along tracks

+
Wiggle along tracks
+
+

Basic geometric symbols

+
Basic geometric symbols
+
+

Bit and hachure patterns

+
Bit and hachure patterns
+
+

Color points by categories

+
Color points by categories
+
+

Custom symbols

+
Custom symbols
+
+

Datetime inputs

+
Datetime inputs
+
+

Multi-parameter symbols

+
Multi-parameter symbols
+
+

Points

+
Points
+
+

Points with varying transparency

+
Points with varying transparency
+
+

Scatter plots with a legend

+
Scatter plots with a legend
+
+

Text symbols

+
Text symbols
+
+

Vertical or horizontal bars

+
Vertical or horizontal bars
+
+

Clipping grid values

+
Clipping grid values
+
+

Create ‘wet-dry’ mask grid

+
Create 'wet-dry' mask grid
+
+

Cross-section along a transect

+
Cross-section along a transect
+
+

Images on figures

+
Images on figures
+
+

Sampling along tracks

+
Sampling along tracks
+
+

Double Y-axes graph

+
Double Y-axes graph
+
+

Scatter plot with histograms

+
Scatter plot with histograms
+
+

Colorbar

+
Colorbar
+
+

Inset map showing a rectangular region

+
Inset map showing a rectangular region
+
+

Legend

+
Legend
+
+

Logo

+
Logo
+
+

Scale bar

+
Scale bar
+
+

Timestamp

+
Timestamp
+
+

Cartesian linear

+
Cartesian linear
+
+

Cartesian logarithmic

+
Cartesian logarithmic
+
+

Cartesian power

+
Cartesian power
+
+

Polar

+
Polar
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.coast.html b/v0.14.0/api/generated/pygmt.Figure.coast.html new file mode 100644 index 00000000000..f2b31e8cf23 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.coast.html @@ -0,0 +1,624 @@ + + + + + + + + + pygmt.Figure.coast — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.coast

+
+
+Figure.coast(*, area_thresh=None, frame=None, lakes=None, resolution=None, dcw=None, box=None, land=None, rivers=None, projection=None, map_scale=None, borders=None, region=None, water=None, verbose=None, shorelines=None, panel=None, perspective=None, transparency=None, **kwargs)
+

Plot continents, shorelines, rivers, and borders on maps.

+

Plots grayshaded, colored, or textured land masses [or water masses] on +maps and [optionally] draws coastlines, rivers, and political +boundaries. The data files come in 5 different resolutions: (f)ull, +(h)igh, (i)ntermediate, (l)ow, and (c)rude. The full +resolution files amount to more than 55 Mb of data and provide great +detail; for maps of larger geographical extent it is more economical to +use one of the other resolutions. If the user selects to paint the +land areas and does not specify fill of water areas then the latter +will be transparent (i.e., earlier graphics drawn in those areas will +not be overwritten). Likewise, if the water areas are painted and no +land fill is set then the land areas will be transparent.

+

A map projection must be supplied.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/coast.html

+

Aliases:

+
    +
  • A = area_thresh

  • +
  • B = frame

  • +
  • C = lakes

  • +
  • D = resolution

  • +
  • E = dcw

  • +
  • F = box

  • +
+
    +
  • G = land

  • +
  • I = rivers

  • +
  • J = projection

  • +
  • L = map_scale

  • +
  • N = borders

  • +
  • R = region

  • +
+
    +
  • S = water

  • +
  • V = verbose

  • +
  • W = shorelines

  • +
  • c = panel

  • +
  • p = perspective

  • +
  • t = transparency

  • +
+
+
+
Parameters:
+
    +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest. +Required if this is the first plot command.

  • +
  • area_thresh (float or str) – min_area[/min_level/max_level][+a[g|i][s|S]][+l|r][+ppercent]. +Features with an area smaller than min_area in km2 or of +hierarchical level that is lower than min_level or higher than +max_level will not be plotted [Default is "0/0/4" (all +features)].

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • lakes (str or list) – fill[+l|+r]. +Set the shade, color, or pattern for lakes and river-lakes. The +default is the fill chosen for “wet” areas set by the water +parameter. Optionally, specify separate fills by appending ++l for lakes or +r for river-lakes, and passing multiple +strings in a list.

  • +
  • resolution (str) – f|h|i|l|c. +Select the resolution of the data set to: (f)ull, (h)igh, +(i)ntermediate, (l)ow, and (c)rude.

  • +
  • land (str) – Select filling of “dry” areas.

  • +
  • rivers (int, str, or list) –

    river[/pen]. +Draw rivers. Specify the type of rivers and [optionally] append +pen attributes [Default is "0.25p,black,solid"].

    +

    Choose from the list of river types below; pass a list to rivers +to use multiple arguments.

    +
      +
    • 0: double-lined rivers (river-lakes)

    • +
    • 1: permanent major rivers

    • +
    • 2: additional major rivers

    • +
    • 3: additional rivers

    • +
    • 4: minor rivers

    • +
    • 5: intermittent rivers - major

    • +
    • 6: intermittent rivers - additional

    • +
    • 7: intermittent rivers - minor

    • +
    • 8: major canals

    • +
    • 9: minor canals

    • +
    • 10: irrigation canals

    • +
    +

    You can also choose from several preconfigured river groups:

    +
      +
    • "a": rivers and canals (0 - 10)

    • +
    • "A": rivers and canals except river-lakes (1 - 10)

    • +
    • "r": permanent rivers (0 - 4)

    • +
    • "R": permanent rivers except river-lakes (1 - 4)

    • +
    • "i": intermittent rivers (5 - 7)

    • +
    • "c": canals (8 - 10)

    • +
    +

  • +
  • map_scale (str) – [g|j|J|n|x]refpoint+wlength. +Draw a simple map scale centered on the reference point specified.

  • +
  • box (bool or str) – [+cclearances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]][+s[[dx/dy/][shade]]]. +If set to True, draw a rectangular border around the +map scale or rose. Alternatively, specify a different pen with ++ppen. Add +gfill to fill the scale panel [Default is +no fill]. Append +cclearance where clearance is either gap, +xgap/ygap, or lgap/rgap/bgap/tgap where these items are uniform, +separate in x- and y-direction, or individual side spacings between +scale and border. Append +i to draw a secondary, inner border as +well. We use a uniform gap between borders of 2p and the +MAP_DEFAULTS_PEN unless other values are specified. Append ++r to draw rounded rectangular borders instead, with a 6p corner +radius. You can override this radius by appending another value. +Finally, append +s to draw an offset background shaded region. +Here, dx/dy indicates the shift relative to the foreground frame +[Default is "4p/-4p"] and shade sets the fill style to use for +shading [Default is "gray50"].

  • +
  • borders (int, str, or list) –

    border[/pen]. +Draw political boundaries. Specify the type of boundary and +[optionally] append pen attributes [Default is "0.25p,black,solid"].

    +

    Choose from the list of boundaries below. Pass a list to borders to +use multiple arguments.

    +
      +
    • 1: national boundaries

    • +
    • 2: state boundaries within the Americas

    • +
    • 3: marine boundaries

    • +
    • "a": all boundaries (1 - 3)

    • +
    +

  • +
  • water (str) – Select filling “wet” areas.

  • +
  • shorelines (int, str, or list) – [level/]pen. +Draw shorelines [Default is no shorelines]. Append pen attributes +[Default is "0.25p,black,solid"] which apply to all four levels. +To set the pen for a single level, pass a string with level/pen, +where level is 1-4 and represent coastline, lakeshore, island-in-lake shore, +and lake-in-island-in-lake shore. Pass a list of level/pen +strings to shorelines to set multiple levels. When specific +level pens are set, those not listed will not be drawn.

  • +
  • dcw (str or list) – code1,code2,…[+gfill][+ppen][+z]. +Select painting country polygons from the Digital Chart of the World. +Append one or more comma-separated countries using the 2-character +ISO 3166-1 alpha-2 convention. +To select a state of a country (if available), append .state, +(e.g, "US.TX" for Texas). To specify a whole continent, prepend = +to any of the continent codes (e.g. "=EU" for Europe). Append ++ppen to draw polygon outlines [Default is no outline] and ++gfill to fill them [Default is no fill].

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
+
+
+

Example

+
>>> import pygmt
+>>> # Create a new plot with pygmt.Figure()
+>>> fig = pygmt.Figure()
+>>> # Call the coast method for the plot
+>>> fig.coast(
+...     # Set the projection to Mercator, and the plot width to 10 centimeters
+...     projection="M10c",
+...     # Set the region of the plot
+...     region=[-10, 30, 30, 60],
+...     # Set the frame of the plot, here annotations and major ticks
+...     frame="a",
+...     # Set the color of the land to "darkgreen"
+...     land="darkgreen",
+...     # Set the color of the water to "lightblue"
+...     water="lightblue",
+...     # Draw national borders with a 1-point black line
+...     borders="1/1p,black",
+... )
+>>> # Show the plot
+>>> fig.show()
+
+
+
+ +
+

Examples using pygmt.Figure.coast

+
+

1. Making your first figure

+
1. Making your first figure
+
+

2. Create a contour map

+
2. Create a contour map
+
+

Coastlines and borders

+
Coastlines and borders
+
+

Frames, ticks, titles, and labels

+
Frames, ticks, titles, and labels
+
+

Plotting data points

+
Plotting data points
+
+

Plotting text

+
Plotting text
+
+

Setting the region

+
Setting the region
+
+

Adding an inset to the figure

+
Adding an inset to the figure
+
+

Configuring PyGMT defaults

+
Configuring PyGMT defaults
+
+

Interactive data visualization using Panel

+
Interactive data visualization using Panel
+
+

Making subplots

+
Making subplots
+
+

Plotting vectors

+
Plotting vectors
+
+

Color land and water

+
Color land and water
+
+

Highlight country, continent and state polygons

+
Highlight country, continent and state polygons
+
+

Political boundaries

+
Political boundaries
+
+

Shorelines

+
Shorelines
+
+

Cartesian, circular, and geographic vectors

+
Cartesian, circular, and geographic vectors
+
+

Generate points along great circles

+
Generate points along great circles
+
+

GeoPandas: Plotting lines with LineString or MultiLineString geometry

+
GeoPandas: Plotting lines with LineString or MultiLineString geometry
+
+

Bit and hachure patterns

+
Bit and hachure patterns
+
+

Sampling along tracks

+
Sampling along tracks
+
+

Focal mechanisms

+
Focal mechanisms
+
+

Blockmean

+
Blockmean
+
+

Day-night terminator line and twilights

+
Day-night terminator line and twilights
+
+

Inset

+
Inset
+
+

Inset map showing a rectangular region

+
Inset map showing a rectangular region
+
+

Scale bar

+
Scale bar
+
+

Timestamp

+
Timestamp
+
+

Azimuthal equidistant projection

+
Azimuthal equidistant projection
+
+

General stereographic projection

+
General stereographic projection
+
+

Gnomonic projection

+
Gnomonic projection
+
+

Lambert azimuthal equal-area projection

+
Lambert azimuthal equal-area projection
+
+

Orthographic projection

+
Orthographic projection
+
+

Perspective projection

+
Perspective projection
+
+

Albers conic equal-area projection

+
Albers conic equal-area projection
+
+

Equidistant conic projection

+
Equidistant conic projection
+
+

Lambert conic conformal projection

+
Lambert conic conformal projection
+
+

Polyconic projection

+
Polyconic projection
+
+

Cassini cylindrical projection

+
Cassini cylindrical projection
+
+

Cylindrical equal-area projection

+
Cylindrical equal-area projection
+
+

Cylindrical equidistant projection

+
Cylindrical equidistant projection
+
+

Cylindrical stereographic projection

+
Cylindrical stereographic projection
+
+

Mercator projection

+
Mercator projection
+
+

Miller cylindrical projection

+
Miller cylindrical projection
+
+

Oblique Mercator projection

+
Oblique Mercator projection
+
+

Transverse Mercator projection

+
Transverse Mercator projection
+
+

Universal Transverse Mercator projection

+
Universal Transverse Mercator projection
+
+

Eckert IV equal-area projection

+
Eckert IV equal-area projection
+
+

Eckert VI equal-area projection

+
Eckert VI equal-area projection
+
+

Hammer projection

+
Hammer projection
+
+

Mollweide projection

+
Mollweide projection
+
+

Robinson projection

+
Robinson projection
+
+

Sinusoidal projection

+
Sinusoidal projection
+
+

Van der Grinten projection

+
Van der Grinten projection
+
+

Winkel Tripel projection

+
Winkel Tripel projection
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.colorbar.html b/v0.14.0/api/generated/pygmt.Figure.colorbar.html new file mode 100644 index 00000000000..2ce68d3b797 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.colorbar.html @@ -0,0 +1,479 @@ + + + + + + + + + pygmt.Figure.colorbar — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.colorbar

+
+
+Figure.colorbar(*, frame=None, cmap=None, position=None, box=None, truncate=None, shading=None, projection=None, equalsize=None, log=None, region=None, verbose=None, scale=None, zfile=None, panel=None, perspective=None, transparency=None, **kwargs)
+

Plot colorbars on figures.

+

Both horizontal and vertical colorbars are supported. For CPTs with +gradational colors (i.e., the lower and upper boundary of an interval +have different colors) we will interpolate to give a continuous scale. +Variations in intensity due to shading/illumination may be displayed by +setting the shading parameter. Colors may be spaced according to a +linear scale, all be equal size, or by providing a file with individual +tile widths.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/colorbar.html

+

Aliases:

+
    +
  • B = frame

  • +
  • C = cmap

  • +
  • D = position

  • +
  • F = box

  • +
  • G = truncate

  • +
  • I = shading

  • +
+
    +
  • J = projection

  • +
  • L = equalsize

  • +
  • Q = log

  • +
  • R = region

  • +
  • V = verbose

  • +
+
    +
  • W = scale

  • +
  • Z = zfile

  • +
  • c = panel

  • +
  • p = perspective

  • +
  • t = transparency

  • +
+
+
+
Parameters:
+
    +
  • frame (str or list) – Set colorbar boundary frame, labels, and axes attributes.

  • +
  • cmap (str) – File name of a CPT file or a series of comma-separated colors +(e.g., color1,color2,color3) to build a linear continuous +CPT from those colors automatically.

  • +
  • position (str) – [g|j|J|n|x]refpoint[+wlength[/width]][+e[b|f][length]][+h|v][+jjustify][+m[a|c|l|u]][+n[txt]][+odx[/dy]]. +Define the reference point on the map for the color scale using one of +four coordinate systems: (1) Use g for map (user) coordinates, (2) +use j or J for setting refpoint via a 2-character +justification code that refers to the (invisible) map domain rectangle, +(3) use n for normalized (0-1) coordinates, or (4) use x for +plot coordinates (inches, cm, etc.). All but x requires both +region and projection to be specified. Append +w followed +by the length and width of the colorbar. If width is not specified +then it is set to 4% of the given length. Give a negative length to +reverse the scale bar. Append +h to get a horizontal scale +[Default is vertical (+v)]. By default, the anchor point on the +scale is assumed to be the bottom left corner (BL), but this can +be changed by appending +j followed by a 2-character +justification code justify.

  • +
  • box (bool or str) – [+cclearances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]][+s[[dx/dy/][shade]]]. +If set to True, draw a rectangular border around the color scale. +Alternatively, specify a different pen with +ppen. Add ++gfill to fill the scale panel [Default is no fill]. Append ++cclearance where clearance is either gap, xgap/ygap, or +lgap/rgap/bgap/tgap where these items are uniform, separate in x- and +y-direction, or individual side spacings between scale and border. +Append +i to draw a secondary, inner border as well. We use a +uniform gap between borders of 2p and the MAP_DEFAULTS_PEN +unless other values are specified. Append +r to draw rounded +rectangular borders instead, with a 6p corner radius. You can override +this radius by appending another value. Finally, append +s to draw +an offset background shaded region. Here, dx/dy indicates the shift +relative to the foreground frame [Default is "4p/-4p"] and shade +sets the fill style to use for shading [Default is "gray50"].

  • +
  • truncate (list or str) – zlo/zhi. +Truncate the incoming CPT so that the lowest and highest z-levels are +to zlo and zhi. If one of these equal NaN then we leave that end of +the CPT alone. The truncation takes place before the plotting.

  • +
  • scale (float) – Multiply all z-values in the CPT by the provided scale. By default, +the CPT is used as is.

  • +
  • shading (str, list, or bool) – Add illumination effects. Passing a single numerical value sets the +range of intensities from -value to +value. If not specified, 1 is +used. Alternatively, set shading=[low, high] to specify an +asymmetric intensity range from low to high. [Default is no +illumination].

  • +
  • equalsize (float or str) – [i][gap]. +Equal-sized color rectangles. By default, the rectangles are scaled +according to the z-range in the CPT (see also zfile). If gap is +appended and the CPT is discrete each annotation is centered on each +rectangle, using the lower boundary z-value for the annotation. If +i is prepended the interval range is annotated instead. If +shading is used each rectangle will have its constant color +modified by the specified intensity.

  • +
  • log (bool) – Select logarithmic scale and power of ten annotations. All z-values +in the CPT will be converted to p = log10(z) and only integer p-values +will be annotated using the 10^p format [Default is linear scale].

  • +
  • zfile (str) – File with colorbar-width per color entry. By default, the width of the +entry is scaled to the color range, i.e., z = 0-100 gives twice the +width as z = 100-150 (see also equalsize). Note: The widths +may be in plot distance units or given as relative fractions and will +be automatically scaled so that the sum of the widths equals the +requested colorbar length.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
+
+
+

Example

+
>>> import pygmt
+>>> # Create a new figure instance with pygmt.Figure()
+>>> fig = pygmt.Figure()
+>>> # Create a basemap
+>>> fig.basemap(region=[0, 10, 0, 3], projection="X10c/3c", frame=True)
+>>> # Call the colorbar method for the plot
+>>> fig.colorbar(
+...     # Set cmap to the "roma" CPT
+...     cmap="roma",
+...     # Label the x-axis "Velocity" and the y-axis "m/s"
+...     frame=["x+lVelocity", "y+lm/s"],
+... )
+>>> # Show the plot
+>>> fig.show()
+
+
+
+ +
+

Examples using pygmt.Figure.colorbar

+
+

2. Create a contour map

+
2. Create a contour map
+
+

Frames, ticks, titles, and labels

+
Frames, ticks, titles, and labels
+
+

Plotting data points

+
Plotting data points
+
+

Creating a 3-D perspective image

+
Creating a 3-D perspective image
+
+

Creating a map with contour lines

+
Creating a map with contour lines
+
+

Draping a dataset on top of a topographic surface

+
Draping a dataset on top of a topographic surface
+
+

Interactive data visualization using Panel

+
Interactive data visualization using Panel
+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+

Plotting Earth relief

+
Plotting Earth relief
+
+

Choropleth map

+
Choropleth map
+
+

Line colors with a custom CPT

+
Line colors with a custom CPT
+
+

Color points by categories

+
Color points by categories
+
+

Calculating grid gradient and radiance

+
Calculating grid gradient and radiance
+
+

Calculating grid gradient with custom azimuth and normalize parameters

+
Calculating grid gradient with custom azimuth and normalize parameters
+
+

Clipping grid values

+
Clipping grid values
+
+

Create ‘wet-dry’ mask grid

+
Create 'wet-dry' mask grid
+
+

Cross-section along a transect

+
Cross-section along a transect
+
+

3-D scatter plots

+
3-D scatter plots
+
+

Plotting a surface

+
Plotting a surface
+
+

Ternary diagram

+
Ternary diagram
+
+

Blockmean

+
Blockmean
+
+

Colorbar

+
Colorbar
+
+

Multiple colormaps

+
Multiple colormaps
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.contour.html b/v0.14.0/api/generated/pygmt.Figure.contour.html new file mode 100644 index 00000000000..3b246da4b90 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.contour.html @@ -0,0 +1,499 @@ + + + + + + + + + pygmt.Figure.contour — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.contour

+
+
+Figure.contour(data=None, x=None, y=None, z=None, *, annotation=None, frame=None, levels=None, label_placement=None, projection=None, triangular_mesh_pen=None, no_clip=None, region=None, skip=None, verbose=None, pen=None, binary=None, panel=None, nodata=None, find=None, coltypes=None, header=None, incols=None, label=None, perspective=None, transparency=None, **kwargs)
+

Contour table data by direct triangulation.

+

Takes a matrix, (x, y, z) triplets, or a file name as input and plots, +lines, polygons, or symbols at those locations on a map.

+

Must provide either data or x, y, and z.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/contour.html

+

Aliases:

+
    +
  • A = annotation

  • +
  • B = frame

  • +
  • C = levels

  • +
  • G = label_placement

  • +
  • J = projection

  • +
  • L = triangular_mesh_pen

  • +
  • N = no_clip

  • +
+
    +
  • R = region

  • +
  • S = skip

  • +
  • V = verbose

  • +
  • W = pen

  • +
  • b = binary

  • +
  • c = panel

  • +
  • d = nodata

  • +
+
    +
  • e = find

  • +
  • f = coltypes

  • +
  • h = header

  • +
  • i = incols

  • +
  • l = label

  • +
  • p = perspective

  • +
  • t = transparency

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in (x, y, z) or (longitude, latitude, elevation) values by +providing a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • x/y/z (1-D arrays) – Arrays of x and y coordinates and values z of the data points.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • annotation (float, list, or str) –

    Specify or disable annotated contour levels, modifies annotated +contours specified in levels.

    +
      +
    • Specify a fixed annotation interval.

    • +
    • Specify a list of annotation levels.

    • +
    • Disable all annotations by setting annotation="n".

    • +
    • Adjust the appearance by appending different modifiers, e.g., +"annot_int+f10p+gred" gives annotations with a font size of 10 points and +a red filled box. For all available modifiers see https://docs.generic-mapping-tools.org/6.5/contour.html#a.

    • +
    +

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • levels (float, list, or str) –

    Specify the contour lines to generate.

    +
      +
    • The file name of a CPT file where the color boundaries will be used as +contour levels.

    • +
    • The file name of a 2 (or 3) column file containing the contour levels (col 0), +(C)ontour or (A)nnotate (col 1), and optional angle (col 2).

    • +
    • A fixed contour interval.

    • +
    • A list of contour levels.

    • +
    +

  • +
  • D (str) – Dump contour coordinates.

  • +
  • E (str) – Network information.

  • +
  • label_placement (str) – [d|f|n|l|L|x|X]args. +Control the placement of labels along the quoted lines. It supports +five controlling algorithms. See https://docs.generic-mapping-tools.org/6.5/contour.html#g for +details.

  • +
  • I (bool) – Color the triangles using CPT.

  • +
  • triangular_mesh_pen (str) – Pen to draw the underlying triangulation [Default is None].

  • +
  • no_clip (bool) – Do not clip contours or image at the frame boundaries +[Default is False to fit inside region].

  • +
  • Q (float or str) – [cut][+z]. +Do not draw contours with less than cut number of points.

  • +
  • skip (bool or str) – [p|t]. +Skip input points outside region.

  • +
  • pen (str or list) – [type]pen[+c[l|f]]. +type, if present, can be a for annotated contours or c for regular +contours [Default]. The pen sets the attributes for the particular line. +Default pen for annotated contours is "0.75p,black" and for regular +contours "0.25p,black". Normally, all contours are drawn with a fixed +color determined by the pen setting. If +cl is appended the colors of the +contour lines are taken from the CPT (see levels). If +cf is +appended the colors from the CPT file are applied to the contour annotations. +Select +c for both effects.

  • +
  • label (str) – Add a legend entry for the contour being plotted. Normally, the +annotated contour is selected for the legend. You can select the +regular contour instead, or both of them, by considering the label +to be of the format [annotcontlabel][/contlabel]. If either +label contains a slash (/) character then use | as the +separator for the two labels instead.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.contour

+
+

Contours

+
Contours
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.grdcontour.html b/v0.14.0/api/generated/pygmt.Figure.grdcontour.html new file mode 100644 index 00000000000..aaf2e050e6c --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.grdcontour.html @@ -0,0 +1,413 @@ + + + + + + + + + pygmt.Figure.grdcontour — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.grdcontour

+
+
+Figure.grdcontour(grid, *, annotation=None, frame=None, levels=None, label_placement=None, projection=None, limit=None, cut=None, region=None, resample=None, verbose=None, pen=None, label=None, panel=None, coltypes=None, perspective=None, transparency=None, **kwargs)
+

Convert grids or images to contours and plot them on maps.

+

Takes a grid file name or an xarray.DataArray object as input.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdcontour.html

+

Aliases:

+
    +
  • A = annotation

  • +
  • B = frame

  • +
  • C = levels

  • +
  • G = label_placement

  • +
  • J = projection

  • +
  • L = limit

  • +
+
    +
  • Q = cut

  • +
  • R = region

  • +
  • S = resample

  • +
  • V = verbose

  • +
  • W = pen

  • +
+
    +
  • c = panel

  • +
  • f = coltypes

  • +
  • l = label

  • +
  • p = perspective

  • +
  • t = transparency

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • levels (float, list, or str) –

    Specify the contour lines to generate.

    +
      +
    • The file name of a CPT file where the color boundaries will be used as +contour levels.

    • +
    • The file name of a 2 (or 3) column file containing the contour levels (col 0), +(C)ontour or (A)nnotate (col 1), and optional angle (col 2).

    • +
    • A fixed contour interval.

    • +
    • A list of contour levels.

    • +
    +

  • +
  • annotation (float, list, or str) –

    Specify or disable annotated contour levels, modifies annotated +contours specified in levels.

    +
      +
    • Specify a fixed annotation interval.

    • +
    • Specify a list of annotation levels.

    • +
    • Disable all annotations by setting annotation="n".

    • +
    • Adjust the appearance by appending different modifiers, e.g., +"annot_int+f10p+gred" gives annotations with a font size of 10 points +and a red filled box. For all available modifiers see +https://docs.generic-mapping-tools.org/6.5/grdcontour.html#a.

    • +
    +

  • +
  • limit (str or list of 2 ints) – low/high. +Do no draw contours below low or above high, specify as string

  • +
  • cut (str or int) – Do not draw contours with less than cut number of points.

  • +
  • resample (str or int) – Resample smoothing factor.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • label_placement (str) – [d|f|n|l|L|x|X]args. +Control the placement of labels along the quoted lines. It supports +five controlling algorithms. See https://docs.generic-mapping-tools.org/6.5/grdcontour.html#g for +details.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • pen (str or list) – [type]pen[+c[l|f]]. +type, if present, can be a for annotated contours or c for regular +contours [Default]. The pen sets the attributes for the particular line. +Default pen for annotated contours is "0.75p,black" and for regular +contours "0.25p,black". Normally, all contours are drawn with a fixed +color determined by the pen setting. If +cl is appended the colors of the +contour lines are taken from the CPT (see levels). If +cf is +appended the colors from the CPT file are applied to the contour annotations. +Select +c for both effects.

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • label (str) – Add a legend entry for the contour being plotted. Normally, the +annotated contour is selected for the legend. You can select the +regular contour instead, or both of them, by considering the label +to be of the format [annotcontlabel][/contlabel]. If either +label contains a slash (/) character then use | as the +separator for the two labels instead.

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
+
+
+

Example

+
>>> import pygmt
+>>> # Load the 15 arc-minutes grid with "gridline" registration in the
+>>> # specified region
+>>> grid = pygmt.datasets.load_earth_relief(
+...     resolution="15m",
+...     region=[-92.5, -82.5, -3, 7],
+...     registration="gridline",
+... )
+>>> # Create a new plot with pygmt.Figure()
+>>> fig = pygmt.Figure()
+>>> # Create the contour plot
+>>> fig.grdcontour(
+...     # Pass in the grid downloaded above
+...     grid=grid,
+...     # Set the interval for contour lines at 250 meters
+...     levels=250,
+...     # Set the interval for annotated contour lines at 1,000 meters
+...     annotation=1000,
+...     # Add a frame for the plot
+...     frame="a",
+...     # Set the projection to Mercator for the 10 cm figure
+...     projection="M10c",
+... )
+>>> # Show the plot
+>>> fig.show()
+
+
+
+ +
+

Examples using pygmt.Figure.grdcontour

+
+

2. Create a contour map

+
2. Create a contour map
+
+

Creating a map with contour lines

+
Creating a map with contour lines
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.grdimage.html b/v0.14.0/api/generated/pygmt.Figure.grdimage.html new file mode 100644 index 00000000000..65eb40b37ec --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.grdimage.html @@ -0,0 +1,482 @@ + + + + + + + + + pygmt.Figure.grdimage — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.grdimage

+
+
+Figure.grdimage(grid, *, frame=None, cmap=None, img_in=None, dpi=None, bitcolor=None, shading=None, projection=None, monochrome=None, no_clip=None, nan_transparent=None, region=None, verbose=None, interpolation=None, panel=None, coltypes=None, perspective=None, transparency=None, cores=None, **kwargs)
+

Project and plot grids or images.

+

Reads a 2-D grid file and produces a gray-shaded (or colored) map by +building a rectangular image and assigning pixels a gray-shade (or color) +based on the z-value and the CPT file. Optionally, illumination may be +added by providing a file with intensities in the (-1,+1) range or +instructions to derive intensities from the input data grid. Values outside +this range will be clipped. Such intensity files can be created from the +grid using pygmt.grdgradient and, optionally, modified by +https://docs.generic-mapping-tools.org/6.5/grdmath.html or pygmt.grdhisteq. Alternatively, pass +image which can be an image file (geo-referenced or not). In this case +the image can optionally be illuminated with the file provided via the +shading parameter. Here, if image has no coordinates then those of the +intensity file will be used.

+

When using map projections, the grid is first resampled on a new +rectangular grid with the same dimensions. Higher resolution images can +be obtained by using the dpi parameter. To obtain the resampled value +(and hence shade or color) of each map pixel, its location is inversely +projected back onto the input grid after which a value is interpolated +between the surrounding input grid values. By default bi-cubic +interpolation is used. Aliasing is avoided by also forward projecting +the input grid nodes. If two or more nodes are projected onto the same +pixel, their average will dominate in the calculation of the pixel +value. Interpolation and aliasing is controlled with the +interpolation parameter.

+

The region parameter can be used to select a map region larger or +smaller than that implied by the extent of the grid.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdimage.html

+

Aliases:

+
    +
  • B = frame

  • +
  • C = cmap

  • +
  • D = img_in

  • +
  • E = dpi

  • +
  • G = bitcolor

  • +
  • I = shading

  • +
+
    +
  • J = projection

  • +
  • M = monochrome

  • +
  • N = no_clip

  • +
  • Q = nan_transparent

  • +
  • R = region

  • +
  • V = verbose

  • +
+
    +
  • c = panel

  • +
  • f = coltypes

  • +
  • n = interpolation

  • +
  • p = perspective

  • +
  • t = transparency

  • +
  • x = cores

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • cmap (str) – File name of a CPT file or a series of comma-separated colors +(e.g., color1,color2,color3) to build a linear continuous +CPT from those colors automatically.

  • +
  • img_in (str) – [r]. +GMT will automatically detect standard image files (Geotiff, TIFF, +JPG, PNG, GIF, etc.) and will read those via GDAL. For very obscure +image formats you may need to explicitly set img_in, which +specifies that the grid is in fact an image file to be read via +GDAL. Append r to assign the region specified by region +to the image. For example, if you have used region="d" then +the image will be assigned a global domain. This mode allows you +to project a raw image (an image without referencing coordinates).

  • +
  • dpi (int) – [i|dpi]. +Set the resolution of the projected grid that will be created if a +map projection other than Linear or Mercator was selected [Default +is 100 dpi]. By default, the projected grid will be of the +same size (rows and columns) as the input file. Specify i to +use the PostScript image operator to interpolate the image at the +device resolution.

  • +
  • bitcolor (str) – color[+b|f]. +This parameter only applies when a resulting 1-bit image otherwise +would consist of only two colors: black (0) and white (255). If so, +this parameter will instead use the image as a transparent mask and +paint the mask with the given color. Append +b to paint the +background pixels (1) or +f for the foreground pixels +[Default is +f].

  • +
  • shading (str or xarray.DataArray) – [intensfile|intensity|modifiers]. +Give the name of a grid file or a DataArray with intensities in the +(-1,+1) range, or a constant intensity to apply everywhere (affects the +ambient light). Alternatively, derive an intensity grid from the input +data grid via a call to pygmt.grdgradient; append ++aazimuth, +nargs, and +mambient to specify +azimuth, intensity, and ambient arguments for that function, or just +give +d to select the default arguments (+a-45+nt1+m0). If you +want a more specific intensity scenario then run +pygmt.grdgradient separately first. If we should derive +intensities from another file than grid, specify the file with +suitable modifiers [Default is no illumination]. Note: If the +input data represent an image then an intensfile or constant +intensity must be provided.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • monochrome (bool) – Force conversion to monochrome image using the (television) YIQ +transformation. Cannot be used with nan_transparent.

  • +
  • no_clip (bool) – Do not clip the image at the frame boundaries (only relevant +for non-rectangular maps) [Default is False].

  • +
  • nan_transparent (bool or str) – [+zvalue][color] +Make grid nodes with z = NaN transparent, using the color-masking +feature in PostScript Level 3 (the PS device must support PS Level +3). If the input is a grid, use +z to select another grid value +than NaN. If input is instead an image, append an alternate color to +select another pixel value to be transparent [Default is "black"].

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • interpolation (str) –

    [b|c|l|n][+a][+bBC][+c][+tthreshold]. +Select interpolation mode for grids. You can select the type of +spline used:

    +
      +
    • b for B-spline

    • +
    • c for bicubic [Default]

    • +
    • l for bilinear

    • +
    • n for nearest-neighbor

    • +
    +

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
  • cores (bool or int) – [[-]n]. +Limit the number of cores to be used in any OpenMP-enabled +multi-threaded algorithms. By default we try to use all available +cores. Set a number n to only use n cores (if too large it will +be truncated to the maximum cores available). Finally, give a +negative number -n to select (all - n) cores (or at least 1 if +n equals or exceeds all).

  • +
+
+
+

Example

+
>>> import pygmt
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = pygmt.datasets.load_earth_relief("30m", registration="gridline")
+>>> # create a new plot with pygmt.Figure()
+>>> fig = pygmt.Figure()
+>>> # pass in the grid and set the CPT to "geo"
+>>> # set the projection to Mollweide and the size to 10 cm
+>>> fig.grdimage(grid=grid, cmap="geo", projection="W10c", frame="ag")
+>>> # show the plot
+>>> fig.show()
+
+
+
+ +
+

Examples using pygmt.Figure.grdimage

+
+

2. Create a contour map

+
2. Create a contour map
+
+

Creating a map with contour lines

+
Creating a map with contour lines
+
+

Interactive data visualization using Panel

+
Interactive data visualization using Panel
+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+

Plotting Earth relief

+
Plotting Earth relief
+
+

Calculating grid gradient and radiance

+
Calculating grid gradient and radiance
+
+

Calculating grid gradient with custom azimuth and normalize parameters

+
Calculating grid gradient with custom azimuth and normalize parameters
+
+

Clipping grid values

+
Clipping grid values
+
+

Create ‘wet-dry’ mask grid

+
Create 'wet-dry' mask grid
+
+

Cross-section along a transect

+
Cross-section along a transect
+
+

RGB image

+
RGB image
+
+

Sampling along tracks

+
Sampling along tracks
+
+

Blockmean

+
Blockmean
+
+

Multiple colormaps

+
Multiple colormaps
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.grdview.html b/v0.14.0/api/generated/pygmt.Figure.grdview.html new file mode 100644 index 00000000000..0421caecb4a --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.grdview.html @@ -0,0 +1,435 @@ + + + + + + + + + pygmt.Figure.grdview — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.grdview

+
+
+Figure.grdview(grid, *, region=None, projection=None, zscale=None, zsize=None, frame=None, cmap=None, drapegrid=None, plane=None, surftype=None, contourpen=None, meshpen=None, facadepen=None, shading=None, verbose=None, panel=None, coltypes=None, interpolation=None, perspective=None, transparency=None, **kwargs)
+

Create 3-D perspective image or surface mesh from a grid.

+

Reads a 2-D grid file and produces a 3-D perspective plot by drawing a +mesh, painting a colored/gray-shaded surface made up of polygons, or by +scanline conversion of these polygons to a raster image. Options +include draping a data set on top of a surface, plotting of contours on +top of the surface, and apply artificial illumination based on +intensities provided in a separate grid file.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdview.html

+

Aliases:

+
    +
  • B = frame

  • +
  • C = cmap

  • +
  • G = drapegrid

  • +
  • I = shading

  • +
  • J = projection

  • +
  • JZ = zsize

  • +
  • Jz = zscale

  • +
+
    +
  • N = plane

  • +
  • Q = surftype

  • +
  • R = region

  • +
  • V = verbose

  • +
  • Wc = contourpen

  • +
  • Wf = facadepen

  • +
+
    +
  • Wm = meshpen

  • +
  • c = panel

  • +
  • f = coltypes

  • +
  • n = interpolation

  • +
  • p = perspective

  • +
  • t = transparency

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest. +When used with perspective, optionally append /zmin/zmax to +indicate the range to use for the 3-D axes [Default is the region in +the input grid].

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • zscale/zsize (float or str) – Set z-axis scaling or z-axis size.

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • cmap (str) – The name of the color palette table to use.

  • +
  • drapegrid (str or xarray.DataArray) – The file name or a DataArray of the image grid to be draped on top +of the relief provided by grid [Default determines colors from grid]. +Note that zscale and plane always refer to the grid. +The drapegrid only provides the information pertaining to colors, which +(if drapegrid is a grid) will be looked-up via the CPT (see cmap).

  • +
  • plane (float or str) – level[+gfill]. +Draw a plane at this z-level. If the optional color is provided +via the +g modifier, and the projection is not oblique, the frontal +facade between the plane and the data perimeter is colored.

  • +
  • surftype (str) –

    Specify cover type of the grid. +Select one of following settings:

    +
      +
    • m - mesh plot [Default].

    • +
    • mx or my - waterfall plots (row or column profiles).

    • +
    • s - surface plot, and optionally append m to have mesh lines +drawn on top of the surface.

    • +
    • i - image plot.

    • +
    • c - Same as i but will make nodes with z = NaN transparent.

    • +
    +

    For any of these choices, you may force a monochrome image by +appending the modifier +m.

    +

  • +
  • contourpen (str) – Draw contour lines on top of surface or mesh (not image). Append +pen attributes used for the contours.

  • +
  • meshpen (str) – Set the pen attributes used for the mesh. You must also select +surftype of m or sm for meshlines to be drawn.

  • +
  • facadepen (str) – Set the pen attributes used for the facade. You must also select +plane for the facade outline to be drawn.

  • +
  • shading (str) – Provide the name of a grid file with intensities in the (-1,+1) +range, or a constant intensity to apply everywhere (affects the +ambient light). Alternatively, derive an intensity grid from the +input data grid reliefgrid via a call to pygmt.grdgradient; +append +aazimuth, +nargs, and +mambient to +specify azimuth, intensity, and ambient arguments for that function, +or just give +d to select the default arguments +[Default is +a-45+nt1+m0].

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • interpolation (str) –

    [b|c|l|n][+a][+bBC][+c][+tthreshold]. +Select interpolation mode for grids. You can select the type of +spline used:

    +
      +
    • b for B-spline

    • +
    • c for bicubic [Default]

    • +
    • l for bilinear

    • +
    • n for nearest-neighbor

    • +
    +

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
+
+
+

Example

+
>>> import pygmt
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> # in a specified region
+>>> grid = pygmt.datasets.load_earth_relief(
+...     resolution="30m",
+...     region=[-92.5, -82.5, -3, 7],
+...     registration="gridline",
+... )
+>>> # create a new figure instance with pygmt.Figure()
+>>> fig = pygmt.Figure()
+>>> # create the contour plot
+>>> fig.grdview(
+...     # pass in the grid downloaded above
+...     grid=grid,
+...     # set the perspective to an azimuth of 130° and an elevation of 30°
+...     perspective=[130, 30],
+...     # add a frame to the x- and y-axes
+...     # specify annotations on the south and east borders of the plot
+...     frame=["xa", "ya", "wSnE"],
+...     # set the projection of the 2-D map to Mercator with a 10 cm width
+...     projection="M10c",
+...     # set the vertical scale (z-axis) to 2 cm
+...     zsize="2c",
+...     # set "surface plot" to color the surface via a CPT
+...     surftype="s",
+...     # specify CPT to "geo"
+...     cmap="geo",
+... )
+>>> # show the plot
+>>> fig.show()
+
+
+
+ +
+

Examples using pygmt.Figure.grdview

+
+

Creating a 3-D perspective image

+
Creating a 3-D perspective image
+
+

Draping a dataset on top of a topographic surface

+
Draping a dataset on top of a topographic surface
+
+

Plotting a surface

+
Plotting a surface
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.histogram.html b/v0.14.0/api/generated/pygmt.Figure.histogram.html new file mode 100644 index 00000000000..e2c790bd3df --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.histogram.html @@ -0,0 +1,539 @@ + + + + + + + + + pygmt.Figure.histogram — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.histogram

+
+
+Figure.histogram(data, *, horizontal=None, frame=None, cmap=None, annotate=None, barwidth=None, center=None, fill=None, projection=None, extreme=None, distribution=None, cumulative=None, region=None, stairs=None, series=None, verbose=None, pen=None, histtype=None, binary=None, panel=None, nodata=None, find=None, header=None, incols=None, label=None, perspective=None, transparency=None, wrap=None, **kwargs)
+

Plot Cartesian histograms.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/histogram.html

+

Aliases:

+
    +
  • A = horizontal

  • +
  • B = frame

  • +
  • C = cmap

  • +
  • D = annotate

  • +
  • E = barwidth

  • +
  • F = center

  • +
  • G = fill

  • +
  • J = projection

  • +
  • L = extreme

  • +
+
    +
  • N = distribution

  • +
  • Q = cumulative

  • +
  • R = region

  • +
  • S = stairs

  • +
  • T = series

  • +
  • V = verbose

  • +
  • W = pen

  • +
  • Z = histtype

  • +
  • b = binary

  • +
+
    +
  • c = panel

  • +
  • d = nodata

  • +
  • e = find

  • +
  • h = header

  • +
  • i = incols

  • +
  • l = label

  • +
  • p = perspective

  • +
  • t = transparency

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • data (str, list, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in either a file name to an ASCII data table, a Python list, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • cmap (str) – File name of a CPT file or a series of comma-separated colors +(e.g., color1,color2,color3) to build a linear continuous +CPT from those colors automatically.

  • +
  • fill (str) – Set color or pattern for filling bars [Default is no fill].

  • +
  • pen (str) – Set pen attributes for lines or the outline of symbols.

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • annotate (bool or str) – [+b][+ffont][+ooff][+r]. +Annotate each bar with the count it represents. Append any of the +following modifiers: Use +b to place the labels beneath the bars +instead of above; use +f to change to another font than the default +annotation font; use +o to change the offset between bar and +label [Default is "6p"]; use +r to rotate the labels from +horizontal to vertical.

  • +
  • barwidth (float or str) – width[+ooffset]. +Use an alternative histogram bar width than the default set via +series, and optionally shift all bars by an offset. Here +width is either an alternative width in data units, or the user may +append a valid plot dimension unit (c|i|p) for a +fixed dimension instead. Optionally, all bins may be shifted along the +axis by offset. As for width, it may be given in data units of +plot dimension units by appending the relevant unit.

  • +
  • center (bool) – Center bin on each value. [Default is left edge].

  • +
  • distribution (bool, float, or str) –

    [mode][+ppen]. +Draw the equivalent normal distribution; append desired +pen [Default is "0.25p,black,solid"]. +The mode selects which central location and scale to use:

    +
      +
    • 0 = mean and standard deviation [Default];

    • +
    • 1 = median and L1 scale (1.4826 * median absolute deviation; MAD);

    • +
    • 2 = LMS (least median of squares) mode and scale.

    • +
    +

  • +
  • cumulative (bool or str) – [r]. +Draw a cumulative histogram by passing True. Use r to display +a reverse cumulative histogram.

  • +
  • extreme (str) – l|h|b. +The modifiers specify the handling of extreme values that fall outside +the range set by series. By default, these values are ignored. +Append b to let these values be included in the first or last +bins. To only include extreme values below first bin into the first +bin, use l, and to only include extreme values above the last bin +into that last bin, use h.

  • +
  • stairs (bool) – Draw a stairs-step diagram which does not include the internal bars +of the default histogram.

  • +
  • horizontal (bool) – Plot the histogram horizontally from x = 0 [Default is vertically from y = 0]. +The plot dimensions remain the same, but the two axes are flipped, i.e., the +x-axis is plotted vertically and the y-axis is plotted horizontally.

  • +
  • series (int, str, or list) – [min/max/]inc[+n]. +Set the interval for the width of each bar in the histogram.

  • +
  • histtype (int or str) –

    [type][+w]. +Choose between 6 types of histograms:

    +
      +
    • 0 = counts [Default]

    • +
    • 1 = frequency_percent

    • +
    • 2 = log (1.0 + count)

    • +
    • 3 = log (1.0 + frequency_percent)

    • +
    • 4 = log10 (1.0 + count)

    • +
    • 5 = log10 (1.0 + frequency_percent).

    • +
    +

    To use weights provided as a second data column instead of pure counts, +append +w.

    +

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • label (str) – Add a legend entry for the symbol or line being plotted. Full +documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#l-full.

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.histogram

+
+

Cartesian histograms

+
Cartesian histograms
+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+

Bit and hachure patterns

+
Bit and hachure patterns
+
+

Histogram

+
Histogram
+
+

Scatter plot with histograms

+
Scatter plot with histograms
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.hlines.html b/v0.14.0/api/generated/pygmt.Figure.hlines.html new file mode 100644 index 00000000000..ed4112da1ae --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.hlines.html @@ -0,0 +1,313 @@ + + + + + + + + + pygmt.Figure.hlines — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.hlines

+
+
+Figure.hlines(y, xmin=None, xmax=None, pen=None, label=None, no_clip=False, perspective=None)
+

Plot one or multiple horizontal line(s).

+

This method is a high-level wrapper around pygmt.Figure.plot that focuses on +plotting horizontal lines at Y-coordinates specified by the y parameter. The +y parameter can be a single value (for a single horizontal line) or a sequence +of values (for multiple horizontal lines).

+

By default, the X-coordinates of the start and end points of the lines are set to +be the X-limits of the current plot, but this can be overridden by specifying the +xmin and xmax parameters. xmin and xmax can be either a single +value or a sequence of values. If a single value is provided, it is applied to all +lines. If a sequence is provided, the length of xmin and xmax must match +the length of y.

+

The term “horizontal” lines can be interpreted differently in different coordinate +systems:

+
    +
  • Cartesian coordinate system: lines are plotted as straight lines.

  • +
  • Polar projection: lines are plotted as arcs along a constant radius.

  • +
  • Geographic projection: lines are plotted as parallels along constant latitude.

  • +
+
+
Parameters:
+
    +
  • y (float | Sequence[float]) – Y-coordinates to plot the lines. It can be a single value (for a single line) +or a sequence of values (for multiple lines).

  • +
  • xmin/xmax – X-coordinates of the start/end point(s) of the line(s). If None, defaults to +the X-limits of the current plot. xmin and xmax can be either a single +value or a sequence of values. If a single value is provided, it is applied to +all lines. If a sequence is provided, the length of xmin and xmax must +match the length of y.

  • +
  • pen (str | None, default: None) – Pen attributes for the line(s), in the format of width,color,style.

  • +
  • label (str | None, default: None) – Label for the line(s), to be displayed in the legend.

  • +
  • no_clip (bool, default: False) – If True, do not clip lines outside the plot region. Only makes sense in the +Cartesian coordinate system.

  • +
  • perspective (str | bool | None, default: None) – Select perspective view and set the azimuth and elevation angle of the +viewpoint. Refer to pygmt.Figure.plot for details.

  • +
+
+
+

Examples

+
>>> import pygmt
+>>> fig = pygmt.Figure()
+>>> fig.basemap(region=[0, 10, 0, 10], projection="X10c/10c", frame=True)
+>>> fig.hlines(y=1, pen="1p,black", label="Line at y=1")
+>>> fig.hlines(y=2, xmin=2, xmax=8, pen="1p,red,-", label="Line at y=2")
+>>> fig.hlines(y=[3, 4], xmin=3, xmax=7, pen="1p,black,.", label="Lines at y=3,4")
+>>> fig.hlines(y=[5, 6], xmin=4, xmax=9, pen="1p,red", label="Lines at y=5,6")
+>>> fig.hlines(
+...     y=[7, 8], xmin=[0, 1], xmax=[7, 8], pen="1p,blue", label="Lines at y=7,8"
+... )
+>>> fig.legend()
+>>> fig.show()
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.html b/v0.14.0/api/generated/pygmt.Figure.html new file mode 100644 index 00000000000..1428653af03 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.html @@ -0,0 +1,723 @@ + + + + + + + + + pygmt.Figure — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure

+
+
+class pygmt.Figure[source]
+

A GMT figure to handle all plotting.

+

Use the plotting methods of this class to add elements to the figure. You can +preview the figure using pygmt.Figure.show and save the figure to a file +using pygmt.Figure.savefig.

+

Examples

+
>>> import pygmt
+>>> fig = pygmt.Figure()
+>>> fig.basemap(region=[0, 360, -90, 90], projection="W15c", frame=True)
+>>> fig.savefig("my-figure.png")
+>>> # Make sure the figure file is generated and clean it up
+>>> from pathlib import Path
+>>> assert Path("my-figure.png").exists()
+>>> Path("my-figure.png").unlink()
+
+
+

The plot region can be specified through ISO country codes (for example, "JP" +for Japan):

+
>>> import pygmt
+>>> fig = pygmt.Figure()
+>>> fig.basemap(region="JP", projection="M7c", frame=True)
+>>> # The fig.region attribute shows the WESN bounding box for the figure
+>>> print(", ".join(f"{i:.2f}" for i in fig.region))
+122.94, 145.82, 20.53, 45.52
+
+
+
+ +

Attributes

+
+
+property Figure.region: ndarray
+

The geographic WESN bounding box for the current figure.

+
+ +

Methods Summary

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Figure.basemap(*[, region, projection, ...])

Plot base maps and frames for the figure.

Figure.coast(*[, area_thresh, frame, lakes, ...])

Plot continents, shorelines, rivers, and borders on maps.

Figure.colorbar(*[, frame, cmap, position, ...])

Plot colorbars on figures.

Figure.contour([data, x, y, z, annotation, ...])

Contour table data by direct triangulation.

Figure.grdcontour(grid, *[, annotation, ...])

Convert grids or images to contours and plot them on maps.

Figure.grdimage(grid, *[, frame, cmap, ...])

Project and plot grids or images.

Figure.grdview(grid, *[, region, ...])

Create 3-D perspective image or surface mesh from a grid.

Figure.histogram(data, *[, horizontal, ...])

Plot Cartesian histograms.

Figure.hlines(y[, xmin, xmax, pen, label, ...])

Plot one or multiple horizontal line(s).

Figure.image(imagefile, *[, position, box, ...])

Place images or EPS files on maps.

Figure.inset(*[, position, box, projection, ...])

Create an inset figure to be placed within a larger figure.

Figure.legend([spec, position, box])

Plot legends on maps.

Figure.logo(*[, region, projection, ...])

Plot the GMT logo.

Figure.meca(spec, scale[, convention, ...])

Plot focal mechanisms.

Figure.plot([data, x, y, size, symbol, ...])

Plot lines, polygons, and symbols in 2-D.

Figure.plot3d([data, x, y, z, size, symbol, ...])

Plot lines, polygons, and symbols in 3-D.

Figure.psconvert(*[, crop, gs_option, dpi, ...])

Convert [E]PS file(s) to other formats.

Figure.rose([data, length, azimuth, sector, ...])

Plot windrose diagrams or polar histograms.

Figure.savefig(fname[, transparent, crop, ...])

Save the figure to an image file.

Figure.set_panel([panel, fixedlabel, ...])

Set the current subplot panel to plot on.

Figure.shift_origin([xshift, yshift])

Shift plot origin in x and/or y directions.

Figure.show([method, dpi, width, waiting])

Display a preview of the figure.

Figure.solar([terminator, terminator_datetime])

Plot day-light terminators or twilights.

Figure.subplot([nrows, ncols, figsize, ...])

Create multi-panel subplot figures.

Figure.ternary(data[, alabel, blabel, clabel])

Plot ternary diagrams.

Figure.text([textfiles, x, y, position, ...])

Plot or typeset text strings of variable size, font type, and orientation.

Figure.tilemap(region[, zoom, source, ...])

Plot an XYZ tile map.

Figure.timestamp([text, label, justify, ...])

Plot the GMT timestamp logo.

Figure.velo([data, vector, frame, cmap, ...])

Plot velocity vectors, crosses, anisotropy bars, and wedges.

Figure.vlines(x[, ymin, ymax, pen, label, ...])

Plot one or multiple vertical line(s).

Figure.wiggle([data, x, y, z, fillpositive, ...])

Plot z=f(x,y) anomalies along tracks.

+
+

Examples using pygmt.Figure

+
+

1. Making your first figure

+
1. Making your first figure
+
+

2. Create a contour map

+
2. Create a contour map
+
+

3. Figure elements

+
3. Figure elements
+
+

4. PyGMT I/O: Table inputs

+
4. PyGMT I/O: Table inputs
+
+

Coastlines and borders

+
Coastlines and borders
+
+

Frames, ticks, titles, and labels

+
Frames, ticks, titles, and labels
+
+

Plotting data points

+
Plotting data points
+
+

Plotting lines

+
Plotting lines
+
+

Plotting polygons

+
Plotting polygons
+
+

Plotting text

+
Plotting text
+
+

Setting the region

+
Setting the region
+
+

Adding an inset to the figure

+
Adding an inset to the figure
+
+

Cartesian histograms

+
Cartesian histograms
+
+

Configuring PyGMT defaults

+
Configuring PyGMT defaults
+
+

Creating a 3-D perspective image

+
Creating a 3-D perspective image
+
+

Creating a map with contour lines

+
Creating a map with contour lines
+
+

Draping a dataset on top of a topographic surface

+
Draping a dataset on top of a topographic surface
+
+

Interactive data visualization using Panel

+
Interactive data visualization using Panel
+
+

Making subplots

+
Making subplots
+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+

Plotting Earth relief

+
Plotting Earth relief
+
+

Plotting datetime charts

+
Plotting datetime charts
+
+

Plotting vectors

+
Plotting vectors
+
+

Typesetting non-ASCII text

+
Typesetting non-ASCII text
+
+

Choropleth map

+
Choropleth map
+
+

Color land and water

+
Color land and water
+
+

Highlight country, continent and state polygons

+
Highlight country, continent and state polygons
+
+

Political boundaries

+
Political boundaries
+
+

Shorelines

+
Shorelines
+
+

Tile maps

+
Tile maps
+
+

Cartesian, circular, and geographic vectors

+
Cartesian, circular, and geographic vectors
+
+

Connection lines

+
Connection lines
+
+

Decorated lines

+
Decorated lines
+
+

Envelope

+
Envelope
+
+

Generate points along great circles

+
Generate points along great circles
+
+

GeoPandas: Plotting lines with LineString or MultiLineString geometry

+
GeoPandas: Plotting lines with LineString or MultiLineString geometry
+
+

Line colors with a custom CPT

+
Line colors with a custom CPT
+
+

Line fronts

+
Line fronts
+
+

Line segment caps and joints

+
Line segment caps and joints
+
+

Line styles

+
Line styles
+
+

Quoted lines

+
Quoted lines
+
+

Vector heads and tails

+
Vector heads and tails
+
+

Wiggle along tracks

+
Wiggle along tracks
+
+

Basic geometric symbols

+
Basic geometric symbols
+
+

Bit and hachure patterns

+
Bit and hachure patterns
+
+

Color points by categories

+
Color points by categories
+
+

Custom symbols

+
Custom symbols
+
+

Datetime inputs

+
Datetime inputs
+
+

Multi-parameter symbols

+
Multi-parameter symbols
+
+

Points

+
Points
+
+

Points with varying transparency

+
Points with varying transparency
+
+

Scatter plots with a legend

+
Scatter plots with a legend
+
+

Text symbols

+
Text symbols
+
+

Vertical or horizontal bars

+
Vertical or horizontal bars
+
+

Calculating grid gradient and radiance

+
Calculating grid gradient and radiance
+
+

Calculating grid gradient with custom azimuth and normalize parameters

+
Calculating grid gradient with custom azimuth and normalize parameters
+
+

Clipping grid values

+
Clipping grid values
+
+

Contours

+
Contours
+
+

Create ‘wet-dry’ mask grid

+
Create 'wet-dry' mask grid
+
+

Cross-section along a transect

+
Cross-section along a transect
+
+

Images on figures

+
Images on figures
+
+

RGB image

+
RGB image
+
+

Sampling along tracks

+
Sampling along tracks
+
+

3-D scatter plots

+
3-D scatter plots
+
+

Plotting a surface

+
Plotting a surface
+
+

Focal mechanisms

+
Focal mechanisms
+
+

Velocity arrows and confidence ellipses

+
Velocity arrows and confidence ellipses
+
+

Double Y-axes graph

+
Double Y-axes graph
+
+

Ternary diagram

+
Ternary diagram
+
+

Blockmean

+
Blockmean
+
+

Histogram

+
Histogram
+
+

Rose diagram

+
Rose diagram
+
+

Scatter plot with histograms

+
Scatter plot with histograms
+
+

Colorbar

+
Colorbar
+
+

Day-night terminator line and twilights

+
Day-night terminator line and twilights
+
+

Inset

+
Inset
+
+

Inset map showing a rectangular region

+
Inset map showing a rectangular region
+
+

Legend

+
Legend
+
+

Logo

+
Logo
+
+

Multiple colormaps

+
Multiple colormaps
+
+

Scale bar

+
Scale bar
+
+

Timestamp

+
Timestamp
+
+

Azimuthal equidistant projection

+
Azimuthal equidistant projection
+
+

General stereographic projection

+
General stereographic projection
+
+

Gnomonic projection

+
Gnomonic projection
+
+

Lambert azimuthal equal-area projection

+
Lambert azimuthal equal-area projection
+
+

Orthographic projection

+
Orthographic projection
+
+

Perspective projection

+
Perspective projection
+
+

Albers conic equal-area projection

+
Albers conic equal-area projection
+
+

Equidistant conic projection

+
Equidistant conic projection
+
+

Lambert conic conformal projection

+
Lambert conic conformal projection
+
+

Polyconic projection

+
Polyconic projection
+
+

Cassini cylindrical projection

+
Cassini cylindrical projection
+
+

Cylindrical equal-area projection

+
Cylindrical equal-area projection
+
+

Cylindrical equidistant projection

+
Cylindrical equidistant projection
+
+

Cylindrical stereographic projection

+
Cylindrical stereographic projection
+
+

Mercator projection

+
Mercator projection
+
+

Miller cylindrical projection

+
Miller cylindrical projection
+
+

Oblique Mercator projection

+
Oblique Mercator projection
+
+

Transverse Mercator projection

+
Transverse Mercator projection
+
+

Universal Transverse Mercator projection

+
Universal Transverse Mercator projection
+
+

Eckert IV equal-area projection

+
Eckert IV equal-area projection
+
+

Eckert VI equal-area projection

+
Eckert VI equal-area projection
+
+

Hammer projection

+
Hammer projection
+
+

Mollweide projection

+
Mollweide projection
+
+

Robinson projection

+
Robinson projection
+
+

Sinusoidal projection

+
Sinusoidal projection
+
+

Van der Grinten projection

+
Van der Grinten projection
+
+

Winkel Tripel projection

+
Winkel Tripel projection
+
+

Cartesian linear

+
Cartesian linear
+
+

Cartesian logarithmic

+
Cartesian logarithmic
+
+

Cartesian power

+
Cartesian power
+
+

Polar

+
Polar
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.image.html b/v0.14.0/api/generated/pygmt.Figure.image.html new file mode 100644 index 00000000000..96627d5678f --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.image.html @@ -0,0 +1,340 @@ + + + + + + + + + pygmt.Figure.image — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.image

+
+
+Figure.image(imagefile, *, position=None, box=None, bitcolor=None, projection=None, monochrome=None, region=None, verbose=None, panel=None, perspective=None, transparency=None, **kwargs)
+

Place images or EPS files on maps.

+

Reads an Encapsulated PostScript file or a raster image file and plots +it on a map.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/image.html

+

Aliases:

+
    +
  • D = position

  • +
  • F = box

  • +
  • G = bitcolor

  • +
  • J = projection

  • +
+
    +
  • M = monochrome

  • +
  • R = region

  • +
  • V = verbose

  • +
+
    +
  • c = panel

  • +
  • p = perspective

  • +
  • t = transparency

  • +
+
+
+
Parameters:
+
    +
  • imagefile (str) – This must be an Encapsulated PostScript (EPS) file or a raster +image. An EPS file must contain an appropriate BoundingBox. A +raster file can have a depth of 1, 8, 24, or 32 bits and is read +via GDAL. Note: If GDAL was not configured during GMT installation +then only EPS files are supported.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • position (str) – [g|j|J|n|x]refpoint+rdpi+w[-]width[/height][+jjustify][+nnx[/ny]][+odx[/dy]]. +Set reference point on the map for the image.

  • +
  • box (bool or str) – [+cclearances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]][+s[[dx/dy/][shade]]]. +If set to True, draw a rectangular border around the image +using MAP_FRAME_PEN.

  • +
  • bitcolor (str or list) – [color][+b|f|t]. +Change certain pixel values to another color or make them transparent. +For 1-bit images you can specify an alternate color for the +background (+b) or the foreground (+f) pixels, or give no color +to make those pixels transparent. Can be repeated with different +settings. Alternatively, for color images you can select a single +color that should be made transparent instead (+t).

  • +
  • monochrome (bool) – Convert color image to monochrome grayshades using the (television) +YIQ-transformation.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.image

+
+

Images on figures

+
Images on figures
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.inset.html b/v0.14.0/api/generated/pygmt.Figure.inset.html new file mode 100644 index 00000000000..93635c85149 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.inset.html @@ -0,0 +1,396 @@ + + + + + + + + + pygmt.Figure.inset — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.inset

+
+
+Figure.inset(*, position=None, box=None, projection=None, margin=None, no_clip=None, region=None, verbose=None, **kwargs)
+

Create an inset figure to be placed within a larger figure.

+

This method sets the position, frame, and margins for a smaller figure +inside of the larger figure. Plotting methods that are called within the +context manager are added to the inset figure.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/inset.html

+

Aliases:

+
    +
  • D = position

  • +
  • F = box

  • +
  • J = projection

  • +
+
    +
  • M = margin

  • +
  • N = no_clip

  • +
+
    +
  • R = region

  • +
  • V = verbose

  • +
+
+
+
Parameters:
+
    +
  • position (str or list) –

    xmin/xmax/ymin/ymax[+r][+uunit]] | [g|j|J|n|x]refpoint+wwidth[/height][+jjustify][+odx[/dy]].

    +

    This is the only required parameter. +Define the map inset rectangle on the map. Specify the rectangle +in one of three ways:

    +

    Append glon/lat for map (user) coordinates, +jcode or Jcode for setting the refpoint via a +2-character justification code that refers to the (invisible) +projected map bounding box, nxn/yn for normalized (0-1) +bounding box coordinates, or xx/y for plot +coordinates (inches, centimeters, points, append unit). +All but x requires both region and projection to be +specified. You can offset the reference point via ++odx/dy in the direction implied by code or ++jjustify.

    +

    Alternatively, give west/east/south/north of geographic +rectangle bounded by parallels and meridians; append +r if the +coordinates instead are the lower left and upper right corners of +the desired rectangle. (Or, give xmin/xmax/ymin/ymax of bounding +rectangle in projected coordinates and optionally +append +uunit [Default coordinate unit is meters (e)].

    +

    Append +wwidth[/height] of bounding rectangle or box +in plot coordinates (inches, centimeters, etc.). By default, the +anchor point on the scale is assumed to be the bottom left corner +(BL), but this can be changed by appending +j followed by +a 2-character justification code justify. +Note: If j is used then justify defaults to the same +as refpoint, if J is used then justify defaults to the +mirror opposite of refpoint. Specify inset box attributes via +the box parameter [Default is outline only].

    +

  • +
  • box (str or bool) – [+cclearances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]][+s[[dx/dy/][shade]]]. +If set to True, draw a rectangular box around the map +inset using the default pen; specify a different pen +with +ppen. Add +gfill to fill the inset box +[Default is no fill]. +Append +cclearance where clearance is either +gap, xgap/ygap, or lgap/rgap/bgap/tgap where these items are uniform, separate in x- and +y-directions, or individual side spacings between map embellishment +and border. Append +i to draw a secondary, inner border as well. +We use a uniform gap between borders of 2p and the default pen +unless other values are specified. Append +r to draw rounded +rectangular borders instead, with a 6p corner radius. You +can override this radius by appending another value. Append ++s to draw an offset background shaded region. Here, dx/dy +indicates the shift relative to the foreground frame [Default is +"4p/-4p"] and shade sets the fill style to use for +shading [Default is "gray50"].

  • +
  • margin (float, str, or list) – This is clearance that is added around the inside of the inset. +Plotting will take place within the inner region only. The margins +can be a single value, a pair of values separated (for setting +separate horizontal and vertical margins), or the full set of four +margins (for setting separate left, right, bottom, and top +margins). When passing multiple values, it can be either a list or +a string with the values separated by forward +slashes [Default is no margins].

  • +
  • no_clip (bool) – Do not clip features extruding outside the inset frame +boundaries [Default is False].

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
+
+
+

Examples

+
>>> import pygmt
+>>>
+>>> # Create the larger figure
+>>> fig = pygmt.Figure()
+>>> fig.coast(region="MG+r2", water="lightblue", shorelines="thin")
+>>> # Use a "with" statement to initialize the inset context manager
+>>> # Setting the position to top left and a width of 3.5 centimeters
+>>> with fig.inset(position="jTL+w3.5c+o0.2c", margin=0, box="+pgreen"):
+...     # Map elements under the "with" statement are plotted in the inset
+...     fig.coast(
+...         region="g",
+...         projection="G47/-20/3.5c",
+...         land="gray",
+...         water="white",
+...         dcw="MG+gred",
+...     )
+...
+>>> # Map elements outside the "with" statement are plotted in the main
+>>> # figure
+>>> fig.logo(position="jBR+o0.2c+w3c")
+>>> fig.show()
+
+
+
+ +
+

Examples using pygmt.Figure.inset

+
+

Adding an inset to the figure

+
Adding an inset to the figure
+
+

Inset

+
Inset
+
+

Inset map showing a rectangular region

+
Inset map showing a rectangular region
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.legend.html b/v0.14.0/api/generated/pygmt.Figure.legend.html new file mode 100644 index 00000000000..7ba08855254 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.legend.html @@ -0,0 +1,360 @@ + + + + + + + + + pygmt.Figure.legend — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.legend

+
+
+Figure.legend(spec=None, position='JTR+jTR+o0.2c', box='+gwhite+p1p', **kwargs)
+

Plot legends on maps.

+

Makes legends that can be overlaid on maps. Reads specific +legend-related information from an input file, or automatically creates +legend entries from plotted symbols that have labels. Unless otherwise +noted, annotations will be made using the primary annotation font and +size in effect (i.e., FONT_ANNOT_PRIMARY).

+

Full option list at https://docs.generic-mapping-tools.org/6.5/legend.html

+

Aliases:

+
    +
  • D = position

  • +
  • F = box

  • +
  • J = projection

  • +
+
    +
  • R = region

  • +
  • V = verbose

  • +
  • c = panel

  • +
+
    +
  • p = perspective

  • +
  • t = transparency

  • +
+
+
+
Parameters:
+
    +
  • spec (str | PurePath | StringIO | None, default: None) –

    The legend specification. It can be:

    +
      +
    • None which means using the automatically generated legend specification +file

    • +
    • A string or a pathlib.PurePath object pointing to the legend +specification file

    • +
    • A io.StringIO object containing the legend specification.

    • +
    +

    See https://docs.generic-mapping-tools.org/6.5/legend.html for the definition of the legend specification.

    +

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • position (str) – [g|j|J|n|x]refpoint+wwidth[/height][+jjustify][+lspacing][+odx[/dy]]. +Define the reference point on the map for the +legend. By default, uses JTR+jTR+o0.2c which +places the legend at the top-right corner inside the map frame, with a +0.2 cm offset.

  • +
  • box (bool or str) – [+cclearances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]][+s[[dx/dy/][shade]]]. +If set to True, draw a rectangular border around the legend +using MAP_FRAME_PEN. By default, uses ++gwhite+p1p which draws a box around the legend using a +1p black pen and adds a white background.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.legend

+
+

3. Figure elements

+
3. Figure elements
+
+

Cartesian histograms

+
Cartesian histograms
+
+

Scatter plots with a legend

+
Scatter plots with a legend
+
+

Double Y-axes graph

+
Double Y-axes graph
+
+

Legend

+
Legend
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.logo.html b/v0.14.0/api/generated/pygmt.Figure.logo.html new file mode 100644 index 00000000000..af203397b1a --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.logo.html @@ -0,0 +1,336 @@ + + + + + + + + + pygmt.Figure.logo — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + + + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.meca.html b/v0.14.0/api/generated/pygmt.Figure.meca.html new file mode 100644 index 00000000000..0dcbe8dee03 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.meca.html @@ -0,0 +1,461 @@ + + + + + + + + + pygmt.Figure.meca — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.meca

+
+
+Figure.meca(spec, scale, convention=None, component='full', longitude=None, latitude=None, depth=None, plot_longitude=None, plot_latitude=None, event_name=None, *, offset=None, frame=None, cmap=None, extensionfill=None, labelbox=None, compressionfill=None, projection=None, outline=None, no_clip=None, region=None, nodal=None, verbose=None, pen=None, panel=None, perspective=None, transparency=None, **kwargs)
+

Plot focal mechanisms.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/supplements/seis/meca.html

+

Aliases:

+
    +
  • A = offset

  • +
  • B = frame

  • +
  • C = cmap

  • +
  • E = extensionfill

  • +
  • Fr = labelbox

  • +
  • G = compressionfill

  • +
+
    +
  • J = projection

  • +
  • L = outline

  • +
  • N = no_clip

  • +
  • R = region

  • +
  • T = nodal

  • +
+
    +
  • V = verbose

  • +
  • W = pen

  • +
  • c = panel

  • +
  • p = perspective

  • +
  • t = transparency

  • +
+
+
+
Parameters:
+
    +
  • spec (str, 1-D numpy array, 2-D numpy array, dict, or pandas.DataFrame) –

    Data that contain focal mechanism parameters.

    +

    spec can be specified in either of the following types:

    +
      +
    • str: a file name containing focal mechanism parameters as columns. The +meaning of each column is:

      +
        +
      • Columns 1 and 2: event longitude and latitude

      • +
      • Column 3: event depth (in kilometers)

      • +
      • Columns 4 to 3+n: focal mechanism parameters. The number of columns n +depends on the choice of convention, which is described below.

      • +
      • Columns 4+n and 5+n: longitude and latitude at which to place the +beachball. 0 0 plots the beachball at the longitude and latitude +given in the columns 1 and 2. [optional; requires offset=True].

      • +
      • Last Column: text string to appear near the beachball [optional].

      • +
      +
    • +
    • 1-D np.array: focal mechanism parameters of a single event. +The meanings of columns are the same as above.

    • +
    • 2-D np.array: focal mechanism parameters of multiple events. +The meanings of columns are the same as above.

    • +
    • dict or pandas.DataFrame: The dict keys or +pandas.DataFrame column names determine the focal mechanism +convention. For the different conventions, the following combination of +keys / column names are required:

      +
        +
      • "aki": strike, dip, rake, magnitude

      • +
      • "gcmt": strike1, dip1, rake1, strike2, dip2, rake2, +mantissa, exponent

      • +
      • "mt": mrr, mtt, mff, mrt, mrf, mtf, exponent

      • +
      • "partial": strike1, dip1, strike2, fault_type, magnitude

      • +
      • "principal_axis": t_value, t_azimuth, t_plunge, n_value, +n_azimuth, n_plunge, p_value, p_azimuth, p_plunge, exponent

      • +
      +

      A dict may contain values for a single focal mechanism or lists of +values for multiple focal mechanisms.

      +

      Both dict and pandas.DataFrame may optionally contain the keys / +column names: latitude, longitude, depth, plot_longitude, +plot_latitude, and/or event_name.

      +
    • +
    +

    If spec is either a str or a 1-D or 2-D numpy array, the convention +parameter is required to interpret the columns. If spec is a dict or +a pandas.DataFrame, convention is not needed and ignored if +specified.

    +

  • +
  • scale (float or str) – scale[+aangle][+ffont][+jjustify][+l][+m][+odx[/dy]][+sreference]. +Adjust scaling of the radius of the beachball, which is proportional to the +magnitude. By default, scale defines the size for magnitude = 5 (i.e., scalar +seismic moment M0 = 4.0E23 dynes-cm). If +l is used the radius will be +proportional to the seismic moment instead. Use +s and give a reference +to change the reference magnitude (or moment), and use +m to plot all +beachballs with the same size. A text string can be specified to appear near +the beachball (corresponding to column or parameter event_name). Append ++aangle to change the angle of the text string; append +ffont +to change its font (size,fontname,color); append +jjustify to change +the text location relative to the beachball [Default is "TC", i.e., Top +Center]; append +o to offset the text string by dx/dy.

  • +
  • convention (str) –

    Focal mechanism convention. Choose from:

    +
      +
    • "aki" (Aki and Richards)

    • +
    • "gcmt" (global CMT)

    • +
    • "mt" (seismic moment tensor)

    • +
    • "partial" (partial focal mechanism)

    • +
    • "principal_axis" (principal axis)

    • +
    +

    Ignored if spec is a dict or pandas.DataFrame.

    +

  • +
  • component (str) –

    The component of the seismic moment tensor to plot.

    +
      +
    • "full": the full seismic moment tensor

    • +
    • "dc": the closest double couple defined from the moment tensor (zero +trace and zero determinant)

    • +
    • "deviatoric": deviatoric part of the moment tensor (zero trace)

    • +
    +

  • +
  • longitude/latitude/depth (float, list, or 1-D numpy array) – Longitude(s) / latitude(s) / depth(s) of the event(s). Length must match the +number of events. Overrides the longitude / latitude / depth values +in spec if spec is a dict or pandas.DataFrame.

  • +
  • plot_longitude/plot_latitude (float, str, list, or 1-D numpy array) – Longitude(s) / Latitude(s) at which to place the beachball(s). Length must match +the number of events. Overrides the plot_longitude / plot_latitude +values in spec if spec is a dict or pandas.DataFrame.

  • +
  • event_name (str, list of str, or 1-D numpy array) – Text string(s), e.g., event name(s) to appear near the beachball(s). Length +must match the number of events. Overrides the event_name labels in spec +if spec is a dict or pandas.DataFrame.

  • +
  • labelbox (bool or str) – [fill]. +Draw a box behind the label if given via event_name. Use fill to give a +fill color [Default is "white"].

  • +
  • offset (bool or str) – [+ppen][+ssize]. +Offset beachball(s) to the longitude(s) and latitude(s) specified in the last +two columns of the input file or array, or by plot_longitude and +plot_latitude if provided. A line from the beachball to the initial location +is drawn. Use +ssize to plot a small circle at the initial location and +to set the diameter of this circle [Default is no circle]. Use +ppen to +set the pen attributes for this feature [Default is set via pen]. The fill +of the circle is set via compressionfill or cmap, i.e., corresponds to +the fill of the compressive quadrants.

  • +
  • compressionfill (str) – Set color or pattern for filling compressive quadrants [Default is "black"]. +This setting also applies to the fill of the circle defined via offset.

  • +
  • extensionfill (str) – Set color or pattern for filling extensive quadrants [Default is "white"].

  • +
  • pen (str) – Set (default) pen attributes for all lines related to the beachball [Default is +"0.25p,black,solid"]. This setting applies to outline, nodal, and +offset, unless overruled by arguments passed to those parameters. Draws the +circumference of the beachball.

  • +
  • outline (bool or str) – [pen]. +Draw circumference and nodal planes of the beachball. Use pen to set the pen +attributes for this feature [Default is set via pen].

  • +
  • nodal (bool, int, or str) –

    [nplane][/pen]. +Plot the nodal planes and outline the bubble which is transparent. If nplane +is

    +
      +
    • 0 or True: both nodal planes are plotted [Default].

    • +
    • 1: only the first nodal plane is plotted.

    • +
    • 2: only the second nodal plane is plotted.

    • +
    +

    Use /pen to set the pen attributes for this feature [Default is set via +pen]. +For double couple mechanisms, nodal renders the beachball transparent by +drawing only the nodal planes and the circumference. For non-double couple +mechanisms, nodal=0 overlays best double couple transparently.

    +

  • +
  • cmap (str) – File name of a CPT file or a series of comma-separated colors (e.g., +color1,color2,color3) to build a linear continuous CPT from those colors +automatically. The color of the compressive quadrants is determined by the +z-value (i.e., event depth or the third column for an input file). This setting +also applies to the fill of the circle defined via offset.

  • +
  • no_clip (bool) – Do not skip symbols that fall outside the frame boundaries [Default is +False, i.e., plot symbols inside the frame boundaries only].

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.meca

+
+

Bit and hachure patterns

+
Bit and hachure patterns
+
+

Focal mechanisms

+
Focal mechanisms
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.plot.html b/v0.14.0/api/generated/pygmt.Figure.plot.html new file mode 100644 index 00000000000..89bac5d674a --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.plot.html @@ -0,0 +1,753 @@ + + + + + + + + + pygmt.Figure.plot — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.plot

+
+
+Figure.plot(data=None, x=None, y=None, size=None, symbol=None, direction=None, *, straight_line=None, frame=None, cmap=None, offset=None, error_bar=None, connection=None, fill=None, intensity=None, projection=None, close=None, no_clip=None, region=None, style=None, verbose=None, pen=None, zvalue=None, aspatial=None, binary=None, panel=None, nodata=None, find=None, coltypes=None, gap=None, header=None, incols=None, label=None, perspective=None, transparency=None, wrap=None, **kwargs)
+

Plot lines, polygons, and symbols in 2-D.

+

Takes a matrix, (x,y) pairs, or a file name as input and plots lines, +polygons, or symbols at those locations on a map.

+

Must provide either data or x/y.

+

If providing data through x/y, fill can be a 1-D array that +will be mapped to a colormap.

+

If a symbol is selected and no symbol size given, then plot will +interpret the third column of the input data as symbol size. Symbols +whose size is <= 0 are skipped. If no symbols are specified then the +symbol code (see style below) must be present as last column in the +input. If style is not used, a line connecting the data points will +be drawn instead. To explicitly close polygons, use close. Select a +fill with fill. If fill is set, pen will control whether the +polygon outline is drawn or not. If a symbol is selected, fill and +pen determine the fill and outline/no outline, respectively.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/plot.html

+

Aliases:

+
    +
  • A = straight_line

  • +
  • B = frame

  • +
  • C = cmap

  • +
  • D = offset

  • +
  • E = error_bar

  • +
  • F = connection

  • +
  • G = fill

  • +
  • I = intensity

  • +
  • J = projection

  • +
  • L = close

  • +
+
    +
  • N = no_clip

  • +
  • R = region

  • +
  • S = style

  • +
  • V = verbose

  • +
  • W = pen

  • +
  • Z = zvalue

  • +
  • a = aspatial

  • +
  • b = binary

  • +
  • c = panel

  • +
  • d = nodata

  • +
+
    +
  • e = find

  • +
  • f = coltypes

  • +
  • g = gap

  • +
  • h = header

  • +
  • i = incols

  • +
  • l = label

  • +
  • p = perspective

  • +
  • t = transparency

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in either a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data. +Use parameter incols to choose which columns are x, y, fill, and +size, respectively.

  • +
  • x/y (float or 1-D arrays) – The x and y coordinates, or arrays of x and y coordinates of the +data points

  • +
  • size (1-D array) – The size of the data points in units specified using style. +Only valid if using x/y.

  • +
  • symbol (1-D array) – The symbols of the data points. Only valid if using x/y.

  • +
  • direction (list of two 1-D arrays) – If plotting vectors (using style="V" or style="v"), then +should be a list of two 1-D arrays with the vector directions. These +can be angle and length, azimuth and length, or x and y components, +depending on the style options chosen.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • straight_line (bool or str) – [m|p|x|y]. +By default, geographic line segments are drawn as great circle +arcs. To draw them as straight lines, use +straight_line=True. +Alternatively, add m to draw the line by first following a +meridian, then a parallel. Or append p to start following a +parallel, then a meridian. (This can be practical to draw a line +along parallels, for example). For Cartesian data, points are +simply connected, unless you append x or y to draw +stair-case curves that whose first move is along x or y, +respectively.

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • cmap (str) – File name of a CPT file or a series of comma-separated colors +(e.g., color1,color2,color3) to build a linear continuous +CPT from those colors automatically.

  • +
  • offset (str) – dx/dy. +Offset the plot symbol or line locations by the given amounts +dx/dy [Default is no offset]. If dy is not given it is set +equal to dx.

  • +
  • error_bar (bool or str) – [x|y|X|Y][+a|A][+cl|f][+n][+wcap][+ppen]. +Draw error bars. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/plot.html#e.

  • +
  • connection (str) –

    [c|n|p][a|r|s|t|refpoint]. +Alter the way points are connected (by specifying a scheme) and data are +grouped (by specifying a method). Append one of three line connection schemes:

    +
      +
    • c: Draw continuous line segments for each group [Default].

    • +
    • n: Draw networks of line segments between all points in each group.

    • +
    • p: Draw line segments from a reference point reset for each group.

    • +
    +

    Optionally, append the one of four segmentation methods to define the group:

    +
      +
    • a: Ignore all segment headers, i.e., let all points belong to a single +group, and set group the reference point to the very first point of the first +file.

    • +
    • r: Segment headers are honored so each segment is a group; the group +reference point is reset after each record to the previous point (this method +is only available with the connection="p" scheme).

    • +
    • s: Same as r, but the group reference point is reset to the first +point of each incoming segment [Default].

    • +
    • t: Consider all data in each file to be a single separate group and reset +the group reference point to the first point of each group.

    • +
    +

    Instead of the codes a|r|s|t you may append the +coordinates of a refpoint which will serve as a fixed external reference point +for all groups.

    +

  • +
  • fill (str) – Set color or pattern for filling symbols or polygons +[Default is no fill]. +fill can be a 1-D array, but it is only valid if using x/y +and cmap=True is also required.

  • +
  • intensity (float, bool, or 1-D array) – Provide an intensity value (nominally in the -1 to +1 range) to +modulate the fill color by simulating illumination. If using +intensity=True, we will instead read intensity from the first +data column after the symbol parameters (if given). intensity can +also be a 1-D array to set varying intensity for symbols, but it is +only valid for x/y pairs.

  • +
  • close (str) – [+b|d|D][+xl|r|x0][+yl|r|y0][+ppen]. +Force closed polygons. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/plot.html#l.

  • +
  • no_clip (bool or str) – [c|r]. +Do not clip symbols that fall outside the frame boundaries +[Default plots points whose coordinates are strictly inside the +frame boundaries only]. +The parameter does not apply to lines and polygons which are always +clipped to the map region. For periodic (360-longitude) maps we +must plot all symbols twice in case they are clipped by the +repeating boundary. no_clip=True will turn off clipping and not +plot repeating symbols. Use no_clip="r" to turn off clipping +but retain the plotting of such repeating symbols, or use +no_clip="c" to retain clipping but turn off plotting of +repeating symbols.

  • +
  • style (str) – Plot symbols (including vectors, pie slices, fronts, decorated or +quoted lines).

  • +
  • pen (str) – Set pen attributes for lines or the outline of symbols.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • zvalue (str) – value|file. +Instead of specifying a symbol or polygon fill and outline color +via fill and pen, give both a value via zvalue and a +color lookup table via cmap. Alternatively, give the name of a +file with one z-value (read from the last column) for each +polygon in the input data. To apply it to the fill color, use +fill="+z". To apply it to the pen color, append +z to +pen.

  • +
  • aspatial (bool or str) – [col=]name[,…]. +Control how aspatial data are handled during input and output. +Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#aspatial-full.

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • gap (str or list) –

    x|y|z|d|X|Y|Dgap[u][+a][+ccol][+n|p]. +Examine the spacing between consecutive data points in order to +impose breaks in the line. To specify multiple criteria, provide +a list with each item containing a string describing one set of +criteria.

    +
    +
      +
    • x|X - define a gap when there is a large enough +change in the x coordinates (upper case to use projected +coordinates).

    • +
    • y|Y - define a gap when there is a large enough +change in the y coordinates (upper case to use projected +coordinates).

    • +
    • d|D - define a gap when there is a large enough +distance between coordinates (upper case to use projected +coordinates).

    • +
    • z - define a gap when there is a large enough change in +the z data. Use +ccol to change the z data column +[Default col is 2 (i.e., 3rd column)].

    • +
    +
    +

    A unit u may be appended to the specified gap:

    +
    +
      +
    • For geographic data (x|y|d), the unit may +be arc- d(egrees), m(inutes), and s(econds) +, or (m)e(ters), f(eet), k(ilometers), +M(iles), or n(autical miles) [Default is +(m)e(ters)].

    • +
    • For projected data (X|Y|D), the unit may be +i(nches), c(entimeters), or p(oints).

    • +
    +
    +

    Append modifier +a to specify that all the criteria must be +met [default imposes breaks if any one criterion is met].

    +

    One of the following modifiers can be appended:

    +
    +
      +
    • +n - specify that the previous value minus the current +column value must exceed gap for a break to be imposed.

    • +
    • +p - specify that the current value minus the previous +value must exceed gap for a break to be imposed.

    • +
    +
    +

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • label (str) – Add a legend entry for the symbol or line being plotted. Full +documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#l-full.

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing). +transparency can also be a 1-D array to set varying +transparency for symbols, but this option is only valid if using +x/y.

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.plot

+
+

3. Figure elements

+
3. Figure elements
+
+

4. PyGMT I/O: Table inputs

+
4. PyGMT I/O: Table inputs
+
+

Plotting data points

+
Plotting data points
+
+

Plotting lines

+
Plotting lines
+
+

Plotting polygons

+
Plotting polygons
+
+

Plotting text

+
Plotting text
+
+

Plotting datetime charts

+
Plotting datetime charts
+
+

Plotting vectors

+
Plotting vectors
+
+

Choropleth map

+
Choropleth map
+
+

Cartesian, circular, and geographic vectors

+
Cartesian, circular, and geographic vectors
+
+

Connection lines

+
Connection lines
+
+

Decorated lines

+
Decorated lines
+
+

Envelope

+
Envelope
+
+

Generate points along great circles

+
Generate points along great circles
+
+

GeoPandas: Plotting lines with LineString or MultiLineString geometry

+
GeoPandas: Plotting lines with LineString or MultiLineString geometry
+
+

Line colors with a custom CPT

+
Line colors with a custom CPT
+
+

Line fronts

+
Line fronts
+
+

Line segment caps and joints

+
Line segment caps and joints
+
+

Line styles

+
Line styles
+
+

Quoted lines

+
Quoted lines
+
+

Vector heads and tails

+
Vector heads and tails
+
+

Basic geometric symbols

+
Basic geometric symbols
+
+

Bit and hachure patterns

+
Bit and hachure patterns
+
+

Color points by categories

+
Color points by categories
+
+

Custom symbols

+
Custom symbols
+
+

Datetime inputs

+
Datetime inputs
+
+

Multi-parameter symbols

+
Multi-parameter symbols
+
+

Points

+
Points
+
+

Points with varying transparency

+
Points with varying transparency
+
+

Scatter plots with a legend

+
Scatter plots with a legend
+
+

Text symbols

+
Text symbols
+
+

Vertical or horizontal bars

+
Vertical or horizontal bars
+
+

Cross-section along a transect

+
Cross-section along a transect
+
+

Sampling along tracks

+
Sampling along tracks
+
+

Double Y-axes graph

+
Double Y-axes graph
+
+

Blockmean

+
Blockmean
+
+

Scatter plot with histograms

+
Scatter plot with histograms
+
+

Inset map showing a rectangular region

+
Inset map showing a rectangular region
+
+

Legend

+
Legend
+
+

Cartesian linear

+
Cartesian linear
+
+

Cartesian logarithmic

+
Cartesian logarithmic
+
+

Cartesian power

+
Cartesian power
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.plot3d.html b/v0.14.0/api/generated/pygmt.Figure.plot3d.html new file mode 100644 index 00000000000..db25a8bf068 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.plot3d.html @@ -0,0 +1,604 @@ + + + + + + + + + pygmt.Figure.plot3d — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.plot3d

+
+
+Figure.plot3d(data=None, x=None, y=None, z=None, size=None, symbol=None, direction=None, *, straight_line=None, frame=None, cmap=None, offset=None, fill=None, intensity=None, projection=None, zscale=None, zsize=None, close=None, no_clip=None, no_sort=None, region=None, style=None, verbose=None, pen=None, zvalue=None, aspatial=None, binary=None, panel=None, nodata=None, find=None, coltypes=None, gap=None, header=None, incols=None, label=None, perspective=None, transparency=None, wrap=None, **kwargs)
+

Plot lines, polygons, and symbols in 3-D.

+

Takes a matrix, (x, y, z) triplets, or a file name as input and plots +lines, polygons, or symbols at those locations in 3-D.

+

Must provide either data or x, y, and z.

+

If providing data through x, y, and z, fill can be a +1-D array that will be mapped to a colormap.

+

If a symbol is selected and no symbol size given, then plot3d will +interpret the fourth column of the input data as symbol size. Symbols +whose size is <= 0 are skipped. If no symbols are specified then the +symbol code (see style below) must be present as last column in the +input. If style is not used, a line connecting the data points will +be drawn instead. To explicitly close polygons, use close. Select a +fill with fill. If fill is set, pen will control whether the +polygon outline is drawn or not. If a symbol is selected, fill and +pen determine the fill and outline/no outline, respectively.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/plot3d.html

+

Aliases:

+
    +
  • A = straight_line

  • +
  • B = frame

  • +
  • C = cmap

  • +
  • D = offset

  • +
  • G = fill

  • +
  • I = intensity

  • +
  • J = projection

  • +
  • JZ = zsize

  • +
  • Jz = zscale

  • +
  • L = close

  • +
+
    +
  • N = no_clip

  • +
  • Q = no_sort

  • +
  • R = region

  • +
  • S = style

  • +
  • V = verbose

  • +
  • W = pen

  • +
  • Z = zvalue

  • +
  • a = aspatial

  • +
  • b = binary

  • +
  • c = panel

  • +
+
    +
  • d = nodata

  • +
  • e = find

  • +
  • f = coltypes

  • +
  • g = gap

  • +
  • h = header

  • +
  • i = incols

  • +
  • l = label

  • +
  • p = perspective

  • +
  • t = transparency

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Either a data file name, a 2-D numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data. +Optionally, use parameter incols to specify which columns are x, y, +z, fill, and size, respectively.

  • +
  • x/y/z (float or 1-D arrays) – The x, y, and z coordinates, or arrays of x, y and z coordinates of +the data points.

  • +
  • size (1-D array) – The size of the data points in units specified in style. +Only valid if using x/y/z.

  • +
  • symbol (1-D array) – The symbols of the data points. Only valid if using x/y.

  • +
  • direction (list of two 1-D arrays) – If plotting vectors (using style="V" or style="v"), then +should be a list of two 1-D arrays with the vector directions. These +can be angle and length, azimuth and length, or x and y components, +depending on the style options chosen.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • zscale/zsize (float or str) – Set z-axis scaling or z-axis size.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • straight_line (bool or str) – [m|p|x|y]. +By default, geographic line segments are drawn as great circle +arcs. To draw them as straight lines, use straight_line. +Alternatively, add m to draw the line by first following a +meridian, then a parallel. Or append p to start following a +parallel, then a meridian. (This can be practical to draw a line +along parallels, for example). For Cartesian data, points are +simply connected, unless you append x or y to draw +stair-case curves that whose first move is along x or y, +respectively. Note: The straight_line parameter requires +constant z-coordinates.

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • cmap (str) – File name of a CPT file or a series of comma-separated colors +(e.g., color1,color2,color3) to build a linear continuous +CPT from those colors automatically.

  • +
  • offset (str) – dx/dy[/dz]. +Offset the plot symbol or line locations by the given amounts +dx/dy[/dz] [Default is no offset].

  • +
  • fill (str) – Set color or pattern for filling symbols or polygons +[Default is no fill]. +fill can be a 1-D array, but it is only valid if using x/y +and cmap=True is also required.

  • +
  • intensity (float, bool, or 1-D array) – Provide an intensity value (nominally in the -1 to +1 range) to +modulate the fill color by simulating illumination. If using +intensity=True, we will instead read intensity from the first +data column after the symbol parameters (if given). intensity can +also be a 1-D array to set varying intensity for symbols, but it is +only valid for x/y/z.

  • +
  • close (str) – [+b|d|D][+xl|r|x0][+yl|r|y0][+ppen]. +Force closed polygons. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/plot3d.html#l.

  • +
  • no_clip (bool or str) – [c|r]. +Do not clip symbols that fall outside the frame boundaries +[Default plots points whose coordinates are strictly inside the +frame boundaries only]. +This parameter does not apply to lines and polygons which are always +clipped to the map region. For periodic (360° longitude) maps we +must plot all symbols twice in case they are clipped by the +repeating boundary. no_clip=True will turn off clipping and not +plot repeating symbols. Use no_clip="r" to turn off clipping +but retain the plotting of such repeating symbols, or use +no_clip="c" to retain clipping but turn off plotting of +repeating symbols.

  • +
  • no_sort (bool) – Turn off the automatic sorting of items based on their distance +from the viewer. The default is to sort the items so that items in +the foreground are plotted after items in the background.

  • +
  • style (str) – Plot symbols. Full documentation is at https://docs.generic-mapping-tools.org/6.5/plot3d.html#s.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • pen (str) – Set pen attributes for lines or the outline of symbols.

  • +
  • zvalue (str) – value|file. +Instead of specifying a symbol or polygon fill and outline color +via fill and pen, give both a value via zvalue and a +color lookup table via cmap. Alternatively, give the name of a +file with one z-value (read from the last column) for each +polygon in the input data. To apply it to the fill color, use +fill="+z". To apply it to the pen color, append +z to +pen.

  • +
  • aspatial (bool or str) – [col=]name[,…]. +Control how aspatial data are handled during input and output. +Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#aspatial-full.

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • gap (str or list) –

    x|y|z|d|X|Y|Dgap[u][+a][+ccol][+n|p]. +Examine the spacing between consecutive data points in order to +impose breaks in the line. To specify multiple criteria, provide +a list with each item containing a string describing one set of +criteria.

    +
    +
      +
    • x|X - define a gap when there is a large enough +change in the x coordinates (upper case to use projected +coordinates).

    • +
    • y|Y - define a gap when there is a large enough +change in the y coordinates (upper case to use projected +coordinates).

    • +
    • d|D - define a gap when there is a large enough +distance between coordinates (upper case to use projected +coordinates).

    • +
    • z - define a gap when there is a large enough change in +the z data. Use +ccol to change the z data column +[Default col is 2 (i.e., 3rd column)].

    • +
    +
    +

    A unit u may be appended to the specified gap:

    +
    +
      +
    • For geographic data (x|y|d), the unit may +be arc- d(egrees), m(inutes), and s(econds) +, or (m)e(ters), f(eet), k(ilometers), +M(iles), or n(autical miles) [Default is +(m)e(ters)].

    • +
    • For projected data (X|Y|D), the unit may be +i(nches), c(entimeters), or p(oints).

    • +
    +
    +

    Append modifier +a to specify that all the criteria must be +met [default imposes breaks if any one criterion is met].

    +

    One of the following modifiers can be appended:

    +
    +
      +
    • +n - specify that the previous value minus the current +column value must exceed gap for a break to be imposed.

    • +
    • +p - specify that the current value minus the previous +value must exceed gap for a break to be imposed.

    • +
    +
    +

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • label (str) – Add a legend entry for the symbol or line being plotted. Full +documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#l-full.

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing). +transparency can also be a 1-D array to set varying +transparency for symbols, but this option is only valid if using +x/y/z.

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.plot3d

+
+

3-D scatter plots

+
3-D scatter plots
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.psconvert.html b/v0.14.0/api/generated/pygmt.Figure.psconvert.html new file mode 100644 index 00000000000..e596c636d7b --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.psconvert.html @@ -0,0 +1,351 @@ + + + + + + + + + pygmt.Figure.psconvert — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.psconvert

+
+
+Figure.psconvert(*, crop=None, gs_option=None, dpi=None, prefix=None, gs_path=None, resize=None, bb_style=None, fmt=None, anti_aliasing=None, verbose=None, **kwargs)
+

Convert [E]PS file(s) to other formats.

+

Converts one or more PostScript files to other formats (BMP, EPS, JPEG, +PDF, PNG, PPM, TIFF) using Ghostscript.

+

If no input files are given, will convert the current active figure +(see pygmt.Figure). In this case, an output name must be given +using parameter prefix.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/psconvert.html

+

Aliases:

+
    +
  • A = crop

  • +
  • C = gs_option

  • +
  • E = dpi

  • +
  • F = prefix

  • +
+
    +
  • G = gs_path

  • +
  • I = resize

  • +
  • N = bb_style

  • +
+
    +
  • Q = anti_aliasing

  • +
  • T = fmt

  • +
  • V = verbose

  • +
+
+
+
Parameters:
+
    +
  • crop (str or bool) – Adjust the BoundingBox and HiResBoundingBox to the minimum +required by the image content. Default is True. Append +u to +first remove any GMT-produced time-stamps. Append +r to +round the HighResBoundingBox instead of using the ceil +function. This is going against Adobe Law but can be useful when +creating very small images where the difference of one pixel +might matter. If verbose is used we also report the +dimensions of the final illustration.

  • +
  • gs_path (str) – Full path to the Ghostscript executable.

  • +
  • gs_option (str) – Specify a single, custom option that will be passed on to +Ghostscript as is.

  • +
  • dpi (int) – Set raster resolution in dpi. Default is 720 for PDF, 300 for +others.

  • +
  • prefix (str) – Force the output file name. By default output names are constructed +using the input names as base, which are appended with an +appropriate extension. Use this option to provide a different name, +but without extension. Extension is still determined automatically.

  • +
  • resize (str) – [+mmargins][+s[m]width[/height]][+Sscale]. +Adjust the BoundingBox and HiResBoundingBox by scaling and/or +adding margins. Append +m to specify extra margins to extend +the bounding box. Give either one (uniform), two (x and y) or four +(individual sides) margins; append unit [Default is set by +PROJ_LENGTH_UNIT]. Append +swidth to resize the +output image to exactly width units. The default unit is set by +PROJ_LENGTH_UNIT but you can append a new unit and/or +impose different width and height (Note: This may change the +image aspect ratio). What happens here is that Ghostscript will do +the re-interpolation work and the final image will retain the DPI +resolution set by dpi. Append +sm to set a maximum size +and the new width is only imposed if the original figure width +exceeds it. Append /height to also impose a maximum height in +addition to the width. Alternatively, append +Sscale to +scale the image by a constant factor.

  • +
  • bb_style (str) – Set optional BoundingBox fill color, fading, or draw the outline +of the BoundingBox. Append +ffade to fade the entire plot +towards black (100%) [no fading, 0]. Append +gpaint to +paint the BoundingBox behind the illustration and append +p[pen] to draw the BoundingBox outline (append a pen or accept +the default pen of "0.25p,black,solid"). Note: If both +g and ++f are used then we use paint as the fade color instead of +black. Append +i to enforce gray-shades by using ICC profiles.

  • +
  • anti_aliasing (str) – [g|p|t][1|2|4]. +Set the anti-aliasing options for graphics or text. +Append the size of the subsample box (1, 2, or 4) [Default is +"4"]. [Default is no anti-aliasing (same as bits = 1).]

  • +
  • fmt (str) – Set the output format, where b means BMP, e means EPS, +E means EPS with PageSize command, f means PDF, F means +multi-page PDF, j means JPEG, g means PNG, G means +transparent PNG (untouched regions are transparent), m means +PPM, and t means TIFF [Default is JPEG]. To +b|j|g|t, optionally append +m in +order to get a monochrome (grayscale) image. The EPS format can be +combined with any of the other formats. For example, ef creates +both an EPS and a PDF file. Using F creates a multi-page PDF +file from the list of input PS or PDF files. It requires the +prefix parameter.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.rose.html b/v0.14.0/api/generated/pygmt.Figure.rose.html new file mode 100644 index 00000000000..535a17f041f --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.rose.html @@ -0,0 +1,553 @@ + + + + + + + + + pygmt.Figure.rose — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.rose

+
+
+Figure.rose(data=None, length=None, azimuth=None, *, sector=None, frame=None, cmap=None, shift=None, vectors=None, no_scale=None, fill=None, inquire=None, diameter=None, labels=None, vector_params=None, alpha=None, region=None, norm=None, orientation=None, verbose=None, pen=None, scale=None, binary=None, nodata=None, find=None, header=None, incols=None, panel=None, perspective=None, transparency=None, wrap=None, **kwargs)
+

Plot windrose diagrams or polar histograms.

+

Takes a matrix, (length,azimuth) pairs, or a file name as input +and plots windrose diagrams or polar histograms (sector diagram +or rose diagram).

+

Must provide either data or length and azimuth.

+

Options include full circle and half circle plots. The outline +of the windrose is drawn with the same color as +MAP_DEFAULT_PEN.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/rose.html

+

Aliases:

+
    +
  • A = sector

  • +
  • B = frame

  • +
  • C = cmap

  • +
  • D = shift

  • +
  • Em = vectors

  • +
  • F = no_scale

  • +
  • G = fill

  • +
  • I = inquire

  • +
  • JX = diameter

  • +
+
    +
  • L = labels

  • +
  • M = vector_params

  • +
  • Q = alpha

  • +
  • R = region

  • +
  • S = norm

  • +
  • T = orientation

  • +
  • V = verbose

  • +
  • W = pen

  • +
  • Z = scale

  • +
+
    +
  • b = binary

  • +
  • c = panel

  • +
  • d = nodata

  • +
  • e = find

  • +
  • h = header

  • +
  • i = incols

  • +
  • p = perspective

  • +
  • t = transparency

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in either a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data. +Use parameter incols to choose which columns are length and +azimuth, respectively. If a file with only azimuths is given, use +incols to indicate the single column with azimuths; then all +lengths are set to unity (see scale="u" to set actual +lengths to unity as well).

  • +
  • length/azimuth (float or 1-D arrays) – Length and azimuth values, or arrays of length and azimuth +values.

  • +
  • orientation (bool) – Specify that the input data are orientation data (i.e., have a +180 degree ambiguity) instead of true 0-360 degree directions +[Default is 0-360 degrees]. We compensate by counting each record +twice: First as azimuth and second as azimuth +180. Ignored if +region is given as (-90, 90) or (0, 180).

  • +
  • region (str or list) – r0/r1/az0/az1 or [r0, r1, az0, az1]. +Required if this is the first plot command. +Specify the region of interest in (r, azimuth) space. +Here, r0 is 0 and r1 is the maximal length in units. +For az0 and az1, specify either (-90, 90) or (0, 180) for +half circle plot or (0, 360) for full circle.

  • +
  • diameter (str) – Set the diameter of the rose diagram. If not given, +then we default to a diameter of 7.5 cm.

  • +
  • sector (float or str) – Give the sector width in degrees for sector and rose diagram. +Default 0 means windrose diagram. Append +r to draw rose +diagram instead of sector diagram (e.g. "10+r").

  • +
  • norm (bool) – Normalize input radii (or bin counts if sector is used) +by the largest value so all radii (or bin counts) range from 0 +to 1.

  • +
  • frame (str) – Set map boundary frame and axes attributes. Remember that x +here is radial distance and y is azimuth. The y label may be +used to plot a figure caption. The scale bar length is determined +by the radial gridline spacing.

  • +
  • scale (float or str) – Multiply the data radii by scale. E.g., use scale=0.001 to +convert your data from m to km. To exclude the radii from +consideration, set them all to unity with scale="u" +[Default is no scaling].

  • +
  • fill (str) – Set color or pattern for filling sectors [Default is no fill].

  • +
  • cmap (str) – Give a CPT. The r-value for each sector is used to look-up the +sector color. Cannot be used with a rose diagram.

  • +
  • pen (str) – Set pen attributes for sector outline or rose plot, e.g. +pen="0.5p". [Default is no outline]. To change pen used to +draw vector (requires vectors) [Default is same as sector +outline] use e.g. pen="v0.5p".

  • +
  • labels (str) – wlabel,elabel,slabel,nlabel. +Specify labels for the 0, 90, 180, and 270 degree marks. +For full-circle plot the default is +"West,East,South,North" and for half-circle the default +is "90W,90E,-,0". A "-" in any entry disables that +label (e.g. labels="W,E,-,N"). Use labels="" to +disable all four labels. Note that the +GMT_LANGUAGE setting will affect the words used.

  • +
  • no_scale (bool) – Do NOT draw the scale length bar (no_scale=True). +Default plots scale in lower right corner provided frame +is used.

  • +
  • shift (bool) – Shift sectors so that they are centered on the bin interval +(e.g., first sector is centered on 0 degrees).

  • +
  • vectors (str) – mode_file. +Plot vectors showing the principal directions given in +the mode_file file. +Alternatively, specify vectors to compute and plot +mean direction. See vector_params to control the vector +attributes. Finally, to instead save the computed mean +direction and other statistics, use +vectors="+wmode_file". The eight items saved to +a single record are: mean_az, mean_r, mean_resultant, +max_r, scaled_mean_r, length_sum, n, sign@alpha, +where the last term is 0 or 1 depending on whether the mean +resultant is significant at the level of confidence set via +alpha.

  • +
  • vector_params (str) – Used with vectors to modify vector parameters. For +vector heads, append vector head size [Default is 0, i.e., a +line]. See https://docs.generic-mapping-tools.org/6.5/rose.html#vector-attributes for +specifying additional attributes. If vectors is not +given and the current plot mode is to draw a windrose diagram +then using vector_params will add vector heads to all +individual directions using the supplied attributes.

  • +
  • alpha (float or str) –

    Set the confidence level used to determine if the mean +resultant is significant (i.e., Lord Rayleigh test for +uniformity) [Default is alpha=0.05]. Note: The +critical values are approximated [Berens, 2009] and requires +at least 10 points; the critical resultants are accurate to +at least 3 significant digits. For smaller data sets you +should consult exact statistical tables.

    +

    Berens, P., 2009, CircStat: A MATLAB Toolbox for Circular +Statistics, J. Stat. Software, 31(10), 1-21, +https://doi.org/10.18637/jss.v031.i10.

    +

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.rose

+
+

Bit and hachure patterns

+
Bit and hachure patterns
+
+

Rose diagram

+
Rose diagram
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.savefig.html b/v0.14.0/api/generated/pygmt.Figure.savefig.html new file mode 100644 index 00000000000..638c2cf7ba3 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.savefig.html @@ -0,0 +1,298 @@ + + + + + + + + + pygmt.Figure.savefig — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.savefig

+
+
+Figure.savefig(fname, transparent=False, crop=True, anti_alias=True, show=False, worldfile=False, **kwargs)[source]
+

Save the figure to an image file.

+

Supported image formats and their extensions:

+

Raster image formats

+
    +
  • BMP (.bmp)

  • +
  • JPEG (.jpg or .jpeg)

  • +
  • GeoTIFF (.tiff)

  • +
  • PNG (.png)

  • +
  • PPM (.ppm)

  • +
  • TIFF (.tif)

  • +
+

Vector image formats

+
    +
  • EPS (.eps)

  • +
  • PDF (.pdf)

  • +
+

Besides the above formats, you can also save the figure to a KML file +(.kml), with a companion PNG file generated automatically. The KML file can +be viewed in Google Earth.

+

You can pass in any keyword arguments that pygmt.Figure.psconvert +accepts.

+
+
Parameters:
+
    +
  • fname (str | PurePath) – The desired figure file name, including the extension. See the list of +supported formats and their extensions above.

  • +
  • transparent (bool, default: False) – Use a transparent background for the figure. Only valid for PNG format and +the PNG file asscoiated with KML format.

  • +
  • crop (bool, default: True) – Crop the figure canvas (page) to the plot area.

  • +
  • anti_alias (bool, default: True) – Use anti-aliasing when creating raster images. Ignored if creating vector +images. More specifically, it passes the arguments "t2" and "g2" to +the anti_aliasing parameter of pygmt.Figure.psconvert.

  • +
  • show (bool, default: False) – Display the figure in an external viewer.

  • +
  • worldfile (bool, default: False) – Create a companion world file +for the figure. The world file will have the same name as the figure file +but with different extension (e.g., .tfw for .tif). See +https://en.wikipedia.org/wiki/World_file#Filename_extension for the +convention of world file extensions. This parameter only works for raster +image formats (except GeoTIFF).

  • +
  • **kwargs (dict) – Additional keyword arguments passed to pygmt.Figure.psconvert. Valid +parameters are dpi, gs_path, gs_option, resize, +bb_style, and verbose.

  • +
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.set_panel.html b/v0.14.0/api/generated/pygmt.Figure.set_panel.html new file mode 100644 index 00000000000..3f980a8f94f --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.set_panel.html @@ -0,0 +1,329 @@ + + + + + + + + + pygmt.Figure.set_panel — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.set_panel

+
+
+Figure.set_panel(panel=None, *, fixedlabel=None, clearance=None, verbose=None, **kwargs)
+

Set the current subplot panel to plot on.

+

Before you start plotting you must first select the active subplot. +Note: If any projection option is passed with the question mark +? as scale or width when plotting subplots, then the dimensions of +the map are automatically determined by the subplot size and your +region. For Cartesian plots: If you want the scale to apply equally to +both dimensions then you must specify projection="x" [The default +projection="X" will fill the subplot by using unequal scales].

+

Aliases:

+
    +
  • A = fixedlabel

  • +
+
    +
  • C = clearance

  • +
+
    +
  • V = verbose

  • +
+
+
+
Parameters:
+
    +
  • panel (str or list) – row,col|index. +Sets the current subplot until further notice. Note: First row +or col is 0, not 1. If not given we go to the next subplot by order +specified via autolabel in pygmt.Figure.subplot. As an +alternative, you may bypass using pygmt.Figure.set_panel and +instead supply the common option panel=[row,col] to the first +plot command you issue in that subplot. GMT maintains information about +the current figure and subplot. Also, you may give the one-dimensional +index instead which starts at 0 and follows the row or column order +set via autolabel in pygmt.Figure.subplot.

  • +
  • fixedlabel (str) – Overrides the automatic labeling with the given string. No modifiers +are allowed. Placement, justification, etc. are all inherited from how +autolabel was specified by the initial pygmt.Figure.subplot +command.

  • +
  • clearance (str or list) – [side]clearance. +Reserve a space of dimension clearance between the margin and the +subplot on the specified side, using side values from w, e, +s, or n. The option is repeatable to set aside space on more +than one side (e.g. clearance=["w1c", "s2c"] would set a clearance +of 1 cm on west side and 2 cm on south side). Such space will be left +untouched by the main map plotting but can be accessed by methods that +plot scales, bars, text, etc. This setting overrides the common +clearances set by clearance in the initial +pygmt.Figure.subplot call.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.set_panel

+
+

Making subplots

+
Making subplots
+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+

Vertical or horizontal bars

+
Vertical or horizontal bars
+
+

Multiple colormaps

+
Multiple colormaps
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.shift_origin.html b/v0.14.0/api/generated/pygmt.Figure.shift_origin.html new file mode 100644 index 00000000000..51077197f05 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.shift_origin.html @@ -0,0 +1,347 @@ + + + + + + + + + pygmt.Figure.shift_origin — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.shift_origin

+
+
+Figure.shift_origin(xshift=None, yshift=None)
+

Shift plot origin in x and/or y directions.

+

This method shifts the plot origin relative to the current origin by xshift and +yshift in x and y directions, respectively. Optionally, append the length unit +(c for centimeters, i for inches, or p for points) to the shifts. +Default unit if not explicitly given is c, but can be changed to other units via +PROJ_LENGTH_UNIT.

+

For xshift, a special character w can also be used, which represents the +bounding box width of the previous plot. The full syntax is +[[±][f]w[/d]±]xoff, where optional signs, factor f and divisor +d can be used to compute an offset that may be adjusted further by ±xoff. +Assuming that the previous plot has a width of 10 centimeters, here are some example +values for xshift:

+
    +
  • "w": x-shift is 10 cm

  • +
  • "w+2c": x-shift is 10+2=12 cm

  • +
  • "2w+3c": x-shift is 2*10+3=23 cm

  • +
  • "w/2-2c": x-shift is 10/2-2=3 cm

  • +
+

Similarly, for yshift, a special character h can also be used, which is the +bounding box height of the previous plot.

+

Note: The previous plot bounding box refers to the last object plotted, which +may be a basemap, image, logo, legend, colorbar, etc.

+
+
Parameters:
+
    +
  • xshift (float | str | None, default: None) – Shift plot origin in x direction.

  • +
  • yshift (float | str | None, default: None) – Shift plot origin in y direction.

  • +
+
+
+

Examples

+
>>> import pygmt
+>>> fig = pygmt.Figure()
+>>> fig.basemap(region=[0, 10, 0, 10], projection="X10c/10c", frame=True)
+>>> # Shift the plot origin in x direction by 12 cm
+>>> fig.shift_origin(xshift=12)
+>>> fig.basemap(region=[0, 10, 0, 10], projection="X14c/10c", frame=True)
+>>> # Shift the plot origin in x direction based on the previous plot width
+>>> # Here, the width is 14 cm, and xshift is 16 cm
+>>> fig.shift_origin(xshift="w+2c")
+>>> fig.show()
+
+
+
+ +
+

Examples using pygmt.Figure.shift_origin

+
+

Coastlines and borders

+
Coastlines and borders
+
+

Plotting polygons

+
Plotting polygons
+
+

Plotting text

+
Plotting text
+
+

Cartesian histograms

+
Cartesian histograms
+
+

Configuring PyGMT defaults

+
Configuring PyGMT defaults
+
+

Making subplots

+
Making subplots
+
+

Connection lines

+
Connection lines
+
+

Envelope

+
Envelope
+
+

Line segment caps and joints

+
Line segment caps and joints
+
+

Calculating grid gradient and radiance

+
Calculating grid gradient and radiance
+
+

Clipping grid values

+
Clipping grid values
+
+

Cross-section along a transect

+
Cross-section along a transect
+
+

3-D scatter plots

+
3-D scatter plots
+
+

Blockmean

+
Blockmean
+
+

Scatter plot with histograms

+
Scatter plot with histograms
+
+

Polar

+
Polar
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.show.html b/v0.14.0/api/generated/pygmt.Figure.show.html new file mode 100644 index 00000000000..0061ec39745 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.show.html @@ -0,0 +1,636 @@ + + + + + + + + + pygmt.Figure.show — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.show

+
+
+Figure.show(method=None, dpi=300, width=500, waiting=0.5, **kwargs)[source]
+

Display a preview of the figure.

+

Inserts the preview in the Jupyter notebook output if available, otherwise opens +it in the default viewer for your operating system (falls back to the default +web browser).

+

Use pygmt.set_display to select the default display method +("notebook", "external", "none" or None).

+

The method parameter allows to override the default display method for the +current figure. The parameters dpi and width can be used to control the +resolution and dimension of the figure in the notebook.

+

The external viewer can be disabled by setting the environment variable +PYGMT_USE_EXTERNAL_DISPLAY to "false". This is useful when running +tests and building the documentation to avoid popping up windows.

+

The external viewer does not block the current process, thus it’s necessary to +suspend the execution of the current process for a short while after launching +the external viewer, so that the preview image won’t be deleted before the +external viewer tries to open it. Set the waiting parameter to a larger +number if the image viewer on your computer is slow to open the figure.

+
+
Parameters:
+
    +
  • method (Literal['external', 'notebook', 'none', None], default: None) –

    The method to display the current image preview. Choose from:

    +
      +
    • "external": External PDF preview using the default PDF viewer

    • +
    • "notebook": Inline PNG preview in the current notebook

    • +
    • "none": Disable image preview

    • +
    • None: Reset to the default display method

    • +
    +

    The default display method is "external" in Python consoles and +"notebook" in Jupyter notebooks, but can be changed by +pygmt.set_display.

    +

  • +
  • dpi (int, default: 300) – The image resolution (dots per inch) in Jupyter notebooks.

  • +
  • width (int, default: 500) – The image width (in pixels) in Jupyter notebooks.

  • +
  • waiting (float, default: 0.5) – Suspend the execution of the current process for a given number of seconds +after launching an external viewer. Only works if method="external".

  • +
  • **kwargs (dict) – Additional keyword arguments passed to pygmt.Figure.psconvert. Valid +parameters are gs_path, gs_option, resize, bb_style, and +verbose.

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.show

+
+

1. Making your first figure

+
1. Making your first figure
+
+

2. Create a contour map

+
2. Create a contour map
+
+

3. Figure elements

+
3. Figure elements
+
+

4. PyGMT I/O: Table inputs

+
4. PyGMT I/O: Table inputs
+
+

Coastlines and borders

+
Coastlines and borders
+
+

Frames, ticks, titles, and labels

+
Frames, ticks, titles, and labels
+
+

Plotting data points

+
Plotting data points
+
+

Plotting lines

+
Plotting lines
+
+

Plotting polygons

+
Plotting polygons
+
+

Plotting text

+
Plotting text
+
+

Setting the region

+
Setting the region
+
+

Adding an inset to the figure

+
Adding an inset to the figure
+
+

Cartesian histograms

+
Cartesian histograms
+
+

Configuring PyGMT defaults

+
Configuring PyGMT defaults
+
+

Creating a 3-D perspective image

+
Creating a 3-D perspective image
+
+

Creating a map with contour lines

+
Creating a map with contour lines
+
+

Draping a dataset on top of a topographic surface

+
Draping a dataset on top of a topographic surface
+
+

Interactive data visualization using Panel

+
Interactive data visualization using Panel
+
+

Making subplots

+
Making subplots
+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+

Plotting Earth relief

+
Plotting Earth relief
+
+

Plotting datetime charts

+
Plotting datetime charts
+
+

Plotting vectors

+
Plotting vectors
+
+

Typesetting non-ASCII text

+
Typesetting non-ASCII text
+
+

Choropleth map

+
Choropleth map
+
+

Color land and water

+
Color land and water
+
+

Highlight country, continent and state polygons

+
Highlight country, continent and state polygons
+
+

Political boundaries

+
Political boundaries
+
+

Shorelines

+
Shorelines
+
+

Tile maps

+
Tile maps
+
+

Cartesian, circular, and geographic vectors

+
Cartesian, circular, and geographic vectors
+
+

Connection lines

+
Connection lines
+
+

Decorated lines

+
Decorated lines
+
+

Envelope

+
Envelope
+
+

Generate points along great circles

+
Generate points along great circles
+
+

GeoPandas: Plotting lines with LineString or MultiLineString geometry

+
GeoPandas: Plotting lines with LineString or MultiLineString geometry
+
+

Line colors with a custom CPT

+
Line colors with a custom CPT
+
+

Line fronts

+
Line fronts
+
+

Line segment caps and joints

+
Line segment caps and joints
+
+

Line styles

+
Line styles
+
+

Quoted lines

+
Quoted lines
+
+

Vector heads and tails

+
Vector heads and tails
+
+

Wiggle along tracks

+
Wiggle along tracks
+
+

Basic geometric symbols

+
Basic geometric symbols
+
+

Bit and hachure patterns

+
Bit and hachure patterns
+
+

Color points by categories

+
Color points by categories
+
+

Custom symbols

+
Custom symbols
+
+

Datetime inputs

+
Datetime inputs
+
+

Multi-parameter symbols

+
Multi-parameter symbols
+
+

Points

+
Points
+
+

Points with varying transparency

+
Points with varying transparency
+
+

Scatter plots with a legend

+
Scatter plots with a legend
+
+

Text symbols

+
Text symbols
+
+

Vertical or horizontal bars

+
Vertical or horizontal bars
+
+

Calculating grid gradient and radiance

+
Calculating grid gradient and radiance
+
+

Calculating grid gradient with custom azimuth and normalize parameters

+
Calculating grid gradient with custom azimuth and normalize parameters
+
+

Clipping grid values

+
Clipping grid values
+
+

Contours

+
Contours
+
+

Create ‘wet-dry’ mask grid

+
Create 'wet-dry' mask grid
+
+

Cross-section along a transect

+
Cross-section along a transect
+
+

Images on figures

+
Images on figures
+
+

RGB image

+
RGB image
+
+

Sampling along tracks

+
Sampling along tracks
+
+

3-D scatter plots

+
3-D scatter plots
+
+

Plotting a surface

+
Plotting a surface
+
+

Focal mechanisms

+
Focal mechanisms
+
+

Velocity arrows and confidence ellipses

+
Velocity arrows and confidence ellipses
+
+

Double Y-axes graph

+
Double Y-axes graph
+
+

Ternary diagram

+
Ternary diagram
+
+

Blockmean

+
Blockmean
+
+

Histogram

+
Histogram
+
+

Rose diagram

+
Rose diagram
+
+

Scatter plot with histograms

+
Scatter plot with histograms
+
+

Colorbar

+
Colorbar
+
+

Day-night terminator line and twilights

+
Day-night terminator line and twilights
+
+

Inset

+
Inset
+
+

Inset map showing a rectangular region

+
Inset map showing a rectangular region
+
+

Legend

+
Legend
+
+

Logo

+
Logo
+
+

Multiple colormaps

+
Multiple colormaps
+
+

Scale bar

+
Scale bar
+
+

Timestamp

+
Timestamp
+
+

Azimuthal equidistant projection

+
Azimuthal equidistant projection
+
+

General stereographic projection

+
General stereographic projection
+
+

Gnomonic projection

+
Gnomonic projection
+
+

Lambert azimuthal equal-area projection

+
Lambert azimuthal equal-area projection
+
+

Orthographic projection

+
Orthographic projection
+
+

Perspective projection

+
Perspective projection
+
+

Albers conic equal-area projection

+
Albers conic equal-area projection
+
+

Equidistant conic projection

+
Equidistant conic projection
+
+

Lambert conic conformal projection

+
Lambert conic conformal projection
+
+

Polyconic projection

+
Polyconic projection
+
+

Cassini cylindrical projection

+
Cassini cylindrical projection
+
+

Cylindrical equal-area projection

+
Cylindrical equal-area projection
+
+

Cylindrical equidistant projection

+
Cylindrical equidistant projection
+
+

Cylindrical stereographic projection

+
Cylindrical stereographic projection
+
+

Mercator projection

+
Mercator projection
+
+

Miller cylindrical projection

+
Miller cylindrical projection
+
+

Oblique Mercator projection

+
Oblique Mercator projection
+
+

Transverse Mercator projection

+
Transverse Mercator projection
+
+

Universal Transverse Mercator projection

+
Universal Transverse Mercator projection
+
+

Eckert IV equal-area projection

+
Eckert IV equal-area projection
+
+

Eckert VI equal-area projection

+
Eckert VI equal-area projection
+
+

Hammer projection

+
Hammer projection
+
+

Mollweide projection

+
Mollweide projection
+
+

Robinson projection

+
Robinson projection
+
+

Sinusoidal projection

+
Sinusoidal projection
+
+

Van der Grinten projection

+
Van der Grinten projection
+
+

Winkel Tripel projection

+
Winkel Tripel projection
+
+

Cartesian linear

+
Cartesian linear
+
+

Cartesian logarithmic

+
Cartesian logarithmic
+
+

Cartesian power

+
Cartesian power
+
+

Polar

+
Polar
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.solar.html b/v0.14.0/api/generated/pygmt.Figure.solar.html new file mode 100644 index 00000000000..c1e14a82e8d --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.solar.html @@ -0,0 +1,372 @@ + + + + + + + + + pygmt.Figure.solar — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.solar

+
+
+Figure.solar(terminator='day_night', terminator_datetime=None, **kwargs)
+

Plot day-light terminators or twilights.

+

This function plots the day-night terminator. Alternatively, it can plot the +terminators for civil twilight, nautical twilight, or astronomical twilight.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/solar.html

+

Aliases:

+
    +
  • B = frame

  • +
  • G = fill

  • +
  • J = projection

  • +
+
    +
  • R = region

  • +
  • V = verbose

  • +
  • W = pen

  • +
+
    +
  • c = panel

  • +
  • p = perspective

  • +
  • t = transparency

  • +
+
+
+
Parameters:
+
    +
  • terminator (Literal['astronomical', 'civil', 'day_night', 'nautical'], default: 'day_night') –

    Set the type of terminator displayed, which can be set with either the full name +or the first letter of the name. Available options are:

    +
      +
    • "astronomical": Astronomical twilight

    • +
    • "civil": Civil twilight

    • +
    • "day_night": Day/night terminator

    • +
    • "nautical": Nautical twilight

    • +
    +

    Refer to https://en.wikipedia.org/wiki/Twilight for the definitions of different +types of twilight.

    +

  • +
  • terminator_datetime (str or datetime object) – Set the UTC date and time of the displayed terminator [Default is the current +UTC date and time]. It can be passed as a string or Python datetime object.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • fill (str) – Set color or pattern for filling terminators [Default is no fill].

  • +
  • pen (str) – Set pen attributes for lines [Default is "0.25p,black,solid"].

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
+
+
+

Example

+
>>> # import the Python module "datetime"
+>>> import datetime
+>>> import pygmt
+>>> # create a datetime object at 8:52:18 on June 24, 1997 (time in UTC)
+>>> date = datetime.datetime(
+...     year=1997, month=6, day=24, hour=8, minute=52, second=18
+... )
+>>> # create a new plot with pygmt.Figure()
+>>> fig = pygmt.Figure()
+>>> # create a map of the Earth with the coast method
+>>> fig.coast(land="darkgreen", water="lightblue", projection="W10c", region="d")
+>>> fig.solar(
+...     # set the terminator to "day_night"
+...     terminator="day_night",
+...     # pass the datetime object
+...     terminator_datetime=date,
+...     # fill the night-section with navyblue at 75% transparency
+...     fill="navyblue@75",
+...     # draw the terminator with a 1-point black line
+...     pen="1p,black",
+... )
+>>> # show the plot
+>>> fig.show()
+
+
+
+ +
+

Examples using pygmt.Figure.solar

+
+

Bit and hachure patterns

+
Bit and hachure patterns
+
+

Day-night terminator line and twilights

+
Day-night terminator line and twilights
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.subplot.html b/v0.14.0/api/generated/pygmt.Figure.subplot.html new file mode 100644 index 00000000000..73e5072123d --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.subplot.html @@ -0,0 +1,405 @@ + + + + + + + + + pygmt.Figure.subplot — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.subplot

+
+
+Figure.subplot(nrows=1, ncols=1, *, figsize=None, subsize=None, autolabel=None, frame=None, clearance=None, projection=None, margins=None, region=None, sharex=None, sharey=None, title=None, verbose=None, **kwargs)
+

Create multi-panel subplot figures.

+

This method is used to split the current figure into a rectangular layout +of subplots that each may contain a single self-contained figure. Begin by +defining the layout of the entire multi-panel illustration. Several +parameters are available to specify the systematic layout, labeling, +dimensions, and more for the subplots.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/subplot.html#synopsis-begin-mode

+

Aliases:

+
    +
  • A = autolabel

  • +
  • B = frame

  • +
  • C = clearance

  • +
  • Ff = figsize

  • +
+
    +
  • Fs = subsize

  • +
  • J = projection

  • +
  • M = margins

  • +
  • R = region

  • +
+
    +
  • SC = sharex

  • +
  • SR = sharey

  • +
  • T = title

  • +
  • V = verbose

  • +
+
+
+
Parameters:
+
    +
  • nrows (int) – Number of vertical rows of the subplot grid.

  • +
  • ncols (int) – Number of horizontal columns of the subplot grid.

  • +
  • figsize (list) – Specify the final figure dimensions as [width, height].

  • +
  • subsize (list) – Specify the dimensions of each subplot directly as [width, height]. +Note that only one of figsize or subsize can be provided at +once.

  • +
  • autolabel (bool or str) – [autolabel][+cdx[/dy]][+gfill][+j|Jrefpoint][+odx[/dy]][+ppen][+r|R] +[+v]. +Specify automatic tagging of each subplot. Append either a number or +letter [a]. This sets the tag of the first, top-left subplot and others +follow sequentially. Surround the number or letter by parentheses on +any side if these should be typeset as part of the tag. Use ++j|Jrefpoint to specify where the tag should be placed +in the subplot [TL]. Note: +j sets the justification of the +tag to refpoint (suitable for interior tags) while +J instead +selects the mirror opposite (suitable for exterior tags). Append ++cdx[/dy] to set the clearance between the tag and a +surrounding text box requested via +g or +p [3p/3p, i.e., 15% +of the FONT_TAG size dimension]. Append +gfill to +paint the tag’s text box with fill [no painting]. Append ++odx[/dy] to offset the tag’s reference point in the +direction implied by the justification [4p/4p, i.e., 20% of the +FONT_TAG size]. Append +ppen to draw the outline of +the tag’s text box using selected pen [no outline]. Append +r to +typeset your tag numbers using lowercase Roman numerals; use +R for +uppercase Roman numerals [Arabic numerals]. Append +v to increase +tag numbers vertically down columns [horizontally across rows].

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • clearance (str or list) – [side]clearance. +Reserve a space of dimension clearance between the margin and the +subplot on the specified side, using side values from w, e, +s, or n; or x for both w and e; or y for both +s and n. No side means all sides (i.e. clearance="1c" +would set a clearance of 1 cm on all sides). The option is repeatable +to set aside space on more than one side (e.g. +clearance=["w1c", "s2c"] would set a clearance of 1 cm on west +side and 2 cm on south side). Such space will be left untouched by +the main map plotting but can be accessed by methods that plot +scales, bars, text, etc.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • margins (str or list) –

    This is margin space that is added between neighboring subplots (i.e., +the interior margins) in addition to the automatic space added for tick +marks, annotations, and labels. The margins can be specified as either:

    +
      +
    • a single value (for same margin on all sides). E.g. "5c".

    • +
    • a pair of values (for setting separate horizontal and vertical +margins). E.g. ["5c", "3c"].

    • +
    • a set of four values (for setting separate left, right, bottom, and +top margins). E.g. ["1c", "2c", "3c", "4c"].

    • +
    +

    The actual gap created is always a sum of the margins for the two +opposing sides (e.g., east plus west or south plus north margins) +[Default is half the primary annotation font size, giving the full +annotation font size as the default gap].

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • sharex (bool or str) – Set subplot layout for shared x-axes. Use when all subplots in a column +share a common x-range. If sharex=True, the first (i.e., +top) and the last (i.e., bottom) rows will have +x-annotations; use sharex="t" or sharex="b" to select only +one of those two rows [both]. Append +l if annotated x-axes +should have a label [none]; optionally append the label if it is the +same for the entire subplot. Append +t to make space for subplot +titles for each row; use +tc for top row titles only [no subplot +titles].

  • +
  • sharey (bool or str) –

    Set subplot layout for shared y-axes. Use when all subplots in a row +share a common y-range. If sharey=True, the first (i.e., +left) and the last (i.e., right) columns will have +y-annotations; use sharey="l" or sharey="r" to select only +one of those two columns [both]. Append +l if annotated y-axes +will have a label [none]; optionally, append the label if it is the +same for the entire subplot. Append +p to make all annotations +axis-parallel [horizontal]; if not used you may have to set +clearance to secure extra space for long horizontal annotations.

    +

    Notes for sharex/sharey:

    +
      +
    • Labels and titles that depends on which row or column are specified +as usual via a subplot’s own frame setting.

    • +
    • Append +w to the figsize or subsize parameter to draw +horizontal and vertical lines between interior panels using selected +pen [no lines].

    • +
    +

  • +
  • title (str) – While individual subplots can have titles (see sharex/sharey or +frame), the entire figure may also have an overarching heading +[no heading]. Font is determined by setting FONT_HEADING.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.subplot

+
+

Making subplots

+
Making subplots
+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+

Vertical or horizontal bars

+
Vertical or horizontal bars
+
+

Calculating grid gradient with custom azimuth and normalize parameters

+
Calculating grid gradient with custom azimuth and normalize parameters
+
+

Multiple colormaps

+
Multiple colormaps
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.ternary.html b/v0.14.0/api/generated/pygmt.Figure.ternary.html new file mode 100644 index 00000000000..c933ff9e8c6 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.ternary.html @@ -0,0 +1,356 @@ + + + + + + + + + pygmt.Figure.ternary — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.ternary

+
+
+Figure.ternary(data, alabel=None, blabel=None, clabel=None, **kwargs)
+

Plot ternary diagrams.

+

Reads (a,b,c[,z]) records from data and plots symbols at +those locations on a ternary diagram. If a symbol is selected and no symbol +size given, then we will interpret the fourth column of the input data as +symbol size. Symbols whose size is <= 0 are skipped. If no symbols are +specified then the symbol code (see style below) must be present as +last column in the input. If style is not specified then we instead +plot lines or polygons.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/ternary.html

+

Aliases:

+
    +
  • B = frame

  • +
  • C = cmap

  • +
  • G = fill

  • +
  • JX = width

  • +
+
    +
  • R = region

  • +
  • S = style

  • +
  • V = verbose

  • +
  • W = pen

  • +
+
    +
  • c = panel

  • +
  • p = perspective

  • +
  • t = transparency

  • +
+
+
+
Parameters:
+
    +
  • data (str, list, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in either a file name to an ASCII data table, a Python list, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • width (str) – Set the width of the figure by passing a number, followed by +a unit (i for inches, c for centimeters). Use a negative width +to indicate that positive axes directions be clock-wise +[Default lets the a, b, c axes be positive in a +counter-clockwise direction].

  • +
  • region (str or list) – [amin, amax, bmin, bmax, cmin, cmax]. +Give the min and max limits for each of the three axes a, b, +and c.

  • +
  • cmap (str) – File name of a CPT file or a series of comma-separated colors +(e.g., color1,color2,color3) to build a linear continuous +CPT from those colors automatically.

  • +
  • fill (str) – Set color or pattern for filling symbols or polygons +[Default is no fill].

  • +
  • alabel (str | None, default: None) – Set the label for the a vertex where the component is 100%. The label is +placed at a distance of three times the MAP_LABEL_OFFSET setting +from the corner.

  • +
  • blabel (str | None, default: None) – Same as alabel but for the b vertex.

  • +
  • clabel (str | None, default: None) – Same as alabel but for the c vertex.

  • +
  • style (str) – symbol[size]. +Plot individual symbols in a ternary diagram.

  • +
  • pen (str) – Set pen attributes for lines or the outline of symbols.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.ternary

+
+

Bit and hachure patterns

+
Bit and hachure patterns
+
+

Ternary diagram

+
Ternary diagram
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.text.html b/v0.14.0/api/generated/pygmt.Figure.text.html new file mode 100644 index 00000000000..e7c2ad4e6a5 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.text.html @@ -0,0 +1,523 @@ + + + + + + + + + pygmt.Figure.text — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.text

+
+
+Figure.text(textfiles=None, x=None, y=None, position=None, text=None, angle=None, font=None, justify=None, **kwargs)
+

Plot or typeset text strings of variable size, font type, and orientation.

+

Must provide at least one of the following combinations as input:

+
    +
  • textfiles

  • +
  • x/y, and text

  • +
  • position and text

  • +
+

The text strings passed via the text parameter can contain ASCII characters and +non-ASCII characters defined in the Adobe ISOLatin1+, Adobe Symbol, Adobe +ZapfDingbats and ISO-8859-x (x can be 1-11, 13-16) encodings. Refer to +Supported Encodings and Non-ASCII Characters for the full list of supported non-ASCII characters.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/text.html.

+

Aliases:

+
    +
  • B = frame

  • +
  • C = clearance

  • +
  • D = offset

  • +
  • G = fill

  • +
  • J = projection

  • +
  • N = no_clip

  • +
+
    +
  • R = region

  • +
  • V = verbose

  • +
  • W = pen

  • +
  • a = aspatial

  • +
  • c = panel

  • +
  • e = find

  • +
+
    +
  • f = coltypes

  • +
  • h = header

  • +
  • it = use_word

  • +
  • p = perspective

  • +
  • t = transparency

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • textfiles (str or list) –

    A file name or a list of file names containing one or more records. +Each record has the following columns:

    +
      +
    • x: X coordinate or longitude

    • +
    • y: Y coordinate or latitude

    • +
    • angle: Angle in degrees counter-clockwise from horizontal

    • +
    • font: Text size, font, and color

    • +
    • justify: Two-character justification code

    • +
    • text: The text string to typeset

    • +
    +

    The angle, font, and justify columns are optional and can be set +by using the angle, font, and justify parameters, +respectively. If these parameters are set to True, then the +corresponding columns must be present in the input file(s) and the +columns must be in the order mentioned above.

    +

  • +
  • x/y (float or 1-D arrays) – The x and y coordinates, or an array of x and y coordinates to plot +the text.

  • +
  • position (Optional[Literal['TL', 'TC', 'TR', 'ML', 'MC', 'MR', 'BL', 'BC', 'BR']], default: None) –

    Set reference point on the map for the text by using x, y +coordinates extracted from region instead of providing them +through x/y. Specify with a two-letter (order independent) +code, chosen from:

    +
      +
    • Vertical: T(op), M(iddle), B(ottom)

    • +
    • Horizontal: L(eft), C(entre), R(ight)

    • +
    +

    For example, position="TL" plots the text at the Top Left corner +of the map.

    +

  • +
  • text (str | Sequence[str] | ndarray | StringArray | None, default: None) – The text string, or an array of strings to plot on the figure.

  • +
  • angle (float, str, bool or list) – Set the angle measured in degrees counter-clockwise from +horizontal (e.g. 30 sets the text at 30 degrees). If no angle is +explicitly given (i.e. angle=True) then the input to textfiles +must have this as a column.

  • +
  • font (str, bool or list of str) – Set the font specification with format size,font,color +where size is text size in points, font is the font to use, and +color sets the font color. For example, +font="12p,Helvetica-Bold,red" selects a 12p, red, Helvetica-Bold +font. If no font info is explicitly given (i.e. font=True), then +the input to textfiles must have this information in one of its +columns.

  • +
  • justify (Union[bool, None, Literal['TL', 'TC', 'TR', 'ML', 'MC', 'MR', 'BL', 'BC', 'BR'], Sequence[Literal['TL', 'TC', 'TR', 'ML', 'MC', 'MR', 'BL', 'BC', 'BR']]], default: None) – Set the alignment which refers to the part of the text string that +will be mapped onto the (x, y) point. Choose a two-letter +combination of L, C, R (for left, center, or right) and +T, M, B (for top, middle, or bottom). E.g., BL for +bottom left. If no justification is explicitly given +(i.e. justify=True), then the input to textfiles must have +this as a column.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest. +Required if this is the first plot command.

  • +
  • clearance (str) – [dx/dy][+to|O|c|C]. +Adjust the clearance between the text and the surrounding box +[Default is 15% of the font size]. Only used if pen or fill +are specified. Append the unit you want (c for centimeters, +i for inches, or p for points; if not given we consult +PROJ_LENGTH_UNIT) or % for a percentage of the font +size. Optionally, use modifier +t to set the shape of the text +box when using fill and/or pen. Append lower case o +to get a straight rectangle [Default is o]. Append upper case +O to get a rounded rectangle. In paragraph mode (paragraph) +you can also append lower case c to get a concave rectangle or +append upper case C to get a convex rectangle.

  • +
  • fill (str) – Set color for filling text boxes [Default is no fill].

  • +
  • offset (str) – [j|J]dx[/dy][+v[pen]]. +Offset the text from the projected (x, y) point by dx/dy +[Default is "0/0"]. +If dy is not specified then it is set equal to dx. Use j to +offset the text away from the point instead (i.e., the text +justification will determine the direction of the shift). Using +J will shorten diagonal offsets at corners by sqrt(2). +Optionally, append +v which will draw a line from the original +point to the shifted point; append a pen to change the attributes +for this line.

  • +
  • pen (str) – Set the pen used to draw a rectangle around the text string +(see clearance) [Default is "0.25p,black,solid"].

  • +
  • no_clip (bool) – Do not clip text at the frame boundaries [Default is +False].

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • aspatial (bool or str) – [col=]name[,…]. +Control how aspatial data are handled during input and output. +Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#aspatial-full.

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • use_word (int) – Select a specific word from the trailing text, with the first +word being 0 [Default is the entire trailing text]. No numerical +columns can be specified.

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing). +transparency can also be a 1-D array to set varying +transparency for texts, but this option is only valid if using +x/y and text.

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.text

+
+

3. Figure elements

+
3. Figure elements
+
+

Plotting text

+
Plotting text
+
+

Making subplots

+
Making subplots
+
+

Typesetting non-ASCII text

+
Typesetting non-ASCII text
+
+

Cartesian, circular, and geographic vectors

+
Cartesian, circular, and geographic vectors
+
+

Decorated lines

+
Decorated lines
+
+

Line fronts

+
Line fronts
+
+

Line segment caps and joints

+
Line segment caps and joints
+
+

Line styles

+
Line styles
+
+

Quoted lines

+
Quoted lines
+
+

Vector heads and tails

+
Vector heads and tails
+
+

Basic geometric symbols

+
Basic geometric symbols
+
+

Bit and hachure patterns

+
Bit and hachure patterns
+
+

Custom symbols

+
Custom symbols
+
+

Text symbols

+
Text symbols
+
+

Cross-section along a transect

+
Cross-section along a transect
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.tilemap.html b/v0.14.0/api/generated/pygmt.Figure.tilemap.html new file mode 100644 index 00000000000..d2ad0ba1bab --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.tilemap.html @@ -0,0 +1,342 @@ + + + + + + + + + pygmt.Figure.tilemap — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.tilemap

+
+
+Figure.tilemap(region, zoom='auto', source=None, lonlat=True, wait=0, max_retries=2, zoom_adjust=None, **kwargs)
+

Plot an XYZ tile map.

+

This method loads XYZ tile maps from a tile server or local file using +pygmt.datasets.load_tile_map into a georeferenced form, and plots the tiles +as a basemap or overlay using pygmt.Figure.grdimage.

+

Note: By default, standard web map tiles served in a Spherical Mercator +(EPSG:3857) Cartesian format will be reprojected to a geographic coordinate +reference system (OGC:CRS84) and plotted with longitude/latitude bounds when +lonlat=True. If reprojection is not desired, please set lonlat=False and +provide Spherical Mercator (EPSG:3857) coordinates to the region parameter.

+

Aliases:

+
    +
  • B = frame

  • +
  • E = dpi

  • +
  • I = shading

  • +
  • J = projection

  • +
+
    +
  • M = monochrome

  • +
  • N = no_clip

  • +
  • Q = nan_transparent

  • +
  • V = verbose

  • +
+
    +
  • c = panel

  • +
  • p = perspective

  • +
  • t = transparency

  • +
+
+
+
Parameters:
+
    +
  • region (list) – The bounding box of the map in the form of a list [xmin, xmax, ymin, +ymax]. These coordinates should be in longitude/latitude if lonlat=True or +Spherical Mercator (EPSG:3857) if lonlat=False.

  • +
  • zoom (Union[int, Literal['auto']], default: 'auto') –

    Level of detail. Higher levels (e.g. 22) mean a zoom level closer to the +Earth’s surface, with more tiles covering a smaller geographical area and thus +more detail. Lower levels (e.g. 0) mean a zoom level further from the +Earth’s surface, with less tiles covering a larger geographical area and thus +less detail. Default is "auto" to automatically determine the zoom level +based on the bounding box region extent.

    +
    +

    Note

    +

    The maximum possible zoom level may be smaller than 22, and depends on +what is supported by the chosen web tile provider source.

    +
    +

  • +
  • source (TileProvider | str | None, default: None) –

    The tile source: web tile provider or path to a local file. Provide either:

    +
      +
    • A web tile provider in the form of a xyzservices.TileProvider object. +See Contextily providers for a list of +tile providers. Default is xyzservices.providers.OpenStreetMap.HOT, i.e. +OpenStreetMap Humanitarian web tiles.

    • +
    • A web tile provider in the form of a URL. The placeholders for the XYZ in the +URL need to be {x}, {y}, {z}, respectively. E.g. +https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png.

    • +
    • A local file path. The file is read with rasterio and +all bands are loaded into the basemap. See +Working with local files.

    • +
    +
    +

    Important

    +

    Tiles are assumed to be in the Spherical Mercator projection (EPSG:3857).

    +
    +

  • +
  • lonlat (bool, default: True) – If False, coordinates in region are assumed to be Spherical Mercator as +opposed to longitude/latitude.

  • +
  • wait (int, default: 0) – If the tile API is rate-limited, the number of seconds to wait between a failed +request and the next try.

  • +
  • max_retries (int, default: 2) – Total number of rejected requests allowed before contextily will stop trying to +fetch more tiles from a rate-limited API.

  • +
  • zoom_adjust (int | None, default: None) –

    The amount to adjust a chosen zoom level if it is chosen automatically. Values +outside of -1 to 1 are not recommended as they can lead to slow execution.

    +
    +

    Note

    +

    The zoom_adjust parameter requires contextily>=1.5.0.

    +
    +

  • +
  • kwargs (dict) – Extra keyword arguments to pass to pygmt.Figure.grdimage.

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.tilemap

+
+

Tile maps

+
Tile maps
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.timestamp.html b/v0.14.0/api/generated/pygmt.Figure.timestamp.html new file mode 100644 index 00000000000..1151263523c --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.timestamp.html @@ -0,0 +1,313 @@ + + + + + + + + + pygmt.Figure.timestamp — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.timestamp

+
+
+Figure.timestamp(text=None, label=None, justify='BL', offset=('-54p', '-54p'), font='Helvetica,black', timefmt='%Y %b %d %H:%M:%S')
+

Plot the GMT timestamp logo.

+

Add the GMT timestamp logo with an optional label at the bottom-left corner of a +plot with an offset of ("-54p", "-54p"). The timestamp will be in the locale set +by the environment variable TZ (generally local time but can be changed via +os.environ["TZ"]) and its format is controlled by the timefmt parameter. It +can also be replaced with any custom text string using the text parameter.

+
+
Parameters:
+
    +
  • text (str | None, default: None) – If None, the current UNIX timestamp is shown in the GMT timestamp logo. Set +this parameter to replace the UNIX timestamp with a custom text string instead. +The text must be no longer than 64 characters.

  • +
  • label (str | None, default: None) – The text string shown after the GMT timestamp logo.

  • +
  • justify (Literal['TL', 'TC', 'TR', 'ML', 'MC', 'MR', 'BL', 'BC', 'BR'], default: 'BL') – Justification of the timestamp box relative to the plot’s bottom-left corner +(i.e., the plot origin). Give a two-character code that is a combination of a +horizontal (L(eft), C(enter), or R(ight)) and a vertical +(T(op), M(iddle), or B(ottom)) code. For example, +justify="TL" means choosing the Top Left point of the timestamp +as the anchor point.

  • +
  • offset (float | str | Sequence[float | str], default: ('-54p', '-54p')) – offset or (offset_x, offset_y). +Offset the anchor point of the timestamp box by offset_x and offset_y. If a +single value offset is given, offset_y = offset_x = offset.

  • +
  • font (str, default: 'Helvetica,black') – Font of the timestamp and the optional label. Since the GMT logo has a fixed +height, the font sizes are fixed to be 8-point for the timestamp and 7-point for +the label. The parameter can’t change the font color for GMT<=6.4.0, only the +font style.

  • +
  • timefmt (str, default: '%Y %b %d %H:%M:%S') – Format string for the UNIX timestamp. The format string is parsed by the C +function strftime, so that virtually any text can be used (even not +containing any time information).

  • +
+
+
+

Examples

+

Plot the GMT timestamp logo.

+
>>> import pygmt
+>>> fig = pygmt.Figure()
+>>> fig.timestamp()
+>>> fig.show()
+
+
+

Plot the GMT timestamp logo with a custom label.

+
>>> fig = pygmt.Figure()
+>>> fig.timestamp(label="Powered by PyGMT")
+>>> fig.show()
+
+
+
+ +
+

Examples using pygmt.Figure.timestamp

+
+

Timestamp

+
Timestamp
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.velo.html b/v0.14.0/api/generated/pygmt.Figure.velo.html new file mode 100644 index 00000000000..32e0d874951 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.velo.html @@ -0,0 +1,586 @@ + + + + + + + + + pygmt.Figure.velo — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.velo

+
+
+Figure.velo(data=None, *, vector=None, frame=None, cmap=None, rescale=None, uncertaintyfill=None, fill=None, scale=None, shading=None, projection=None, line=None, no_clip=None, region=None, spec=None, verbose=None, pen=None, zvalue=None, panel=None, nodata=None, find=None, header=None, incols=None, perspective=None, transparency=None, **kwargs)
+

Plot velocity vectors, crosses, anisotropy bars, and wedges.

+

Reads data values from files, numpy.ndarray or +pandas.DataFrame and plots the selected geodesy symbol on a map. +You may choose from velocity vectors and their uncertainties, rotational +wedges and their uncertainties, anisotropy bars, or strain crosses. Symbol +fills or their outlines may be colored based on constant parameters or via +color lookup tables.

+

Must provide data and spec.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/supplements/geodesy/velo.html

+

Aliases:

+
    +
  • A = vector

  • +
  • B = frame

  • +
  • C = cmap

  • +
  • D = rescale

  • +
  • E = uncertaintyfill

  • +
  • G = fill

  • +
  • H = scale

  • +
  • I = shading

  • +
+
    +
  • J = projection

  • +
  • L = line

  • +
  • N = no_clip

  • +
  • R = region

  • +
  • S = spec

  • +
  • V = verbose

  • +
  • W = pen

  • +
  • Z = zvalue

  • +
+
    +
  • c = panel

  • +
  • d = nodata

  • +
  • e = find

  • +
  • h = header

  • +
  • i = incols

  • +
  • p = perspective

  • +
  • t = transparency

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in either a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data. +Note that text columns are only supported with file or +pandas.DataFrame inputs.

  • +
  • spec (str) –

    Select the meaning of the columns in the data file and the figure to +be plotted. In all cases, the scales are in data units per length unit +and sizes are in length units (default length unit is controlled by +PROJ_LENGTH_UNIT unless c, i, or p is +appended).

    +
      +
    • e[velscale/]confidence[+ffont]

      +

      Velocity ellipses in (N,E) convention. The velscale sets the +scaling of the velocity arrows. If velscale is not given then we +read it from the data file as an extra column. The confidence sets +the 2-dimensional confidence limit for the ellipse, e.g. 0.95 for 95% +confidence ellipse. Use +f to set the font and size of the text +[Default is 9p,Helvetica,black]; give +f0 to deactivate +labeling. The arrow will be drawn with the pen attributes specified +by the pen parameter and the arrow-head can be colored via +fill. The ellipse will be filled with the color or pattern +specified by the uncertaintyfill parameter [Default is +transparent], and its outline will be drawn if line is selected +using the pen selected (by pen if not given by line). +Parameters are expected to be in the following columns:

      +
      +
        +
      • 1,2: longitude, latitude of station

      • +
      • 3,4: eastward, northward velocity

      • +
      • 5,6: uncertainty of eastward, northward velocities +(1-sigma)

      • +
      • 7: correlation between eastward and northward components

      • +
      • Trailing text: name of station (optional)

      • +
      +
      +
    • +
    • n[barscale]

      +

      Anisotropy bars. barscale sets the scaling of the bars. If +barscale is not given then we read it from the data file as an +extra column. Parameters are expected to be in the following columns:

      +
      +
        +
      • 1,2: longitude, latitude of station

      • +
      • 3,4: eastward, northward components of anisotropy +vector

      • +
      +
      +
    • +
    • r[velscale/]confidence[+ffont]

      +

      Velocity ellipses in rotated convention. The velscale sets the +scaling of the velocity arrows. If velscale is not given then we +read it from the data file as an extra column. The confidence sets +the 2-dimensional confidence limit for the ellipse, e.g. 0.95 for 95% +confidence ellipse. Use +f to set the font and size of the text +[Default is 9p,Helvetica,black]; give +f0 to deactivate +labeling. The arrow will be drawn with the pen attributes specified +by the pen parameter and the arrow-head can be colored via +fill. The ellipse will be filled with the color or pattern +specified by the uncertaintyfill parameter [Default is +transparent], and its outline will be drawn if line is selected +using the pen selected (by pen if not given by line). +Parameters are expected to be in the following columns:

      +
      +
        +
      • 1,2: longitude, latitude of station

      • +
      • 3,4: eastward, northward velocity

      • +
      • 5,6: semi-major, semi-minor axes

      • +
      • 7: counter-clockwise angle, in degrees, from horizontal axis +to major axis of ellipse.

      • +
      • Trailing text: name of station (optional)

      • +
      +
      +
    • +
    • w[wedgescale/]wedgemag

      +

      Rotational wedges. The wedgescale sets the size of the wedges. If +wedgescale is not given then we read it from the data file as an +extra column. Rotation values are multiplied by wedgemag before +plotting. For example, setting wedgemag to 1.e7 works well for +rotations of the order of 100 nanoradians/yr. Use fill to set +the fill color or pattern for the wedge, and uncertaintyfill to +set the color or pattern for the uncertainty. Parameters are +expected to be in the following columns:

      +
      +
        +
      • 1,2: longitude, latitude of station

      • +
      • 3: rotation in radians

      • +
      • 4: rotation uncertainty in radians

      • +
      +
      +
    • +
    • x[cross_scale]

      +

      Strain crosses. The cross_scale sets the size of the cross. If +cross_scale is not given then we read it from the data file as an +extra column. Parameters are expected to be in the following columns:

      +
      +
        +
      • 1,2: longitude, latitude of station

      • +
      • 3: eps1, the most extensional eigenvalue of strain tensor, +with extension taken positive.

      • +
      • 4: eps2, the most compressional eigenvalue of strain tensor, +with extension taken positive.

      • +
      • 5: azimuth of eps2 in degrees CW from North.

      • +
      +
      +
    • +
    +

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • vector (bool or str) – Modify vector parameters. For vector heads, append vector head size +[Default is 9p]. See +https://docs.generic-mapping-tools.org/6.5/supplements/geodesy/velo.html#vector-attributes for +specifying additional attributes.

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • cmap (str) – File name of a CPT file or a series of comma-separated colors +(e.g., color1,color2,color3) to build a linear continuous +CPT from those colors automatically.

  • +
  • rescale (str) – Can be used to rescale the uncertainties of velocities (spec="e" +and spec="r") and rotations (spec="w"). Can be combined with +the confidence variable.

  • +
  • uncertaintyfill (str) – Set color or pattern for filling uncertainty wedges (spec="w") +or velocity error ellipses (spec="e" or spec="r"). +If uncertaintyfill is not specified, the uncertainty regions +will be transparent. Note: Using cmap and zvalue="+e" +will update the uncertainty fill color based on the selected measure +in zvalue [Default is magnitude error]. More details at +https://docs.generic-mapping-tools.org/6.5/reference/features.html#gfill-attrib.

  • +
  • fill (str) – Set color or pattern for filling symbols [Default is no fill]. +Note: Using cmap (and optionally zvalue) will update the +symbol fill color based on the selected measure in zvalue +[Default is magnitude]. More details at +https://docs.generic-mapping-tools.org/6.5/reference/features.html#gfill-attrib.

  • +
  • scale (float or bool) – [scale]. +Scale symbol sizes and pen widths on a per-record basis using the +scale read from the data set, given as the first column after the +(optional) z and size columns [Default is no scaling]. The symbol +size is either provided by spec or via the input size column. +Alternatively, append a constant scale that should be used instead of +reading a scale column.

  • +
  • shading (float or bool) – intens. +Use the supplied intens value (nominally in the -1 to +1 range) to +modulate the symbol fill color by simulating illumination [Default is +none]. If intens is not provided we will instead read the intensity +from an extra data column after the required input columns determined +by spec.

  • +
  • line (str) – [pen[+c[f|l]]]. +Draw lines. Ellipses and rotational wedges will have their outlines +drawn using the current pen (see pen). Alternatively, append a +separate pen to use for the error outlines. If the modifier +cl is +appended then the color of the pen is updated from the CPT (see +cmap). If instead modifier +cf is appended then the color from +the cpt file is applied to error fill only [Default]. Use just +c +to set both pen and fill color.

  • +
  • no_clip (bool) – Do not skip symbols that fall outside the frame boundaries +[Default is False, i.e., plot symbols inside the frame +boundaries only].

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • pen (str) – [pen][+c[f|l]]. +Set pen attributes for velocity arrows, ellipse circumference and fault +plane edges [Default is "0.25p,black,solid"]. +If the modifier +cl is appended then the color of the pen is +updated from the CPT (see cmap). If instead modifier +cf is +appended then the color from the cpt file is applied to symbol fill +only [Default]. Use just +c to set both pen and fill color.

  • +
  • zvalue (str) – [m|e|n|u][+e]. +Select the quantity that will be used with the CPT given via cmap +to set the fill color. Choose from magnitude (vector magnitude +or rotation magnitude), east-west velocity, north-south +velocity, or user-supplied data column (supplied after the +required columns). To instead use the corresponding error estimates +(i.e., vector or rotation uncertainty) to lookup the color and paint +the error ellipse or wedge instead, append +e.

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.velo

+
+

Bit and hachure patterns

+
Bit and hachure patterns
+
+

Velocity arrows and confidence ellipses

+
Velocity arrows and confidence ellipses
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.vlines.html b/v0.14.0/api/generated/pygmt.Figure.vlines.html new file mode 100644 index 00000000000..b934c518bf4 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.vlines.html @@ -0,0 +1,314 @@ + + + + + + + + + pygmt.Figure.vlines — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.vlines

+
+
+Figure.vlines(x, ymin=None, ymax=None, pen=None, label=None, no_clip=False, perspective=None)
+

Plot one or multiple vertical line(s).

+

This method is a high-level wrapper around pygmt.Figure.plot that focuses on +plotting vertical lines at X-coordinates specified by the x parameter. The x +parameter can be a single value (for a single vertical line) or a sequence of values +(for multiple vertical lines).

+

By default, the Y-coordinates of the start and end points of the lines are set to be +the Y-limits of the current plot, but this can be overridden by specifying the +ymin and ymax parameters. ymin and ymax can be either a single value +or a sequence of values. If a single value is provided, it is applied to all lines. +If a sequence is provided, the length of ymin and ymax must match the length +of x.

+

The term “vertical” lines can be interpreted differently in different coordinate +systems:

+
    +
  • Cartesian coordinate system: lines are plotted as straight lines.

  • +
  • Polar projection: lines are plotted as straight lines along radius.

  • +
  • Geographic projection: lines are plotted as meridians along constant +longitude.

  • +
+
+
Parameters:
+
    +
  • x (float | Sequence[float]) – X-coordinates to plot the lines. It can be a single value (for a single line) +or a sequence of values (for multiple lines).

  • +
  • ymin/ymax – Y-coordinates of the start/end point(s) of the line(s). If None, defaults to +the Y-limits of the current plot. ymin and ymax can either be a single +value or a sequence of values. If a single value is provided, it is applied to +all lines. If a sequence is provided, the length of ymin and ymax must +match the length of x.

  • +
  • pen (str | None, default: None) – Pen attributes for the line(s), in the format of width,color,style.

  • +
  • label (str | None, default: None) – Label for the line(s), to be displayed in the legend.

  • +
  • no_clip (bool, default: False) – If True, do not clip lines outside the plot region. Only makes sense in the +Cartesian coordinate system.

  • +
  • perspective (str | bool | None, default: None) – Select perspective view and set the azimuth and elevation angle of the +viewpoint. Refer to pygmt.Figure.plot for details.

  • +
+
+
+

Examples

+
>>> import pygmt
+>>> fig = pygmt.Figure()
+>>> fig.basemap(region=[0, 10, 0, 10], projection="X10c/10c", frame=True)
+>>> fig.vlines(x=1, pen="1p,black", label="Line at x=1")
+>>> fig.vlines(x=2, ymin=2, ymax=8, pen="1p,red,-", label="Line at x=2")
+>>> fig.vlines(x=[3, 4], ymin=3, ymax=7, pen="1p,black,.", label="Lines at x=3,4")
+>>> fig.vlines(x=[5, 6], ymin=4, ymax=9, pen="1p,red", label="Lines at x=5,6")
+>>> fig.vlines(
+...     x=[7, 8], ymin=[0, 1], ymax=[7, 8], pen="1p,blue", label="Lines at x=7,8"
+... )
+>>> fig.legend()
+>>> fig.show()
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.Figure.wiggle.html b/v0.14.0/api/generated/pygmt.Figure.wiggle.html new file mode 100644 index 00000000000..c82e5af6add --- /dev/null +++ b/v0.14.0/api/generated/pygmt.Figure.wiggle.html @@ -0,0 +1,527 @@ + + + + + + + + + pygmt.Figure.wiggle — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.Figure.wiggle

+
+
+Figure.wiggle(data=None, x=None, y=None, z=None, fillpositive=None, fillnegative=None, *, frame=None, position=None, projection=None, region=None, track=None, verbose=None, pen=None, scale=None, binary=None, panel=None, nodata=None, find=None, coltypes=None, gap=None, header=None, incols=None, perspective=None, transparency=None, wrap=None, **kwargs)
+

Plot z=f(x,y) anomalies along tracks.

+

Takes a matrix, (x, y, z) triplets, or a file name as input and plots z +as a function of distance along track.

+

Must provide either data or x, y, and z.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/wiggle.html

+

Aliases:

+
    +
  • B = frame

  • +
  • D = position

  • +
  • J = projection

  • +
  • R = region

  • +
  • T = track

  • +
  • V = verbose

  • +
  • W = pen

  • +
+
    +
  • Z = scale

  • +
  • b = binary

  • +
  • c = panel

  • +
  • d = nodata

  • +
  • e = find

  • +
  • f = coltypes

  • +
+
    +
  • g = gap

  • +
  • h = header

  • +
  • i = incols

  • +
  • p = perspective

  • +
  • t = transparency

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • x/y/z (1-D arrays) – The arrays of x and y coordinates and z data points.

  • +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in either a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data. +Use parameter incols to choose which columns are x, y, z, +respectively.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • scale (str or float) – Give anomaly scale in data-units/distance-unit. Append c, i, +or p to indicate the distance unit (centimeters, inches, or +points); if no unit is given we use the default unit that is +controlled by PROJ_LENGTH_UNIT.

  • +
  • frame (bool, str, or list) – Set map boundary +frame and axes attributes.

  • +
  • position (str) – [g|j|J|n|x]refpoint+wlength[+jjustify][+al|r][+odx[/dy]][+l[label]]. +Define the reference point on the map for the vertical scale bar.

  • +
  • fillpositive (str) – Set color or pattern for filling positive wiggles +[Default is no fill].

  • +
  • fillnegative (str) – Set color or pattern for filling negative wiggles +[Default is no fill].

  • +
  • track (str) – Draw track [Default is no track]. Append pen attributes to use +[Default is "0.25p,black,solid"].

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • pen (str) – Specify outline pen attributes [Default is no outline].

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • panel (bool, int, or list) – [row,col|index]. +Select a specific subplot panel. Only allowed when in subplot +mode. Use panel=True to advance to the next panel in the +selected order. Instead of row,col you may also give a scalar +value index which depends on the order you set via autolabel +when the subplot was defined. Note: row, col, and index +all start at 0.

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • gap (str or list) –

    x|y|z|d|X|Y|Dgap[u][+a][+ccol][+n|p]. +Examine the spacing between consecutive data points in order to +impose breaks in the line. To specify multiple criteria, provide +a list with each item containing a string describing one set of +criteria.

    +
    +
      +
    • x|X - define a gap when there is a large enough +change in the x coordinates (upper case to use projected +coordinates).

    • +
    • y|Y - define a gap when there is a large enough +change in the y coordinates (upper case to use projected +coordinates).

    • +
    • d|D - define a gap when there is a large enough +distance between coordinates (upper case to use projected +coordinates).

    • +
    • z - define a gap when there is a large enough change in +the z data. Use +ccol to change the z data column +[Default col is 2 (i.e., 3rd column)].

    • +
    +
    +

    A unit u may be appended to the specified gap:

    +
    +
      +
    • For geographic data (x|y|d), the unit may +be arc- d(egrees), m(inutes), and s(econds) +, or (m)e(ters), f(eet), k(ilometers), +M(iles), or n(autical miles) [Default is +(m)e(ters)].

    • +
    • For projected data (X|Y|D), the unit may be +i(nches), c(entimeters), or p(oints).

    • +
    +
    +

    Append modifier +a to specify that all the criteria must be +met [default imposes breaks if any one criterion is met].

    +

    One of the following modifiers can be appended:

    +
    +
      +
    • +n - specify that the previous value minus the current +column value must exceed gap for a break to be imposed.

    • +
    • +p - specify that the current value minus the previous +value must exceed gap for a break to be imposed.

    • +
    +
    +

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • perspective (list or str) – [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]. +Select perspective view and set the azimuth and elevation angle of +the viewpoint [Default is [180, 90]]. Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#perspective-full.

  • +
  • transparency (float) – Set transparency level, in [0-100] percent range +[Default is 0, i.e., opaque]. +Only visible when PDF or raster format output is selected. +Only the PNG format selection adds a transparency layer +in the image (for further processing).

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
+
+ +
+

Examples using pygmt.Figure.wiggle

+
+

Wiggle along tracks

+
Wiggle along tracks
+
+

Bit and hachure patterns

+
Bit and hachure patterns
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.GMTDataArrayAccessor.html b/v0.14.0/api/generated/pygmt.GMTDataArrayAccessor.html new file mode 100644 index 00000000000..d9c70d3eb01 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.GMTDataArrayAccessor.html @@ -0,0 +1,351 @@ + + + + + + + + + pygmt.GMTDataArrayAccessor — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.GMTDataArrayAccessor

+
+
+class pygmt.GMTDataArrayAccessor(xarray_obj)[source]
+

GMT accessor for xarray.DataArray.

+

The accessor extends xarray.DataArray to store GMT-specific +properties about grids, which are important for PyGMT to correctly process +and plot the grids.

+

Notes

+

Due to the limitations of xarray accessors, the GMT accessors are created +once per xarray.DataArray instance. You may lose these +GMT-specific properties when manipulating grids (e.g., arithmetic and slice +operations) or when accessing a xarray.DataArray from a +xarray.Dataset. In these cases, you need to manually set these +properties before passing the grid to PyGMT.

+

Examples

+

For GMT’s built-in remote datasets, these GMT-specific properties are +automatically determined and you can access them as follows:

+
>>> from pygmt.datasets import load_earth_relief
+>>> # Use the global Earth relief grid with 1 degree spacing
+>>> grid = load_earth_relief(resolution="01d", registration="pixel")
+>>> # See if grid uses Gridline (0) or Pixel (1) registration
+>>> grid.gmt.registration
+1
+>>> # See if grid uses Cartesian (0) or Geographic (1) coordinate system
+>>> grid.gmt.gtype
+1
+
+
+

For xarray.DataArray grids created by yourself, grid properties +registration and gtype default to 0 (i.e., a gridline-registered, +Cartesian grid). You need to set the correct properties before +passing it to PyGMT functions:

+
>>> import numpy as np
+>>> import pygmt
+>>> import xarray as xr
+>>> # create a DataArray in gridline coordinates of sin(lon) * cos(lat)
+>>> interval = 2.5
+>>> lat = np.arange(90, -90 - interval, -interval)
+>>> lon = np.arange(0, 360 + interval, interval)
+>>> longrid, latgrid = np.meshgrid(lon, lat)
+>>> data = np.sin(np.deg2rad(longrid)) * np.cos(np.deg2rad(latgrid))
+>>> grid = xr.DataArray(data, coords=[("latitude", lat), ("longitude", lon)])
+>>> # default to a gridline-registered Cartesian grid
+>>> grid.gmt.registration, grid.gmt.gtype
+(0, 0)
+>>> # set it to a gridline-registered geographic grid
+>>> grid.gmt.registration = 0
+>>> grid.gmt.gtype = 1
+>>> grid.gmt.registration, grid.gmt.gtype
+(0, 1)
+
+
+

Note that the accessors are created once per xarray.DataArray +instance, so you may lose these GMT-specific properties after manipulating +your grid.

+

Inplace assignment operators like *= don’t create new instances, so the +properties are still kept:

+
>>> grid *= 2.0
+>>> grid.gmt.registration, grid.gmt.gtype
+(0, 1)
+
+
+

Other grid operations (e.g., arithmetic or slice operations) create new +instances, so the properties will be lost:

+
>>> # grid2 is a slice of the original grid
+>>> grid2 = grid[0:30, 50:80]
+>>> # properties are reset to the default values for new instance
+>>> grid2.gmt.registration, grid2.gmt.gtype
+(0, 0)
+>>> # need to set these properties before passing the grid to PyGMT
+>>> grid2.gmt.registration = grid.gmt.registration
+>>> grid2.gmt.gtype = grid.gmt.gtype
+>>> grid2.gmt.registration, grid2.gmt.gtype
+(0, 1)
+
+
+

Accessing a xarray.DataArray from a xarray.Dataset always +creates new instances, so these properties are always lost. The workaround +is to assign the xarray.DataArray into a variable:

+
>>> ds = xr.Dataset({"zval": grid})
+>>> ds.zval.gmt.registration, ds.zval.gmt.gtype
+(0, 0)
+>>> # manually set these properties won't work as expected
+>>> ds.zval.gmt.registration, ds.zval.gmt.gtype = 0, 1
+>>> ds.zval.gmt.registration, ds.zval.gmt.gtype
+(0, 0)
+>>> # workaround: assign the DataArray into a variable
+>>> zval = ds.zval
+>>> zval.gmt.registration, zval.gmt.gtype
+(0, 0)
+>>> zval.gmt.registration, zval.gmt.gtype = 0, 1
+>>> zval.gmt.registration, zval.gmt.gtype
+(0, 1)
+
+
+
+ +

Attributes

+
+
+property GMTDataArrayAccessor.gtype
+

Coordinate system type of the grid, either 0 (Cartesian) or 1 (Geographic).

+
+ +
+
+property GMTDataArrayAccessor.registration
+

Registration type of the grid, either 0 (Gridline) or 1 (Pixel).

+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.binstats.html b/v0.14.0/api/generated/pygmt.binstats.html new file mode 100644 index 00000000000..5124b9b7622 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.binstats.html @@ -0,0 +1,485 @@ + + + + + + + + + pygmt.binstats — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.binstats

+
+
+pygmt.binstats(data, outgrid=None, **kwargs)[source]
+

Bin spatial data and determine statistics per bin.

+

Reads arbitrarily located (x,y[,z][,w]) points +(2-4 columns) from data and for each +node in the specified grid layout determines which points are +within the given radius. These points are then used in the +calculation of the specified statistic. The results may be +presented as is or may be normalized by the circle area to +perhaps give density estimates.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/gmtbinstats.html

+

Aliases:

+
    +
  • C = statistic

  • +
  • E = empty

  • +
  • I = spacing

  • +
  • N = normalize

  • +
  • R = region

  • +
+
    +
  • S = search_radius

  • +
  • V = verbose

  • +
  • W = weight

  • +
  • a = aspatial

  • +
+
    +
  • b = binary

  • +
  • h = header

  • +
  • i = incols

  • +
  • r = registration

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – A file name of an ASCII data table or a 2-D numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • statistic (str) –

    a|d|g|i|l|L|m|n|o|p|q[quant]|r|s|u|U|z. +Choose the statistic that will be computed per node based on the +points that are within radius distance of the node. Select one of:

    +
      +
    • a: mean (average)

    • +
    • d: median absolute deviation (MAD)

    • +
    • g: full (max-min) range

    • +
    • i: 25-75% interquartile range

    • +
    • l: minimum (low)

    • +
    • L: minimum of positive values only

    • +
    • m: median

    • +
    • n: number of values

    • +
    • o: LMS scale

    • +
    • p: mode (maximum likelihood)

    • +
    • q: selected quantile (append desired quantile in 0-100% range [50])

    • +
    • r: root mean square (RMS)

    • +
    • s: standard deviation

    • +
    • u: maximum (upper)

    • +
    • U: maximum of negative values only

    • +
    • z: sum

    • +
    +

  • +
  • empty (float) – Set the value assigned to empty nodes [Default is NaN].

  • +
  • normalize (bool) – Normalize the resulting grid values by the area represented by the +search radius [Default is no normalization].

  • +
  • search_radius (float or str) – Set the search_radius that determines which data points are +considered close to a node. Append the distance unit. +Not compatible with tiling.

  • +
  • weight (str) – Input data have an extra column containing observation point weight. +If weights are given then weighted statistical quantities will be +computed while the count will be the sum of the weights instead of +number of points. If the weights are actually uncertainties +(one sigma) then append +s and weight = 1/sigma.

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • aspatial (bool or str) – [col=]name[,…]. +Control how aspatial data are handled during input and output. +Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#aspatial-full.

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • registration (str) – g|p. +Force gridline (g) or pixel (p) node registration +[Default is g(ridline)].

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in the file set by +outgrid)

  • +
+

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.blockmean.html b/v0.14.0/api/generated/pygmt.blockmean.html new file mode 100644 index 00000000000..ec49447e1a0 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.blockmean.html @@ -0,0 +1,542 @@ + + + + + + + + + pygmt.blockmean — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.blockmean

+
+
+pygmt.blockmean(data=None, x=None, y=None, z=None, output_type='pandas', outfile=None, **kwargs)[source]
+

Block average (x, y, z) data tables by mean estimation.

+

Reads arbitrarily located (x, y, z) triplets [or optionally weighted +quadruplets (x, y, z, w)] and writes to the output a mean position and +value for every non-empty block in a grid region defined by the region +and spacing parameters.

+

Takes a matrix, (x, y, z) triplets, or a file name as input.

+

Must provide either data or x, y, and z.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/blockmean.html

+

Aliases:

+
    +
  • I = spacing

  • +
  • R = region

  • +
  • S = summary

  • +
  • V = verbose

  • +
  • a = aspatial

  • +
+
    +
  • b = binary

  • +
  • d = nodata

  • +
  • e = find

  • +
  • f = coltypes

  • +
  • h = header

  • +
+
    +
  • i = incols

  • +
  • o = outcols

  • +
  • r = registration

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in (x, y, z) or (longitude, latitude, elevation) values by +providing a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • x/y/z (1-D arrays) – Arrays of x and y coordinates and values z of the data points.

  • +
  • output_type (Literal['pandas', 'numpy', 'file'], default: 'pandas') –

    Desired output type of the result data.

    +
      +
    • pandas will return a pandas.DataFrame object.

    • +
    • numpy will return a numpy.ndarray object.

    • +
    • file will save the result to the file specified by the outfile +parameter.

    • +
    +

  • +
  • outfile (str | None, default: None) – File name for saving the result data. Required if output_type="file". +If specified, output_type will be forced to be "file".

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • summary (str) –

    [m|n|s|w]. +Type of summary values calculated by blockmean.

    +
      +
    • m: reports mean value [Default]

    • +
    • n: report the number of input points inside each block

    • +
    • s: report the sum of all z-values inside a block

    • +
    • w: report the sum of weights

    • +
    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • aspatial (bool or str) – [col=]name[,…]. +Control how aspatial data are handled during input and output. +Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#aspatial-full.

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • outcols (str or 1-D array) –

    cols[,…][,t[word]]. +Specify data columns for primary output in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +writes all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in output order (e.g., +outcols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., outcols="0:2,4" to output the +first three columns followed by the 5th column). +To write from a given column until the end of the record, leave +off stop when specifying the column range. To write trailing +text, add the column t. Append the word number to t to +write only a single word from the trailing text. Instead of +specifying columns, use outcols="n" to simply read numerical +input and skip trailing text. Note: If incols is also +used then the columns given to outcols correspond to the +order after the incols selection has taken place.

    • +
    +

  • +
  • registration (str) – g|p. +Force gridline (g) or pixel (p) node registration +[Default is g(ridline)].

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
Return type:
+

DataFrame | ndarray | None

+
+
Returns:
+

ret – Return type depends on outfile and output_type:

+
    +
  • None if outfile is set (output will be stored in file set by +outfile)

  • +
  • pandas.DataFrame or numpy.ndarray if outfile is not set +(depends on output_type)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a table of ship observations of bathymetry off Baja California
+>>> data = pygmt.datasets.load_sample_data(name="bathymetry")
+>>> # Calculate block mean values within 5 by 5 arc-minute bins
+>>> data_bmean = pygmt.blockmean(data=data, region=[245, 255, 20, 30], spacing="5m")
+
+
+
+ +
+

Examples using pygmt.blockmean

+
+

Blockmean

+
Blockmean
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.blockmedian.html b/v0.14.0/api/generated/pygmt.blockmedian.html new file mode 100644 index 00000000000..a0b97c83c73 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.blockmedian.html @@ -0,0 +1,528 @@ + + + + + + + + + pygmt.blockmedian — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.blockmedian

+
+
+pygmt.blockmedian(data=None, x=None, y=None, z=None, output_type='pandas', outfile=None, **kwargs)[source]
+

Block average (x, y, z) data tables by median estimation.

+

Reads arbitrarily located (x, y, z) triplets [or optionally weighted +quadruplets (x, y, z, w)] and writes to the output a median position and +value for every non-empty block in a grid region defined by the region +and spacing parameters.

+

Takes a matrix, (x, y, z) triplets, or a file name as input.

+

Must provide either data or x, y, and z.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/blockmedian.html

+

Aliases:

+
    +
  • I = spacing

  • +
  • R = region

  • +
  • V = verbose

  • +
  • a = aspatial

  • +
  • b = binary

  • +
+
    +
  • d = nodata

  • +
  • e = find

  • +
  • f = coltypes

  • +
  • h = header

  • +
+
    +
  • i = incols

  • +
  • o = outcols

  • +
  • r = registration

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in (x, y, z) or (longitude, latitude, elevation) values by +providing a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • x/y/z (1-D arrays) – Arrays of x and y coordinates and values z of the data points.

  • +
  • output_type (Literal['pandas', 'numpy', 'file'], default: 'pandas') –

    Desired output type of the result data.

    +
      +
    • pandas will return a pandas.DataFrame object.

    • +
    • numpy will return a numpy.ndarray object.

    • +
    • file will save the result to the file specified by the outfile +parameter.

    • +
    +

  • +
  • outfile (str | None, default: None) – File name for saving the result data. Required if output_type="file". +If specified, output_type will be forced to be "file".

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • aspatial (bool or str) – [col=]name[,…]. +Control how aspatial data are handled during input and output. +Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#aspatial-full.

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • outcols (str or 1-D array) –

    cols[,…][,t[word]]. +Specify data columns for primary output in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +writes all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in output order (e.g., +outcols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., outcols="0:2,4" to output the +first three columns followed by the 5th column). +To write from a given column until the end of the record, leave +off stop when specifying the column range. To write trailing +text, add the column t. Append the word number to t to +write only a single word from the trailing text. Instead of +specifying columns, use outcols="n" to simply read numerical +input and skip trailing text. Note: If incols is also +used then the columns given to outcols correspond to the +order after the incols selection has taken place.

    • +
    +

  • +
  • registration (str) – g|p. +Force gridline (g) or pixel (p) node registration +[Default is g(ridline)].

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
Return type:
+

DataFrame | ndarray | None

+
+
Returns:
+

ret – Return type depends on outfile and output_type:

+
    +
  • None if outfile is set (output will be stored in the file set by +outfile)

  • +
  • pandas.DataFrame or numpy.ndarray if outfile is not set +(depends on output_type)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a table of ship observations of bathymetry off Baja California
+>>> data = pygmt.datasets.load_sample_data(name="bathymetry")
+>>> # Calculate block median values within 5 by 5 arc-minute bins
+>>> data_bmedian = pygmt.blockmedian(
+...     data=data, region=[245, 255, 20, 30], spacing="5m"
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.blockmode.html b/v0.14.0/api/generated/pygmt.blockmode.html new file mode 100644 index 00000000000..6e4b7ae1916 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.blockmode.html @@ -0,0 +1,526 @@ + + + + + + + + + pygmt.blockmode — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.blockmode

+
+
+pygmt.blockmode(data=None, x=None, y=None, z=None, output_type='pandas', outfile=None, **kwargs)[source]
+

Block average (x, y, z) data tables by mode estimation.

+

Reads arbitrarily located (x, y, z) triplets [or optionally weighted +quadruplets (x, y, z, w)] and writes to the output a mode position and +value for every non-empty block in a grid region defined by the region +and spacing parameters.

+

Takes a matrix, (x, y, z) triplets, or a file name as input.

+

Must provide either data or x, y, and z.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/blockmode.html

+

Aliases:

+
    +
  • I = spacing

  • +
  • R = region

  • +
  • V = verbose

  • +
  • a = aspatial

  • +
  • b = binary

  • +
+
    +
  • d = nodata

  • +
  • e = find

  • +
  • f = coltypes

  • +
  • h = header

  • +
+
    +
  • i = incols

  • +
  • o = outcols

  • +
  • r = registration

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in (x, y, z) or (longitude, latitude, elevation) values by +providing a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • x/y/z (1-D arrays) – Arrays of x and y coordinates and values z of the data points.

  • +
  • output_type (Literal['pandas', 'numpy', 'file'], default: 'pandas') –

    Desired output type of the result data.

    +
      +
    • pandas will return a pandas.DataFrame object.

    • +
    • numpy will return a numpy.ndarray object.

    • +
    • file will save the result to the file specified by the outfile +parameter.

    • +
    +

  • +
  • outfile (str | None, default: None) – File name for saving the result data. Required if output_type="file". +If specified, output_type will be forced to be "file".

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • aspatial (bool or str) – [col=]name[,…]. +Control how aspatial data are handled during input and output. +Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#aspatial-full.

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • outcols (str or 1-D array) –

    cols[,…][,t[word]]. +Specify data columns for primary output in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +writes all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in output order (e.g., +outcols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., outcols="0:2,4" to output the +first three columns followed by the 5th column). +To write from a given column until the end of the record, leave +off stop when specifying the column range. To write trailing +text, add the column t. Append the word number to t to +write only a single word from the trailing text. Instead of +specifying columns, use outcols="n" to simply read numerical +input and skip trailing text. Note: If incols is also +used then the columns given to outcols correspond to the +order after the incols selection has taken place.

    • +
    +

  • +
  • registration (str) – g|p. +Force gridline (g) or pixel (p) node registration +[Default is g(ridline)].

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
Return type:
+

DataFrame | ndarray | None

+
+
Returns:
+

ret – Return type depends on outfile and output_type:

+
    +
  • None if outfile is set (output will be stored in the file set by +outfile)

  • +
  • pandas.DataFrame or numpy.ndarray if outfile is not set +(depends on output_type)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a table of ship observations of bathymetry off Baja California
+>>> data = pygmt.datasets.load_sample_data(name="bathymetry")
+>>> # Calculate block mode values within 5 by 5 arc-minute bins
+>>> data_bmode = pygmt.blockmode(data=data, region=[245, 255, 20, 30], spacing="5m")
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.__enter__.html b/v0.14.0/api/generated/pygmt.clib.Session.__enter__.html new file mode 100644 index 00000000000..e773ea08abf --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.__enter__.html @@ -0,0 +1,273 @@ + + + + + + + + + pygmt.clib.Session.__enter__ — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.__enter__

+
+
+Session.__enter__()[source]
+

Create a GMT API session.

+

Calls pygmt.clib.Session.create.

+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.__exit__.html b/v0.14.0/api/generated/pygmt.clib.Session.__exit__.html new file mode 100644 index 00000000000..9e1acc010cf --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.__exit__.html @@ -0,0 +1,273 @@ + + + + + + + + + pygmt.clib.Session.__exit__ — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.__exit__

+
+
+Session.__exit__(exc_type, exc_value, traceback)[source]
+

Destroy the currently open GMT API session.

+

Calls pygmt.clib.Session.destroy.

+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.__getitem__.html b/v0.14.0/api/generated/pygmt.clib.Session.__getitem__.html new file mode 100644 index 00000000000..34149a00109 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.__getitem__.html @@ -0,0 +1,284 @@ + + + + + + + + + pygmt.clib.Session.__getitem__ — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.__getitem__

+
+
+Session.__getitem__(name)[source]
+

Get the value of a GMT constant.

+
+
Parameters:
+

name (str) – The name of the constant (e.g., "GMT_SESSION_EXTERNAL").

+
+
Return type:
+

int

+
+
Returns:
+

value – Integer value of the constant. Do not rely on this value because it might +change.

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.call_module.html b/v0.14.0/api/generated/pygmt.clib.Session.call_module.html new file mode 100644 index 00000000000..6c42e4ed0d2 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.call_module.html @@ -0,0 +1,299 @@ + + + + + + + + + pygmt.clib.Session.call_module — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.call_module

+
+
+Session.call_module(module, args)[source]
+

Call a GMT module with the given arguments.

+

Wraps GMT_Call_Module.

+

The GMT_Call_Module API function supports passing module arguments in three +different ways:

+
    +
  1. Pass a single string that contains whitespace-separated module arguments.

  2. +
  3. Pass a list of strings and each string contains a module argument.

  4. +
  5. Pass a list of GMT_OPTION data structure.

  6. +
+

Both options 1 and 2 are implemented in this function, but option 2 is preferred +because it can correctly handle special characters like whitespaces and +quotation marks in module arguments.

+
+
Parameters:
+
    +
  • module (str) – The GMT module name to be called ("coast", "basemap", etc).

  • +
  • args (str | list[str]) – Module arguments that will be passed to the GMT module. It can be either +a single string (e.g., "-R0/5/0/10 -JX10c -BWSen+t'My Title'") or a list +of strings (e.g., ["-R0/5/0/10", "-JX10c", "-BWSEN+tMy Title"]).

  • +
+
+
Raises:
+
    +
  • GMTInvalidInput – If the args argument is not a string or a list of strings.

  • +
  • GMTCLibError – If the returned status code of the function is non-zero.

  • +
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.create.html b/v0.14.0/api/generated/pygmt.clib.Session.create.html new file mode 100644 index 00000000000..67ec9999fca --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.create.html @@ -0,0 +1,290 @@ + + + + + + + + + pygmt.clib.Session.create — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.create

+
+
+Session.create(name)[source]
+

Create a new GMT C API session.

+

This is required before most other methods of pygmt.clib.Session can be +called.

+
+

Warning

+

Usage of pygmt.clib.Session as a context manager in a with +block is preferred over calling pygmt.clib.Session.create and +pygmt.clib.Session.destroy manually.

+
+

Calls GMT_Create_Session and generates a new GMTAPI_CTRL struct, which +is a ctypes.c_void_p pointer. Sets the session_pointer attribute to +this pointer.

+

Remember to terminate the current session using +pygmt.clib.Session.destroy before creating a new one.

+
+
Parameters:
+

name (str) – A name for this session. Doesn’t really affect the outcome.

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.create_data.html b/v0.14.0/api/generated/pygmt.clib.Session.create_data.html new file mode 100644 index 00000000000..f86ab9c7cc3 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.create_data.html @@ -0,0 +1,357 @@ + + + + + + + + + pygmt.clib.Session.create_data — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.create_data

+
+
+Session.create_data(family, geometry, mode, dim=None, ranges=None, inc=None, registration='GMT_GRID_NODE_REG', pad=None)[source]
+

Create an empty GMT data container and allocate space to hold data.

+

Valid data families and geometries are in FAMILIES and GEOMETRIES.

+

There are two ways to define the dimensions needed to actually allocate memory:

+
    +
  1. Via ranges, inc and registration.

  2. +
  3. Via dim and registration.

    +

    dim contains up to 4 values and they have different meanings for +different GMT data families:

    +

    For GMT_DATASET:

    +
      +
    • 0: number of tables

    • +
    • 1: number of segments per table

    • +
    • 2: number of rows per segment

    • +
    • 3: number of columns per row

    • +
    +

    For GMT_VECTOR:

    +
      +
    • 0: number of columns

    • +
    • 1: number of rows [optional, can be 0 if unknown]

    • +
    • 2: data type (e.g., GMT_DOUBLE) [Will be overwritten by put_vector]

    • +
    +

    For GMT_GRID/GMT_IMAGE/GMT_CUBE/GMT_MATRIX:

    +
      +
    • 0: number of columns

    • +
    • 1: number of rows

    • +
    • 2: number of bands or layers [Ignored for GMT_GRID]

    • +
    • 3: data type (e.g., GMT_DOUBLE) [For GMT_MATRIX only, but will be +overwritten by put_matrix]

    • +
    +

    In other words, inc is assumed to be 1.0, and ranges is +[0, dim[0], 0, dim[1]] for pixel registration or +[0, dim[0]-1.0, 0, dim[1]-1.0] for grid registration.

    +
  4. +
+

When creating a grid/image/cube, you can do it in one or two steps:

+
    +
  1. Call this function with mode="GMT_CONTAINER_AND_DATA". This creates +a header and allocates a grid or an image

  2. +
  3. Call this function twice:

    +
      +
    1. First with mode="GMT_CONTAINER_ONLY", to create a header only and +compute the dimensions based on other parameters

    2. +
    3. Second with mode="GMT_DATA_ONLY", to allocate the grid/image/cube +array based on the dimensions already set. This time, you pass NULL for +dim/ranges/inc/registration/pad and let data be +the void pointer returned in the first step.

    4. +
    +

    Note: This is not implemented yet, since this function doesn’t have the +data parameter.

    +
  4. +
+
+
Parameters:
+
    +
  • family (str) – A valid GMT data family name (e.g., "GMT_IS_DATASET"). See FAMILIES +for valid names.

  • +
  • geometry (str) – A valid GMT data geometry name (e.g., "GMT_IS_POINT"). See +GEOMETRIES for valid names.

  • +
  • mode (str) – A valid GMT data mode. See MODES for valid names. For +GMT_IS_DATASET/GMT_IS_MATRIX/GMT_IS_VECTOR, adding +GMT_WITH_STRINGS to the mode will allocate the corresponding arrays +of string pointers.

  • +
  • dim (Sequence[int] | None, default: None) – The dimensions of the dataset, as explained above. If None, will pass in +the NULL pointer.

  • +
  • ranges (Sequence[float] | None, default: None) – The data extent.

  • +
  • inc (Sequence[float] | None, default: None) – The increments between points of the dataset.

  • +
  • registration (Literal['GMT_GRID_NODE_REG', 'GMT_GRID_PIXEL_REG'], default: 'GMT_GRID_NODE_REG') – The node registration. Can be "GMT_GRID_PIXEL_REG" or +"GMT_GRID_NODE_REG".

  • +
  • pad (int | None, default: None) –

    The padding for GMT_IS_GRID/GMT_IS_IMAGE/GMT_IS_CUBE. If +None, defaults to "GMT_PAD_DEFAULT".

    +

    For GMT_IS_MATRIX, it can be:

    +
      +
    • 0: default row/col orientation [Default]

    • +
    • 1: row-major format (C)

    • +
    • 2: column-major format (FORTRAN)

    • +
    +

  • +
+
+
Return type:
+

c_void_p

+
+
Returns:
+

data_ptr – A ctypes pointer (an integer) to the allocated GMT data container.

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.destroy.html b/v0.14.0/api/generated/pygmt.clib.Session.destroy.html new file mode 100644 index 00000000000..4d103182411 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.destroy.html @@ -0,0 +1,285 @@ + + + + + + + + + pygmt.clib.Session.destroy — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.destroy

+
+
+Session.destroy()[source]
+

Destroy the currently open GMT API session.

+
+

Warning

+

Usage of pygmt.clib.Session as a context manager in a with +block is preferred over calling pygmt.clib.Session.create and +pygmt.clib.Session.destroy manually.

+
+

Calls GMT_Destroy_Session to terminate and free the memory of a registered +GMTAPI_CTRL session (the pointer for this struct is stored in the +session_pointer attribute).

+

Always use this method after you are done using a C API session. The session +needs to be destroyed before creating a new one. Otherwise, some of the +configuration files might be left behind and can influence subsequent API calls.

+

Sets the session_pointer attribute to None.

+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.extract_region.html b/v0.14.0/api/generated/pygmt.clib.Session.extract_region.html new file mode 100644 index 00000000000..28b942e047f --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.extract_region.html @@ -0,0 +1,315 @@ + + + + + + + + + pygmt.clib.Session.extract_region — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.extract_region

+
+
+Session.extract_region()[source]
+

Extract the region of the currently active figure.

+

Retrieves the information from the PostScript file, so it works for country +codes as well.

+
+
Return type:
+

ndarray

+
+
Returns:
+

region – A numpy 1-D array with the west, east, south, and north dimensions of the +current figure.

+
+
+

Examples

+
>>> import pygmt
+>>> fig = pygmt.Figure()
+>>> fig.coast(
+...     region=[0, 10, -20, -10], projection="M12c", frame=True, land="black"
+... )
+>>> with Session() as lib:
+...     region = lib.extract_region()
+>>> print(", ".join([f"{x:.2f}" for x in region]))
+0.00, 10.00, -20.00, -10.00
+
+
+

Using ISO country codes for the regions (for example "US.HI" for Hawaiʻi):

+
>>> fig = pygmt.Figure()
+>>> fig.coast(region="US.HI", projection="M12c", frame=True, land="black")
+>>> with Session() as lib:
+...     region = lib.extract_region()
+>>> print(", ".join([f"{x:.2f}" for x in region]))
+-164.71, -154.81, 18.91, 23.58
+
+
+

The country codes can have an extra argument that rounds the region to multiples +of the argument (for example, "US.HI+r5" will round the region to multiples +of 5):

+
>>> fig = pygmt.Figure()
+>>> fig.coast(region="US.HI+r5", projection="M12c", frame=True, land="black")
+>>> with Session() as lib:
+...     region = lib.extract_region()
+>>> print(", ".join([f"{x:.2f}" for x in region]))
+-165.00, -150.00, 15.00, 25.00
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.get_common.html b/v0.14.0/api/generated/pygmt.clib.Session.get_common.html new file mode 100644 index 00000000000..d7bbb1e8a0f --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.get_common.html @@ -0,0 +1,329 @@ + + + + + + + + + pygmt.clib.Session.get_common — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.get_common

+
+
+Session.get_common(option)[source]
+

Inquire if a GMT common option has been set and return its current value if +possible.

+
+
Parameters:
+

option (str) – The GMT common option to check. Valid options are "B", "I", "J", +"R", "U", "V", "X", "Y", "a", "b", "f", +"g", "h", "i", "n", "o", "p", "r", "s", +"t", and ":".

+
+
Return type:
+

bool | int | float | ndarray

+
+
Returns:
+

value – Whether the option was set or its value. If the option was not set, return +False. Otherwise, the return value depends on the choice of the option.

+
    +
  • options "B", "J", "U", "g", "n", "p", and "s": +return True if set, else False (bool)

  • +
  • "I": 2-element array for the increments (float)

  • +
  • "R": 4-element array for the region (float)

  • +
  • "V": the verbose level (int)

  • +
  • "X": the xshift (float)

  • +
  • "Y": the yshift (float)

  • +
  • "a": geometry of the dataset (int)

  • +
  • "b": return 0 if -bi was set and 1 if -bo was set (int)

  • +
  • "f": return 0 if -fi was set and 1 if -fo was set (int)

  • +
  • "h": whether to delete existing header records (int)

  • +
  • "i": number of input columns (int)

  • +
  • "o": number of output columns (int)

  • +
  • "r": registration type (int)

  • +
  • "t": 2-element array for the transparency (float)

  • +
  • ":": return 0 if -:i was set and 1 if -:o was set (int)

  • +
+

+
+
+

Examples

+
>>> with Session() as lib:
+...     lib.call_module(
+...         "basemap", ["-R0/10/10/15", "-JX5i/2.5i", "-Baf", "-Ve"]
+...     )
+...     region = lib.get_common("R")
+...     projection = lib.get_common("J")
+...     timestamp = lib.get_common("U")
+...     verbose = lib.get_common("V")
+...     lib.call_module("plot", ["-T", "-Xw+1i", "-Yh-1i"])
+...     xshift = lib.get_common("X")  # xshift/yshift are in inches
+...     yshift = lib.get_common("Y")
+>>> print(region, projection, timestamp, verbose, xshift, yshift)
+[ 0. 10. 10. 15.] True False 3 6.0 1.5
+>>> with Session() as lib:
+...     lib.call_module("basemap", ["-R0/10/10/15", "-JX5i/2.5i", "-Baf"])
+...     lib.get_common("A")
+Traceback (most recent call last):
+...
+pygmt.exceptions.GMTInvalidInput: Unknown GMT common option flag 'A'.
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.get_default.html b/v0.14.0/api/generated/pygmt.clib.Session.get_default.html new file mode 100644 index 00000000000..b180e91f064 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.get_default.html @@ -0,0 +1,302 @@ + + + + + + + + + pygmt.clib.Session.get_default — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.get_default

+
+
+Session.get_default(name)[source]
+

Get the value of a GMT configuration parameter or a GMT API parameter.

+

In addition to the long list of GMT configuration parameters, the following API +parameter names are also supported:

+
    +
  • "API_VERSION": The GMT API version

  • +
  • "API_PAD": The grid padding setting

  • +
  • "API_BINDIR": The binary file directory

  • +
  • "API_SHAREDIR": The share directory

  • +
  • "API_DATADIR": The data directory

  • +
  • "API_PLUGINDIR": The plugin directory

  • +
  • "API_LIBRARY": The core library path

  • +
  • "API_CORES": The number of cores

  • +
  • "API_IMAGE_LAYOUT": The image/band layout

  • +
  • "API_GRID_LAYOUT": The grid layout

  • +
  • "API_BIN_VERSION": The GMT binary version (with git information)

  • +
+
+
Parameters:
+

name (str) – The name of the GMT configuration parameter (e.g., "PROJ_LENGTH_UNIT") +or a GMT API parameter (e.g., "API_VERSION").

+
+
Return type:
+

str

+
+
Returns:
+

value – The current value for the parameter.

+
+
Raises:
+

GMTCLibError – If the parameter doesn’t exist.

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.get_libgmt_func.html b/v0.14.0/api/generated/pygmt.clib.Session.get_libgmt_func.html new file mode 100644 index 00000000000..a0ebfbae373 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.get_libgmt_func.html @@ -0,0 +1,301 @@ + + + + + + + + + pygmt.clib.Session.get_libgmt_func — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.get_libgmt_func

+
+
+Session.get_libgmt_func(name, argtypes=None, restype=None)[source]
+

Get a ctypes function from the libgmt shared library.

+

Assigns the argument and return type conversions for the function.

+

Use this method to access a C function from libgmt.

+
+
Parameters:
+
    +
  • name (str) – The name of the GMT API function.

  • +
  • argtypes (list | None, default: None) – List of ctypes types used to convert the Python input arguments for the API +function.

  • +
  • restype (ctypes type) – The ctypes type used to convert the input returned by the function into a +Python type.

  • +
+
+
Return type:
+

Callable

+
+
Returns:
+

function – The GMT API function.

+
+
+

Examples

+
>>> from ctypes import c_void_p, c_int
+>>> with Session() as lib:
+...     func = lib.get_libgmt_func(
+...         "GMT_Destroy_Session", argtypes=[c_void_p], restype=c_int
+...     )
+>>> type(func)
+<class 'ctypes.CDLL.__init__.<locals>._FuncPtr'>
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.html b/v0.14.0/api/generated/pygmt.clib.Session.html new file mode 100644 index 00000000000..4b33aadb278 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.html @@ -0,0 +1,417 @@ + + + + + + + + + pygmt.clib.Session — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session

+
+
+class pygmt.clib.Session[source]
+

A GMT API session where most operations involving the C API happen.

+

Works as a context manager (for use in a with block) to create a GMT C API +session and destroy it in the end to clean up memory.

+

Functions of the shared library are exposed as methods of this class. Most methods +MUST be used with an open session (inside a with block). If creating GMT data +structures to communicate data, put that code inside the same with block as the +API calls that will use the data.

+

By default, will let ctypes try to find the GMT shared library (libgmt). +If the environment variable GMT_LIBRARY_PATH is set, will look for the +shared library in the directory specified by it.

+

The session_pointer attribute holds a ctypes pointer to the currently open +session.

+
+
Raises:
+
    +
  • GMTCLibNotFoundError – If there was any problem loading the library (couldn’t find it or couldn’t + access the functions).

  • +
  • GMTCLibNoSessionError – If you try to call a method outside of a with block.

  • +
+
+
+

Examples

+
>>> from pygmt.helpers.testing import load_static_earth_relief
+>>> from pygmt.helpers import GMTTempFile
+>>> grid = load_static_earth_relief()
+>>> type(grid)
+<class 'xarray.core.dataarray.DataArray'>
+>>> # Create a session and destroy it automatically when exiting the "with" block.
+>>> with Session() as lib:
+...     # Create a virtual file and link to the memory block of the grid.
+...     with lib.virtualfile_from_grid(grid) as fin:
+...         # Create a temp file to use as output.
+...         with GMTTempFile() as fout:
+...             # Call the grdinfo module with the virtual file as input and the
+...             # temp file as output.
+...             lib.call_module("grdinfo", [fin, "-C", f"->{fout.name}"])
+...             # Read the contents of the temp file before it's deleted.
+...             print(fout.read().strip())
+-55 -47 -24 -10 190 981 1 1 8 14 1 1
+
+
+
+ +

Attributes

+
+
+property Session.info: dict[str, str]
+

Dictionary with the GMT version and default paths and parameters.

+
+ +
+
+property Session.session_pointer: c_void_p
+

The ctypes.c_void_p pointer to the current open GMT session.

+
+
Raises:
+

GMTCLibNoSessionError – If trying to access without a currently open GMT session (i.e., outside of + the context manager).

+
+
+
+ +

Methods Summary

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Session.call_module(module, args)

Call a GMT module with the given arguments.

Session.create(name)

Create a new GMT C API session.

Session.create_data(family, geometry, mode)

Create an empty GMT data container and allocate space to hold data.

Session.destroy()

Destroy the currently open GMT API session.

Session.extract_region()

Extract the region of the currently active figure.

Session.get_common(option)

Inquire if a GMT common option has been set and return its current value if possible.

Session.get_default(name)

Get the value of a GMT configuration parameter or a GMT API parameter.

Session.get_enum(name)

Get the value of a GMT constant (C enum) from gmt_resources.h.

Session.get_libgmt_func(name[, argtypes, ...])

Get a ctypes function from the libgmt shared library.

Session.inquire_virtualfile(vfname)

Get the family of a virtual file.

Session.open_virtual_file(family, geometry, ...)

Open a GMT virtual file associated with a data object for reading or writing.

Session.open_virtualfile(family, geometry, ...)

Open a GMT virtual file associated with a data object for reading or writing.

Session.put_matrix(dataset, matrix[, pad])

Attach a 2-D numpy array to a GMT dataset.

Session.put_strings(dataset, family, strings)

Attach a 1-D numpy array of dtype str as a column on a GMT dataset.

Session.put_vector(dataset, column, vector)

Attach a 1-D numpy array as a column on a GMT dataset.

Session.read_data(infile, kind[, family, ...])

Read a data file into a GMT data container.

Session.read_virtualfile(vfname[, kind])

Read data from a virtual file and optionally cast into a GMT data container.

Session.virtualfile_from_data([check_kind, ...])

Store any data inside a virtual file.

Session.virtualfile_from_grid(grid)

Store a grid in a virtual file.

Session.virtualfile_from_matrix(matrix)

Store a 2-D numpy array as a matrix inside a virtual file.

Session.virtualfile_from_stringio(stringio)

Store a io.StringIO object in a virtual file.

Session.virtualfile_from_vectors(vectors, *args)

Store a sequence of 1-D vectors as columns of a dataset inside a virtual file.

Session.virtualfile_in([check_kind, data, ...])

Store any data inside a virtual file.

Session.virtualfile_out([kind, fname])

Create a virtual file or an actual file for storing output data.

Session.virtualfile_to_dataset(vfname[, ...])

Output a tabular dataset stored in a virtual file to a different format.

Session.virtualfile_to_raster(vfname[, ...])

Output raster data stored in a virtual file to an xarray.DataArray object.

Session.write_data(family, geometry, mode, ...)

Write a GMT data container to a file.

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.open_virtualfile.html b/v0.14.0/api/generated/pygmt.clib.Session.open_virtualfile.html new file mode 100644 index 00000000000..edcca9e4eda --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.open_virtualfile.html @@ -0,0 +1,328 @@ + + + + + + + + + pygmt.clib.Session.open_virtualfile — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.open_virtualfile

+
+
+Session.open_virtualfile(family, geometry, direction, data)[source]
+

Open a GMT virtual file associated with a data object for reading or writing.

+

GMT uses a virtual file scheme to pass in data or get data from API modules. Use +it to pass in your GMT data structure (created using +pygmt.clib.Session.create_data) to a module that expects an input file, +or get the output from a module that writes to a file.

+

Use in a with block. Will automatically close the virtual file when leaving +the with block. Because of this, no wrapper for GMT_Close_VirtualFile +is provided.

+
+
Parameters:
+
    +
  • family (str) – A valid GMT data family name (e.g., "GMT_IS_DATASET"). Should be the +same as the one you used to create your data structure.

  • +
  • geometry (str) – A valid GMT data geometry name (e.g., "GMT_IS_POINT"). Should be the +same as the one you used to create your data structure.

  • +
  • direction (str) – Either "GMT_IN" or "GMT_OUT" to indicate if passing data to GMT or +getting it out of GMT, respectively. By default, GMT can modify the data you +pass in. Add modifier "GMT_IS_REFERENCE" to tell GMT the data are +read-only, or "GMT_IS_DUPLICATE" to tell GMT to duplicate the data.

  • +
  • data (c_void_p | None) – The ctypes void pointer to the GMT data structure. For output (i.e., +direction="GMT_OUT"), it can be None to have GMT automatically +allocate the output GMT data structure.

  • +
+
+
Yields:
+

vfname – The name of the virtual file that you can pass to a GMT module.

+
+
Return type:
+

Generator[str, None, None]

+
+
+

Examples

+
>>> from pygmt.helpers import GMTTempFile
+>>> import numpy as np
+>>> x = np.array([0, 1, 2, 3, 4])
+>>> y = np.array([5, 6, 7, 8, 9])
+>>> with Session() as lib:
+...     family = "GMT_IS_DATASET|GMT_VIA_VECTOR"
+...     geometry = "GMT_IS_POINT"
+...     dataset = lib.create_data(
+...         family=family,
+...         geometry=geometry,
+...         mode="GMT_CONTAINER_ONLY",
+...         dim=[2, 5, lib["GMT_INT"], 0],  # ncolumns, nrows, dtype, unused
+...     )
+...     lib.put_vector(dataset, column=0, vector=x)
+...     lib.put_vector(dataset, column=1, vector=y)
+...     # Add the dataset to a virtual file
+...     vfargs = (family, geometry, "GMT_IN|GMT_IS_REFERENCE", dataset)
+...     with lib.open_virtualfile(*vfargs) as vfile:
+...         # Send the output to a temp file so that we can read it
+...         with GMTTempFile() as ofile:
+...             lib.call_module("info", [vfile, f"->{ofile.name}"])
+...             print(ofile.read().strip())
+<vector memory>: N = 5 <0/4> <5/9>
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.put_matrix.html b/v0.14.0/api/generated/pygmt.clib.Session.put_matrix.html new file mode 100644 index 00000000000..40687f0ec05 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.put_matrix.html @@ -0,0 +1,299 @@ + + + + + + + + + pygmt.clib.Session.put_matrix — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.put_matrix

+
+
+Session.put_matrix(dataset, matrix, pad=0)[source]
+

Attach a 2-D numpy array to a GMT dataset.

+

Use this function to attach numpy array data to a GMT dataset and pass it to GMT +modules. Wraps GMT_Put_Matrix.

+

The dataset must be created by pygmt.clib.Session.create_data first with +family="GMT_IS_DATASET|GMT_VIA_MATRIX".

+

Not all numpy dtypes are supported, only: int8, int16, int32, int64, longlong, +uint8, uint16, uint32, uint64, ulonglong, float32, and float64.

+
+

Warning

+

The numpy array must be C contiguous in memory. Use +numpy.ascontiguousarray to make sure your matrix is contiguous (it +won’t copy if it already is).

+
+
+
Parameters:
+
    +
  • dataset (c_void_p) – The ctypes void pointer to a GMT_MATRIX data container. Create it with +pygmt.clib.Session.create_data.

  • +
  • matrix (ndarray) – The array that will be attached to the dataset. Must be a 2-D C contiguous +array.

  • +
  • pad (int, default: 0) – The amount of padding that should be added to the matrix. Use when creating +grids for modules that require padding.

  • +
+
+
Raises:
+

GMTCLibError – If given invalid input or GMT_Put_Matrix exits with a non-zero status.

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.put_strings.html b/v0.14.0/api/generated/pygmt.clib.Session.put_strings.html new file mode 100644 index 00000000000..e0546c012c9 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.put_strings.html @@ -0,0 +1,297 @@ + + + + + + + + + pygmt.clib.Session.put_strings — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.put_strings

+
+
+Session.put_strings(dataset, family, strings)[source]
+

Attach a 1-D numpy array of dtype str as a column on a GMT dataset.

+

Use this function to attach string type numpy array data to a GMT dataset and +pass it to GMT modules. Wraps GMT_Put_Strings.

+

The dataset must be created by pygmt.clib.Session.create_data first.

+
+

Warning

+

The numpy array must be C contiguous in memory. If it comes from a column +slice of a 2-D array, for example, you will have to make a copy. Use +numpy.ascontiguousarray to make sure your vector is contiguous (it +won’t copy if it already is).

+
+
+
Parameters:
+
    +
  • dataset (c_void_p) – The ctypes void pointer to a GMT_VECTOR/GMT_MATRIX data container. +Create it with pygmt.clib.Session.create_data.

  • +
  • family (str) – The family type of the dataset. Can be either GMT_IS_VECTOR or +GMT_IS_MATRIX.

  • +
  • strings (ndarray) – The array that will be attached to the dataset. Must be a 1-D C contiguous +array.

  • +
+
+
Raises:
+

GMTCLibError – If given invalid input or GMT_Put_Strings exits with a non-zero status.

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.put_vector.html b/v0.14.0/api/generated/pygmt.clib.Session.put_vector.html new file mode 100644 index 00000000000..c56844058fa --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.put_vector.html @@ -0,0 +1,299 @@ + + + + + + + + + pygmt.clib.Session.put_vector — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.put_vector

+
+
+Session.put_vector(dataset, column, vector)[source]
+

Attach a 1-D numpy array as a column on a GMT dataset.

+

Use this function to attach numpy array data to a GMT dataset and pass it to GMT +modules. Wraps GMT_Put_Vector.

+

The dataset must be created by pygmt.clib.Session.create_data first with +family="GMT_IS_DATASET|GMT_VIA_VECTOR".

+

Not all numpy dtypes are supported, only: int8, int16, int32, int64, longlong, +uint8, uint16, uint32, uint64, ulonglong, float32, float64, str_, datetime64, +and timedelta64.

+
+

Warning

+

The numpy array must be C contiguous in memory. Use +numpy.ascontiguousarray to make sure your vector is contiguous (it +won’t copy if it already is).

+
+
+
Parameters:
+
    +
  • dataset (c_void_p) – The ctypes void pointer to a GMT_VECTOR data container. Create it with +pygmt.clib.Session.create_data.

  • +
  • column (int) – The column number of this vector in the dataset (starting from 0).

  • +
  • vector (ndarray) – The array that will be attached to the dataset. Must be a 1-D C contiguous +array.

  • +
+
+
Raises:
+

GMTCLibError – If given invalid input or GMT_Put_Vector exits with a non-zero status.

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.read_data.html b/v0.14.0/api/generated/pygmt.clib.Session.read_data.html new file mode 100644 index 00000000000..ab7db22eda1 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.read_data.html @@ -0,0 +1,305 @@ + + + + + + + + + pygmt.clib.Session.read_data — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.read_data

+
+
+Session.read_data(infile, kind, family=None, geometry=None, mode='GMT_READ_NORMAL', region=None, data=None)[source]
+

Read a data file into a GMT data container.

+

Wraps GMT_Read_Data but only allows reading from a file. The function +definition is different from the original C API function.

+
+
Parameters:
+
    +
  • infile (str) – The input file name.

  • +
  • kind (Literal['dataset', 'grid', 'image']) – The data kind of the input file. Valid values are "dataset", "grid" +and "image".

  • +
  • family (str | None, default: None) – A valid GMT data family name (e.g., "GMT_IS_DATASET"). See the +FAMILIES attribute for valid names. If None, will determine the data +family from the kind parameter.

  • +
  • geometry (str | None, default: None) – A valid GMT data geometry name (e.g., "GMT_IS_POINT"). See the +GEOMETRIES attribute for valid names. If None, will determine the +data geometry from the kind parameter.

  • +
  • mode (str, default: 'GMT_READ_NORMAL') – How the data is to be read from the file. This option varies depending on +the given family. See the +GMT API documentation +for details. Default is GMT_READ_NORMAL which corresponds to the default +read mode value of 0 in the GMT_enum_read enum.

  • +
  • region (Sequence[float] | None, default: None) – Subregion of the data, in the form of [xmin, xmax, ymin, ymax, zmin, zmax]. +If None, the whole data is read.

  • +
  • data (default: None) – None or the pointer returned by this function after a first call. It’s +useful when reading grids/images/cubes in two steps (get a grid/image/cube +structure with a header, then read the data).

  • +
+
+
Returns:
+

Pointer to the data container, or None if there were errors.

+
+
Raises:
+

GMTCLibError – If the GMT API function fails to read the data.

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.read_virtualfile.html b/v0.14.0/api/generated/pygmt.clib.Session.read_virtualfile.html new file mode 100644 index 00000000000..7ae3b613ed8 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.read_virtualfile.html @@ -0,0 +1,316 @@ + + + + + + + + + pygmt.clib.Session.read_virtualfile — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.read_virtualfile

+
+
+Session.read_virtualfile(vfname, kind=None)[source]
+

Read data from a virtual file and optionally cast into a GMT data container.

+
+
Parameters:
+
    +
  • vfname (str) – Name of the virtual file to read.

  • +
  • kind (Literal['dataset', 'grid', 'image', 'cube', None], default: None) – Cast the data into a GMT data container. Valid values are "dataset", +"grid", "image" and None. If None, will return a ctypes void +pointer.

  • +
+
+
Returns:
+

pointer – Pointer to the GMT data container. If kind is None, returns a ctypes +void pointer instead.

+
+
+

Examples

+
>>> from pathlib import Path
+>>> from pygmt.clib import Session
+>>> from pygmt.helpers import GMTTempFile
+>>>
+>>> # Read dataset from a virtual file
+>>> with Session() as lib:
+...     with GMTTempFile(suffix=".txt") as tmpfile:
+...         with Path(tmpfile.name).open(mode="w") as fp:
+...             print("1.0 2.0 3.0 TEXT", file=fp)
+...         with lib.virtualfile_out(kind="dataset") as vouttbl:
+...             lib.call_module("read", [tmpfile.name, vouttbl, "-Td"])
+...             # Read the virtual file as a void pointer
+...             void_pointer = lib.read_virtualfile(vouttbl)
+...             assert isinstance(void_pointer, int)  # void pointer is an int
+...             # Read the virtual file as a dataset
+...             data_pointer = lib.read_virtualfile(vouttbl, kind="dataset")
+...             assert isinstance(data_pointer, ctp.POINTER(_GMT_DATASET))
+>>>
+>>> # Read grid from a virtual file
+>>> with Session() as lib:
+...     with lib.virtualfile_out(kind="grid") as voutgrd:
+...         lib.call_module("read", ["@earth_relief_01d_g", voutgrd, "-Tg"])
+...         # Read the virtual file as a void pointer
+...         void_pointer = lib.read_virtualfile(voutgrd)
+...         assert isinstance(void_pointer, int)  # void pointer is an int
+...         data_pointer = lib.read_virtualfile(voutgrd, kind="grid")
+...         assert isinstance(data_pointer, ctp.POINTER(_GMT_GRID))
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_data.html b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_data.html new file mode 100644 index 00000000000..495fff73ada --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_data.html @@ -0,0 +1,272 @@ + + + + + + + + + pygmt.clib.Session.virtualfile_from_data — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.virtualfile_from_data

+
+
+Session.virtualfile_from_data(check_kind=None, data=None, x=None, y=None, z=None, extra_arrays=None, required_z=False, required_data=True)[source]
+

Store any data inside a virtual file.

+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_grid.html b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_grid.html new file mode 100644 index 00000000000..7cb6e2a3eb0 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_grid.html @@ -0,0 +1,319 @@ + + + + + + + + + pygmt.clib.Session.virtualfile_from_grid — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.virtualfile_from_grid

+
+
+Session.virtualfile_from_grid(grid)[source]
+

Store a grid in a virtual file.

+

Use the virtual file name to pass in the data in your grid to a GMT module. +Grids must be xarray.DataArray instances.

+

Context manager (use in a with block). Yields the virtual file name that you +can pass as an argument to a GMT module call. Closes the virtual file upon exit +of the with block.

+

The virtual file will contain the grid as a GMT_MATRIX data container with +extra metadata.

+

Use this instead of creating a data container and virtual file by hand with +pygmt.clib.Session.create_data, pygmt.clib.Session.put_matrix, +and pygmt.clib.Session.open_virtualfile.

+

The grid data matrix must be C contiguous in memory. If it is not (e.g., it is a +slice of a larger array), the array will be copied to make sure it is.

+
+
Parameters:
+

grid (DataArray) – The grid that will be included in the virtual file.

+
+
Yields:
+

fname – The name of virtual file. Pass this as a file name argument to a GMT module.

+
+
Return type:
+

Generator[str, None, None]

+
+
+

Examples

+
>>> from pygmt.helpers.testing import load_static_earth_relief
+>>> from pygmt.helpers import GMTTempFile
+>>> data = load_static_earth_relief()
+>>> print(data.shape)
+(14, 8)
+>>> print(data.lon.values.min(), data.lon.values.max())
+-54.5 -47.5
+>>> print(data.lat.values.min(), data.lat.values.max())
+-23.5 -10.5
+>>> print(data.values.min(), data.values.max())
+190.0 981.0
+>>> with Session() as ses:
+...     with ses.virtualfile_from_grid(data) as fin:
+...         # Send the output to a file so that we can read it
+...         with GMTTempFile() as fout:
+...             ses.call_module(
+...                 "grdinfo", [fin, "-L0", "-Cn", f"->{fout.name}"]
+...             )
+...             print(fout.read().strip())
+-55 -47 -24 -10 190 981 1 1 8 14 1 1
+>>> # The output is: w e s n z0 z1 dx dy n_columns n_rows reg gtype
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_matrix.html b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_matrix.html new file mode 100644 index 00000000000..b73a86826f7 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_matrix.html @@ -0,0 +1,315 @@ + + + + + + + + + pygmt.clib.Session.virtualfile_from_matrix — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.virtualfile_from_matrix

+
+
+Session.virtualfile_from_matrix(matrix)[source]
+

Store a 2-D numpy array as a matrix inside a virtual file.

+

Use the virtual file name to pass in the data in your matrix to a GMT module.

+

Context manager (use in a with block). Yields the virtual file name that you +can pass as an argument to a GMT module call. Closes the virtual file upon exit +of the with block.

+

The virtual file will contain the array as a GMT_MATRIX data container +pretending to be a GMT_DATASET data container.

+

Not meant for creating ``GMT_GRID``. The grid requires more metadata than +just the data matrix. Use pygmt.clib.Session.virtualfile_from_grid +instead.

+

Use this instead of creating the data container and virtual file by hand with +pygmt.clib.Session.create_data, pygmt.clib.Session.put_matrix, +and pygmt.clib.Session.open_virtualfile.

+

The matrix must be C contiguous in memory. If it is not (e.g., it is a slice of +a larger array), the array will be copied to make sure it is.

+
+
Parameters:
+

matrix (ndarray) – The matrix that will be included in the GMT data container.

+
+
Yields:
+

fname – The name of virtual file. Pass this as a file name argument to a GMT module.

+
+
Return type:
+

Generator[str, None, None]

+
+
+

Examples

+
>>> from pygmt.helpers import GMTTempFile
+>>> import numpy as np
+>>> data = np.arange(12).reshape((4, 3))
+>>> print(data)
+[[ 0  1  2]
+ [ 3  4  5]
+ [ 6  7  8]
+ [ 9 10 11]]
+>>> with Session() as ses:
+...     with ses.virtualfile_from_matrix(data) as fin:
+...         # Send the output to a file so that we can read it
+...         with GMTTempFile() as fout:
+...             ses.call_module("info", [fin, f"->{fout.name}"])
+...             print(fout.read().strip())
+<matrix memory>: N = 4 <0/9> <1/10> <2/11>
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_stringio.html b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_stringio.html new file mode 100644 index 00000000000..4005d3f31bf --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_stringio.html @@ -0,0 +1,310 @@ + + + + + + + + + pygmt.clib.Session.virtualfile_from_stringio — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.virtualfile_from_stringio

+
+
+Session.virtualfile_from_stringio(stringio)[source]
+

Store a io.StringIO object in a virtual file.

+

Store the contents of a io.StringIO object in a GMT_DATASET container +and create a virtual file to pass to a GMT module.

+

For simplicity, currently we make following assumptions in the StringIO object

+
    +
  • "#" indicates a comment line.

  • +
  • ">" indicates a segment header.

  • +
+
+
Parameters:
+

stringio (StringIO) – The io.StringIO object containing the data to be stored in the +virtual file.

+
+
Yields:
+

fname – The name of the virtual file.

+
+
Return type:
+

Generator[str, None, None]

+
+
+

Examples

+
>>> import io
+>>> from pygmt.clib import Session
+>>> # A StringIO object containing legend specifications
+>>> stringio = io.StringIO(
+...     "# Comment\n"
+...     "H 24p Legend\n"
+...     "N 2\n"
+...     "S 0.1i c 0.15i p300/12 0.25p 0.3i My circle\n"
+... )
+>>> with Session() as lib:
+...     with lib.virtualfile_from_stringio(stringio) as fin:
+...         lib.virtualfile_to_dataset(vfname=fin, output_type="pandas")
+                                             0
+0                                 H 24p Legend
+1                                          N 2
+2  S 0.1i c 0.15i p300/12 0.25p 0.3i My circle
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_vectors.html b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_vectors.html new file mode 100644 index 00000000000..4b40c53a218 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_from_vectors.html @@ -0,0 +1,310 @@ + + + + + + + + + pygmt.clib.Session.virtualfile_from_vectors — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.virtualfile_from_vectors

+
+
+Session.virtualfile_from_vectors(vectors, *args)[source]
+

Store a sequence of 1-D vectors as columns of a dataset inside a virtual file.

+

Use the virtual file name to pass the dataset with your vectors to a GMT module.

+

Context manager (use in a with block). Yields the virtual file name that you +can pass as an argument to a GMT module call. Closes the virtual file upon exit +of the with block.

+

Use this instead of creating the data container and virtual file by hand with +pygmt.clib.Session.create_data, pygmt.clib.Session.put_vector, +and pygmt.clib.Session.open_virtualfile.

+

If the arrays are C contiguous blocks of memory, they will be passed without +copying to GMT. If they are not (e.g., they are columns of a 2-D array), they +will need to be copied to a contiguous block.

+
+
Parameters:
+

vectors (Sequence) – A sequence of vectors that will be stored in the dataset. All must be of the +same size.

+
+
Yields:
+

fname – The name of virtual file. Pass this as a file name argument to a GMT module.

+
+
Return type:
+

Generator[str, None, None]

+
+
+

Examples

+
>>> from pygmt.helpers import GMTTempFile
+>>> import numpy as np
+>>> import pandas as pd
+>>> x = [1, 2, 3]
+>>> y = np.array([4, 5, 6])
+>>> z = pd.Series([7, 8, 9])
+>>> with Session() as ses:
+...     with ses.virtualfile_from_vectors((x, y, z)) as fin:
+...         # Send the output to a file so that we can read it
+...         with GMTTempFile() as fout:
+...             ses.call_module("info", [fin, f"->{fout.name}"])
+...             print(fout.read().strip())
+<vector memory>: N = 3 <1/3> <4/6> <7/9>
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_in.html b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_in.html new file mode 100644 index 00000000000..410d263179f --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_in.html @@ -0,0 +1,316 @@ + + + + + + + + + pygmt.clib.Session.virtualfile_in — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.virtualfile_in

+
+
+Session.virtualfile_in(check_kind=None, data=None, x=None, y=None, z=None, extra_arrays=None, required_z=False, required_data=True)[source]
+

Store any data inside a virtual file.

+

This convenience function automatically detects the kind of data passed +into it, and produces a virtualfile that can be passed into GMT later +on.

+
+
Parameters:
+
    +
  • check_kind (str or None) – Used to validate the type of data that can be passed in. Choose +from ‘raster’, ‘vector’, or None. Default is None (no validation).

  • +
  • data (str or pathlib.Path or xarray.DataArray or {table-like} or None) – Any raster or vector data format. This could be a file name or +path, a raster grid, a vector matrix/arrays, or other supported +data input.

  • +
  • x/y/z (1-D arrays or None) – x, y, and z columns as numpy arrays.

  • +
  • extra_arrays (list of 1-D arrays) – Optional. A list of numpy arrays in addition to x, y, and z. +All of these arrays must be of the same size as the x/y/z arrays.

  • +
  • required_z (bool) – State whether the ‘z’ column is required.

  • +
  • required_data (bool) – Set to True when ‘data’ is required, or False when dealing with +optional virtual files. [Default is True].

  • +
+
+
Returns:
+

file_context (contextlib._GeneratorContextManager) – The virtual file stored inside a context manager. Access the file +name of this virtualfile using with file_context as fname: ....

+
+
+

Examples

+
>>> from pygmt.helpers import GMTTempFile
+>>> import xarray as xr
+>>> data = xr.Dataset(
+...     coords=dict(index=[0, 1, 2]),
+...     data_vars=dict(
+...         x=("index", [9, 8, 7]),
+...         y=("index", [6, 5, 4]),
+...         z=("index", [3, 2, 1]),
+...     ),
+... )
+>>> with Session() as ses:
+...     with ses.virtualfile_in(check_kind="vector", data=data) as fin:
+...         # Send the output to a file so that we can read it
+...         with GMTTempFile() as fout:
+...             ses.call_module("info", [fin, f"->{fout.name}"])
+...             print(fout.read().strip())
+<vector memory>: N = 3 <7/9> <4/6> <1/3>
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_out.html b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_out.html new file mode 100644 index 00000000000..d1f71ee2be1 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_out.html @@ -0,0 +1,318 @@ + + + + + + + + + pygmt.clib.Session.virtualfile_out — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.virtualfile_out

+
+
+Session.virtualfile_out(kind='dataset', fname=None)[source]
+

Create a virtual file or an actual file for storing output data.

+

If fname is not given, a virtual file will be created to store the output +data into a GMT data container and the function yields the name of the virtual +file. Otherwise, the output data will be written into the specified file and the +function simply yields the actual file name.

+
+
Parameters:
+
    +
  • kind (Literal['dataset', 'grid', 'image'], default: 'dataset') – The data kind of the virtual file to create. Valid values are "dataset", +"grid", and "image". Ignored if fname is specified.

  • +
  • fname (str | None, default: None) – The name of the actual file to write the output data. No virtual file will +be created.

  • +
+
+
Yields:
+

vfile – Name of the virtual file or the actual file.

+
+
Return type:
+

Generator[str, None, None]

+
+
+

Examples

+
>>> from pathlib import Path
+>>> from pygmt.clib import Session
+>>> from pygmt.datatypes import _GMT_DATASET
+>>> from pygmt.helpers import GMTTempFile
+>>>
+>>> with GMTTempFile(suffix=".txt") as tmpfile:
+...     with Path(tmpfile.name).open(mode="w") as fp:
+...         print("1.0 2.0 3.0 TEXT", file=fp)
+...
+...     # Create a virtual file for storing the output table.
+...     with Session() as lib:
+...         with lib.virtualfile_out(kind="dataset") as vouttbl:
+...             lib.call_module("read", [tmpfile.name, vouttbl, "-Td"])
+...             ds = lib.read_virtualfile(vouttbl, kind="dataset")
+...             assert isinstance(ds.contents, _GMT_DATASET)
+...
+...     # Write data to an actual file without creating a virtual file.
+...     with Session() as lib:
+...         with lib.virtualfile_out(fname=tmpfile.name) as vouttbl:
+...             assert vouttbl == tmpfile.name
+...             lib.call_module("read", [tmpfile.name, vouttbl, "-Td"])
+...         line = Path(vouttbl).read_text()
+...         assert line == "1\t2\t3\tTEXT\n"
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_to_dataset.html b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_to_dataset.html new file mode 100644 index 00000000000..63ebafc7efd --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_to_dataset.html @@ -0,0 +1,385 @@ + + + + + + + + + pygmt.clib.Session.virtualfile_to_dataset — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.virtualfile_to_dataset

+
+
+Session.virtualfile_to_dataset(vfname, output_type='pandas', header=None, column_names=None, dtype=None, index_col=None)[source]
+

Output a tabular dataset stored in a virtual file to a different format.

+

The format of the dataset is determined by the output_type parameter.

+
+
Parameters:
+
    +
  • vfname (str) – The virtual file name that stores the result data.

  • +
  • output_type (Literal['pandas', 'numpy', 'file', 'strings'], default: 'pandas') –

    Desired output type of the result data.

    +
      +
    • "pandas" will return a pandas.DataFrame object.

    • +
    • "numpy" will return a numpy.ndarray object.

    • +
    • "file" means the result was saved to a file and will return None.

    • +
    • "strings" will return the trailing text only as an array of strings.

    • +
    +

  • +
  • header (int | None, default: None) – Row number containing column names for the pandas.DataFrame output. +header=None means not to parse the column names from table header. +Ignored if the row number is larger than the number of headers in the table.

  • +
  • column_names (list[str] | None, default: None) – The column names for the pandas.DataFrame output.

  • +
  • dtype (type | dict[str, type] | None, default: None) – Data type for the columns of the pandas.DataFrame output. Can be a +single type for all columns or a dictionary mapping column names to types.

  • +
  • index_col (str | int | None, default: None) – Column to set as the index of the pandas.DataFrame output.

  • +
+
+
Return type:
+

DataFrame | ndarray | None

+
+
Returns:
+

result – The result dataset. If output_type="file" returns None.

+
+
+

Examples

+
>>> from pathlib import Path
+>>> import numpy as np
+>>> import pandas as pd
+>>>
+>>> from pygmt.helpers import GMTTempFile
+>>> from pygmt.clib import Session
+>>>
+>>> with GMTTempFile(suffix=".txt") as tmpfile:
+...     # prepare the sample data file
+...     with Path(tmpfile.name).open(mode="w") as fp:
+...         print(">", file=fp)
+...         print("1.0 2.0 3.0 TEXT1 TEXT23", file=fp)
+...         print("4.0 5.0 6.0 TEXT4 TEXT567", file=fp)
+...         print(">", file=fp)
+...         print("7.0 8.0 9.0 TEXT8 TEXT90", file=fp)
+...         print("10.0 11.0 12.0 TEXT123 TEXT456789", file=fp)
+...
+...     # file output
+...     with Session() as lib:
+...         with GMTTempFile(suffix=".txt") as outtmp:
+...             with lib.virtualfile_out(
+...                 kind="dataset", fname=outtmp.name
+...             ) as vouttbl:
+...                 lib.call_module("read", [tmpfile.name, vouttbl, "-Td"])
+...                 result = lib.virtualfile_to_dataset(
+...                     vfname=vouttbl, output_type="file"
+...                 )
+...                 assert result is None
+...                 assert Path(outtmp.name).stat().st_size > 0
+...
+...     # strings, numpy and pandas outputs
+...     with Session() as lib:
+...         with lib.virtualfile_out(kind="dataset") as vouttbl:
+...             lib.call_module("read", [tmpfile.name, vouttbl, "-Td"])
+...
+...             # strings output
+...             outstr = lib.virtualfile_to_dataset(
+...                 vfname=vouttbl, output_type="strings"
+...             )
+...             assert isinstance(outstr, np.ndarray)
+...             assert outstr.dtype.kind in ("S", "U")
+...
+...             # numpy output
+...             outnp = lib.virtualfile_to_dataset(
+...                 vfname=vouttbl, output_type="numpy"
+...             )
+...             assert isinstance(outnp, np.ndarray)
+...
+...             # pandas output
+...             outpd = lib.virtualfile_to_dataset(
+...                 vfname=vouttbl, output_type="pandas"
+...             )
+...             assert isinstance(outpd, pd.DataFrame)
+...
+...             # pandas output with specified column names
+...             outpd2 = lib.virtualfile_to_dataset(
+...                 vfname=vouttbl,
+...                 output_type="pandas",
+...                 column_names=["col1", "col2", "col3", "coltext"],
+...             )
+...             assert isinstance(outpd2, pd.DataFrame)
+>>> outstr
+array(['TEXT1 TEXT23', 'TEXT4 TEXT567', 'TEXT8 TEXT90',
+   'TEXT123 TEXT456789'], dtype='<U18')
+>>> outnp
+array([[1.0, 2.0, 3.0, 'TEXT1 TEXT23'],
+       [4.0, 5.0, 6.0, 'TEXT4 TEXT567'],
+       [7.0, 8.0, 9.0, 'TEXT8 TEXT90'],
+       [10.0, 11.0, 12.0, 'TEXT123 TEXT456789']], dtype=object)
+>>> outpd
+      0     1     2                   3
+0   1.0   2.0   3.0        TEXT1 TEXT23
+1   4.0   5.0   6.0       TEXT4 TEXT567
+2   7.0   8.0   9.0        TEXT8 TEXT90
+3  10.0  11.0  12.0  TEXT123 TEXT456789
+>>> outpd2
+   col1  col2  col3             coltext
+0   1.0   2.0   3.0        TEXT1 TEXT23
+1   4.0   5.0   6.0       TEXT4 TEXT567
+2   7.0   8.0   9.0        TEXT8 TEXT90
+3  10.0  11.0  12.0  TEXT123 TEXT456789
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_to_raster.html b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_to_raster.html new file mode 100644 index 00000000000..169f1478a05 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.virtualfile_to_raster.html @@ -0,0 +1,316 @@ + + + + + + + + + pygmt.clib.Session.virtualfile_to_raster — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.virtualfile_to_raster

+
+
+Session.virtualfile_to_raster(vfname, kind='grid', outgrid=None)[source]
+

Output raster data stored in a virtual file to an xarray.DataArray +object.

+

The raster data can be a grid, an image or a cube.

+
+
Parameters:
+
    +
  • vfname (str) – The virtual file name that stores the result grid/image/cube.

  • +
  • kind (Literal['grid', 'image', 'cube', None], default: 'grid') – Type of the raster data. Valid values are "grid", "image", +"cube" or None. If None, will inquire the data type from the +virtual file name.

  • +
  • outgrid (str | None, default: None) – Name of the output grid/image/cube. If specified, it means the raster data +was already saved into an actual file and will return None.

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

result – The result grid/image/cube. If outgrid is specified, return None.

+
+
+

Examples

+
>>> from pathlib import Path
+>>> from pygmt.clib import Session
+>>> from pygmt.helpers import GMTTempFile
+>>> with Session() as lib:
+...     # file output
+...     with GMTTempFile(suffix=".nc") as tmpfile:
+...         outgrid = tmpfile.name
+...         with lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd:
+...             lib.call_module("read", ["@earth_relief_01d_g", voutgrd, "-Tg"])
+...             result = lib.virtualfile_to_raster(
+...                 vfname=voutgrd, outgrid=outgrid
+...             )
+...             assert result == None
+...             assert Path(outgrid).stat().st_size > 0
+...
+...     # xarray.DataArray output
+...     outgrid = None
+...     with lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd:
+...         lib.call_module("read", ["@earth_relief_01d_g", voutgrd, "-Tg"])
+...         result = lib.virtualfile_to_raster(vfname=voutgrd, outgrid=outgrid)
+...         assert isinstance(result, xr.DataArray)
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.clib.Session.write_data.html b/v0.14.0/api/generated/pygmt.clib.Session.write_data.html new file mode 100644 index 00000000000..78b7f452169 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.clib.Session.write_data.html @@ -0,0 +1,300 @@ + + + + + + + + + pygmt.clib.Session.write_data — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.clib.Session.write_data

+
+
+Session.write_data(family, geometry, mode, wesn, output, data)[source]
+

Write a GMT data container to a file.

+

The data container should be created by +pygmt.clib.Session.create_data.

+

Wraps GMT_Write_Data but only allows writing to a file. So the +method argument is omitted.

+
+
Parameters:
+
    +
  • family (str) – A valid GMT data family name (e.g., 'GMT_IS_DATASET'). See the +FAMILIES attribute for valid names. Don’t use the +GMT_VIA_VECTOR or GMT_VIA_MATRIX constructs for this. Use +GMT_IS_VECTOR and GMT_IS_MATRIX instead.

  • +
  • geometry (str) – A valid GMT data geometry name (e.g., 'GMT_IS_POINT'). See the +GEOMETRIES attribute for valid names.

  • +
  • mode (str) – How the data is to be written to the file. This option varies +depending on the given family. See the GMT API documentation for +details.

  • +
  • wesn (list or numpy array) – [xmin, xmax, ymin, ymax, zmin, zmax] of the data. Must have 6 +elements.

  • +
  • output (str) – The output file name.

  • +
  • data (ctypes.c_void_p) – Pointer to the data container created by +pygmt.clib.Session.create_data.

  • +
+
+
Raises:
+

GMTCLibError – For invalid input arguments or if the GMT API functions returns a + non-zero status code.

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.config.html b/v0.14.0/api/generated/pygmt.config.html new file mode 100644 index 00000000000..c4729d27c35 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.config.html @@ -0,0 +1,295 @@ + + + + + + + + + pygmt.config — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.config

+
+
+class pygmt.config(*, COLOR_BACKGROUND=None, COLOR_FOREGROUND=None, COLOR_CPT=None, COLOR_NAN=None, COLOR_MODEL=None, COLOR_HSV_MIN_S=None, COLOR_HSV_MAX_S=None, COLOR_HSV_MIN_V=None, COLOR_HSV_MAX_V=None, COLOR_SET=None, DIR_CACHE=None, DIR_DATA=None, DIR_DCW=None, DIR_GSHHG=None, FONT_ANNOT_PRIMARY=None, FONT_ANNOT_SECONDARY=None, FONT_HEADING=None, FONT_LABEL=None, FONT_LOGO=None, FONT_SUBTITLE=None, FONT_TAG=None, FONT_TITLE=None, FORMAT_CLOCK_IN=None, FORMAT_CLOCK_OUT=None, FORMAT_CLOCK_MAP=None, FORMAT_DATE_IN=None, FORMAT_DATE_OUT=None, FORMAT_DATE_MAP=None, FORMAT_GEO_OUT=None, FORMAT_GEO_MAP=None, FORMAT_FLOAT_OUT=None, FORMAT_FLOAT_MAP=None, FORMAT_TIME_PRIMARY_MAP=None, FORMAT_TIME_SECONDARY_MAP=None, FORMAT_TIME_STAMP=None, GMT_DATA_SERVER=None, GMT_DATA_SERVER_LIMIT=None, GMT_DATA_UPDATE_INTERVAL=None, GMT_COMPATIBILITY=None, GMT_CUSTOM_LIBS=None, GMT_EXPORT_TYPE=None, GMT_EXTRAPOLATE_VAL=None, GMT_FFT=None, GMT_GRAPHICS_DPU=None, GMT_GRAPHICS_FORMAT=None, GMT_HISTORY=None, GMT_INTERPOLANT=None, GMT_LANGUAGE=None, GMT_MAX_CORES=None, GMT_THEME=None, GMT_TRIANGULATE=None, GMT_VERBOSE=None, IO_COL_SEPARATOR=None, IO_FIRST_HEADER=None, IO_GRIDFILE_FORMAT=None, IO_GRIDFILE_SHORTHAND=None, IO_HEADER=None, IO_HEADER_MARKER=None, IO_N_HEADER_RECS=None, IO_NAN_RECORDS=None, IO_NC4_CHUNK_SIZE=None, IO_NC4_DEFLATION_LEVEL=None, IO_LONLAT_TOGGLE=None, IO_SEGMENT_BINARY=None, IO_SEGMENT_MARKER=None, MAP_ANNOT_MIN_ANGLE=None, MAP_ANNOT_MIN_SPACING=None, MAP_ANNOT_OBLIQUE=None, MAP_ANNOT_OFFSET_PRIMARY=None, MAP_ANNOT_OFFSET_SECONDARY=None, MAP_ANNOT_ORTHO=None, MAP_DEFAULT_PEN=None, MAP_DEGREE_SYMBOL=None, MAP_EMBELLISHMENT_MODE=None, MAP_FRAME_AXES=None, MAP_FRAME_PEN=None, MAP_FRAME_PERCENT=None, MAP_FRAME_TYPE=None, MAP_FRAME_WIDTH=None, MAP_GRID_CROSS_SIZE_PRIMARY=None, MAP_GRID_CROSS_SIZE_SECONDARY=None, MAP_GRID_PEN_PRIMARY=None, MAP_GRID_PEN_SECONDARY=None, MAP_HEADING_OFFSET=None, MAP_LABEL_MODE=None, MAP_LABEL_OFFSET=None, MAP_LINE_STEP=None, MAP_LOGO=None, MAP_LOGO_POS=None, MAP_ORIGIN_X=None, MAP_ORIGIN_Y=None, MAP_POLAR_CAP=None, MAP_SCALE_HEIGHT=None, MAP_TICK_LENGTH_PRIMARY=None, MAP_TICK_LENGTH_SECONDARY=None, MAP_TICK_PEN_PRIMARY=None, MAP_TICK_PEN_SECONDARY=None, MAP_TITLE_OFFSET=None, MAP_VECTOR_SHAPE=None, PROJ_AUX_LATITUDE=None, PROJ_DATUM=None, PROJ_ELLIPSOID=None, PROJ_GEODESIC=None, PROJ_LENGTH_UNIT=None, PROJ_MEAN_RADIUS=None, PROJ_SCALE_FACTOR=None, PS_CHAR_ENCODING=None, PS_COLOR_MODEL=None, PS_COMMENTS=None, PS_CONVERT=None, PS_IMAGE_COMPRESS=None, PS_LINE_CAP=None, PS_LINE_JOIN=None, PS_MITER_LIMIT=None, PS_MEDIA=None, PS_PAGE_COLOR=None, PS_PAGE_ORIENTATION=None, PS_SCALE_X=None, PS_SCALE_Y=None, PS_TRANSPARENCY=None, TIME_EPOCH=None, TIME_IS_INTERVAL=None, TIME_INTERVAL_FRACTION=None, TIME_LEAP_SECONDS=None, TIME_REPORT=None, TIME_UNIT=None, TIME_WEEK_START=None, TIME_Y2K_OFFSET_YEAR=None, FONT=None, FONT_ANNOT=None, FORMAT_TIME_MAP=None, MAP_ANNOT_OFFSET=None, MAP_GRID_CROSS_SIZE=None, MAP_GRID_PEN=None, MAP_TICK_LENGTH=None, MAP_TICK_PEN=None)[source]
+

Set GMT defaults globally or locally.

+

Change GMT defaults globally:

+
pygmt.config(PARAMETER=value)
+
+
+

Change GMT defaults locally by using it as a context manager:

+
with pygmt.config(PARAMETER=value):
+    ...
+
+
+

Full GMT defaults list at https://docs.generic-mapping-tools.org/6.5/gmt.conf.html

+
+ +
+

Examples using pygmt.config

+
+

Configuring PyGMT defaults

+
Configuring PyGMT defaults
+
+

Draping a dataset on top of a topographic surface

+
Draping a dataset on top of a topographic surface
+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+

Plotting datetime charts

+
Plotting datetime charts
+
+

Plotting vectors

+
Plotting vectors
+
+

Line segment caps and joints

+
Line segment caps and joints
+
+

Calculating grid gradient and radiance

+
Calculating grid gradient and radiance
+
+

Calculating grid gradient with custom azimuth and normalize parameters

+
Calculating grid gradient with custom azimuth and normalize parameters
+
+

RGB image

+
RGB image
+
+

Double Y-axes graph

+
Double Y-axes graph
+
+

Scale bar

+
Scale bar
+
+

Polar

+
Polar
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.list_sample_data.html b/v0.14.0/api/generated/pygmt.datasets.list_sample_data.html new file mode 100644 index 00000000000..ebd365f2969 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.list_sample_data.html @@ -0,0 +1,280 @@ + + + + + + + + + pygmt.datasets.list_sample_data — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.list_sample_data

+
+
+pygmt.datasets.list_sample_data()[source]
+

Report datasets available for tests and documentation examples.

+
+
Return type:
+

dict[str, str]

+
+
Returns:
+

dict – Names and short descriptions of available sample datasets.

+
+
+
+

See also

+
+
load_sample_data

Load an example dataset from the GMT server.

+
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_black_marble.html b/v0.14.0/api/generated/pygmt.datasets.load_black_marble.html new file mode 100644 index 00000000000..4a525252cc0 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_black_marble.html @@ -0,0 +1,312 @@ + + + + + + + + + pygmt.datasets.load_black_marble — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_black_marble

+
+
+pygmt.datasets.load_black_marble(resolution='01d', region=None)[source]
+

Load NASA Black Marble images in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_daynight.jpg +
+

Earth day/night dataset.

+
+
+

The images are downloaded to a user data directory (usually +~/.gmt/server/earth/earth_night/) the first time you invoke this function. +Afterwards, it will load the image from the data directory. So you’ll need an +internet connection the first time around.

+

These images can also be accessed by passing in the file name +@earth_night_res to any image processing function or plotting method. res +is the image resolution (see below).

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/earth-daynight.html for more details about available +datasets, including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m', '30s'], default: '01d') – The image resolution. The suffix d, m, and s stand for arc-degrees, +arc-minutes, and arc-seconds.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the image to load, in the form of a sequence [xmin, xmax, +ymin, ymax].

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

image – The NASA Black Marble image. Coordinates are latitude and longitude in degrees.

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray image can be accessed via the GMT accessors (i.e., +image.gmt.registration and image.gmt.gtype respectively). However, these +properties may be lost after specific image operations (such as slicing) and will +need to be manually set before passing the image to any PyGMT data processing or +plotting functions. Refer to pygmt.GMTDataArrayAccessor for detailed +explanations and workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_black_marble
+>>> # load the default image (pixel-registered 1 arc-degree image)
+>>> image = load_black_marble()
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_blue_marble.html b/v0.14.0/api/generated/pygmt.datasets.load_blue_marble.html new file mode 100644 index 00000000000..30eb80a11c1 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_blue_marble.html @@ -0,0 +1,312 @@ + + + + + + + + + pygmt.datasets.load_blue_marble — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_blue_marble

+
+
+pygmt.datasets.load_blue_marble(resolution='01d', region=None)[source]
+

Load NASA Blue Marble images in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_daynight.jpg +
+

Earth day/night dataset.

+
+
+

The images are downloaded to a user data directory (usually +~/.gmt/server/earth/earth_day/) the first time you invoke this function. +Afterwards, it will load the image from the data directory. So you’ll need an +internet connection the first time around.

+

These images can also be accessed by passing in the file name +@earth_day_res to any image processing function or plotting method. res +is the image resolution (see below).

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/earth-daynight.html for more details about available +datasets, including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m', '30s'], default: '01d') – The image resolution. The suffix d, m, and s stand for arc-degrees, +arc-minutes, and arc-seconds.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the image to load, in the form of a sequence [xmin, xmax, +ymin, ymax].

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

image – The NASA Blue Marble image. Coordinates are latitude and longitude in degrees.

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray image can be accessed via the GMT accessors (i.e., +image.gmt.registration and image.gmt.gtype respectively). However, these +properties may be lost after specific image operations (such as slicing) and will +need to be manually set before passing the image to any PyGMT data processing or +plotting functions. Refer to pygmt.GMTDataArrayAccessor for detailed +explanations and workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_blue_marble
+>>> # load the default image (pixel-registered 1 arc-degree image)
+>>> image = load_blue_marble()
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_earth_age.html b/v0.14.0/api/generated/pygmt.datasets.load_earth_age.html new file mode 100644 index 00000000000..f4385eeddf3 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_earth_age.html @@ -0,0 +1,340 @@ + + + + + + + + + pygmt.datasets.load_earth_age — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_earth_age

+
+
+pygmt.datasets.load_earth_age(resolution='01d', region=None, registration='gridline')[source]
+

Load the Earth seafloor crustal age dataset in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_age.jpg +
+

Earth seafloor crustal age dataset.

+
+
+

The grids are downloaded to a user data directory +(usually ~/.gmt/server/earth/earth_age/) the first time you invoke +this function. Afterwards, it will load the grid from the data directory. +So you’ll need an internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@earth_age_res[_reg] to any grid processing function or +plotting method. res is the grid resolution (see below), and reg is +the grid registration type (p for pixel registration or g for +the 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 method if no CPT is explicitly specified. When the dataset +is loaded and plotted as an 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 https://www.generic-mapping-tools.org/remote-datasets/earth-age.html for more details about available +datasets, including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m'], default: '01d') – The grid resolution. The suffix d and m stand for arc-degrees and +arc-minutes.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel'], default: 'gridline') – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The Earth seafloor crustal age grid. Coordinates are latitude and +longitude in degrees. Age is in millions of years (Myr).

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors +(i.e., grid.gmt.registration and grid.gmt.gtype respectively). +However, these properties may be lost after specific grid operations (such +as slicing) and will need to be manually set before passing the grid to any +PyGMT data processing or plotting functions. Refer to +pygmt.GMTDataArrayAccessor for detailed explanations and +workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_earth_age
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_earth_age()
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_earth_age(resolution="30m", registration="gridline")
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_earth_age(
+...     resolution="05m",
+...     region=[120, 160, 30, 60],
+...     registration="gridline",
+... )
+
+
+
+ +
+

Examples using pygmt.datasets.load_earth_age

+
+

Draping a dataset on top of a topographic surface

+
Draping a dataset on top of a topographic surface
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_earth_deflection.html b/v0.14.0/api/generated/pygmt.datasets.load_earth_deflection.html new file mode 100644 index 00000000000..aa52ddab409 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_earth_deflection.html @@ -0,0 +1,356 @@ + + + + + + + + + pygmt.datasets.load_earth_deflection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_earth_deflection

+
+
+pygmt.datasets.load_earth_deflection(resolution='01d', region=None, registration=None, component='east')[source]
+

Load the IGPP Earth east-west and north-south deflection datasets in various +resolutions.

+ ++++ + + + + + + + + + + +

IGPP Earth east-west deflection

IGPP Earth north-south deflection

+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_edefl.jpg +
+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_ndefl.jpg +
+
+

The grids are downloaded to a user data directory (usually +~/.gmt/server/earth/earth_edefl/ and ~/.gmt/server/earth/earth_ndefl/ the +first time you invoke this function. Afterwards, it will load the grid from the +data directory. So you’ll need an internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@earth_defl_type_res[_reg] to any grid processing function or +plotting method. earth_defl_type is the GMT name for the dataset. The available +options are earth_edefl and earth_ndefl. res is the grid resolution (see +below), and reg is the grid registration type (p for pixel registration or +g for gridline registration).

+

The default color palette table (CPTs) for this dataset is @earth_defl.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 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_defl.cpt".

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/earth-edefl.html and https://www.generic-mapping-tools.org/remote-datasets/earth-ndefl.html for +more details about available datasets, including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m'], default: '01d') – The grid resolution. The suffix d and m stand for arc-degrees and +arc-minutes.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel', None], default: None) – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration. Default is None, which means +"gridline" for all resolutions except "01m" which is "pixel" only.

  • +
  • component (Literal['east', 'north'], default: 'east') – By default, the east-west deflection (component="east") is returned, +set component="north" to return the north-south deflection.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The Earth east-west or north-south deflection grid. Coordinates are latitude +and longitude in degrees. Deflection values are in micro-radians, where +positive (negative) values indicate a deflection to the east or north (west +or south).

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors (i.e., +grid.gmt.registration and grid.gmt.gtype respectively). However, these +properties may be lost after specific grid operations (such as slicing) and will +need to be manually set before passing the grid to any PyGMT data processing or +plotting functions. Refer to pygmt.GMTDataArrayAccessor for detailed +explanations and workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_earth_deflection
+>>> # load the default grid for east-west deflection (gridline-registered
+>>> # 1 arc-degree grid)
+>>> grid = load_earth_deflection()
+>>> # load the default grid for north-south deflection
+>>> grid = load_earth_deflection(component="north")
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_earth_deflection(resolution="30m", registration="gridline")
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_earth_deflection(
+...     resolution="05m", region=[120, 160, 30, 60], registration="gridline"
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_earth_dist.html b/v0.14.0/api/generated/pygmt.datasets.load_earth_dist.html new file mode 100644 index 00000000000..891f3f4dd55 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_earth_dist.html @@ -0,0 +1,332 @@ + + + + + + + + + pygmt.datasets.load_earth_dist — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_earth_dist

+
+
+pygmt.datasets.load_earth_dist(resolution='01d', region=None, registration='gridline')[source]
+

Load the GSHHG Earth distance to shoreline dataset in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_dist.jpg +
+

GSHHG Earth distance to shoreline dataset.

+
+
+

The grids are downloaded to a user data directory (usually +~/.gmt/server/earth/earth_dist/) the first time you invoke this function. +Afterwards, it will load the grid from the data directory. So you’ll need an +internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@earth_dist_res[_reg] to any grid processing function or plotting +method. res is the grid resolution (see below), and reg is the grid registration +type (p for pixel registration or g for gridline registration).

+

The default color palette table (CPT) for this dataset is @earth_dist.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 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_dist.cpt".

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/earth-dist.html for more details about available datasets, +including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m'], default: '01d') – The grid resolution. The suffix d and m stand for arc-degrees and +arc-minutes.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel'], default: 'gridline') – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The GSHHG Earth distance to shoreline grid. Coordinates are latitude and +longitude in degrees. Distances are in kilometers, where positive (negative) +values mean land to coastline (ocean to coastline).

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors (i.e., +grid.gmt.registration and grid.gmt.gtype respectively). However, these +properties may be lost after specific grid operations (such as slicing) and will +need to be manually set before passing the grid to any PyGMT data processing or +plotting functions. Refer to pygmt.GMTDataArrayAccessor for detailed +explanations and workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_earth_dist
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_earth_dist()
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_earth_dist(resolution="30m", registration="gridline")
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_earth_dist(
+...     resolution="05m",
+...     region=[120, 160, 30, 60],
+...     registration="gridline",
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_earth_free_air_anomaly.html b/v0.14.0/api/generated/pygmt.datasets.load_earth_free_air_anomaly.html new file mode 100644 index 00000000000..fd3c70da9b9 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_earth_free_air_anomaly.html @@ -0,0 +1,355 @@ + + + + + + + + + pygmt.datasets.load_earth_free_air_anomaly — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_earth_free_air_anomaly

+
+
+pygmt.datasets.load_earth_free_air_anomaly(resolution='01d', region=None, registration=None, uncertainty=False)[source]
+

Load the IGPP Earth free-air anomaly and uncertainty datasets in various +resolutions.

+ ++++ + + + + + + + + + + +

IGPP Earth free-air anomaly

IGPP Earth free-air anomaly uncertainty

+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_faa.jpg +
+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_faaerror.jpg +
+
+

The grids are downloaded to a user data directory (usually +~/.gmt/server/earth/earth_faa/ or ~/.gmt/server/earth/earth_faaerror/) the +first time you invoke this function. Afterwards, it will load the grid from data +directory. So you’ll need an internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@earth_faa_type_res[_reg] to any grid processing function or +plotting method. earth_faa_type is the GMT name for the dataset. The available +options are earth_faa and earth_faaerror. res is the grid resolution (see +below), and reg is the grid registration type (p for pixel registration or +g for gridline registration).

+

The default color palette tables (CPTs) for these datasets are @earth_faa.cpt and +@earth_faaerror.cpt. 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 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" or +cmap="@earth_faaerror.cpt".

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/earth-faa.html and https://www.generic-mapping-tools.org/remote-datasets/earth-faaerror.html for +more details about available datasets, including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m'], default: '01d') – The grid resolution. The suffix d and m stand for arc-degrees and +arc-minutes.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel', None], default: None) – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration. Default is None, which means +"gridline" for all resolutions except "01m" which is "pixel" +only.

  • +
  • uncertainty (bool, default: False) – By default, the Earth free-air anomaly values are returned. Set to True to +return the related uncertainties instead.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The Earth free-air anomaly (uncertainty) grid. Coordinates are latitude and +longitude in degrees. Values and uncertainties are in mGal.

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors (i.e., +grid.gmt.registration and grid.gmt.gtype respectively). However, these +properties may be lost after specific grid operations (such as slicing) and will +need to be manually set before passing the grid to any PyGMT data processing or +plotting functions. Refer to pygmt.GMTDataArrayAccessor for detailed +explanations and workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_earth_free_air_anomaly
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_earth_free_air_anomaly()
+>>> # load the uncertainties related to the default grid
+>>> grid = load_earth_free_air_anomaly(uncertainty=True)
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_earth_free_air_anomaly(resolution="30m", registration="gridline")
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_earth_free_air_anomaly(
+...     resolution="05m", region=[120, 160, 30, 60], registration="gridline"
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_earth_geoid.html b/v0.14.0/api/generated/pygmt.datasets.load_earth_geoid.html new file mode 100644 index 00000000000..4ba8d8e255e --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_earth_geoid.html @@ -0,0 +1,327 @@ + + + + + + + + + pygmt.datasets.load_earth_geoid — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_earth_geoid

+
+
+pygmt.datasets.load_earth_geoid(resolution='01d', region=None, registration='gridline')[source]
+

Load the EGM2008 Earth geoid dataset in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_geoid.jpg +
+

EGM2008 Earth geoid dataset.

+
+
+

The grids are downloaded to a user data directory +(usually ~/.gmt/server/earth/earth_geoid/) the first time you invoke +this function. Afterwards, it will load the grid from the data directory. +So you’ll need an internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@earth_geoid_res[_reg] to any grid processing function or +plotting method. res is the grid resolution (see below), and reg is +the grid registration type (p for pixel registration or g for +gridline registration).

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/earth-geoid.html for more details about available +datasets, including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m'], default: '01d') – The grid resolution. The suffix d and m stand for arc-degrees and +arc-minutes.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel'], default: 'gridline') – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The Earth geoid grid. Coordinates are latitude and +longitude in degrees. Units are in meters.

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors +(i.e., grid.gmt.registration and grid.gmt.gtype respectively). +However, these properties may be lost after specific grid operations (such +as slicing) and will need to be manually set before passing the grid to any +PyGMT data processing or plotting functions. Refer to +pygmt.GMTDataArrayAccessor for detailed explanations and +workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_earth_geoid
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_earth_geoid()
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_earth_geoid(resolution="30m", registration="gridline")
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_earth_geoid(
+...     resolution="05m",
+...     region=[120, 160, 30, 60],
+...     registration="gridline",
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_earth_magnetic_anomaly.html b/v0.14.0/api/generated/pygmt.datasets.load_earth_magnetic_anomaly.html new file mode 100644 index 00000000000..49972db03d4 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_earth_magnetic_anomaly.html @@ -0,0 +1,381 @@ + + + + + + + + + pygmt.datasets.load_earth_magnetic_anomaly — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_earth_magnetic_anomaly

+
+
+pygmt.datasets.load_earth_magnetic_anomaly(resolution='01d', region=None, registration=None, data_source='emag2')[source]
+

Load the Earth magnetic anomaly datasets in various resolutions.

+ ++++ + + + + + + + + + + +

Earth Magnetic Anomaly Model (EMAG2)

World Digital Magnetic Anomaly Map (WDMAM)

+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_mag.jpg +
+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_wdmam.jpg +
+
+

The grids are downloaded to a user data directory +(usually ~/.gmt/server/earth/earth_mag/, +~/.gmt/server/earth/earth_mag4km/, +or ~/.gmt/server/earth/earth_wdmam/) the first time you invoke +this function. Afterwards, it will load the grid from the data directory. +So you’ll need an internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@earth_mag_type_res[_reg] to any grid processing +function or plotting method. earth_mag_type is the GMT name +for the dataset. The available options are earth_mag, +earth_mag4km, and earth_wdmam. res is the grid resolution +(see below), and reg is the 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". 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 +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 https://www.generic-mapping-tools.org/remote-datasets/earth-mag.html +and https://www.generic-mapping-tools.org/remote-datasets/earth-wdmam.html for more details about available +datasets, including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m'], default: '01d') – The grid resolution. The suffix d and m stand for arc-degrees and +arc-minutes. The resolution "02m" is not available for +data_source="wdmam".

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel', None], default: None) – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration. Default is None, which means +"gridline" for all resolutions except "02m" for +data_source="emag2" or data_source="emag2_4km", which are "pixel" +only.

  • +
  • data_source (Literal['emag2', 'emag2_4km', 'wdmam'], default: 'emag2') –

    Select the source of the magnetic anomaly data. Available options are:

    + +

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The Earth magnetic anomaly grid. Coordinates are latitude and +longitude in degrees. Units are in nano Tesla (nT).

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors +(i.e., grid.gmt.registration and grid.gmt.gtype respectively). +However, these properties may be lost after specific grid operations (such +as slicing) and will need to be manually set before passing the grid to any +PyGMT data processing or plotting functions. Refer to +pygmt.GMTDataArrayAccessor for detailed explanations and +workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_earth_magnetic_anomaly
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_earth_magnetic_anomaly()
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_earth_magnetic_anomaly(resolution="30m", registration="gridline")
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_earth_magnetic_anomaly(
+...     resolution="05m",
+...     region=[120, 160, 30, 60],
+...     registration="gridline",
+... )
+>>> # load the 20 arc-minutes grid of the emag2_4km dataset
+>>> grid = load_earth_magnetic_anomaly(
+...     resolution="20m", registration="gridline", data_source="emag2_4km"
+... )
+>>> # load the 20 arc-minutes grid of the WDMAM dataset
+>>> grid = load_earth_magnetic_anomaly(
+...     resolution="20m", registration="gridline", data_source="wdmam"
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_earth_mask.html b/v0.14.0/api/generated/pygmt.datasets.load_earth_mask.html new file mode 100644 index 00000000000..73da5ca90e3 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_earth_mask.html @@ -0,0 +1,334 @@ + + + + + + + + + pygmt.datasets.load_earth_mask — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_earth_mask

+
+
+pygmt.datasets.load_earth_mask(resolution='01d', region=None, registration='gridline')[source]
+

Load the GSHHG Earth mask dataset in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_mask.jpg +
+

GSHHG Earth mask dataset.

+
+
+

The grids are downloaded to a user data directory +(usually ~/.gmt/server/earth/earth_mask/) the first time you invoke +this function. Afterwards, it will load the grid from the data directory. +So you’ll need an internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@earth_mask_res[_reg] to any grid processing function or +plotting method. res is the grid resolution (see below), and reg is +the grid registration type (p for pixel registration or g for +gridline registration).

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/earth-mask.html for more details about available +datasets, including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m', '30s', '15s'], default: '01d') – The grid resolution. The suffix d, m, and s stand for arc-degrees, +arc-minutes, and arc-seconds.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code.

  • +
  • registration (Literal['gridline', 'pixel'], default: 'gridline') – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The Earth mask grid. Coordinates are latitude and +longitude in degrees. The node values in the mask grids are all in +the 0-4 range and reflect different surface types:

+
    +
  • 0: Oceanic areas beyond the shoreline

  • +
  • 1: Land areas inside the shoreline

  • +
  • 2: Lakes inside the land areas

  • +
  • 3: Islands in lakes in the land areas

  • +
  • 4: Smaller lakes in islands that are found within lakes +inside the land area

  • +
+

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors +(i.e., grid.gmt.registration and grid.gmt.gtype respectively). +However, these properties may be lost after specific grid operations (such +as slicing) and will need to be manually set before passing the grid to any +PyGMT data processing or plotting functions. Refer to +pygmt.GMTDataArrayAccessor for detailed explanations and +workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_earth_mask
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_earth_mask()
+>>> # location (120°E, 50°N) is in land area (1)
+>>> grid.sel(lon=120, lat=50).values
+array(1, dtype=int8)
+>>> # location (170°E, 50°N) is in oceanic area (0)
+>>> grid.sel(lon=170, lat=50).values
+array(0, dtype=int8)
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_earth_mean_dynamic_topography.html b/v0.14.0/api/generated/pygmt.datasets.load_earth_mean_dynamic_topography.html new file mode 100644 index 00000000000..57e124be393 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_earth_mean_dynamic_topography.html @@ -0,0 +1,332 @@ + + + + + + + + + pygmt.datasets.load_earth_mean_dynamic_topography — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_earth_mean_dynamic_topography

+
+
+pygmt.datasets.load_earth_mean_dynamic_topography(resolution='01d', region=None, registration='gridline')[source]
+

Load the CNES Earth mean dynamic topography dataset in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_mdt.jpg +
+

CNES Earth mean dynamic topography dataset.

+
+
+

The grids are downloaded to a user data directory (usually +~/.gmt/server/earth/earth_mdt/) the first time you invoke this function. +Afterwards, it will load the grid from the data directory. So you’ll need an +internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@earth_mdt_res[_reg] to any grid processing function or plotting +method. res is the grid resolution (see below), and reg is the grid registration +type (p for pixel registration or g for gridline registration).

+

The default color palette table (CPT) for this dataset is @earth_mdt.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 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_mdt.cpt".

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/earth-mdt.html for more details about available datasets, +including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '07m'], default: '01d') – The grid resolution. The suffix d and m stand for arc-degrees and +arc-minutes. Note that "07m" refers to a resolution of 7.5 arc-minutes.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code.

  • +
  • registration (Literal['gridline', 'pixel'], default: 'gridline') – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The CNES Earth mean dynamic topography grid. Coordinates are latitude and +longitude in degrees. Values are in meters.

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors (i.e., +grid.gmt.registration and grid.gmt.gtype respectively). However, these +properties may be lost after specific grid operations (such as slicing) and will +need to be manually set before passing the grid to any PyGMT data processing or +plotting functions. Refer to pygmt.GMTDataArrayAccessor for detailed +explanations and workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_earth_mean_dynamic_topography
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_earth_mean_dynamic_topography()
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_earth_mean_dynamic_topography(
+...     resolution="30m", registration="gridline"
+... )
+>>> # load high-resolution (7 arc-minutes) grid for a specific region
+>>> grid = load_earth_mean_dynamic_topography(
+...     resolution="07m",
+...     region=[120, 160, 30, 60],
+...     registration="gridline",
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_earth_mean_sea_surface.html b/v0.14.0/api/generated/pygmt.datasets.load_earth_mean_sea_surface.html new file mode 100644 index 00000000000..92ad789a1a2 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_earth_mean_sea_surface.html @@ -0,0 +1,331 @@ + + + + + + + + + pygmt.datasets.load_earth_mean_sea_surface — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_earth_mean_sea_surface

+
+
+pygmt.datasets.load_earth_mean_sea_surface(resolution='01d', region=None, registration='gridline')[source]
+

Load the CNES Earth mean sea surface dataset in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_mss.jpg +
+

CNES Earth mean sea surface dataset.

+
+
+

The grids are downloaded to a user data directory (usually +~/.gmt/server/earth/earth_mss/) the first time you invoke this function. +Afterwards, it will load the grid from the data directory. So you’ll need an +internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@earth_mss_res[_reg] to any grid processing function or plotting +method. res is the grid resolution (see below), and reg is the grid registration +type (p for pixel registration or g for gridline registration).

+

The default color palette table (CPT) for this dataset is @earth_mss.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 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_mss.cpt".

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/earth-mss.html for more details about available datasets, +including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m'], default: '01d') – The grid resolution. The suffix d and m stand for arc-degrees and +arc-minutes.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel'], default: 'gridline') – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The CNES Earth mean sea surface grid. Coordinates are latitude and +longitude in degrees. Values are in meters.

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors (i.e., +grid.gmt.registration and grid.gmt.gtype respectively). However, these +properties may be lost after specific grid operations (such as slicing) and will +need to be manually set before passing the grid to any PyGMT data processing or +plotting functions. Refer to pygmt.GMTDataArrayAccessor for detailed +explanations and workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_earth_mean_sea_surface
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_earth_mean_sea_surface()
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_earth_mean_sea_surface(resolution="30m", registration="gridline")
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_earth_mean_sea_surface(
+...     resolution="05m",
+...     region=[120, 160, 30, 60],
+...     registration="gridline",
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_earth_relief.html b/v0.14.0/api/generated/pygmt.datasets.load_earth_relief.html new file mode 100644 index 00000000000..fc9b58343c8 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_earth_relief.html @@ -0,0 +1,407 @@ + + + + + + + + + pygmt.datasets.load_earth_relief — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_earth_relief

+
+
+pygmt.datasets.load_earth_relief(resolution='01d', region=None, registration=None, data_source='igpp', use_srtm=False)[source]
+

Load the Earth relief datasets (topography and bathymetry) in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_gebco.jpg +
+

Earth relief datasets (topography and bathymetry).

+
+
+

The grids are downloaded to a user data directory +(usually ~/.gmt/server/earth/earth_relief, +~/.gmt/server/earth/earth_gebco, ~/.gmt/server/earth/earth_gebcosi, +or ~/.gmt/server/earth/earth_synbath) the first time you +invoke this function. Afterwards, it will load the grid from the data +directory. So you’ll need an internet connection the first time around.

+

This module downloads the grids that can also be accessed by +passing in the file name @earth_relief_type_res[_reg] to +any grid processing function or plotting method. earth_relief_type is +the GMT name for the dataset. The available options are earth_relief, +earth_gebco, earth_gebcosi, and earth_synbath. res is the +grid resolution (see below), and reg is the 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 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 https://www.generic-mapping-tools.org/remote-datasets/earth-relief.html for more details about available +datasets, including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m', '30s', '15s', '03s', '01s'], default: '01d') – The grid resolution. The suffix d, m and s stand for arc-degrees, +arc-minutes, and arc-seconds.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel', None], default: None) – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration. Default is None, which means +"gridline" for all resolutions except "15s" which is "pixel" +only.

  • +
  • data_source (Literal['igpp', 'gebco', 'gebcosi', 'synbath'], default: 'igpp') –

    Select the source for the Earth relief data. Available options are:

    + +

  • +
  • use_srtm (bool, default: False) – By default, the land-only SRTM tiles from NASA are used to generate the +"03s" and "01s" grids, and the missing ocean values are filled +by up-sampling the SRTM15 tiles which have a resolution of 15 +arc-seconds (i.e., "15s"). If True, will only load the original +land-only SRTM tiles. Only works when data_source="igpp".

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The Earth relief grid. Coordinates are latitude and longitude in +degrees. Relief is in meters.

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors +(i.e., grid.gmt.registration and grid.gmt.gtype respectively). +However, these properties may be lost after specific grid operations (such +as slicing) and will need to be manually set before passing the grid to any +PyGMT data processing or plotting functions. Refer to +pygmt.GMTDataArrayAccessor for detailed explanations and +workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_earth_relief
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_earth_relief()
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_earth_relief(resolution="30m", registration="gridline")
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_earth_relief(
+...     resolution="05m",
+...     region=[120, 160, 30, 60],
+...     registration="gridline",
+... )
+>>> # load the original 3 arc-seconds land-only SRTM tiles from NASA
+>>> grid = load_earth_relief(
+...     resolution="03s",
+...     region=[135, 136, 35, 36],
+...     registration="gridline",
+...     use_srtm=True,
+... )
+
+
+
+ +
+

Examples using pygmt.datasets.load_earth_relief

+
+

2. Create a contour map

+
2. Create a contour map
+
+

Creating a 3-D perspective image

+
Creating a 3-D perspective image
+
+

Creating a map with contour lines

+
Creating a map with contour lines
+
+

Draping a dataset on top of a topographic surface

+
Draping a dataset on top of a topographic surface
+
+

Interactive data visualization using Panel

+
Interactive data visualization using Panel
+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+

Plotting Earth relief

+
Plotting Earth relief
+
+

Calculating grid gradient and radiance

+
Calculating grid gradient and radiance
+
+

Calculating grid gradient with custom azimuth and normalize parameters

+
Calculating grid gradient with custom azimuth and normalize parameters
+
+

Clipping grid values

+
Clipping grid values
+
+

Cross-section along a transect

+
Cross-section along a transect
+
+

Sampling along tracks

+
Sampling along tracks
+
+

Multiple colormaps

+
Multiple colormaps
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_earth_vertical_gravity_gradient.html b/v0.14.0/api/generated/pygmt.datasets.load_earth_vertical_gravity_gradient.html new file mode 100644 index 00000000000..36a09d6d2c1 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_earth_vertical_gravity_gradient.html @@ -0,0 +1,337 @@ + + + + + + + + + pygmt.datasets.load_earth_vertical_gravity_gradient — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_earth_vertical_gravity_gradient

+
+
+pygmt.datasets.load_earth_vertical_gravity_gradient(resolution='01d', region=None, registration=None)[source]
+

Load the IGPP Earth vertical gravity gradient dataset in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_earth_vgg.jpg +
+

IGPP Earth vertical gravity gradient dataset.

+
+
+

The grids are downloaded to a user data directory +(usually ~/.gmt/server/earth/earth_vgg/) the first time you invoke +this function. Afterwards, it will load the grid from the data directory. +So you’ll need an internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@earth_vgg_res[_reg] to any grid processing function or +plotting method. res is the grid resolution (see below), and reg is +the grid 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 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 https://www.generic-mapping-tools.org/remote-datasets/earth-vgg.html for more details about available +datasets, including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m'], default: '01d') – The grid resolution. The suffix d and m stand for arc-degrees and +arc-minutes.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel', None], default: None) – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration. Default is None, which means +"gridline" for all resolutions except "01m" which is "pixel" +only.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The Earth vertical gravity gradient grid. Coordinates are latitude and +longitude in degrees. Units are in Eotvos.

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors +(i.e., grid.gmt.registration and grid.gmt.gtype respectively). +However, these properties may be lost after specific grid operations (such +as slicing) and will need to be manually set before passing the grid to any +PyGMT data processing or plotting functions. Refer to +pygmt.GMTDataArrayAccessor for detailed explanations and +workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_earth_vertical_gravity_gradient
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_earth_vertical_gravity_gradient()
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_earth_vertical_gravity_gradient(
+...     resolution="30m", registration="gridline"
+... )
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_earth_vertical_gravity_gradient(
+...     resolution="05m",
+...     region=[120, 160, 30, 60],
+...     registration="gridline",
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_mars_relief.html b/v0.14.0/api/generated/pygmt.datasets.load_mars_relief.html new file mode 100644 index 00000000000..d903438ac00 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_mars_relief.html @@ -0,0 +1,334 @@ + + + + + + + + + pygmt.datasets.load_mars_relief — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_mars_relief

+
+
+pygmt.datasets.load_mars_relief(resolution='01d', region=None, registration=None)[source]
+

Load the Mars relief dataset in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_mars_relief.jpg +
+

Mars relief dataset.

+
+
+

The grids are downloaded to a user data directory (usually +~/.gmt/server/mars/mars_relief/) the first time you invoke this function. +Afterwards, it will load the grid from the data directory. So you’ll need an +internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@mars_relief_res[_reg] to any grid processing function or plotting +method. res is the grid resolution (see below), and reg is the grid registration +type (p for pixel registration or g for gridline registration).

+

The default color palette table (CPT) for this dataset is @mars_relief.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 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="@mars_relief.cpt".

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/mars-relief.html for more details about available datasets, +including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m', '30s', '15s', '12s'], default: '01d') – The grid resolution. The suffix d, m and s stand for arc-degrees, +arc-minutes and arc-seconds. Note that "12s" refers to a resolution of +12.1468873601 arc-seconds.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel', None], default: None) – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration. Default is None, which means +"gridline" for all resolutions except for "12s" which is "pixel" +only.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The Mars relief grid. Coordinates are latitude and longitude in degrees. Relief +is in meters.

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors (i.e., +grid.gmt.registration and grid.gmt.gtype respectively). However, these +properties may be lost after specific grid operations (such as slicing) and will +need to be manually set before passing the grid to any PyGMT data processing or +plotting functions. Refer to pygmt.GMTDataArrayAccessor for detailed +explanations and workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_mars_relief
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_mars_relief()
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_mars_relief(resolution="30m", registration="gridline")
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_mars_relief(
+...     resolution="05m",
+...     region=[120, 160, 30, 60],
+...     registration="gridline",
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_mercury_relief.html b/v0.14.0/api/generated/pygmt.datasets.load_mercury_relief.html new file mode 100644 index 00000000000..6d6f1790325 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_mercury_relief.html @@ -0,0 +1,334 @@ + + + + + + + + + pygmt.datasets.load_mercury_relief — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_mercury_relief

+
+
+pygmt.datasets.load_mercury_relief(resolution='01d', region=None, registration=None)[source]
+

Load the Mercury relief dataset in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_mercury_relief.jpg +
+

Mercury relief dataset.

+
+
+

The grids are downloaded to a user data directory (usually +~/.gmt/server/mercury/mercury_relief/) the first time you invoke this function. +Afterwards, it will load the grid from the data directory. So you’ll need an +internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@mercury_relief_res[_reg] to any grid processing function or plotting +method. res is the grid resolution (see below), and reg is the grid registration +type (p for pixel registration or g for gridline registration).

+

The default color palette table (CPT) for this dataset is @mercury_relief.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 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="@mercury_relief.cpt".

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/mercury-relief.html for more details about available +datasets, including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m', '56s'], default: '01d') – The grid resolution. The suffix d, m and s stand for arc-degrees, +arc-minutes and arc-seconds. Note that "56s" refers to a resolution of +56.25 arc-seconds.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel', None], default: None) – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration. Default is None, which means +"gridline" for all resolutions except for "56s" which is "pixel" +only.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The Mercury relief grid. Coordinates are latitude and longitude in degrees. +Relief is in meters.

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors (i.e., +grid.gmt.registration and grid.gmt.gtype respectively). However, these +properties may be lost after specific grid operations (such as slicing) and will +need to be manually set before passing the grid to any PyGMT data processing or +plotting functions. Refer to pygmt.GMTDataArrayAccessor for detailed +explanations and workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_mercury_relief
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_mercury_relief()
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_mercury_relief(resolution="30m", registration="gridline")
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_mercury_relief(
+...     resolution="05m",
+...     region=[120, 160, 30, 60],
+...     registration="gridline",
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_moon_relief.html b/v0.14.0/api/generated/pygmt.datasets.load_moon_relief.html new file mode 100644 index 00000000000..bd2931db6d0 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_moon_relief.html @@ -0,0 +1,334 @@ + + + + + + + + + pygmt.datasets.load_moon_relief — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_moon_relief

+
+
+pygmt.datasets.load_moon_relief(resolution='01d', region=None, registration=None)[source]
+

Load the Moon relief dataset in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_moon_relief.jpg +
+

Moon relief dataset.

+
+
+

The grids are downloaded to a user data directory (usually +~/.gmt/server/moon/moon_relief/) the first time you invoke this function. +Afterwards, it will load the grid from the data directory. So you’ll need an +internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@moon_relief_res[_reg] to any grid processing function or plotting +method. res is the grid resolution (see below), and reg is the grid registration +type (p for pixel registration or g for gridline registration).

+

The default color palette table (CPT) for this dataset is @moon_relief.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 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="@moon_relief.cpt".

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/moon-relief.html for more details about available datasets, +including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m', '30s', '15s', '14s'], default: '01d') – The grid resolution. The suffix d, m and s stand for arc-degrees, +arc-minutes and arc-seconds. Note that "14s" refers to a resolution of +14.0625 arc-seconds.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel', None], default: None) – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration. Default is None, which means +"gridline" for all resolutions except for "14s" which is "pixel" +only.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The Moon relief grid. Coordinates are latitude and longitude in degrees. Relief +is in meters.

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors (i.e., +grid.gmt.registration and grid.gmt.gtype respectively). However, these +properties may be lost after specific grid operations (such as slicing) and will +need to be manually set before passing the grid to any PyGMT data processing or +plotting functions. Refer to pygmt.GMTDataArrayAccessor for detailed +explanations and workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_moon_relief
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_moon_relief()
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_moon_relief(resolution="30m", registration="gridline")
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_moon_relief(
+...     resolution="05m",
+...     region=[120, 160, 30, 60],
+...     registration="gridline",
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_pluto_relief.html b/v0.14.0/api/generated/pygmt.datasets.load_pluto_relief.html new file mode 100644 index 00000000000..0b5b24bc886 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_pluto_relief.html @@ -0,0 +1,334 @@ + + + + + + + + + pygmt.datasets.load_pluto_relief — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_pluto_relief

+
+
+pygmt.datasets.load_pluto_relief(resolution='01d', region=None, registration=None)[source]
+

Load the Pluto relief dataset in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_pluto_relief.jpg +
+

Pluto relief dataset.

+
+
+

The grids are downloaded to a user data directory (usually +~/.gmt/server/pluto/pluto_relief/) the first time you invoke this function. +Afterwards, it will load the grid from the data directory. So you’ll need an +internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@pluto_relief_res[_reg] to any grid processing function or plotting +method. res is the grid resolution (see below), and reg is the grid registration +type (p for pixel registration or g for gridline registration).

+

The default color palette table (CPT) for this dataset is @pluto_relief.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 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="@pluto_relief.cpt".

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/pluto-relief.html for more details about available +datasets, including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m', '52s'], default: '01d') – The grid resolution. The suffix d, m and s stand for arc-degrees, +arc-minutes and arc-seconds. Note that "52s" refers to a resolution of +52.0732883317 arc-seconds.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel', None], default: None) – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration. Default is None, which means +"gridline" for all resolutions except for "52s" which is "pixel" +only.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The Pluto relief grid. Coordinates are latitude and longitude in degrees. Relief +is in meters.

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors (i.e., +grid.gmt.registration and grid.gmt.gtype respectively). However, these +properties may be lost after specific grid operations (such as slicing) and will +need to be manually set before passing the grid to any PyGMT data processing or +plotting functions. Refer to pygmt.GMTDataArrayAccessor for detailed +explanations and workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_pluto_relief
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_pluto_relief()
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_pluto_relief(resolution="30m", registration="gridline")
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_pluto_relief(
+...     resolution="05m",
+...     region=[120, 160, 30, 60],
+...     registration="gridline",
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_sample_data.html b/v0.14.0/api/generated/pygmt.datasets.load_sample_data.html new file mode 100644 index 00000000000..b1e4697341b --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_sample_data.html @@ -0,0 +1,326 @@ + + + + + + + + + pygmt.datasets.load_sample_data — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_sample_data

+
+
+pygmt.datasets.load_sample_data(name)[source]
+

Load an example dataset from the GMT server.

+

The data are downloaded to a cache directory (usually ~/.gmt/cache) the first +time you invoke this function. Afterwards, it will load the data from the cache. So +you’ll need an internet connection the first time around.

+
+
Parameters:
+

name (Literal['bathymetry', 'earth_relief_holes', 'fractures', 'hotspots', 'japan_quakes', 'mars_shape', 'maunaloa_co2', 'notre_dame_topography', 'ocean_ridge_points', 'rock_compositions', 'usgs_quakes']) – Name of the dataset to load.

+
+
Return type:
+

DataFrame | DataArray

+
+
Returns:
+

data – Sample dataset loaded as a pandas.DataFrame for tabular data or +xarray.DataArray for raster data.

+
+
+
+

See also

+
+
list_sample_data

Report datasets available for tests and documentation examples.

+
+
+
+

Examples

+
>>> from pprint import pprint
+>>> from pygmt.datasets import list_sample_data, load_sample_data
+>>> # use list_sample_data to see the available datasets
+>>> pprint(list_sample_data(), width=120)
+{'bathymetry': 'Table of ship bathymetric observations off Baja California',
+ 'earth_relief_holes': 'Regional 20 arc-minutes Earth relief grid with holes',
+ 'fractures': 'Table of hypothetical fracture lengths and azimuths',
+ 'hotspots': 'Table of locations, names, and symbol sizes of hotpots from Müller et al. (1993)',
+ 'japan_quakes': 'Table of earthquakes around Japan from the NOAA NGDC database',
+ 'mars_shape': 'Table of topographic signature of the hemispheric dichotomy of Mars from Smith and Zuber (1996)',
+ 'maunaloa_co2': 'Table of CO2 readings from Mauna Loa',
+ 'notre_dame_topography': 'Table 5.11 in Davis: Statistics and Data Analysis in Geology',
+ 'ocean_ridge_points': 'Table of ocean ridge points for the entire world',
+ 'rock_compositions': 'Table of rock sample compositions',
+ 'usgs_quakes': 'Table of earthquakes from the USGS'}
+>>> # load the sample bathymetry dataset
+>>> data = load_sample_data("bathymetry")
+
+
+
+ +
+

Examples using pygmt.datasets.load_sample_data

+
+

Plotting data points

+
Plotting data points
+
+

Sampling along tracks

+
Sampling along tracks
+
+

Ternary diagram

+
Ternary diagram
+
+

Blockmean

+
Blockmean
+
+

Rose diagram

+
Rose diagram
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_tile_map.html b/v0.14.0/api/generated/pygmt.datasets.load_tile_map.html new file mode 100644 index 00000000000..36c78d7907d --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_tile_map.html @@ -0,0 +1,358 @@ + + + + + + + + + pygmt.datasets.load_tile_map — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_tile_map

+
+
+pygmt.datasets.load_tile_map(region, zoom='auto', source=None, lonlat=True, crs='EPSG:3857', wait=0, max_retries=2, zoom_adjust=None)[source]
+

Load a georeferenced raster tile map from XYZ tile providers.

+

The tiles that compose the map are merged and georeferenced into an +xarray.DataArray image with 3 bands (RGB). Note that the returned image is +in a Spherical Mercator (EPSG:3857) coordinate reference system (CRS) by default, +but can be customized using the crs parameter.

+
+
Parameters:
+
    +
  • region (Sequence[float]) – The bounding box of the map in the form of a list [xmin, xmax, ymin, +ymax]. These coordinates should be in longitude/latitude if lonlat=True or +Spherical Mercator (EPSG:3857) if lonlat=False.

  • +
  • zoom (Union[int, Literal['auto']], default: 'auto') –

    Level of detail. Higher levels (e.g. 22) mean a zoom level closer to the +Earth’s surface, with more tiles covering a smaller geographical area and thus +more detail. Lower levels (e.g. 0) mean a zoom level further from the +Earth’s surface, with less tiles covering a larger geographical area and thus +less detail. Default is "auto" to automatically determine the zoom level +based on the bounding box region extent.

    +
    +

    Note

    +

    The maximum possible zoom level may be smaller than 22, and depends on +what is supported by the chosen web tile provider source.

    +
    +

  • +
  • source (TileProvider | str | None, default: None) –

    The tile source: web tile provider or path to a local file. Provide either:

    +
      +
    • A web tile provider in the form of a xyzservices.TileProvider object. +See Contextily providers for a list of +tile providers. Default is xyzservices.providers.OpenStreetMap.HOT, i.e. +OpenStreetMap Humanitarian web tiles.

    • +
    • A web tile provider in the form of a URL. The placeholders for the XYZ in the +URL need to be {x}, {y}, {z}, respectively. E.g. +https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png.

    • +
    • A local file path. The file is read with rasterio and +all bands are loaded into the basemap. See +Working with local files.

    • +
    +
    +

    Important

    +

    Tiles are assumed to be in the Spherical Mercator projection (EPSG:3857).

    +
    +

  • +
  • lonlat (bool, default: True) – If False, coordinates in region are assumed to be Spherical Mercator as +opposed to longitude/latitude.

  • +
  • crs (str | CRS, default: 'EPSG:3857') – Coordinate reference system (CRS) of the returned xarray.DataArray +image. Default is "EPSG:3857" (i.e., Spherical Mercator). The CRS can be in +either string or rasterio.crs.CRS format.

  • +
  • wait (int, default: 0) – If the tile API is rate-limited, the number of seconds to wait between a failed +request and the next try.

  • +
  • max_retries (int, default: 2) – Total number of rejected requests allowed before contextily will stop trying to +fetch more tiles from a rate-limited API.

  • +
  • zoom_adjust (int | None, default: None) –

    The amount to adjust a chosen zoom level if it is chosen automatically. Values +outside of -1 to 1 are not recommended as they can lead to slow execution.

    +
    +

    Note

    +

    The zoom_adjust parameter requires contextily>=1.5.0.

    +
    +

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

raster – Georeferenced 3-D data array of RGB values.

+
+
Raises:
+

ImportError – If contextily is not installed or can’t be imported. Follow the + install instructions for contextily, (e.g. via + python -m pip install contextily) before using this function.

+
+
+

Examples

+
>>> import contextily
+>>> from pygmt.datasets import load_tile_map
+>>> raster = load_tile_map(
+...     region=[-180.0, 180.0, -90.0, 0.0],  # West, East, South, North
+...     zoom=1,  # less detailed zoom level
+...     source=contextily.providers.OpenTopoMap,
+...     lonlat=True,  # bounding box coordinates are longitude/latitude
+... )
+>>> raster.sizes
+Frozen({'band': 3, 'y': 256, 'x': 512})
+>>> raster.coords  
+Coordinates:
+  * band         (band) uint8... 1 2 3
+  * y            (y) float64... -7.081e-10 -7.858e+04 ... -1.996e+07 -2.004e+07
+  * x            (x) float64... -2.004e+07 -1.996e+07 ... 1.996e+07 2.004e+07
+    spatial_ref  int... 0
+>>> # CRS is set only if rioxarray is available
+>>> if hasattr(raster, "rio"):
+...     raster.rio.crs.to_string()
+'EPSG:3857'
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.datasets.load_venus_relief.html b/v0.14.0/api/generated/pygmt.datasets.load_venus_relief.html new file mode 100644 index 00000000000..663f760ed00 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.datasets.load_venus_relief.html @@ -0,0 +1,331 @@ + + + + + + + + + pygmt.datasets.load_venus_relief — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.datasets.load_venus_relief

+
+
+pygmt.datasets.load_venus_relief(resolution='01d', region=None, registration='gridline')[source]
+

Load the Venus relief dataset in various resolutions.

+
+https://www.generic-mapping-tools.org/remote-datasets/_images/GMT_venus_relief.jpg +
+

Venus relief dataset.

+
+
+

The grids are downloaded to a user data directory (usually +~/.gmt/server/venus/venus_relief/) the first time you invoke this function. +Afterwards, it will load the grid from the data directory. So you’ll need an +internet connection the first time around.

+

These grids can also be accessed by passing in the file name +@venus_relief_res[_reg] to any grid processing function or plotting +method. res is the grid resolution (see below), and reg is the grid registration +type (p for pixel registration or g for gridline registration).

+

The default color palette table (CPT) for this dataset is @venus_relief.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 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="@venus_relief.cpt".

+

Refer to https://www.generic-mapping-tools.org/remote-datasets/venus-relief.html for more details about available +datasets, including version information and references.

+
+
Parameters:
+
    +
  • resolution (Literal['01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m'], default: '01d') – The grid resolution. The suffix d and m stand for arc-degrees and +arc-minutes.

  • +
  • region (Sequence[float] | str | None, default: None) – The subregion of the grid to load, in the form of a sequence [xmin, xmax, +ymin, ymax] or an ISO country code. Required for grids with resolutions +higher than 5 arc-minutes (i.e., "05m").

  • +
  • registration (Literal['gridline', 'pixel'], default: 'gridline') – Grid registration type. Either "pixel" for pixel registration or +"gridline" for gridline registration.

  • +
+
+
Return type:
+

DataArray

+
+
Returns:
+

grid – The Venus relief grid. Coordinates are latitude and longitude in degrees. Relief +is in meters.

+
+
+
+

Note

+

The registration and coordinate system type of the returned +xarray.DataArray grid can be accessed via the GMT accessors (i.e., +grid.gmt.registration and grid.gmt.gtype respectively). However, these +properties may be lost after specific grid operations (such as slicing) and will +need to be manually set before passing the grid to any PyGMT data processing or +plotting functions. Refer to pygmt.GMTDataArrayAccessor for detailed +explanations and workarounds.

+
+

Examples

+
>>> from pygmt.datasets import load_venus_relief
+>>> # load the default grid (gridline-registered 1 arc-degree grid)
+>>> grid = load_venus_relief()
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = load_venus_relief(resolution="30m", registration="gridline")
+>>> # load high-resolution (5 arc-minutes) grid for a specific region
+>>> grid = load_venus_relief(
+...     resolution="05m",
+...     region=[120, 160, 30, 60],
+...     registration="gridline",
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.dimfilter.html b/v0.14.0/api/generated/pygmt.dimfilter.html new file mode 100644 index 00000000000..a241a4c2de3 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.dimfilter.html @@ -0,0 +1,406 @@ + + + + + + + + + pygmt.dimfilter — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.dimfilter

+
+
+pygmt.dimfilter(grid, outgrid=None, **kwargs)[source]
+

Filter a grid by dividing the filter circle.

+

Filter a grid in the space (or time) domain by +dividing the given filter circle into the given number of sectors, +applying one of the selected primary convolution or non-convolution +filters to each sector, and choosing the final outcome according to the +selected secondary filter. It computes distances using Cartesian or +Spherical geometries. The output grid can optionally be generated as a +subregion of the input and/or with a new increment using spacing, +which may add an “extra space” in the input data to prevent edge +effects for the output grid. If the filter is low-pass, then the output +may be less frequently sampled than the input. pygmt.dimfilter +will not produce a smooth output as other spatial filters +do because it returns a minimum median out of N medians of N +sectors. The output can be rough unless the input data are noise-free. +Thus, an additional filtering (e.g., Gaussian via pygmt.grdfilter) +of the DiM-filtered data is generally recommended.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/dimfilter.html

+

Aliases:

+
    +
  • D = distance

  • +
  • F = filter

  • +
+
    +
  • I = spacing

  • +
  • N = sectors

  • +
+
    +
  • R = region

  • +
  • V = verbose

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • distance (int or str) –

    Distance flag tells how grid (x,y) relates to filter width, as follows:

    +
      +
    • 0: grid (x,y) in same units as width, Cartesian distances.

    • +
    • 1: grid (x,y) in degrees, width in kilometers, Cartesian distances.

    • +
    • 2: grid (x,y) in degrees, width in km, dx scaled by cos(middle y), +Cartesian distances.

    • +
    +

    The above options are fastest because they allow weight matrix to be +computed only once. The next two options are slower because they +recompute weights for each latitude.

    +
      +
    • 3: grid (x,y) in degrees, width in km, dx scaled by cosine(y), +Cartesian distance calculation.

    • +
    • 4: grid (x,y) in degrees, width in km, Spherical distance calculation.

    • +
    +

  • +
  • filter (str) –

    xwidth[+l|u]. +Set the primary filter type. Choose among convolution and +non-convolution filters. Use the filter code x followed by +the full diameter width. Available convolution filters are:

    +
      +
    • b: boxcar. Aall weights are equal.

    • +
    • c: cosine arch. Weights follow a cosine arch curve.

    • +
    • g: Gaussian. Weights are given by the Gaussian function.

    • +
    +

    Non-convolution filters are:

    +
      +
    • m: median. Returns median value.

    • +
    • p: maximum likelihood probability (a mode estimator). Return +modal value. If more than one mode is found we return their average +value. Append +l or +h to the filter width if you want +to return the smallest or largest of each sector’s modal values.

    • +
    +

  • +
  • sectors (str) –

    xsectors[+l|u] +Set the secondary filter type x and the number of bow-tie sectors. +sectors must be integer and larger than 0. When sectors is +set to 1, the secondary filter is not effective. Available secondary +filters x are:

    +
      +
    • l: lower. Return the minimum of all filtered values.

    • +
    • u: upper. Return the maximum of all filtered values.

    • +
    • a: average. Return the mean of all filtered values.

    • +
    • m: median. Return the median of all filtered values.

    • +
    • p: mode. Return the mode of all filtered values. +If more than one mode is found we return their average +value. Append +l or +h to the sectors if you rather want to +return the smallest or largest of the modal values.

    • +
    +

  • +
  • spacing (str or list) – x_inc [and optionally y_inc] is the output increment. Append +m to indicate minutes, or c to indicate seconds. If the new +x_inc, y_inc are not integer multiples of the old ones (in the +input data), filtering will be considerably slower. [Default is same +as the input.]

  • +
  • region (str or list) – [xmin, xmax, ymin, ymax]. +Define the region of the output points [Default is the same as the input].

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in the file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a grid of Earth relief data
+>>> grid = pygmt.datasets.load_earth_relief()
+>>> # Create a filtered grid from an input grid.
+>>> filtered_grid = pygmt.dimfilter(
+...     grid=grid,
+...     # Set filter type to "median" and the diameter width to 600 km
+...     filter="m600",
+...     # Set grid in degrees, width in km
+...     distance=4,
+...     # Create 6 sectors and return the lowest values in the sector
+...     sectors="l6",
+...     # Set the region longitude range from 55W to 51W, and the
+...     # latitude range from 24S to 19S
+...     region=[-55, -51, -24, -19],
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.enums.GridRegistration.html b/v0.14.0/api/generated/pygmt.enums.GridRegistration.html new file mode 100644 index 00000000000..bf41f087b69 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.enums.GridRegistration.html @@ -0,0 +1,258 @@ + + + + + + + + + pygmt.enums.GridRegistration — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.enums.GridRegistration

+
+
+class pygmt.enums.GridRegistration(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
+

Enum for the grid registration.

+
+
+GRIDLINE = 0
+

Gridline registration

+
+ +
+
+PIXEL = 1
+

Pixel registration

+
+ +
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.enums.GridType.html b/v0.14.0/api/generated/pygmt.enums.GridType.html new file mode 100644 index 00000000000..eadbd23b7ba --- /dev/null +++ b/v0.14.0/api/generated/pygmt.enums.GridType.html @@ -0,0 +1,258 @@ + + + + + + + + + pygmt.enums.GridType — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.enums.GridType

+
+
+class pygmt.enums.GridType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
+

Enum for the grid type.

+
+
+CARTESIAN = 0
+

Cartesian grid

+
+ +
+
+GEOGRAPHIC = 1
+

Geographic grid

+
+ +
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.exceptions.GMTCLibError.html b/v0.14.0/api/generated/pygmt.exceptions.GMTCLibError.html new file mode 100644 index 00000000000..e8e657a6ed0 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.exceptions.GMTCLibError.html @@ -0,0 +1,251 @@ + + + + + + + + + pygmt.exceptions.GMTCLibError — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.exceptions.GMTCLibError

+
+
+exception pygmt.exceptions.GMTCLibError[source]
+

Error encountered when running a function from the GMT shared library.

+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.exceptions.GMTCLibNoSessionError.html b/v0.14.0/api/generated/pygmt.exceptions.GMTCLibNoSessionError.html new file mode 100644 index 00000000000..c9d26318c63 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.exceptions.GMTCLibNoSessionError.html @@ -0,0 +1,251 @@ + + + + + + + + + pygmt.exceptions.GMTCLibNoSessionError — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.exceptions.GMTCLibNoSessionError

+
+
+exception pygmt.exceptions.GMTCLibNoSessionError[source]
+

Tried to access GMT API without a currently open GMT session.

+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.exceptions.GMTCLibNotFoundError.html b/v0.14.0/api/generated/pygmt.exceptions.GMTCLibNotFoundError.html new file mode 100644 index 00000000000..e1e2360093b --- /dev/null +++ b/v0.14.0/api/generated/pygmt.exceptions.GMTCLibNotFoundError.html @@ -0,0 +1,251 @@ + + + + + + + + + pygmt.exceptions.GMTCLibNotFoundError — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.exceptions.GMTCLibNotFoundError

+
+
+exception pygmt.exceptions.GMTCLibNotFoundError[source]
+

Could not find the GMT shared library.

+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.exceptions.GMTError.html b/v0.14.0/api/generated/pygmt.exceptions.GMTError.html new file mode 100644 index 00000000000..a0aeed359c0 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.exceptions.GMTError.html @@ -0,0 +1,251 @@ + + + + + + + + + pygmt.exceptions.GMTError — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.exceptions.GMTError

+
+
+exception pygmt.exceptions.GMTError[source]
+

Base class for all GMT related errors.

+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.exceptions.GMTInvalidInput.html b/v0.14.0/api/generated/pygmt.exceptions.GMTInvalidInput.html new file mode 100644 index 00000000000..99a9d852eb1 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.exceptions.GMTInvalidInput.html @@ -0,0 +1,251 @@ + + + + + + + + + pygmt.exceptions.GMTInvalidInput — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.exceptions.GMTInvalidInput

+
+
+exception pygmt.exceptions.GMTInvalidInput[source]
+

Raised when the input of a function/method is invalid.

+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.exceptions.GMTOSError.html b/v0.14.0/api/generated/pygmt.exceptions.GMTOSError.html new file mode 100644 index 00000000000..83b4643c406 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.exceptions.GMTOSError.html @@ -0,0 +1,251 @@ + + + + + + + + + pygmt.exceptions.GMTOSError — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.exceptions.GMTOSError

+
+
+exception pygmt.exceptions.GMTOSError[source]
+

Unsupported operating system.

+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.exceptions.GMTVersionError.html b/v0.14.0/api/generated/pygmt.exceptions.GMTVersionError.html new file mode 100644 index 00000000000..ec0c2f4d685 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.exceptions.GMTVersionError.html @@ -0,0 +1,251 @@ + + + + + + + + + pygmt.exceptions.GMTVersionError — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.exceptions.GMTVersionError

+
+
+exception pygmt.exceptions.GMTVersionError[source]
+

Raised when an incompatible version of GMT is being used.

+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.filter1d.html b/v0.14.0/api/generated/pygmt.filter1d.html new file mode 100644 index 00000000000..14ae9c8b14d --- /dev/null +++ b/v0.14.0/api/generated/pygmt.filter1d.html @@ -0,0 +1,356 @@ + + + + + + + + + pygmt.filter1d — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.filter1d

+
+
+pygmt.filter1d(data, output_type='pandas', outfile=None, **kwargs)[source]
+

Time domain filtering of 1-D data tables.

+

A general time domain filter for multiple column time +series data. The user specifies which column is the time (i.e., the +independent variable) via time_col. The fastest operation +occurs when the input time series are equally spaced and have no gaps or +outliers and the special options are not needed. +Read a table and output as a numpy.ndarray, +pandas.DataFrame, or ASCII file.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/filter1d.html

+

Aliases:

+
    +
  • E = end

  • +
+
    +
  • F = filter_type

  • +
+
    +
  • N = time_col

  • +
+
+
+
Parameters:
+
    +
  • output_type (Literal['pandas', 'numpy', 'file'], default: 'pandas') –

    Desired output type of the result data.

    +
      +
    • pandas will return a pandas.DataFrame object.

    • +
    • numpy will return a numpy.ndarray object.

    • +
    • file will save the result to the file specified by the outfile +parameter.

    • +
    +

  • +
  • outfile (str | None, default: None) – File name for saving the result data. Required if output_type="file". +If specified, output_type will be forced to be "file".

  • +
  • filter_type (str) –

    typewidth[+h]. +Set the filter type. Choose among convolution and non-convolution +filters. Append the filter code followed by the full filter +width in same units as time column. By default, this +performs a low-pass filtering; append +h to select high-pass +filtering. Some filters allow for optional arguments and a modifier.

    +

    Available convolution filter types are:

    +
      +
    • b: boxcar. All weights are equal.

    • +
    • c: cosine arch. Weights follow a cosine arch curve.

    • +
    • g: Gaussian. Weights are given by the Gaussian function.

    • +
    • f: custom. Instead of width give name of a one-column file +with your own weight coefficients.

    • +
    +

    Non-convolution filter types are:

    +
      +
    • m: median. Returns median value.

    • +
    • p: maximum likelihood probability (a mode estimator). Return +modal value. If more than one mode is found we return their average +value. Append +l or +u if you rather want +to return the lowermost or uppermost of the modal values.

    • +
    • l: lower (absolute). Return the minimum of all values.

    • +
    • L: lower. Return minimum of all positive values only.

    • +
    • u: upper (absolute). Return maximum of all values.

    • +
    • U: upper. Return maximum of all negative values only.

    • +
    +

    Upper case type B, C, G, M, P, F will use +robust filter versions: i.e., replace outliers (2.5 L1 scale off +median, using 1.4826 * median absolute deviation [MAD]) with median +during filtering.

    +

    In the case of L|U it is possible that no data passes +the initial sign test; in that case the filter will return 0.0. +Apart from custom coefficients (f), the other filters may accept +variable filter widths by passing width as a two-column time-series +file with filter widths in the second column. The filter-width file +does not need to be co-registered with the data as we obtain the +required filter width at each output location via interpolation. For +multi-segment data files the filter file must either have the same +number of segments or just a single segment to be used for all data +segments.

    +

  • +
  • end (bool) – Include ends of time series in output. The default [False] loses +half the filter-width of data at each end.

  • +
  • time_col (int) – Indicate which column contains the independent variable (time). The +left-most column is 0, while the right-most is (n_cols - 1) +[Default is 0].

  • +
+
+
Return type:
+

DataFrame | ndarray | None

+
+
Returns:
+

ret – Return type depends on outfile and output_type:

+
    +
  • None if outfile is set (output will be stored in the file set by +outfile)

  • +
  • pandas.DataFrame or numpy.ndarray if outfile is not set +(depends on output_type)

  • +
+

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grd2cpt.html b/v0.14.0/api/generated/pygmt.grd2cpt.html new file mode 100644 index 00000000000..ae22c036d96 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grd2cpt.html @@ -0,0 +1,420 @@ + + + + + + + + + pygmt.grd2cpt — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grd2cpt

+
+
+pygmt.grd2cpt(grid, *, transparency=None, cmap=None, background=None, color_model=None, nlevels=None, truncate=None, output=None, reverse=None, limit=None, overrule_bg=None, no_bg=None, log=None, region=None, series=None, verbose=None, categorical=None, cyclic=None, continuous=None, **kwargs)[source]
+

Make GMT color palette tables from a grid file.

+

This function will help you to make static color palette tables (CPTs). +By default, the CPT will be saved as the current CPT of the session, +figure, subplot, panel, or inset depending on which level +pygmt.grd2cpt is called (for details on how GMT modern mode +maintains different levels of colormaps please see +https://docs.generic-mapping-tools.org/6.5/reference/features.html#gmt-modern-mode-hierarchical-levels). +You can use output to save the CPT to a file. The CPT is based on an +existing dynamic master CPT of your choice, and the mapping from data value +to colors is through the data’s cumulative distribution function (CDF), so +that the colors are histogram equalized. Thus if the grid(s) and the +resulting CPT are used in pygmt.Figure.grdimage with a linear +projection, the colors will be uniformly distributed in area on the plot. +Let z be the data values in the grid. Define CDF(Z) = (# of z < Z) / (# of +z in grid). (NaNs are ignored). These z-values are then normalized to the +master CPT and colors are sampled at the desired intervals.

+

The CPT includes three additional colors beyond the range of z-values. +These are the background color (B) assigned to values lower than the lowest +z-value, the foreground color (F) assigned to values higher than the +highest z-value, and the NaN color (N) painted wherever values are +undefined. For color tables beyond the standard GMT offerings, visit +cpt-city and +Scientific Colour-Maps.

+

If the master CPT includes B, F, and N entries, these will be copied into +the new master file. If not, the parameters COLOR_BACKGROUND, +COLOR_FOREGROUND, and COLOR_NAN from the +gmt.conf file will be used. This default behavior +can be overruled using the parameters background, overrule_bg +or no_bg.

+

The color model (RGB, HSV or CMYK) of the palette created by +pygmt.grd2cpt will be the same as specified in the header of the +master CPT. When there is no COLOR_MODEL entry in the master +CPT, the COLOR_MODEL specified in the +gmt.conf file or the color_model parameter +will be used.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grd2cpt.html

+

Aliases:

+
    +
  • A = transparency

  • +
  • C = cmap

  • +
  • D = background

  • +
  • E = nlevels

  • +
  • F = color_model

  • +
  • G = truncate

  • +
+
    +
  • H = output

  • +
  • I = reverse

  • +
  • L = limit

  • +
  • M = overrule_bg

  • +
  • N = no_bg

  • +
  • Q = log

  • +
+
    +
  • R = region

  • +
  • T = series

  • +
  • V = verbose

  • +
  • W = categorical

  • +
  • Ww = cyclic

  • +
  • Z = continuous

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • transparency (int or float or str) – Set a constant level of transparency (0-100) for all color slices. +Append +a to also affect the foreground, background, and NaN +colors [Default is no transparency, i.e., 0 (opaque)].

  • +
  • cmap (str) – Select the master color palette table (CPT) to use in the +interpolation. Full list of built-in color palette tables can be found +at https://docs.generic-mapping-tools.org/6.5/reference/cpts.html#built-in-color-palette-tables-cpt.

  • +
  • background (bool or str) – Select the back- and foreground colors to match the colors for lowest +and highest z-values in the output CPT [Default (background=True +or background="o") uses the colors specified in the master file, or +those defined by the parameters COLOR_BACKGROUND, +COLOR_FOREGROUND, and COLOR_NAN]. Use +background="i" to match the colors for the lowest and highest +values in the input (instead of the output) CPT.

  • +
  • color_model (str) – [R|r|h|c][+c[label|start[-]]]. +Force output CPT to be written with r/g/b codes, gray-scale values or +color name (R, default) or r/g/b codes only (r), or h-s-v codes +(h), or c/m/y/k codes (c). Optionally or alternatively, append ++c to write discrete palettes in categorical format. If label is +appended then we create labels for each category to be used when the +CPT is plotted. The label may be a comma-separated list of category +names (you can skip a category by not giving a name), or give +start, where we automatically build monotonically increasing +labels from start (a single letter or an integer). Additionally +append - to build ranges start-start+1 as labels instead.

  • +
  • nlevels (bool, int, or str) – Set to True to create a linear color table by using the grid +z-range as the new limits in the CPT. Alternatively, set nlevels +to resample the color table into nlevels equidistant slices.

  • +
  • series (list or str) – [min/max/inc[+b|l|n]|file|list]. +Define the range of the new CPT by giving the lowest and highest +z-value (and optionally an interval). If this is not given, the +existing range in the master CPT will be used intact. The values +produced defines the color slice boundaries. If +n is used it +refers to the number of such boundaries and not the number of slices. +For details on array creation, see +https://docs.generic-mapping-tools.org/6.5/makecpt.html#generate-1d-array.

  • +
  • truncate (list or str) – zlow/zhigh. +Truncate the incoming CPT so that the lowest and highest z-levels are +to zlow and zhigh. If one of these equal NaN then we leave that +end of the CPT alone. The truncation takes place before any resampling. +See also https://docs.generic-mapping-tools.org/6.5/reference/features.html#manipulating-cpts.

  • +
  • output (str) – Optional. The file name with extension .cpt to store the generated CPT +file. If not given or False [Default], saves the CPT as the current +CPT of the session, figure, subplot, panel, or inset depending on which +level pygmt.grd2cpt is called.

  • +
  • reverse (str) – Set this to True or c [Default] to reverse the sense of color +progression in the master CPT. Set this to z to reverse the sign +of z-values in the color table. Note that this change of z-direction +happens before truncate and series values are used so the +latter must be compatible with the changed z-range. See also +https://docs.generic-mapping-tools.org/6.5/reference/features.html#manipulating-cpts.

  • +
  • overrule_bg (str) – Overrule background, foreground, and NaN colors specified in the master +CPT with the values of the parameters COLOR_BACKGROUND, +COLOR_FOREGROUND, and COLOR_NAN specified in +the gmt.conf file. When combined with +background, only COLOR_NAN is considered.

  • +
  • no_bg (bool) – Do not write out the background, foreground, and NaN-color fields +[Default will write them, i.e. no_bg=False].

  • +
  • log (bool) – For logarithmic interpolation scheme with input given as logarithms. +Expects input z-values provided via series to be log10(z), +assigns colors, and writes out z.

  • +
  • continuous (bool) – Force a continuous CPT when building from a list of colors and a list +of z-values [Default is None, i.e. discrete values].

  • +
  • categorical (bool) – Do not interpolate the input color table but pick the output colors +starting at the beginning of the color table, until colors for all +intervals are assigned. This is particularly useful in combination with +a categorical color table, like cmap="categorical".

  • +
  • cyclic (bool) – Produce a wrapped (cyclic) color table that endlessly repeats its +range. Note that cyclic=True cannot be set together with +categorical=True.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
+
+
+

Example

+
>>> import pygmt
+>>> # load the 30 arc-minutes grid with "gridline" registration
+>>> grid = pygmt.datasets.load_earth_relief("30m", registration="gridline")
+>>> # create a plot
+>>> fig = pygmt.Figure()
+>>> # create a CPT from the grid object with grd2cpt
+>>> pygmt.grd2cpt(grid=grid)
+>>> # plot the grid object, the CPT will be automatically used
+>>> fig.grdimage(grid=grid)
+>>> # show the plot
+>>> fig.show()
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grd2xyz.html b/v0.14.0/api/generated/pygmt.grd2xyz.html new file mode 100644 index 00000000000..e49ab4d10a2 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grd2xyz.html @@ -0,0 +1,505 @@ + + + + + + + + + pygmt.grd2xyz — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grd2xyz

+
+
+pygmt.grd2xyz(grid, output_type='pandas', outfile=None, **kwargs)[source]
+

Convert grid to data table.

+

Read a grid and output xyz-triplets as a numpy.ndarray, +pandas.DataFrame, or ASCII file.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grd2xyz.html

+

Aliases:

+
    +
  • C = cstyle

  • +
  • R = region

  • +
  • V = verbose

  • +
  • W = weight

  • +
+
    +
  • Z = convention

  • +
  • b = binary

  • +
  • d = nodata

  • +
  • f = coltypes

  • +
+
    +
  • h = header

  • +
  • o = outcols

  • +
  • s = skiprows

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • output_type (Literal['pandas', 'numpy', 'file'], default: 'pandas') –

    Desired output type of the result data.

    +
      +
    • pandas will return a pandas.DataFrame object.

    • +
    • numpy will return a numpy.ndarray object.

    • +
    • file will save the result to the file specified by the outfile +parameter.

    • +
    +

  • +
  • outfile (str | None, default: None) – File name for saving the result data. Required if output_type="file". +If specified, output_type will be forced to be "file".

  • +
  • cstyle (str) – [f|i]. +Replace the x- and y-coordinates on output with the corresponding +column and row numbers. These start at 0 (C-style counting); append +f to start at 1 (Fortran-style counting). Alternatively, append +i to write just the two columns index and z, where index +is the 1-D indexing that GMT uses when referring to grid nodes.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest. +Adding region will select a subsection of the grid. If this +subsection exceeds the boundaries of the grid, only the common region +will be output.

  • +
  • weight (str) – [a[+uunit]|weight]. +Write out x,y,z,w, where w is the supplied weight (or 1 if not +supplied) [Default writes x,y,z only]. Choose a to compute +weights equal to the area each node represents. For Cartesian grids +this is simply the product of the x and y increments (except for +gridline-registered grids at all sides [half] and corners [quarter]). +For geographic grids we default to a length unit of k. Change +this by appending +uunit. For such grids, the area +varies with latitude and also sees special cases for +gridline-registered layouts at sides, corners, and poles.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • convention (str) –

    [flags]. +Write a 1-column ASCII [or binary] table. Output will be organized +according to the specified ordering convention contained in flags. +If data should be written by rows, make flags start with +T (op) if first row is y = ymax or +B (ottom) if first row is y = ymin. Then, +append L or R to indicate that first element should start at +left or right end of row. Likewise for column formats: start with +L or R to position first column, and then append T or +B to position first element in a row. For gridline registered +grids: If grid is periodic in x but the written data should not +contain the (redundant) column at x = xmax, append x. For grid +periodic in y, skip writing the redundant row at y = ymax by +appending y. If the byte-order needs to be swapped, append +w. Select one of several data types (all binary except a):

    +
      +
    • a: ASCII representation of a single item per record

    • +
    • c: int8_t, signed 1-byte character

    • +
    • u: uint8_t, unsigned 1-byte character

    • +
    • h: int16_t, short 2-byte integer

    • +
    • H: uint16_t, unsigned short 2-byte integer

    • +
    • i: int32_t, 4-byte integer

    • +
    • I: uint32_t, unsigned 4-byte integer

    • +
    • l: int64_t, long (8-byte) integer

    • +
    • L: uint64_t, unsigned long (8-byte) integer

    • +
    • f: 4-byte floating point single precision

    • +
    • d: 8-byte floating point double precision

    • +
    +

    Default format is scanline orientation of ASCII numbers: TLa.

    +

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • outcols (str or 1-D array) –

    cols[,…][,t[word]]. +Specify data columns for primary output in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +writes all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in output order (e.g., +outcols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., outcols="0:2,4" to output the +first three columns followed by the 5th column). +To write from a given column until the end of the record, leave +off stop when specifying the column range. To write trailing +text, add the column t. Append the word number to t to +write only a single word from the trailing text. Instead of +specifying columns, use outcols="n" to simply read numerical +input and skip trailing text. Note: If incols is also +used then the columns given to outcols correspond to the +order after the incols selection has taken place.

    • +
    +

  • +
  • skiprows (bool or str) –

    [cols][+a][+r]. +Suppress output for records whose z-value equals NaN [Default +outputs all records]. Optionally, supply a comma-separated list of +all columns or column ranges to consider for this NaN test [Default +only considers the third data column (i.e., cols = 2)]. Column +ranges must be given in the format start[:inc]:stop, where +inc defaults to 1 if not specified. The following modifiers are +supported:

    +
    +
      +
    • +r to reverse the suppression, i.e., only output the +records whose z-value equals NaN.

    • +
    • +a to suppress the output of the record if just one or +more of the columns equal NaN [Default skips record only +if values in all specified cols equal NaN].

    • +
    +
    +

  • +
+
+
Return type:
+

DataFrame | ndarray | None

+
+
Returns:
+

ret – Return type depends on outfile and output_type:

+
    +
  • None if outfile is set (output will be stored in the file set by +outfile)

  • +
  • pandas.DataFrame or numpy.ndarray if outfile is not set +(depends on output_type)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a grid of @earth_relief_30m data, with a longitude range of
+>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
+>>> grid = pygmt.datasets.load_earth_relief(
+...     resolution="30m", region=[10, 30, 15, 25]
+... )
+>>> # Create a pandas.DataFrame with the xyz data from an input grid
+>>> xyz_dataframe = pygmt.grd2xyz(grid=grid, output_type="pandas")
+>>> xyz_dataframe.head(n=2)
+    lon   lat          z
+0  10.0  25.0      965.5
+1  10.5  25.0      876.5
+
+
+
+ +
+

Examples using pygmt.grd2xyz

+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdclip.html b/v0.14.0/api/generated/pygmt.grdclip.html new file mode 100644 index 00000000000..81ed47c909a --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdclip.html @@ -0,0 +1,356 @@ + + + + + + + + + pygmt.grdclip — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdclip

+
+
+pygmt.grdclip(grid, outgrid=None, **kwargs)[source]
+

Set values in a grid that meet certain criteria to a new value.

+

Produce a clipped outgrid or xarray.DataArray version of the +input grid file.

+

The parameters above and below allow for a given value to be set +for values above or below a set amount, respectively. This allows for +extreme values in a grid, such as points below a certain depth when +plotting Earth relief, to all be set to the same value.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdclip.html

+

Aliases:

+
    +
  • R = region

  • +
  • Sa = above

  • +
+
    +
  • Sb = below

  • +
  • Si = between

  • +
+
    +
  • Sr = new

  • +
  • V = verbose

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • above (str or list) – [high, above]. +Set all data[i] > high to above.

  • +
  • below (str or list) – [low, below]. +Set all data[i] < low to below.

  • +
  • between (str or list) – [low, high, between]. +Set all data[i] >= low and <= high to between.

  • +
  • new (str or list) – [old, new]. +Set all data[i] == old to new. This is mostly useful when +your data are known to be integer values.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in the file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a grid of @earth_relief_30m data, with a longitude range of
+>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
+>>> grid = pygmt.datasets.load_earth_relief(
+...     resolution="30m", region=[10, 30, 15, 25]
+... )
+>>> # Report the minimum and maximum data values
+>>> [grid.data.min(), grid.data.max()]
+[183.5, 1807.0]
+>>> # Create a new grid from an input grid. Set all values below 1,000 to
+>>> # 0 and all values above 1,500 to 10,000
+>>> new_grid = pygmt.grdclip(grid=grid, below=[1000, 0], above=[1500, 10000])
+>>> # Report the minimum and maximum data values
+>>> [new_grid.data.min(), new_grid.data.max()]
+[0.0, 10000.0]
+
+
+
+ +
+

Examples using pygmt.grdclip

+
+

Clipping grid values

+
Clipping grid values
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdcut.html b/v0.14.0/api/generated/pygmt.grdcut.html new file mode 100644 index 00000000000..d1cd09fb102 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdcut.html @@ -0,0 +1,366 @@ + + + + + + + + + pygmt.grdcut — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdcut

+
+
+pygmt.grdcut(grid, **kwargs)[source]
+

Extract subregion from a grid.

+

Produce a new outgrid file which is a subregion of grid. The +subregion is specified with region; the specified range must not exceed +the range of grid (but see extend). If in doubt, run +pygmt.grdinfo to check range. Alternatively, define the subregion +indirectly via a range check on the node values or via distances from a +given point. Finally, you can give projection for oblique projections +to determine the corresponding rectangular region that will give a grid +that fully covers the oblique domain.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdcut.html

+

Aliases:

+
    +
  • G = outgrid

  • +
  • J = projection

  • +
  • N = extend

  • +
+
    +
  • R = region

  • +
  • S = circ_subregion

  • +
  • V = verbose

  • +
+
    +
  • Z = z_subregion

  • +
  • f = coltypes

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • outgrid – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • extend (bool or float) – Allow grid to be extended if new region exceeds existing +boundaries. Give a value to initialize nodes outside current region.

  • +
  • circ_subregion (str) – lon/lat/radius[unit][+n]. +Specify an origin (lon and lat) and radius; append a distance +unit and we determine the corresponding rectangular region so that +all grid nodes on or inside the circle are contained in the subset. +If +n is appended we set all nodes outside the circle to NaN.

  • +
  • z_subregion (str) – [min/max][+n|N|r]. +Determine a new rectangular region so that all nodes outside this +region are also outside the given z-range [-inf/+inf]. To indicate no +limit on min or max only, specify a hyphen (-). Normally, any NaNs +encountered are simply skipped and not considered in the +range-decision. Append +n to consider a NaN to be outside the given +z-range. This means the new subset will be NaN-free. Alternatively, +append +r to consider NaNs to be within the data range. In this +case we stop shrinking the boundaries once a NaN is found [Default +simply skips NaNs when making the range decision]. Finally, if your +core subset grid is surrounded by rows and/or columns that are all +NaNs, append +N to strip off such columns before (optionally) +considering the range of the core subset for further reduction of the +area.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in the file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a grid of @earth_relief_30m data, with a longitude range of
+>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
+>>> grid = pygmt.datasets.load_earth_relief(
+...     resolution="30m", region=[10, 30, 15, 25]
+... )
+>>> # Create a new grid from an input grid, with a longitude range of
+>>> # 12° E to 15° E and a latitude range of 21° N to 24° N
+>>> new_grid = pygmt.grdcut(grid=grid, region=[12, 15, 21, 24])
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdfill.html b/v0.14.0/api/generated/pygmt.grdfill.html new file mode 100644 index 00000000000..474a2b6c8df --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdfill.html @@ -0,0 +1,338 @@ + + + + + + + + + pygmt.grdfill — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdfill

+
+
+pygmt.grdfill(grid, outgrid=None, **kwargs)[source]
+

Fill blank areas from a grid file.

+

Read a grid that presumably has unfilled holes that the user wants to +fill in some fashion. Holes are identified by NaN values but this +criteria can be changed via the no_data parameter. There are several +different algorithms that can be used to replace the hole values.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdfill.html

+

Aliases:

+
    +
  • A = mode

  • +
  • N = no_data

  • +
+
    +
  • R = region

  • +
+
    +
  • V = verbose

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • mode (str) – Specify the hole-filling algorithm to use. Choose from c for +constant fill and append the constant value, n for nearest +neighbor (and optionally append a search radius in +pixels [default radius is \(r^2 = \sqrt{ X^2 + Y^2 }\), +where (X,Y) are the node dimensions of the grid]), or +s for bicubic spline (optionally append a tension +parameter [Default is no tension]).

  • +
  • no_data (float) – Set the node value used to identify a point as a member of a hole +[Default is NaN].

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in the file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a bathymetric grid with missing data
+>>> earth_relief_holes = pygmt.datasets.load_sample_data(name="earth_relief_holes")
+>>> # Perform grid filling operations on the sample grid
+>>> # Set all empty values to "20"
+>>> filled_grid = pygmt.grdfill(grid=earth_relief_holes, mode="c20")
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdfilter.html b/v0.14.0/api/generated/pygmt.grdfilter.html new file mode 100644 index 00000000000..7311a0ab4da --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdfilter.html @@ -0,0 +1,435 @@ + + + + + + + + + pygmt.grdfilter — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdfilter

+
+
+pygmt.grdfilter(grid, outgrid=None, **kwargs)[source]
+

Filter a grid in the space (or time) domain.

+

Filter a grid file in the space (or time) domain using one of the selected +convolution or non-convolution isotropic or rectangular filters and compute +distances using Cartesian or Spherical geometries. The output grid file +can optionally be generated as a sub-region of the input (via region) +and/or with new increment (via spacing) or registration +(via toggle). In this way, one may have “extra space” in the input +data so that the edges will not be used and the output can be within one +half-width of the input edges. If the filter is low-pass, then the output +may be less frequently sampled than the input.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdfilter.html

+

Aliases:

+
    +
  • D = distance

  • +
  • F = filter

  • +
  • I = spacing

  • +
  • N = nans

  • +
+
    +
  • R = region

  • +
  • T = toggle

  • +
  • V = verbose

  • +
+
    +
  • f = coltypes

  • +
  • r = registration

  • +
  • x = cores

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • filter (str) –

    b|c|g|o|m|p|hwidth[/width2][modifiers]. +Name of the filter type you wish to apply, followed by the width:

    +
      +
    • b - Box Car

    • +
    • c - Cosine Arch

    • +
    • g - Gaussian

    • +
    • o - Operator

    • +
    • m - Median

    • +
    • p - Maximum Likelihood probability

    • +
    • h - Histogram

    • +
    +

  • +
  • distance (str) –

    State how the grid (x,y) relates to the filter width:

    +
      +
    • "p": grid (px,py) with width an odd number of pixels, +Cartesian distances.

    • +
    • "0": grid (x,y) same units as width, Cartesian distances.

    • +
    • "1": grid (x,y) in degrees, width in kilometers, Cartesian +distances.

    • +
    • "2": grid (x,y) in degrees, width in km, dx scaled by +cos(middle y), Cartesian distances.

    • +
    +

    The above options are fastest because they allow weight matrix to be +computed only once. The next three options are slower because they +recompute weights for each latitude.

    +
      +
    • "3": grid (x,y) in degrees, width in km, dx scaled by cos(y), +Cartesian distance calculation.

    • +
    • "4": grid (x,y) in degrees, width in km, Spherical distance +calculation.

    • +
    • "5": grid (x,y) in Mercator projection="m1" img units, +width in km, Spherical distance calculation.

    • +
    +

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • nans (str or float) – i|p|r. +Determine how NaN-values in the input grid affect the filtered output. +Use i to ignore all NaNs in the calculation of the filtered value +[Default]. r is same as i except if the input node was NaN then +the output node will be set to NaN (only applies if both grids are +co-registered). p will force the filtered value to be NaN if any +grid nodes with NaN-values are found inside the filter circle.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • toggle (bool) – Toggle the node registration for the output grid to get the opposite of +the input grid [Default gives the same registration as the input grid].

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • registration (str) – g|p. +Force gridline (g) or pixel (p) node registration +[Default is g(ridline)].

  • +
  • cores (bool or int) – [[-]n]. +Limit the number of cores to be used in any OpenMP-enabled +multi-threaded algorithms. By default we try to use all available +cores. Set a number n to only use n cores (if too large it will +be truncated to the maximum cores available). Finally, give a +negative number -n to select (all - n) cores (or at least 1 if +n equals or exceeds all).

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in the file set by +outgrid)

  • +
+

+
+
+

Examples

+
>>> from pathlib import Path
+>>> import pygmt
+>>> # Apply a filter of 600 km (full width) to the @earth_relief_30m_g file
+>>> # and return a filtered field (saved as netCDF)
+>>> pygmt.grdfilter(
+...     grid="@earth_relief_30m_g",
+...     filter="m600",
+...     distance="4",
+...     region=[150, 250, 10, 40],
+...     spacing=0.5,
+...     outgrid="filtered_pacific.nc",
+... )
+>>> Path("filtered_pacific.nc").unlink()  # Cleanup file
+>>> # Apply a Gaussian smoothing filter of 600 km to the input DataArray
+>>> # and return a filtered DataArray with the smoothed field
+>>> grid = pygmt.datasets.load_earth_relief()
+>>> smooth_field = pygmt.grdfilter(grid=grid, filter="g600", distance="4")
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdgradient.html b/v0.14.0/api/generated/pygmt.grdgradient.html new file mode 100644 index 00000000000..d190da48153 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdgradient.html @@ -0,0 +1,440 @@ + + + + + + + + + pygmt.grdgradient — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdgradient

+
+
+pygmt.grdgradient(grid, outgrid=None, **kwargs)[source]
+

Compute the directional derivative of the vector gradient of the data.

+

Can accept azimuth, direction, and radiance input to create +the resulting gradient.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdgradient.html

+

Aliases:

+
    +
  • A = azimuth

  • +
  • D = direction

  • +
  • E = radiance

  • +
  • N = normalize

  • +
+
    +
  • Q = tiles

  • +
  • R = region

  • +
  • S = slope_file

  • +
+
    +
  • V = verbose

  • +
  • f = coltypes

  • +
  • n = interpolation

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • azimuth (float, str, or list) – azim[/azim2]. +Azimuthal direction for a directional derivative; azim is the +angle in the x,y plane measured in degrees positive clockwise from +north (the +y direction) toward east (the +x direction). The +negative of the directional derivative, +\(-(\frac{dz}{dx}\sin(\mbox{azim}) + \ +\frac{dz}{dy}\cos(\mbox{azim}))\), is found; negation yields +positive values when the slope of \(z(x,y)\) is downhill in the +azim direction, the correct sense for shading the illumination of an +image by a light source above the x,y plane shining from the azim +direction. Optionally, supply two azimuths, azim/azim2, in which +case the gradients in each of these directions are calculated and the +one larger in magnitude is retained; this is useful for illuminating +data with two directions of lineated structures, e.g., 0/270 +illuminates from the north (top) and west (left). Finally, if azim +is a file it must be a grid of the same domain, spacing and +registration as grid that will update the azimuth at each output +node when computing the directional derivatives.

  • +
  • direction (str) –

    [a][c][o][n]. +Find the direction of the positive (up-slope) gradient of the data. +The following options are supported:

    +
      +
    • a - Find the aspect (i.e., the down-slope direction)

    • +
    • c - Use the conventional Cartesian angles measured +counterclockwise from the positive x (east) direction.

    • +
    • o - Report orientations (0-180) rather than directions (0-360).

    • +
    • n - Add 90 degrees to all angles (e.g., to give local strikes of +the surface).

    • +
    +

  • +
  • radiance (str or list) – [m|s|p]azim/elev[+aambient][+ddiffuse][+pspecular][+sshine]. +Compute Lambertian radiance appropriate to use with +pygmt.Figure.grdimage and pygmt.Figure.grdview. The +Lambertian Reflection assumes an ideal surface that reflects all the +light that strikes it and the surface appears +equally bright from all viewing directions. Here, azim and elev are +the azimuth and elevation of the light vector. Optionally, supply +ambient [0.55], diffuse [0.6], specular [0.4], or shine [10], +which are parameters that control the reflectance properties of the +surface. Default values are given in the brackets. Use s for a +simpler Lambertian algorithm. Note that with this form you only have +to provide azimuth and elevation. Alternatively, use p for +the Peucker piecewise linear approximation (simpler but faster +algorithm; in this case azim and elev are hardwired to 315 +and 45 degrees. This means that even if you provide other values +they will be ignored.).

  • +
  • normalize (str or bool) –

    [e|t][amp][+aambient][+ssigma][+ooffset]. +The actual gradients \(g\) are offset and scaled to produce +normalized gradients \(g_n\) with a maximum output magnitude of +amp. If amp is not given, default amp = 1. If offset is not +given, it is set to the average of \(g\). The following forms are +supported:

    +
      +
    • True - Normalize using \(g_n = \mbox{amp}\ +(\frac{g - \mbox{offset}}{max(|g - \mbox{offset}|)})\)

    • +
    • e - Normalize using a cumulative Laplace distribution yielding: +\(g_n = \mbox{amp}(1 - \ +\exp{(\sqrt{2}\frac{g - \mbox{offset}}{\sigma}))}\), where +\(\sigma\) is estimated using the L1 norm of +\((g - \mbox{offset})\) if it is not given.

    • +
    • t - Normalize using a cumulative Cauchy distribution yielding: +\(g_n = \ +\frac{2(\mbox{amp})}{\pi}(\tan^{-1}(\frac{g - \ +\mbox{offset}}{\sigma}))\) where \(\sigma\) is estimated +using the L2 norm of \((g - \mbox{offset})\) if it is not +given.

    • +
    +

    As a final option, you may add +aambient to add ambient to +all nodes after gradient calculations are completed.

    +

  • +
  • tiles (str) – c|r|R. +Control how normalization via normalize is carried out. When +multiple grids should be normalized the same way (i.e., with the same +offset and/or sigma), +we must pass these values via normalize. However, this is +inconvenient if we compute these values from a grid. Use c to +save the results of offset and sigma to a statistics file; if +grid output is not needed for this run then do not specify +outgrid. For subsequent runs, just use r to read these +values. Using R will read then delete the statistics file.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • slope_file (str) – Name of output grid file with scalar magnitudes of gradient vectors. +Requires direction but makes outgrid optional.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • interpolation (str) –

    [b|c|l|n][+a][+bBC][+c][+tthreshold]. +Select interpolation mode for grids. You can select the type of +spline used:

    +
      +
    • b for B-spline

    • +
    • c for bicubic [Default]

    • +
    • l for bilinear

    • +
    • n for nearest-neighbor

    • +
    +

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in the file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a grid of @earth_relief_30m data, with a longitude range of
+>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
+>>> grid = pygmt.datasets.load_earth_relief(
+...     resolution="30m", region=[10, 30, 15, 25]
+... )
+>>> # Create a new grid from an input grid, set the azimuth to 10 degrees,
+>>> new_grid = pygmt.grdgradient(grid=grid, azimuth=10)
+
+
+
+ +
+

Examples using pygmt.grdgradient

+
+

Calculating grid gradient and radiance

+
Calculating grid gradient and radiance
+
+

Calculating grid gradient with custom azimuth and normalize parameters

+
Calculating grid gradient with custom azimuth and normalize parameters
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdhisteq.compute_bins.html b/v0.14.0/api/generated/pygmt.grdhisteq.compute_bins.html new file mode 100644 index 00000000000..041234d59e7 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdhisteq.compute_bins.html @@ -0,0 +1,396 @@ + + + + + + + + + pygmt.grdhisteq.compute_bins — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdhisteq.compute_bins

+
+
+static grdhisteq.compute_bins(grid, output_type='pandas', outfile=None, **kwargs)[source]
+

Perform histogram equalization for a grid.

+

Histogram equalization provides a way to highlight data that has most +values clustered in a small portion of the dynamic range, such as a +grid of flat topography with a mountain in the middle. Ordinary gray +shading of this grid (using pygmt.Figure.grdimage or +pygmt.Figure.grdview) with a linear mapping from topography to +graytone will result in most of the image being very dark gray, with +the mountain being almost white. pygmt.grdhisteq.compute_bins +can provide a list of data values that divide the data range into +divisions which have an equal area in the image [Default is 16 if +divisions is not set]. The pandas.DataFrame or ASCII file +output can be used to make a colormap with pygmt.makecpt and an +image with pygmt.Figure.grdimage that has all levels of gray +occurring equally.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdhisteq.html

+

Aliases:

+
    +
  • C = divisions

  • +
  • N = gaussian

  • +
+
    +
  • Q = quadratic

  • +
  • R = region

  • +
+
    +
  • V = verbose

  • +
  • h = header

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • output_type (Literal['pandas', 'numpy', 'file'], default: 'pandas') –

    Desired output type of the result data.

    +
      +
    • pandas will return a pandas.DataFrame object.

    • +
    • numpy will return a numpy.ndarray object.

    • +
    • file will save the result to the file specified by the outfile +parameter.

    • +
    +

  • +
  • outfile (str | None, default: None) – File name for saving the result data. Required if output_type="file". +If specified, output_type will be forced to be "file".

  • +
  • divisions (int) – Set the number of divisions of the data range.

  • +
  • quadratic (bool) – Perform quadratic equalization [Default is linear].

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
+
+
Return type:
+

DataFrame | ndarray | None

+
+
Returns:
+

ret – Return type depends on outfile and output_type:

+
    +
  • None if outfile is set (output will be stored in file set by +outfile)

  • +
  • pandas.DataFrame or numpy.ndarray if outfile is not +set (depends on output_type)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a grid of @earth_relief_30m data, with a longitude range of
+>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
+>>> grid = pygmt.datasets.load_earth_relief(
+...     resolution="30m", region=[10, 30, 15, 25]
+... )
+>>> # Find elevation intervals that split the data range into 5
+>>> # divisions, each of which have an equal area in the original grid.
+>>> bins = pygmt.grdhisteq.compute_bins(grid=grid, divisions=5)
+>>> print(bins)
+        start    stop
+bin_id
+0       183.5   395.0
+1       395.0   472.0
+2       472.0   575.0
+3       575.0   709.5
+4       709.5  1807.0
+
+
+
+

See also

+

pygmt.grd2cpt

+
+
+

Note

+

This method does a weighted histogram equalization for geographic +grids to account for node area varying with latitude.

+
+
+ +
+

Examples using pygmt.grdhisteq.compute_bins

+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdhisteq.equalize_grid.html b/v0.14.0/api/generated/pygmt.grdhisteq.equalize_grid.html new file mode 100644 index 00000000000..fc82fb74c31 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdhisteq.equalize_grid.html @@ -0,0 +1,353 @@ + + + + + + + + + pygmt.grdhisteq.equalize_grid — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdhisteq.equalize_grid

+
+
+static grdhisteq.equalize_grid(grid, outgrid=None, **kwargs)[source]
+

Perform histogram equalization for a grid.

+

pygmt.grdhisteq.equalize_grid provides a way to write a grid +with statistics based on a cumulative distribution function. The +outgrid has relative highs and lows in the same (x,y) locations as +the grid, but the values are changed to reflect their place in the +cumulative distribution.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdhisteq.html

+

Aliases:

+
    +
  • C = divisions

  • +
  • N = gaussian

  • +
+
    +
  • Q = quadratic

  • +
  • R = region

  • +
+
    +
  • V = verbose

  • +
  • h = header

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • divisions (int) – Set the number of divisions of the data range.

  • +
  • gaussian (bool or int or float) – norm. +Produce an output grid with standard normal scores using +gaussian=True or force the scores to fall in the ±norm +range.

  • +
  • quadratic (bool) – Perform quadratic equalization [Default is linear].

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on the outgrid parameter:

+
    +
  • xarray.DataArray if outgrid is None

  • +
  • None if outgrid is a str (grid output is stored in outgrid)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a grid of @earth_relief_30m data, with a longitude range
+>>> # of 10°E to 30°E, and a latitude range of 15°N to 25°N
+>>> grid = pygmt.datasets.load_earth_relief(
+...     resolution="30m", region=[10, 30, 15, 25]
+... )
+>>> # Create a new grid with a Gaussian data distribution
+>>> grid = pygmt.grdhisteq.equalize_grid(grid=grid, gaussian=True)
+
+
+
+

See also

+

pygmt.grd2cpt

+
+
+

Note

+

This method does a weighted histogram equalization for geographic +grids to account for node area varying with latitude.

+
+
+ +
+

Examples using pygmt.grdhisteq.equalize_grid

+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdhisteq.html b/v0.14.0/api/generated/pygmt.grdhisteq.html new file mode 100644 index 00000000000..cd73092e0a5 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdhisteq.html @@ -0,0 +1,295 @@ + + + + + + + + + pygmt.grdhisteq — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdhisteq

+
+
+class pygmt.grdhisteq[source]
+

Perform histogram equalization for a grid.

+

Two common use cases of pygmt.grdhisteq are to find data values +that divide a grid into patches of equal area +(pygmt.grdhisteq.compute_bins) or to write a grid with +statistics based on some kind of cumulative distribution function +(pygmt.grdhisteq.equalize_grid).

+

Histogram equalization provides a way to highlight data that has most +values clustered in a small portion of the dynamic range, such as a +grid of flat topography with a mountain in the middle. Ordinary gray +shading of this grid (using pygmt.Figure.grdimage or +pygmt.Figure.grdview) with a linear mapping from topography to +graytone will result in most of the image being very dark gray, with the +mountain being almost white. pygmt.grdhisteq.compute_bins can +provide a list of data values that divide the data range into divisions +which have an equal area in the image [Default is 16 if divisions is +not set]. The pandas.DataFrame or ASCII file output can be used to +make a colormap with pygmt.makecpt and an image with +pygmt.Figure.grdimage that has all levels of gray occurring +equally.

+

pygmt.grdhisteq.equalize_grid provides a way to write a grid with +statistics based on a cumulative distribution function. In this +application, the outgrid has relative highs and lows in the same +(x,y) locations as the grid, but the values are changed to reflect +their place in the cumulative distribution.

+
+ +

Methods Summary

+ + + + + + + + + +

grdhisteq.compute_bins(grid[, output_type, ...])

Perform histogram equalization for a grid.

grdhisteq.equalize_grid(grid[, outgrid])

Perform histogram equalization for a grid.

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdinfo.html b/v0.14.0/api/generated/pygmt.grdinfo.html new file mode 100644 index 00000000000..1f116761fcf --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdinfo.html @@ -0,0 +1,356 @@ + + + + + + + + + pygmt.grdinfo — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdinfo

+
+
+pygmt.grdinfo(grid, *, per_column=None, tiles=None, geographic=None, spacing=None, force_scan=None, minmax_pos=None, region=None, nearest_multiple=None, verbose=None, coltypes=None, **kwargs)[source]
+

Get information about a grid.

+

Can read the grid from a file or given as an xarray.DataArray grid.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdinfo.html

+

Aliases:

+
    +
  • C = per_column

  • +
  • D = tiles

  • +
  • F = geographic

  • +
  • I = spacing

  • +
+
    +
  • L = force_scan

  • +
  • M = minmax_pos

  • +
  • R = region

  • +
+
    +
  • T = nearest_multiple

  • +
  • V = verbose

  • +
  • f = coltypes

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • per_column (str or bool) – n|t. +Format the report using tab-separated fields on a single line. The +output is name w e s n z0 z1 dx dy nx ny [ x0 y0 x1 y1 ] +[ med scale ] [ mean std rms ] [ n_nan ] registration gtype. +The data in brackets are outputted depending on the force_scan +and minmax_pos parameters. Use t to place file name at the end +of the output record or, n or True to only output numerical +columns. The registration is either 0 (gridline) or 1 (pixel), while +gtype is either 0 (Cartesian) or 1 (geographic). The default value is +False. This cannot be called if geographic is also set.

  • +
  • tiles (str or list) – xoff[/yoff][+i]. +Divide a single grid’s domain (or the region domain, if no grid +given) into tiles of size dx times dy (set via spacing). You can +specify overlap between tiles by appending xoff[/yoff]. If the +single grid is given you may use the modifier +i to ignore tiles +that have no data within each tile subregion. Default output is text +region strings. Use per_column to instead report four columns with +xmin xmax ymin ymax per tile, or use per_column="t" to also have +the region string appended as trailing text.

  • +
  • geographic (bool) – Report grid domain and x/y-increments in world mapping format. +The default value is False. This cannot be called if +per_column is also set.

  • +
  • spacing (str or list) – dx[/dy]|b|i|r. +Report the min/max of the region to the nearest multiple of dx and dy, +and output this in the form w/e/s/n (unless per_column is set). To +report the actual grid region, append r. For a grid produced by +the img supplement (a Cartesian Mercator grid), the exact geographic +region is given with i (if not found then we return the actual +grid region instead). If no argument is given then we report the grid +increment in the form xinc[/yinc]. If b is given we write +each grid’s bounding box polygon instead. Finally, if tiles is in +effect then dx and dy are the dimensions of the desired tiles.

  • +
  • force_scan (int or str) –

    0|1|2|p|a.

    +
      +
    • 0: Report range of z after actually scanning the data, not just +reporting what the header says.

    • +
    • 1: Report median and L1 scale of z (L1 scale = 1.4826 * Median +Absolute Deviation (MAD)).

    • +
    • 2: Report mean, standard deviation, and root-mean-square (rms) +of z.

    • +
    • p: Report mode (LMS) and LMS scale of z.

    • +
    • a: Include all of the above.

    • +
    +

  • +
  • minmax_pos (bool) – Include the x/y values at the location of the minimum and maximum +z-values.

  • +
  • nearest_multiple (str) – [dz][+a[alpha]][+s]. +Determine minimum and maximum z-values. If dz is provided then we +first round these values off to multiples of dz. To exclude the +two tails of the distribution when determining the minimum and +maximum you can add +a to set the alpha value (in percent): +We then sort the grid, exclude the data in the 0.5*alpha and +100 - 0.5*alpha tails, and revise the minimum and maximum. To +force a symmetrical range about zero, using minus/plus the maximum +absolute value of the two extremes, append +s. We report the +result via the text string zmin/zmax or zmin/zmax/dz +(if dz was given) as expected by pygmt.makecpt.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
+
+
Returns:
+

info (str) – A string with information about the grid.

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdlandmask.html b/v0.14.0/api/generated/pygmt.grdlandmask.html new file mode 100644 index 00000000000..633953c4516 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdlandmask.html @@ -0,0 +1,405 @@ + + + + + + + + + pygmt.grdlandmask — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdlandmask

+
+
+pygmt.grdlandmask(outgrid=None, **kwargs)[source]
+

Create a grid file with set values for land and water.

+

Read the selected shoreline database and create a grid to specify which +nodes in the specified grid are over land or over water. The nodes defined +by the selected region and lattice spacing +will be set according to one of two criteria: (1) land vs water, or +(2) the more detailed (hierarchical) ocean vs land vs lake +vs island vs pond.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdlandmask.html

+

Aliases:

+
    +
  • A = area_thresh

  • +
  • D = resolution

  • +
  • E = bordervalues

  • +
+
    +
  • I = spacing

  • +
  • N = maskvalues

  • +
  • R = region

  • +
+
    +
  • V = verbose

  • +
  • r = registration

  • +
  • x = cores

  • +
+
+
+
Parameters:
+
    +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • area_thresh (float or str) – min_area[/min_level/max_level][+a[g|i][s|S]][+l|r][+ppercent]. +Features with an area smaller than min_area in km2 or of +hierarchical level that is lower than min_level or higher than +max_level will not be plotted [Default is "0/0/4" (all +features)].

  • +
  • resolution (str) – res[+f]. Select the resolution of the data set to use +((f)ull, (h)igh, (i)ntermediate, (l)ow, or +(c)rude). The resolution drops off by ~80% between data sets. +[Default is l]. Append +f to automatically select a lower +resolution should the one requested not be available +[abort if not found]. Alternatively, choose (a)uto to automatically +select the best resolution given the chosen region. Note that because +the coastlines differ in details a node in a mask file using one +resolution is not guaranteed to remain inside [or outside] when a +different resolution is selected.

  • +
  • bordervalues (bool, str, float, or list) – Nodes that fall exactly on a polygon boundary should be +considered to be outside the polygon [Default considers them to be +inside]. Alternatively, append either a list of four values +[cborder, lborder, iborder, pborder] or just the single value +bordervalue (for the case when they should all be the same value). +This turns on the line-tracking mode. Now, after setting the mask +values specified via maskvalues we trace the lines and change the +node values for all cells traversed by a line to the corresponding +border value. Here, cborder is used for cells traversed by the +coastline, lborder for cells traversed by a lake outline, iborder +for islands-in-lakes outlines, and pborder for +ponds-in-islands-in-lakes outlines [Default is no line tracing].

  • +
  • maskvalues (str or list) – [wet, dry] or [ocean, land, lake, island, pond]. +Set the values that will be assigned to nodes. Values can +be any number, including the textstring NaN +[Default is [0, 1, 0, 1, 0] (i.e., [0, 1])]. Also select +bordervalues to let nodes exactly on feature boundaries be +considered outside [Default is inside].

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • registration (str) – g|p. +Force gridline (g) or pixel (p) node registration +[Default is g(ridline)].

  • +
  • cores (bool or int) – [[-]n]. +Limit the number of cores to be used in any OpenMP-enabled +multi-threaded algorithms. By default we try to use all available +cores. Set a number n to only use n cores (if too large it will +be truncated to the maximum cores available). Finally, give a +negative number -n to select (all - n) cores (or at least 1 if +n equals or exceeds all).

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in the file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Create a landmask grid with a longitude range of 125° E to 130° E, a
+>>> # latitude range of 30° N to 35° N, and a grid spacing of 1 arc-degree
+>>> landmask = pygmt.grdlandmask(spacing=1, region=[125, 130, 30, 35])
+
+
+
+ +
+

Examples using pygmt.grdlandmask

+
+

Create ‘wet-dry’ mask grid

+
Create 'wet-dry' mask grid
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdproject.html b/v0.14.0/api/generated/pygmt.grdproject.html new file mode 100644 index 00000000000..ab505cf7e77 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdproject.html @@ -0,0 +1,407 @@ + + + + + + + + + pygmt.grdproject — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdproject

+
+
+pygmt.grdproject(grid, outgrid=None, **kwargs)[source]
+

Change projection of gridded data between geographical and rectangular.

+

This method will project a geographical gridded data set onto a +rectangular grid. If inverse is True, it will project a +rectangular coordinate system to a geographic system. To obtain the value +at each new node, its location is inversely projected back onto the input +grid after which a value is interpolated between the surrounding input +grid values. By default bi-cubic interpolation is used. Aliasing is +avoided by also forward projecting the input grid nodes. If two or more +nodes are projected onto the same new node, their average will dominate in +the calculation of the new node value. Interpolation and aliasing is +controlled with the interpolation parameter. The new node spacing may +be determined in one of several ways by specifying the grid spacing, +number of nodes, or resolution. Nodes not constrained by input data are +set to NaN. The region parameter can be used to select a map region +large or smaller than that implied by the extent of the grid file.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdproject.html

+

Aliases:

+
    +
  • C = center

  • +
  • D = spacing

  • +
  • E = dpi

  • +
  • F = scaling

  • +
+
    +
  • I = inverse

  • +
  • J = projection

  • +
  • M = unit

  • +
  • R = region

  • +
+
    +
  • V = verbose

  • +
  • n = interpolation

  • +
  • r = registration

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • inverse (bool) – When set to True transforms grid from rectangular to geographical +[Default is False].

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • center (str or list) – [dx, dy]. +Let projected coordinates be relative to projection center [Default +is relative to lower left corner]. Optionally, add offsets in the +projected units to be added (or subtracted when inverse is set) to +(from) the projected coordinates, such as false eastings and +northings for particular projection zones [Default is [0, 0]].

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • dpi (int) – Set the resolution for the new grid in dots per inch.

  • +
  • scaling (str) – [c|i|p|e|f|k|M|n|u]. +Force 1:1 scaling, i.e., output or input data are in actual projected +meters [e]. To specify other units, append f (feet), +k (kilometers), M (statute miles), n (nautical miles), +u (US survey feet), i (inches), c (centimeters), or +p (points).

  • +
  • unit (str) – Append c, i, or p to indicate that centimeters, inches, or +points should be the projected measure unit. Cannot be used with +scaling.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • interpolation (str) –

    [b|c|l|n][+a][+bBC][+c][+tthreshold]. +Select interpolation mode for grids. You can select the type of +spline used:

    +
      +
    • b for B-spline

    • +
    • c for bicubic [Default]

    • +
    • l for bilinear

    • +
    • n for nearest-neighbor

    • +
    +

  • +
  • registration (str) – g|p. +Force gridline (g) or pixel (p) node registration +[Default is g(ridline)].

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in the file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a grid of @earth_relief_30m data, with a longitude range of
+>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
+>>> region = [10, 30, 15, 25]
+>>> grid = pygmt.datasets.load_earth_relief(resolution="30m", region=region)
+>>> # Project the geographic gridded data onto a rectangular grid
+>>> new_grid = pygmt.grdproject(grid=grid, projection="M10c", region=region)
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdsample.html b/v0.14.0/api/generated/pygmt.grdsample.html new file mode 100644 index 00000000000..e93c8b6fdd9 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdsample.html @@ -0,0 +1,395 @@ + + + + + + + + + pygmt.grdsample — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdsample

+
+
+pygmt.grdsample(grid, outgrid=None, **kwargs)[source]
+

Change the registration, spacing, or nodes in a grid file.

+

This reads a grid file and interpolates it to create a new grid +file. It can change the registration with translate or +registration, change the grid-spacing or number of nodes with +spacing, and set a new sub-region using region. A bicubic +[Default], bilinear, B-spline or nearest-neighbor interpolation is set +with interpolation.

+

When region is omitted, the output grid will cover the same region as +the input grid. When spacing is omitted, the grid spacing of the +output grid will be the same as the input grid. Either registration or +translate can be used to change the grid registration. When omitted, +the output grid will have the same registration as the input grid.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdsample.html

+

Aliases:

+
    +
  • I = spacing

  • +
  • R = region

  • +
  • T = translate

  • +
+
    +
  • V = verbose

  • +
  • f = coltypes

  • +
  • n = interpolation

  • +
+
    +
  • r = registration

  • +
  • x = cores

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • translate (bool) – Translate between grid and pixel registration; if the input is +grid-registered, the output will be pixel-registered and vice-versa.

  • +
  • registration (str or bool) – [g|p]. +Set registration to gridline or pixel.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • interpolation (str) –

    [b|c|l|n][+a][+bBC][+c][+tthreshold]. +Select interpolation mode for grids. You can select the type of +spline used:

    +
      +
    • b for B-spline

    • +
    • c for bicubic [Default]

    • +
    • l for bilinear

    • +
    • n for nearest-neighbor

    • +
    +

  • +
  • cores (bool or int) – [[-]n]. +Limit the number of cores to be used in any OpenMP-enabled +multi-threaded algorithms. By default we try to use all available +cores. Set a number n to only use n cores (if too large it will +be truncated to the maximum cores available). Finally, give a +negative number -n to select (all - n) cores (or at least 1 if +n equals or exceeds all).

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in the file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a grid of @earth_relief_30m data, with a longitude range of
+>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
+>>> grid = pygmt.datasets.load_earth_relief(
+...     resolution="30m", region=[10, 30, 15, 25]
+... )
+>>> # Create a new grid from an input grid, change the registration,
+>>> # and set both x- and y-spacing to 0.5 arc-degrees
+>>> new_grid = pygmt.grdsample(grid=grid, translate=True, spacing=[0.5, 0.5])
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdtrack.html b/v0.14.0/api/generated/pygmt.grdtrack.html new file mode 100644 index 00000000000..5b566642b5b --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdtrack.html @@ -0,0 +1,770 @@ + + + + + + + + + pygmt.grdtrack — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdtrack

+
+
+pygmt.grdtrack(grid, points=None, output_type='pandas', outfile=None, newcolname=None, **kwargs)[source]
+

Sample grids at specified (x,y) locations.

+

Reads one or more grid files and a table (from file or an array input; but +see profile for exception) with (x,y) [or (lon,lat)] positions in the +first two columns (more columns may be present). It interpolates the +grid(s) at the positions in the table and writes out the table with the +interpolated values added as (one or more) new columns. Alternatively +(crossprofile), the input is considered to be line-segments and we +create orthogonal cross-profiles at each data point or with an equidistant +separation and sample the grid(s) along these profiles. A bicubic +[Default], bilinear, B-spline or nearest-neighbor interpolation is used, +requiring boundary conditions at the limits of the region (see +interpolation; Default uses “natural” conditions (second partial +derivative normal to edge is zero) unless the grid is automatically +recognized as periodic.)

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdtrack.html

+

Aliases:

+
    +
  • A = resample

  • +
  • C = crossprofile

  • +
  • D = dfile

  • +
  • E = profile

  • +
  • F = critical

  • +
  • N = no_skip

  • +
  • R = region

  • +
  • S = stack

  • +
+
    +
  • T = radius

  • +
  • V = verbose

  • +
  • Z = z_only

  • +
  • a = aspatial

  • +
  • b = binary

  • +
  • d = nodata

  • +
  • e = find

  • +
  • f = coltypes

  • +
+
    +
  • g = gap

  • +
  • h = header

  • +
  • i = incols

  • +
  • j = distcalc

  • +
  • n = interpolation

  • +
  • o = outcols

  • +
  • s = skiprows

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • points (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in either a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • output_type (Literal['pandas', 'numpy', 'file'], default: 'pandas') –

    Desired output type of the result data.

    +
      +
    • pandas will return a pandas.DataFrame object.

    • +
    • numpy will return a numpy.ndarray object.

    • +
    • file will save the result to the file specified by the outfile +parameter.

    • +
    +

  • +
  • outfile (str | None, default: None) – File name for saving the result data. Required if output_type="file". +If specified, output_type will be forced to be "file".

  • +
  • newcolname (str) – Required if points is a pandas.DataFrame. The name for the +new column in the track pandas.DataFrame table where the +sampled values will be placed.

  • +
  • resample (str) – f|p|m|r|R[+l] +For track resampling (if crossprofile or profile are set) we +can select how this is to be performed. Append f to keep original +points, but add intermediate points if needed [Default], m as +f, but first follow meridian (along y) then parallel (along x), +p as f, but first follow parallel (along y) then meridian +(along x), r to resample at equidistant locations; input points are +not necessarily included in the output, and R as r, but adjust +given spacing to fit the track length exactly. Finally, append ++l if geographic distances should be measured along rhumb lines +(loxodromes) instead of great circles. Ignored unless crossprofile +is used.

  • +
  • crossprofile (str) – length/ds[/spacing][+a|+v][l|r]. +Use input line segments to create an equidistant and (optionally) +equally-spaced set of crossing profiles along which we sample the +grid(s) [Default simply samples the grid(s) at the input locations]. +Specify two length scales that control how the sampling is done: +length sets the full length of each cross-profile, while ds is +the sampling spacing along each cross-profile. Optionally, append +/spacing for an equidistant spacing between cross-profiles +[Default erects cross-profiles at the input coordinates]; see +resample for how resampling the input track is controlled. By +default, all cross-profiles have the same direction (left to right +as we look in the direction of the input line segment). Append +a +to alternate the direction of cross-profiles, or v to enforce +either a “west-to-east” or “south-to-north” view. By default the entire +profiles are output. Choose to only output the left or right halves +of the profiles by appending +l or +r, respectively. Append +suitable units to length; it sets the unit used for ds [and +spacing] (See Units). The default +unit for geographic grids is meters while Cartesian grids implies the +user unit. The output columns will be lon, lat, dist, azimuth, +z1, z2, …, zn (The zi are the sampled values for each of the +n grids).

  • +
  • dfile (str) – In concert with crossprofile we can save the (possibly resampled) +original lines to dfile [Default only saves the cross-profiles]. The +columns will be lon, lat, dist, azimuth, z1, z2, … +(sampled value for each grid).

  • +
  • profile (str) – line[,line,…][+aaz][+c][+d][+g][+iinc][+llength][+nnp][+oaz][+rradius]. +Instead of reading input track coordinates, specify profiles via +coordinates and modifiers. The format of each line is +start/stop, where start or stop are either lon/lat (x/y +for Cartesian data) or a 2-character XY key that uses the +text-style justification format to specify +a point on the map as [LCR][BMT]. Each line will be a separate segment +unless +c is used which will connect segments with shared joints +into a single segment. In addition to line coordinates, you can use Z-, +Z+ to mean the global minimum and maximum locations in the grid (only +available if a single grid is given via outfile). You may append ++iinc to set the sampling interval; if not given then we +default to half the minimum grid interval. For a line along parallels +or meridians you can add +g to report degrees of longitude or +latitude instead of great circle distances starting at zero. Instead of +two coordinates you can specify an origin and one of +a, +o, or ++r. The +a sets the azimuth of a profile of given length +starting at the given origin, while +o centers the profile on the +origin; both require +l. For circular sampling specify +r to +define a circle of given radius centered on the origin; this option +requires either +n or +i. The +nnp modifier sets the +desired number of points, while +llength gives the total length +of the profile. Append +d to output the along-track distances after +the coordinates. Note: No track file will be read. Also note that +only one distance unit can be chosen. Giving different units will +result in an error. If no units are specified we default to great +circle distances in km (if geographic). If working with geographic data +you can use distcalc to control distance calculation mode [Default +is Great Circle]. Note: If crossprofile is set and spacing is +given then that sampling scheme overrules any modifier set in +profile.

  • +
  • critical (str) – [+b][+n][+r][+zz0]. +Find critical points along each cross-profile as a function of +along-track distance. Requires crossprofile and a single input grid +(z). We examine each cross-profile generated and report (dist, +lonc, latc, distc, azimuthc, zc) at the center peak of +maximum z value, (lonl, latl, distl) and (lonr, latr, +distr) at the first and last non-NaN point whose z-value exceeds +z0, respectively, and the width based on the two extreme points +found. Here, dist is the distance along the original input +points and the other 12 output columns are a function of that +distance. When searching for the center peak and the extreme first and +last values that exceed the threshold we assume the profile is positive +up. If we instead are looking for a trough then you must use +n to +temporarily flip the profile to positive. The threshold z0 value is +always given as >= 0; use +z to change it [Default is 0]. +Alternatively, use +b to determine the balance point and standard +deviation of the profile; this is the weighted mean and weighted +standard deviation of the distances, with z acting as the weight. +Finally, use +r to obtain the weighted rms about the cross-track +center (distc == 0). Note: We round the exact results to the +nearest distance nodes along the cross-profiles. We write 13 output +columns per track: dist, lonc, latc, distc, azimuthc, zc, lonl, latl, +distl, lonr, latr, distr, width.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • no_skip (bool) – Do not skip points that fall outside the domain of the grid(s) +[Default only output points within the grid domain].

  • +
  • stack (str or list) –

    method/modifiers. +In conjunction with crossprofile, compute a single stacked profile +from all profiles across each segment. Choose how stacking should be +computed [Default method is a]:

    +
      +
    • a = mean (average)

    • +
    • m = median

    • +
    • p = mode (maximum likelihood)

    • +
    • l = lower

    • +
    • L = lower but only consider positive values

    • +
    • u = upper

    • +
    • U = upper but only consider negative values.

    • +
    +

    The modifiers control the output; choose one or more among these +choices:

    +
      +
    • +a : Append stacked values to all cross-profiles.

    • +
    • +d : Append stack deviations to all cross-profiles.

    • +
    • +r : Append data residuals (data - stack) to all cross-profiles.

    • +
    • +s[file] : Save stacked profile to file [Default file name +is grdtrack_stacked_profile.txt].

    • +
    • +cfact : Compute envelope on stacked profile as +±fact *deviation [Default fact value is 2].

    • +
    +

    Here are some notes:

    +
      +
    1. Deviations depend on method and are st.dev (a), L1 scale, +i.e., 1.4826 * median absolute deviation (MAD) (for m and +p), or half-range (upper-lower)/2.

    2. +
    3. The stacked profile file contains a leading column plus groups of +4-6 columns, with one group for each sampled grid. The leading +column holds cross distance, while the first four columns in a group +hold stacked value, deviation, min value, and max value, +respectively. If method is one of a|m|p then we +also write the lower and upper confidence bounds (see +c). When +one or more of +a, +d, and +r are used then we also +append the stacking results to the end of each row, for all +cross-profiles. The order is always stacked value (+a), followed +by deviations (+d) and finally residuals (+r). When more +than one grid is sampled this sequence of 1-3 columns is repeated +for each grid.

    4. +
    +

  • +
  • radius (bool, float, or str) – [radius][+e|p]. +To be used with normal grid sampling, and limited to a single, non-IMG +grid. If the nearest node to the input point is NaN, search outwards +until we find the nearest non-NaN node and report that value instead. +Optionally specify a search radius which limits the consideration to +points within this distance from the input point. To report the +location of the nearest node and its distance from the input point, +append +e. The default unit for geographic grid distances is +spherical degrees. Use radius to change the unit and give radius = +0 if you do not want to limit the radius search. To instead replace the +input point with the coordinates of the nearest node, append +p.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • z_only (bool) – Only write out the sampled z-values [Default writes all columns].

  • +
  • aspatial (bool or str) – [col=]name[,…]. +Control how aspatial data are handled during input and output. +Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#aspatial-full.

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • gap (str or list) –

    x|y|z|d|X|Y|Dgap[u][+a][+ccol][+n|p]. +Examine the spacing between consecutive data points in order to +impose breaks in the line. To specify multiple criteria, provide +a list with each item containing a string describing one set of +criteria.

    +
    +
      +
    • x|X - define a gap when there is a large enough +change in the x coordinates (upper case to use projected +coordinates).

    • +
    • y|Y - define a gap when there is a large enough +change in the y coordinates (upper case to use projected +coordinates).

    • +
    • d|D - define a gap when there is a large enough +distance between coordinates (upper case to use projected +coordinates).

    • +
    • z - define a gap when there is a large enough change in +the z data. Use +ccol to change the z data column +[Default col is 2 (i.e., 3rd column)].

    • +
    +
    +

    A unit u may be appended to the specified gap:

    +
    +
      +
    • For geographic data (x|y|d), the unit may +be arc- d(egrees), m(inutes), and s(econds) +, or (m)e(ters), f(eet), k(ilometers), +M(iles), or n(autical miles) [Default is +(m)e(ters)].

    • +
    • For projected data (X|Y|D), the unit may be +i(nches), c(entimeters), or p(oints).

    • +
    +
    +

    Append modifier +a to specify that all the criteria must be +met [default imposes breaks if any one criterion is met].

    +

    One of the following modifiers can be appended:

    +
    +
      +
    • +n - specify that the previous value minus the current +column value must exceed gap for a break to be imposed.

    • +
    • +p - specify that the current value minus the previous +value must exceed gap for a break to be imposed.

    • +
    +
    +

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • distcalc (str) –

    e|f|g. +Determine how spherical distances are calculated.

    +
      +
    • e - Ellipsoidal (or geodesic) mode

    • +
    • f - Flat Earth mode

    • +
    • g - Great circle distance [Default]

    • +
    +

    All spherical distance calculations depend on the current ellipsoid +(PROJ_ELLIPSOID), the definition of the mean radius +(PROJ_MEAN_RADIUS), and the specification of latitude type +(PROJ_AUX_LATITUDE). Geodesic distance calculations is also +controlled by method (PROJ_GEODESIC).

    +

  • +
  • interpolation (str) –

    [b|c|l|n][+a][+bBC][+c][+tthreshold]. +Select interpolation mode for grids. You can select the type of +spline used:

    +
      +
    • b for B-spline

    • +
    • c for bicubic [Default]

    • +
    • l for bilinear

    • +
    • n for nearest-neighbor

    • +
    +

  • +
  • outcols (str or 1-D array) –

    cols[,…][,t[word]]. +Specify data columns for primary output in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +writes all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in output order (e.g., +outcols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., outcols="0:2,4" to output the +first three columns followed by the 5th column). +To write from a given column until the end of the record, leave +off stop when specifying the column range. To write trailing +text, add the column t. Append the word number to t to +write only a single word from the trailing text. Instead of +specifying columns, use outcols="n" to simply read numerical +input and skip trailing text. Note: If incols is also +used then the columns given to outcols correspond to the +order after the incols selection has taken place.

    • +
    +

  • +
  • skiprows (bool or str) –

    [cols][+a][+r]. +Suppress output for records whose z-value equals NaN [Default +outputs all records]. Optionally, supply a comma-separated list of +all columns or column ranges to consider for this NaN test [Default +only considers the third data column (i.e., cols = 2)]. Column +ranges must be given in the format start[:inc]:stop, where +inc defaults to 1 if not specified. The following modifiers are +supported:

    +
    +
      +
    • +r to reverse the suppression, i.e., only output the +records whose z-value equals NaN.

    • +
    • +a to suppress the output of the record if just one or +more of the columns equal NaN [Default skips record only +if values in all specified cols equal NaN].

    • +
    +
    +

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
Return type:
+

DataFrame | ndarray | None

+
+
Returns:
+

ret – Return type depends on outfile and output_type:

+
    +
  • None if outfile is set (output will be stored in file set by +outfile)

  • +
  • pandas.DataFrame or numpy.ndarray if outfile is not set +(depends on output_type)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a grid of @earth_relief_30m data, with a longitude range of
+>>> # -118° E to -107° E, and a latitude range of -49° N to -42° N
+>>> grid = pygmt.datasets.load_earth_relief(
+...     resolution="30m", region=[-118, -107, -49, -42]
+... )
+>>> # Load a pandas dataframe with ocean ridge points
+>>> points = pygmt.datasets.load_sample_data(name="ocean_ridge_points")
+>>> # Create a pandas dataframe from an input grid and set of points
+>>> # The output dataframe adds a column named "bathymetry"
+>>> output_dataframe = pygmt.grdtrack(
+...     points=points, grid=grid, newcolname="bathymetry"
+... )
+
+
+
+ +
+

Examples using pygmt.grdtrack

+
+

Cross-section along a transect

+
Cross-section along a transect
+
+

Sampling along tracks

+
Sampling along tracks
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.grdvolume.html b/v0.14.0/api/generated/pygmt.grdvolume.html new file mode 100644 index 00000000000..58ec08ea50f --- /dev/null +++ b/v0.14.0/api/generated/pygmt.grdvolume.html @@ -0,0 +1,363 @@ + + + + + + + + + pygmt.grdvolume — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.grdvolume

+
+
+pygmt.grdvolume(grid, output_type='pandas', outfile=None, **kwargs)[source]
+

Determine the volume between the surface of a grid and a plane.

+

Read a 2-D grid file and calculate the volume contained below the surface +and above the plane specified by the given contour (or zero if not given) +and return the contour, area, volume, and maximum mean height +(volume/area). Alternatively, a range of contours can be specified to +return the volume and area inside the contour for all contour values.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/grdvolume.html

+

Aliases:

+
    +
  • C = contour

  • +
  • R = region

  • +
+
    +
  • S = unit

  • +
+
    +
  • V = verbose

  • +
+
+
+
Parameters:
+
    +
  • grid (str or xarray.DataArray) –

    Name of the input grid file or the grid loaded as a +xarray.DataArray object.

    +

    For reading a specific grid file format or applying basic data operations, +see https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

  • +
  • output_type (Literal['pandas', 'numpy', 'file'], default: 'pandas') –

    Desired output type of the result data.

    +
      +
    • pandas will return a pandas.DataFrame object.

    • +
    • numpy will return a numpy.ndarray object.

    • +
    • file will save the result to the file specified by the outfile +parameter.

    • +
    +

  • +
  • outfile (str | None, default: None) – File name for saving the result data. Required if output_type="file". +If specified, output_type will be forced to be "file".

  • +
  • contour (str, float, or list) – cval|low/high/delta|rlow/high|rcval. +Find area, volume and mean height (volume/area) inside and above the +cval contour. Alternatively, search using all contours from low to +high in steps of delta. [Default returns area, volume and mean +height of the entire grid]. The area is measured in the plane of the +contour. Adding the r prefix computes the volume below the grid +surface and above the planes defined by low and high, or below +cval and grid’s minimum. Note that this is an outside volume +whilst the other forms compute an inside (below the surface) area +volume. Use this form to compute for example the volume of water +between two contours. If no contour is given then there is no contour +and the entire grid area, volume and the mean height is returned and +cval will be reported as 0.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
+
+
Return type:
+

DataFrame | ndarray | None

+
+
Returns:
+

ret – Return type depends on outfile and output_type:

+
    +
  • None if outfile is set (output will be stored in file set by +outfile)

  • +
  • pandas.DataFrame or numpy.ndarray if outfile is not set +(depends on output_type)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a grid of @earth_relief_30m data, with a longitude range of
+>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
+>>> grid = pygmt.datasets.load_earth_relief(
+...     resolution="30m", region=[10, 30, 15, 25]
+... )
+>>> # Create a pandas dataframe that contains the contour, area, volume,
+>>> # and maximum mean height above the plane specified by the given
+>>> # contour and below the surface; set the minimum contour z-value to
+>>> # 200, the maximum to 400, and the interval to 50.
+>>> output_dataframe = pygmt.grdvolume(
+...     grid=grid, contour=[200, 400, 50], output_type="pandas"
+... )
+>>> print(output_dataframe)
+       0             1             2           3
+0  200.0  2.323600e+12  8.523815e+14  366.836554
+1  250.0  2.275864e+12  7.371655e+14  323.905736
+2  300.0  2.166707e+12  6.258570e+14  288.851699
+3  350.0  2.019284e+12  5.207732e+14  257.899955
+4  400.0  1.870441e+12  4.236191e+14  226.480847
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.info.html b/v0.14.0/api/generated/pygmt.info.html new file mode 100644 index 00000000000..eeacb9ec11f --- /dev/null +++ b/v0.14.0/api/generated/pygmt.info.html @@ -0,0 +1,375 @@ + + + + + + + + + pygmt.info — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.info

+
+
+pygmt.info(data, *, per_column=None, spacing=None, nearest_multiple=None, verbose=None, aspatial=None, coltypes=None, incols=None, registration=None, **kwargs)[source]
+

Get information about data tables.

+

Reads from files and finds the extreme values in each of the columns +reported as min/max pairs. It recognizes NaNs and will print warnings if +the number of columns vary from record to record. As an option, it will +find the extent of the first two columns rounded up and down to the nearest +multiple of the supplied increments given by spacing. Such output will +be in a numpy.ndarray form [w, e, s, n], which can be used +directly as the region parameter for other modules (hence only dx +and dy are needed). If the per_column parameter is combined with +spacing, then the numpy.ndarray output will be rounded up/down for as +many columns as there are increments provided in spacing. A similar +parameter nearest_multiple will provide a numpy.ndarray in the form +of [zmin, zmax, dz] for makecpt.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/gmtinfo.html

+

Aliases:

+
    +
  • C = per_column

  • +
  • I = spacing

  • +
  • T = nearest_multiple

  • +
+
    +
  • V = verbose

  • +
  • a = aspatial

  • +
  • f = coltypes

  • +
+
    +
  • i = incols

  • +
  • r = registration

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in either a file name to an ASCII data table, a 1-D/2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • per_column (bool) – Report the min/max values per column in separate columns.

  • +
  • spacing (str) – [b|p|f|s]dx[/dy[/dz…]]. +Compute the min/max values of the first n columns to the nearest +multiple of the provided increments [default is 2 columns]. By default, +output results in the form [w, e, s, n], unless per_column is +set in which case we output each min and max value in separate output +columns.

  • +
  • nearest_multiple (str) – dz[+ccol]. +Report the min/max of the first (0’th) column to the nearest multiple +of dz and output this in the form [zmin, zmax, dz].

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • aspatial (bool or str) – [col=]name[,…]. +Control how aspatial data are handled during input and output. +Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#aspatial-full.

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • registration (str) – g|p. +Force gridline (g) or pixel (p) node registration +[Default is g(ridline)].

  • +
+
+
Returns:
+

output (numpy.ndarray or str) – Return type depends on whether any of the per_column, +spacing, or nearest_multiple parameters are set.

+
    +
  • numpy.ndarray if either of the above parameters are used.

  • +
  • str if none of the above parameters are used.

  • +
+

+
+
+
+ +
+

Examples using pygmt.info

+
+

Plotting datetime charts

+
Plotting datetime charts
+
+

Color points by categories

+
Color points by categories
+
+

3-D scatter plots

+
3-D scatter plots
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.load_dataarray.html b/v0.14.0/api/generated/pygmt.load_dataarray.html new file mode 100644 index 00000000000..9dd18ee2db0 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.load_dataarray.html @@ -0,0 +1,270 @@ + + + + + + + + + pygmt.load_dataarray — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.load_dataarray

+
+
+pygmt.load_dataarray(filename_or_obj, **kwargs)[source]
+

Open, load into memory, and close a DataArray from a file or file-like object +containing a single data variable.

+

This is a thin wrapper around xarray.open_dataarray. It differs +from xarray.open_dataarray in that it loads the DataArray into +memory, gets GMT specific metadata about the grid via +GMTDataArrayAccessor, closes the file, and returns the +DataArray. In contrast, xarray.open_dataarray keeps the file +handle open and lazy loads its contents. All parameters are passed directly +to xarray.open_dataarray. See that documentation for further +details.

+
+
Parameters:
+

filename_or_obj (str or pathlib.Path or file-like or DataStore) – Strings and Path objects are interpreted as a path to a netCDF file +or an OpenDAP URL and opened with python-netCDF4, unless the filename +ends with .gz, in which case the file is gunzipped and opened with +scipy.io.netcdf (only netCDF3 supported). Byte-strings or file-like +objects are opened by scipy.io.netcdf (netCDF3) or h5py (netCDF4/HDF).

+
+
Returns:
+

datarray (xarray.DataArray) – The newly created DataArray.

+
+
+
+

See also

+

xarray.open_dataarray

+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.makecpt.html b/v0.14.0/api/generated/pygmt.makecpt.html new file mode 100644 index 00000000000..b30019116eb --- /dev/null +++ b/v0.14.0/api/generated/pygmt.makecpt.html @@ -0,0 +1,439 @@ + + + + + + + + + pygmt.makecpt — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.makecpt

+
+
+pygmt.makecpt(*, transparency=None, cmap=None, background=None, color_model=None, truncate=None, output=None, reverse=None, overrule_bg=None, no_bg=None, log=None, series=None, verbose=None, categorical=None, cyclic=None, continuous=None, **kwargs)[source]
+

Make GMT color palette tables.

+

This function will help you to make static color palette tables (CPTs). +By default, the CPT will be saved as the current CPT of the session, +figure, subplot, panel, or inset depending on which level +pygmt.makecpt is called (for details on how GMT modern mode +maintains different levels of colormaps please see +https://docs.generic-mapping-tools.org/6.5/reference/features.html#gmt-modern-mode-hierarchical-levels). +You can use output to save the CPT to a file. +You define an equidistant +set of contour intervals or pass your own z-table or list, and create a new +CPT based on an existing master (dynamic) CPT. The resulting CPT can be +reversed relative to the master cpt, and can be made continuous or +discrete. For color tables beyond the standard GMT offerings, visit +cpt-city and +Scientific Colour-Maps.

+

The CPT includes three additional colors beyond the range of z-values. +These are the background color (B) assigned to values lower than the lowest +z-value, the foreground color (F) assigned to values higher than the +highest z-value, and the NaN color (N) painted wherever values are +undefined.

+

If the master CPT includes B, F, and N entries, these will be copied into +the new master file. If not, the parameters COLOR_BACKGROUND, +COLOR_FOREGROUND, and COLOR_NAN from the +gmt.conf file will be used. This +default behavior can be overruled using the parameters background, +overrule_bg or no_bg.

+

The color model (RGB, HSV or CMYK) of the palette created by +pygmt.makecpt will be the same as specified in the header of the +master CPT. When there is no COLOR_MODEL entry in the +master CPT, the COLOR_MODEL specified in the +gmt.conf file will be used.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/makecpt.html

+

Aliases:

+
    +
  • A = transparency

  • +
  • C = cmap

  • +
  • D = background

  • +
  • F = color_model

  • +
  • G = truncate

  • +
+
    +
  • H = output

  • +
  • I = reverse

  • +
  • M = overrule_bg

  • +
  • N = no_bg

  • +
  • Q = log

  • +
+
    +
  • T = series

  • +
  • V = verbose

  • +
  • W = categorical

  • +
  • Ww = cyclic

  • +
  • Z = continuous

  • +
+
+
+
Parameters:
+
    +
  • transparency (str) – Set a constant level of transparency (0-100) for all color slices. +Append +a to also affect the foreground, background, and NaN +colors [Default is no transparency, i.e., 0 (opaque)].

  • +
  • cmap (str) – Select the master color palette table (CPT) to use in the +interpolation. Full list of built-in color palette tables can be found +at https://docs.generic-mapping-tools.org/6.5/reference/cpts.html#built-in-color-palette-tables-cpt.

  • +
  • background (bool or str) – Select the back- and foreground colors to match the colors for lowest +and highest z-values in the output CPT [Default (background=True +or background="o") uses the colors specified in the master file, or +those defined by the parameters COLOR_BACKGROUND, +COLOR_FOREGROUND, and COLOR_NAN]. Use +background="i" to match the colors for the lowest and highest +values in the input (instead of the output) CPT.

  • +
  • color_model (str) – [R|r|h|c][+c[label|start[-]]]. +Force output CPT to be written with r/g/b codes, gray-scale values or +color name (R, default) or r/g/b codes only (r), or h-s-v codes +(h), or c/m/y/k codes (c). Optionally or alternatively, append ++c to write discrete palettes in categorical format. If label is +appended then we create labels for each category to be used when the +CPT is plotted. The label may be a comma-separated list of category +names (you can skip a category by not giving a name), or give +start, where we automatically build monotonically increasing +labels from start (a single letter or an integer). Additionally +append - to build ranges start-start+1 as labels instead.

  • +
  • series (list or str) – [min/max/inc[+b|l|n]|file|list]. +Define the range of the new CPT by giving the lowest and highest +z-value (and optionally an interval). If this is not given, the +existing range in the master CPT will be used intact. The values +produced defines the color slice boundaries. If +n is used it +refers to the number of such boundaries and not the number of slices. +For details on array creation, see +https://docs.generic-mapping-tools.org/6.5/makecpt.html#generate-1d-array.

  • +
  • truncate (list or str) – zlow/zhigh. +Truncate the incoming CPT so that the lowest and highest z-levels are +to zlow and zhigh. If one of these equal NaN then we leave that +end of the CPT alone. The truncation takes place before any resampling. +See also https://docs.generic-mapping-tools.org/6.5/reference/features.html#manipulating-cpts.

  • +
  • output (str) – Optional. The file name with extension .cpt to store the generated CPT +file. If not given or False [Default], saves the CPT as the current +CPT of the session, figure, subplot, panel, or inset depending on which +level pygmt.makecpt is called.

  • +
  • reverse (str) – Set this to True or c [Default] to reverse the sense of color +progression in the master CPT. Set this to z to reverse the sign +of z-values in the color table. Note that this change of z-direction +happens before truncate and series values are used so the +latter must be compatible with the changed z-range. See also +https://docs.generic-mapping-tools.org/6.5/reference/features.html#manipulating-cpts.

  • +
  • overrule_bg (str) – Overrule background, foreground, and NaN colors specified in the master +CPT with the values of the parameters COLOR_BACKGROUND, +COLOR_FOREGROUND, and COLOR_NAN specified in +the gmt.conf file. When combined with +background, only COLOR_NAN is considered.

  • +
  • no_bg (bool) – Do not write out the background, foreground, and NaN-color fields +[Default will write them, i.e. no_bg=False].

  • +
  • log (bool) – For logarithmic interpolation scheme with input given as logarithms. +Expects input z-values provided via series to be log10(z), +assigns colors, and writes out z.

  • +
  • continuous (bool) – Force a continuous CPT when building from a list of colors and a list +of z-values [Default is None, i.e. discrete values].

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • categorical (bool) – Do not interpolate the input color table but pick the output colors +starting at the beginning of the color table, until colors for all +intervals are assigned. This is particularly useful in combination with +a categorical color table, like cmap="categorical".

  • +
  • cyclic (bool) – Produce a wrapped (cyclic) color table that endlessly repeats its +range. Note that cyclic=True cannot be set together with +categorical=True.

  • +
+
+
+
+ +
+

Examples using pygmt.makecpt

+
+

Plotting data points

+
Plotting data points
+
+

Draping a dataset on top of a topographic surface

+
Draping a dataset on top of a topographic surface
+
+

Interactive data visualization using Panel

+
Interactive data visualization using Panel
+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+

Choropleth map

+
Choropleth map
+
+

Line colors with a custom CPT

+
Line colors with a custom CPT
+
+

Color points by categories

+
Color points by categories
+
+

Vertical or horizontal bars

+
Vertical or horizontal bars
+
+

Calculating grid gradient and radiance

+
Calculating grid gradient and radiance
+
+

Calculating grid gradient with custom azimuth and normalize parameters

+
Calculating grid gradient with custom azimuth and normalize parameters
+
+

Create ‘wet-dry’ mask grid

+
Create 'wet-dry' mask grid
+
+

3-D scatter plots

+
3-D scatter plots
+
+

Ternary diagram

+
Ternary diagram
+
+

Colorbar

+
Colorbar
+
+

Multiple colormaps

+
Multiple colormaps
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.nearneighbor.html b/v0.14.0/api/generated/pygmt.nearneighbor.html new file mode 100644 index 00000000000..4b594b311b2 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.nearneighbor.html @@ -0,0 +1,586 @@ + + + + + + + + + pygmt.nearneighbor — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.nearneighbor

+
+
+pygmt.nearneighbor(data=None, x=None, y=None, z=None, outgrid=None, **kwargs)[source]
+

Grid table data using a “Nearest neighbor” algorithm.

+

nearneighbor reads arbitrarily located (x, y, z[, w]) +triplets [quadruplets] and uses a nearest neighbor algorithm to assign a +weighted average value to each node that has one or more data points within +a search radius centered on the node with adequate coverage across a subset +of the chosen sectors. The node value is computed as a weighted mean of the +nearest point from each sector inside the search radius. The weighting +function and the averaging used is given by:

+
+\[w(r_i) = \frac{w_i}{1 + d(r_i) ^ 2}, +\quad d(r) = \frac {3r}{R}, +\quad \bar{z} = \frac{\sum_i^n w(r_i) z_i}{\sum_i^n w(r_i)}\]
+

where \(n\) is the number of data points that satisfy the selection +criteria and \(r_i\) is the distance from the node to the i’th data +point. If no data weights are supplied then \(w_i = 1\).

+
+https://docs.generic-mapping-tools.org/dev/_images/GMT_nearneighbor.png +
+

Search geometry includes the search radius (R) which limits the points +considered and the number of sectors (here 4), which restricts how +points inside the search radius contribute to the value at the node. +Only the closest point in each sector (red circles) contribute to the +weighted estimate.

+
+
+

Takes a matrix, (x, y, z) triplets, or a file name as input.

+

Must provide either data or x, y, and z.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/nearneighbor.html

+

Aliases:

+
    +
  • E = empty

  • +
  • I = spacing

  • +
  • N = sectors

  • +
  • R = region

  • +
  • S = search_radius

  • +
  • V = verbose

  • +
+
    +
  • a = aspatial

  • +
  • b = binary

  • +
  • d = nodata

  • +
  • e = find

  • +
  • f = coltypes

  • +
+
    +
  • g = gap

  • +
  • h = header

  • +
  • i = incols

  • +
  • r = registration

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in (x, y, z) or (longitude, latitude, elevation) values by +providing a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • x/y/z (1-D arrays) – Arrays of x and y coordinates and values z of the data points.

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • search_radius (str) – Set the search radius that determines which data points are considered +close to a node.

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • empty (str) – Optional. Set the value assigned to empty nodes. Defaults to NaN.

  • +
  • sectors (str) – sectors[+mmin_sectors]|n. +Optional. The circular search area centered on each node is divided +into sectors sectors. Average values will only be computed if there +is at least one value inside each of at least min_sectors of the +sectors for a given node. Nodes that fail this test are assigned the +value NaN (but see empty). If +m is omitted then min_sectors +is set to be at least 50% of sectors (i.e., rounded up to next +integer) [Default is a quadrant search with 100% coverage, i.e., +sectors = min_sectors = 4]. Note that only the nearest value per +sector enters into the averaging; the more distant points are ignored. +Alternatively, use sectors="n" to call GDAL’s nearest neighbor +algorithm instead.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • aspatial (bool or str) – [col=]name[,…]. +Control how aspatial data are handled during input and output. +Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#aspatial-full.

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • gap (str or list) –

    x|y|z|d|X|Y|Dgap[u][+a][+ccol][+n|p]. +Examine the spacing between consecutive data points in order to +impose breaks in the line. To specify multiple criteria, provide +a list with each item containing a string describing one set of +criteria.

    +
    +
      +
    • x|X - define a gap when there is a large enough +change in the x coordinates (upper case to use projected +coordinates).

    • +
    • y|Y - define a gap when there is a large enough +change in the y coordinates (upper case to use projected +coordinates).

    • +
    • d|D - define a gap when there is a large enough +distance between coordinates (upper case to use projected +coordinates).

    • +
    • z - define a gap when there is a large enough change in +the z data. Use +ccol to change the z data column +[Default col is 2 (i.e., 3rd column)].

    • +
    +
    +

    A unit u may be appended to the specified gap:

    +
    +
      +
    • For geographic data (x|y|d), the unit may +be arc- d(egrees), m(inutes), and s(econds) +, or (m)e(ters), f(eet), k(ilometers), +M(iles), or n(autical miles) [Default is +(m)e(ters)].

    • +
    • For projected data (X|Y|D), the unit may be +i(nches), c(entimeters), or p(oints).

    • +
    +
    +

    Append modifier +a to specify that all the criteria must be +met [default imposes breaks if any one criterion is met].

    +

    One of the following modifiers can be appended:

    +
    +
      +
    • +n - specify that the previous value minus the current +column value must exceed gap for a break to be imposed.

    • +
    • +p - specify that the current value minus the previous +value must exceed gap for a break to be imposed.

    • +
    +
    +

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • registration (str) – g|p. +Force gridline (g) or pixel (p) node registration +[Default is g(ridline)].

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray: if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in the file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a sample dataset of bathymetric x, y, and z values
+>>> data = pygmt.datasets.load_sample_data(name="bathymetry")
+>>> # Create a new grid with 5 arc-minutes spacing in the designated region
+>>> # Set search_radius to only take points within 10 arc-minutes of a node
+>>> output = pygmt.nearneighbor(
+...     data=data,
+...     spacing="5m",
+...     region=[245, 255, 20, 30],
+...     search_radius="10m",
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.project.html b/v0.14.0/api/generated/pygmt.project.html new file mode 100644 index 00000000000..a1676f4f9a8 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.project.html @@ -0,0 +1,461 @@ + + + + + + + + + pygmt.project — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.project

+
+
+pygmt.project(data=None, x=None, y=None, z=None, output_type='pandas', outfile=None, **kwargs)[source]
+

Project data onto lines or great circles, or generate tracks.

+

Project reads arbitrary \((x, y [, z])\) data and returns any +combination of \((x, y, z, p, q, r, s)\), where \((p, q)\) are the +coordinates in the projection, \((r, s)\) is the position in the +\((x, y)\) coordinate system of the point on the profile (\(q = 0\) +path) closest to \((x, y)\), and \(z\) is all remaining columns in +the input (beyond the required \(x\) and \(y\) columns).

+

Alternatively, project may be used to generate +\((r, s, p)\) triplets at equal increments along a profile using the +generate parameter. In this case, the value of data is ignored +(you can use, e.g., data=None).

+

Projections are defined in any (but only) one of three ways:

+
    +
  1. By a center and an azimuth in degrees clockwise from North.

  2. +
  3. By a center and endpoint of the projection path.

  4. +
  5. By a center and a pole position.

  6. +
+

To spherically project data along a great circle path, an oblique +coordinate system is created which has its equator along that path, and the +zero meridian through the Center. Then the oblique longitude (\(p\)) +corresponds to the distance from the Center along the great circle, and the +oblique latitude (\(q\)) corresponds to the distance perpendicular to +the great circle path. When moving in the increasing (\(p\)) direction, +(toward B or in the azimuth direction), the positive (\(q\)) direction +is to your left. If a Pole has been specified, then the positive +(\(q\)) direction is toward the pole.

+

To specify an oblique projection, use the pole parameter to set +the pole. Then the equator of the projection is already determined and the +center parameter is used to locate the \(p = 0\) meridian. The +center cx/cy will be taken as a point through which the \(p = 0\) +meridian passes. If you do not care to choose a particular point, use the +South pole (cx = 0, cy = -90).

+

Data can be selectively windowed by using the length and width +parameters. If width is used, the projection width is set to use only +data with \(w_{min} < q < w_{max}\). If length is set, then +the length is set to use only those data with +\(l_{min} < p < l_{max}\). If the endpoint parameter +has been used to define the projection, then length="w" may be used to +window the length of the projection to exactly the span from O to B.

+

Flat Earth (Cartesian) coordinate transformations can also be made. Set +flat_earth=True and remember that azimuth is clockwise from North (the +y axis), NOT the usual cartesian theta, which is counterclockwise from the +x axis. azimuth = 90 - theta.

+

No assumptions are made regarding the units for +\(x, y, r, s, p, q, dist, l_{min}, l_{max}, w_{min}, w_{max}\). +If unit is selected, map units are assumed and \(x, y, r, s\) must +be in degrees and +\(p, q, dist, l_{min}, l_{max}, w_{min}, w_{max}\) +will be in km.

+

Calculations of specific great-circle and geodesic distances or for +back-azimuths or azimuths are better done using https://docs.generic-mapping-tools.org/6.5/mapproject as +project is strictly spherical.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/project.html

+

Aliases:

+
    +
  • A = azimuth

  • +
  • C = center

  • +
  • E = endpoint

  • +
  • F = convention

  • +
  • G = generate

  • +
+
    +
  • L = length

  • +
  • N = flat_earth

  • +
  • Q = unit

  • +
  • S = sort

  • +
  • T = pole

  • +
+
    +
  • V = verbose

  • +
  • W = width

  • +
  • Z = ellipse

  • +
  • f = coltypes

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in (x, y, z) or (longitude, latitude, elevation) values by +providing a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • output_type (Literal['pandas', 'numpy', 'file'], default: 'pandas') –

    Desired output type of the result data.

    +
      +
    • pandas will return a pandas.DataFrame object.

    • +
    • numpy will return a numpy.ndarray object.

    • +
    • file will save the result to the file specified by the outfile +parameter.

    • +
    +

  • +
  • outfile (str | None, default: None) – File name for saving the result data. Required if output_type="file". +If specified, output_type will be forced to be "file".

  • +
  • center (str or list) – cx/cy. +Set the origin of the projection, in Definition 1 or 2. If +Definition 3 is used, then cx/cy are the coordinates of a +point through which the oblique zero meridian (\(p = 0\)) should +pass. The cx/cy is not required to be 90 degrees from the pole.

  • +
  • azimuth (float or str) – Define the azimuth of the projection (Definition 1).

  • +
  • endpoint (str or list) – bx/by. +Define the end point of the projection path (Definition 2).

  • +
  • convention (str) – Specify the desired output using any combination of xyzpqrs, in +any order [Default is xypqrsz]. Do not space between the letters. +Use lower case. The output will be columns of values corresponding to +your convention. The z flag is special and refers to all +numerical columns beyond the leading x and y in your input +record. The z flag also includes any trailing text (which is +placed at the end of the record regardless of the order of z in +convention). Note: If generate is True, then the output +order is hardwired to be rsp and convention is not allowed.

  • +
  • generate (str) – dist [/colat][+c|h]. +Create \((r, s, p)\) output data every dist units of \(p\) +(See unit parameter). Alternatively, append /colat for a small +circle instead [Default is a colatitude of 90, i.e., a great circle]. +If setting a pole with pole and you want the small circle to go +through cx/cy, append +c to compute the required colatitude. +Use center and endpoint to generate a circle that goes +through the center and end point. Note, in this case the center and +end point cannot be farther apart than \(2|\mbox{colat}|\). +Finally, if you append +h then we will report the position of +the pole as part of the segment header [Default is no header]. +Note: No input is read and the value of data, x, y, +and z is ignored if generate is used.

  • +
  • length (str or list) – [w|l_min/l_max]. +Project only those data whose p coordinate is +within \(l_{min} < p < l_{max}\). If endpoint has been set, +then you may alternatively use w to stay within the distance from +center to endpoint.

  • +
  • flat_earth (bool) – Make a Cartesian coordinate transformation in the plane. +[Default is False; plane created with spherical trigonometry.]

  • +
  • unit (bool) – Set units for \(x, y, r, s\) to degrees and +\(p, q, dist, l_{min}, l_{max}, w_{min}, w_{max}\) to km. +[Default is False; all arguments use the same units]

  • +
  • sort (bool) – Sort the output into increasing \(p\) order. Useful when projecting +random data into a sequential profile.

  • +
  • pole (str or list) – px/py. +Set the position of the rotation pole of the projection. +(Definition 3).

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • width (str or list) – w_min/w_max. +Project only those data whose \(q\) coordinate is +within \(w_{min} < q < w_{max}\).

  • +
  • ellipse (str) – major/minor/azimuth [+e|n]. +Used in conjunction with center (sets its center) and generate +(sets the distance increment) to create the coordinates of an ellipse +with major and minor axes given in km (unless flat_earth is +given for a Cartesian ellipse) and the azimuth of the major axis in +degrees. Append +e to adjust the increment set via generate so +that the the ellipse has equal distance increments [Default uses the +given increment and closes the ellipse]. Instead, append +n to set +a specific number of unique equidistant data via generate. For +degenerate ellipses you can just supply a single diameter instead. A +geographic diameter may be specified in any desired unit other than km +by appending the unit (e.g., 3-D for degrees) [Default is km]; +the increment is assumed to be in the same unit. Note: +For the Cartesian ellipse (which requires flat_earth), the +direction is counter-clockwise from the horizontal instead of an +azimuth.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
+
+
Return type:
+

DataFrame | ndarray | None

+
+
Returns:
+

ret – Return type depends on outfile and output_type:

+
    +
  • None if outfile is set (output will be stored in file set by +outfile)

  • +
  • pandas.DataFrame or numpy.ndarray if outfile is not set +(depends on output_type)

  • +
+

+
+
+
+ +
+

Examples using pygmt.project

+
+

Generate points along great circles

+
Generate points along great circles
+
+

Cross-section along a transect

+
Cross-section along a transect
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.select.html b/v0.14.0/api/generated/pygmt.select.html new file mode 100644 index 00000000000..0568a453d02 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.select.html @@ -0,0 +1,663 @@ + + + + + + + + + pygmt.select — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.select

+
+
+pygmt.select(data=None, output_type='pandas', outfile=None, **kwargs)[source]
+

Select data table subsets based on multiple spatial criteria.

+

This is a filter that reads (x, y) or (longitude, latitude) positions from +the first 2 columns of data and uses a combination of 1-7 criteria to +pass or reject the records. Records can be selected based on whether or not +they:

+
    +
  1. are inside a rectangular region (region [and projection])

  2. +
  3. are within dist km of any point in pointfile (dist2pt)

  4. +
  5. are within dist km of any line in linefile (dist2line)

  6. +
  7. are inside one of the polygons in polygonfile (polygon)

  8. +
  9. are inside geographical features (based on coastlines)

  10. +
  11. have z-values within a given range

  12. +
  13. are inside bins of a grid mask whose nodes are non-zero

  14. +
+

The sense of the tests can be reversed for each of these 7 criteria by +using the reverse parameter.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/gmtselect.html

+

Aliases:

+
    +
  • A = area_thresh

  • +
  • C = dist2pt

  • +
  • D = resolution

  • +
  • F = polygon

  • +
  • G = gridmask

  • +
  • I = reverse

  • +
  • J = projection

  • +
  • L = dist2line

  • +
+
    +
  • N = mask

  • +
  • R = region

  • +
  • V = verbose

  • +
  • Z = z_subregion

  • +
  • b = binary

  • +
  • d = nodata

  • +
  • e = find

  • +
+
    +
  • f = coltypes

  • +
  • g = gap

  • +
  • h = header

  • +
  • i = incols

  • +
  • o = outcols

  • +
  • s = skiprows

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in either a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • output_type (Literal['pandas', 'numpy', 'file'], default: 'pandas') –

    Desired output type of the result data.

    +
      +
    • pandas will return a pandas.DataFrame object.

    • +
    • numpy will return a numpy.ndarray object.

    • +
    • file will save the result to the file specified by the outfile +parameter.

    • +
    +

  • +
  • outfile (str | None, default: None) – File name for saving the result data. Required if output_type="file". +If specified, output_type will be forced to be "file".

  • +
  • area_thresh (float or str) – min_area[/min_level/max_level][+a[g|i][s|S]][+l|r][+ppercent]. +Features with an area smaller than min_area in km2 or of +hierarchical level that is lower than min_level or higher than +max_level will not be plotted [Default is "0/0/4" (all +features)].

  • +
  • dist2pt (str) – pointfile|lon/lat+ddist. +Pass all records whose locations are within dist of any of the +points in the ASCII file pointfile. If dist is zero, the 3rd +column of pointfile must have each point’s individual radius of +influence. If you only have a single point, you can specify +lon/lat instead of pointfile. Distances are Cartesian and in +user units. Alternatively, if region and projection are used, +the geographic coordinates are projected to map coordinates (in +centimeters, inches, meters, or points, as determined by +PROJ_LENGTH_UNIT) before Cartesian distances are compared +to dist.

  • +
  • dist2line (str) – linefile+ddist[+p]. +Pass all records whose locations are within dist of any of the line +segments in the ASCII multiple-segment file +linefile. If dist is zero, we will scan each sub-header in +linefile for an embedded -Ddist setting that sets each +line’s individual distance value. Distances are Cartesian and in +user units. Alternatively, if region and projection are used, +the geographic coordinates are projected to map coordinates (in +centimeters, inches, meters, or points, as determined by +PROJ_LENGTH_UNIT) before Cartesian distances are +compared to dist. Append +p to ensure only points whose +orthogonal projections onto the nearest line-segment fall within +the segment’s endpoints [Default considers points “beyond” the +line’s endpoints].

  • +
  • polygon (str) – polygonfile. +Pass all records whose locations are within one of the closed +polygons in the ASCII multiple-segment file +polygonfile. For spherical polygons (lon, lat), make sure no +consecutive points are separated by 180 degrees or more in longitude.

  • +
  • resolution (str) – resolution[+f]. +Ignored unless mask is set. Selects the resolution of the coastline +data set to use ((f)ull, (h)igh, (i)ntermediate, (l)ow, +or (c)rude). The resolution drops off by ~80% between data sets. +[Default is l]. Append (+f) to automatically select a lower +resolution should the one requested not be available [Default is abort +if not found]. Note that because the coastlines differ in details +it is not guaranteed that a point will remain inside [or outside] when +a different resolution is selected.

  • +
  • gridmask (str) – Pass all locations that are inside the valid data area of the grid +gridmask. Nodes that are outside are either NaN or zero.

  • +
  • reverse (str) –

    [cflrsz]. +Reverse the sense of the test for each of the criteria specified:

    +
      +
    • c select records NOT inside any point’s circle of influence.

    • +
    • f select records NOT inside any of the polygons.

    • +
    • g will pass records inside the cells with z equal zero of the +grid mask in gridmask.

    • +
    • l select records NOT within the specified distance of any line.

    • +
    • r select records NOT inside the specified rectangular region.

    • +
    • s select records NOT considered inside as specified by mask +(and area_thresh, resolution).

    • +
    • z select records NOT within the range specified by +z_subregion.

    • +
    +

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • mask (str or list) –

    Pass all records whose location is inside specified geographical +features. Specify if records should be skipped (s) or kept (k) using +1 of 2 formats:

    +
      +
    • wet/dry.

    • +
    • ocean/land/lake/island/pond.

    • +
    +

    [Default is s/k/s/k/s (i.e., s/k), which passes all points on dry +land].

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • z_subregion (str or list) – min[/max][+a][+ccol][+i]. +Pass all records whose 3rd column (z; col = 2) lies within the +given range or is NaN (use skiprows to skip NaN records). If max +is omitted then we test if z equals min instead. This means +equality within 5 ULPs (unit of least precision; +https://en.wikipedia.org/wiki/Unit_in_the_last_place). Input file must +have at least three columns. To indicate no limit on min or max, +specify a hyphen (-). If your 3rd column is absolute time then remember +to supply coltypes="2T". To specify another column, append ++ccol, and to specify several tests pass a list of arguments +as you have columns to test. +Note: When more than one z_subregion argument is given then the +reverse="z" cannot be used. In the case of multiple tests +you may use these modifiers as well: +a passes any record that +passes at least one of your z tests [Default is all tests must pass], +and +i reverses the tests to pass record with z value NOT in the +given range. Finally, if +c is not used then it is automatically +incremented for each new z_subregion argument, starting with 2.

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • gap (str or list) –

    x|y|z|d|X|Y|Dgap[u][+a][+ccol][+n|p]. +Examine the spacing between consecutive data points in order to +impose breaks in the line. To specify multiple criteria, provide +a list with each item containing a string describing one set of +criteria.

    +
    +
      +
    • x|X - define a gap when there is a large enough +change in the x coordinates (upper case to use projected +coordinates).

    • +
    • y|Y - define a gap when there is a large enough +change in the y coordinates (upper case to use projected +coordinates).

    • +
    • d|D - define a gap when there is a large enough +distance between coordinates (upper case to use projected +coordinates).

    • +
    • z - define a gap when there is a large enough change in +the z data. Use +ccol to change the z data column +[Default col is 2 (i.e., 3rd column)].

    • +
    +
    +

    A unit u may be appended to the specified gap:

    +
    +
      +
    • For geographic data (x|y|d), the unit may +be arc- d(egrees), m(inutes), and s(econds) +, or (m)e(ters), f(eet), k(ilometers), +M(iles), or n(autical miles) [Default is +(m)e(ters)].

    • +
    • For projected data (X|Y|D), the unit may be +i(nches), c(entimeters), or p(oints).

    • +
    +
    +

    Append modifier +a to specify that all the criteria must be +met [default imposes breaks if any one criterion is met].

    +

    One of the following modifiers can be appended:

    +
    +
      +
    • +n - specify that the previous value minus the current +column value must exceed gap for a break to be imposed.

    • +
    • +p - specify that the current value minus the previous +value must exceed gap for a break to be imposed.

    • +
    +
    +

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • outcols (str or 1-D array) –

    cols[,…][,t[word]]. +Specify data columns for primary output in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +writes all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in output order (e.g., +outcols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., outcols="0:2,4" to output the +first three columns followed by the 5th column). +To write from a given column until the end of the record, leave +off stop when specifying the column range. To write trailing +text, add the column t. Append the word number to t to +write only a single word from the trailing text. Instead of +specifying columns, use outcols="n" to simply read numerical +input and skip trailing text. Note: If incols is also +used then the columns given to outcols correspond to the +order after the incols selection has taken place.

    • +
    +

  • +
  • skiprows (bool or str) –

    [cols][+a][+r]. +Suppress output for records whose z-value equals NaN [Default +outputs all records]. Optionally, supply a comma-separated list of +all columns or column ranges to consider for this NaN test [Default +only considers the third data column (i.e., cols = 2)]. Column +ranges must be given in the format start[:inc]:stop, where +inc defaults to 1 if not specified. The following modifiers are +supported:

    +
    +
      +
    • +r to reverse the suppression, i.e., only output the +records whose z-value equals NaN.

    • +
    • +a to suppress the output of the record if just one or +more of the columns equal NaN [Default skips record only +if values in all specified cols equal NaN].

    • +
    +
    +

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
Return type:
+

DataFrame | ndarray | None

+
+
Returns:
+

ret – Return type depends on outfile and output_type:

+
    +
  • None if outfile is set (output will be stored in file set by +outfile)

  • +
  • pandas.DataFrame or numpy.ndarray if outfile is not set +(depends on output_type)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a table of ship observations of bathymetry off Baja California
+>>> ship_data = pygmt.datasets.load_sample_data(name="bathymetry")
+>>> # Only return the data points that lie within the region between
+>>> # longitudes 246 and 247 and latitudes 20 and 21
+>>> out = pygmt.select(data=ship_data, region=[246, 247, 20, 21])
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.set_display.html b/v0.14.0/api/generated/pygmt.set_display.html new file mode 100644 index 00000000000..6dfb2da3a45 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.set_display.html @@ -0,0 +1,285 @@ + + + + + + + + + pygmt.set_display — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.set_display

+
+
+pygmt.set_display(method=None)[source]
+

Set the display method when calling pygmt.Figure.show.

+
+
Parameters:
+

method (Literal['external', 'notebook', 'none', None], default: None) –

The method to display an image preview. Choose from:

+
    +
  • "external": External PDF preview using the default PDF viewer

  • +
  • "notebook": Inline PNG preview in the current notebook

  • +
  • "none": Disable image preview

  • +
  • None: Reset to the default display method, which is either "external" +in Python consoles or "notebook" in Jupyter notebooks.

  • +
+

+
+
+

Examples

+

Let’s assume that you’re using a Jupyter Notebook:

+
>>> import pygmt
+>>> fig = pygmt.Figure()
+>>> fig.basemap(region=[0, 10, 0, 10], projection="X10c/5c", frame=True)
+>>> fig.show()  # Will display a PNG image in the current notebook
+>>>
+>>> # Set the display method to "external"
+>>> pygmt.set_display(method="external")  
+>>> fig.show()  # Will display a PDF image using the default PDF viewer
+>>>
+>>> # Set the display method to "none"
+>>> pygmt.set_display(method="none")
+>>> fig.show()  # Will not show any image
+>>>
+>>> # Reset to the default display method
+>>> pygmt.set_display(method=None)
+>>> fig.show()  # Again, will show a PNG image in the current notebook
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.show_versions.html b/v0.14.0/api/generated/pygmt.show_versions.html new file mode 100644 index 00000000000..52f8d6d173d --- /dev/null +++ b/v0.14.0/api/generated/pygmt.show_versions.html @@ -0,0 +1,255 @@ + + + + + + + + + pygmt.show_versions — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.show_versions

+
+
+pygmt.show_versions(file=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)[source]
+

Print various dependency versions which are useful when submitting bug reports.

+

This includes information about:

+
    +
  • PyGMT itself

  • +
  • System information (Python version, Operating System)

  • +
  • Core dependency versions (NumPy, pandas, Xarray, etc)

  • +
  • GMT library information

  • +
+

It also warns users if the installed Ghostscript version has serious bugs or is +incompatible with the installed GMT version.

+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.sph2grd.html b/v0.14.0/api/generated/pygmt.sph2grd.html new file mode 100644 index 00000000000..362dfc143ce --- /dev/null +++ b/v0.14.0/api/generated/pygmt.sph2grd.html @@ -0,0 +1,456 @@ + + + + + + + + + pygmt.sph2grd — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.sph2grd

+
+
+pygmt.sph2grd(data, outgrid=None, **kwargs)[source]
+

Create spherical grid files in tension of data.

+

Reads a spherical harmonics coefficient table with records of L, M, +C[L,M], S[L,M] and evaluates the spherical harmonic model on the +specified grid.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/sph2grd.html

+

Aliases:

+
    +
  • I = spacing

  • +
  • R = region

  • +
  • V = verbose

  • +
+
    +
  • b = binary

  • +
  • h = header

  • +
  • i = incols

  • +
+
    +
  • r = registration

  • +
  • x = cores

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in data with L, M, C[L,M], S[L,M] values by +providing a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • registration (str) – g|p. +Force gridline (g) or pixel (p) node registration +[Default is g(ridline)].

  • +
  • cores (bool or int) – [[-]n]. +Limit the number of cores to be used in any OpenMP-enabled +multi-threaded algorithms. By default we try to use all available +cores. Set a number n to only use n cores (if too large it will +be truncated to the maximum cores available). Finally, give a +negative number -n to select (all - n) cores (or at least 1 if +n equals or exceeds all).

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Create a new grid from the remote file "EGM96_to_36.txt",
+>>> # set the grid spacing to 1 arc-degree, and the region to global ("g")
+>>> new_grid = pygmt.sph2grd(data="@EGM96_to_36.txt", spacing=1, region="g")
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.sphdistance.html b/v0.14.0/api/generated/pygmt.sphdistance.html new file mode 100644 index 00000000000..f3b10bb541e --- /dev/null +++ b/v0.14.0/api/generated/pygmt.sphdistance.html @@ -0,0 +1,398 @@ + + + + + + + + + pygmt.sphdistance — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.sphdistance

+
+
+pygmt.sphdistance(data=None, x=None, y=None, outgrid=None, **kwargs)[source]
+

Create Voronoi distance, node, or natural nearest-neighbor grid on a sphere.

+

Reads a table containing lon, lat columns and performs +the construction of Voronoi polygons. These polygons are +then processed to calculate the nearest distance to each +node of the lattice and written to the specified grid.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/sphdistance.html

+

Aliases:

+
    +
  • C = single_form

  • +
  • D = duplicate

  • +
  • E = quantity

  • +
+
    +
  • I = spacing

  • +
  • L = unit

  • +
  • N = node_table

  • +
+
    +
  • Q = voronoi

  • +
  • R = region

  • +
  • V = verbose

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in (x, y) or (longitude, latitude) values by +providing a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • x/y (1-D arrays) – Arrays of x and y coordinates.

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • single_form (bool) – For large data sets you can save some memory (at the expense of more +processing) by only storing one form of location coordinates +(geographic or Cartesian 3-D vectors) at any given time, translating +from one form to the other when necessary [Default keeps both arrays +in memory]. Not applicable with voronoi.

  • +
  • duplicate (bool) – Used to skip duplicate points since the algorithm cannot handle them. +[Default assumes there are no duplicates].

  • +
  • quantity (str) –

    d|n|z[dist]. +Specify the quantity that should be assigned to the grid nodes [Default +is d]:

    +
      +
    • d - compute distances to the nearest data point

    • +
    • n - assign the ID numbers of the Voronoi polygons that each +grid node is inside

    • +
    • z - assign all nodes inside the polygon the z-value of the center +node for a natural nearest-neighbor grid.

    • +
    +

    Optionally, append the resampling interval along Voronoi arcs in +spherical degrees.

    +

  • +
  • unit (str) – Specify the unit used for distance calculations. Choose among d +(spherical degrees), e (meters), f (feet), k (kilometers), +M (miles), n (nautical miles), or u (survey feet).

  • +
  • node_table (str) – Read the information pertaining to each Voronoi +polygon (the unique node lon, lat and polygon area) from a separate +file [Default acquires this information from the ASCII segment +headers of the output file]. Required if binary input via voronoi +is used.

  • +
  • voronoi (str) – Append the name of a file with pre-calculated Voronoi polygons +[Default performs the Voronoi construction on input data].

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import numpy as np
+>>> import pygmt
+>>> # Create an array of longitude/latitude coordinates
+>>> coords_list = [[85.5, 22.3], [82.3, 22.6], [85.8, 22.4], [86.5, 23.3]]
+>>> coords_array = np.array(coords_list)
+>>> # Perform a calculation of the distance to
+>>> # each point from Voronoi polygons
+>>> grid = pygmt.sphdistance(
+...     data=coords_array, spacing=[1, 2], region=[82, 87, 22, 24]
+... )
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.sphinterpolate.html b/v0.14.0/api/generated/pygmt.sphinterpolate.html new file mode 100644 index 00000000000..48d16ad7202 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.sphinterpolate.html @@ -0,0 +1,358 @@ + + + + + + + + + pygmt.sphinterpolate — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.sphinterpolate

+
+
+pygmt.sphinterpolate(data, outgrid=None, **kwargs)[source]
+

Create spherical grid files in tension of data.

+

Reads a table containing lon, lat, z columns and performs a Delaunay +triangulation to set up a spherical interpolation in tension. Several +options may be used to affect the outcome, such as choosing local versus +global gradient estimation or optimize the tension selection to satisfy one +of four criteria.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/sphinterpolate.html

+

Aliases:

+
    +
  • I = spacing

  • +
+
    +
  • R = region

  • +
+
    +
  • V = verbose

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in (x, y, z) or (longitude, latitude, elevation) values by +providing a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a table of Mars with longitude/latitude/radius columns
+>>> mars_shape = pygmt.datasets.load_sample_data(name="mars_shape")
+>>> # Perform Delaunay triangulation on the table data
+>>> # to produce a grid with a 1 arc-degree spacing
+>>> grid = pygmt.sphinterpolate(data=mars_shape, spacing=1, region="g")
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.surface.html b/v0.14.0/api/generated/pygmt.surface.html new file mode 100644 index 00000000000..b66754dc676 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.surface.html @@ -0,0 +1,557 @@ + + + + + + + + + pygmt.surface — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.surface

+
+
+pygmt.surface(data=None, x=None, y=None, z=None, outgrid=None, **kwargs)[source]
+

Grid table data using adjustable tension continuous curvature splines.

+

Surface reads randomly-spaced (x, y, z) triplets and produces gridded +values z(x,y) by solving:

+
+\[(1 - t)\nabla^2(z)+t\nabla(z) = 0\]
+

where \(t\) is a tension factor between 0 and 1, and \(\nabla\) +indicates the Laplacian operator. Here, \(t = 0\) gives the +“minimum curvature” solution. Minimum curvature can cause undesired +oscillations and false local maxima or minima (see Smith and Wessel, +1990), and you may wish to use \(t > 0\) to suppress these effects. +Experience suggests \(t \sim 0.25\) usually looks good for potential +field data and \(t\) should be larger (\(t \sim 0.35\)) for steep +topography data. \(t = 1\) gives a harmonic surface (no maxima or +minima are possible except at control data points). It is recommended that +the user preprocess the data with pygmt.blockmean, +pygmt.blockmedian, or pygmt.blockmode to avoid spatial +aliasing and eliminate redundant data. You may impose lower and/or upper +bounds on the solution. These may be entered in the form of a fixed value, +a grid with values, or simply be the minimum/maximum input data values. +Natural boundary conditions are applied at the edges, except for +geographic data with 360-degree range where we apply periodic boundary +conditions in the longitude direction.

+

Takes a matrix, (x, y, z) triplets, or a file name as input.

+

Must provide either data or x, y, and z.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/surface.html

+

Aliases:

+
    +
  • C = convergence

  • +
  • I = spacing

  • +
  • Ll = lower

  • +
  • Lu = upper

  • +
  • M = maxradius

  • +
  • R = region

  • +
+
    +
  • T = tension

  • +
  • V = verbose

  • +
  • a = aspatial

  • +
  • b = binary

  • +
  • d = nodata

  • +
  • e = find

  • +
+
    +
  • f = coltypes

  • +
  • h = header

  • +
  • i = incols

  • +
  • r = registration

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in (x, y, z) or (longitude, latitude, elevation) values by +providing a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • x/y/z (1-D arrays) – Arrays of x and y coordinates and values z of the data points.

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • convergence (float) – Optional. Convergence limit. Iteration is assumed to have converged +when the maximum absolute change in any grid value is less than +convergence. (Units same as data z units). Alternatively, +give limit in percentage of root-mean-square (rms) deviation by +appending %. [Default is scaled to \(10^{-4}\) of the rms +deviation of the data from a best-fit (least-squares) plane.] +This is the final convergence limit at the desired grid spacing; +for intermediate (coarser) grids the effective convergence limit is +divided by the grid spacing multiplier.

  • +
  • maxradius (float or str) – Optional. After solving for the surface, apply a mask so that nodes +farther than maxradius away from a data constraint are set to NaN +[Default is no masking]. Append a distance unit (see +Units) if needed. One can also +select the nodes to mask by using the n_cellsc form. Here +n_cells means the number of cells around the node is controlled +by a data point. As an example "0c" means that only the cell +where the point lies is filled, "1c" keeps one cell beyond +that (i.e. makes a 3x3 square neighborhood), and so on.

  • +
  • lower (float or str) – Optional. Impose limits on the output solution. Parameter lower +sets the lower bound. lower can be the name of a grid file with +lower bound values, a fixed value, d to set to minimum input +value, or u for unconstrained [Default]. Grid files used to set +the limits may contain NaNs. In the presence of NaNs, the limit of +a node masked with NaN is unconstrained.

  • +
  • upper (float or str) – Optional. Impose limits on the output solution. Parameter upper +sets the upper bound and can be the name of a grid file with upper +bound values, a fixed value, d to set to maximum input value, +or u for unconstrained [Default]. Grid files used to set the +limits may contain NaNs. In the presence of NaNs, the limit of a +node masked with NaN is unconstrained.

  • +
  • tension (float or str) – [b|i]. +Optional. Tension factor[s]. These must be between 0 and 1. Tension +may be used in the interior solution (above equation, where it +suppresses spurious oscillations) and in the boundary conditions +(where it tends to flatten the solution approaching the edges). Add +itension to set interior tension, and btension to +set boundary tension. If you do not prepend i or b, both +will be set to the same value. [Default is 0 for both and gives +minimum curvature solution.]

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • aspatial (bool or str) – [col=]name[,…]. +Control how aspatial data are handled during input and output. +Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#aspatial-full.

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • registration (str) – g|p. +Force gridline (g) or pixel (p) node registration +[Default is g(ridline)].

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray: if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import pygmt
+>>> # Load a sample table of topography
+>>> topography = pygmt.datasets.load_sample_data(name="notre_dame_topography")
+>>> # Perform gridding of topography data
+>>> grid = pygmt.surface(data=topography, spacing=1, region=[0, 4, 0, 8])
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.triangulate.delaunay_triples.html b/v0.14.0/api/generated/pygmt.triangulate.delaunay_triples.html new file mode 100644 index 00000000000..7154d8a6510 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.triangulate.delaunay_triples.html @@ -0,0 +1,491 @@ + + + + + + + + + pygmt.triangulate.delaunay_triples — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.triangulate.delaunay_triples

+
+
+static triangulate.delaunay_triples(data=None, x=None, y=None, z=None, *, output_type='pandas', outfile=None, **kwargs)[source]
+

Delaunay triangle based gridding of Cartesian data.

+

Reads in x,y[,z] data and performs Delaunay triangulation, i.e., it +finds how the points should be connected to give the most equilateral +triangulation possible. If a map projection (give region and +projection) is chosen then it is applied before the triangulation +is calculated. The actual algorithm used in the triangulations is +either that of Watson [1982] or Shewchuk [1996] [Default if installed; +type gmt get GMT_TRIANGULATE on the command line to see which +method is selected).

+

Must provide either data or x, y, and z.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/triangulate.html

+

Aliases:

+
    +
  • I = spacing

  • +
  • J = projection

  • +
  • R = region

  • +
  • V = verbose

  • +
  • b = binary

  • +
+
    +
  • d = nodata

  • +
  • e = find

  • +
  • f = coltypes

  • +
  • h = header

  • +
+
    +
  • i = incols

  • +
  • r = registration

  • +
  • s = skiprows

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • x/y/z (numpy.ndarray) – Arrays of x and y coordinates and values z of the data points.

  • +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in (x, y, z) or (longitude, latitude, elevation) values by +providing a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • output_type (Literal['pandas', 'numpy', 'file'], default: 'pandas') –

    Desired output type of the result data.

    +
      +
    • pandas will return a pandas.DataFrame object.

    • +
    • numpy will return a numpy.ndarray object.

    • +
    • file will save the result to the file specified by the outfile +parameter.

    • +
    +

  • +
  • outfile (str | None, default: None) – File name for saving the result data. Required if output_type="file". +If specified, output_type will be forced to be "file".

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • skiprows (bool or str) –

    [cols][+a][+r]. +Suppress output for records whose z-value equals NaN [Default +outputs all records]. Optionally, supply a comma-separated list of +all columns or column ranges to consider for this NaN test [Default +only considers the third data column (i.e., cols = 2)]. Column +ranges must be given in the format start[:inc]:stop, where +inc defaults to 1 if not specified. The following modifiers are +supported:

    +
    +
      +
    • +r to reverse the suppression, i.e., only output the +records whose z-value equals NaN.

    • +
    • +a to suppress the output of the record if just one or +more of the columns equal NaN [Default skips record only +if values in all specified cols equal NaN].

    • +
    +
    +

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
Return type:
+

DataFrame | ndarray | None

+
+
Returns:
+

ret – Return type depends on outfile and output_type:

+
    +
  • None if outfile is set (output will be stored in the file set by +outfile)

  • +
  • pandas.DataFrame or numpy.ndarray if outfile is not +set (depends on output_type)

  • +
+

+
+
+
+

Note

+

For geographic data with global or very large extent you should +consider sphtriangulate instead since +triangulate is a Cartesian or small-geographic area operator and is +unaware of periodic or polar boundary conditions.

+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.triangulate.html b/v0.14.0/api/generated/pygmt.triangulate.html new file mode 100644 index 00000000000..9dc6cfb49d8 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.triangulate.html @@ -0,0 +1,295 @@ + + + + + + + + + pygmt.triangulate — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.triangulate

+
+
+class pygmt.triangulate[source]
+

Delaunay triangulation or Voronoi partitioning and gridding of Cartesian data.

+

Triangulate reads in x,y[,z] data and performs Delaunay triangulation, +i.e., it finds how the points should be connected to give the most +equilateral triangulation possible. If a map projection (give region +and projection) is chosen then it is applied before the triangulation +is calculated. By default, the output is triplets of point id numbers that +make up each triangle. The id numbers refer to the points position (line +number, starting at 0 for the first line) in the input file. If outgrid +and spacing are set a grid will be calculated based on the surface +defined by the planar triangles. The actual algorithm used in the +triangulations is either that of Watson [1982] or Shewchuk [1996] [Default +is Shewchuk if installed; type gmt get GMT_TRIANGULATE on the command +line to see which method is selected]. Furthermore, if the Shewchuk +algorithm is installed then you can also perform the calculation of Voronoi +polygons and optionally grid your data via the natural nearest neighbor +algorithm.

+
+

Note

+

For geographic data with global or very large extent you should consider +sphtriangulate instead since +triangulate is a Cartesian or small-geographic area operator and is +unaware of periodic or polar boundary conditions.

+
+
+ +

Methods Summary

+ + + + + + + + + +

triangulate.delaunay_triples([data, x, y, ...])

Delaunay triangle based gridding of Cartesian data.

triangulate.regular_grid([data, x, y, z, ...])

Delaunay triangle based gridding of Cartesian data.

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.triangulate.regular_grid.html b/v0.14.0/api/generated/pygmt.triangulate.regular_grid.html new file mode 100644 index 00000000000..0e6312983bd --- /dev/null +++ b/v0.14.0/api/generated/pygmt.triangulate.regular_grid.html @@ -0,0 +1,526 @@ + + + + + + + + + pygmt.triangulate.regular_grid — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.triangulate.regular_grid

+
+
+static triangulate.regular_grid(data=None, x=None, y=None, z=None, outgrid=None, **kwargs)[source]
+

Delaunay triangle based gridding of Cartesian data.

+

Reads in x,y[,z] data and performs Delaunay triangulation, i.e., it +finds how the points should be connected to give the most equilateral +triangulation possible. If a map projection (give region and +projection) is chosen then it is applied before the triangulation +is calculated. By setting outgrid and spacing, a grid will be +calculated based on the surface defined by the planar triangles. The +actual algorithm used in the triangulations is either that of Watson +[1982] or Shewchuk [1996] [Default is Shewchuk if installed; type +gmt get GMT_TRIANGULATE on the command line to see which method is +selected]. This choice is made during the GMT installation. +Furthermore, if the Shewchuk algorithm is installed then you can also +perform the calculation of Voronoi polygons and optionally grid your +data via the natural nearest neighbor algorithm.

+

Must provide either data or x, y, and z.

+

Must provide region and spacing.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/triangulate.html

+

Aliases:

+
    +
  • I = spacing

  • +
  • J = projection

  • +
  • R = region

  • +
  • V = verbose

  • +
  • b = binary

  • +
+
    +
  • d = nodata

  • +
  • e = find

  • +
  • f = coltypes

  • +
  • h = header

  • +
+
    +
  • i = incols

  • +
  • r = registration

  • +
  • s = skiprows

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • x/y/z (numpy.ndarray) – Arrays of x and y coordinates and values z of the data points.

  • +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in (x, y[, z]) or (longitude, latitude[, elevation]) values by +providing a file name to an ASCII data table, a 2-D +numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • outgrid (str | None, default: None) –

    Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

    +

    The interpolation is performed in the original coordinates, so if +your triangles are close to the poles you are better off projecting +all data to a local coordinate system before using triangulate +(this is true of all gridding routines) or instead select +sphtriangulate.

    +

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • registration (str) – g|p. +Force gridline (g) or pixel (p) node registration +[Default is g(ridline)].

  • +
  • skiprows (bool or str) –

    [cols][+a][+r]. +Suppress output for records whose z-value equals NaN [Default +outputs all records]. Optionally, supply a comma-separated list of +all columns or column ranges to consider for this NaN test [Default +only considers the third data column (i.e., cols = 2)]. Column +ranges must be given in the format start[:inc]:stop, where +inc defaults to 1 if not specified. The following modifiers are +supported:

    +
    +
      +
    • +r to reverse the suppression, i.e., only output the +records whose z-value equals NaN.

    • +
    • +a to suppress the output of the record if just one or +more of the columns equal NaN [Default skips record only +if values in all specified cols equal NaN].

    • +
    +
    +

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray if outgrid is None [Default]

  • +
  • None if outgrid is a str (grid output is stored in outgrid)

  • +
+

+
+
+
+

Note

+

For geographic data with global or very large extent you should +consider sphtriangulate instead since +triangulate is a Cartesian or small-geographic area operator and is +unaware of periodic or polar boundary conditions.

+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.which.html b/v0.14.0/api/generated/pygmt.which.html new file mode 100644 index 00000000000..ee178e4b553 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.which.html @@ -0,0 +1,307 @@ + + + + + + + + + pygmt.which — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.which

+
+
+pygmt.which(fname, **kwargs)[source]
+

Find the full path to specified files.

+

Reports the full paths to the files given through fname. We look +for the file in (1) the current directory, (2) in $GMT_USERDIR (if +defined), (3) in $GMT_DATADIR (if defined), or (4) in $GMT_CACHEDIR +(if defined).

+

fname can also be a downloadable file (either a complete URL, an +@file for downloading from the GMT data server, or any of the remote +datasets at https://www.pygmt.org/latest/api/index.html#datasets). +In these cases, use the download parameter to set the desired +behavior. If download is not used (or False), the file will +not be found.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/gmtwhich.html

+

Aliases:

+
    +
  • G = download

  • +
+
    +
  • V = verbose

  • +
+
    +
+
+
+
Parameters:
+
    +
  • fname (str or list) – One or more file names of any data type (grids, tables, etc.).

  • +
  • download (bool or str) – [a|c|l|u]. +If the fname argument is a downloadable file (either a complete +URL, an @file for downloading from the GMT data server, or any of +the remote datasets at +https://www.pygmt.org/latest/api/index.html#datasets) +we will try to download the file if it is not found in your local +data or cache directories. If set to True or l is passed +the file is downloaded to the current directory. Use a to place +files in the appropriate folder under the user directory (this is +where GMT normally places downloaded files), c to place it in +the user cache directory, or u for the user data directory +instead (i.e., ignoring any subdirectory structure).

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
+
+
Return type:
+

str | list[str]

+
+
Returns:
+

path – The path(s) to the file(s), depending on the parameters used.

+
+
Raises:
+

FileNotFoundError – If the file is not found.

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.x2sys_cross.html b/v0.14.0/api/generated/pygmt.x2sys_cross.html new file mode 100644 index 00000000000..7745a62cea8 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.x2sys_cross.html @@ -0,0 +1,369 @@ + + + + + + + + + pygmt.x2sys_cross — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.x2sys_cross

+
+
+pygmt.x2sys_cross(tracks=None, outfile=None, **kwargs)[source]
+

Calculate crossovers between track data files.

+

Determines all intersections between (“external cross-overs”) or within +(“internal cross-overs”) tracks (Cartesian or geographic), and report the +time, position, distance along track, heading and speed along each track +segment, and the crossover error (COE) and mean values for all observables. +By default, pygmt.x2sys_cross will look for both external and +internal COEs. As an option, you may choose to project all data using one +of the map projections prior to calculating the COE.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/supplements/x2sys/x2sys_cross.html

+

Aliases:

+
    +
  • A = combitable

  • +
  • C = runtimes

  • +
  • D = override

  • +
  • I = interpolation

  • +
+
    +
  • Q = coe

  • +
  • R = region

  • +
  • S = speed

  • +
  • T = tag

  • +
+
    +
  • V = verbose

  • +
  • W = numpoints

  • +
  • Z = trackvalues

  • +
+
+
+
Parameters:
+
    +
  • tracks (pandas.DataFrame, str, or list) –

    A table or a list of tables with (x, y) or (lon, lat) values in the +first two columns. Track(s) can be provided as pandas.DataFrame tables +or file names. Supported file formats are ASCII, native binary, or +COARDS netCDF 1-D data. More columns may also be present.

    +

    If the file names are missing their file extension, we will append the suffix +specified for this TAG. Track files will be searched for first in the current +directory and second in all directories listed in $X2SYS_HOME/TAG/TAG_paths.txt +(if it exists). [If environment variable X2SYS_HOME is not set it will +default to $GMT_SHAREDIR/x2sys]. (Note: MGD77 files will also be looked for +via $MGD77_HOME/mgd77_paths.txt and .gmt files will be searched for via +$GMT_SHAREDIR/mgg/gmtfile_paths).

    +

  • +
  • outfile (str | None, default: None) – The file name for the output ASCII txt file to store the table in.

  • +
  • tag (str) – Specify the x2sys TAG which identifies the attributes of this data +type.

  • +
  • combitable (str) – Only process the pair-combinations found in the file combitable +[Default process all possible combinations among the specified files]. +The file combitable is created by x2sys_get’s -L option.

  • +
  • runtimes (bool or str) – Compute and append the processing run-time for each pair to the +progress message (use runtimes=True). Pass in a file name (e.g. +runtimes="file.txt") to save these run-times to file. The idea here +is to use the knowledge of run-times to split the main process in a +number of sub-processes that can each be launched in a different +processor of your multi-core machine. See the MATLAB function +split_file4coes.m.

  • +
  • override (bool or str) – S|N. +Control how geographic coordinates are handled (Cartesian data are +unaffected). By default, we determine if the data are closer to one +pole than the other, and then we use a cylindrical polar conversion to +avoid problems with longitude jumps. You can turn this off entirely +with override and then the calculations uses the original data (we +have protections against longitude jumps). However, you can force the +selection of the pole for the projection by appending S or N +for the south or north pole, respectively. The conversion is used +because the algorithm used to find crossovers is inherently a +Cartesian algorithm that can run into trouble with data that has large +longitudinal range at higher latitudes.

  • +
  • interpolation (str) –

    l|a|c. +Sets the interpolation mode for estimating values at the crossover. +Choose among:

    +
      +
    • l - Linear interpolation [Default].

    • +
    • a - Akima spline interpolation.

    • +
    • c - Cubic spline interpolation.

    • +
    +

  • +
  • coe (str) – Use e for external COEs only, and i for internal COEs only +[Default is all COEs].

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • speed (str or list) –

    l|u|hspeed. +Defines window of track speeds. If speeds are outside this window we do +not calculate a COE. Specify:

    +
      +
    • l sets lower speed [Default is 0].

    • +
    • u sets upper speed [Default is infinity].

    • +
    • h does not limit the speed but sets a lower speed below which +headings will not be computed (i.e., set to NaN) [Default +calculates headings regardless of speed].

    • +
    +

    For example, you can use speed=["l0", "u10", "h5"] to set a lower +speed of 0, upper speed of 10, and disable heading calculations for +speeds below 5.

    +

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • numpoints (int) – Give the maximum number of data points on either side of the crossover +to use in the spline interpolation [Default is 3].

  • +
  • trackvalues (bool) – Report the values of each track at the crossover [Default reports the +crossover value and the mean value].

  • +
+
+
Return type:
+

DataFrame | None

+
+
Returns:
+

crossover_errors – Table containing crossover error information. A pandas.DataFrame object +is returned if outfile is not set, otherwise None is returned and output +will be stored in file set by outfile.

+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.x2sys_init.html b/v0.14.0/api/generated/pygmt.x2sys_init.html new file mode 100644 index 00000000000..af9e21666f4 --- /dev/null +++ b/v0.14.0/api/generated/pygmt.x2sys_init.html @@ -0,0 +1,360 @@ + + + + + + + + + pygmt.x2sys_init — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.x2sys_init

+
+
+pygmt.x2sys_init(tag, *, fmtfile=None, suffix=None, force=None, discontinuity=None, spacing=None, units=None, region=None, verbose=None, gap=None, distcalc=None, **kwargs)[source]
+

Initialize a new x2sys track database.

+

Serves as the starting point for x2sys and initializes a set of data bases +that are particular to one kind of track data. These data, their associated +data bases, and key parameters are given a short-hand notation called an +x2sys TAG. The TAG keeps track of settings such as file format, whether the +data are geographic or not, and the binning resolution for track indices.

+

Before you can run pygmt.x2sys_init you must set the environment variable +X2SYS_HOME to a directory where you have write permission, which is where +x2sys can keep track of your settings.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/supplements/x2sys/x2sys_init.html

+

Aliases:

+
    +
  • D = fmtfile

  • +
  • E = suffix

  • +
  • F = force

  • +
  • G = discontinuity

  • +
+
    +
  • I = spacing

  • +
  • N = units

  • +
  • R = region

  • +
+
    +
  • V = verbose

  • +
  • W = gap

  • +
  • j = distcalc

  • +
+
+
+
Parameters:
+
    +
  • tag (str) – The unique name of this data type x2sys TAG.

  • +
  • fmtfile (str) –

    Format definition file prefix for this data set (see +GMT’s Format Definition Files +for more information). Specify full path if the file is not in the +current directory.

    +

    Some file formats already have definition files premade. These include:

    +
      +
    • mgd77 (for plain ASCII MGD77 data files)

    • +
    • mgd77+ (for enhanced MGD77+ netCDF files)

    • +
    • gmt (for old mgg supplement binary files)

    • +
    • xy (for plain ASCII x, y tables)

    • +
    • xyz (same, with one z-column)

    • +
    • geo (for plain ASCII longitude, latitude files)

    • +
    • geoz (same, with one z-column).

    • +
    +

  • +
  • suffix (str) – Specify the file extension (suffix) for these data files. If not +given we use the format definition file prefix as the suffix (see +fmtfile).

  • +
  • discontinuity (str) – d|g. +Select geographical coordinates. Append d for discontinuity at the +Dateline (makes longitude go from -180° E to +180° E) or g for +discontinuity at Greenwich (makes longitude go from 0° E to 360° E +[Default]). If not given we assume the data are Cartesian.

  • +
  • spacing (str or list) – dx[/dy]. +dx and optionally dy is the grid spacing. Append m to +indicate minutes or s to indicate seconds for geographic data. +These spacings refer to the binning used in the track bin-index data +base.

  • +
  • units (str or list) –

    d|sunit. +Set the units used for distance and speed when requested by other +programs. Append d for distance or s for speed, then give the +desired unit as:

    +
      +
    • c - Cartesian userdist or userdist/usertime

    • +
    • e - meters or m/s

    • +
    • f - feet or ft/s

    • +
    • k - kilometers or km/hr

    • +
    • m - miles or mi/hr

    • +
    • n - nautical miles or knots

    • +
    • u - survey feet or sft/s

    • +
    +

    [Default is units=["dk", "se"] (km and m/s) if discontinuity is +set, and units=["dc", "sc"] otherwise (e.g., for Cartesian units)].

    +

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • gap (str or list) – t|dgap. +Give t or d and append the corresponding maximum time gap (in +user units; this is typically seconds [Default is infinity]), or +distance (for units, see units) gap [Default is infinity]) allowed +between the two data points immediately on either side of a crossover. +If these limits are exceeded then a data gap is assumed and no COE will +be determined.

  • +
  • distcalc (str) –

    e|f|g. +Determine how spherical distances are calculated.

    +
      +
    • e - Ellipsoidal (or geodesic) mode

    • +
    • f - Flat Earth mode

    • +
    • g - Great circle distance [Default]

    • +
    +

    All spherical distance calculations depend on the current ellipsoid +(PROJ_ELLIPSOID), the definition of the mean radius +(PROJ_MEAN_RADIUS), and the specification of latitude type +(PROJ_AUX_LATITUDE). Geodesic distance calculations is also +controlled by method (PROJ_GEODESIC).

    +

  • +
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/generated/pygmt.xyz2grd.html b/v0.14.0/api/generated/pygmt.xyz2grd.html new file mode 100644 index 00000000000..f3a0ab0935b --- /dev/null +++ b/v0.14.0/api/generated/pygmt.xyz2grd.html @@ -0,0 +1,558 @@ + + + + + + + + + pygmt.xyz2grd — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

pygmt.xyz2grd

+
+
+pygmt.xyz2grd(data=None, x=None, y=None, z=None, outgrid=None, **kwargs)[source]
+

Create a grid file from table data.

+

Reads one or more tables with x, y, z columns and creates a binary grid +file. pygmt.xyz2grd will report if some of the nodes are not filled +in with data. Such unconstrained nodes are set to a value specified by the +user [Default is NaN]. Nodes with more than one value will be set to the +mean value.

+

Full option list at https://docs.generic-mapping-tools.org/6.5/xyz2grd.html

+

Aliases:

+
    +
  • A = duplicate

  • +
  • I = spacing

  • +
  • J = projection

  • +
  • R = region

  • +
  • V = verbose

  • +
+
    +
  • Z = convention

  • +
  • b = binary

  • +
  • d = nodata

  • +
  • e = find

  • +
  • f = coltypes

  • +
+
    +
  • h = header

  • +
  • i = incols

  • +
  • r = registration

  • +
  • w = wrap

  • +
+
+
+
Parameters:
+
    +
  • data (str, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in (x, y, z) or (longitude, latitude, elevation) values by +providing a file name to an ASCII data table, a 2-D numpy.ndarray, a pandas.DataFrame, an +xarray.Dataset made up of 1-D xarray.DataArray +data variables, or a geopandas.GeoDataFrame containing the +tabular data.

  • +
  • x/y/z (1-D arrays) – The arrays of x and y coordinates and z data points.

  • +
  • outgrid (str | None, default: None) – Name of the output netCDF grid file. If not specified, will return an +xarray.DataArray object. For writing a specific grid file format or +applying basic data operations to the output grid, see +https://docs.generic-mapping-tools.org/6.5/gmt.html#grd-inout-full for the available modifiers.

  • +
  • duplicate (str) – [d|f|l|m|n|r|S|s|u|z]. +By default we will calculate mean values if multiple entries fall on +the same node. Use duplicate to change this behavior, except it is +ignored if convention is given. Append f or s to simply +keep the first or last data point that was assigned to each node. +Append l or u or d to find the lowest (minimum) or upper +(maximum) value or the difference between the maximum and minimum +values at each node, respectively. Append m or r or S to +compute mean or RMS value or standard deviation at each node, +respectively. Append n to simply count the number of data points +that were assigned to each node (this only requires two input columns +x and y as z is not consulted). Append z to sum multiple +values that belong to the same node.

  • +
  • spacing (float, str, or list) –

    x_inc[+e|n][/y_inc[+e|n]]. +x_inc [and optionally y_inc] is the grid spacing.

    +
      +
    • Geographical (degrees) coordinates: Optionally, append an +increment unit. Choose among m to indicate arc-minutes or +s to indicate arc-seconds. If one of the units e, f, +k, M, n or u is appended instead, the increment +is assumed to be given in meter, foot, km, mile, nautical mile or +US survey foot, respectively, and will be converted to the +equivalent degrees longitude at the middle latitude of the region +(the conversion depends on PROJ_ELLIPSOID). If +y_inc is given but set to 0 it will be reset equal to x_inc; +otherwise it will be converted to degrees latitude.

    • +
    • All coordinates: If +e is appended then the corresponding +max x (east) or y (north) may be slightly adjusted to fit +exactly the given increment [by default the increment may be +adjusted slightly to fit the given domain]. Finally, instead of +giving an increment you may specify the number of nodes desired +by appending +n to the supplied integer argument; the +increment is then recalculated from the number of nodes, the +registration, and the domain. The resulting increment value +depends on whether you have selected a gridline-registered or +pixel-registered grid; see GMT File Formats for details.

    • +
    +

    Note: If region=grdfile is used then the grid spacing and +the registration have already been initialized; use spacing and +registration to override these values.

    +

  • +
  • projection (str) – projcode[projparams/]width|scale. +Select map projection.

  • +
  • region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. +Specify the region of interest.

  • +
  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages +written to stderr. Choose among 7 levels of verbosity:

    +
      +
    • q - Quiet, not even fatal error messages are produced

    • +
    • e - Error messages only

    • +
    • w - Warnings [Default]

    • +
    • t - Timings (report runtimes for time-intensive algorithms)

    • +
    • i - Informational messages (same as verbose=True)

    • +
    • c - Compatibility warnings

    • +
    • d - Debugging messages

    • +
    +

  • +
  • convention (str) –

    [flags]. +Read a 1-column ASCII [or binary] table. This assumes that all the +nodes are present and sorted according to specified ordering +convention contained in flags. If incoming data represents rows, +make flags start with T(op) if first row is y += ymax or B(ottom) if first row is y = ymin. +Then, append L or R to indicate that first element is at +left or right end of row. Likewise for column formats: start with +L or R to position first column, and then append T or +B to position first element in a row. Note: These two +row/column indicators are only required for grids; for other tables +they do not apply. For gridline registered grids: If data are periodic +in x but the incoming data do not contain the (redundant) column at +x = xmax, append x. For data periodic in y without redundant row at +y = ymax, append y. Append sn to skip the first n number +of bytes (probably a header). If the byte-order or the words needs +to be swapped, append w. Select one of several data types (all +binary except a):

    +
      +
    • A ASCII representation of one or more floating point values per +record

    • +
    • a ASCII representation of a single item per record

    • +
    • c int8_t, signed 1-byte character

    • +
    • u uint8_t, unsigned 1-byte character

    • +
    • h int16_t, signed 2-byte integer

    • +
    • H uint16_t, unsigned 2-byte integer

    • +
    • i int32_t, signed 4-byte integer

    • +
    • I uint32_t, unsigned 4-byte integer

    • +
    • l int64_t, long (8-byte) integer

    • +
    • L uint64_t, unsigned long (8-byte) integer

    • +
    • f 4-byte floating point single precision

    • +
    • d 8-byte floating point double precision

    • +
    +

    [Default format is scanline orientation of ASCII numbers: La]. +The difference between A and a is that the latter can decode +both dateTclock and ddd:mm:ss[.xx] formats but expects +each input record to have a single value, while the former can handle +multiple values per record but can only parse regular floating point +values. Translate incoming z-values via the incols parameter.

    +

  • +
  • binary (bool or str) –

    i|o[ncols][type][w][+l|b]. +Select native binary input (using binary="i") or output +(using binary="o"), where ncols is the number of data columns +of type, which must be one of:

    +
    +
      +
    • c - int8_t (1-byte signed char)

    • +
    • u - uint8_t (1-byte unsigned char)

    • +
    • h - int16_t (2-byte signed int)

    • +
    • H - uint16_t (2-byte unsigned int)

    • +
    • i - int32_t (4-byte signed int)

    • +
    • I - uint32_t (4-byte unsigned int)

    • +
    • l - int64_t (8-byte signed int)

    • +
    • L - uint64_t (8-byte unsigned int)

    • +
    • f - 4-byte single-precision float

    • +
    • d - 8-byte double-precision float

    • +
    • x - use to skip ncols anywhere in the record

    • +
    +
    +

    For records with mixed types, append additional comma-separated +combinations of ncols type (no space). The following modifiers +are supported:

    +
    +
      +
    • w after any item to force byte-swapping.

    • +
    • +l|b to indicate that the entire data file should +be read as little- or big-endian, respectively.

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#bi-full.

    +

  • +
  • nodata (str) – i|onodata. +Substitute specific values with NaN (for tabular data). For +example, nodata="-9999" will replace all values equal to -9999 +with NaN during input and all NaN values with -9999 during output. +Prepend i to the nodata value for input columns only. Prepend +o to the nodata value for output columns only.

  • +
  • find (str) – [~]“pattern” | [~]/regexp/[i]. +Only pass records that match the given pattern or regular +expressions [Default processes all records]. Prepend ~ to +the pattern or regexp to instead only pass data expressions +that do not match the pattern. Append i for case insensitive +matching. This does not apply to headers or segment headers.

  • +
  • coltypes (str) – [i|o]colinfo. +Specify data types of input and/or output columns (time or +geographical data). Full documentation is at +https://docs.generic-mapping-tools.org/6.5/gmt.html#f-full.

  • +
  • header (str) –

    [i|o][n][+c][+d][+msegheader][+rremark][+ttitle]. +Specify that input and/or output file(s) have n header records +[Default is 0]. Prepend i if only the primary input should have +header records. Prepend o to control the writing of header +records, with the following modifiers supported:

    +
    +
      +
    • +d to remove existing header records.

    • +
    • +c to add a header comment with column names to the +output [Default is no column names].

    • +
    • +m to add a segment header segheader to the output +after the header block [Default is no segment header].

    • +
    • +r to add a remark comment to the output [Default is no +comment]. The remark string may contain \n to indicate +line-breaks.

    • +
    • +t to add a title comment to the output [Default is no +title]. The title string may contain \n to indicate +line-breaks.

    • +
    +
    +

    Blank lines and lines starting with # are always skipped.

    +

  • +
  • incols (str or 1-D array) –

    Specify data columns for primary input in arbitrary order. Columns +can be repeated and columns not listed will be skipped [Default +reads all columns in order, starting with the first (i.e., column +0)].

    +
      +
    • For 1-D array: specify individual columns in input order (e.g., +incols=[1,0] for the 2nd column followed by the 1st column).

    • +
    • For str: specify individual columns or column +ranges in the format start[:inc]:stop, where inc +defaults to 1 if not specified, with columns and/or column ranges +separated by commas (e.g., incols="0:2,4+l" to input the +first three columns followed by the log-transformed 5th column). +To read from a given column until the end of the record, leave +off stop when specifying the column range. To read trailing +text, add the column t. Append the word number to t to +ingest only a single word from the trailing text. Instead of +specifying columns, use incols="n" to simply read numerical +input and skip trailing text. Optionally, append one of the +following modifiers to any column or column range to transform +the input columns:

      +
      +
        +
      • +l to take the log10 of the input values.

      • +
      • +d to divide the input values by the factor divisor +[Default is 1].

      • +
      • +s to multiple the input values by the factor scale +[Default is 1].

      • +
      • +o to add the given offset to the input values [Default +is 0].

      • +
      +
      +
    • +
    +

  • +
  • registration (str) – g|p. +Force gridline (g) or pixel (p) node registration +[Default is g(ridline)].

  • +
  • wrap (str) –

    y|a|w|d|h|m|s|cperiod[/phase][+ccol]. +Convert the input x-coordinate to a cyclical coordinate, or a +different column if selected via +ccol. The following +cyclical coordinate transformations are supported:

    +
    +
      +
    • y - yearly cycle (normalized)

    • +
    • a - annual cycle (monthly)

    • +
    • w - weekly cycle (day)

    • +
    • d - daily cycle (hour)

    • +
    • h - hourly cycle (minute)

    • +
    • m - minute cycle (second)

    • +
    • s - second cycle (second)

    • +
    • c - custom cycle (normalized)

    • +
    +
    +

    Full documentation is at https://docs.generic-mapping-tools.org/6.5/gmt.html#w-full.

    +

  • +
+
+
Return type:
+

DataArray | None

+
+
Returns:
+

ret – Return type depends on whether the outgrid parameter is set:

+
    +
  • xarray.DataArray: if outgrid is not set

  • +
  • None if outgrid is set (grid output will be stored in file set by +outgrid)

  • +
+

+
+
+

Example

+
>>> import numpy as np
+>>> import pygmt
+>>> # generate a grid for z=x**2+y**2, with an x-range of 0 to 3,
+>>> # and a y-range of 10.5 to 12.5. The x- and y-spacings are 1.0 and 0.5.
+>>> x, y = np.meshgrid([0, 1, 2, 3], [10.5, 11.0, 11.5, 12.0, 12.5])
+>>> z = x**2 + y**2
+>>> xx, yy, zz = x.flatten(), y.flatten(), z.flatten()
+>>> grid = pygmt.xyz2grd(
+...     x=xx, y=yy, z=zz, spacing=(1.0, 0.5), region=[0, 3, 10, 13]
+... )
+
+
+
+ +
+

Examples using pygmt.xyz2grd

+
+

Blockmean

+
Blockmean
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/api/index.html b/v0.14.0/api/index.html new file mode 100644 index 00000000000..9fa120ceeeb --- /dev/null +++ b/v0.14.0/api/index.html @@ -0,0 +1,1013 @@ + + + + + + + + + API Reference — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

API Reference

+

PyGMT is a library for processing geospatial and geophysical data and making +publication-quality maps and figures. It provides a Pythonic interface for the Generic +Mapping Tools (GMT), a command-line program widely used across the Earth, Ocean, and +Planetary sciences and beyond. Besides making GMT more accessible to new users, PyGMT +aims to provide integration with the scientific Python ecosystem as well as support for +rich display in Jupyter notebooks.

+
+

Main Features

+

Here are just a few of the things that PyGMT does well:

+
+
    +
  • Easy handling of individual types of data like Cartesian, geographic, or +time-series data.

  • +
  • Processing of (geo)spatial data including gridding, filtering, and masking.

  • +
  • Plotting of a large spectrum of objects on figures including +lines, vectors, polygons, and symbols (pre-defined and customized).

  • +
  • Generating publication-quality illustrations and making animations.

  • +
+
+
+
+

Plotting

+
+

Figure class overview

+

All plotting is handled through the pygmt.Figure class and its methods.

+ + + + + + +

Figure()

A GMT figure to handle all plotting.

+
+
+

Plotting map elements

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Figure.basemap(*[, region, projection, ...])

Plot base maps and frames for the figure.

Figure.coast(*[, area_thresh, frame, lakes, ...])

Plot continents, shorelines, rivers, and borders on maps.

Figure.colorbar(*[, frame, cmap, position, ...])

Plot colorbars on figures.

Figure.hlines(y[, xmin, xmax, pen, label, ...])

Plot one or multiple horizontal line(s).

Figure.inset(*[, position, box, projection, ...])

Create an inset figure to be placed within a larger figure.

Figure.legend([spec, position, box])

Plot legends on maps.

Figure.logo(*[, region, projection, ...])

Plot the GMT logo.

Figure.solar([terminator, terminator_datetime])

Plot day-light terminators or twilights.

Figure.text([textfiles, x, y, position, ...])

Plot or typeset text strings of variable size, font type, and orientation.

Figure.timestamp([text, label, justify, ...])

Plot the GMT timestamp logo.

Figure.vlines(x[, ymin, ymax, pen, label, ...])

Plot one or multiple vertical line(s).

+
+
+

Plotting tabular data

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Figure.contour([data, x, y, z, annotation, ...])

Contour table data by direct triangulation.

Figure.histogram(data, *[, horizontal, ...])

Plot Cartesian histograms.

Figure.meca(spec, scale[, convention, ...])

Plot focal mechanisms.

Figure.plot([data, x, y, size, symbol, ...])

Plot lines, polygons, and symbols in 2-D.

Figure.plot3d([data, x, y, z, size, symbol, ...])

Plot lines, polygons, and symbols in 3-D.

Figure.rose([data, length, azimuth, sector, ...])

Plot windrose diagrams or polar histograms.

Figure.ternary(data[, alabel, blabel, clabel])

Plot ternary diagrams.

Figure.velo([data, vector, frame, cmap, ...])

Plot velocity vectors, crosses, anisotropy bars, and wedges.

Figure.wiggle([data, x, y, z, fillpositive, ...])

Plot z=f(x,y) anomalies along tracks.

+
+
+

Plotting raster data

+ + + + + + + + + + + + + + + + + + +

Figure.grdcontour(grid, *[, annotation, ...])

Convert grids or images to contours and plot them on maps.

Figure.grdimage(grid, *[, frame, cmap, ...])

Project and plot grids or images.

Figure.grdview(grid, *[, region, ...])

Create 3-D perspective image or surface mesh from a grid.

Figure.image(imagefile, *[, position, box, ...])

Place images or EPS files on maps.

Figure.tilemap(region[, zoom, source, ...])

Plot an XYZ tile map.

+
+
+

Configuring layout

+ + + + + + + + + + + + +

Figure.set_panel([panel, fixedlabel, ...])

Set the current subplot panel to plot on.

Figure.shift_origin([xshift, yshift])

Shift plot origin in x and/or y directions.

Figure.subplot([nrows, ncols, figsize, ...])

Create multi-panel subplot figures.

+
+
+

Saving and displaying the figure

+ + + + + + + + + + + + +

Figure.savefig(fname[, transparent, crop, ...])

Save the figure to an image file.

Figure.show([method, dpi, width, waiting])

Display a preview of the figure.

Figure.psconvert(*[, crop, gs_option, dpi, ...])

Convert [E]PS file(s) to other formats.

+
+
+

Configuring the display settings

+

The following function is provided directly through the pygmt top level +package.

+ + + + + + +

set_display([method])

Set the display method when calling pygmt.Figure.show.

+
+
+

Color palette table generation

+

The following functions are provided directly through the pygmt top level +package.

+ + + + + + + + + +

grd2cpt(grid, *[, transparency, cmap, ...])

Make GMT color palette tables from a grid file.

makecpt(*[, transparency, cmap, background, ...])

Make GMT color palette tables.

+
+
+
+

Data Processing

+
+

Operations on tabular data

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

binstats(data[, outgrid])

Bin spatial data and determine statistics per bin.

blockmean([data, x, y, z, output_type, outfile])

Block average (x, y, z) data tables by mean estimation.

blockmedian([data, x, y, z, output_type, ...])

Block average (x, y, z) data tables by median estimation.

blockmode([data, x, y, z, output_type, outfile])

Block average (x, y, z) data tables by mode estimation.

filter1d(data[, output_type, outfile])

Time domain filtering of 1-D data tables.

nearneighbor([data, x, y, z, outgrid])

Grid table data using a "Nearest neighbor" algorithm.

project([data, x, y, z, output_type, outfile])

Project data onto lines or great circles, or generate tracks.

select([data, output_type, outfile])

Select data table subsets based on multiple spatial criteria.

sph2grd(data[, outgrid])

Create spherical grid files in tension of data.

sphdistance([data, x, y, outgrid])

Create Voronoi distance, node, or natural nearest-neighbor grid on a sphere.

sphinterpolate(data[, outgrid])

Create spherical grid files in tension of data.

surface([data, x, y, z, outgrid])

Grid table data using adjustable tension continuous curvature splines.

triangulate()

Delaunay triangulation or Voronoi partitioning and gridding of Cartesian data.

triangulate.regular_grid([data, x, y, z, ...])

Delaunay triangle based gridding of Cartesian data.

triangulate.delaunay_triples([data, x, y, ...])

Delaunay triangle based gridding of Cartesian data.

xyz2grd([data, x, y, z, outgrid])

Create a grid file from table data.

+
+
+

Operations on raster data

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

dimfilter(grid[, outgrid])

Filter a grid by dividing the filter circle.

grd2xyz(grid[, output_type, outfile])

Convert grid to data table.

grdclip(grid[, outgrid])

Set values in a grid that meet certain criteria to a new value.

grdcut(grid, **kwargs)

Extract subregion from a grid.

grdfill(grid[, outgrid])

Fill blank areas from a grid file.

grdfilter(grid[, outgrid])

Filter a grid in the space (or time) domain.

grdgradient(grid[, outgrid])

Compute the directional derivative of the vector gradient of the data.

grdhisteq()

Perform histogram equalization for a grid.

grdhisteq.equalize_grid(grid[, outgrid])

Perform histogram equalization for a grid.

grdhisteq.compute_bins(grid[, output_type, ...])

Perform histogram equalization for a grid.

grdlandmask([outgrid])

Create a grid file with set values for land and water.

grdproject(grid[, outgrid])

Change projection of gridded data between geographical and rectangular.

grdsample(grid[, outgrid])

Change the registration, spacing, or nodes in a grid file.

grdtrack(grid[, points, output_type, ...])

Sample grids at specified (x,y) locations.

grdvolume(grid[, output_type, outfile])

Determine the volume between the surface of a grid and a plane.

+
+
+

Crossover analysis with x2sys

+ + + + + + + + + +

x2sys_init(tag, *[, fmtfile, suffix, force, ...])

Initialize a new x2sys track database.

x2sys_cross([tracks, outfile])

Calculate crossovers between track data files.

+
+
+
+

Input/output

+ + + + + + +

load_dataarray(filename_or_obj, **kwargs)

Open, load into memory, and close a DataArray from a file or file-like object containing a single data variable.

+
+
+

GMT Defaults

+

Operations on GMT defaults:

+ + + + + + +

config(*[, COLOR_BACKGROUND, ...])

Set GMT defaults globally or locally.

+
+
+

Metadata

+

Getting metadata from tabular or grid data:

+ + + + + + + + + + + + +

GMTDataArrayAccessor(xarray_obj)

GMT accessor for xarray.DataArray.

info(data, *[, per_column, spacing, ...])

Get information about data tables.

grdinfo(grid, *[, per_column, tiles, ...])

Get information about a grid.

+
+
+

Enums

+ + + + + + + + + +

GridRegistration

Enum for the grid registration.

GridType

Enum for the grid type.

+
+
+

Miscellaneous

+ + + + + + + + + +

which(fname, **kwargs)

Find the full path to specified files.

show_versions([file])

Print various dependency versions which are useful when submitting bug reports.

+
+
+

Datasets

+

PyGMT provides access to GMT’s datasets through the pygmt.datasets module. +These functions will download the datasets automatically the first time they are used +and store them in GMT’s user data directory.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

datasets.list_sample_data()

Report datasets available for tests and documentation examples.

datasets.load_black_marble([resolution, region])

Load NASA Black Marble images in various resolutions.

datasets.load_blue_marble([resolution, region])

Load NASA Blue Marble images in various resolutions.

datasets.load_earth_age([resolution, ...])

Load the Earth seafloor crustal age dataset in various resolutions.

datasets.load_earth_deflection([resolution, ...])

Load the IGPP Earth east-west and north-south deflection datasets in various resolutions.

datasets.load_earth_dist([resolution, ...])

Load the GSHHG Earth distance to shoreline dataset in various resolutions.

datasets.load_earth_free_air_anomaly([...])

Load the IGPP Earth free-air anomaly and uncertainty datasets in various resolutions.

datasets.load_earth_geoid([resolution, ...])

Load the EGM2008 Earth geoid dataset in various resolutions.

datasets.load_earth_magnetic_anomaly([...])

Load the Earth magnetic anomaly datasets in various resolutions.

datasets.load_earth_mask([resolution, ...])

Load the GSHHG Earth mask dataset in various resolutions.

datasets.load_earth_mean_dynamic_topography([...])

Load the CNES Earth mean dynamic topography dataset in various resolutions.

datasets.load_earth_mean_sea_surface([...])

Load the CNES Earth mean sea surface dataset in various resolutions.

datasets.load_earth_relief([resolution, ...])

Load the Earth relief datasets (topography and bathymetry) in various resolutions.

datasets.load_earth_vertical_gravity_gradient([...])

Load the IGPP Earth vertical gravity gradient dataset in various resolutions.

datasets.load_mars_relief([resolution, ...])

Load the Mars relief dataset in various resolutions.

datasets.load_mercury_relief([resolution, ...])

Load the Mercury relief dataset in various resolutions.

datasets.load_moon_relief([resolution, ...])

Load the Moon relief dataset in various resolutions.

datasets.load_pluto_relief([resolution, ...])

Load the Pluto relief dataset in various resolutions.

datasets.load_venus_relief([resolution, ...])

Load the Venus relief dataset in various resolutions.

datasets.load_sample_data(name)

Load an example dataset from the GMT server.

+

In addition, there is also a special function to load XYZ tile maps via +contextily to be used as base maps.

+ + + + + + +

datasets.load_tile_map(region[, zoom, ...])

Load a georeferenced raster tile map from XYZ tile providers.

+
+
+

Exceptions

+

All custom exceptions are derived from pygmt.exceptions.GMTError.

+ + + + + + + + + + + + + + + + + + + + + + + + +

exceptions.GMTError

Base class for all GMT related errors.

exceptions.GMTInvalidInput

Raised when the input of a function/method is invalid.

exceptions.GMTVersionError

Raised when an incompatible version of GMT is being used.

exceptions.GMTOSError

Unsupported operating system.

exceptions.GMTCLibError

Error encountered when running a function from the GMT shared library.

exceptions.GMTCLibNoSessionError

Tried to access GMT API without a currently open GMT session.

exceptions.GMTCLibNotFoundError

Could not find the GMT shared library.

+
+
+

GMT C API

+

The pygmt.clib package is a wrapper for the GMT C API built using ctypes. +Most calls to the C API happen through the pygmt.clib.Session class.

+ + + + + + +

clib.Session()

A GMT API session where most operations involving the C API happen.

+

GMT modules are executed through +the call_module method:

+ + + + + + +

clib.Session.call_module(module, args)

Call a GMT module with the given arguments.

+

Passing memory blocks between Python data objects (e.g. numpy.ndarray, +pandas.Series, xarray.DataArray, etc) and GMT happens through +virtual files. These methods are context managers that automate the conversion of +Python objects to and from GMT virtual files:

+ + + + + + + + + + + + + + + +

clib.Session.virtualfile_in([check_kind, ...])

Store any data inside a virtual file.

clib.Session.virtualfile_out([kind, fname])

Create a virtual file or an actual file for storing output data.

clib.Session.virtualfile_to_dataset(vfname)

Output a tabular dataset stored in a virtual file to a different format.

clib.Session.virtualfile_to_raster(vfname[, ...])

Output raster data stored in a virtual file to an xarray.DataArray object.

+

Low level access (these are mostly used by the pygmt.clib package):

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

clib.Session.create(name)

Create a new GMT C API session.

clib.Session.destroy()

Destroy the currently open GMT API session.

clib.Session.__getitem__(name)

Get the value of a GMT constant.

clib.Session.__enter__()

Create a GMT API session.

clib.Session.__exit__(exc_type, exc_value, ...)

Destroy the currently open GMT API session.

clib.Session.get_default(name)

Get the value of a GMT configuration parameter or a GMT API parameter.

clib.Session.get_common(option)

Inquire if a GMT common option has been set and return its current value if possible.

clib.Session.create_data(family, geometry, mode)

Create an empty GMT data container and allocate space to hold data.

clib.Session.put_matrix(dataset, matrix[, pad])

Attach a 2-D numpy array to a GMT dataset.

clib.Session.put_strings(dataset, family, ...)

Attach a 1-D numpy array of dtype str as a column on a GMT dataset.

clib.Session.put_vector(dataset, column, vector)

Attach a 1-D numpy array as a column on a GMT dataset.

clib.Session.read_data(infile, kind[, ...])

Read a data file into a GMT data container.

clib.Session.write_data(family, geometry, ...)

Write a GMT data container to a file.

clib.Session.open_virtualfile(family, ...)

Open a GMT virtual file associated with a data object for reading or writing.

clib.Session.read_virtualfile(vfname[, kind])

Read data from a virtual file and optionally cast into a GMT data container.

clib.Session.extract_region()

Extract the region of the currently active figure.

clib.Session.get_libgmt_func(name[, ...])

Get a ctypes function from the libgmt shared library.

clib.Session.virtualfile_from_data([...])

Store any data inside a virtual file.

clib.Session.virtualfile_from_grid(grid)

Store a grid in a virtual file.

clib.Session.virtualfile_from_stringio(stringio)

Store a io.StringIO object in a virtual file.

clib.Session.virtualfile_from_matrix(matrix)

Store a 2-D numpy array as a matrix inside a virtual file.

clib.Session.virtualfile_from_vectors(...)

Store a sequence of 1-D vectors as columns of a dataset inside a virtual file.

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/changes.html b/v0.14.0/changes.html new file mode 100644 index 00000000000..b9ed44f6bb9 --- /dev/null +++ b/v0.14.0/changes.html @@ -0,0 +1,2354 @@ + + + + + + + + + Changelog — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Changelog

+
+

Release v0.14.0 (2024/12/31)

+

Digital Object Identifier for PyGMT v0.14.0

+
+

Highlights

+
    +
  • 🎉 Fourteenth minor release of PyGMT 🎉

  • +
  • Bump minimum supported version to GMT>=6.4.0 (#3450)

  • +
  • Two new plotting methods and six new functions to access more GMT remote datasets

  • +
  • PyArrow as an optional dependency and improved support of PyArrow data types (#3592)

  • +
+
+
+

New Features

+
    +
  • Add Figure.hlines for plotting horizontal lines (#923)

  • +
  • Add Figure.vlines for plotting vertical lines (#3726)

  • +
  • Add load_black_marble to load “Black Marble” dataset (#3469)

  • +
  • Add load_blue_marble to load “Blue Marble” dataset (#2235)

  • +
  • Add load_earth_deflection to load “IGPP Earth east-west and north-south deflection” datasets (#3728)

  • +
  • Add load_earth_dist to load “GSHHG Earth distance to shoreline” dataset (#3706)

  • +
  • Add load_earth_mean_dynamic_topography to load “CNES Earth Mean Dynamic Topography” dataset (#3718)

  • +
  • Add load_earth_mean_sea_surface to load “CNES Earth Mean Sea Surface” dataset (#3717)

  • +
  • load_earth_free_air_anomaly: Add “uncertainty” parameter to load the “IGPP Earth free-air anomaly uncertainty” dataset (#3727)

  • +
+
+
+

Enhancements

+
    +
  • Figure.plot: Add the “symbol” parameter to support plotting data points with varying symbols (#1117)

  • +
  • Figure.plot3d: Add the “symbol” parameter to support plotting data points with varying symbols (#3559)

  • +
  • Figure.legend: Support passing a StringIO object as the legend specification (#3438)

  • +
  • load_tile_map: Add parameter “crs” to set the CRS of the returned dataarray (#3554)

  • +
  • PyArrow: Support pyarrow arrays with string/large_string/string_view types (#3619)

  • +
  • Support 1-D/2-D numpy arrays with longlong and ulonglong dtype (#3566)

  • +
  • GMT_IMAGE: Implement the to_dataarray method for 3-band images (#3128)

  • +
  • Ensure non-ASCII characters are typeset correctly even if PS_CHAR_ENCODING is not “ISOLatin1+” (#3611)

  • +
  • Add enums GridRegistration and GridType for grid registration and type (#3693)

  • +
+
+
+

Deprecations

+
    +
  • SPEC 0: Bump minimum supported versions to Python 3.11, NumPy 1.25, pandas>=2.0 and xarray>=2023.04 (#3460, #3606, #3697)

  • +
  • clib.Session.virtualfile_from_vectors: Now takes a sequence of vectors as its single argument (Passing multiple arguments will be unsupported in v0.16.0) (#3522)

  • +
  • Remove the deprecated build_arg_string function (deprecated since v0.12.0) (#3427)

  • +
  • Figure.grdcontour: Remove the deprecated syntax for the ‘annotation’ parameter (deprecated since v0.12.0) (#3428)

  • +
+
+
+

Bug Fixes

+
    +
  • launch_external_viewer: Use full path when opening the file in a web browser (#3647)

  • +
  • PyArrow: Map date32[day]/date64[ms] dtypes in pandas objects to np.datetime64 with correct date/time units (#3617)

  • +
  • clib.session: Add the GMT_SESSION_NOGDALCLOSE flag to keep GDAL open (#3672)

  • +
  • Set the “Conventions” attribute to “CF-1.7” for netCDF grids only (#3463)

  • +
  • Fix the conversion error for pandas.Series with missing values in pandas<=2.1 (#3505, #3596)

  • +
  • GeoPandas: Explicitly convert columns with overflow integers to avoid OverflowError with fiona 1.10 (#3455)

  • +
  • Figure.plot/Figure.plot3d: Improve the check of the “style” parameter for “v” or “V” (#3603)

  • +
  • Correctly reserve the grid data dtype by converting ctypes array to numpy array with np.ctypeslib.as_array (#3446)

  • +
  • Breaking: Figure.text: Fix typesetting of integers when mixed with floating-point values (#3493)

  • +
+
+
+

Documentation

+
    +
  • Add basic tutorial “Plotting polygons” (#3593)

  • +
  • Update the gallery example for plotting lines with LineString/MultiLineString geometry (#3711)

  • +
  • Add the PyGMT ecosystem page (#3475)

  • +
  • Document the support policy for optional packages (#3616)

  • +
  • Document the environment variables that can affect the behavior of PyGMT (#3432)

  • +
  • Document the built-in patterns in the Technical Reference section (#3466)

  • +
  • Document Continuous Benchmarking in Maintainers Guides (#3631)

  • +
  • Add instructions for installing optional dependencies (#3506)

  • +
  • Update “PyData Ecosystem” to “Scientific Python Ecosystem” (#3447)

  • +
  • Figure.savefig: Clarify that the “transparent” parameter also works for the PNG file associated with the KML format (#3579)

  • +
  • Add the PyGMT talk at AGU24 to the “Overview” section (#3685)

  • +
  • Add the GMT/PyGMT pre-conference workshop at AGU24 to the “External resources” section (#3689)

  • +
  • Add TODO comments in the maintainers guides and update the release checklist (#3724)

  • +
+
+
+

Maintenance

+
    +
  • Breaking: data_kind: data is None and required now returns the “empty” kind (#3482)

  • +
  • Breaking: data_kind: Now “matrix” represents a 2-D numpy array and unrecognized data types fall back to “vectors” (#3351)

  • +
  • Add Support for Python 3.13 (#3490)

  • +
  • Add the Session.virtualfile_from_stringio method to allow StringIO input for certain functions/methods (#3326)

  • +
  • Add “geodatasets” as a dependency for docs and update the choropleth example (#3719)

  • +
  • PyArrow: Check compatibility of pyarrow.array with string type (#2933)

  • +
  • Rename sphinx-gallery’s README.txt to GALLERY_HEADER.rst and require Sphinx-Gallery>=0.17.0 (#3348)

  • +
  • clib.conversion: Remove the as_c_contiguous function and use np.ascontiguousarray instead (#3492)

  • +
  • Use TODO comments to track deprecations and workarounds (#3722)

  • +
  • Move Figure.psconvert into a separate file (#3553)

  • +
  • Improve the data type checking for 2-D arrays passed to the GMT C API (#3563)

  • +
  • Enable ruff’s TD (flake8-todos), COM (flake8-commas), TRY (tryceratops), and EM (flake8-errmsg) rules (#3723, #3531, #3665, #3661)

  • +
  • CI: Install pyarrow-core instead of pyarrow from conda-forge (#3698)

  • +
  • CI: Ensure no hyphens in Python file and directory names in the “Style Checks” workflow (#3703)

  • +
  • Bump to ruff>=0.8.0 and rename rule TCH to TC (#3662)

  • +
  • Bump to Ghostscript 10.04.0 (#3443)

  • +
  • Add enums GridFormat for GMT grid format ID (#3449)

  • +
+

Full Changelog: https://github.com/GenericMappingTools/pygmt/compare/v0.13.0…v0.14.0

+
+
+

Contributors

+ +
+
+
+

Release v0.13.0 (2024/09/05)

+

Digital Object Identifier for PyGMT v0.13.0

+
+

Highlights

+
    +
  • 🎉 Thirteenth minor release of PyGMT 🎉

  • +
  • Add new documentation section “Technical Reference” and document the supported encodings and fonts

  • +
  • Tutorial for “Draping a dataset on top of a topographic surface” (#3316)

  • +
  • Tutorial for “Typesetting non-ASCII characters” (#3389)

  • +
+
+
+

New Features

+
    +
  • Wrap the GMT API function GMT_Read_Data to read data into GMT data containers (#3324)

  • +
  • Wrap GMT’s standard data type GMT_IMAGE for images (#3338)

  • +
+
+
+

Enhancements

+
    +
  • Breaking: pygmt.x2sys_cross: Refactor to use virtualfiles for output tables (#3182)

  • +
  • pygmt.show_versions: Warn about incompatible Ghostscript versions (#3244)

  • +
  • pygmt.show_versions: Show GDAL version (#3364, #3376)

  • +
  • pygmt.datasets.load_*: Add autocompletion support for the ‘resolution’ parameter (#3260)

  • +
  • clib.Session: Refactor the __getitem__ special method to avoid calling API function GMT_Get_Enum repeatedly (#3261)

  • +
  • clib: Refactor to avoid checking GMT version repeatedly and only check once when loading the GMT library (#3254)

  • +
  • Support non-ASCII characters in ISO-8859-x charsets (#3310)

  • +
  • Refactor to improve the user experience with non-ASCII characters (#3206)

  • +
+
+
+

Deprecations

+
    +
  • SPEC 0: Bump minimum supported version to xarray 2022.09 (#3372)

  • +
  • SPEC 0: Bump minimum supported version to NumPy 1.24 (#3286)

  • +
  • clib: Deprecate API function ‘Session.virtualfile_from_data’, use ‘Session.virtualfile_in’ instead (will be removed in v0.15.0) (#3225)

  • +
  • Remove the unused pygmt.print_clib_info function (#3257)

  • +
  • Figure.timestamp: Remove deprecated parameter ‘justification’, use ‘justify’ instead (deprecated since v0.11.0) (#3222)

  • +
+
+
+

Bug Fixes

+
    +
  • pygmt.set_display: Fix the bug that method=None doesn’t reset to the default display method (#3396)

  • +
  • load_tile_map: Register the rio accessor by importing rioxarray, so the returned raster has CRS (#3323)

  • +
  • load_tile_map: Fix the raster band indexing, should start from 1 (#3322)

  • +
  • load_tile_map: Replace deprecated rio.set_crs with rio.write_crs (#3321)

  • +
  • PYGMT_USE_EXTERNAL_DISPLAY should NOT disable image display in Jupyter notebook environment (#3418)

  • +
+
+
+

Documentation

+
    +
  • External Resources: Add tutorial in Portuguese and using PyGMT in Google Colab (#3360)

  • +
  • Remove the non-official GMT wrappers from README (#3413)

  • +
  • Give recommendations about GMT-Ghostscript incompatibility and the testing example (#3249)

  • +
  • Document the supported 35 standard Postscript fonts in the Technical Reference section (#3378)

  • +
  • Add an offboarding access checklist for maintainers (#3411)

  • +
  • Update the onboarding access checklist in Maintainers Guides (#3404)

  • +
  • Add sphinx extension myst-nb to enable writing executable Markdown notebooks (#3379)

  • +
+
+
+

Maintenance

+
    +
  • pygmt.grd2cpt & pygmt.makecpt: Simplify the logic for dealing with CPT output (#3334)

  • +
  • geopandas: Use io.StringIO to read geojson data and handle compatibility with geopandas v0.x and v1.x (#3247)

  • +
  • Simplify the “Minimum Supported Versions” page using MyST customized URL schemes (#3383)

  • +
  • build_arg_list: Raise an exception if an invalid output file name is given (#3336)

  • +
  • sphinx-gallery: Temporarily pin to < 0.17.0 (#3350)

  • +
  • Run pytest with --color=yes to force GitHub Actions logs to have color (#3330)

  • +
  • Patch the callback print function to suppress the UnicodeDecodeError (#3367)

  • +
  • Move Will from Active Maintainers to Distinguished Contributors (#3388)

  • +
  • Enable ruff’s unspecified-encoding (PLW1514) rule and fix violations (#3319)

  • +
  • Enable ruff’s literal-membership (PLR6201) rule and fix violations (#3317)

  • +
  • Determine the minimum required versions of dependencies from package metadata for docs (#3380)

  • +
  • CI: Use OIDC token for codecov uploading (#3163)

  • +
  • CI: Test NumPy 2.1 in the GMT Tests workflow (#3401)

  • +
  • CI: Set GMT_ENABLE_OPENMP to TRUE to enable OpenMP support on macOS (#3266)

  • +
  • CI: Fix the name of the ‘build’ package to ‘python-build’ on conda-forge (#3408)

  • +
  • CI: Bump to ubuntu-24.04 and mambaforge-23.11 in ReadTheDocs (#3296)

  • +
  • CI: Build GMT dev source code with OpenMP enabled on Linux and GThreads enabled on Linux/macOS (#3011)

  • +
  • CI: Add pytest plugins pytest-xdist and pytest-rerunfailures (#3193, #3267)

  • +
  • Add pre-commit config with pre-commit-hooks and enable pre-commit.ci to update hooks quarterly (#3283, #3414)

  • +
  • Add a test to make sure PyGMT works with paths that contain non-ASCII characters (#3280)

  • +
+

Full Changelog: https://github.com/GenericMappingTools/pygmt/compare/v0.12.0…v0.13.0

+
+
+

Contributors

+ +
+
+
+
+

Release v0.12.0 (2024/05/01)

+

Digital Object Identifier for PyGMT v0.12.0

+
+

Highlights

+
    +
  • 🎉 Twelfth minor release of PyGMT 🎉

  • +
  • 🚀 Almost all module wrappers (with a few exceptions) now use in-memory GMT virtual files instead of intermediate temporary files to improve performance (#2730)

  • +
  • Almost all module wrappers (with a few exceptions) now have consistent behavior for table-like output (#1318)

  • +
  • Adopt SPEC 0 policy for minimum supported versions of GMT, Python, and other core dependencies

  • +
+
+
+

Enhancements

+
    +
  • Breaking: (Unneeded) extra double quotes around text strings (containing whitespaces) are now considered as part of the text string (#3132, #3457)

  • +
  • pygmt.project: Add ‘output_type’ parameter for output in pandas/numpy/file formats (#3110)

  • +
  • pygmt.grdtrack: Add ‘output_type’ parameter for output in pandas/numpy/file formats (#3106)

  • +
  • pygmt.blockm*: Add ‘output_type’ parameter for output in pandas/numpy/file formats (#3103)

  • +
  • Figure.grdcontour: Adjust processing arguments passed to “annotation” and “interval” parameters (#3116)

  • +
  • Figure.contour: Adjust processing arguments passed to “annotation” and “levels” parameters (#2706)

  • +
  • clib: Wrap the GMT API function GMT_Read_VirtualFile (#2993)

  • +
  • clib: Add virtualfile_to_dataset method for converting virtualfile to a dataset (#3083, #3140, #3157, +#3117)

  • +
  • clib: Add the virtualfile_out method for creating output virtualfile (#3057)

  • +
  • Wrap GMT_Inquire_VirtualFile to get the family of virtualfiles (#3152)

  • +
  • Wrap GMT’s standard data type GMT_GRID for grids (#2398)

  • +
  • Wrap GMT’s standard data type GMT_DATASET for table inputs (#2729, #3131, #3174)

  • +
  • Wrap GMT’s data structure GMT_GRID_HEADER for grid/image/cube headers (#3127, #3134)

  • +
  • Session.call_module: Support passing a list of argument strings (#3139)

  • +
  • Refactor the _load_remote_dataset function to load tiled and non-tiled grids in a consistent way (#3120)

  • +
  • Refactor all wrappers to pass an argument list to Session.call_module (#3132)

  • +
  • Add function build_arg_list for building arguments list from keyword dictionaries (#3149)

  • +
  • Support left/right single quotation marks in text and arguments (#3192)

  • +
  • non_ascii_to_octal: Return the input string if it only contains printable ASCII characters (#3199)

  • +
+
+
+

Deprecations

+
    +
  • SPEC 0: Set minimum supported versions to Python>=3.10, pandas>=1.5 and xarray>=2022.06 (#3043, #3039, #3151)

  • +
  • Figure.plot/plot3d/rose: Remove deprecated parameter “color”, use “fill” instead (deprecated since v0.8.0) (#3032)

  • +
  • Figure.velo: Remove deprecated parameters “color”/”uncertaintycolor”, use “fill”/”uncertaintyfill” instead (deprecated since v0.8.0) (#3034)

  • +
  • Figure.wiggle: Remove deprecated parameter “color”, use “fillpositive”/”fillnegative” instead (deprecated since v0.8.0) (#3035)

  • +
  • Figure.grdimage: Remove deprecated parameter “bit_color”, use “bitcolor” instead (deprecated since v0.8.0) (#3036)

  • +
  • Figure: Remove deprecated “xshift” (“X”) and “yshift” (“Y”) parameters, use “Figure.shift_origin” instead (deprecated since v0.8.0) (#3044)

  • +
  • Figure: Remove deprecated “timestamp” (“U”) parameter, use “Figure.timestamp” instead (deprecated since v0.9.0) (#3045)

  • +
  • clib: Rename the “virtualfile_from_data” method to “virtualfile_in” (#3068)

  • +
  • Deprecate the “build_arg_string” function, use build_arg_list instead (deprecated since v0.12.0, will be removed in v0.14.0) (#3184)

  • +
  • Deprecate the “sequence_plus” converter, only used for the “annotation” parameter of Figure.grdcontour (deprecated since v0.12.0, will be removed in v0.14.0) (#3207)

  • +
  • Figure.grdcontour: Deprecate parameter “interval” to “levels” (FutureWarning since v0.12.0, will be removed in v0.16.0) (#3209)

  • +
+
+
+

Documentation

+
    +
  • External Resources: Add repository “gmt-pygmt-plotting” (#3213)

  • +
  • Gallery example “Custom symbols”: Mention own custom symbols (#3186)

  • +
  • Intro “04 Table inputs”: Document that a list of file names, pathlib.Path objects, URLs, or remote files is supported (3214)

  • +
  • Tutorial “Plotting text”: Rewrite to improve structure, explain more parameters, show list input (#2760)

  • +
+
+
+

Maintenance

+
    +
  • pygmt.filter1d: Improve performance by storing output in virtual files (#3085)

  • +
  • pygmt.grdvolume: Refactor to store output in virtual files instead of temporary files (#3102)

  • +
  • pygmt.grdhisteq.compute_bins: Refactor to store output in virtual files instead of temporary files (#3109)

  • +
  • pygmt.grd2xyz: Improve performance by storing output in virtual files (#3097)

  • +
  • pygmt.select: Improve performance by storing output in virtual files (#3108)

  • +
  • pygmt.triangulate.delaunay_triples: Improve performance by storing output in virtual files (#3107)

  • +
  • pygmt.which: Refactor to get rid of temporary files (#3148)

  • +
  • Use consistent names (vintbl and vingrd) for input virtual files (#3082)

  • +
  • Add sequence_to_ctypes_array to convert a sequence to a ctypes array (#3136)

  • +
  • Add strings_to_ctypes_array to convert a sequence of strings into a ctypes array (#3137)

  • +
  • Figure.psconvert: Ignore the unrecognized “metadata” parameter added by pytest-mpl v0.17.0 (#3054)

  • +
  • Remote Datasets: Adjust attributes - remove “title”, use default of “name” and “long_name”, introduce “description” (#3048)

  • +
  • Adopt SPEC 0 policy and drop NEP 29 policy (#3037)

  • +
  • Document the support policy for minimum required GMT versions (#3070)

  • +
  • Bump to ghostscript 10.03.0 (#3112)

  • +
  • Bump to ruff 0.3.0 (#3081)

  • +
  • Enable ruff’s PTH (flake8-use-pathlib) rules and fix violations (#3129)

  • +
  • Change the dev dependency “matplotlib” to “matplotlib-base” to reduce environment size (#3158)

  • +
  • Migrate from os.path to pathlib (#3119)

  • +
  • CI: Use “gh release” to upload assets to release (#3187)

  • +
  • CI: Consistently use github.token instead of secrets.GITHUB_TOKEN (#3189)

  • +
  • CI: Configure workflows to run on “workflow_dispatch” event (#3133)

  • +
  • Switch to official GitHub action for managing app tokens (#3165)

  • +
+

Full Changelog: https://github.com/GenericMappingTools/pygmt/compare/v0.11.0…v0.12.0

+
+
+

Contributors

+ +
+
+
+

Release v0.11.0 (2024/02/01)

+

Digital Object Identifier for PyGMT v0.11.0

+
+

Highlights

+
    +
  • 🎉 Eleventh minor release of PyGMT 🎉

  • +
  • Tutorial for table inputs (#2722) and gallery example for choropleth map (#2796)

  • +
  • Easy access to planetary relief datasets (Mercury, Venus, Moon, Mars, Pluto) (#3028, #2906, #2674, #2847, #3027)

  • +
  • Faster PyGMT by ~0.1 seconds for each module call (#2930)

  • +
+
+
+

New Features

+
    +
  • Support timedelta64 dtype as input (#2884)

  • +
  • Figure.text: Support passing in a list of angle/font/justify values (#2720)

  • +
  • Figure.savefig: Support saving figures in PPM (.ppm) format (#2771)

  • +
  • Figure.savefig: Support generating GeoTIFF file (with extension ‘.tiff’) (#2698)

  • +
  • Figure.savefig: Add the ‘worldfile’ parameter to write a companion world file for raster images (#2766)

  • +
+
+
+

Enhancements

+
    +
  • geopandas: Correctly handle columns with integer values bigger than the largest 32-bit integer (#2841)

  • +
  • pyarrow: Support date32[day] and date64[ms] dtypes in pandas objects (#2845)

  • +
  • datasets.load_tile_map and Figure.tilemap: Add “zoom_adjust” parameter (#2934)

  • +
  • grdlandmask: Add common alias “cores” for “x” (#2944)

  • +
  • Figure.coast: Add alias “box” for “-F” (#2823)

  • +
  • Improve the error messages for unsupported numpy dtypes (#2856)

  • +
  • Set GMT_SESSION_NAME to a unique name on Windows for multiprocessing support (#2938)

  • +
  • Figure.savefig: Support .jpeg as JPEG image extension (#2691)

  • +
  • Figure.savefig: Support uppercase file extensions (e.g., PNG, PDF) (#2697)

  • +
+
+
+

Deprecations

+
    +
  • Rename API function Session.open_virtual_file to Session.open_virtualfile (remove in v0.15.0) (#2996)

  • +
  • NEP29: Set minimum required version to NumPy 1.23+ (#2991)

  • +
  • Figure.timestamp: Deprecate parameter ‘justification’ to ‘justify’ (remove in v0.13.0) (#3002)

  • +
  • Figure.grdimage: Remove the unsupported ‘img_out’/’A’ parameter (#2907)

  • +
+
+
+

Bug Fixes

+
    +
  • pygmt.which: Fix the bug when passing multiple files (#2726)

  • +
  • pygmt.filter1d: Fix the bug that the first line is read as headers (#2780)

  • +
  • clib: Fix the bug when passing multiple columns of strings with variable lengths to the GMT C API (#2719)

  • +
  • Let kwargs_to_strings work with default values and positional arguments (#2826)

  • +
  • Figure.meca: Fix typo pricipal_axis -> principal_axis (#2940)

  • +
+
+
+

Documentation

+
    +
  • Add gallery example “Scale bar” (#2822)

  • +
  • Add gallery example for plotting connection lines (“connection” parameter of Figure.plot) (#2999)

  • +
  • Add gallery example showing how to adjust line segment ends (caps and joints) (#3015)

  • +
  • Gallery example “Legend”: Update regarding input data and multi-column legends (#2762)

  • +
  • Add the Japanese “PyGMT-HOWTO” tutorial to “External Resources” (#2743)

  • +
  • Figure.plot: Update docstring for “connection” parameter to GMT 6.5 (#2994)

  • +
  • Use consistent description for the “outgrid” parameter (#2874)

  • +
  • Improve the onboarding access checklist for contributors, maintainers and administrators (#2656)

  • +
  • Recommend Miniforge instead of Mambaforge (#2833)

  • +
+
+
+

Maintenance

+
    +
  • pyarrow: Check compatibility of pyarrow-backed pandas objects with numeric dtypes (#2774)

  • +
  • Switch away from Stamen basemaps (#2717)

  • +
  • Add the “validate_output_table_type” function to check the “output_type” parameter (#2772)

  • +
  • Create “skip_if_no” helper function to skip tests when missing a package (#2883)

  • +
  • Fix “fixture_xr_image” to open “earth_day_01d” directly with rioxarray (#2963)

  • +
  • Improve the way to import optional modules (#2809)

  • +
  • Move variable __gmt_version__ to pygmt.clib to avoid cyclic-import errors (#2713)

  • +
  • Refactor the internal “_load_remote_dataset function” to simplify datasets’ definitions (#2917)

  • +
  • Benchmark grdsample, grdfilter and sph2grd with fixed cores (#2945)

  • +
  • Setup Continuous Benchmarking workflow with pytest-codspeed (#2908)

  • +
  • Update output shape and mean values from some x2sys_cross tests (#2986)

  • +
  • Bump the GMT version in CI to 6.5.0 (#2962)

  • +
  • Bump ghostscript to 10.02.1 (#2694)

  • +
  • Add support for Python 3.12 (#2711)

  • +
  • NEP29: Test PyGMT on NumPy 1.26 (#2692)

  • +
  • CI: Trigger the cache_data workflow in PRs if cache files are added/deleted/updated (#2939)

  • +
  • CI: Test GMT dev version on Windows by building from source (#2773)

  • +
  • CI: Set cache-downloads to false to speedup the “Setup Micromamba” step (#2946)

  • +
  • CI: Run certain GitHub Actions workflows on official repo only (#2951)

  • +
  • CI: Run benchmarks if PR is labeled with “run/benchmark” (#2958)

  • +
  • CI: Run “GMT Dev Tests” if PR is labeled with “run/test-gmt-dev” (#2960)

  • +
  • CI: Require at least one code block separator for example files in the Style Checks workflow (#2810)

  • +
  • Add Mypy for static type checking (#2808)

  • +
  • TYP: Improve the doc style for type hints (#2813)

  • +
  • TYP: Add type hints support for pygmt.datasets.load_sample_data (#2859)

  • +
  • TYP: Add type hints for the “registration” parameter in pygmt.datasets.load_* functions (#2867)

  • +
  • TYP: Add type hints for “data_source” in load_earth_relief and load_earth_magnetic_anomaly functions (#2849)

  • +
  • TYP: Add type hints for parameters of Figure.timestamp(#2890)

  • +
  • TYP: Add type hints for “terminator” in Figure.solar and simplify codes (#2881)

  • +
  • TYP: Add type hints for parameters of Figure.shift_origin, improve docstrings, and add inline examples (#2879)

  • +
  • doc: Convert the installation guides source code from ReST to Markdown (#2992)

  • +
  • doc: Convert overview source code from ReST to Markdown (#2953)

  • +
  • doc: Move compatibility table from README to separate file (#2862)

  • +
  • Enable the PDF format documentation in the ReadTheDocs site (#2876)

  • +
  • Add the full changelog link to the release drafter template (#2838)

  • +
  • Release Drafter: Automatically replace GitHub handles with names and links (#2777)

  • +
  • Exclude CODE_OF_CONDUCT.md, AUTHORSHIP.md and pygmt/tests directory from distributions (#2957)

  • +
  • Add Zenodo’s GMT community to the maintainer’s onboarding list (#2761)

  • +
  • Use ruff to lint and format codes, and remove flakeheaven/isort/black/blackdoc (#2741)

  • +
  • Use codespell to check common misspellings (#2673)

  • +
  • Use “# %%” as code block separators in examples (#2662)

  • +
+

Full Changelog: https://github.com/GenericMappingTools/pygmt/compare/v0.10.0…v0.11.0

+
+
+

Contributors

+ +
+
+
+
+

Release v0.10.0 (2023/09/02)

+

Digital Object Identifier for PyGMT v0.10.0

+
+

Highlights

+
    +
  • 🎉 Tenth minor release of PyGMT 🎉

  • +
  • Support non-ASCII characters in Figure.text (#2638) and other method arguments (#2584)

  • +
  • Three new tutorials and seven new gallery examples

  • +
+
+
+

Enhancements

+
    +
  • Figure.colorbar: Add alias for “Q” (#2608)

  • +
  • Figure.grdimage: Allow passing RGB xarray.DataArray images (#2590)

  • +
  • Figure.image: Add alias for “G” (#2615)

  • +
  • Figure.meca: Add aliases for “L”, “T”, and “Fr” (#2546)

  • +
  • clib.Session: Wrap the GMT_Get_Common API function (#2500)

  • +
  • pygmt.grdfill: Add alias for “N” (#2618)

  • +
  • pygmt.select: Add aliases for “C”, “F”, and “L” (#2466)

  • +
  • pygmt.show_versions: Show versions of IPython and rioxarray (#2492)

  • +
  • Better handling of optional virtual files (e.g., shading in Figure.grdimage) (#2493)

  • +
+
+
+

Deprecations

+
    +
  • Remove the unused pygmt.test() function (#2652)

  • +
  • Figure.grdimage: Deprecate parameter “bit_color” to “bitcolor” (remove in v0.12.0) (#2635)

  • +
  • Figure.text: Remove the deprecated “incols” parameter (deprecated since v0.8.0) (#2473)

  • +
  • NEP29: Set minimum required version to Python 3.9+ (#2487)

  • +
  • NEP29: Set minimum required version to NumPy 1.22+ (#2586)

  • +
+
+
+

Bug Fixes

+
    +
  • load_earth_mask: Keep data’s encoding to correctly infer data’s registration and gtype information (#2632)

  • +
  • Geopandas integration: Mapping int/int64 to int32 for OGR_GMT format (#2592)

  • +
  • Figure.meca: Let the “scale” parameter accept int/float/str values (#2566)

  • +
  • Figure.meca: Fix beachball offsetting for ndarray input (requires GMT>6.4.0) (#2576)

  • +
+
+
+

Documentation

+
    +
  • Document the default CPT for GMT remote datasets (#2573)

  • +
  • Add tutorial to explain naming of PyGMT figure elements (#2383)

  • +
  • Add tutorial to show interactive data visualization via panel (#2498)

  • +
  • Add tutorial for cartesian histograms (#2445)

  • +
  • Add gallery example to show usage of dcw parameter in Figure.coast (#2428)

  • +
  • Add gallery example to show usage of tile maps (#2585)

  • +
  • Add gallery example showing how to build an envelope around a curve (#2587)

  • +
  • Add gallery example for plotting an RGB image from an xarray.DataArray (#2641)

  • +
  • Add gallery example “Quoted lines” (style="q") (#2563)

  • +
  • Add gallery example “Decorated lines” (style="~") (#2564)

  • +
  • Add gallery example “Cross-section along a transect” (#2515)

  • +
+
+
+

Maintenance

+
    +
  • Use substitutions to show the minimum required Python and GMT versions dynamically in installation guides (#2488)

  • +
  • Use np.asarray to convert a 1-D array to datetime type in array_to_datetime (#2481)

  • +
  • Use consistent docstrings for test files (#2578)

  • +
  • Use concurrency to cancel previous runs (#2589)

  • +
  • Set date_format to ISO8601 to silence pandas 2.0 UserWarning on read_csv (#2569)

  • +
  • Remove dummy_context and use contextlib.nullcontext instead (#2491)

  • +
  • NEP29: Test PyGMT on NumPy 1.25 (#2581)

  • +
  • Fix tests for Aug 2023 updated remote datasets (#2636)

  • +
  • Figure.meca: Refactor the two tests for offsetting beachballs (#2572)

  • +
  • Figure.meca: Refactor tests for plotting multiple focal mechanisms (#2565)

  • +
  • Figure.meca: Refactor tests for plotting a single focal mechanism (#2533)

  • +
  • Figure.meca: Add a test for passing event names via pandas.DataFrame (#2582)

  • +
  • Exclude bots from contributors in release drafter (#2484)

  • +
  • Exclude DVC files from source/binary distributions (#2634)

  • +
  • CI: Use mamba-org/provision-with-micromamba to setup micromamba (#2435)

  • +
  • CI: Migrate provision-with-micromamba to setup-micromamba (#2536)

  • +
  • CI: Run dev tests on scientific Python nightly wheels (#2612)

  • +
  • CI: Remove the deprecated cml-publish command from the dvc-diff workflow (#2559)

  • +
  • CI: Fix and simplify the dvc-diff workflow (#2549)

  • +
  • CI: Add the “Doctests” workflow to run doctests weekly (#2456)

  • +
  • CI: Add detailed descriptions in the workflow files and update maintainer guides (#2496)

  • +
  • Add private function _validate_data_input to validate input data (#2595)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.9.0 (2023/03/31)

+

Digital Object Identifier for PyGMT v0.9.0

+
+

Highlights

+
    +
  • 🎉 Ninth minor release of PyGMT 🎉

  • +
  • Add Figure.tilemap to plot XYZ tile maps (#2394)

  • +
  • Add function to load raster tile maps using contextily (#2125)

  • +
  • Eleven new/updated gallery and inline examples

  • +
+
+
+

New Features

+
    +
  • Add load_earth_mask function for GSHHG Global Earth Mask dataset (#2310)

  • +
  • Add Figure.timestamp to plot the GMT timestamp logo (#2208, #2425)

  • +
+
+
+

Enhancements

+
    +
  • pygmt.surface: Add aliases for “C”, “L”, “M”, and “T” (#2321)

  • +
  • Figure.meca: Add aliases for “C”, “E”, “G”, and “W” (#2345)

  • +
  • Figure.colorbar: Add aliases for “L” and “Z” (#2357)

  • +
+
+
+

Deprecations

+
    +
  • NEP29: Set minimum required version to NumPy 1.21+ (#2389)

  • +
  • Recommend Figure.timestamp and remove timestamp (U) alias from all plotting methods (#2135)

  • +
  • Remove the deprecated load_fractures_compilation function (deprecated since v0.6.0) (#2303)

  • +
  • Remove the deprecated load_hotspots function (deprecated since v0.6.0) (#2309)

  • +
  • Remove the deprecated load_japan_quakes function (deprecated since v0.6.0) (#2301)

  • +
  • Remove the deprecated load_mars_shape function (deprecated since v0.6.0) (#2304)

  • +
  • Remove the deprecated load_ocean_ridge_points function (deprecated since v0.6.0) (#2308)

  • +
  • Remove the deprecated load_sample_bathymetry function (deprecated since v0.6.0) (#2305)

  • +
  • Remove the deprecated load_usgs_quakes function (deprecated since v0.6.0) (#2306)

  • +
  • pygmt.grdtrack: Remove the warning about the incorrect parameter order of ‘points, grid’ (warned since v0.7.0) (#2312)

  • +
+
+
+

Bug Fixes

+
    +
  • GMTDataArrayAccessor: Fallback to default grid registration and gtype if the grid source file doesn’t exist (#2009)

  • +
  • Figure.subplot: Fix setting “sharex”, “sharey”, and “frame” in combination with Figure.basemap (#2417)

  • +
  • Figure.subplot: Fix strange positioning issues after exiting subplot (#2427)

  • +
  • pygmt.config: Correctly reset to default values that contain whitespaces (#2331)

  • +
  • pygmt.set_display: Do nothing when the display method is set to ‘none’ (#2450)

  • +
+
+
+

Documentation

+
    +
  • GMTDataArrayAccessor: Add inline examples for setting GMT specific properties (#2370)

  • +
  • Document limitations of GMT xarray accessors (#2375)

  • +
  • Revise the notes about registration and gtype of remote datasets (#2384)

  • +
  • Add project keywords to the pyproject.toml file (#2315)

  • +
  • Add inline example for colorbar (#2373)

  • +
  • Add inline example for grdview (#2381)

  • +
  • Add inline example for load_earth_mask (#2355)

  • +
  • Add inline example for load_earth_vertical_gravity_gradient (#2356)

  • +
  • Add inline examples and improve documentation for pygmt.set_display (#2458)

  • +
  • Add gallery example showing how to use patterns via the “fill” parameter (or similar parameters) (#2329)

  • +
  • Add gallery example for scatter plot with histograms on sides (#2410)

  • +
  • Add gallery example showing how to use advanced grdgradient via the “azimuth” & “normalize” parameters (#2354)

  • +
  • Add gallery example for the Figure.timestamp method (#2391)

  • +
  • Expand gallery example “Colorbar” for categorical data (#2395)

  • +
  • Expand gallery example “Focal mechanisms” to use “*fill” and “pen” (#2433)

  • +
  • Add working example to quickstart section of README (#2369)

  • +
  • Recommend Mambaforge and mamba in the installation and contributing guides (#2385)

  • +
+
+
+

Maintenance

+
    +
  • Add the GMTSampleData class to simplify the load_sample_data and list_sample_data functions (#2342)

  • +
  • Add a new target ‘doctest’ to run doctests only and simplify Makefile (#2443)

  • +
  • Add a package-level variable __gmt_version__ for development use (#2366)

  • +
  • Allow printing show_versions() to in-memory buffer to enable testing (#2399)

  • +
  • Accept a dict containing configurable GMT parameters in build_arg_string (#2324)

  • +
  • Publish to TestPyPI and PyPI via OpenID Connect token (#2453)

  • +
  • Remove –sdist –wheel flags from the build command (#2420)

  • +
  • Replace ModuleNotFoundError with the more general ImportError (#2441)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.8.0 (2022/12/30)

+

Digital Object Identifier for PyGMT v0.8.0

+
+

Highlights

+
    +
  • 🎉 Eighth minor release of PyGMT 🎉

  • +
  • Added support for tab auto-completion for all GMT default parameters (#2213)

  • +
  • Created functions to download GMT remote datasets (#1786)

  • +
  • Wrapped the ternary module (#1431)

  • +
  • Added an intro tutorial for creating contour maps (#2126)

  • +
+
+
+

New Features

+
    +
  • Add load_earth_free_air_anomaly function for Earth free-air anomaly dataset (#2238)

  • +
  • Add load_earth_geoid function for Earth Geoid dataset (#2236)

  • +
  • Add load_earth_magnetic_anomaly function for Earth magnetic anomaly dataset (#2196, #2239, #2241)

  • +
  • Add load_earth_vertical_gravity_gradient function for Earth vertical gravity gradient dataset (#2240)

  • +
  • load_earth_relief: Add the support of data sources “gebco” , “gebcosi”, and “synbath” (#1818, #2162, #2192, #2281)

  • +
  • Wrap ternary (#1431)

  • +
+
+
+

Enhancements

+
    +
  • Set gridline (if available) as the default grid registration for remote datasets (#2266)

  • +
  • Add ternary sample dataset (#2211)

  • +
  • Figure.ternary: Add parameters “alabel”, “blabel”, and “clabel” (#2139)

  • +
  • Figure.psconvert: Add a new alias “gs_path” (-G) (#2076)

  • +
  • Figure.psconvert: Check if the given prefix is valid (#2170)

  • +
  • Figure.savefig: Raise a FileNotFoundError if the parent directory doesn’t exist (#2160)

  • +
  • Figure.show: Allow keyword arguments passed to Figure.psconvert (#2078)

  • +
  • pygmt.config: Support tab auto-completion for all GMT defaults (#2213)

  • +
  • Rewrite the meca function to support offsetting and labeling beachballs (#1784)

  • +
+
+
+

Deprecations

+
    +
  • Deprecate xshift (X) and yshift (Y) aliases from all plotting modules (remove in v0.12.0) (#2071)

  • +
  • Figure.plot: Deprecate parameter “color” to “fill” (remove in v0.12.0) (#2177)

  • +
  • Figure.plot3d: Deprecate parameter “color” to “fill” (remove in v0.12.0) (#2178)

  • +
  • Figure.rose: Deprecate parameter color to fill (remove in v0.12.0) (#2181)

  • +
  • Figure.velo: Deprecate parameters “color” to “fill” and “uncertaintycolor” to “uncertaintyfill” (remove in v0.12.0) (#2206)

  • +
  • Figure.wiggle: Deprecate parameter “color” (remove in v0.12.0) and add “fillpositive”/”fillnegative” (#2205)

  • +
  • Figure.psconvert: Remove the deprecated parameter “icc_gray” (deprecated since v0.6.0) (#2267)

  • +
  • Figure.text: Deprecate parameter “incols” to “use_word” (remove in v0.10.0) (#1964)

  • +
+
+
+

Bug Fixes

+
    +
  • Figure.meca: Fix line and circle of offset parameter for dict/pandas input (#2226)

  • +
  • Figure.meca: Fix beachball offsetting with dict/pandas inputs (#2202)

  • +
  • Figure.meca: Fix the bug when passing a dict of scalar values to the spec parameter (#2174)

  • +
  • Figure.ternary: Fix the crash for pd.DataFrame input with GMT 6.3.0-6.4.0 (#2274)

  • +
+
+
+

Documentation

+
    +
  • Add intro tutorial section for creating contour map (#2126)

  • +
  • Add gallery example for Figure.ternary method (#2138)

  • +
  • Add gallery example showing the usage of vertical and horizontal bars (#1521)

  • +
  • Add inline example for coast (#2142)

  • +
  • Add inline example for grdcontour (#2148)

  • +
  • Add inline example for grdimage (#2146)

  • +
  • Add inline example for grd2cpt (#2145)

  • +
  • Add inline example for solar (#2147)

  • +
  • Add SciPy 2022 talk to presentations (#2053)

  • +
  • Add instructions to install pygmt kernel for Jupyter users (#2153)

  • +
  • Improve instructions about setting GMT_LIBRARY_PATH env variable (#2136)

  • +
  • Add badges for conda package version, license, and twitter (#2081)

  • +
  • Add PyOpenSci peer reviewed badge to main README (#2112)

  • +
+
+
+

Maintenance

+
    +
  • Add an internal function to load GMT remote datasets (#2200)

  • +
  • Add support for Python 3.11 (#2172)

  • +
  • NEP29: Test PyGMT on NumPy 1.24 (#2256)

  • +
  • NEP29: Test PyGMT on NumPy 1.23 and 1.21 (#2057)

  • +
  • Bump the GMT version in CI to 6.4.0 (#1990)

  • +
  • Update baseline images for GMT 6.4.0 (#1883)

  • +
  • Migrate Continuous Documentation from Vercel to Readthedocs (#1859)

  • +
  • Set nested_sections to False for Sphinx-Gallery 0.11.0 regarding a correct navgation bar (#2046)

  • +
  • Convert bug report, feature, and module request issue templates into yaml configured forms (#2091, #2214, #2216)

  • +
  • doc: Set different html_baseurl for stable and dev versions (#2158)

  • +
  • Update the instructions for checking README syntax (#2265)

  • +
  • Use longname placeholders in the docstrings for common options (#1932)

  • +
  • Add optional dependencies to pyproject.toml (#2069)

  • +
  • Migrate project metadata from setup.py to pyproject.toml following PEP621 (#1848)

  • +
  • Move blackdoc options to pyproject.toml (#2093)

  • +
  • Move docformatter options from Makefile to pyproject.toml (#2072)

  • +
  • Replace flake8 with flakeheaven (#1847)

  • +
  • Add a workflow and Makefile target to test old GMT versions every Tuesday (#2079)

  • +
  • Check if a module outputs to a temporary file using “Path().stat().st_size > 0” (#2224)

  • +
  • pygmt.show_versions: Show GMT binary version and hide the Python interpreter path (#1838)

  • +
  • Refactor grdview and grdimage to use virtualfile_from_data (#1988)

  • +
  • Use the org-wide code of conduct (#2020)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.7.0 (2022/07/01)

+

Digital Object Identifier for PyGMT v0.7.0

+
+

Highlights

+
    +
  • 🎉 Seventh minor release of PyGMT 🎉

  • +
  • Wrapped 3 GMT modules

  • +
  • Added two new PyGMT tutorials and EGU 2022 short course to external resources page (#1971 and #1935)

  • +
+
+
+

New Features

+ +
+
+

Enhancements

+
    +
  • Support passing data in NumPy int8, int16, uint8 and uint16 dtypes to GMT (#1963)

  • +
  • inset: Add region and projection aliases and fix two examples (#1931)

  • +
  • basemap: Plotting frames if required parameters are not given (#1909)

  • +
  • basemap: Added box alias for F (#1894)

  • +
  • Add a sample dataset maunaLoa_co2 (#1961)

  • +
  • Add a sample dataset notre_dame_topography (#1920)

  • +
  • Add a sample dataset earth_relief_holes (#1921)

  • +
+
+
+

Deprecations

+
    +
  • NEP29: Set minimum required version to NumPy 1.20+ (#1985)

  • +
  • Figure.wiggle: Remove parameter ‘columns’, use ‘incols’ instead. (#1977)

  • +
  • Figure.histogram and pygmt.info: Remove parameter ‘table’, use ‘data’ instead (#1975)

  • +
  • pygmt.surface: Remove parameter ‘outfile’, use ‘outgrid’ instead (#1976)

  • +
  • blockm/contour/plot/plot3d/rose/surface/wiggle: Change the parameter order of data array and input arrays (#1978)

  • +
+
+
+

Bug Fixes

+
    +
  • grdtrack: Fix the bug when profile is given (#1867)

  • +
  • Fix the grid accessor (grid registration and type) for 3D grids (#1913)

  • +
+
+
+

Documentation

+
    +
  • Add instructions to install PyGMT using mamba (#1967)

  • +
  • Improve two gallery examples regarding categorical colormaps (#1934)

  • +
  • Add inline example to dimfilter (#1956)

  • +
  • Add inline example to surface (#1953)

  • +
  • Add inline example to grdfill (#1954)

  • +
  • Add inline code examples to contributing guidelines (#1924)

  • +
  • Add thumbnail images to the external resources page (#1941)

  • +
  • Redesign the team gallery using sphinx-design’s card directive (#1937)

  • +
+
+
+

Maintenance

+
    +
  • Fix broken ‘Improve this page’ links using sphinx variable page_source_suffix (#1969)

  • +
  • Split up functions for loading datasets (#1955)

  • +
  • Set setuptools_scm fallback_version to follow PEP440 (#1945)

  • +
  • Refactor text to use virtualfile_from_data (#1121)

  • +
  • Run full tests only on Wednesday scheduled jobs (#1833)

  • +
  • Run GMT Dev Tests on Monday, Wednesday and Friday only (#1922)

  • +
  • Update GMT Dev Tests workflow to test on macOS-12 and ubuntu-22.04 (#1918)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.6.1 (2022/04/11)

+

Digital Object Identifier for PyGMT v0.6.1

+
+

Highlights

+
    +
  • Patch release which allows passing None explicitly to pygmt functions (#1872, #1862, #1857, #1815)

  • +
  • A new tutorial for grdhisteq (#1821)

  • +
+
+
+

Bug Fixes

+
    +
  • Fix pathlib support for plot and plot3d (#1831)

  • +
+
+
+

Documentation

+
    +
  • Add inline example for grdvolume (#1726)

  • +
  • Format author affiliations in CITATION.cff and AUTHORS.md (#1844)

  • +
+
+
+

Maintenance

+
    +
  • NEP29: Run PyGMT tests and docs build on Python 3.10 (#1868)

  • +
  • Let pygmt.show_versions() report geopandas version (#1846)

  • +
  • Refactor build_arg_string to also deal with infile and outfile (#1837)

  • +
  • Migrate build system settings to pyproject.toml following pep517 and pep518 (#1845)

  • +
  • Use the build package to build sdist and wheel distributions (#1823)

  • +
  • Let slash command /test-gmt-dev report job URL (#1866)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.6.0 (2022/03/14)

+

Digital Object Identifier for PyGMT v0.6.0

+
+

Highlights

+
    +
  • 🎉 Sixth minor release of PyGMT 🎉

  • +
  • New inline examples for 14 functions!

  • +
  • Single pygmt.datasets.load_sample_data function for loading any sample dataset (#1685)

  • +
  • Minimum required GMT version is now 6.3.0 (#1649)

  • +
+
+
+

New Features

+
    +
  • Wrap triangulate (#731)

  • +
  • Wrap grdhisteq (#1433)

  • +
+
+
+

Enhancements

+
    +
  • Add alias for blockmean’s -S parameter (#1601)

  • +
  • Allow users to set the waiting time when displaying a preview image using an external viewer (#1618)

  • +
  • Raise an exception if the given parameter is not recognized and is longer than 2 characters (#1792)

  • +
+
+
+

Deprecations

+
    +
  • Figure.plot/plot3d: Remove parameter “sizes”, use “size” instead (#1809)

  • +
  • Figure.contour/plot/plot3d/rose: Remove parameter “columns”, use “incols” instead (#1806)

  • +
  • Figure.psconvert: Add new aliases and deprecate parameter “icc_gray” (remove in v0.8.0) (#1673)

  • +
  • NEP29: Set minimum required version to Python 3.8+ (#1676)

  • +
  • NEP29: Set minimum required version to NumPy 1.19+ (#1675)

  • +
+
+
+

Bug Fixes

+
    +
  • Allow passing arguments containing spaces into pygmt functions (#1487)

  • +
  • Fix the spacing parameter processing for many modules (#1805)

  • +
  • Fix missing gcmt convention keys in pygmt.meca (#1611)

  • +
  • Fix the spacing parameter and check required parameters in xyz2grd (#1804)

  • +
  • Fix UnicodeDecodeError with shapefiles for plot and plot3d (#1695)

  • +
+
+
+

Documentation

+
    +
  • Add a shorter video introduction to the home page (#1769)

  • +
  • Add Liam’s 2021 ROSES video to learning resources (#1760)

  • +
  • Add quick conda install instructions in main README (#1717)

  • +
  • Add instructions for reporting upstream bugs to contributing.md (#1610)

  • +
  • List key development dependencies to install for new contributors (#1783)

  • +
  • Update Code of Conduct to v2.1 (#1754)

  • +
  • Update the contributing guide about pushing changes to dvc and git (#1776)

  • +
  • Update dataset links to the new remote-datasets site (#1785)

  • +
  • Add more sections to the API docs (#1643)

  • +
  • Add an “add a title” to starter tutorial (#1688)

  • +
  • Reorganize tutorial section in the documentation sidebar (#1603)

  • +
  • Update the starter tutorial introduction (#1607)

  • +
  • Add gallery example to showcase blockmean (#1598)

  • +
  • Add gallery example to showcase project (#1696)

  • +
  • Update text symbol gallery example (#1648)

  • +
  • Add inline example for blockmean (#1729)

  • +
  • Add inline example for blockmedian (#1730)

  • +
  • Add inline example for blockmode (#1731)

  • +
  • Add inline example for grd2xyz (#1713)

  • +
  • Add inline example for grdclip (#1711)

  • +
  • Add inline example for grdcut (#1689)

  • +
  • Add inline example for grdgradient (#1720)

  • +
  • Add inline example for grdlandmask (#1721)

  • +
  • Add inline example for grdproject (#1722)

  • +
  • Add inline example for grdsample (#1724)

  • +
  • Add inline example for grdtrack (#1725)

  • +
  • Add inline example for select (#1756)

  • +
  • Add inline example for sph2grd (#1718)

  • +
  • Add inline example for xyz2grd (#1719)

  • +
+
+
+

Maintenance

+
    +
  • Add a test to make sure the incols parameter works for pandas.DataFrame (#1771)

  • +
  • Add load_static_earth_relief function for internal testing (#1727)

  • +
  • Migrate pylint settings from .pylintrc to pyproject.toml (#1755)

  • +
  • NEP29: Test PyGMT on NumPy 1.22 (#1701)

  • +
  • Replace pkg_resources with importlib.metadata (#1674)

  • +
  • Update deprecated -g common option syntax (#1670)

  • +
  • Update deprecated -JG syntax (#1659)

  • +
  • Use pytest-doctestplus to skip some inline doctests (#1790)

  • +
  • Use Python 3.10 in Continuous Integration tests (#1577)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.5.0 (2021/10/29)

+

Digital Object Identifier for PyGMT v0.5.0

+
+

Highlights

+
    +
  • 🎉 Fifth minor release of PyGMT 🎉

  • +
  • Wrapped 12 GMT modules

  • +
  • Standardized and reorder table inputs to be ‘data, x, y, z’ across functions (#1479)

  • +
  • Added a gallery example showing usage of line objects from a geopandas.GeoDataFrame (#1474)

  • +
+
+
+

New Features

+
    +
  • Wrap blockmode (#1456)

  • +
  • Wrap gmtselect (#1429)

  • +
  • Wrap grd2xyz (#1284)

  • +
  • Wrap grdproject (#1377)

  • +
  • Wrap grdsample (#1380)

  • +
  • Wrap grdvolume (#1299)

  • +
  • Wrap nearneighbor (#1379)

  • +
  • Wrap project (#1122)

  • +
  • Wrap sph2grd (#1434)

  • +
  • Wrap sphdistance (#1383)

  • +
  • Wrap sphinterpolate (#1418)

  • +
  • Wrap xyz2grd (#636)

  • +
  • Add function to import seafloor crustal age dataset (#1471)

  • +
  • Add pygmt.load_dataarray function (#1439)

  • +
+
+
+

Enhancements

+
    +
  • Expand table-like input options for Figure.contour (#1531)

  • +
  • Expand table-like input options for pygmt.surface (#1455)

  • +
  • Raise GMTInvalidInput exception when required z is missing (#1478)

  • +
  • Add support for passing pathlib.Path objects as filenames (#1382)

  • +
  • Allow passing a list to the ‘incols’ parameter for blockm, grdtrack and text (#1475)

  • +
  • Plot square or cube by default for OGR/GMT files with Point/MultiPoint types (#1438)

  • +
  • Plot square or cube by default for geopandas Point/MultiPoint types (#1405)

  • +
  • Add area_thresh to COMMON_OPTIONS (#1426)

  • +
  • Add function to import Mars dataset (#1420)

  • +
  • Add function to import hotspot dataset (#1386)

  • +
+
+
+

Deprecations

+
    +
  • pygmt.blockm*: Reorder input parameters to ‘data, x, y, z’ (#1565)

  • +
  • pygmt.surface: Reorder input parameters to ‘data, x, y, z’ (#1562)

  • +
  • Figure.contour: Reorder input parameters to ‘data, x, y, z’ (#1561)

  • +
  • Figure.plot3d: Reorder input parameters to ‘data, x, y, z’ (#1560)

  • +
  • Figure.plot: Reorder input parameters to “data, x, y” (#1547)

  • +
  • Figure.rose: Reorder input parameters to ‘data, length, azimuth’ (#1546)

  • +
  • Figure.wiggle: Reorder input parameter to ‘data, x, y, z’ (#1548)

  • +
  • Figure.histogram: Deprecate parameter “table” to “data” (remove in v0.7.0) (#1540)

  • +
  • pygmt.info: Deprecate parameter “table” to “data” (remove in v0.7.0) (#1538)

  • +
  • Figure.wiggle: Deprecate parameter “columns” to “incols” (remove in v0.7.0) (#1504)

  • +
  • pygmt.surface: Deprecate parameter “outfile” to “outgrid” (remove in v0.7.0) (#1458)

  • +
  • NEP29: Set minimum required version to NumPy 1.18+ (#1430)

  • +
+
+
+

Bug Fixes

+
    +
  • Allow GMTDataArrayAccessor to work on sliced datacubes (#1581)

  • +
  • Allow non-string color when input data is a matrix or a file for plot and plot3d (#1526)

  • +
  • Raise RuntimeWarning instead of an exception for irregular grid spacing (#1530)

  • +
  • Raise an error for zero increment grid (#1484)

  • +
+
+
+

Documentation

+
    +
  • Add CITATION.cff file for PyGMT (#1592)

  • +
  • Update region and projection standard docstrings (#1510)

  • +
  • Document gmtwhich -Ga option to download to appropriate cache folder (#1554)

  • +
  • Add gallery example showing the usage of text symbols (#1522)

  • +
  • Add gallery example for grdgradient (#1428)

  • +
  • Add gallery example for grdlandmask (#1469)

  • +
  • Add missing aliases to pygmt.grdgradient (#1515)

  • +
  • Add missing aliases to pygmt.sphdistance (#1516)

  • +
  • Add missing aliases to pygmt.blockmean and pygmt.blockmedian (#1500)

  • +
  • Add missing aliases to pygmt.Figure.wiggle (#1498)

  • +
  • Add missing aliases to pygmt.Figure.velo (#1497)

  • +
  • Add missing aliases to pygmt.surface (#1501)

  • +
  • Add missing aliases to pygmt.Figure.plot3d (#1503)

  • +
  • Add missing aliases to pygmt.grdlandmask (#1423)

  • +
  • Add missing aliases to pygmt.grdtrack (#1499)

  • +
  • Add missing aliases to pygmt.Figure.plot (#1502)

  • +
  • Add missing aliases to pygmt.Figure.text (#1448)

  • +
  • Add missing aliases to pygmt.Figure.histogram (#1451)

  • +
  • Add missing alias to pygmt.Figure.legend (#1453)

  • +
  • Add missing aliases to pygmt.Figure.rose (#1452)

  • +
  • Add missing alias to pygmt.Figure.grdview (#1450)

  • +
  • Add missing aliases to pygmt.Figure.image.py (#1449)

  • +
  • Add missing common options to contour (#1446)

  • +
  • Add missing ‘incols’ alias to info (#1476)

  • +
+
+
+

Maintenance

+
    +
  • Add support for Python 3.10 (#1591)

  • +
  • Make IPython partially optional on CI to increase test coverage of figure.py (#1496)

  • +
  • Use mamba to install Continuous Integration dependencies (#841)

  • +
  • Remove deprecated codecov dependency from CI (#1494)

  • +
  • Add the use of Flake8 to check examples and fix warnings (#1477)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.4.1 (2021/08/07)

+

Digital Object Identifier for PyGMT v0.4.1

+
+

Highlights

+
    +
  • 🎉 Patch release with multiple gallery examples 🎉

  • +
  • Change default GitHub branch name from “master” to “main” to increase inclusivity (#1360)

  • +
  • Add a “PyGMT Team” page (#1308)

  • +
+
+
+

Enhancements

+
    +
  • Add common alias “verbose” (V) to grdlandmask and savefig (#1343)

  • +
+
+
+

Bug Fixes

+
    +
  • Change invalid input conditions in grdtrack (#1376)

  • +
  • Fix bug so that x2sys_cross accepts dataframes with NaN values (#1369)

  • +
+
+
+

Documentation

+
    +
  • Combine documentation and compatibility sections in README (#1415)

  • +
  • Add a gallery example for grdclip (#1396)

  • +
  • Add a gallery example for different colormaps in subplots (#1394)

  • +
  • Add a gallery example for the contour method (#1387)

  • +
  • Add a gallery example showing individual custom symbols (#1348)

  • +
  • Add common option aliases to COMMON_OPTIONS in decorators.py (#1407)

  • +
  • Add return statement to grdclip and grdgradient docstring (#1390)

  • +
  • Restructure contributing.md to separate docs/general info from contributing code section (#1339)

  • +
+
+
+

Maintenance

+
    +
  • Add tomli as a dependency in GMT Dev Tests (#1401)

  • +
  • NEP29: Test PyGMT on NumPy 1.21 (#1355)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.4.0 (2021/06/20)

+

Digital Object Identifier for PyGMT v0.4.0

+
+

Highlights

+
    +
  • 🎉 Fourth minor release of PyGMT 🎉

  • +
  • Add tutorials for datetime data (#1193) and plotting vectors (#1070)

  • +
  • Support tab auto-completion in Jupyter (#1282)

  • +
  • Minimum required GMT version is now 6.2.0 or newer (#1321)

  • +
+
+
+

New Features

+
    +
  • Wrap blockmean (#1092)

  • +
  • Wrap grdclip (#1261)

  • +
  • Wrap grdfill (#1276)

  • +
  • Wrap grdgradient (#1269)

  • +
  • Wrap grdlandmask (#1273)

  • +
  • Wrap histogram (#1072)

  • +
  • Wrap rose (#794)

  • +
  • Wrap solar (#804)

  • +
  • Wrap velo (#525)

  • +
  • Wrap wiggle (#1145)

  • +
  • Add new function to load fractures sample data (#1101)

  • +
  • Allow load_earth_relief() to load the original land-only 01s or 03s SRTM tiles (#976)

  • +
  • Handle geopandas and shapely geometries via geo_interface link (#1000)

  • +
  • Support passing string type numbers, geographic coordinates and datetimes (#975)

  • +
+
+
+

Enhancements

+
    +
  • Allow passing an array as intensity for plot3d (#1109)

  • +
  • Allow passing an array as intensity for plot (#1065)

  • +
  • Allow passing xr.DataArray as shading to grdimage (#750)

  • +
  • Allow x/y/z input for blockmedian and blockmean (#1319)

  • +
  • Allow pygmt.which to accept a list of filenames as input (#1312)

  • +
  • Refactor blockm* to use virtualfile_from_data and improve i/o (#1280)

  • +
  • Refactor grdtrack to use virtualfile_from_data and improve i/o to pandas.DataFrame (#1189)

  • +
  • Add parameters to histogram (#1249)

  • +
  • Add alias ‘aspatial’ to methods blockmedian, info, plot, plot3d, surface (#1090)

  • +
  • Add alias ‘registration’ to methods blockmean, info, grdfilter, surface (#1089)

  • +
  • Add incols to COMMON_OPTIONS, blockmean, and blockmedian (#1300)

  • +
  • Improve Figure.show for displaying previews in Jupyter notebooks and external viewers (#529)

  • +
  • Let Figure.savefig recommend .eps or .pdf when .ps extension is used (#1307)

  • +
+
+
+

Deprecations

+
    +
  • Figure.contour: Deprecate parameter “columns” to “incols” (remove in v0.6.0) (#1303)

  • +
  • Figure.plot: Deprecate parameter “sizes” to “size” (remove in v0.6.0) (#1254)

  • +
  • Figure.plot: Deprecate parameter “columns” to “incols” (remove in v0.6.0) (#1298)

  • +
  • Figure.plot3d: Deprecate parameter “sizes” to “size” (remove in v0.6.0) (#1258)

  • +
  • Figure.plot3d: Deprecate parameter “columns” to “incols” (remove in v0.6.0) (#1040)

  • +
  • Figure.rose: Deprecate parameter “columns” to “incols” (remove in v0.6.0) (#1306)

  • +
  • NEP29: Set minimum required versions to NumPy 1.17+ and Python 3.7+ (#1074)

  • +
  • Raise a warning for the use of short-form parameters when long-forms are available (#1316)

  • +
+
+
+

Bug Fixes

+
    +
  • Allow pandas.Series inputs to fig.histogram and pygmt.info (#1329)

  • +
  • Explicitly use netcdf4 engine in xarray.open_dataarray to read grd files (#1264)

  • +
  • Let Figure.savefig support filenames with spaces (#1116)

  • +
  • Let Figure.show(method=’external’) work well in Python scripts (#1062)

  • +
+
+
+

Documentation

+
    +
  • Add histogram gallery example (#1272)

  • +
  • Add a gallery example showing individual basic geometric symbols (#1211)

  • +
  • Specify rectangle’s width and height via style parameter in multi-parameter symbols example (#1325)

  • +
  • Update the inset gallery example (#1287)

  • +
  • Add categorical colorbars for plot, plot3d and line colors gallery examples (#1267)

  • +
  • Apply NIST SI unit convention to some gallery examples (#1194)

  • +
  • Use colorblind-friendly colors in the scatter plots gallery example (#1013)

  • +
  • Added documentation for three oblique mercator projections (#1251)

  • +
  • Add a list of external PyGMT resources (#1210)

  • +
  • Complete documentation for grdtrack (#1190)

  • +
  • Add projection and region to grdview docstring (#1295)

  • +
  • Add common alias spacing (-I) for specifying grid increments (#1288)

  • +
  • Standardize docstrings for table-like inputs (#1186)

  • +
  • Clarify that the “transparency” parameter in plot/plot3d/text can be 1d array (#1265)

  • +
  • Clarify that the “color” parameter in plot/plot3d can be 1d array (#1260)

  • +
  • Clarify interplay of spacing and per_column in info (#1127)

  • +
  • Remove the “full test” section from installation guide (#1206)

  • +
  • Clarify position of deprecate_parameter decorator to be above use_alias (#1302)

  • +
  • Add guidelines for managing issues to maintenance.md (#1301)

  • +
  • Add alias name convention to CONTRIBUTING.md (#1256)

  • +
  • Move contributing guide details to website and rename two sections (#1335)

  • +
  • Update the check_figures_equal testing section in CONTRIBUTING.md (#1108)

  • +
  • Revise Pull Request review process in CONTRIBUTING.md (#1119)

  • +
+
+
+

Maintenance

+
    +
  • Add a workflow to upload baseline images as a release asset (#1317)

  • +
  • Add regression test for grdimage plotting an xarray.DataArray grid subset (#1314)

  • +
  • Add download_test_data to download data files used in tests (#1310)

  • +
  • Remove xfails and workarounds for datetime inputs into pygmt.info (#1236)

  • +
  • Improve the DVC image diff workflow to support side-by-side comparison of modified images (#1219)

  • +
  • Document the deprecation policy and add the deprecate_parameter decorator to deprecate parameters (#1160)

  • +
  • Convert booleans arguments in build_arg_string, not in kwargs_to_strings (#1125)

  • +
  • Create GitHub Action workflow for reporting DVC image diffs (#1104)

  • +
  • Update “GMT Dev Tests” workflow to test macOS-11.0 and pre-release Python packages (#1105)

  • +
  • Initialize data version control for managing test images (#1036)

  • +
  • Separate workflows for running tests and building documentation (#1033)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.3.1 (2021/03/14)

+

Digital Object Identifier for PyGMT v0.3.1

+
+

Highlights

+
    +
  • 🎉 Multiple bug fixes and an improved gallery 🎉

  • +
  • Reorganized gallery examples into new categories (#995)

  • +
  • Added gallery examples for plotting vectors (#950, #890)

  • +
  • Last version to support GMT 6.1.1, future PyGMT versions will require GMT 6.2.0 or newer

  • +
+
+
+

Enhancements

+
    +
  • Support passing a sequence to the spacing parameter of pygmt.info() (#1031)

  • +
+
+
+

Bug Fixes

+
    +
  • Fix issues in loading GMT’s shared library (#977)

  • +
  • Let pygmt.info load datetime columns into a str dtype array (#960)

  • +
  • Check invalid combinations of resolution and registration in load_earth_relief() (#965)

  • +
  • Open figures using the associated application on Windows (#952)

  • +
  • Fix bug that stops Figure.coast from plotting with only dcw parameter (#910)

  • +
+
+
+

Documentation

+
    +
  • Add a gallery example showing different line front styles (#1022)

  • +
  • Add a gallery example for a double y-axes graph (#1019)

  • +
  • Add a gallery example of inset map showing a rectangle region (#1020)

  • +
  • Add a gallery example to show coloring of points by categories (#1006)

  • +
  • Add gallery example showing different polar projection use cases (#955)

  • +
  • Add underscore guideline to CONTRIBUTING.md (#1034)

  • +
  • Add instructions to upgrade installed PyGMT version (#1029)

  • +
  • Improve the docstring of the pygmt package (#1016)

  • +
  • Add common alias coltypes (-f) for specifying i/o data types (#994)

  • +
  • Expand documentation linking in CONTRIBUTING.md (#802)

  • +
  • Write changelog in markdown using MyST (#941)

  • +
  • Update web font to Atkinson Hyperlegible (#938)

  • +
  • Improve the gallery example for datetime inputs (#919)

  • +
+
+
+

Maintenance

+
    +
  • Refactor plot and plot3d to use virtualfile_from_data (#990)

  • +
  • Explicitly exclude unnecessary files in source distributions (#999)

  • +
  • Refactor grd modules to use virtualfile_from_data (#992)

  • +
  • Refactor info and grdinfo to use virtualfile_from_data (#961)

  • +
  • Onboarding maintainer checklist (#773)

  • +
  • Add comprehensive tests for pygmt.clib.loading.clib_full_names (#872)

  • +
  • Add a workflow checking links in plaintext and HTML files (#634)

  • +
  • Remove nbsphinx extension (#931)

  • +
  • Improve the error message for loading an old version of the GMT library (#925)

  • +
  • Move requirements-dev.txt dependencies to environment.yml (#812)

  • +
  • Ensure proper non-dev version string when publishing to PyPI (#900)

  • +
  • Run tests in a single CI job (Ubuntu + Python 3.9) for draft PRs (#906)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.3.0 (2021/02/15)

+

Digital Object Identifier for PyGMT v0.3.0

+
+

Highlights

+
    +
  • 🎉 Third minor release of PyGMT 🎉

  • +
  • Wrap inset (#788) for making overview maps and subplot (#822) for multi-panel figures

  • +
  • Apply standardized formatting conventions (#775) across most documentation pages

  • +
  • Drop Python 3.6 support (#699) so PyGMT now requires Python 3.7 or newer

  • +
+
+
+

New Features

+
    +
  • Wrap grd2cpt (#803)

  • +
  • Let Figure.text support record-by-record transparency (#716)

  • +
  • Provide basic support for FreeBSD (#700, #878)

  • +
+
+
+

Enhancements

+
    +
  • Let load_earth_relief support the ‘region’ parameter for all resolutions (#873)

  • +
  • Improve how PyGMT finds the GMT library (#702)

  • +
  • Add common alias panel (-c) to all plotting functions (#853)

  • +
  • Add aliases dcw (#765) and lakes (#781) to Figure.coast

  • +
  • Add alias shading to Figure.colorbar (#752)

  • +
  • Add alias annotation (A) to Figure.contour (#883)

  • +
  • Wrap Figure.grdinfo aliases (#799)

  • +
  • Add aliases frame and cmap to Figure.colorbar (#709)

  • +
  • Add alias frame to Figure.grdview (#707)

  • +
  • Improve the error message when PyGMT fails to load the GMT library (#814)

  • +
  • Add GMTInvalidInput error to Figure.coast (#787)

  • +
+
+
+

Documentation

+
    +
  • Add authorship policy (#726)

  • +
  • Update PyGMT development installation instructions (#865)

  • +
  • Add a tutorial for adding a map title (#720)

  • +
  • Add a tutorial for plotting Earth relief (#712)

  • +
  • Add a tutorial for 3D perspective image (#743)

  • +
  • Add a tutorial for contour maps (#705)

  • +
  • Add a tutorial for plotting lines (#741)

  • +
  • Add a tutorial for the region argument (#800)

  • +
  • Add a gallery example for datetime inputs (#779)

  • +
  • Add a gallery example for Figure.logo (#823)

  • +
  • Add a gallery example for plotting multi-parameter symbols (#772)

  • +
  • Add a gallery example for Figure.image (#777)

  • +
  • Add a gallery example for setting line colors with a custom CPT (#774)

  • +
  • Add more gallery examples for projections (#761, #721, #757, #723, #762, #742, #728, #727)

  • +
  • Update the docstrings in the plotting modules (#881)

  • +
  • Update the docstrings in the non-plotting modules (#882)

  • +
  • Update Figure.coast docstrings (#798)

  • +
  • Update the docstrings of common aliases (#862)

  • +
  • Add sphinx-copybutton extension to easily copy codes (#838)

  • +
  • Choose the best figures in tutorials for thumbnails (#826)

  • +
  • Update axis label explanation in frames tutorial (#820)

  • +
  • Add guidelines for types of tests to write (#796)

  • +
  • Recommend using SI units in documentation (#795)

  • +
  • Add a table for compatibility of PyGMT with Python and GMT (#763)

  • +
  • Add description for the “columns” arguments (#766)

  • +
  • Add a table of the available projections (#753)

  • +
  • Add projection description for Lambert Azimuthal Equal-Area (#760)

  • +
  • Change text when GMTInvalidInput error is raised for basemap (#729)

  • +
+
+
+

Bug Fixes

+
    +
  • Fix a bug of Figure.text when “text” is a non-string array (#724)

  • +
  • Fix the error message when IPython is not available (#701)

  • +
+
+
+

Maintenance

+
    +
  • Add dependabot to keep GitHub Actions up to date (#861)

  • +
  • Skip workflows in PRs if only non-source-code files are changed (#839)

  • +
  • Add slash command ‘/test-gmt-dev’ to test GMT dev version (#831)

  • +
  • Check files for UNIX-style line breaks and 644 permission (#736)

  • +
  • Rename vercel configuration file from now.json to vercel.json (#738)

  • +
  • Add a CI job testing GMT master branch on Windows (#756)

  • +
  • Migrate documentation deployment from Travis CI to GitHub Actions (#713)

  • +
  • Move Figure.meca into a standalone module (#686)

  • +
  • Move plotting functions to separate modules (#808)

  • +
  • Move non-plotting modules to separate modules (#832)

  • +
  • Add isort to sort imports alphabetically (#745)

  • +
  • Convert relative imports to absolute imports (#754)

  • +
  • Switch from versioneer to setuptools-scm (#695)

  • +
  • Add docformatter to format plain text in docstrings (#642)

  • +
  • Migrate pytest configurations to pyproject.toml (#725)

  • +
  • Migrate coverage configurations to pyproject.toml (#667)

  • +
  • Show test execution times in pytest (#835)

  • +
  • Add tests for grdfilter (#809)

  • +
  • Add tests for GMTInvalidInput of Figure.savefig and Figure.show (#810)

  • +
  • Add args_in_kwargs function (#791)

  • +
  • Add a Makefile target ‘distclean’ for deleting project metadata files (#744)

  • +
  • Add a test for Figure.basemap map_scale (#739)

  • +
  • Use args_in_kwargs for Figure.basemap error raising (#797)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.2.1 (2020/11/14)

+

Digital Object Identifier for PyGMT v0.2.1

+
+

Highlights

+ +
+
+

New Features

+
    +
  • Wrap plot3d (#471)

  • +
  • Wrap grdfilter (#616)

  • +
+
+
+

Enhancements

+
    +
  • Allow np.object dtypes into virtualfile_from_vectors (#684)

  • +
  • Let plot() accept record-by-record transparency (#626)

  • +
  • Refactor info to allow datetime inputs from xarray.Dataset and pandas.DataFrame tables (#619)

  • +
+
+ +
+

Documentation Improvements

+
    +
  • doc: Fix the description of grdcontour -G option (#681)

  • +
  • Refresh Code of Conduct from v1.4 to v2.0 (#673)

  • +
  • Add PyGMT Zenodo BibTeX entry to main README (#678)

  • +
  • Complete most of documentation for makecpt (#676)

  • +
  • Complete documentation for plot (#666)

  • +
  • Add “no_clip” to plot, text, contour and meca (#661)

  • +
  • Add common alias “verbose” (V) to all functions (#662)

  • +
  • Improve documentation of Figure.logo() (#651)

  • +
  • Add mini-galleries for methods and functions (#648)

  • +
  • Complete documentation of grdimage (#620)

  • +
  • Add common alias perspective (p) for plotting 3D illustrations (#627)

  • +
  • Add common aliases xshift (X) and yshift (Y) (#624)

  • +
  • Add common alias cores (x) for grdimage and other multi-threaded modules (#625)

  • +
  • Enable switching different versions of documentation (#621)

  • +
  • Add common alias transparency (-t) to all plotting functions (#614)

  • +
+
+
+

Bug Fixes

+
    +
  • Disallow passing arguments like -XNone to GMT (#639)

  • +
+
+
+

Maintenance

+
    +
  • Migrate PyPI release to GitHub Actions (#679)

  • +
  • Upload artifacts showing diff images on test failure (#675)

  • +
  • Add slash command “/format” to automatically format PRs (#646)

  • +
  • Add instructions to run specific tests (#660)

  • +
  • Add more tests for xarray grid shading (#650)

  • +
  • Refactor xfail tests to avoid storing baseline images (#603)

  • +
  • Add blackdoc to format Python codes in docstrings (#641)

  • +
  • Check and lint sphinx configuration file doc/conf.py (#630)

  • +
  • Improve Makefile to clean __pycache__ directory recursively (#611)

  • +
  • Update release process and checklist template (#602)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.2.0 (2020/09/12)

+

Digital Object Identifier for PyGMT v0.2.0

+
+

Highlights

+
    +
  • 🎉 Second minor release of PyGMT 🎉

  • +
  • Minimum required GMT version is now 6.1.1 or newer (#577)

  • +
  • Plotting xarray grids using grdimage and grdview should not crash anymore and works for most cases (#560)

  • +
  • Easier time-series plots with support for datetime-like inputs to plot (#464) and the region argument (#562)

  • +
+
+
+

New Features

+
    +
  • Wrap GMT_Put_Strings to pass str columns into GMT C API directly (#520)

  • +
  • Wrap meca (#516)

  • +
  • Wrap x2sys_init and x2sys_cross (#546)

  • +
  • Let grdcut() accept xarray.DataArray as input (#541)

  • +
  • Initialize a GMTDataArrayAccessor (#500)

  • +
+
+
+

Enhancements

+
    +
  • Allow passing in pandas dataframes to x2sys_cross (#591)

  • +
  • Sensible array outputs for pygmt info (#575)

  • +
  • Allow pandas.DataFrame table and 1D/2D numpy array inputs into pygmt.info (#574)

  • +
  • Add auto-legend feature to grdcontour and contour (#568)

  • +
  • Add common alias verbose (V) (#550)

  • +
  • Let load_earth_relief() support all resolutions and optional subregion (#542)

  • +
  • Allow load_earth_relief() to load pixel or gridline registered data (#509)

  • +
+
+
+

Documentation

+
    +
  • Link to try-gmt binder repository (#598)

  • +
  • Improve docstring of data_kind() to include xarray grid (#588)

  • +
  • Improve the documentation of Figure.shift_origin() (#536)

  • +
  • Add shading to grdview gallery example (#506)

  • +
+
+
+

Bug Fixes

+
    +
  • Ensure surface and grdcut loads GMTDataArray accessor info into xarray (#539)

  • +
  • Raise an error if short- and long-form arguments coexist (#537)

  • +
  • Fix the grdtrack example to avoid crashes on macOS (#531)

  • +
  • Properly allow for either pixel or gridline registered grids (#476)

  • +
+
+
+

Maintenance

+
    +
  • Add a test for xarray shading (#581)

  • +
  • Remove expected failures on grdview tests (#589)

  • +
  • Redesign check_figures_equal testing function to be more explicit (#590)

  • +
  • Cut Windows CI build time in half to 15 min (#586)

  • +
  • Add a test for Session.write_data() writing netCDF grids (#583)

  • +
  • Add a test to make sure shift_origin does not crash (#580)

  • +
  • Add testing.check_figures_equal to avoid storing baseline images (#555)

  • +
  • Eliminate unnecessary jobs from Travis CI (#567) and Azure Pipelines (#513)

  • +
  • Improve the workflow to test both GMT master (#485) and 6.1 branches (#554)

  • +
  • Automatically cancel in-progress CI runs of old commits (#544)

  • +
  • Remove the Stickler CI configuration file (#538), run style checks using GitHub Actions (#519)

  • +
  • Cache GMT remote data as artifacts on GitHub (#530)

  • +
  • Let pytest generate both HTML and XML coverage reports (#512)

  • +
  • Run Continuous Integration tests on GitHub Actions (#475)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.1.2 (2020/07/07)

+

Digital Object Identifier for PyGMT v0.1.2

+
+

Highlights

+
    +
  • Patch release in preparation for the SciPy 2020 sprint session

  • +
  • Last version to support GMT 6.0, future PyGMT versions will require GMT 6.1 or newer

  • +
+
+
+

New Features

+
    +
  • Wrap grdcut (#492)

  • +
  • Add show_versions() function for printing debugging information used in issue reports (#466)

  • +
+
+
+

Enhancements

+
    +
  • Change load_earth_relief()’s default resolution to 01d (#488)

  • +
  • Enhance text with extra functionality and aliases (#481)

  • +
+
+
+

Documentation

+
    +
  • Add gallery example for grdview (#502)

  • +
  • Turn all short aliases into long form (#474)

  • +
  • Update the plotting example using the colormap generated by pygmt.makecpt (#472)

  • +
  • Add instructions to view the test coverage reports locally (#468)

  • +
  • Update the instructions for testing pygmt install (#459)

  • +
+
+
+

Bug Fixes

+
    +
  • Fix a bug when passing data to GMT in Session.open_virtual_file() (#490)

  • +
+
+
+

Maintenance

+
    +
  • Temporarily expect failures for some grdcontour and grdview tests (#503)

  • +
  • Fix several failures due to updates of earth relief data (#498)

  • +
  • Unpin pylint version and fix some lint warnings (#484)

  • +
  • Separate tests of gmtinfo and grdinfo (#461)

  • +
  • Fix the test for GMT_COMPATIBILITY=6 (#454)

  • +
  • Update baseline images for updates of earth relief data (#452)

  • +
  • Simplify PyGMT Release process (#446)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.1.1 (2020/05/22)

+

Digital Object Identifier for PyGMT v0.1.1

+
+

Highlights

+
    +
  • 🏁Windows users rejoice, this bugfix release is for you!🏁

  • +
  • Let PyGMT work with the conda GMT package on Windows (#434)

  • +
+
+
+

Enhancements

+
    +
  • Handle setting special parameters without default settings for config (#411)

  • +
+
+
+

Documentation

+
    +
  • Update install instructions (#430)

  • +
  • Add PyGMT AGU 2019 poster to website (#425)

  • +
  • Redirect www.pygmt.org to latest, instead of dev (#423)

  • +
+
+
+

Bug Fixes

+
    +
  • Set GMT_COMPATIBILITY to 6 when pygmt session starts (#432)

  • +
  • Improve how PyGMT finds the GMT library (#440)

  • +
+
+
+

Maintenance

+
    +
  • Finalize fixes on Windows test suite for v0.1.1 (#441)

  • +
  • Cache test data on Azure Pipelines (#438)

  • +
+
+
+

Contributors

+ +
+
+
+
+

Release v0.1.0 (2020/05/03)

+

Digital Object Identifier for PyGMT v0.1.0

+
+

Highlights

+
    +
  • 🎉 First official release of PyGMT 🎉

  • +
  • Python 3.8 is now supported (#398)

  • +
  • PyGMT now uses the stable version of GMT 6.0.0 by default (#363)

  • +
  • Use sphinx-gallery to manage examples and tutorials (#268)

  • +
+
+
+

New Features

+
    +
  • Wrap blockmedian (#349)

  • +
  • Add pygmt.config() to change gmt defaults locally and globally (#293)

  • +
  • Wrap grdview (#330)

  • +
  • Wrap grdtrack (#308)

  • +
  • Wrap colorbar (#332)

  • +
  • Wrap text (#321)

  • +
  • Wrap legend (#333)

  • +
  • Wrap makecpt (#329)

  • +
  • Add a new method to shift plot origins (#289)

  • +
+
+
+

Enhancements

+
    +
  • Allow text accepting “frame” as an argument (#385)

  • +
  • Allow for grids with negative lat/lon increments (#369)

  • +
  • Allow passing in list to ‘region’ argument in surface (#378)

  • +
  • Allow passing in scalar number to x and y in plot (#376)

  • +
  • Implement default position/box for legend (#359)

  • +
  • Add sequence_space converter in kwargs_to_string (#325)

  • +
+
+
+

Documentation

+
    +
  • Update PyPI install instructions and API disclaimer message (#421)

  • +
  • Fix the link to GMT documentation (#419)

  • +
  • Use napoleon instead of numpydoc with sphinx (#383)

  • +
  • Document using a list for repeated arguments (#361)

  • +
  • Add legend gallery entry (#358)

  • +
  • Update instructions to set GMT_LIBRARY_PATH (#324)

  • +
  • Fix the link to the GMT homepage (#331)

  • +
  • Split projections gallery by projection types (#318)

  • +
  • Fix the link to GMT/Matlab API in the README (#297)

  • +
  • Use shinx extlinks for linking GMT docs (#294)

  • +
  • Comment about country code in projection examples (#290)

  • +
  • Add an overview page listing presentations (#286)

  • +
+
+
+

Bug Fixes

+
    +
  • Let surface return xr.DataArray instead of xr.Dataset (#408)

  • +
  • Update GMT constant GMT_STR16 to GMT_VF_LEN for GMT API change in 6.1.0 (#397)

  • +
  • Properly trigger pytest matplotlib image comparison (#352)

  • +
  • Use uuid.uuid4 to generate unique names (#274)

  • +
+
+
+

Maintenance

+
    +
  • Quickfix Zeit Now miniconda installer link to anaconda.com (#413)

  • +
  • Fix GitHub Pages deployment from Travis (#410)

  • +
  • Update and clean TravisCI configuration (#404)

  • +
  • Quickfix min elevation for new SRTM15+V2.1 earth relief grids (#401)

  • +
  • Wrap docstrings to 79 chars and check with flake8 (#384)

  • +
  • Update continuous integration scripts to 1.2.0 (#355)

  • +
  • Use Zeit Now to deploy doc builds from PRs (#344)

  • +
  • Move gmt from requirements.txt to CI scripts instead (#343)

  • +
  • Change py.test to pytest (#338)

  • +
  • Add Google Analytics to measure site visitors (#314)

  • +
  • Register mpl_image_compare marker to remove PytestUnknownMarkWarning (#323)

  • +
  • Disable Windows CI builds before PR #313 is merged (#320)

  • +
  • Enable Mac and Windows CI on Azure Pipelines (#312)

  • +
  • Fixes for using GMT 6.0.0rc1 (#311)

  • +
  • Assign authorship to “The PyGMT Developers” (#284)

  • +
+
+
+

Deprecations

+
    +
  • Remove mention of gitter.im (#405)

  • +
  • Remove portrait (-P) from common options (#339)

  • +
  • Remove require.js since WorldWind was dropped (#278)

  • +
  • Remove Web WorldWind support (#275)

  • +
+
+
+

Contributors

+ +
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/contributing.html b/v0.14.0/contributing.html new file mode 100644 index 00000000000..2459f83c933 --- /dev/null +++ b/v0.14.0/contributing.html @@ -0,0 +1,955 @@ + + + + + + + + + Contributors Guide — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Contributors Guide

+

This is a community driven project and everyone is welcome to contribute.

+

The project is hosted at the +PyGMT GitHub repository.

+

The goal is to maintain a diverse community that’s pleasant for everyone. +Please be considerate and respectful of others. Everyone must abide by our +Code of Conduct +and we encourage all to read it carefully.

+
+

Ways to Contribute

+
+

Ways to Contribute Documentation and/or Code

+
    +
  • Tackle any issue that you wish! Some issues are labeled as “good first issue” to +indicate that they are beginner friendly, meaning that they don’t require extensive +knowledge of the project.

  • +
  • Make a tutorial or gallery example of how to do something.

  • +
  • Improve the API documentation.

  • +
  • Contribute code! This can be code that you already have and it doesn’t need to be +perfect! We will help you clean things up, test it, etc.

  • +
+
+
+

Ways to Contribute Feedback

+
    +
  • Provide feedback about how we can improve the project or about your particular use +case. Open an issue with +feature requests or bug fixes, or post general comments/questions on the +forum.

  • +
  • Help triage issues, or give a “thumbs up” on issues that others reported which are +relevant to you.

  • +
+
+
+

Ways to Contribute to Community Building

+
    +
  • Participate and answer questions on the PyGMT forum Q&A.

  • +
  • Participate in discussions at the quarterly PyGMT Community Meetings, which are +announced on the forum governance page.

  • +
  • Cite PyGMT when using the project.

  • +
  • Spread the word about PyGMT or star the project!

  • +
+
+
+
+

Providing Feedback

+
+

Reporting a Bug

+
    +
  • Find the Issues tab on the +top of the GitHub repository and click New issue.

  • +
  • Click on Get started next to Bug report.

  • +
  • Please try to fill out the template with as much detail as you can.

  • +
  • After submitting your bug report, try to answer any follow up questions about the bug +as best as you can.

  • +
+
+

Reporting Upstream Bugs

+

If you are aware that a bug is caused by an upstream GMT issue rather than a +PyGMT-specific issue, you can optionally take the following steps to help resolve +the problem:

+
    +
  • Add the line pygmt.config(GMT_VERBOSE="d") after your import statements, which +will report the equivalent GMT commands as one of the debug messages.

  • +
  • Either append all messages from running your script to your GitHub issue, or +filter the messages to include only the GMT-equivalent commands using a command +such as:

    +
    python <test>.py 2>&1 | awk -F': ' '$2=="GMT_Call_Command string" {print $3}'
    +
    +
    +

    where <test> is the name of your test script.

    +
  • +
  • If the bug is produced when passing an in-memory data object (e.g., a +pandas.DataFrame or xarray.DataArray) to a PyGMT function, try writing the +data to a file (e.g., a netCDF or ASCII txt file) and passing the data file +to the PyGMT function instead. In the GitHub issue, please share the results +for both cases along with your code.

  • +
+
+
+
+

Submitting a Feature Request

+
    +
  • Find the Issues tab on the +top of the GitHub repository and click New issue.

  • +
  • Click on Get started next to Feature request.

  • +
  • Please try to fill out the template with as much detail as you can.

  • +
  • After submitting your feature request, try to answer any follow up questions as best +as you can.

  • +
+
+
+

Submitting General Comments/Questions

+

There are several pages on the Community Forum +where you can submit general comments and/or questions:

+
    +
  • For questions about using PyGMT, select New Topic from the +PyGMT Q&A Page.

  • +
  • For general comments, select New Topic from the +Lounge Page.

  • +
  • To share your work, select New Topic from the +Showcase Page.

  • +
+
+
+
+

General Guidelines

+
+

Resources for New Contributors

+

Please take a look at these resources to learn about Git and pull requests (don’t +hesitate to ask questions):

+ +
+
+

Getting Help

+

Discussion often happens on GitHub issues and pull requests. In addition, there is a +Discourse forum for +the project where you can ask questions.

+
+
+

Pull Request Workflow

+

We follow the git pull request workflow +to make changes to our codebase. Every change made goes through a pull request, even +our own, so that our +continuous integration +services have a chance to check that the code is up to standards and passes all +our tests. This way, the main branch is always stable.

+
+

General Guidelines for Making a Pull Request (PR):

+
    +
  • What should be included in a PR

    +
      +
    • Have a quick look at the titles of all the existing issues first. If there +is already an issue that matches your PR, leave a comment there to let us +know what you plan to do. Otherwise, open an issue describing what you +want to do.

    • +
    • Each pull request should consist of a small and logical collection of +changes; larger changes should be broken down into smaller parts and +integrated separately.

    • +
    • Bug fixes should be submitted in separate PRs.

    • +
    +
  • +
  • How to write and submit a PR

    +
      +
    • Use underscores for all Python (*.py) files as per +PEP8, not hyphens. Directory names +should also use underscores instead of hyphens.

    • +
    • Describe what your PR changes and why this is a good thing. Be as +specific as you can. The PR description is how we keep track of the changes +made to the project over time.

    • +
    • Do not commit changes to files that are irrelevant to your feature or +bugfix (e.g.: .gitignore, IDE project files, etc).

    • +
    • Write descriptive commit messages. Chris Beams has written a +guide on how to write good +commit messages.

    • +
    +
  • +
  • PR review

    +
      +
    • Be willing to accept criticism and work on improving your code; we don’t +want to break other users’ code, so care must be taken not to introduce +bugs.

    • +
    • Be aware that the pull request review process is not immediate, and is +generally proportional to the size of the pull request.

    • +
    +
  • +
+
+
+

General Process for Pull Request Review:

+

After you’ve submitted a pull request, you should expect to hear at least a +comment within a couple of days. We may suggest some changes, improvements or +alternative implementation details.

+

To increase the chances of getting your pull request accepted quickly, try to:

+
    +
  • Submit a friendly PR

    +
      +
    • Write a good and detailed description of what the PR does.

    • +
    • Write some documentation for your code (docstrings) and leave comments +explaining the reason behind non-obvious things.

    • +
    • Write tests for the code you wrote/modified if needed. +Please refer to Testing your code or +Testing plots.

    • +
    • Include an example of new features in the gallery or tutorials. +Please refer to Gallery plots +or Tutorials.

    • +
    +
  • +
  • Have a good coding style

    +
      +
    • Use readable code, as it is better than clever code (even with comments).

    • +
    • Follow the PEP8 style guide for code and the +NumPy style guide +for docstrings. Please refer to Code style.

    • +
    +
  • +
+

Pull requests will automatically have tests run by GitHub Actions. +This includes running both the unit tests as well as code linters. +GitHub will show the status of these checks on the pull request. +Try to get them all passing (green). +If you have any trouble, leave a comment in the PR or +get in touch.

+
+
+
+
+

Setting up your Environment

+

These steps for setting up your environment are necessary for +editing the documentation locally and +contributing code. A local PyGMT development environment +is not needed for editing the documentation on GitHub.

+

We highly recommend using Miniforge +and the mamba package manager to install and manage your Python packages. +It will make your life a lot easier!

+

The repository includes a virtual environment file environment.yml with the +specification for all development requirements to build and test the project. +In particular, these are some of the key development dependencies you will need +to install to build the documentation and run the unit tests locally:

+
    +
  • git (for cloning the repo and tracking changes in code)

  • +
  • dvc (for downloading baseline images used in tests)

  • +
  • pytest-mpl (for checking that generated plots match the baseline)

  • +
  • sphinx-gallery (for building the gallery example page)

  • +
+

See the environment.yml +file for the full list of dependencies and the environment name (pygmt). +Once you have forked and cloned the repository to your local machine, you can +use this file to create an isolated environment on which you can work. +Run the following on the base of the repository to create a new conda +environment from the environment.yml file:

+
mamba env create --file environment.yml
+
+
+

Before building and testing the project, you have to activate the environment +(you’ll need to do this every time you start a new terminal):

+
mamba activate pygmt
+
+
+

We have a Makefile +that provides commands for installing, running the tests and coverage analysis, +running linters, etc. If you don’t want to use make, open the Makefile and +copy the commands you want to run.

+

To install the current source code into your testing environment, run:

+
make install  # on Linux/macOS
+python -m pip install --no-deps -e .  # on Windows
+
+
+

This installs your project in editable mode, meaning that changes made to the source +code will be available when you import the package (even if you’re on a different +directory).

+
+
+

Contributing Documentation

+
+

PyGMT Documentation Overview

+

There are four main components to PyGMT’s documentation:

+
    +
  • Gallery examples, with source code in Python *.py files under the +examples/gallery/ folder.

  • +
  • Tutorial examples, with source code in Python *.py files under the +examples/tutorials/ folder.

  • +
  • API documentation, with source code in the docstrings in Python *.py +files under the pygmt/src/ and pygmt/datasets/ folders.

  • +
  • Getting started/developer documentation, with source text in ReST *.rst +and markdown *.md files under the doc/ folder.

  • +
+

The documentation is written primarily in +reStructuredText and built by +Sphinx. Please refer to +reStructuredText Cheatsheet +if you are new to reStructuredText. When contributing documentation, be sure to +follow the general guidelines in the pull request workflow +section.

+

There are two primary ways to edit the PyGMT documentation:

+ +
+
+

Editing the Documentation on GitHub

+

If you’re browsing the documentation and notice a typo or something that could be +improved, please consider letting us know by creating an issue or +(even better) submitting a fix.

+

You can submit fixes to the documentation pages completely online without having to +download and install anything:

+
    +
  1. On each documentation page, there should be an “Improve This Page” link at the very +top.

  2. +
  3. Click on that link to open the respective source file (usually an .rst file in the +doc/ folder or a .py file in the examples/ folder) on GitHub for editing online +(you’ll need a GitHub account).

  4. +
  5. Make your desired changes.

  6. +
  7. When you’re done, scroll to the bottom of the page.

  8. +
  9. Fill out the two fields under “Commit changes”: the first is a short title describing +your fixes; the second is a more detailed description of the changes. Try to be as +detailed as possible and describe why you changed something.

  10. +
  11. Choose “Create a new branch for this commit and start a pull request” and +click on the “Propose changes” button to open a pull request.

  12. +
  13. The pull request will run the GMT automated tests and make a preview deployment. +You can see how your change looks in the PyGMT documentation by clicking the +“Details” button of the “docs/readthedocs.org:pygmt-dev” status check, +after the building has finished (usually 10-15 minutes after the pull request was created).

  14. +
  15. We’ll review your pull request, recommend changes if necessary, and then merge +them in if everything is OK.

  16. +
  17. Done!

  18. +
+

Alternatively, you can make the changes offline to the files in the doc folder or the +example scripts. See editing the documentation locally +for instructions.

+
+
+

Editing the Documentation Locally

+

For more extensive changes, you can edit the documentation in your cloned repository +and build the documentation to preview changes before submitting a pull request. First, +follow the setting up your environment instructions. +After making your changes, you can build the HTML files from sources using:

+
cd doc
+make all
+
+
+

This will build the HTML files in doc/_build/html. +Open doc/_build/html/index.html in your browser to view the pages. Follow the +pull request workflow to submit your changes for review.

+
+
+

Adding example code

+

Many of the PyGMT functions have example code in their documentation. To contribute an +example, add an “Example” header and put the example code below it. Have all lines +begin with >>>. To keep this example code from being run during testing, add the code +__doctest_skip__ = ["function_name"] to the top of the module.

+

Inline code example

+

Below the import statements at the top of the file:

+
__doctest_skip__ = ["function_name"]
+
+
+

At the end of the function’s docstring:

+
Example
+-------
+>>> import pygmt
+>>> # Comment describing what is happening
+>>> Code example
+
+
+
+ +
+

Contributing Tutorials

+

The tutorials (the User Guide in the docs) are also built by sphinx-gallery from the +.py files in the examples/tutorials folder of the repository. To add a new tutorial:

+
    +
  • Create a .py file in the examples/tutorials/advanced folder.

  • +
  • Write the tutorial in “notebook” style with code mixed with paragraphs explaining what +is being done. See the other tutorials for the format.

  • +
  • Choose the most representative figure as the thumbnail figure by adding the comment +line # sphinx_gallery_thumbnail_number = <fig_number> at the end of the tutorial. +The fig_number starts from 1.

  • +
+

Guidelines for a good tutorial:

+
    +
  • Each tutorial should focus on a particular set of tasks that a user might want to +accomplish: plotting grids, interpolation, configuring the frame, projections, etc.

  • +
  • The tutorial code should be as simple as possible. Avoid using advanced/complex Python +features or abbreviations.

  • +
  • Explain the options and features in as much detail as possible. The gallery has +concise examples while the tutorials are detailed and full of text.

  • +
  • SI units should be used in the example code for tutorial plots.

  • +
+

Note that the pygmt.Figure.show method needs to be called for a plot +to be inserted into the documentation.

+
+
+

Editing the API Documentation

+

The API documentation is built from the docstrings in the Python *.py files under +the pygmt/src/ and pygmt/datasets/ folders. All docstrings should follow the +NumPy style guide. +All functions/classes/methods should have docstrings with a full description of all +arguments and return values.

+

While the maximum line length for code is automatically set by ruff, docstrings +must be formatted manually. To play nicely with Jupyter and IPython, keep docstrings +limited to 88 characters per line.

+
+
+

Standards for Example Code

+

When editing documentation, use the following standards to demonstrate the example code:

+
    +
  1. Python arguments, such as import statements, Boolean expressions, and function +arguments should be wrapped as code by using `` on both sides of the code. +Examples: ``import pygmt`` results in import pygmt, ``True`` results in True, +``style=”v”`` results in style="v".

  2. +
  3. Literal GMT arguments should be bold by wrapping the arguments with ** +(two asterisks) on both sides. The argument description should be in italicized +with * (single asterisk) on both sides. +Examples: **+l**\ *label* results in +llabel, **05m** results in 05m.

  4. +
  5. Optional arguments are wrapped with [ ] (square brackets).

  6. +
  7. Arguments that are mutually exclusive are separated with a | (bar) to denote “or”.

  8. +
  9. Default arguments for parameters and configuration settings are wrapped +with [ ] (square brackets) with the prefix “Default is”. Example: [Default is +p].

  10. +
+
+
+

Cross-referencing with Sphinx

+

The API reference is manually assembled in doc/api/index.rst. +The autodoc sphinx extension will automatically create pages for each +function/class/module/method listed there.

+

You can reference functions, classes, modules, and methods from anywhere +(including docstrings) using:

+
    +
  • :func:`package.module.function`

  • +
  • :class:`package.module.class`

  • +
  • :meth:`package.module.method`

  • +
  • :mod:`package.module`

  • +
+

An example would be to use +:meth:`pygmt.Figure.grdview` to link +to https://www.pygmt.org/latest/api/generated/pygmt.Figure.grdview.html. +PyGMT documentation that is not a class, method, +or module can be linked with :doc:`Any Link Text </path/to/the/file>`. +For example, :doc:`Install instructions </install>` links +to https://www.pygmt.org/latest/install.html.

+

Linking to the GMT documentation and GMT configuration parameters can be done using:

+
    +
  • :gmt-docs:`page_name.html`

  • +
  • :gmt-term:`GMT_PARAMETER`

  • +
+

An example would be using +:gmt-docs:`makecpt.html` to link to https://docs.generic-mapping-tools.org/6.5/makecpt.html. +For GMT configuration parameters, an example is +:gmt-term:`COLOR_FOREGROUND` to link to COLOR_FOREGROUND.

+

Sphinx will create a link to the automatically generated page for that +function/class/module/method.

+
+
+
+

Contributing Code

+
+

PyGMT Code Overview

+

The source code for PyGMT is located in the pygmt/ directory. When contributing +code, be sure to follow the general guidelines in the +pull request workflow section.

+
+
+

Code Style

+

We use the ruff tool to format the code, so we +don’t have to think about it. It loosely follow the PEP8 guide +but with a few differences. Regardless, you won’t have to worry about formatting +the code yourself. Before committing, run it to automatically format your code:

+
make format
+
+
+

For consistency, we also use pre-commit hooks to enforce UNIX-style line endings +(\n) and file permission 644 (-rw-r--r--) throughout the whole project. +Don’t worry if you forget to do it. Our continuous integration systems will +warn us and you can make a new commit with the formatted code. +Even better, you can just write /format in the first line of any comment in a +pull request to lint the code automatically.

+

When wrapping a new alias, use an underscore to separate words bridged by vowels +(aeiou), such as no_skip and z_only. Do not use an underscore to separate +words bridged only by consonants, such as distcalc, and crossprofile. This +convention is not applied by the code checking tools, but the PyGMT maintainers +will comment on any pull requests as needed.

+

When working on a tutorial or a gallery plot, it is good practice to use code +block separators to split a long script into multiple blocks. The separators also +make it possible to run the script like a Jupyter notebook in some modern text +editors or IDEs. We consistently use # %% as code block separators (please +refer to issue #2660 +for the discussions) and require at least one separator in all example files.

+

We also use ruff to check the quality of the code +and quickly catch common errors.

+

The Makefile +contains rules for running the linter checks:

+
make check   # Runs ruff in check mode
+
+
+
+
+

Testing your Code

+

Automated testing helps ensure that our code is as free of bugs as it can be. +It also lets us know immediately if a change we make breaks any other part of the code.

+

All of our test code and data are stored in the tests subpackage. +We use the pytest framework to run the test suite.

+

Please write tests for your code so that we can be sure that it won’t break any of the +existing functionality. +Tests also help us be confident that we won’t break your code in the future.

+

When writing tests, don’t test everything that the GMT function already tests, such as +the every unique combination arguments. An exception to this would be the most popular +methods, such as pygmt.Figure.plot and pygmt.Figure.basemap. +The highest priority for tests should be the Python-specific code, such as numpy, +pandas, and xarray objects and the virtualfile mechanism.

+

If you’re new to testing, see existing test files for examples of things to do. +Don’t let the tests keep you from submitting your contribution! +If you’re not sure how to do this or are having trouble, submit your pull request +anyway. +We will help you create the tests and sort out any kind of problem during code review.

+

Pull the baseline images, run the tests, and calculate test coverage using:

+
dvc status  # should report any files 'not_in_cache'
+dvc pull  # pull down files from DVC remote cache (fetch + checkout)
+make test
+
+
+

The coverage report will let you know which lines of code are touched by the tests. +If all the tests pass, you can view the coverage reports by opening htmlcov/index.html +in your browser. Strive to get 100% coverage for the lines you changed. +It’s OK if you can’t or don’t know how to test something. +Leave a comment in the PR and we’ll help you out.

+

You can also run tests in just one test script using:

+
pytest pygmt/tests/NAME_OF_TEST_FILE.py
+
+
+

or run tests which contain names that match a specific keyword expression:

+
pytest -k KEYWORD pygmt/tests
+
+
+
+
+

Testing Plots

+

Writing an image-based test is only slightly more difficult than a simple test. +The main consideration is that you must specify the “baseline” or reference +image, and compare it with a “generated” or test image. This is handled using +the decorator functions @pytest.mark.mpl_image_compare and @check_figures_equal +whose usage are further described below.

+
+

Using mpl_image_compare

+
+

This is the preferred way to test plots whenever possible.

+
+

This method uses the pytest-mpl +plug-in to test plot generating code. +Every time the tests are run, pytest-mpl compares the generated plots with known +correct ones stored in pygmt/tests/baseline. +If your test created a pygmt.Figure object, you can test it by adding a decorator and +returning the pygmt.Figure object:

+
@pytest.mark.mpl_image_compare
+def test_my_plotting_case():
+    """
+    Test that my plotting method works.
+    """
+    fig = Figure()
+    fig.basemap(region=[0, 360, -90, 90], projection="W15c", frame=True)
+    return fig
+
+
+

Your test function must return the pygmt.Figure object and you can only +test one figure per function.

+

Before you can run your test, you’ll need to generate a baseline (a correct +version) of your plot. +Run the following from the repository root:

+
pytest --mpl-generate-path=baseline pygmt/tests/NAME_OF_TEST_FILE.py
+
+
+

This will create a baseline folder with all the plots generated in your test +file. +Visually inspect the one corresponding to your test function. +If it’s correct, copy it (and only it) to pygmt/tests/baseline. +When you run make test the next time, your test should be executed and +passing.

+

Don’t forget to commit the baseline image as well! +The images should be pushed up into a remote repository using dvc (instead of +git) as will be explained in the next section.

+
+
+

Using Data Version Control (dvc) to Manage Test Images

+

As the baseline images are quite large blob files that can change often (e.g. +with new GMT versions), it is not ideal to store them in git (which is meant +for tracking plain text files). Instead, we will use dvc +which is like git but for data. What dvc does is to store the hash (md5sum) +of a file. For example, given an image file like test_logo.png, dvc will +generate a test_logo.png.dvc plain text file containing the hash of the +image. This test_logo.png.dvc file can be stored as usual on GitHub, while +the test_logo.png file can be stored separately on our dvc remote at +https://dagshub.com/GenericMappingTools/pygmt.

+

To pull or sync files from the dvc remote to your local repository, use +the commands below. Note how dvc commands are very similar to git.

+
dvc status  # should report any files 'not_in_cache'
+dvc pull  # pull down files from DVC remote cache (fetch + checkout)
+
+
+

Once the sync/download is complete, you should notice two things. There will be +images stored in the pygmt/tests/baseline folder (e.g. test_logo.png) and +these images are technically reflinks/symlinks/copies of the files under the +.dvc/cache folder. You can now run the image comparison test suite as per +usual.

+
pytest pygmt/tests/test_logo.py  # run only one test
+make test  # run the entire test suite
+
+
+

To push or sync changes from your local repository up to the dvc remote +at DAGsHub, you will first need to set up authentication using the commands +below. This only needs to be done once, i.e. the first time you contribute a +test image to the PyGMT project.

+
dvc remote modify upstream --local auth basic
+dvc remote modify upstream --local user "$DAGSHUB_USER"
+dvc remote modify upstream --local password "$DAGSHUB_PASS"
+
+
+

The configuration will be stored inside your .dvc/config.local file. Note +that the $DAGSHUB_PASS token can be generated at +https://dagshub.com/user/settings/tokens +after creating a DAGsHub account (can be linked to your GitHub account). Once +you have an account set up, please ask one of the PyGMT maintainers to add you +as a collaborator at +https://dagshub.com/GenericMappingTools/pygmt/settings/collaboration +before proceeding with the next steps.

+

The entire workflow for generating or modifying baseline test images can be +summarized as follows:

+
# Sync with both git and dvc remotes
+git pull
+dvc pull
+
+# Generate new baseline images
+pytest --mpl-generate-path=baseline pygmt/tests/test_logo.py
+mv baseline/*.png pygmt/tests/baseline/
+
+# Generate hash for baseline image and stage the *.dvc file in git
+dvc status  # Check which files need to be added to dvc
+dvc add pygmt/tests/baseline/test_logo.png
+git add pygmt/tests/baseline/test_logo.png.dvc
+
+# Commit changes and push to both the git and dvc remotes
+git commit -m "Add test_logo.png into DVC"
+dvc status --remote upstream  # Report which files will be pushed to the dvc remote
+dvc push  # Run before git push to enable automated testing with the new images
+git push
+
+
+
+
+

Using check_figures_equal

+

This approach draws the same figure using two different methods (the reference +method and the tested method), and checks that both of them are the same. +It takes two pygmt.Figure objects (fig_ref and fig_test), generates a png +image, and checks for the Root Mean Square (RMS) error between the two. +Here’s an example:

+
@check_figures_equal()
+def test_my_plotting_case():
+    """
+    Test that my plotting method works.
+    """
+    fig_ref, fig_test = Figure(), Figure()
+    fig_ref.grdimage("@earth_relief_01d_g", projection="W120/15c", cmap="geo")
+    fig_test.grdimage(grid, projection="W120/15c", cmap="geo")
+    return fig_ref, fig_test
+
+
+
+
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/ecosystem.html b/v0.14.0/ecosystem.html new file mode 100644 index 00000000000..30678a32718 --- /dev/null +++ b/v0.14.0/ecosystem.html @@ -0,0 +1,339 @@ + + + + + + + + + Ecosystem — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Ecosystem

+

PyGMT provides a Python interface to the Generic Mapping Tools (GMT), which is a command +line program that provides a wide range of tools for manipulating geospatial data and +making publication-quality maps and figures. PyGMT integrates well with the +scientific Python ecosystem, with NumPy for its +fundamental array data structure, pandas for tabular data I/O and Xarray for +raster grids/images/cubes I/O.

+

In addition to these core dependencies, PyGMT also relies on several optional packages to +provide additional functionality for users.

+

This page was adapted from GeoPandas’s Ecosystem page.

+
+

PyGMT dependencies

+

Asterisk (*) after the package name indicates the package is a required dependency of PyGMT.

+
+

NumPy*

+

NumPy is the fundamental package for scientific computing in Python. It is a Python +library that provides a multidimensional array object, various derived objects (such as +masked arrays and matrices), and an assortment of routines for fast operations on arrays, +including mathematical, logical, shape manipulation, sorting, selecting, I/O, discrete +Fourier transforms, basic linear algebra, basic statistical operations, random simulation +and much more.

+
+
+

pandas*

+

pandas is a Python package providing fast, flexible, and expressive data structures +designed to make working with “relational” or “labeled” data both easy and intuitive. +It aims to be the fundamental high-level building block for doing practical, real-world +data analysis in Python.

+
+
+

Xarray*

+

Xarray is an open source project and Python package that introduces labels in the +form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, which +allows for more intuitive, more concise, and less error-prone user experience.

+
+
+

IPython

+

IPython provides a rich toolkit to help you make the most of using Python +interactively. Its main components are a powerful interactive Python shell and a Jupyter +kernel to work with Python code in Jupyter notebooks and other interactive frontends.

+

PyGMT relies on IPython to provide a rich interactive experience in Jupyter notebooks.

+
+
+

GeoPandas

+

GeoPandas is an open source project to make working with geospatial data in Python +easier. GeoPandas extends the datatypes used by pandas to allow spatial operations +on geometric types. Geometric operations are performed by Shapely. GeoPandas further +depends on pyogrio for file access and Matplotlib for plotting.

+

PyGMT doesn’t directly rely on GeoPandas, but provides support of GeoPandas’s two main +data structure, geopandas.GeoDataFrame and geopandas.GeoSeries, which +can be directly used in data processing and plotting functions/methods of PyGMT.

+
+
+

contextily

+

contextily is a small Python package to retrieve tile maps from the internet. It can +add those tiles as basemap to matplotlib figures or write tile maps to disk into +geospatial raster files.

+

In PyGMT, pygmt.datasets.load_tile_map and pygmt.Figure.tilemap rely on it.

+
+
+

rioxarray

+

rioxarray is a geospatial Xarray extension powered by rasterio. Built on top +of rasterio, it enables seamless reading, writing, and manipulation of multi-dimensional +arrays with geospatial attributes such as coordinate reference systems (CRS) and spatial +extent (bounds).

+

PyGMT relies on rioxarray in several aspects:

+
    +
  1. To save multi-band rasters to temporary files in GeoTIFF format, to support processing +and plotting 3-D xarray.DataArray images.

  2. +
  3. To write CRS information to the xarray.DataArray objects.

  4. +
  5. To reproject raster tiles to the target CRS in pygmt.datasets.load_tile_map.

  6. +
+
+

Note

+

We’re working towards avoiding temporary files when processing/plotting multi-band +rasters in PR #3468.

+
+
+
+

PyArrow

+

Apache Arrow is a development platform for in-memory analytics. It contains a set of +technologies that enable big data systems to process and move data fast. It specifies a +standardized language-independent columnar memory format for flat and hierarchical data, +organized for efficient analytic operations on modern hardware. The Arrow Python bindings +(also named “PyArrow”) have first-class integration with NumPy, pandas, and built-in +Python objects. They are based on the C++ implementation of Arrow.

+
+

Note

+

If you have PyArrow installed, PyGMT does have some initial support for +pandas.Series and pandas.DataFrame objects with Apache Arrow-backed arrays. +Specifically, only uint/int/float, date32/date64 and string types are supported for now. +Support for Duration types and GeoArrow geometry types is still a work in progress. For +more details, see +issue #2800.

+
+
+
+
+

PyGMT ecosystem

+

Various packages rely on PyGMT for geospatial data processing, analysis, and visualization. +Below is an incomplete list (in no particular order) of tools which form the PyGMT-related +ecosystem.

+
+

Note

+

If your package relies on PyGMT, please +let us know or +add it by yourself.

+
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/external_resources.html b/v0.14.0/external_resources.html new file mode 100644 index 00000000000..97825d1ffa6 --- /dev/null +++ b/v0.14.0/external_resources.html @@ -0,0 +1,408 @@ + + + + + + + + + External Resources — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

External Resources

+

Below is a curated collection of external PyGMT resources.

+

To add your contribution to this collection, follow these instructions +to submit a pull request with your recommended addition to the +External Resources file.

+
+
+

Tutorials

+
+
+
+
+
+
+2024 AGU PREWS9: Mastering Geospatial Visualizations with GMT/PyGMT
+

+
+ +https://www.generic-mapping-tools.org/agu24workshop/
+
+
+
+
+
+2024 PyGMT Webinar using Google Colab (in Portuguese)
+

+
+ +https://github.com/andrebelem/Oficina_PyGMT
+
+
+
+
+
+2022 EGU SC5.2: Crafting beautiful maps with PyGMT
+

+
+ +https://www.generic-mapping-tools.org/egu22pygmt/
+
+
+
+
+
+2021 PyGMT course at the UAF Geophysical Institute
+

+
+ +https://github.com/liamtoney/gi-pygmt-2021
+
+
+
+
+
+2021 Remote Online Sessions for Emerging Seismologists (ROSES): Unit 5 - Mapping
+

+
+ +https://www.youtube.com/watch?v=Zvcy7VDuhiw
+
+
+
+
+
+2020 Remote Online Sessions for Emerging Seismologists (ROSES): Unit 8 - PyGMT
+

+
+ +https://www.iris.edu/hq/inclass/lesson/728
+
+
+
+
+
+PyGMT Tutorial in 2021
+

+
+ +https://github.com/MIGG-NTU/PyGMT2021
+
+
+
+
+
+PyGMT Workshop at FOSS4G Oceania 2019
+

+
+ +https://github.com/GenericMappingTools/foss4g2019oceania
+
+
+
+
+
+Crafting 3D maps of Antarctica with PyGMT and the IBCSO V2
+

+
+ +https://github.com/andrebelem/3D-Antarctic-maps
+
+
+
+
+
+Planetary Maps (in PyGMT)
+

+
+ +https://github.com/andrebelem/PlanetaryMaps
+
+
+
+
+
+PyGMT-HOWTO
+

+
+ +https://tktmyd.github.io/pygmt-howto-jp/pygmt
+
+
+
+
+
+

Examples from Publications and Posters

+
+
+
+
+
+
+GMT and PyGMT plotting examples
+

+
+ +https://github.com/michaelgrund/GMT-plotting
+
+
+
+
+
+NZ Antarctic Science Conference 2021 poster
+

+
+ +https://github.com/weiji14/nzasc2021
+
+
+
+
+
+PyGMT plotting examples
+

+
+ +https://github.com/yvonnefroehlich/gmt-pygmt-plotting
+
+
+
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/3d_plots/grdview_surface.html b/v0.14.0/gallery/3d_plots/grdview_surface.html new file mode 100644 index 00000000000..3641ce51148 --- /dev/null +++ b/v0.14.0/gallery/3d_plots/grdview_surface.html @@ -0,0 +1,320 @@ + + + + + + + + + Plotting a surface — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Plotting a surface

+

The pygmt.Figure.grdview method can plot 3-D surfaces with +surftype="s". Here, we supply the data as an xarray.DataArray with +the coordinate vectors x and y defined. Note that the perspective +parameter here controls the azimuth and elevation angle of the view. We provide +a list of two arguments to frame - the first argument specifies the +\(x\)- and \(y\)-axes frame attributes and the second argument, +prepended with "z", specifies the \(z\)-axis frame attributes. +Specifying the same scale for the projection and zscale parameters +ensures equal axis scaling. The shading parameter specifies illumination; +here we choose an azimuth of 45° with shading="+a45".

+grdview surface
import numpy as np
+import pygmt
+import xarray as xr
+
+
+# Define an interesting function of two variables, see:
+# https://en.wikipedia.org/wiki/Ackley_function
+def ackley(x, y):
+    """
+    Ackley function.
+    """
+    return (
+        -20 * np.exp(-0.2 * np.sqrt(0.5 * (x**2 + y**2)))
+        - np.exp(0.5 * (np.cos(2 * np.pi * x) + np.cos(2 * np.pi * y)))
+        + np.exp(1)
+        + 20
+    )
+
+
+# Create gridded data
+INC = 0.05
+x = np.arange(-5, 5 + INC, INC)
+y = np.arange(-5, 5 + INC, INC)
+data = xr.DataArray(ackley(*np.meshgrid(x, y)), coords=(x, y))
+
+fig = pygmt.Figure()
+
+# Plot grid as a 3-D surface
+SCALE = 0.5  # in centimeters
+fig.grdview(
+    data,
+    # Set annotations and gridlines in steps of five, and
+    # tick marks in steps of one
+    frame=["a5f1g5", "za5f1g5"],
+    projection=f"x{SCALE}c",
+    zscale=f"{SCALE}c",
+    surftype="s",
+    cmap="roma",
+    perspective=[135, 30],  # Azimuth southeast (135°), at elevation 30°
+    shading="+a45",
+)
+
+# Add colorbar for gridded data
+fig.colorbar(
+    frame="a2f1",  # Set annotations in steps of two, tick marks in steps of one
+    position="JMR",  # Place colorbar in the Middle Right (MR) corner
+)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 2.271 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/3d_plots/scatter3d.html b/v0.14.0/gallery/3d_plots/scatter3d.html new file mode 100644 index 00000000000..54a66d3c98f --- /dev/null +++ b/v0.14.0/gallery/3d_plots/scatter3d.html @@ -0,0 +1,354 @@ + + + + + + + + + 3-D scatter plots — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

3-D scatter plots

+

The pygmt.Figure.plot3d method can be used to plot symbols in 3-D. +In the example below, we show how the +Iris flower dataset +can be visualized using a perspective 3-D plot. The region +parameter has to include the \(x\), \(y\), \(z\) axis limits in the +form of (xmin, xmax, ymin, ymax, zmin, zmax), which can be done automatically +using pygmt.info. To plot the z-axis frame, set frame as a +minimum to something like frame=["WsNeZ", "zaf"]. Use perspective to +control the azimuth and elevation angle of the view, and zscale to adjust +the vertical exaggeration factor.

+scatter3d
import pandas as pd
+import pygmt
+
+# Load sample iris data
+df = pd.read_csv("https://github.com/mwaskom/seaborn-data/raw/master/iris.csv")
+
+# Convert 'species' column to categorical dtype
+# By default, pandas sorts the individual categories in an alphabetical order.
+# For a non-alphabetical order, you have to manually adjust the list of
+# categories. For handling and manipulating categorical data in pandas,
+# have a look at:
+# https://pandas.pydata.org/docs/user_guide/categorical.html
+df.species = df.species.astype(dtype="category")
+
+# Make a list of the individual categories of the 'species' column
+# ['setosa', 'versicolor', 'virginica']
+# They are (corresponding to the categorical number code) by default in
+# alphabetical order and later used for the colorbar labels
+labels = list(df.species.cat.categories)
+
+# Use pygmt.info to get region bounds (xmin, xmax, ymin, ymax, zmin, zmax)
+# The below example will return a numpy array [0.0, 3.0, 4.0, 8.0, 1.0, 7.0]
+region = pygmt.info(
+    data=df[["petal_width", "sepal_length", "petal_length"]],  # x, y, z columns
+    per_column=True,  # Report the min/max values per column as a numpy array
+    # Round the min/max values of the first three columns to the nearest
+    # multiple of 1, 2 and 0.5, respectively
+    spacing=(1, 2, 0.5),
+)
+
+# Make a 3-D scatter plot, coloring each of the 3 species differently
+fig = pygmt.Figure()
+
+# Define a colormap for three categories, define the range of the
+# new discrete CPT using series=(lowest_value, highest_value, interval),
+# use color_model="+csetosa,versicolor,virginica" to write the discrete color
+# palette "cubhelix" in categorical format and add the species names as
+# annotations for the colorbar
+pygmt.makecpt(
+    cmap="cubhelix",
+    # Use the minimum and maximum of the categorical number code
+    # to set the lowest_value and the highest_value of the CPT
+    series=(df.species.cat.codes.min(), df.species.cat.codes.max(), 1),
+    # Convert ['setosa', 'versicolor', 'virginica'] to
+    # 'setosa,versicolor,virginica'
+    color_model="+c" + ",".join(labels),
+)
+
+fig.plot3d(
+    # Use petal width, sepal length, and petal length as x, y, and z
+    # data input, respectively
+    x=df.petal_width,
+    y=df.sepal_length,
+    z=df.petal_length,
+    # Vary each symbol size according to the sepal width, scaled by 0.1
+    size=0.1 * df.sepal_width,
+    # Use 3-D cubes ("u") as symbols with size in centimeters ("c")
+    style="uc",
+    # Points colored by categorical number code (refers to the species)
+    fill=df.species.cat.codes.astype(int),
+    # Use colormap created by makecpt
+    cmap=True,
+    # Set map dimensions (xmin, xmax, ymin, ymax, zmin, zmax)
+    region=region,
+    # Set frame parameters
+    frame=[
+        "WsNeZ3+tIris flower data set",  # z axis label positioned on 3rd corner, add title
+        "xafg+lPetal Width (cm)",
+        "yafg+lSepal Length (cm)",
+        "zafg+lPetal Length (cm)",
+    ],
+    # Set perspective to azimuth NorthWest (315°), at elevation 25°
+    perspective=[315, 25],
+    # Vertical exaggeration factor
+    zscale=1.5,
+)
+
+# Shift plot origin in x direction
+fig.shift_origin(xshift="3.1c")
+# Add colorbar legend
+fig.colorbar()
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.371 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/3d_plots/sg_execution_times.html b/v0.14.0/gallery/3d_plots/sg_execution_times.html new file mode 100644 index 00000000000..b756faa1544 --- /dev/null +++ b/v0.14.0/gallery/3d_plots/sg_execution_times.html @@ -0,0 +1,248 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:02.642 total execution time for 2 files from gallery/3d_plots:

+
+ + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Plotting a surface (grdview_surface.py)

00:02.271

0.0

3-D scatter plots (scatter3d.py)

00:00.371

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/basemaps/double_y_axes.html b/v0.14.0/gallery/basemaps/double_y_axes.html new file mode 100644 index 00000000000..0c5f67c9f23 --- /dev/null +++ b/v0.14.0/gallery/basemaps/double_y_axes.html @@ -0,0 +1,322 @@ + + + + + + + + + Double Y-axes graph — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Double Y-axes graph

+

The frame parameter of the plotting methods of the pygmt.Figure +class can control which axes should be plotted and optionally show annotations, +tick marks, and gridlines. By default, all 4 axes are plotted, along with +annotations and tick marks (denoted W, S, E, N). Lower case +versions (w, s, e, n) can be used to denote to only plot the +axes with tick marks. We can also only plot the axes without annotations and +tick marks using l (left axis), r (right axis), t (top axis), +b (bottom axis). When frame is used to change the frame settings, any +axes that are not defined using one of these three options are not drawn.

+

To plot a double Y-axes graph using PyGMT, we need to plot at least two base +maps separately. The base maps should share the same projection parameter and +x-axis limits, but different y-axis limits.

+double y axes
import numpy as np
+import pygmt
+
+# Generate two sample Y data from one common X data
+x = np.linspace(1.0, 9.0, num=9)
+y1 = x
+y2 = x**2 + 110
+
+fig = pygmt.Figure()
+
+# Plot the common X axes
+# The bottom axis (S) is plotted with annotations and tick marks
+# The top axis (t) is plotted without annotations and tick marks
+# The left and right axes are not drawn
+fig.basemap(region=[0, 10, 0, 10], projection="X15c/15c", frame=["St", "xaf+lx"])
+
+# Plot the Y axis for y1 data
+# The left axis (W) is plotted with blue annotations, ticks, and label
+with pygmt.config(
+    MAP_FRAME_PEN="blue",
+    MAP_TICK_PEN="blue",
+    FONT_ANNOT_PRIMARY="blue",
+    FONT_LABEL="blue",
+):
+    fig.basemap(frame=["W", "yaf+ly1"])
+
+# Plot the line for y1 data
+fig.plot(x=x, y=y1, pen="1p,blue")
+# Plot points for y1 data
+fig.plot(x=x, y=y1, style="c0.2c", fill="blue", label="y1")
+
+# Plot the Y axis for y2 data
+# The right axis (E) is plotted with red annotations, ticks, and label
+with pygmt.config(
+    MAP_FRAME_PEN="red",
+    MAP_TICK_PEN="red",
+    FONT_ANNOT_PRIMARY="red",
+    FONT_LABEL="red",
+):
+    fig.basemap(region=[0, 10, 100, 200], frame=["E", "yaf+ly2"])
+# Plot the line for y2 data
+fig.plot(x=x, y=y2, pen="1p,red")
+# Plot points for y2 data
+fig.plot(x=x, y=y2, style="s0.28c", fill="red", label="y2")
+
+# Create a legend in the Top Left (TL) corner of the plot with an
+# offset of 0.1 centimeters
+fig.legend(position="jTL+o0.1c", box=True)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.204 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/basemaps/sg_execution_times.html b/v0.14.0/gallery/basemaps/sg_execution_times.html new file mode 100644 index 00000000000..4a2ad589019 --- /dev/null +++ b/v0.14.0/gallery/basemaps/sg_execution_times.html @@ -0,0 +1,248 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:00.404 total execution time for 2 files from gallery/basemaps:

+
+ + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Double Y-axes graph (double_y_axes.py)

00:00.204

0.0

Ternary diagram (ternary.py)

00:00.200

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/basemaps/ternary.html b/v0.14.0/gallery/basemaps/ternary.html new file mode 100644 index 00000000000..e488c296c90 --- /dev/null +++ b/v0.14.0/gallery/basemaps/ternary.html @@ -0,0 +1,299 @@ + + + + + + + + + Ternary diagram — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Ternary diagram

+

The pygmt.Figure.ternary method can draw ternary diagrams. The example +shows how to plot circles with a diameter of 0.1 centimeters +(style="c0.1c") on a 10-centimeters-wide (width="10c") ternary diagram +at the positions listed in the first three columns of the sample dataset +rock_compositions, with default annotations and gridline spacings, using +the specified labeling defined via alabel, blabel, and clabel. +Points are colored based on the values given in the fourth columns of the +sample dataset via cmap=True.

+ternary
import pygmt
+
+fig = pygmt.Figure()
+
+# Load sample data
+data = pygmt.datasets.load_sample_data(name="rock_compositions")
+
+# Define a colormap to be used for the values given in the fourth column
+# of the input dataset
+pygmt.makecpt(cmap="batlow", series=[0, 80, 10])
+
+fig.ternary(
+    data,
+    region=[0, 100, 0, 100, 0, 100],
+    width="10c",
+    style="c0.1c",
+    alabel="Limestone",
+    blabel="Water",
+    clabel="Air",
+    cmap=True,
+    frame=[
+        "aafg+lLimestone component+u %",
+        "bafg+lWater component+u %",
+        "cafg+lAir component+u %",
+    ],
+)
+
+# Add a colorbar indicating the values given in the fourth column of
+# the input dataset
+fig.colorbar(position="JBC+o0c/1.5c", frame="x+lPermittivity")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.200 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/embellishments/colorbar.html b/v0.14.0/gallery/embellishments/colorbar.html new file mode 100644 index 00000000000..32c173f12fc --- /dev/null +++ b/v0.14.0/gallery/embellishments/colorbar.html @@ -0,0 +1,349 @@ + + + + + + + + + Colorbar — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Colorbar

+

The pygmt.Figure.colorbar method creates a color scalebar. +The colormap is set via the cmap parameter. A full list of available +color palette tables can be found at https://docs.generic-mapping-tools.org/6.5/reference/cpts.html. +Use the frame parameter to add labels to the x and y axes +of the colorbar by appending +l followed by the desired text. To add +and adjust the annotations (a) and ticks (f) append the letter +followed by the desired interval. The placement of the colorbar is set +via the position parameter. There are the following options:

+
    +
  • j/J: placed inside/outside the plot bounding box using any 2-character +combination of vertical (Top, Middle, Bottom) and +horizontal (Left, Center, Right) alignment codes, e.g. +position="jTR" for Top Right.

  • +
  • g: using map coordinates, e.g. position="g170/-45" for longitude +170° East, latitude 45° South.

  • +
  • x: using paper coordinates, e.g. position="x5c/7c" for 5 cm, 7 cm +from anchor point.

  • +
  • n: using normalized (0-1) coordinates, e.g. position="n0.4/0.8".

  • +
+

Note that the anchor point defaults to Bottom Left (BL). Append +h to +position to get a horizontal colorbar instead of a vertical one (+v).

+colorbar
import pygmt
+
+fig = pygmt.Figure()
+fig.basemap(region=[0, 3, 6, 9], projection="x3c", frame=["af", "WSne+tColorbars"])
+
+# ============
+# Create a colorbar designed for seismic tomography - roma
+# Colorbar is placed at Bottom Center (BC) by default if no position is given
+# Add quantity and unit as labels ("+l") to the x and y axes
+# Add annotations ("+a") in steps of 0.5 and ticks ("+f") in steps of 0.1
+fig.colorbar(cmap="roma", frame=["xa0.5f0.1+lVelocity", "y+lm/s"])
+
+# ============
+# Create a colorbar showing the scientific rainbow - batlow
+fig.colorbar(
+    cmap="batlow",
+    # Colorbar positioned at map coordinates (g) longitude/latitude 0.3/8.7,
+    # with a length/width (+w) of 4 cm by 0.5 cm, and plotted horizontally (+h)
+    position="g0.3/8.7+w4c/0.5c+h",
+    box=True,
+    frame=["x+lTemperature", "y+l°C"],
+    scale=100,
+)
+
+# ============
+# Create a colorbar suitable for surface topography - oleron
+fig.colorbar(
+    cmap="oleron",
+    # Colorbar placed outside the plot bounding box (J) at Middle Right (MR),
+    # offset (+o) by 1 cm horizontally and 0 cm vertically from anchor point,
+    # with a length/width (+w) of 7 cm by 0.5 cm and a box for NaN values (+n)
+    position="JMR+o1c/0c+w7c/0.5c+n+mc",
+    # Note that the label 'Elevation' is moved to the opposite side and plotted
+    # vertically as a column of text using '+mc' in the position parameter
+    # above
+    frame=["x+lElevation", "y+lm"],
+    scale=10,
+)
+
+# ============
+# Create a colorbar suitable for categorical data - hawaii
+# Set up the colormap
+pygmt.makecpt(
+    cmap="hawaii",
+    series=[0, 3, 1],
+    # Comma-separated string for the annotations of the colorbar
+    color_model="+cA,B,C,D",
+)
+# Plot the colorbar
+fig.colorbar(
+    cmap=True,  # Use colormap set up above
+    # Colorbar placed inside the plot bounding box (j) in the Bottom Left (BL) corner,
+    # with an offset (+o) by 0.5 cm horizontally and 0.8 cm vertically from the anchor
+    # point, and plotted horizontally (+h)
+    position="jBL+o0.5c/0.8c+h",
+    box=True,
+    # Divide colorbar into equal-sized rectangles
+    equalsize=0.5,
+)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.165 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/embellishments/colorbars_multiple.html b/v0.14.0/gallery/embellishments/colorbars_multiple.html new file mode 100644 index 00000000000..981a3aa254f --- /dev/null +++ b/v0.14.0/gallery/embellishments/colorbars_multiple.html @@ -0,0 +1,305 @@ + + + + + + + + + Multiple colormaps — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Multiple colormaps

+

This gallery example shows how to create multiple colormaps for different +subplots. To better understand how GMT modern mode maintains several levels of +colormaps, please refer to +https://docs.generic-mapping-tools.org/6.5/reference/features.html#gmt-modern-mode-hierarchical-levels for +details.

+colorbars multiple
import pygmt
+
+fig = pygmt.Figure()
+
+# Load Earth relief data for the entire globe and a subset region
+grid_globe = pygmt.datasets.load_earth_relief(resolution="01d")
+subset_region = [-14, 30, 35, 60]
+grid_subset = pygmt.datasets.load_earth_relief(resolution="10m", region=subset_region)
+
+# Define a 1-row, 2-column subplot layout. The overall figure dimensions are
+# set to be 15 cm wide and 8 cm high. Each subplot is automatically labelled.
+# The space between the subplots is set to be 0.5 cm.
+with fig.subplot(
+    nrows=1, ncols=2, figsize=("15c", "8c"), autolabel=True, margins="0.5c"
+):
+    # Activate the first panel so that the colormap created by the makecpt
+    # function is a panel-level CPT
+    with fig.set_panel(panel=0):
+        pygmt.makecpt(cmap="geo", series=[-8000, 8000])
+        # "R?" means Winkel Tripel projection with map width automatically
+        # determined from the subplot width.
+        fig.grdimage(grid=grid_globe, projection="R?", region="g", frame="a")
+        fig.colorbar(frame=["a4000f2000", "x+lElevation", "y+lm"])
+    # Activate the second panel so that the colormap created by the makecpt
+    # function is a panel-level CPT
+    with fig.set_panel(panel=1):
+        pygmt.makecpt(cmap="globe", series=[-6000, 3000])
+        # "M?" means Mercator projection with map width also automatically
+        # determined from the subplot width.
+        fig.grdimage(grid=grid_subset, projection="M?", region=subset_region, frame="a")
+        fig.colorbar(frame=["a2000f1000", "x+lElevation", "y+lm"])
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.309 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/embellishments/inset.html b/v0.14.0/gallery/embellishments/inset.html new file mode 100644 index 00000000000..eea6cb12d24 --- /dev/null +++ b/v0.14.0/gallery/embellishments/inset.html @@ -0,0 +1,293 @@ + + + + + + + + + Inset — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Inset

+

The pygmt.Figure.inset method adds an inset figure inside a larger +figure. The method is called using a with statement, and its +position, box, offset, and margin parameters are set. Plotting +methods called within the with statement are applied to the inset figure.

+inset
import pygmt
+
+fig = pygmt.Figure()
+# Create the primary figure, setting the region to Madagascar, the land color
+# to "brown", the water to "lightblue", the shorelines width to "thin", and
+# adding a frame
+fig.coast(region="MG+r2", land="brown", water="lightblue", shorelines="thin", frame="a")
+# Create an inset, placing it in the Top Left (TL) corner with a width of 3.5 cm and
+# x- and y-offsets of 0.2 cm. The margin is set to 0, and the border is "gold" with a
+# pen size of 1.5 points.
+with fig.inset(position="jTL+w3.5c+o0.2c", margin=0, box="+p1.5p,gold"):
+    # Create a figure in the inset using coast. This example uses the azimuthal
+    # orthogonal projection centered at 47E, 20S. The land color is set to
+    # "gray" and Madagascar is highlighted in "red3".
+    fig.coast(
+        region="g",
+        projection="G47/-20/?",
+        land="gray",
+        water="white",
+        dcw="MG+gred3",
+    )
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.493 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/embellishments/inset_rectangle_region.html b/v0.14.0/gallery/embellishments/inset_rectangle_region.html new file mode 100644 index 00000000000..1fafa7ae1af --- /dev/null +++ b/v0.14.0/gallery/embellishments/inset_rectangle_region.html @@ -0,0 +1,314 @@ + + + + + + + + + Inset map showing a rectangular region — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Inset map showing a rectangular region

+

The pygmt.Figure.inset method adds an inset figure inside a larger +figure. The method is called using a with statement, and its +position, box, offset, and margin can be customized. Plotting +methods called within the with statement plot into the inset figure.

+inset rectangle region
import pygmt
+
+# Set the region of the main figure
+region = [137.5, 141, 34, 37]
+
+fig = pygmt.Figure()
+
+# Plot the base map of the main figure. Universal Transverse Mercator (UTM)
+# projection is used and the UTM zone is set to be "54S".
+fig.basemap(region=region, projection="U54S/12c", frame=["WSne", "af"])
+
+# Set the land color to "lightbrown", the water color to "azure1", the
+# shoreline width to "2p", and the area threshold to 1000 km^2 for the main
+# figure
+fig.coast(land="lightbrown", water="azure1", shorelines="2p", area_thresh=1000)
+
+# Create an inset map, placing it in the Bottom Right (BR) corner with x- and
+# y-offsets of 0.1 cm, respectively.
+# The inset map contains the Japan main land. "U54S/3c" means UTM projection
+# with a map width of 3 cm. The inset width and height are automatically
+# calculated from the specified ``region`` and ``projection`` parameters.
+# Draws a rectangular box around the inset with a fill color of "white" and
+# a pen of "1p".
+with fig.inset(
+    position="jBR+o0.1c",
+    box="+gwhite+p1p",
+    region=[129, 146, 30, 46],
+    projection="U54S/3c",
+):
+    # Highlight the Japan area in "lightbrown"
+    # and draw its outline with a pen of "0.2p".
+    fig.coast(
+        dcw="JP+glightbrown+p0.2p",
+        area_thresh=10000,
+    )
+    # Plot a rectangle ("r") in the inset map to show the area of the main
+    # figure. "+s" means that the first two columns are the longitude and
+    # latitude of the bottom left corner of the rectangle, and the last two
+    # columns the longitude and latitude of the upper right corner.
+    rectangle = [[region[0], region[2], region[1], region[3]]]
+    fig.plot(data=rectangle, style="r+s", pen="2p,blue")
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.332 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/embellishments/legend.html b/v0.14.0/gallery/embellishments/legend.html new file mode 100644 index 00000000000..69ac720b2b2 --- /dev/null +++ b/v0.14.0/gallery/embellishments/legend.html @@ -0,0 +1,322 @@ + + + + + + + + + Legend — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Legend

+

The pygmt.Figure.legend method can automatically create a legend for +symbols plotted using pygmt.Figure.plot. A legend entry is only added +when the label parameter is used to state the desired text. Optionally, +to adjust the legend, users can append different modifiers. A list of all +available modifiers can be found at https://docs.generic-mapping-tools.org/6.5/gmt.html#l-full. To create a +multiple-column legend +N is used with the desired number of columns. +For more complicated legends, users may want to write an ASCII file with +instructions for the layout of the legend items and pass it to the spec +parameter of pygmt.Figure.legend. For details on how to set up such a +file, please see the GMT documentation at https://docs.generic-mapping-tools.org/6.5/legend.html#legend-codes.

+legend
import numpy as np
+import pygmt
+
+# Set up some test data
+x = np.arange(-10, 10.2, 0.2)
+y1 = np.sin(x) + 1.1
+y2 = np.cos(x) + 1.1
+y3 = np.sin(x / 2) - 1.1
+y4 = np.cos(x / 2) - 1.1
+
+# Create new Figure() object
+fig = pygmt.Figure()
+
+fig.basemap(
+    projection="X10c/7c",
+    region=[-10, 10, -3.5, 3.5],
+    frame=["WSne", "xaf+lx", "ya1f0.5+ly"],
+)
+
+# -----------------------------------------------------------------------------
+# Top: Vertical legend (one column, default)
+
+# Use the label parameter to state the text label for the legend entry
+fig.plot(x=x, y=y1, pen="1p,green3", label="sin(x)+1.1")
+
+fig.plot(x=x, y=y2, style="c0.07c", fill="dodgerblue", label="cos(x)+1.1")
+
+# Add a legend to the plot; place it within the plot bounding box with both
+# reference ("J") and anchor ("+j") points being the Top Right (TR) corner and an
+# offset of 0.2 centimeters in x and y directions; surround the legend with a box
+fig.legend(position="JTR+jTR+o0.2c", box=True)
+
+# -----------------------------------------------------------------------------
+# Bottom: Horizontal legend (here two columns)
+
+# +N sets the number of columns corresponding to the given number, here 2
+fig.plot(x=x, y=y3, pen="1p,darkred,-", label="sin(x/2)-1.1+N2")
+
+fig.plot(x=x, y=y4, style="s0.07c", fill="orange", label="cos(x/2)-1.1")
+
+# For a multi-column legend, users have to provide the width via "+w", here it is
+# set to 6 centimeters; reference and anchor points are the Bottom Right (BR) corner
+fig.legend(position="JBR+jBR+o0.2c+w6c", box=True)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.144 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/embellishments/logo.html b/v0.14.0/gallery/embellishments/logo.html new file mode 100644 index 00000000000..39b8f1d8167 --- /dev/null +++ b/v0.14.0/gallery/embellishments/logo.html @@ -0,0 +1,279 @@ + + + + + + + + + Logo — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + + + + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/embellishments/scalebar.html b/v0.14.0/gallery/embellishments/scalebar.html new file mode 100644 index 00000000000..7ffcead1c0b --- /dev/null +++ b/v0.14.0/gallery/embellishments/scalebar.html @@ -0,0 +1,372 @@ + + + + + + + + + Scale bar — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Scale bar

+

The map_scale parameter of the pygmt.Figure.basemap and +pygmt.Figure.coast methods is used to add a scale bar to a map. +This example shows how such a scale bar can be customized:

+
+
    +
  • position: g|j|J|n|x. Set the position +of the reference point. Choose from

    +
      +
    • g: Give map coordinates as longitude/latitude.

    • +
    • j|J: Specify a two-character (order independent) code. +Choose from vertical T(op), M(iddle), or B(ottom) and +horizontal L(eft), C(entre), or R(ight). Lower / upper +case j / J mean inside / outside of the map bounding box.

    • +
    • n: Give normalized bounding box coordinates as nx/ny.

    • +
    • x: Give plot coordinates as x/y.

    • +
    +
  • +
  • length: +w. Give a distance value, and, optionally a distance unit. +Choose from e (meters), f (feet), k (kilometers) [Default], +M (statute miles), n (nautical miles), or u (US survey feet).

  • +
  • origin: +c[slon/]slat. Control where on the map the scale bar +applies. If +c is not given the reference point is used. If only ++c is appended the middle of the map is used. Note that slon is only +optional for projections with constant scale along parallels, e.g., +Mercator projection.

  • +
  • justify: +j. Set the anchor point. Specify a two-character (order +independent) code. Choose from vertical T(op), M(iddle), or +B(ottom) and horizontal L(eft), C(entre), or R(ight).

  • +
  • offset: +ooffset or +oxoffset/yoffset. Give either a +common shift or individual shifts in x (longitude) and y (latitude) +directions.

  • +
  • height: Use MAP_SCALE_HEIGHT via pygmt.config.

  • +
  • fancy style: +f. Get a scale bar that looks like train tracks.

  • +
  • unit: +u. Add the distance unit given via +w to the single +distance values.

  • +
  • label: +l. Add the distance unit given via +w as label. Append +text to get a customized label instead.

  • +
  • alignment: +a. Set the label alignment. Choose from t(op) +[Default], b(ottom), l(eft), or r(ight).

  • +
+
+
import pygmt
+
+# Create a new Figure instance
+fig = pygmt.Figure()
+
+# Mercator projection with 10 centimeters width
+fig.basemap(region=[-45, -25, -15, 0], projection="M0/0/10c", frame=["WSne", "af"])
+
+# -----------------------------------------------------------------------------
+# Top Left: Add a plain scale bar
+# It is placed based on geographic coordinates (g) 42° West and 1° South,
+# applies at the reference point (+c is not given), and represents a
+# length (+w) of 500 kilometers
+fig.basemap(map_scale="g-42/-1+w500k")
+
+# -----------------------------------------------------------------------------
+# Top Right: Add a fancy scale bar
+# It is placed based on normalized bounding box coordinates (n)
+# Use a fancy style (+f) to get a scale bar that looks like train tracks
+# Add the distance unit (+u) to the single distance values
+fig.basemap(map_scale="n0.8/0.95+w500k+f+u")
+
+# -----------------------------------------------------------------------------
+# Bottom Left: Add a thick scale bar
+# Adjust the GMT default parameter MAP_SCALE_HEIGHT locally (the change applies
+# only to the code within the "with" statement)
+# It applies (+c) at the middle of the map (no location is appended to +c)
+# Without appending text, +l adds the distance unit as label
+with pygmt.config(MAP_SCALE_HEIGHT="10p"):
+    fig.basemap(map_scale="n0.2/0.15+c+w500k+f+l")
+
+# -----------------------------------------------------------------------------
+# Bottom Right: Add a scale bar valid for a specific location
+# It is placed at BottomRight (j) using MiddleRight as anchor point (+j) with
+# an offset (+o) of 1 centimeter in both x and y directions
+# It applies (+c) at -7° South, add a customized label by appending text to +l
+fig.basemap(map_scale="jBR+jMR+o1c/1c+c-7+w500k+f+u+lvalid at 7° S")
+
+fig.show()
+
+
+scalebar

The box parameter allows surrounding the scale bar. This can be useful +when adding a scale bar to a colorful map. To fill the box, append +g +with the desired color (or pattern). The outline of the box can be adjusted +by appending +p with the desired thickness, color, and style. To force +rounded edges append +r with the desired radius.

+
# Create a new Figure instance
+fig = pygmt.Figure()
+
+fig.coast(
+    region=[-45, -25, -15, 0],
+    projection="M10c",
+    land="tan",
+    water="steelblue",
+    frame=["WSne", "af"],
+    # Set the label alignment (+a) to right (r)
+    map_scale="jBL+o1c/1c+c-7+w500k+f+lkm+ar",
+    # Fill the box in white with a transparency of 30 percent, add a solid
+    # outline in darkgray (gray30) with a thickness of 0.5 points, and use
+    # rounded edges with a radius of 3 points
+    box="+gwhite@30+p0.5p,gray30,solid+r3p",
+)
+
+fig.show()
+
+
+scalebar

Total running time of the script: (0 minutes 0.339 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/embellishments/sg_execution_times.html b/v0.14.0/gallery/embellishments/sg_execution_times.html new file mode 100644 index 00000000000..cacd179ed08 --- /dev/null +++ b/v0.14.0/gallery/embellishments/sg_execution_times.html @@ -0,0 +1,276 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:02.695 total execution time for 9 files from gallery/embellishments:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Inset (inset.py)

00:00.493

0.0

Day-night terminator line and twilights (solar.py)

00:00.364

0.0

Scale bar (scalebar.py)

00:00.339

0.0

Timestamp (timestamp.py)

00:00.336

0.0

Inset map showing a rectangular region (inset_rectangle_region.py)

00:00.332

0.0

Multiple colormaps (colorbars_multiple.py)

00:00.309

0.0

Logo (logo.py)

00:00.214

0.0

Colorbar (colorbar.py)

00:00.165

0.0

Legend (legend.py)

00:00.144

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/embellishments/solar.html b/v0.14.0/gallery/embellishments/solar.html new file mode 100644 index 00000000000..b3ef6d7bd29 --- /dev/null +++ b/v0.14.0/gallery/embellishments/solar.html @@ -0,0 +1,313 @@ + + + + + + + + + Day-night terminator line and twilights — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Day-night terminator line and twilights

+

Use pygmt.Figure.solar to show the different transition stages between +daytime and nighttime. The parameter terminator is used to set the twilight +stage, and can be either "day_night" (brightest), "civil", +"nautical", or "astronomical" (darkest). +Refer to https://en.wikipedia.org/wiki/Twilight for more information.

+solar
import datetime
+
+import pygmt
+
+fig = pygmt.Figure()
+# Create a figure showing the global region on a Mollweide projection
+# Land color is set to dark green and water color is set to light blue
+fig.coast(region="d", projection="W0/15c", land="darkgreen", water="lightblue")
+# Set a time for the day-night terminator and twilights, 17:00 UTC on
+# January 1, 2000
+terminator_datetime = datetime.datetime(
+    year=2000, month=1, day=1, hour=17, minute=0, second=0
+)
+# Set the pen line to be 0.5 points thick
+# Set the fill for the night area to be navy blue at different transparency
+# levels
+fig.solar(
+    terminator="day_night",
+    terminator_datetime=terminator_datetime,
+    fill="navyblue@95",
+    pen="0.5p",
+)
+fig.solar(
+    terminator="civil",
+    terminator_datetime=terminator_datetime,
+    fill="navyblue@85",
+    pen="0.5p",
+)
+fig.solar(
+    terminator="nautical",
+    terminator_datetime=terminator_datetime,
+    fill="navyblue@80",
+    pen="0.5p",
+)
+fig.solar(
+    terminator="astronomical",
+    terminator_datetime=terminator_datetime,
+    fill="navyblue@80",
+    pen="0.5p",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.364 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/embellishments/timestamp.html b/v0.14.0/gallery/embellishments/timestamp.html new file mode 100644 index 00000000000..796d7776dc1 --- /dev/null +++ b/v0.14.0/gallery/embellishments/timestamp.html @@ -0,0 +1,294 @@ + + + + + + + + + Timestamp — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Timestamp

+

The pygmt.Figure.timestamp method can draw the GMT timestamp logo on the plot. +The timestamp will always be shown relative to the Bottom Left (BL) corner of the plot. +By default, the offset and justify parameters are set to ("-54p", "-54p") +(x, y directions) and "BL" (Bottom Left), respectively.

+
import os
+
+import pygmt
+
+fig = pygmt.Figure()
+fig.basemap(region=[20, 30, -10, 10], projection="X10c/5c", frame=True)
+fig.timestamp()
+fig.show()
+
+
+timestamp

Additionally, a custom label can be added via the label parameter. The font can be +defined via the font parameter and the timestamp string format via timefmt.

+
os.environ["TZ"] = "Pacific/Honolulu"  # optionally set the time zone
+
+fig = pygmt.Figure()
+fig.coast(region="d", projection="H10c", land="black", water="cornsilk", frame="afg")
+fig.timestamp(
+    label="Powered by PyGMT",
+    justify="TL",
+    font="Times-Bold",
+    timefmt="%Y-%m-%dT%H:%M:%S%z",
+)
+fig.show()
+
+
+timestamp

Total running time of the script: (0 minutes 0.336 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/histograms/blockm.html b/v0.14.0/gallery/histograms/blockm.html new file mode 100644 index 00000000000..d6ae6f531c7 --- /dev/null +++ b/v0.14.0/gallery/histograms/blockm.html @@ -0,0 +1,316 @@ + + + + + + + + + Blockmean — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Blockmean

+

The pygmt.blockmean function calculates different quantities +inside blocks/bins whose dimensions are defined via the spacing parameter. +The following examples show how to calculate the averages of the given values +inside each bin and how to report the number of points inside each bin.

+blockm
import pygmt
+
+# Load sample data
+data = pygmt.datasets.load_sample_data(name="japan_quakes")
+# Select only needed columns
+data = data[["longitude", "latitude", "depth_km"]]
+
+# Set the region for the plot
+region = [130, 152.5, 32.5, 52.5]
+# Define spacing in x and y direction (150x150 arc-minute blocks)
+spacing = "150m"
+
+fig = pygmt.Figure()
+
+# Calculate mean depth in kilometers from all events within
+# 150x150 arc-minute bins using blockmean
+df = pygmt.blockmean(data=data, region=region, spacing=spacing)
+# Convert to grid
+grd = pygmt.xyz2grd(data=df, region=region, spacing=spacing)
+
+fig.grdimage(
+    grid=grd,
+    region=region,
+    frame=["af", "+tMean earthquake depth inside each block"],
+    cmap="batlow",
+)
+# Plot slightly transparent landmasses on top
+fig.coast(land="darkgray", transparency=40)
+# Plot original data points
+fig.plot(x=data.longitude, y=data.latitude, style="c0.3c", fill="white", pen="1p,black")
+fig.colorbar(frame="x+lkm")
+
+fig.shift_origin(xshift="w+5c")
+
+# Calculate number of total locations within 150x150 arc-minute bins
+# with blockmean's summary parameter
+df = pygmt.blockmean(data=data, region=region, spacing=spacing, summary="n")
+grd = pygmt.xyz2grd(data=df, region=region, spacing=spacing)
+
+fig.grdimage(
+    grid=grd,
+    region=region,
+    frame=["af", "+tNumber of points inside each block"],
+    cmap="batlow",
+)
+fig.coast(land="darkgray", transparency=40)
+fig.plot(x=data.longitude, y=data.latitude, style="c0.3c", fill="white", pen="1p,black")
+fig.colorbar(frame="x+lcount")
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.559 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/histograms/histogram.html b/v0.14.0/gallery/histograms/histogram.html new file mode 100644 index 00000000000..ecb6e945b64 --- /dev/null +++ b/v0.14.0/gallery/histograms/histogram.html @@ -0,0 +1,294 @@ + + + + + + + + + Histogram — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Histogram

+

The pygmt.Figure.histogram method can plot regular histograms. +Using the series parameter allows to set the interval for the width of +each bar. The type of the histogram (frequency count or percentage) can be +selected via the histtype parameter.

+histogram
import numpy as np
+import pygmt
+
+# Generate random elevation data from a normal distribution
+rng = np.random.default_rng(seed=100)
+mean = 100  # mean of distribution
+stddev = 25  # standard deviation of distribution
+data = rng.normal(loc=mean, scale=stddev, size=521)
+
+
+fig = pygmt.Figure()
+
+fig.histogram(
+    data=data,
+    # Define the frame, add a title, and set the background color to
+    # "lightgray". Add labels to the x-axis and y-axis
+    frame=["WSne+tHistogram+glightgray", "x+lElevation (m)", "y+lCounts"],
+    # Generate evenly spaced bins by increments of 5
+    series=5,
+    # Use "red3" as color fill for the bars
+    fill="red3",
+    # Use the pen parameter to draw the outlines with a width of 1 point
+    pen="1p",
+    # Choose histogram type 0, i.e., counts [Default]
+    histtype=0,
+)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.216 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/histograms/rose.html b/v0.14.0/gallery/histograms/rose.html new file mode 100644 index 00000000000..ca4aeaf1f17 --- /dev/null +++ b/v0.14.0/gallery/histograms/rose.html @@ -0,0 +1,301 @@ + + + + + + + + + Rose diagram — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Rose diagram

+

The pygmt.Figure.rose method can plot windrose diagrams or polar +histograms.

+rose
import pygmt
+
+# Load sample compilation of fracture lengths and azimuth as
+# hypothetically digitized from geological maps
+data = pygmt.datasets.load_sample_data(name="fractures")
+
+fig = pygmt.Figure()
+
+fig.rose(
+    # use columns of the sample dataset as input for the length and azimuth
+    # parameters
+    length=data.length,
+    azimuth=data.azimuth,
+    # specify the "region" of interest in the (r,azimuth) space
+    # [r0, r1, az0, az1], here, r0 is 0 and r1 is 1, for azimuth, az0 is 0 and
+    # az1 is 360 which means we plot a full circle between 0 and 360 degrees
+    region=[0, 1, 0, 360],
+    # set the diameter of the rose diagram to 7.5 cm
+    diameter="7.5c",
+    # define the sector width in degrees, we append +r here to draw a rose
+    # diagram instead of a sector diagram
+    sector="10+r",
+    # normalize bin counts by the largest value so all bin counts range from
+    # 0 to 1
+    norm=True,
+    # use red3 as color fill for the sectors
+    fill="red3",
+    # define the frame with ticks and gridlines every 0.2
+    # length unit in radial direction and every 30 degrees
+    # in azimuthal direction, set background color to
+    # lightgray
+    frame=["x0.2g0.2", "y30g30", "+glightgray"],
+    # use a pen size of 1p to draw the outlines
+    pen="1p",
+)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.131 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/histograms/scatter_and_histograms.html b/v0.14.0/gallery/histograms/scatter_and_histograms.html new file mode 100644 index 00000000000..86272d6c996 --- /dev/null +++ b/v0.14.0/gallery/histograms/scatter_and_histograms.html @@ -0,0 +1,331 @@ + + + + + + + + + Scatter plot with histograms — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Scatter plot with histograms

+

To create a scatter plot with histograms at the sides of the plot one can use +pygmt.Figure.plot in combination with pygmt.Figure.histogram. The +positions of the histograms are plotted by offsetting them from the main scatter plot +using pygmt.Figure.shift_origin.

+scatter and histograms
import numpy as np
+import pygmt
+
+# Generate random x, y coordinates from a standard normal distribution.
+# x values are centered on 0 with a standard deviation of 1, and y values are centered
+# on 30 with a standard deviation of 2.
+rng = np.random.default_rng()
+x = rng.normal(loc=0, scale=1, size=1000)
+y = rng.normal(loc=30, scale=2, size=1000)
+
+# Get axis limits from the data limits. Extend the limits by 0.5 to add some margin.
+xmin = np.floor(x.min()) - 0.5
+xmax = np.ceil(x.max()) + 0.5
+ymin = np.floor(y.min()) - 0.5
+ymax = np.ceil(y.max()) + 0.5
+
+# Set fill color for symbols and bars.
+fill = "seagreen"
+
+# Set the dimensions of the scatter plot.
+width, height = 10, 8
+
+fig = pygmt.Figure()
+fig.basemap(
+    region=[xmin, xmax, ymin, ymax],
+    projection=f"X{width}/{height}",
+    frame=["WSrt", "af"],
+)
+
+# Plot data points as circles with a diameter of 0.15 centimeters and set transparency
+# level for all circles to deal with overplotting.
+fig.plot(x=x, y=y, style="c0.15c", fill=fill, transparency=50)
+
+# Shift the plot origin and add top margin histogram.
+fig.shift_origin(yshift=height + 0.25)
+
+fig.histogram(
+    projection=f"X{width}/3",
+    frame=["Wsrt", "xf", "yaf+lCounts"],
+    # Give the same value for ymin and ymax to have them calculated automatically.
+    region=[xmin, xmax, 0, 0],
+    data=x,
+    fill=fill,
+    pen="0.1p,white",
+    histtype=0,
+    series=0.2,
+)
+
+# Shift the plot origin and add right margin histogram.
+fig.shift_origin(yshift=-height - 0.25, xshift=width + 0.25)
+
+# Plot the horizontal histogram.
+fig.histogram(
+    horizontal=True,
+    projection=f"X3/{height}",
+    # Note that the x- and y-axis are flipped, with the y-axis plotted horizontally.
+    frame=["wSrt", "xf", "yaf+lCounts"],
+    region=[ymin, ymax, 0, 0],
+    data=y,
+    fill=fill,
+    pen="0.1p,white",
+    histtype=0,
+    series=0.2,
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.271 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/histograms/sg_execution_times.html b/v0.14.0/gallery/histograms/sg_execution_times.html new file mode 100644 index 00000000000..b9553d3f2cd --- /dev/null +++ b/v0.14.0/gallery/histograms/sg_execution_times.html @@ -0,0 +1,256 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:01.177 total execution time for 4 files from gallery/histograms:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Blockmean (blockm.py)

00:00.559

0.0

Scatter plot with histograms (scatter_and_histograms.py)

00:00.271

0.0

Histogram (histogram.py)

00:00.216

0.0

Rose diagram (rose.py)

00:00.131

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/images/contours.html b/v0.14.0/gallery/images/contours.html new file mode 100644 index 00000000000..73004f64443 --- /dev/null +++ b/v0.14.0/gallery/images/contours.html @@ -0,0 +1,307 @@ + + + + + + + + + Contours — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Contours

+

The pygmt.Figure.contour method can plot contour lines from a table of +points by direct triangulation. The data for the triangulation can be provided +using one of three methods:

+
    +
  1. x, y, z 1-D numpy.ndarray data columns.

  2. +
  3. data 2-D numpy.ndarray data matrix with 3 columns corresponding +to x, y, z.

  4. +
  5. data path string to a file containing the x, y, z in a +tabular format.

  6. +
+

The parameters levels and annotation set the intervals of the contours +and the annotation on the contours respectively.

+

In this example we supply the data as 1-D numpy.ndarray with the +x, y, and z parameters and draw the contours using a 0.5p pen with +contours every 10 z values and annotations every 20 z values.

+contours
import numpy as np
+import pygmt
+
+# build the contours underlying data with the function z = x^2 + y^2
+X, Y = np.meshgrid(np.linspace(-10, 10, 50), np.linspace(-10, 10, 50))
+Z = X**2 + Y**2
+x, y, z = X.flatten(), Y.flatten(), Z.flatten()
+
+
+fig = pygmt.Figure()
+fig.contour(
+    region=[-10, 10, -10, 10],
+    projection="X10c/10c",
+    frame="ag",
+    pen="0.5p",
+    # pass the data as 3 1-D data columns
+    x=x,
+    y=y,
+    z=z,
+    # set the contours z values intervals to 10
+    levels=10,
+    # set the contours annotation intervals to 20
+    annotation=20,
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.217 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/images/cross_section.html b/v0.14.0/gallery/images/cross_section.html new file mode 100644 index 00000000000..07ab7d1bc50 --- /dev/null +++ b/v0.14.0/gallery/images/cross_section.html @@ -0,0 +1,383 @@ + + + + + + + + + Cross-section along a transect — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Cross-section along a transect

+

pygmt.project and pygmt.grdtrack can be used to focus on a quantity and +its variation along a desired survey line. In this example, the elevation is extracted +from a grid provided via pygmt.datasets.load_earth_relief. The figure consists +of two parts, a map of the elevation in the study area showing the survey line and a +Cartesian plot showing the elevation along the survey line.

+

This example is orientated on an example in the GMT/China documentation: +https://docs.gmt-china.org/latest/examples/ex026/

+cross section
import pygmt
+
+# Define region of study area
+# lon_min, lon_max, lat_min, lat_max in degrees East and North
+region_map = [122, 149, 30, 49]
+
+# Create a new pygmt.Figure instance
+fig = pygmt.Figure()
+
+# ----------------------------------------------------------------------------
+# Bottom: Map of elevation in study area
+
+# Set up basic map using a Mercator projection with a width of 12 centimeters
+fig.basemap(region=region_map, projection="M12c", frame="af")
+
+# Download grid for Earth relief with a resolution of 10 arc-minutes and gridline
+# registration [Default]
+grid_map = pygmt.datasets.load_earth_relief(resolution="10m", region=region_map)
+
+# Plot the downloaded grid with color-coding based on the elevation
+fig.grdimage(grid=grid_map, cmap="oleron")
+
+# Add a colorbar for the elevation
+fig.colorbar(
+    # Place the colorbar inside the plot (lower-case "j") in the Bottom Right (BR)
+    # corner with an offset ("+o") of 0.7 centimeters and 0.3 centimeters in x or y
+    # directions, respectively; move the x label above the horizontal colorbar ("+ml")
+    position="jBR+o0.7c/0.8c+h+w5c/0.3c+ml",
+    # Add a box around the colobar with a fill ("+g") in "white" color and a
+    # transparency ("@") of 30 % and with a 0.8-points thick, black, outline ("+p")
+    box="+gwhite@30+p0.8p,black",
+    # Add x and y labels ("+l")
+    frame=["x+lElevation", "y+lm"],
+)
+
+# Choose a survey line
+fig.plot(
+    x=[126, 146],  # Longitude in degrees East
+    y=[42, 40],  # Latitude in degrees North
+    # Draw a 2-points thick, red, dashed line for the survey line
+    pen="2p,red,dashed",
+)
+
+# Add labels "A" and "B" for the start and end points of the survey line
+fig.text(
+    x=[126, 146],
+    y=[42, 40],
+    text=["A", "B"],
+    offset="0c/0.2c",  # Move text 0.2 centimeters up (y direction)
+    font="15p",  # Use a font size of 15 points
+)
+
+# ----------------------------------------------------------------------------
+# Top: Elevation along survey line
+
+# Shift plot origin to the top by the height of the map ("+h") plus 1.5 centimeters
+fig.shift_origin(yshift="h+1.5c")
+
+fig.basemap(
+    region=[0, 15, -8000, 6000],  # x_min, x_max, y_min, y_max
+    # Cartesian projection with a width of 12 centimeters and a height of 3 centimeters
+    projection="X12c/3c",
+    # Add annotations ("a") and ticks ("f") as well as labels ("+l") at the west or
+    # left and south or bottom sides ("WSrt")
+    frame=["WSrt", "xa2f1+lDistance+u°", "ya4000+lElevation / m"],
+)
+
+# Add labels "A" and "B" for the start and end points of the survey line
+fig.text(
+    x=[0, 15],
+    y=[7000, 7000],
+    text=["A", "B"],
+    no_clip=True,  # Do not clip text that fall outside the plot bounds
+    font="10p",  # Use a font size of 10 points
+)
+
+# Generate points along a great circle corresponding to the survey line and store them
+# in a pandas.DataFrame
+track_df = pygmt.project(
+    center=[126, 42],  # Start point of survey line (longitude, latitude)
+    endpoint=[146, 40],  # End point of survey line (longitude, latitude)
+    generate=0.1,  # Output data in steps of 0.1 degrees
+)
+
+# Extract the elevation at the generated points from the downloaded grid and add it as
+# new column "elevation" to the pandas.DataFrame
+track_df = pygmt.grdtrack(grid=grid_map, points=track_df, newcolname="elevation")
+
+# Plot water masses
+fig.plot(
+    x=[0, 15],
+    y=[0, 0],
+    fill="lightblue",  # Fill the polygon in "lightblue"
+    # Draw a 0.25-points thick, black, solid outline
+    pen="0.25p,black,solid",
+    close="+y-8000",  # Force closed polygon
+)
+
+# Plot elevation along the survey line
+fig.plot(
+    x=track_df.p,
+    y=track_df.elevation,
+    fill="gray",  # Fill the polygon in "gray"
+    # Draw a 1-point thick, black, solid outline
+    pen="1p,black,solid",
+    close="+y-8000",  # Force closed polygon
+)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.303 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/images/grdclip.html b/v0.14.0/gallery/images/grdclip.html new file mode 100644 index 00000000000..93e497a0413 --- /dev/null +++ b/v0.14.0/gallery/images/grdclip.html @@ -0,0 +1,314 @@ + + + + + + + + + Clipping grid values — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Clipping grid values

+

The pygmt.grdclip function allows to clip defined ranges of grid +values. In the example shown below we set all elevation values (grid points) +smaller than 0 m (in general the bathymetric part of the grid) to a common +value of -2000 m via the below parameter.

+grdclip
grdblend [NOTICE]: Remote data courtesy of GMT data server oceania [http://oceania.generic-mapping-tools.org]
+grdblend [NOTICE]: SRTM15 Earth Relief v2.6 at 03x03 arc minutes reduced by Gaussian Cartesian filtering (15.7 km fullwidth) [Tozer et al., 2019].
+grdblend [NOTICE]:   -> Download 90x90 degree grid tile (earth_relief_03m_g): N00W090
+
+
+
+

+
+
import pygmt
+
+fig = pygmt.Figure()
+
+# Define region of interest around Iceland
+region = [-28, -10, 62, 68]
+
+# Load sample grid (3 arc-minutes global relief) in target area
+grid = pygmt.datasets.load_earth_relief(resolution="03m", region=region)
+
+# Plot original grid
+fig.basemap(
+    region=region,
+    projection="M12c",
+    frame=["WSne+toriginal grid", "xa5f1", "ya2f1"],
+)
+fig.grdimage(grid=grid, cmap="oleron")
+
+# Shift plot origin of the second map by "width of the first map + 0.5 cm"
+# in x direction
+fig.shift_origin(xshift="w+0.5c")
+
+# Set all grid points < 0 m to a value of -2000 m.
+grid = pygmt.grdclip(grid, below=[0, -2000])
+
+# Plot clipped grid
+fig.basemap(
+    region=region,
+    projection="M12c",
+    frame=["wSne+tclipped grid", "xa5f1", "ya2f1"],
+)
+fig.grdimage(grid=grid)
+fig.colorbar(frame=["x+lElevation", "y+lm"], position="JMR+o0.5c/0c+w8c")
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 3.212 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/images/grdgradient.html b/v0.14.0/gallery/images/grdgradient.html new file mode 100644 index 00000000000..66e230cd887 --- /dev/null +++ b/v0.14.0/gallery/images/grdgradient.html @@ -0,0 +1,316 @@ + + + + + + + + + Calculating grid gradient and radiance — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Calculating grid gradient and radiance

+

The pygmt.grdgradient function calculates the gradient of a grid file. +In the example shown below we will see how to calculate a hillshade map based +on a Data Elevation Model (DEM). As input pygmt.grdgradient gets +an xarray.DataArray object or a path string to a grid file, calculates +the respective gradient and returns it as an xarray.DataArray object. +We will use the radiance parameter in order to set the illumination source +direction and altitude.

+grdgradient
import pygmt
+
+# Define region of interest around Yosemite valley
+region = [-119.825, -119.4, 37.6, 37.825]
+
+# Load sample grid (3 arc-seconds global relief) in target area
+grid = pygmt.datasets.load_earth_relief(resolution="03s", region=region)
+
+# calculate the reflection of a light source projecting from west to east
+# (azimuth of 270 degrees) and at a latitude of 30 degrees from the horizon
+dgrid = pygmt.grdgradient(grid=grid, radiance=[270, 30])
+
+fig = pygmt.Figure()
+# define figure configuration
+pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain")
+
+# --------------- plotting the original Data Elevation Model -----------
+
+pygmt.makecpt(cmap="gray", series=[200, 4000, 10])
+fig.grdimage(
+    grid=grid,
+    projection="M12c",
+    frame=["WSrt+tOriginal Data Elevation Model", "xa0.1", "ya0.1"],
+    cmap=True,
+)
+
+fig.colorbar(position="JML+o1.4c/0c+w7c/0.5c", frame=["xa1000f500+lElevation", "y+lm"])
+
+# --------------- plotting the hillshade map -----------
+
+# Shift plot origin of the second map by 12.5 cm in x direction
+fig.shift_origin(xshift="12.5c")
+
+pygmt.makecpt(cmap="gray", series=[-1.5, 0.3, 0.01])
+fig.grdimage(
+    grid=dgrid,
+    projection="M12c",
+    frame=["lSEt+tHillshade Map", "xa0.1", "ya0.1"],
+    cmap=True,
+)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.390 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/images/grdgradient_shading.html b/v0.14.0/gallery/images/grdgradient_shading.html new file mode 100644 index 00000000000..b6a7af9a41e --- /dev/null +++ b/v0.14.0/gallery/images/grdgradient_shading.html @@ -0,0 +1,332 @@ + + + + + + + + + Calculating grid gradient with custom azimuth and normalize parameters — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ + +
+

Calculating grid gradient with custom azimuth and normalize parameters

+

The pygmt.grdgradient function calculates the gradient of a grid file. +As input, pygmt.grdgradient gets an xarray.DataArray object +or a path string to a grid file. It then calculates the respective gradient +and returns an xarray.DataArray object. The example below sets two +main parameters:

+
    +
  • azimuth to set the illumination light source direction (0° is North, +90° is East, 180° is South, 270° is West).

  • +
  • normalize to enhance the three-dimensional sense of the topography.

  • +
+

The normalize parameter calculates the azimuthal gradient of each point +along a certain azimuth angle, then adjusts the brightness value of the color +according to the positive/negative of the azimuthal gradient and the amplitude +of each point.

+grdgradient shading
grdblend [NOTICE]: Remote data courtesy of GMT data server oceania [http://oceania.generic-mapping-tools.org]
+grdblend [NOTICE]: SRTM15 Earth Relief v2.6 at 03x03 arc minutes reduced by Gaussian Cartesian filtering (15.7 km fullwidth) [Tozer et al., 2019].
+grdblend [NOTICE]:   -> Download 90x90 degree grid tile (earth_relief_03m_g): N00E000
+
+
+
+

+
+
import pygmt
+
+# Load the 3 arc-minutes global relief grid in the target area around Caucasus
+grid = pygmt.datasets.load_earth_relief(resolution="03m", region=[35, 50, 35, 45])
+
+fig = pygmt.Figure()
+
+# Define a colormap to be used for topography
+pygmt.makecpt(cmap="terra", series=[-7000, 7000])
+
+# Define figure configuration
+pygmt.config(FONT_TITLE="10p,5", MAP_TITLE_OFFSET="1p", MAP_FRAME_TYPE="plain")
+
+# Setup subplot panels with three rows and four columns
+with fig.subplot(
+    nrows=3,
+    ncols=4,
+    figsize=("28c", "21c"),
+    sharex="b",
+    sharey="l",
+):
+    # E.g. "0/90" illuminates light source from the North (top) and East
+    # (right), and so on
+    for azi in ["0/90", "0/300", "180/225"]:
+        # "e" and "t" are cumulative Laplace distribution and cumulative
+        # Cauchy distribution, respectively
+        # "amp" (e.g. 1 or 10) controls the brightness value of the color
+        for nor in ["t1", "e1", "t10", "e10"]:
+            # Making an intensity DataArray using azimuth and normalize
+            # parameters
+            shade = pygmt.grdgradient(grid=grid, azimuth=azi, normalize=nor)
+            fig.grdimage(
+                grid=grid,
+                shading=shade,
+                projection="M?",
+                frame=["a4f2", f"+tazimuth={azi}, normalize={nor}"],
+                cmap=True,
+                panel=True,
+            )
+
+fig.colorbar(position="JBC+w10c/0.25c+h", frame="xa2000f500+lElevation (m)")
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 4.859 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/images/grdlandmask.html b/v0.14.0/gallery/images/grdlandmask.html new file mode 100644 index 00000000000..449b3ceeb75 --- /dev/null +++ b/v0.14.0/gallery/images/grdlandmask.html @@ -0,0 +1,302 @@ + + + + + + + + + Create ‘wet-dry’ mask grid — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Create ‘wet-dry’ mask grid

+

The pygmt.grdlandmask function allows setting all nodes on land +or water to a specified value using the maskvalues parameter.

+grdlandmask
grdimage [WARNING]: Your CPT is categorical. Enabling -nn+a to avoid interpolation across categories.
+
+
+
+

+
+
import pygmt
+
+fig = pygmt.Figure()
+
+# Define region of interest
+region = [-65, -40, -40, -20]
+
+# Assign a value of 0 for all water masses and a value of 1 for all land
+# masses.
+# Use shoreline data with (l)ow resolution and set the grid spacing to
+# 5 arc-minutes in x and y direction.
+grid = pygmt.grdlandmask(region=region, spacing="5m", maskvalues=[0, 1], resolution="l")
+
+# Plot clipped grid
+fig.basemap(region=region, projection="M12c", frame=True)
+
+# Define a colormap to be used for two categories, define the range of the
+# new discrete CPT using series=(lowest_value, highest_value, interval),
+# use color_model="+cwater,land" to write the discrete color palette
+# "batlow" in categorical format and add water/land as annotations for the
+# colorbar.
+pygmt.makecpt(cmap="batlow", series=(0, 1, 1), color_model="+cwater,land")
+
+fig.grdimage(grid=grid, cmap=True)
+fig.colorbar(position="JMR+o0.5c/0c+w8c")
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.186 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/images/image.html b/v0.14.0/gallery/images/image.html new file mode 100644 index 00000000000..0e8e889a0bb --- /dev/null +++ b/v0.14.0/gallery/images/image.html @@ -0,0 +1,293 @@ + + + + + + + + + Images on figures — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Images on figures

+

The pygmt.Figure.image method can be used to read and place an image +file in many formats (e.g., png, jpg, eps, pdf) on a figure. We must specify +the filename via the imagefile parameter or simply use the filename as +the first argument. You can also use a full URL pointing to your desired image. +The position parameter allows us to set a reference point on the map for +the image.

+image
from pathlib import Path
+
+import pygmt
+
+fig = pygmt.Figure()
+fig.basemap(region=[0, 2, 0, 2], projection="X10c", frame=True)
+
+# place and center the GMT logo from the GMT website to the position 1/1
+# on a basemap, scaled up to be 3 cm wide and draw a rectangular border
+# around the image
+fig.image(
+    imagefile="https://www.generic-mapping-tools.org/_static/gmt-logo.png",
+    position="g1/1+w3c+jCM",
+    box=True,
+)
+
+# clean up the downloaded image in the current directory
+Path("gmt-logo.png").unlink()
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.627 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/images/rgb_image.html b/v0.14.0/gallery/images/rgb_image.html new file mode 100644 index 00000000000..7416339ab95 --- /dev/null +++ b/v0.14.0/gallery/images/rgb_image.html @@ -0,0 +1,747 @@ + + + + + + + + + RGB image — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

RGB image

+

The pygmt.Figure.grdimage method can be used to plot Red, Green, Blue +(RGB) images, or any 3-band false color combination. Here, we’ll use +rioxarray.open_rasterio to read a GeoTIFF file into an +xarray.DataArray format, and plot it on a map.

+

The example below shows a Worldview 2 satellite image over +Lāhainā, Hawaiʻi during the August 2023 wildfires. +Data is sourced from a Cloud-Optimized GeoTIFF (COG) file hosted on +OpenAerialMap under a +CC BY-NC 4.0 license.

+
import pygmt
+import rioxarray
+
+
+

Read 3-band data from GeoTIFF into an xarray.DataArray object:

+
with rioxarray.open_rasterio(
+    filename="https://oin-hotosm.s3.us-east-1.amazonaws.com/64d6a49a19cb3a000147a65b/0/64d6a49a19cb3a000147a65c.tif",
+    overview_level=5,
+) as img:
+    # Subset to area of Lāhainā in EPSG:32604 coordinates
+    image = img.rio.clip_box(minx=738000, maxx=755000, miny=2300000, maxy=2318000)
+    image = image.load()  # Force loading the DataArray into memory
+image  # noqa: B018
+
+
+
+
+ + + + + + + + + + + + + + +
<xarray.DataArray (band: 3, y: 922, x: 871)> Size: 2MB
+array([[[ 50,  53,  55, ..., 244, 243, 242],
+        [ 49,  52,  53, ..., 244, 243, 242],
+        [ 49,  53,  56, ..., 243, 242, 241],
+        ...,
+        [  0,   0,   0, ...,  27,  32,  30],
+        [  0,   0,   0, ...,  23,  28,  28],
+        [  0,   0,   0, ...,  20,  24,  23]],
+
+       [[ 57,  60,  62, ..., 240, 239, 238],
+        [ 56,  59,  60, ..., 240, 239, 238],
+        [ 53,  57,  60, ..., 239, 238, 237],
+        ...,
+        [  0,   0,   0, ...,  42,  48,  46],
+        [  0,   0,   0, ...,  36,  43,  43],
+        [  0,   0,   0, ...,  33,  39,  40]],
+
+       [[ 67,  70,  72, ..., 237, 236, 235],
+        [ 66,  69,  70, ..., 237, 236, 235],
+        [ 65,  69,  72, ..., 236, 235, 234],
+        ...,
+        [  0,   0,   0, ...,  61,  64,  62],
+        [  0,   0,   0, ...,  55,  62,  62],
+        [  0,   0,   0, ...,  52,  58,  58]]],
+      shape=(3, 922, 871), dtype=uint8)
+Coordinates:
+  * band         (band) int64 24B 1 2 3
+  * x            (x) float64 7kB 7.38e+05 7.38e+05 ... 7.55e+05 7.55e+05
+  * y            (y) float64 7kB 2.318e+06 2.318e+06 ... 2.3e+06 2.3e+06
+    spatial_ref  int64 8B 0
+Attributes:
+    AREA_OR_POINT:  Area
+    scale_factor:   1.0
+    add_offset:     0.0
+
+
+

Plot the RGB imagery:

+
fig = pygmt.Figure()
+with pygmt.config(FONT_TITLE="Times-Roman"):  # Set title font to Times-Roman
+    fig.grdimage(
+        grid=image,
+        # Use a map scale where 1 cm on the map equals 1 km on the ground
+        projection="x1:100000",
+        frame=[r"WSne+tL@!a¯hain@!a¯, Hawai`i on 9 Aug 2023", "af"],
+    )
+fig.show()
+
+
+rgb image

Total running time of the script: (0 minutes 1.046 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/images/sg_execution_times.html b/v0.14.0/gallery/images/sg_execution_times.html new file mode 100644 index 00000000000..a3a293d7361 --- /dev/null +++ b/v0.14.0/gallery/images/sg_execution_times.html @@ -0,0 +1,276 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:11.226 total execution time for 9 files from gallery/images:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Calculating grid gradient with custom azimuth and normalize parameters (grdgradient_shading.py)

00:04.859

0.0

Clipping grid values (grdclip.py)

00:03.212

0.0

RGB image (rgb_image.py)

00:01.046

0.0

Images on figures (image.py)

00:00.627

0.0

Calculating grid gradient and radiance (grdgradient.py)

00:00.390

0.0

Sampling along tracks (track_sampling.py)

00:00.386

0.0

Cross-section along a transect (cross_section.py)

00:00.303

0.0

Contours (contours.py)

00:00.217

0.0

Create ‘wet-dry’ mask grid (grdlandmask.py)

00:00.186

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/images/track_sampling.html b/v0.14.0/gallery/images/track_sampling.html new file mode 100644 index 00000000000..d1c12c96702 --- /dev/null +++ b/v0.14.0/gallery/images/track_sampling.html @@ -0,0 +1,302 @@ + + + + + + + + + Sampling along tracks — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Sampling along tracks

+

The pygmt.grdtrack function samples a raster grid’s value along +specified points. We will need to input a 2-D raster to grid which can be +an xarray.DataArray. The argument passed to the points parameter +can be a pandas.DataFrame table where the first two columns are +x and y (or longitude and latitude). Note also that there is a newcolname +parameter that will be used to name the new column of values sampled from the +grid.

+

Alternatively, a netCDF file path can be passed to grid. An ASCII file path +can also be accepted for points. To save an output ASCII file, a file name +argument needs to be passed to the outfile parameter.

+track sampling
import pygmt
+
+# Load sample grid and point datasets
+grid = pygmt.datasets.load_earth_relief()
+points = pygmt.datasets.load_sample_data(name="ocean_ridge_points")
+# Sample the bathymetry along the world's ocean ridges at specified track
+# points
+track = pygmt.grdtrack(points=points, grid=grid, newcolname="bathymetry")
+
+fig = pygmt.Figure()
+# Plot the earth relief grid on Cylindrical Stereographic projection, masking
+# land areas
+fig.basemap(region="g", projection="Cyl_stere/150/-20/15c", frame=True)
+fig.grdimage(grid=grid, cmap="gray")
+fig.coast(land="#666666")
+# Plot the sampled bathymetry points using circles (c) of 0.15 cm size
+# Points are colored using elevation values (normalized for visual purposes)
+fig.plot(
+    x=track.longitude,
+    y=track.latitude,
+    style="c0.15c",
+    cmap="terra",
+    fill=(track.bathymetry - track.bathymetry.mean()) / track.bathymetry.std(),
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.386 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/index.html b/v0.14.0/gallery/index.html new file mode 100644 index 00000000000..f33938167e6 --- /dev/null +++ b/v0.14.0/gallery/index.html @@ -0,0 +1,534 @@ + + + + + + + + + Gallery — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + + + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/connection_lines.html b/v0.14.0/gallery/lines/connection_lines.html new file mode 100644 index 00000000000..997f2f55cd0 --- /dev/null +++ b/v0.14.0/gallery/lines/connection_lines.html @@ -0,0 +1,319 @@ + + + + + + + + + Connection lines — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Connection lines

+

The connection parameter of the pygmt.Figure.plot method allows to plot +connection lines between a set of data points. Width, color, and style of the lines +can be adjusted via the pen parameter. The data points must be plotted separately +using the style parameter, with adjustments for the symbol fill and outline via +the fill and pen parameters, respectively.

+connection lines
import pygmt
+
+# Set up same sample data
+x = [2.2, 3.3, -3.1, -3.7, -0.1]
+y = [1.8, -1.2, -0.9, -4.5, 4.5]
+
+# Create new Figure instance
+fig = pygmt.Figure()
+
+# -----------------------------------------------------------------------------
+# Left: record order
+fig.basemap(region=[-5, 5, -5, 5], projection="X6c", frame=["WSne", "af"])
+
+# Connect data points based on the record order [Default connection=None]
+fig.plot(x=x, y=y, pen="1.5p,dodgerblue")
+# Plot data points
+fig.plot(x=x, y=y, style="c0.2c", fill="green3", pen="1.5p")
+
+fig.shift_origin(xshift="w+0.5c")
+
+# -----------------------------------------------------------------------------
+# Middle: network
+fig.basemap(region=[-5, 5, -5, 5], projection="X6c", frame=["wSne", "af"])
+
+# Connect data points as network
+fig.plot(x=x, y=y, pen="1.5p,dodgerblue", connection="n")
+# Plot data points
+fig.plot(x=x, y=y, style="c0.2c", fill="green3", pen="1.5p")
+
+fig.shift_origin(xshift="w+0.5c")
+
+# -----------------------------------------------------------------------------
+# Right: reference point
+fig.basemap(region=[-5, 5, -5, 5], projection="X6c", frame=["wSne", "af"])
+
+# Connect data points with the reference point (0,0)
+fig.plot(x=x, y=y, pen="1.5p,dodgerblue", connection="p0/0")
+# Plot data points
+fig.plot(x=x, y=y, style="c0.2c", fill="green3", pen="1.5p")
+# Plot reference point
+fig.plot(x=0, y=0, style="s0.3c", fill="gold", pen="1.5p")
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.157 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/decorated_lines.html b/v0.14.0/gallery/lines/decorated_lines.html new file mode 100644 index 00000000000..efe31052d45 --- /dev/null +++ b/v0.14.0/gallery/lines/decorated_lines.html @@ -0,0 +1,346 @@ + + + + + + + + + Decorated lines — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Decorated lines

+

To draw a so-called decorated line, i.e., symbols along a line or curve, use the +style parameter of the pygmt.Figure.plot method with the argument "~" +and the desired modifiers. A colon (":") is used to separate the algorithm +settings from the symbol information. This example shows how to adjust the symbols. +Beside the built-in symbols also custom symbols can be used. For modifying the main +decorated line via the pen parameter, see the +Line styles example. For details on the input data +see the upstream GMT documentation at https://docs.generic-mapping-tools.org/6.5/plot.html#s. Furthermore, there are +so-called line fronts, which are often used to plot fault lines, subduction zones, +or weather fronts; for details see the +Line fronts example.

+decorated lines
import numpy as np
+import pygmt
+
+# Generate a two-point line for plotting
+x = np.array([1, 4])
+y = np.array([24, 24])
+
+fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 24], projection="X15c", frame="+tDecorated Lines")
+
+# Plot different decorated lines
+for decoline in [
+    # Line with circles ("c") of 0.5 centimeters radius in distance of 1 centimeter
+    "~d1c:+sc0.5c",
+    # Adjust thickness, color, and style of the outline via "+p"
+    # Here, we plot a 1-point thick, blue, dashed outline
+    "~d1c:+sc0.5c+p1p,blue,dashed",
+    # Add a fill color using "+g" with the desired color
+    "~d1c:+sc0.5c+glightblue",
+    # To use a pattern as fill append "p" and give the pattern number
+    "~d1c:+sc0.5c+gp8+p1p,blue",
+    # Line with triangles ("t")
+    "~d1c:+st0.5c+gtan+p1p,black",
+    # Rotate counter-clockwise from line-parallel ("+ap") by 30 degrees
+    "~d1c:+st0.5c+gtan+p1p,black+ap30",
+    # Line with inverse triangles with a size of 0.3 centimeters in a
+    # distance of 0.4 centimeters
+    "~d0.4c:+si0.3c+gtan+p1p,black",
+    # Line with squares ("s") with a size of 0.7 centimeters in a distance of
+    # 1 centimeter
+    "~d1c:+ss0.7c+gtan+p1p,black",
+    # Shift symbols using "+n" in x and y directions relative to the main decorated line
+    "~d1c:+sd0.5c+gtan+p1p,black+n-0.2c/0.1c",
+    # Give the number of equally spaced symbols by using "n" instead of "d"
+    "~n6:+sn0.5c+gtan+p1p,black",
+    # Use upper-case "N" to have symbols at the start and end of the line
+    "~N6:+sh0.5c+gtan+p1p,black",
+    # Suppress the main decorated line by appending "+i"
+    "~d1c:+sg0.5c+gtan+p1p,black+i",
+    # To only plot a symbol at the start of the line use "N-1"
+    "~N-1:+sp0.2c+gblack",
+    # To only plot a symbol at the end of the line use "N+1"
+    "~N+1:+sp0.2c+gblack",
+    # Line with stars ("a")
+    "~d1c:+sa0.5c+ggold+p1p,black",
+    # Line with crosses ("x")
+    "~d1c:+sx0.5c+p2p,red",
+    # Line with (vertical) lines or bars ("y")
+    "~d0.5c:+sy0.5c+p5p,brown",
+    # Use custom symbol ("k") "squaroid" with a size of 0.5 centimeters
+    "~d1c:+sksquaroid/0.5c+ggray+p1p,black",
+]:
+    y = y - 1.2  # Move current line down
+    fig.plot(x=x, y=y, style=decoline, pen="1.25p,black")
+    fig.text(
+        x=x[-1],
+        y=y[-1],
+        text=decoline,
+        font="Courier-Bold",
+        justify="ML",
+        offset="0.75c/0c",
+    )
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.307 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/envelope.html b/v0.14.0/gallery/lines/envelope.html new file mode 100644 index 00000000000..90585a11d3b --- /dev/null +++ b/v0.14.0/gallery/lines/envelope.html @@ -0,0 +1,362 @@ + + + + + + + + + Envelope — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Envelope

+

The close parameter of the pygmt.Figure.plot method can be used to build a +symmetrical or an asymmetrical envelope. The user can give either the deviations or the +bounds in y-direction. For the first case append "+d" or "+D" and for the latter +case "+b".

+envelope
import pandas as pd
+import pygmt
+
+# Define a pandas.DataFrame with columns for x and y as well as the lower and upper
+# deviations
+df_devi = pd.DataFrame(
+    data={
+        "x": [1, 3, 5, 7, 9],
+        "y": [0.5, -0.7, 0.8, -0.3, 0.1],
+        "y_deviation_low": [0.2, 0.2, 0.3, 0.4, 0.2],
+        "y_deviation_upp": [0.1, 0.3, 0.2, 0.4, 0.1],
+    }
+)
+
+# Define the same pandas.DataFrame but with lower and upper bounds
+df_bound = pd.DataFrame(
+    data={
+        "x": [1, 3, 5, 7, 9],
+        "y": [0.5, -0.7, 0.8, -0.3, 0.1],
+        "y_bound_low": [0.3, -0.9, 0.5, -0.7, -0.1],
+        "y_bound_upp": [0.6, -0.4, 1.1, 0.1, 0.2],
+    }
+)
+
+
+fig = pygmt.Figure()
+
+# -----------------------------------------------------------------------------
+# Left
+fig.basemap(
+    region=[0, 10, -1.5, 1.5],
+    projection="X10c",
+    frame=["WSne+tsymmetric deviations +d", "xa2f1", "ya1f0.1"],
+)
+
+# Plot a symmetrical envelope based on the deviations ("+d")
+fig.plot(
+    data=df_devi,
+    close="+d",
+    # Fill the envelope in gray color with a transparency of 50 %
+    fill="gray@50",
+    pen="1p,gray30",
+)
+
+# Plot the data points on top
+fig.plot(data=df_devi, style="c0.2c", pen="1p,gray30", fill="darkgray")
+
+# Shift plot origin by the figure width ("w") plus 1 centimeter in x direction
+fig.shift_origin(xshift="w+1c")
+
+# -----------------------------------------------------------------------------
+# Middle
+fig.basemap(
+    region=[0, 10, -1.5, 1.5],
+    projection="X10c",
+    frame=["WSne+tasymmetric deviations +D", "xa2f1", "yf0.1"],
+)
+
+# Plot an asymmetrical envelope based on the deviations ("+D")
+fig.plot(
+    data=df_devi,
+    fill="gray@50",
+    # Add an outline around the envelope. Here, a dashed pen ("+p") with 0.5-points
+    # thickness and "gray30" color is used
+    close="+D+p0.5p,gray30,dashed",
+    pen="1p,gray30",
+)
+
+fig.plot(data=df_devi, style="c0.2c", pen="1p,gray30", fill="darkgray")
+
+fig.shift_origin(xshift="w+1c")
+
+# -----------------------------------------------------------------------------
+# Right
+fig.basemap(
+    region=[0, 10, -1.5, 1.5],
+    projection="X10c",
+    # Use "\\053" to handle "+b" as a string not as a modifier
+    frame=["wSnE+tbounds \\053b", "xa2f1", "ya1f0.1"],
+)
+
+# Plot an envelope based on the bounds ("+b")
+fig.plot(data=df_bound, close="+b+p0.5p,gray30,dashed", pen="1p,gray30")
+
+fig.plot(data=df_bound, style="c0.2c", pen="1p,gray30", fill="darkgray")
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.313 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/great_circles.html b/v0.14.0/gallery/lines/great_circles.html new file mode 100644 index 00000000000..93c465f4b7b --- /dev/null +++ b/v0.14.0/gallery/lines/great_circles.html @@ -0,0 +1,308 @@ + + + + + + + + + Generate points along great circles — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Generate points along great circles

+

The pygmt.project function can generate points along a great circle +whose center and end points can be defined via the center and endpoint +parameters, respectively. Using the generate parameter allows to generate +(r, s, p) points every dist units of p along a profile as +output. By default, all units (r, s and p) are set to degrees while +unit=True allows to set the unit for p to km.

+great circles
import pygmt
+
+fig = pygmt.Figure()
+
+# generate points every 10 degrees along a great circle from 10N,50W to 30N,5W
+points1 = pygmt.project(center=[-50, 10], endpoint=[-5, 30], generate=10)
+# generate points every 750 km along a great circle from 10N,50W to 57.5N,90W
+points2 = pygmt.project(center=[-50, 10], endpoint=[-90, 57.5], generate=750, unit=True)
+# generate points every 350 km along a great circle from 10N,50W to 68N,5W
+points3 = pygmt.project(center=[-50, 10], endpoint=[-5, 68], generate=350, unit=True)
+
+# create a plot with coast and Mercator projection (M)
+fig.basemap(region=[-100, 0, 0, 70], projection="M12c", frame=True)
+fig.coast(shorelines=True, area_thresh=5000)
+
+# plot individual points of first great circle as seagreen line
+fig.plot(x=points1.r, y=points1.s, pen="2p,seagreen")
+# plot individual points as seagreen squares atop
+fig.plot(x=points1.r, y=points1.s, style="s.45c", fill="seagreen", pen="1p")
+
+# plot individual points of second great circle as orange line
+fig.plot(x=points2.r, y=points2.s, pen="2p,orange")
+# plot individual points as orange inverted triangles atop
+fig.plot(x=points2.r, y=points2.s, style="i.6c", fill="orange", pen="1p")
+
+# plot individual points of third great circle as red3 line
+fig.plot(x=points3.r, y=points3.s, pen="2p,red3")
+# plot individual points as red3 circles atop
+fig.plot(x=points3.r, y=points3.s, style="c.3c", fill="red3", pen="1p")
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.216 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/line_custom_cpt.html b/v0.14.0/gallery/lines/line_custom_cpt.html new file mode 100644 index 00000000000..49d9f4ebfd8 --- /dev/null +++ b/v0.14.0/gallery/lines/line_custom_cpt.html @@ -0,0 +1,299 @@ + + + + + + + + + Line colors with a custom CPT — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Line colors with a custom CPT

+

The color of the lines made by pygmt.Figure.plot can be set according +to a custom CPT and assigned with the pen parameter.

+

The custom CPT can be used by setting the plot command’s cmap parameter to +True. The zvalue parameter sets the z-value (color) to be used from the +custom CPT, and the line color is set as the z-value by using +z when +setting the pen color.

+line custom cpt
import numpy as np
+import pygmt
+
+# Create a list of values between 20 and 30 with 0.2 intervals
+x = np.arange(start=20, stop=30, step=0.2)
+
+fig = pygmt.Figure()
+fig.basemap(frame=["WSne", "af"], region=[20, 30, -10, 10])
+
+# Create a custom CPT with the batlow CPT and 10 discrete z-values (colors),
+# use color_model="+c0-9" to write the color palette in categorical format and
+# add labels (0) to (9) for the colorbar legend
+pygmt.makecpt(cmap="batlow", series=[0, 9, 1], color_model="+c0-9")
+
+# Plot 10 lines and set a different z-value for each line
+for zvalue in range(10):
+    y = zvalue * np.sin(x)
+    fig.plot(x=x, y=y, cmap=True, zvalue=zvalue, pen="thick,+z,-")
+
+# Color bar to show the custom CPT and the associated z-values
+fig.colorbar()
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.226 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/line_segment_ends.html b/v0.14.0/gallery/lines/line_segment_ends.html new file mode 100644 index 00000000000..e83f90105d2 --- /dev/null +++ b/v0.14.0/gallery/lines/line_segment_ends.html @@ -0,0 +1,341 @@ + + + + + + + + + Line segment caps and joints — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Line segment caps and joints

+

PyGMT offers different appearances of line segment caps and joints. The desired +appearance can be set via the GMT default parameters PS_LINE_CAP +("butt", "round", or "square" [Default]) as well as PS_LINE_JOIN +("bevel", "round", and "miter" [Default]) and PS_MITER_LIMIT +(limit on the angle at the mitered joint below which a bevel is applied).

+line segment ends
import numpy as np
+import pygmt
+
+# Set up dictionary for colors
+dict_col = {
+    "round": "green4",
+    "square": "steelblue",
+    "butt": "orange",
+    "miter": "steelblue",
+    "bevel": "orange",
+}
+
+# Create new Figure instance
+fig = pygmt.Figure()
+
+# -----------------------------------------------------------------------------
+# Top: PS_LINE_CAP
+
+# Create sample data
+x = np.array([30, 170])
+y = np.array([70, 70])
+
+fig.basemap(region=[0, 260, 0, 100], projection="x1p", frame="rltb")
+
+for line_cap in ["butt", "round", "square"]:
+    # Change GMT default locally
+    with pygmt.config(PS_LINE_CAP=line_cap):
+        color = dict_col[line_cap]
+        # Draw a 10-point thick line with 20-point long segments and gaps
+        # Use the local PS_LINE_CAP setting
+        fig.plot(x=x, y=y, pen=f"10p,{color},20_20")
+
+    # Draw a 1-point thick black solid line to highlight segment cap appearance
+    fig.plot(x=x, y=y, pen="1p,black,solid")
+    # Plot data points as circles
+    fig.plot(x=x, y=y, style="c0.1c", fill="white", pen="0.5p,")
+    # Add label for PS_LINE_CAP setting
+    fig.text(text=line_cap, x=x[-1] + 20, y=y[-1], justify="LM")
+
+    y = y - 20
+
+fig.shift_origin(yshift="-h")
+
+# -----------------------------------------------------------------------------
+# Bottom: PS_LINE_JOIN and PS_MITER_LIMIT
+
+x = np.array([5, 95, 65])
+y = np.array([10, 70, 10])
+
+fig.basemap(region=[0, 260, 0, 100], projection="x1p", frame="rltb")
+
+for line_join in ["bevel", "round", "miter"]:
+    with pygmt.config(PS_LINE_JOIN=line_join, PS_MITER_LIMIT=1):
+        color = dict_col[line_join]
+        # Draw a 7-point thick solid line
+        # Use the local PS_LINE_JOIN and PS_MITER_LIMIT settings
+        fig.plot(x=x, y=y, pen=f"7p,{color},solid")
+
+    fig.plot(x=x, y=y, pen="1p,black,solid")
+    fig.plot(x=x, y=y, style="c0.1c", fill="white", pen="0.5p")
+    fig.text(text=line_join, x=x[1] - 10, y=y[1], justify="RB")
+
+    x = x + 75
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.206 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/linefronts.html b/v0.14.0/gallery/lines/linefronts.html new file mode 100644 index 00000000000..9452cf6f95c --- /dev/null +++ b/v0.14.0/gallery/lines/linefronts.html @@ -0,0 +1,356 @@ + + + + + + + + + Line fronts — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Line fronts

+

Using the pygmt.Figure.plot method you can draw a so-called +front which allows to plot specific symbols distributed along a line +or curve. Typical use cases are weather fronts, fault lines, +subduction zones, and more. To draw general symbols along a line or +curve, i.e., a so-called decorated line, see the +Decorated lines example.

+

A front can be drawn by passing f[±]gap[/size] to the style +parameter where gap defines the distance gap between the symbols and +size the symbol size. If gap is negative, it is interpreted to mean +the number of symbols along the front instead. If gap has a leading + +then we use the value exactly as given [Default will start and end each +line with a symbol, hence the gap is adjusted to fit]. If size is +missing it is set to 30% of the gap, except when gap is negative +and size is thus required. Append +l or +r to plot symbols on +the left or right side of the front [Default is centered]. Append ++type to specify which symbol to plot: box, circle, +fault [Default], slip, or triangle. Slip means left-lateral +or right-lateral strike-slip arrows (centered is not an option). The +s +modifier optionally accepts the angle used to draw the vector [Default is +20 degrees]. Alternatively, use +S which draws arcuate arrow heads. +Append +ooffset to offset the first symbol from the beginning of +the front by that amount [Default is 0]. The chosen symbol is drawn with +the same pen as set for the line (i.e., via the pen parameter). To use +an alternate pen, append +ppen. To skip the outline, just use ++p with no argument. To make the main front line invisible, add +i. +For modifying the main front line via the pen parameter, see the +Line styles example.

+linefronts
import numpy as np
+import pygmt
+
+# Generate a two-point line for plotting
+x = np.array([1, 4])
+y = np.array([20, 20])
+
+fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 20], projection="X15c/15c", frame="+tLine Fronts")
+
+# Plot the line using different front styles
+for frontstyle in [
+    # line with "faults" front style, same as +f [Default]
+    "f1c/0.25c",
+    # line with box front style
+    "f1c/0.25c+b",
+    # line with circle front style
+    "f1c/0.25c+c",
+    # line with triangle front style
+    "f1c/0.3c+t",
+    # line with left-lateral ("+l") slip ("+s") front style, angle is set to
+    # 45 degrees and offset to 2.25 cm
+    "f5c/1c+l+s45+o2.25c",
+    # line with "faults" front style, symbols are plotted on the left side of
+    # the front
+    "f1c/0.4c+l",
+    # line with box front style, symbols are plotted on the left side of the
+    # front
+    "f1c/0.3c+l+b",
+    # line with circle front style, symbols are plotted on the right side of
+    # the front
+    "f1c/0.4c+r+c",
+    # line with triangle front style, symbols are plotted on the left side of
+    # the front
+    "f1c/0.3c+l+t",
+    # line with triangle front style, symbols are plotted on the right side of
+    # the front, use other pen for the outline of the symbol
+    "f1c/0.4c+r+t+p1.5p,dodgerblue",
+    # line with triangle front style, symbols are plotted on the right side of
+    # the front and offset is set to 0.3 cm, skip the outline
+    "f0.5c/0.3c+r+t+o0.3c+p",
+    # line with triangle front style, symbols are plotted on the right side of
+    # the front and offset is set to 0.3 cm, skip the outline and make the main
+    # front line invisible
+    "f0.5c/0.3c+r+t+o0.3c+p+i",
+]:
+    y -= 1  # move the current line down
+    fig.plot(x=x, y=y, pen="1.25p", style=frontstyle, fill="red3")
+    fig.text(
+        x=x[-1],
+        y=y[-1],
+        text=frontstyle,
+        font="Courier-Bold",
+        justify="ML",
+        offset="0.75c/0c",
+    )
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.210 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/linestrings.html b/v0.14.0/gallery/lines/linestrings.html new file mode 100644 index 00000000000..3a04544374e --- /dev/null +++ b/v0.14.0/gallery/lines/linestrings.html @@ -0,0 +1,319 @@ + + + + + + + + + GeoPandas: Plotting lines with LineString or MultiLineString geometry — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + + +
+
+
+
+
+ + +
+

GeoPandas: Plotting lines with LineString or MultiLineString geometry

+

The pygmt.Figure.plot method allows us to plot geographical data such as lines +with LineString or MultiLineString geometry types stored in a +geopandas.GeoDataFrame object or any object that implements the +__geo_interface__ property.

+

Use geopandas.read_file to load data from any supported OGR format such as a +shapefile (.shp), GeoJSON (.geojson), geopackage (.gpkg), etc. Then, pass the +geopandas.GeoDataFrame object as an argument to the data parameter of +pygmt.Figure.plot, and style the lines using the pen parameter.

+
import geodatasets
+import geopandas as gpd
+import pygmt
+
+# Read a sample dataset provided by the geodatasets package.
+# The dataset contains large rivers in Europe, stored as LineString/MultiLineString
+# geometry types.
+gdf = gpd.read_file(geodatasets.get_path("eea large_rivers"))
+
+# Convert object to EPSG 4326 coordinate system
+gdf = gdf.to_crs("EPSG:4326")
+print(gdf.head())
+
+
+
           NAME  ...                                           geometry
+0        Danube  ...  MULTILINESTRING ((8.1846 48.0807, 8.19049 48.0...
+1         Douro  ...  MULTILINESTRING ((-8.67141 41.14934, -8.64362 ...
+2          Ebro  ...  MULTILINESTRING ((-4.05971 42.97715, -4.06841 ...
+3          Elbe  ...  MULTILINESTRING ((8.69715 53.90109, 8.72716 53...
+4  Guadalquivir  ...  MULTILINESTRING ((-6.37899 36.80363, -6.34806 ...
+
+[5 rows x 3 columns]
+
+
+
fig = pygmt.Figure()
+
+fig.coast(
+    projection="M10c",
+    region=[-10, 30, 35, 57],
+    resolution="l",
+    land="gray95",
+    shorelines="1/0.1p,gray50",
+    borders="1/0.1,gray30",
+    frame=True,
+)
+
+# Add rivers to map
+fig.plot(data=gdf, pen="1p,steelblue")
+
+fig.show()
+
+
+linestrings

Total running time of the script: (0 minutes 2.878 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/linestyles.html b/v0.14.0/gallery/lines/linestyles.html new file mode 100644 index 00000000000..69211f06639 --- /dev/null +++ b/v0.14.0/gallery/lines/linestyles.html @@ -0,0 +1,319 @@ + + + + + + + + + Line styles — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Line styles

+

The pygmt.Figure.plot method can plot lines in different styles. +The default line style is a 0.25-point wide, black, solid line, and can be +customized with the pen parameter.

+

A pen in GMT has three attributes: width, color, and style. +The style attribute controls the appearance of the line. +Giving "dotted" or "." yields a dotted line, whereas a dashed pen is +requested with "dashed" or "-". Also combinations of dots and dashes, +like ".-" for a dot-dashed line, are allowed.

+

For more advanced pen attributes, see the GMT Technical Reference +https://docs.generic-mapping-tools.org/6.5/reference/features.html#wpen-attrib.

+linestyles
import numpy as np
+import pygmt
+
+# Generate a two-point line for plotting
+x = np.array([0, 7])
+y = np.array([9, 9])
+
+fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 10], projection="X15c/8c", frame="+tLine Styles")
+
+# Plot the line using the default line style
+fig.plot(x=x, y=y)
+fig.text(x=x[-1], y=y[-1], text="solid (default)", justify="ML", offset="0.2c/0c")
+
+# Plot the line using different line styles
+for linestyle in [
+    "1p,red,-",  # dashed line
+    "1p,blue,.",  # dotted line
+    "1p,lightblue,-.",  # dash-dotted line
+    "2p,blue,..-",  # dot-dot-dashed line
+    "2p,tomato,--.",  # dash-dash-dotted line
+    # A pattern of 4-point-long line segments and 2-point-long gaps between
+    # segments, with pattern offset by 2 points from the origin
+    "2p,tomato,4_2:2p",
+]:
+    y -= 1  # Move the current line down
+    fig.plot(x=x, y=y, pen=linestyle)
+    fig.text(x=x[-1], y=y[-1], text=linestyle, justify="ML", offset="0.2c/0c")
+
+# Plot the line like a railway track (black/white).
+# The trick here is plotting the same line twice but with different line styles
+y -= 1  # move the current line down
+fig.plot(x=x, y=y, pen="5p,black")
+fig.plot(x=x, y=y, pen="4p,white,20p_20p")
+fig.text(x=x[-1], y=y[-1], text="5p,black", justify="ML", offset="0.2c/0.2c")
+fig.text(x=x[-1], y=y[-1], text="4p,white,20p_20p", justify="ML", offset="0.2c/-0.2c")
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.180 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/quoted_lines.html b/v0.14.0/gallery/lines/quoted_lines.html new file mode 100644 index 00000000000..746b6e7cc94 --- /dev/null +++ b/v0.14.0/gallery/lines/quoted_lines.html @@ -0,0 +1,360 @@ + + + + + + + + + Quoted lines — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Quoted lines

+

To plot a so-called quoted line, i.e., labels along a line +or curve, use the style parameter of the +pygmt.Figure.plot method with the argument "q" and the +desired modifiers. A colon (":") is used to separate the +algorithm settings from the label information. +This example shows how to adjust the labels. +For modifying the main quoted line via the pen parameter, +see the Line styles example. +For details on the input data see the upstream GMT documentation +at https://docs.generic-mapping-tools.org/6.5/plot.html#s.

+
import numpy as np
+import pygmt
+
+# Generate a two-point line for plotting
+x = np.array([1, 4])
+y = np.array([20, 20])
+
+fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 20], projection="X15c/15c", frame="+tQuoted Lines")
+
+# Plot different quoted lines
+for quotedline in [
+    # Line with labels ("+l") "text" in distance ("d") of 1 centimeter
+    "qd1c:+ltext",
+    # Suppress the main quoted line by appending "+i"
+    "qd1c:+ltext+i",
+    # Give the number of equally spaced labels by using "n" instead of "d"
+    "qn5:+ltext",
+    # Use upper-case "N" to have labels at the start and end of the line
+    "qN5:+ltext",
+    # To only plot a label at the start of the line use "N-1"
+    "qN-1:+ltext",
+    # To only plot a label at the end of the line use "N+1"
+    "qN+1:+ltext",
+    # Adjust the justification of the labels via "+j", here Top Center
+    "qd1c:+ltext+jTC",
+    # Shift labels using "+n" in x and y directions relative to the main
+    # quoted line
+    "qd1c:+ltext+n-0.5c/0.1c",
+    # Rotate labels via "+a" (counter-clockwise from horizontal)
+    "qd1c:+ltext+a20",
+    # Adjust size, type, and color of the font via "+f"
+    "qd1c:+ltext+f12p,Times-Bold,red",
+    # Add a box around the label via "+p"
+    "qd1c:+ltext+p",
+    # Adjust thickness, color, and style of the outline
+    "qd1c:+ltext+p0.5p,blue,dashed",
+    # Append "+o" to get a box with rounded edges
+    "qd1c:+ltext+p0.5p,blue+o",
+    # Adjust the space between label and box in x and y directions via "+c"
+    "qd1c:+ltext+p0.5p,blue+o+c0.1c/0.1c",
+    # Give a fill of the box via "+g" together with the desired color
+    "qd1c:+ltext+gdodgerblue",
+]:
+    y -= 1  # Move current line down
+    fig.plot(x=x, y=y, pen="1.25p", style=quotedline)
+    fig.text(
+        x=x[-1],
+        y=y[-1],
+        text=quotedline,
+        font="Courier-Bold",
+        justify="ML",
+        offset="0.75c/0c",
+    )
+
+fig.show()
+
+
+quoted lines

For curved labels following the line, append "+v" to the argument passed +to the style parameter.

+
# Generate sine curve
+x = np.arange(0, 10 * np.pi, 0.1)
+y = np.sin(0.8 * x)
+
+fig = pygmt.Figure()
+
+fig.basemap(region=[0, 30, -4, 4], projection="X10c/5c", frame=True)
+
+fig.plot(x=x, y=y + 2, style="qd1.2c:+lstraight text+f5p", pen="1p,blue")
+
+fig.plot(
+    x=x,
+    y=y - 2,
+    # Append "+v" to force curved labels
+    style="qd1.2c:+lcurved text+f5p+v",
+    pen="1p,blue",
+)
+
+fig.show()
+
+
+quoted lines

Total running time of the script: (0 minutes 1.148 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/sg_execution_times.html b/v0.14.0/gallery/lines/sg_execution_times.html new file mode 100644 index 00000000000..3b33b987226 --- /dev/null +++ b/v0.14.0/gallery/lines/sg_execution_times.html @@ -0,0 +1,292 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:06.531 total execution time for 13 files from gallery/lines:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

GeoPandas: Plotting lines with LineString or MultiLineString geometry (linestrings.py)

00:02.878

0.0

Quoted lines (quoted_lines.py)

00:01.148

0.0

Envelope (envelope.py)

00:00.313

0.0

Decorated lines (decorated_lines.py)

00:00.307

0.0

Cartesian, circular, and geographic vectors (vector_styles.py)

00:00.301

0.0

Vector heads and tails (vector_heads_tails.py)

00:00.267

0.0

Line colors with a custom CPT (line_custom_cpt.py)

00:00.226

0.0

Generate points along great circles (great_circles.py)

00:00.216

0.0

Line fronts (linefronts.py)

00:00.210

0.0

Line segment caps and joints (line_segment_ends.py)

00:00.206

0.0

Line styles (linestyles.py)

00:00.180

0.0

Connection lines (connection_lines.py)

00:00.157

0.0

Wiggle along tracks (wiggle.py)

00:00.124

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/vector_heads_tails.html b/v0.14.0/gallery/lines/vector_heads_tails.html new file mode 100644 index 00000000000..ae7401b50f6 --- /dev/null +++ b/v0.14.0/gallery/lines/vector_heads_tails.html @@ -0,0 +1,344 @@ + + + + + + + + + Vector heads and tails — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Vector heads and tails

+

Many methods in PyGMT allow plotting vectors with individual +heads and tails. For this purpose, several modifiers may be appended to +the corresponding vector-producing parameters for specifying the placement +of vector heads and tails, their shapes, and the justification of the vector.

+

To place a vector head at the beginning of the vector path +simply append +b to the vector-producing option (use +e to place +one at the end). Optionally, append t for a terminal line, c for a +circle, a for arrow (default), i for tail, A for plain open +arrow, and I for plain open tail. Further append l or r (e.g. +"+bar") to only draw the left or right half-sides of the selected head/tail +(default is both sides) or use +l or +r to apply simultaneously to both +beginning and end. In this context left and right refer to the side of the +vector line when viewed from the beginning point to the end point of a line +segment. The angle of the vector head apex can be set using +aangle +(default is 30). The shape of the vector head can be adjusted using ++hshape (e.g. "+h0.5").

+

For further modifiers see https://docs.generic-mapping-tools.org/6.5/plot.html#vector-attributes.

+

In the following we use the pygmt.Figure.plot method to plot vectors +with individual heads and tails. We must specify the modifiers (together with +the vector type, here "v" for Cartesian vector, see also the +Vector types example) +by passing the corresponding shortcuts to the style parameter.

+vector heads tails
import pygmt
+
+fig = pygmt.Figure()
+fig.basemap(
+    region=[0, 10, 0, 15], projection="X15c/10c", frame="+tVector heads and tails"
+)
+
+x = 1
+y = 14
+angle = 0  # in degrees, measured counter-clockwise from horizontal
+length = 7
+
+for vecstyle in [
+    # vector without head and tail (line)
+    "v0c",
+    # plain open arrow at beginning and end, angle of the vector head apex is
+    # set to 50
+    "v0.6c+bA+eA+a50",
+    # plain open tail at beginning and end
+    "v0.4c+bI+eI",
+    # terminal line at beginning and end, angle of vector head apex is set
+    # to 80
+    "v0.3c+bt+et+a80",
+    # arrow head at end
+    "v0.6c+e",
+    # circle at beginning and arrow head at end
+    "v0.6c+bc+ea",
+    # terminal line at beginning and arrow head at end
+    "v0.6c+bt+ea",
+    # arrow head at end, shape of vector head is set to 0.5
+    "v1c+e+h0.5",
+    # modified arrow heads at beginning and end
+    "v1c+b+e+h0.5",
+    # tail at beginning and arrow with modified vector head at end
+    "v1c+bi+ea+h0.5",
+    # half-sided arrow head (right side) at beginning and arrow at the end
+    "v1c+bar+ea+h0.8",
+    # half-sided arrow heads at beginning (right side) and end (left side)
+    "v1c+bar+eal+h0.5",
+    # half-sided tail at beginning and arrow at end (right side for both)
+    "v1c+bi+ea+r+h0.5+a45",
+]:
+    fig.plot(
+        x=x, y=y, style=vecstyle, direction=([angle], [length]), pen="2p", fill="red3"
+    )
+    fig.text(
+        x=6, y=y, text=vecstyle, font="Courier-Bold", justify="ML", offset="0.2c/0c"
+    )
+    y -= 1  # move the next vector down
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.267 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/vector_styles.html b/v0.14.0/gallery/lines/vector_styles.html new file mode 100644 index 00000000000..93db65ea3fa --- /dev/null +++ b/v0.14.0/gallery/lines/vector_styles.html @@ -0,0 +1,329 @@ + + + + + + + + + Cartesian, circular, and geographic vectors — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Cartesian, circular, and geographic vectors

+

The pygmt.Figure.plot method can plot Cartesian, circular, and geographic +vectors. The style parameter controls vector attributes. See also the +Vector attributes example.

+vector styles
import numpy as np
+import pygmt
+
+# Create a plot with coast, Mercator projection (M) over the continental US
+fig = pygmt.Figure()
+fig.coast(
+    region=[-127, -64, 24, 53],
+    projection="M15c",
+    frame=True,
+    borders=1,
+    area_thresh=4000,
+    shorelines="0.25p,black",
+)
+
+
+# Left: plot 12 Cartesian vectors with different lengths
+x = np.linspace(-116, -116, 12)  # x vector coordinates
+y = np.linspace(33.5, 42.5, 12)  # y vector coordinates
+direction = np.zeros(x.shape)  # direction of vectors
+length = np.linspace(0.5, 2.4, 12)  # length of vectors
+# Cartesian vectors (v) with red fill and pen (+g, +p), vector head at the end (+e), and
+# 40 degree angle (+a) with no indentation for the vector head (+h)
+style = "v0.2c+e+a40+gred+h0+p1p,red"
+fig.plot(x=x, y=y, style=style, pen="1p,red", direction=[direction, length])
+fig.text(text="CARTESIAN", x=-112, y=44.2, font="13p,Helvetica-Bold,red", fill="white")
+
+
+# Middle: plot 7 math angle arcs with different radii
+num = 7
+x = np.full(num, -95)  # x coordinates of the center
+y = np.full(num, 37)  # y coordinates of the center
+radius = 1.8 - 0.2 * np.arange(0, num)  # radius
+startdir = np.full(num, 90)  # start direction in degrees
+stopdir = 180 + 40 * np.arange(0, num)  # stop direction in degrees
+# data for circular vectors
+data = np.column_stack([x, y, radius, startdir, stopdir])
+arcstyle = "m0.5c+ea"  # Circular vector (m) with an arrow at the end
+fig.plot(data=data, style=arcstyle, fill="red3", pen="1.5p,black")
+fig.text(text="CIRCULAR", x=-95, y=44.2, font="13p,Helvetica-Bold,black", fill="white")
+
+
+# Right: plot geographic vectors using endpoints
+NYC = [-74.0060, 40.7128]
+CHI = [-87.6298, 41.8781]
+SEA = [-122.3321, 47.6062]
+NO = [-90.0715, 29.9511]
+# '=' means geographic vectors. With the modifier '+s', the input data should contain
+# coordinates of start and end points
+style = "=0.5c+s+e+a30+gblue+h0.5+p1p,blue"
+data = np.array([NYC + CHI, NYC + SEA, NYC + NO])
+fig.plot(data=data, style=style, pen="1.0p,blue")
+fig.text(
+    text="GEOGRAPHIC", x=-74.5, y=44.2, font="13p,Helvetica-Bold,blue", fill="white"
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.301 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/lines/wiggle.html b/v0.14.0/gallery/lines/wiggle.html new file mode 100644 index 00000000000..4c855599128 --- /dev/null +++ b/v0.14.0/gallery/lines/wiggle.html @@ -0,0 +1,306 @@ + + + + + + + + + Wiggle along tracks — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Wiggle along tracks

+

The pygmt.Figure.wiggle method can plot z = f(x,y) anomalies along +tracks. x, y, z can be specified as 1-D arrays or within a +specified file. The scale parameter can be used to set the scale of the +anomaly in data/distance units. The positive and/or negative areas can be +filled with color by setting the fillpositive and/or fillnegative +parameters.

+wiggle
import numpy as np
+import pygmt
+
+# Create (x, y, z) triplets
+x = np.arange(-7, 7, 0.1)
+y = np.zeros(x.size)
+z = 50 * np.exp(-((x / 3) ** 2)) * np.cos(2 * np.pi * x)
+
+fig = pygmt.Figure()
+fig.basemap(region=[-8, 12, -1, 1], projection="X10c", frame=["Snlr", "xa2f1"])
+fig.wiggle(
+    x=x,
+    y=y,
+    z=z,
+    # Set anomaly scale to 20 centimeters
+    scale="20c",
+    # Fill positive areas red
+    fillpositive="red",
+    # Fill negative areas gray
+    fillnegative="gray",
+    # Set the outline width to 1.0 point
+    pen="1.0p",
+    # Draw a blue track with a width of 0.5 points
+    track="0.5p,blue",
+    # Plot a vertical scale bar at Middle Right (MR). The bar length (+w)
+    # is 100 in data (z) units. Set the z unit label (+l) to "nT".
+    position="jMR+w100+lnT",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.124 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/maps/borders.html b/v0.14.0/gallery/maps/borders.html new file mode 100644 index 00000000000..2eab6adc2a3 --- /dev/null +++ b/v0.14.0/gallery/maps/borders.html @@ -0,0 +1,285 @@ + + + + + + + + + Political boundaries — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Political boundaries

+

The borders parameter of pygmt.Figure.coast specifies levels of +political boundaries to plot and the pen used to draw them. Choose from the +list of boundaries below:

+
    +
  • 1 = National boundaries

  • +
  • 2 = State boundaries within the Americas

  • +
  • 3 = Marine boundaries

  • +
  • a = All boundaries (1-3)

  • +
+

For example, to draw national boundaries with a line thickness of 1 point and +black line color use borders="1/1p,black". You can draw multiple boundaries +by passing in a list to borders.

+borders
import pygmt
+
+fig = pygmt.Figure()
+# Make a Sinusoidal projection map of the Americas with automatic annotations,
+# ticks and gridlines
+fig.basemap(region=[-150, -30, -60, 60], projection="I-90/15c", frame="afg")
+# Plot each level of the boundaries dataset with a different color.
+fig.coast(borders=["1/0.5p,black", "2/0.5p,red", "3/0.5p,blue"], land="gray")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.362 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/maps/choropleth_map.html b/v0.14.0/gallery/maps/choropleth_map.html new file mode 100644 index 00000000000..b78877626f6 --- /dev/null +++ b/v0.14.0/gallery/maps/choropleth_map.html @@ -0,0 +1,332 @@ + + + + + + + + + Choropleth map — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Choropleth map

+

The pygmt.Figure.plot method allows us to plot geographical data such as +polygons which are stored in a geopandas.GeoDataFrame object. Use +geopandas.read_file to load data from any supported OGR format such as a +shapefile (.shp), GeoJSON (.geojson), geopackage (.gpkg), etc. You can also use a full +URL pointing to your desired data source. Then, pass the class:geopandas.GeoDataFrame +as an argument to the data parameter of pygmt.Figure.plot, and style the +geometry using the pen parameter. To fill the polygons based on a corresponding +column you need to set fill="+z" as well as select the appropriate column using the +aspatial parameter as shown in the example below.

+
import geodatasets
+import geopandas as gpd
+import pygmt
+
+# Read the example dataset provided by geodatasets.
+gdf = gpd.read_file(geodatasets.get_path("geoda airbnb"))
+print(gdf)
+
+
+
Downloading file 'airbnb.zip' from 'https://geodacenter.github.io/data-and-lab//data/airbnb.zip' to '/home/runner/.cache/geodatasets'.
+          community  ...                                           geometry
+0           DOUGLAS  ...  POLYGON ((-87.60914 41.84469, -87.60915 41.844...
+1           OAKLAND  ...  POLYGON ((-87.59215 41.81693, -87.59231 41.816...
+2       FULLER PARK  ...  POLYGON ((-87.6288 41.80189, -87.62879 41.8017...
+3   GRAND BOULEVARD  ...  POLYGON ((-87.60671 41.81681, -87.6067 41.8165...
+4           KENWOOD  ...  POLYGON ((-87.59215 41.81693, -87.59215 41.816...
+..              ...  ...                                                ...
+72  MOUNT GREENWOOD  ...  POLYGON ((-87.69646 41.70714, -87.69644 41.706...
+73      MORGAN PARK  ...  POLYGON ((-87.64215 41.68508, -87.64249 41.685...
+74            OHARE  ...  MULTIPOLYGON (((-87.83658 41.9864, -87.83658 4...
+75        EDGEWATER  ...  POLYGON ((-87.65456 41.99817, -87.65456 41.998...
+76      EDISON PARK  ...  POLYGON ((-87.80676 42.00084, -87.80676 42.000...
+
+[77 rows x 21 columns]
+
+
+
fig = pygmt.Figure()
+
+fig.basemap(
+    region=gdf.total_bounds[[0, 2, 1, 3]],
+    projection="M6c",
+    frame="+tPopulation of Chicago",
+)
+
+# The dataset contains different attributes, here we select the "population" column to
+# plot.
+
+# First, we define the colormap to fill the polygons based on the "population" column.
+pygmt.makecpt(
+    cmap="acton",
+    series=[gdf["population"].min(), gdf["population"].max(), 10],
+    continuous=True,
+    reverse=True,
+)
+
+# Next, we plot the polygons and fill them using the defined colormap. The target column
+# is defined by the aspatial parameter.
+fig.plot(
+    data=gdf,
+    pen="0.3p,gray10",
+    fill="+z",
+    cmap=True,
+    aspatial="Z=population",
+)
+
+# Add colorbar legend.
+fig.colorbar(frame="x+lPopulation", position="jML+o-0.5c+w3.5c/0.2c")
+
+fig.show()
+
+
+choropleth map

Total running time of the script: (0 minutes 0.616 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/maps/country_polygons.html b/v0.14.0/gallery/maps/country_polygons.html new file mode 100644 index 00000000000..1f284530bbc --- /dev/null +++ b/v0.14.0/gallery/maps/country_polygons.html @@ -0,0 +1,352 @@ + + + + + + + + + Highlight country, continent and state polygons — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Highlight country, continent and state polygons

+

The pygmt.Figure.coast method can highlight country polygons +via the dcw parameter. It accepts the country code or full +country name and can draw its borders and add a color to its landmass. +It’s also possible to define multiple countries at once by separating +the individual names with commas.

+
import pygmt
+
+fig = pygmt.Figure()
+
+fig.coast(
+    region=[-12, 32, 34, 72],
+    # Lambert Azimuthal Equal Area lon0/lat0/horizon/width
+    projection="A10/52/25/6c",
+    land="gray",
+    water="white",
+    frame="afg",
+    dcw=[
+        # Great Britain (country code) with seagreen land
+        "GB+gseagreen",
+        # Italy with a red border
+        "IT+p0.5p,red3",
+        # Spain with a magenta dashed border
+        "ES+p0.5p,magenta4,-",
+        # Romania with a black dotted border
+        "RO+p0.75p,black,.",
+        # Germany with orange land and a blue border
+        "DE+gorange+p0.5p,dodgerblue4",
+        # France (full country name) with a steelblue border
+        "France+p0.5p,steelblue",
+        # Norway, Sweden and Finland (multiple countries) with pink
+        # land and pink3 borders
+        "Norway,Sweden,Finland+gpink+p0.2p,pink3",
+    ],
+)
+
+fig.show()
+
+
+country polygons

Entire continents can also be highlighted by adding "=" in +front of the continent code to differentiate it from a country code.

+
fig = pygmt.Figure()
+
+fig.coast(
+    region="d",
+    projection="H10c",
+    land="gray",
+    water="white",
+    frame="afg",
+    dcw=[
+        # Europe
+        "=EU+gseagreen",
+        # Africa
+        "=AF+gred3",
+        # North America
+        "=NA+gmagenta4",
+        # South America
+        "=SA+gorange",
+        # Asia
+        "=AS+gdodgerblue4",
+        # Oceania
+        "=OC+gtomato",
+        # Antarctica
+        "=AN+ggray30",
+    ],
+)
+
+fig.show()
+
+
+country polygons

If available, states/territories of a country can be highlighted, too.

+
fig = pygmt.Figure()
+
+fig.coast(
+    region=[-130, -70, 24, 52],
+    projection="L-100/35/33/45/12c",
+    land="gray",
+    shorelines="1/0.5p,gray30",
+    borders=["1/0.8p,gray30", "2/0.2p,gray30"],
+    frame=True,
+    dcw=[
+        # Texas with orange fill
+        "US.TX+gorange",
+        # Kentucky with blue outline
+        "US.KY+p1p,blue",
+    ],
+)
+
+fig.show()
+
+
+country polygons

Total running time of the script: (0 minutes 7.103 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/maps/land_and_water.html b/v0.14.0/gallery/maps/land_and_water.html new file mode 100644 index 00000000000..47769878b2c --- /dev/null +++ b/v0.14.0/gallery/maps/land_and_water.html @@ -0,0 +1,277 @@ + + + + + + + + + Color land and water — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Color land and water

+

The land and water parameters of pygmt.Figure.coast specify +a color to fill in the land and water masses, respectively. There are many +color codes in GMT, including standard GMT color +names (like "skyblue"), R/G/B levels (like "0/0/255"), a hex value +(like "#333333"), and a gray level (like "gray50").

+land and water
import pygmt
+
+fig = pygmt.Figure()
+# Make a global Mollweide map with automatic ticks
+fig.basemap(region="g", projection="W15c", frame=True)
+# Plot the land as light gray, and the water as sky blue
+fig.coast(land="#666666", water="skyblue")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.231 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/maps/sg_execution_times.html b/v0.14.0/gallery/maps/sg_execution_times.html new file mode 100644 index 00000000000..beb123f83d1 --- /dev/null +++ b/v0.14.0/gallery/maps/sg_execution_times.html @@ -0,0 +1,264 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:09.967 total execution time for 6 files from gallery/maps:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Highlight country, continent and state polygons (country_polygons.py)

00:07.103

0.0

Tile maps (tilemaps.py)

00:01.423

0.0

Choropleth map (choropleth_map.py)

00:00.616

0.0

Political boundaries (borders.py)

00:00.362

0.0

Color land and water (land_and_water.py)

00:00.231

0.0

Shorelines (shorelines.py)

00:00.231

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/maps/shorelines.html b/v0.14.0/gallery/maps/shorelines.html new file mode 100644 index 00000000000..1646f5910ea --- /dev/null +++ b/v0.14.0/gallery/maps/shorelines.html @@ -0,0 +1,273 @@ + + + + + + + + + Shorelines — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Shorelines

+

Use pygmt.Figure.coast to display shorelines as black lines.

+shorelines
import pygmt
+
+fig = pygmt.Figure()
+# Make a global Mollweide map with automatic ticks
+fig.basemap(region="g", projection="W15c", frame=True)
+# Display the shorelines as black lines with 0.5 point thickness
+fig.coast(shorelines="0.5p,black")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.231 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/maps/tilemaps.html b/v0.14.0/gallery/maps/tilemaps.html new file mode 100644 index 00000000000..91c4ca0504d --- /dev/null +++ b/v0.14.0/gallery/maps/tilemaps.html @@ -0,0 +1,321 @@ + + + + + + + + + Tile maps — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Tile maps

+

The pygmt.Figure.tilemap method allows to plot +tiles from a tile server or local file as a basemap or overlay.

+
import contextily
+import pygmt
+
+fig = pygmt.Figure()
+fig.tilemap(
+    region=[-157.84, -157.8, 21.255, 21.285],
+    projection="M12c",
+    # Set level of details (0-22)
+    # Higher levels mean a zoom level closer to the Earth's
+    # surface with more tiles covering a smaller
+    # geographic area and thus more details and vice versa
+    # Please note, not all zoom levels are always available
+    zoom=14,
+    # Use tiles from OpenStreetMap tile server
+    source="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
+    frame="afg",
+)
+
+fig.show()
+
+
+tilemaps
grdimage [WARNING]: (w - x_min) must equal (NX + eps) * x_inc), where NX is an integer and |eps| <= 0.0001.
+grdimage [WARNING]: w reset from -157.84 to -157.840070056
+grdimage [WARNING]: (e - x_min) must equal (NX + eps) * x_inc), where NX is an integer and |eps| <= 0.0001.
+grdimage [WARNING]: e reset from -157.8 to -157.799990801
+grdimage [WARNING]: (s - y_min) must equal (NY + eps) * y_inc), where NY is an integer and |eps| <= 0.0001.
+grdimage [WARNING]: s reset from 21.255 to 21.2549765742
+grdimage [WARNING]: (n - y_min) must equal (NY + eps) * y_inc), where NY is an integer and |eps| <= 0.0001.
+grdimage [WARNING]: n reset from 21.285 to 21.2850360149
+
+
+

It’s also possible to use tiles provided via the +contextily +library. See Contextily providers +for a list of possible tilemap options.

+
fig = pygmt.Figure()
+fig.tilemap(
+    region=[-157.84, -157.8, 21.255, 21.285],
+    projection="M12c",
+    # Use the CartoDB Positron option from contextily
+    source=contextily.providers.CartoDB.Positron,
+    frame="afg",
+)
+
+fig.show()
+
+
+tilemaps
grdimage [WARNING]: (w - x_min) must equal (NX + eps) * x_inc), where NX is an integer and |eps| <= 0.0001.
+grdimage [WARNING]: w reset from -157.84 to -157.840016369
+grdimage [WARNING]: (e - x_min) must equal (NX + eps) * x_inc), where NX is an integer and |eps| <= 0.0001.
+grdimage [WARNING]: e reset from -157.8 to -157.799990966
+grdimage [WARNING]: (s - y_min) must equal (NY + eps) * y_inc), where NY is an integer and |eps| <= 0.0001.
+grdimage [WARNING]: s reset from 21.255 to 21.2549741829
+grdimage [WARNING]: (n - y_min) must equal (NY + eps) * y_inc), where NY is an integer and |eps| <= 0.0001.
+grdimage [WARNING]: n reset from 21.285 to 21.2850347554
+
+
+

Total running time of the script: (0 minutes 1.423 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/seismology/meca.html b/v0.14.0/gallery/seismology/meca.html new file mode 100644 index 00000000000..127d6a8f343 --- /dev/null +++ b/v0.14.0/gallery/seismology/meca.html @@ -0,0 +1,306 @@ + + + + + + + + + Focal mechanisms — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Focal mechanisms

+

The pygmt.Figure.meca method can plot focal mechanisms or beachballs. +We can specify the focal mechanism nodal planes or moment tensor components +as a dictionary using the spec parameter (or they can be specified as a +1-D or 2-D array, or within a file). The size of the beachballs can be set +using the scale parameter. The compressive and extensive quadrants can +be filled either with a color or a pattern via the compressionfill and +extensionfill parameters, respectively. Use the pen parameter to +adjust the outline of the beachballs.

+meca
import pygmt
+
+fig = pygmt.Figure()
+
+# Generate a map near Washington State showing land, water, and shorelines
+fig.coast(
+    region=[-125, -122, 47, 49],
+    projection="M6c",
+    land="grey",
+    water="lightblue",
+    shorelines=True,
+    frame="a",
+)
+
+# Store focal mechanism parameters in a dictionary based on the Aki & Richards
+# convention
+focal_mechanism = {"strike": 330, "dip": 30, "rake": 90, "magnitude": 3}
+
+# Pass the focal mechanism data through the spec parameter. In addition provide
+# scale, event location, and event depth
+fig.meca(
+    spec=focal_mechanism,
+    scale="1c",  # in centimeters
+    longitude=-124.3,
+    latitude=48.1,
+    depth=12.0,
+    # Fill compressive quadrants with color "red"
+    # [Default is "black"]
+    compressionfill="red",
+    # Fill extensive quadrants with color "cornsilk"
+    # [Default is "white"]
+    extensionfill="cornsilk",
+    # Draw a 0.5 points thick dark gray ("gray30") solid outline via
+    # the pen parameter [Default is "0.25p,black,solid"]
+    pen="0.5p,gray30,solid",
+)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.159 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/seismology/sg_execution_times.html b/v0.14.0/gallery/seismology/sg_execution_times.html new file mode 100644 index 00000000000..e61b6ea098e --- /dev/null +++ b/v0.14.0/gallery/seismology/sg_execution_times.html @@ -0,0 +1,248 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:00.372 total execution time for 2 files from gallery/seismology:

+
+ + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Velocity arrows and confidence ellipses (velo_arrow_ellipse.py)

00:00.212

0.0

Focal mechanisms (meca.py)

00:00.159

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/seismology/velo_arrow_ellipse.html b/v0.14.0/gallery/seismology/velo_arrow_ellipse.html new file mode 100644 index 00000000000..27899f78572 --- /dev/null +++ b/v0.14.0/gallery/seismology/velo_arrow_ellipse.html @@ -0,0 +1,295 @@ + + + + + + + + + Velocity arrows and confidence ellipses — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Velocity arrows and confidence ellipses

+

The pygmt.Figure.velo method can be used to plot mean velocity arrows and +confidence ellipses. The example below plots red velocity arrows with lightblue +confidence ellipses outlined in red with the east_velocity x north_velocity used for +the station names. Note that the velocity arrows are scaled by 0.2 and the 39% +confidence limit will give an ellipse which fits inside a rectangle of dimension +east_sigma by north_sigma.

+velo arrow ellipse
import pandas as pd
+import pygmt
+
+fig = pygmt.Figure()
+df = pd.DataFrame(
+    data={
+        "x": [0, -8, 0, -5, 5, 0],
+        "y": [-8, 5, 0, -5, 0, -5],
+        "east_velocity": [0, 3, 4, 6, -6, 6],
+        "north_velocity": [0, 3, 6, 4, 4, -4],
+        "east_sigma": [4, 0, 4, 6, 6, 6],
+        "north_sigma": [6, 0, 6, 4, 4, 4],
+        "correlation_EN": [0.5, 0.5, 0.5, 0.5, -0.5, -0.5],
+        "SITE": ["0x0", "3x3", "4x6", "6x4", "-6x4", "6x-4"],
+    }
+)
+fig.velo(
+    data=df,
+    region=[-10, 8, -10, 6],
+    projection="x0.8c",
+    frame=["WSne", "2g2f"],
+    spec="e0.2/0.39+f18",
+    uncertaintyfill="lightblue1",
+    pen="0.6p,red",
+    line=True,
+    vector="0.3c+p1p+e+gred",
+)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.212 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/sg_execution_times.html b/v0.14.0/gallery/sg_execution_times.html new file mode 100644 index 00000000000..aaa3255b440 --- /dev/null +++ b/v0.14.0/gallery/sg_execution_times.html @@ -0,0 +1,244 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:00.000 total execution time for 0 files from gallery:

+
+ + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

N/A

N/A

N/A

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/symbols/bars.html b/v0.14.0/gallery/symbols/bars.html new file mode 100644 index 00000000000..573aed61c35 --- /dev/null +++ b/v0.14.0/gallery/symbols/bars.html @@ -0,0 +1,334 @@ + + + + + + + + + Vertical or horizontal bars — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Vertical or horizontal bars

+

The pygmt.Figure.plot method can plot vertical (b) or +horizontal (B) bars by passing the corresponding shortcut to +the style parameter. By default, base = 0 meaning that the +bar is starting from 0. Append +b[base] to change this +value. To plot multi-band bars, please append ++v|iny (for verticals bars) or +v|inx +(for horizontal ones), where ny or nx indicate the total +number of bands in the bar (and hence the number of values required +to follow the x,y coordinate pair in the input). Here, +i +means we must accumulate the bar values from the increments +dy or dx, while +v means we get the complete values relative +to base. Normally, the bands are plotted as sections of a final +single bar. Use +s to instead split the bar into ny or nx +side-by-side, individual and thinner bars. Multi-band bars require +cmap=True with one color per band.

+bars
import pygmt
+
+fig = pygmt.Figure()
+
+pygmt.makecpt(cmap="roma", series=[0, 4, 1])
+
+with fig.subplot(
+    nrows=2,
+    ncols=2,
+    subsize=("8c", "4c"),
+    frame="ag",
+    sharey=True,
+    sharex=True,
+    margins=["0.5c", "0.75c"],
+):
+    pen = "1.5p"
+    with fig.set_panel(panel=0):
+        fill = "skyblue"
+        fig.basemap(region=[0, 4, 0, 3], frame="+tvertical bars")
+        fig.plot(x=1, y=2, style="b0.5c", fill=fill, pen=pen)
+        fig.plot(x=2, y=2.5, style="b1c", fill=fill, pen=pen)
+        # +b1 means that the bar is starting from y=1 here
+        fig.plot(x=3, y=2.5, style="b0.75c+b1", fill=fill, pen=pen)
+
+    with fig.set_panel(panel=1):
+        fill = "tomato"
+        fig.basemap(region=[0, 4, 0, 3], frame="+thorizontal bars")
+        fig.plot(x=1.5, y=0.5, style="B0.75c", fill=fill, pen=pen)
+        fig.plot(x=3, y=1.5, style="B1c", fill=fill, pen=pen)
+        # +b2 means that the bar is starting from x=2 here
+        fig.plot(x=3.5, y=2.5, style="B0.5c+b2", fill=fill, pen=pen)
+
+    # generate dictionary for plotting multi-band bars
+    data = {
+        "x1": [0.25, 1.25],
+        "y": [1, 2],
+        "x2": [0.65, 0.5],
+        "x3": [0.4, 1.25],
+        "x4": [2.25, 0.75],
+    }
+
+    with fig.set_panel(panel=2):
+        fig.basemap(region=[0, 4, 0, 3], frame="+tstacked bars")
+        fig.plot(data=data, style="B0.75c+i4", cmap=True, pen=pen)
+
+    with fig.set_panel(panel=3):
+        fig.basemap(region=[0, 4, 0, 3], frame="+tsplit bars")
+        fig.plot(data=data, style="B1c+v4+s", cmap=True, pen=pen)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.216 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/symbols/basic_symbols.html b/v0.14.0/gallery/symbols/basic_symbols.html new file mode 100644 index 00000000000..f87bc0bec46 --- /dev/null +++ b/v0.14.0/gallery/symbols/basic_symbols.html @@ -0,0 +1,370 @@ + + + + + + + + + Basic geometric symbols — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Basic geometric symbols

+

The pygmt.Figure.plot method can plot individual geometric symbols +by passing the corresponding shortcuts to the style parameter. The 14 basic +geometric symbols are shown underneath their corresponding shortcut codes. +Four symbols (-, +, x and y) are line-symbols only for which we +can adjust the linewidth via the pen parameter. The point symbol (p) +only takes a color fill which we can define via the fill parameter. For +the remaining symbols we may define a linewidth as well as a color fill.

+basic symbols
import pygmt
+
+fig = pygmt.Figure()
+fig.basemap(region=[0, 8, 0, 3], projection="X12c/4c", frame=True)
+
+# define fontstlye for annotations
+font = "15p,Helvetica-Bold"
+
+# upper row
+y = 2
+
+# use a dash in x direction (-) with a size of 0.9 cm,
+# linewidth is set to 2p and the linecolor to "gray40"
+fig.plot(x=1, y=y, style="-0.9c", pen="2p,gray40")
+fig.text(x=1, y=y + 0.6, text="-", font=font)
+
+# use a plus (+) with a size of 0.9 cm,
+# linewidth is set to 2p and the linecolor to "gray40"
+fig.plot(x=2, y=y, style="+0.9c", pen="2p,gray40")
+fig.text(x=2, y=y + 0.6, text="+", font=font)
+
+# use a star (a) with a size of 0.9 cm,
+# linewidth is set to 1p, the linecolor to "black" (default) and the
+# color fill to "darkorange"
+fig.plot(x=3, y=y, style="a0.9c", pen="1p,black", fill="darkorange")
+fig.text(x=3, y=y + 0.6, text="a", font=font)
+
+# use a circle (c) with a size of 0.9 cm,
+# linewidth is set to 1p, the linecolor to "black" and the
+# color fill to "darkred"
+fig.plot(x=4, y=y, style="c0.9c", pen="1p,black", fill="darkred")
+fig.text(x=4, y=y + 0.6, text="c", font=font)
+
+# use a diamond (d) with a size of 0.9 cm,
+# linewidth is set to 1p, the linecolor to "black" and the
+# color fill to "seagreen"
+fig.plot(x=5, y=y, style="d0.9c", pen="1p,black", fill="seagreen")
+fig.text(x=5, y=y + 0.6, text="d", font=font)
+
+# use a octagon (g) with a size of 0.9 cm,
+# linewidth is set to 1p, the linecolor to "black" and the
+# color fill to "dodgerblue4"
+fig.plot(x=6, y=y, style="g0.9c", pen="1p,black", fill="dodgerblue4")
+fig.text(x=6, y=y + 0.6, text="g", font=font)
+
+# use a hexagon (h) with a size of 0.9 cm,
+# linewidth is set to 1p, the linecolor to "black" and the
+# color fill to "lightgray"
+fig.plot(x=7, y=y, style="h0.9c", pen="1p,black", fill="lightgray")
+fig.text(x=7, y=y + 0.6, text="h", font=font)
+
+# lower row
+y = 0.5
+
+# use an inverted triangle (i) with a size of 0.9 cm,
+# linewidth is set to 1p, the linecolor to "black" and the
+# color fill to "tomato"
+fig.plot(x=1, y=y, style="i0.9c", pen="1p,black", fill="tomato")
+fig.text(x=1, y=y + 0.6, text="i", font=font)
+
+# use pentagon (n) with a size of 0.9 cm,
+# linewidth is set to 1p, the linecolor to "black" and the
+# color fill to "lightseagreen"
+fig.plot(x=2, y=y, style="n0.9c", pen="1p,black", fill="lightseagreen")
+fig.text(x=2, y=y + 0.6, text="n", font=font)
+
+# use a point (p) with a size of 0.9 cm,
+# color fill is set to "lightseagreen"
+fig.plot(x=3, y=y, style="p0.9c", fill="slateblue")
+fig.text(x=3, y=y + 0.6, text="p", font=font)
+
+# use square (s) with a size of 0.9 cm,
+# linewidth is set to 1p, the linecolor to "black" and the
+# color fill to "gold2"
+fig.plot(x=4, y=y, style="s0.9c", pen="1p,black", fill="gold2")
+fig.text(x=4, y=y + 0.6, text="s", font=font)
+
+# use triangle (t) with a size of 0.9 cm,
+# linewidth is set to 1p, the linecolor to "black" and the
+# color fill to "magenta4"
+fig.plot(x=5, y=y, style="t0.9c", pen="1p,black", fill="magenta4")
+fig.text(x=5, y=y + 0.6, text="t", font=font)
+
+# use cross (x) with a size of 0.9 cm,
+# linewidth is set to 2p and the linecolor to "gray40"
+fig.plot(x=6, y=y, style="x0.9c", pen="2p,gray40")
+fig.text(x=6, y=y + 0.6, text="x", font=font)
+
+# use a dash in y direction (y) with a size of 0.9 cm,
+# linewidth is set to 2p and the linecolor to "gray40"
+fig.plot(x=7, y=y, style="y0.9c", pen="2p,gray40")
+fig.text(x=7, y=y + 0.6, text="y", font=font)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.184 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/symbols/custom_symbols.html b/v0.14.0/gallery/symbols/custom_symbols.html new file mode 100644 index 00000000000..a03a44c16ea --- /dev/null +++ b/v0.14.0/gallery/symbols/custom_symbols.html @@ -0,0 +1,311 @@ + + + + + + + + + Custom symbols — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Custom symbols

+

The pygmt.Figure.plot method can plot individual custom symbols by +passing the corresponding symbol name together with the k shortcut to the +style parameter.

+

In total 41 custom symbols are already included of which the following plot shows +five exemplary ones. The symbols are shown underneath their corresponding names. +For the remaining symbols see the GMT Technical Reference +https://docs.generic-mapping-tools.org/6.5/reference/custom-symbols.html.

+

Beside these built-in custom symbols GMT allows users to define their own custom +symbols. For this, a specific macro language is used. A detailed introduction can +be found at https://docs.generic-mapping-tools.org/6.5/reference/custom-symbols.html#the-macro-language. After +defining such a symbol it can be used in the same way as a built-in custom symbol.

+

Please note: Custom symbols can not be used in auto-legends yet.

+custom symbols
import pygmt
+
+fig = pygmt.Figure()
+fig.basemap(region=[0, 8, 0, 3], projection="X12c/4c", frame=True)
+
+# Define pen and fontstyle for annotations
+pen = "1p,black"
+font = "15p,Helvetica-Bold"
+
+# Use the volcano symbol with a size of 1.5c, fill color is set to "seagreen"
+fig.plot(x=1, y=1.25, style="kvolcano/1.5c", pen=pen, fill="seagreen")
+fig.text(x=1, y=2.5, text="volcano", font=font)
+
+# Use the astroid symbol with a size of 1.5c, fill color is set to "red3"
+fig.plot(x=2.5, y=1.25, style="kastroid/1.5c", pen=pen, fill="red3")
+fig.text(x=2.5, y=2.5, text="astroid", font=font)
+
+# Use the flash symbol with a size of 1.5c, fill color is set to "darkorange"
+fig.plot(x=4, y=1.25, style="kflash/1.5c", pen=pen, fill="darkorange")
+fig.text(x=4, y=2.5, text="flash", font=font)
+
+# Use the star4 symbol with a size of 1.5c, fill color is set to "dodgerblue4"
+fig.plot(x=5.5, y=1.25, style="kstar4/1.5c", pen=pen, fill="dodgerblue4")
+fig.text(x=5.5, y=2.5, text="star4", font=font)
+
+# Use the hurricane symbol with a size of 1.5c, fill color is set to "magenta4"
+fig.plot(x=7, y=1.25, style="khurricane/1.5c", pen=pen, fill="magenta4")
+fig.text(x=7, y=2.5, text="hurricane", font=font)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.147 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/symbols/datetime_inputs.html b/v0.14.0/gallery/symbols/datetime_inputs.html new file mode 100644 index 00000000000..46732d19e31 --- /dev/null +++ b/v0.14.0/gallery/symbols/datetime_inputs.html @@ -0,0 +1,330 @@ + + + + + + + + + Datetime inputs — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Datetime inputs

+

Datetime inputs of the following types are supported in PyGMT:

+ +

We can pass datetime inputs based on one of the types listed above directly to +the x and y parameters of e.g. the pygmt.Figure.plot method.

+

The region parameter has to include the \(x\) and \(y\) axis limits +in the form [date_min, date_max, ymin, ymax]. Here date_min and +date_max can be directly defined as datetime input.

+datetime inputs
import datetime
+
+import numpy as np
+import pandas as pd
+import pygmt
+import xarray as xr
+
+fig = pygmt.Figure()
+
+# create a basemap with limits of 2010-01-01 to 2020-06-01 on the x axis and
+# 0 to 10 on the y axis
+fig.basemap(
+    projection="X15c/5c",
+    region=[datetime.date(2010, 1, 1), datetime.date(2020, 6, 1), 0, 10],
+    frame=["WSen", "af"],
+)
+
+# numpy.datetime64 types
+x = np.array(
+    ["2010-06-01", "2011-06-01T12", "2012-01-01T12:34:56"], dtype=np.datetime64
+)
+y = [1, 2, 3]
+fig.plot(x=x, y=y, style="c0.4c", pen="1p", fill="red3")
+
+# pandas.DatetimeIndex
+x = pd.date_range("2013", periods=3, freq="YS")
+y = [4, 5, 6]
+fig.plot(x=x, y=y, style="t0.4c", pen="1p", fill="gold")
+
+# xarray.DataArray
+x = xr.DataArray(data=pd.date_range(start="2015-03", periods=3, freq="QS"))
+y = [7.5, 6, 4.5]
+fig.plot(x=x, y=y, style="s0.4c", pen="1p")
+
+# raw datetime strings
+x = ["2016-02-01", "2016-06-04T14", "2016-10-04T00:00:15"]
+y = [7, 8, 9]
+fig.plot(x=x, y=y, style="a0.4c", pen="1p", fill="dodgerblue")
+
+# the Python built-in datetime and date
+x = [datetime.date(2018, 1, 1), datetime.datetime(2019, 6, 1, 20, 5, 45)]
+y = [6.5, 4.5]
+fig.plot(x=x, y=y, style="i0.4c", pen="1p", fill="seagreen")
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.127 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/symbols/multi_parameter_symbols.html b/v0.14.0/gallery/symbols/multi_parameter_symbols.html new file mode 100644 index 00000000000..3c054f34a23 --- /dev/null +++ b/v0.14.0/gallery/symbols/multi_parameter_symbols.html @@ -0,0 +1,353 @@ + + + + + + + + + Multi-parameter symbols — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Multi-parameter symbols

+

The pygmt.Figure.plot method can plot individual multi-parameter symbols by +passing the corresponding shortcuts (e, j, r, R, w) to the style +parameter:

+
    +
  • e: ellipse

  • +
  • j: rotated rectangle

  • +
  • r: rectangle

  • +
  • R: rounded rectangle

  • +
  • w: pie wedge

  • +
+
import pygmt
+
+
+

We can plot multi-parameter symbols using the same symbol style. We need to define +locations (lon, lat) via the x and y parameters (scalar for a single symbol or +1-D list for several ones) and two or three symbol parameters after those shortcuts +via the style parameter.

+

The multi-parameter symbols in the style parameter are defined as:

+
    +
  • e: ellipse, direction/major_axis/minor_axis

  • +
  • j: rotated rectangle, direction/width/height

  • +
  • r: rectangle, width/height

  • +
  • R: rounded rectangle, width/height/radius

  • +
  • w: pie wedge, diameter/startdir/stopdir, the last two arguments are +directions given in degrees counter-clockwise from horizontal. Append +i and the +desired value to apply an inner diameter.

  • +
+

Upper-case versions E, J, and W are similar to e, j, and w +but expect geographic azimuths and distances.

+
fig = pygmt.Figure()
+fig.basemap(region=[0, 7, 0, 2], projection="x3c", frame=True)
+
+# Ellipse
+fig.plot(x=0.5, y=1, style="e45/3/1", fill="orange", pen="2p,black")
+# Rotated rectangle
+fig.plot(x=1.5, y=1, style="j120/5/0.5", fill="red3", pen="2p,black")
+# Rectangle
+fig.plot(x=3, y=1, style="r4/1.5", fill="dodgerblue", pen="2p,black")
+# Rounded rectangle
+fig.plot(x=4.5, y=1, style="R1.25/4/0.5", fill="seagreen", pen="2p,black")
+# Pie wedge
+fig.plot(x=5.5, y=1, style="w2.5/45/330", fill="lightgray", pen="2p,black")
+# Ring sector
+fig.plot(x=6.5, y=1, style="w2.5/45/330+i1", fill="lightgray", pen="2p,black")
+
+fig.show()
+
+
+multi parameter symbols

We can also plot symbols with varying parameters via defining those values in a 2-D +list or numpy array ([[parameters]] for a single symbol or +[[parameters_1],[parameters_2],[parameters_i]] for several ones) or using an +appropriately formatted input file and passing it to data.

+

The symbol parameters in the 2-D list or numpy array are defined as:

+
    +
  • e: ellipse, [[lon, lat, direction, major_axis, minor_axis]]

  • +
  • j: rotated rectangle, [[lon, lat, direction, width, height]]

  • +
  • r: rectangle, [[lon, lat, width, height]]

  • +
  • R: rounded rectangle, [[lon, lat, width, height, radius]]

  • +
  • w: pie wedge, [[lon, lat, diameter, startdir, stopdir]], the last two +arguments are directions given in degrees counter-clockwise from horizontal

  • +
+
fig = pygmt.Figure()
+fig.basemap(region=[0, 7, 0, 4], projection="x3c", frame=["xa1f0.2", "ya0.5f0.1"])
+
+# Ellipse
+data = [[0.5, 1, 45, 3, 1], [0.5, 3, 135, 2, 1]]
+fig.plot(data=data, style="e", fill="orange", pen="2p,black")
+# Rotated rectangle
+data = [[1.5, 1, 120, 5, 0.5], [1.5, 3, 50, 3, 0.5]]
+fig.plot(data=data, style="j", fill="red3", pen="2p,black")
+# Rectangle
+data = [[3, 1, 4, 1.5], [3, 3, 3, 1.5]]
+fig.plot(data=data, style="r", fill="dodgerblue", pen="2p,black")
+# Rounded rectangle
+data = [[4.5, 1, 1.25, 4, 0.5], [4.5, 3, 1.25, 2.0, 0.2]]
+fig.plot(data=data, style="R", fill="seagreen", pen="2p,black")
+# Pie wedge
+data = [[5.5, 1, 2.5, 45, 330], [5.5, 3, 1.5, 60, 300]]
+fig.plot(data=data, style="w", fill="lightgray", pen="2p,black")
+# Ring sector
+data = [[6.5, 1, 2.5, 45, 330], [6.5, 3, 1.5, 60, 300]]
+fig.plot(data=data, style="w+i1", fill="lightgray", pen="2p,black")
+
+fig.show()
+
+
+multi parameter symbols

Total running time of the script: (0 minutes 0.424 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/symbols/patterns.html b/v0.14.0/gallery/symbols/patterns.html new file mode 100644 index 00000000000..a79b42a8622 --- /dev/null +++ b/v0.14.0/gallery/symbols/patterns.html @@ -0,0 +1,328 @@ + + + + + + + + + Bit and hachure patterns — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Bit and hachure patterns

+

In addition to colors, PyGMT also allows using bit and hachure patterns to fill +symbols, polygons, and other areas, via the fill parameter or similar parameters.

+

Example method parameters that support bit and hachure patterns include:

+ +

GMT provides 90 predefined patterns that can be used in PyGMT. The patterns are numbered +from 1 to 90, and can be colored and inverted. The resolution of the pattern +can be changed, and the background and foreground colors can be set. For a complete list +of available patterns and the full syntax to specify a pattern, refer to the +Bit and hachure patterns.

+patterns
import pygmt
+
+# A list of patterns that will be demonstrated.
+# To use a pattern as fill append "p" and the number of the desired pattern.
+# By default, the pattern is plotted in black and white with a resolution of 300 dpi.
+patterns = [
+    # Plot a hachted pattern via pattern number 8
+    "p8",
+    # Plot a dotted pattern via pattern number 19
+    "p19",
+    # Set the background color ("+b") to "red3" and the foreground color ("+f") to
+    # "lightgray"
+    "p19+bred3+flightbrown",
+    # Invert the pattern by using a capitalized "P"
+    "P19+bred3+flightbrown",
+    # Change the resolution ("+r") to 100 dpi
+    "p19+bred3+flightbrown+r100",
+    # Make the background transparent by not giving a color after "+b";
+    # works analogous for the foreground
+    "p19+b+flightbrown+r100",
+]
+
+fig = pygmt.Figure()
+fig.basemap(
+    region=[0, 10, 0, 12],
+    projection="X10c",
+    frame="rlbt+glightgray+tBit and Hachure Patterns",
+)
+
+y = 11
+for pattern in patterns:
+    # Plot a square with the pattern as fill.
+    # The square has a size of 2 centimeters with a 1 point thick, black outline.
+    fig.plot(x=2, y=y, style="s2c", pen="1p,black", fill=pattern)
+    # Add a description of the pattern.
+    fig.text(x=4, y=y, text=pattern, font="Courier-Bold", justify="ML")
+    y -= 2
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.185 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/symbols/points.html b/v0.14.0/gallery/symbols/points.html new file mode 100644 index 00000000000..4e1a7f337c1 --- /dev/null +++ b/v0.14.0/gallery/symbols/points.html @@ -0,0 +1,288 @@ + + + + + + + + + Points — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Points

+

The pygmt.Figure.plot method can plot data points. The symbol and +size are set with the style parameter.

+points
import numpy as np
+import pygmt
+
+# Generate a random set of points to plot
+rng = np.random.default_rng(seed=42)
+region = [150, 240, -10, 60]
+x = rng.uniform(low=region[0], high=region[1], size=100)
+y = rng.uniform(low=region[2], high=region[3], size=100)
+
+
+fig = pygmt.Figure()
+# Create a 15 cm x 15 cm basemap with a Cartesian projection (X) using the
+# data region
+fig.basemap(region=region, projection="X15c", frame=True)
+# Plot using inverted triangles (i) of 0.5 cm size
+fig.plot(x=x, y=y, style="i0.5c", fill="black")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.165 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/symbols/points_categorical.html b/v0.14.0/gallery/symbols/points_categorical.html new file mode 100644 index 00000000000..1c6fe52c2aa --- /dev/null +++ b/v0.14.0/gallery/symbols/points_categorical.html @@ -0,0 +1,359 @@ + + + + + + + + + Color points by categories — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Color points by categories

+

The pygmt.Figure.plot method can be used to plot symbols which are +color-coded by categories. In the example below, we show how the +Palmer Penguins dataset +can be visualized. Here, we can pass the individual categories included in +the “species” column directly to the fill parameter via +fill=df.species.cat.codes.astype(int). Additionally, we have to set +cmap=True. A desired colormap can be selected via the pygmt.makecpt +function.

+points categorical
import pandas as pd
+import pygmt
+
+# Load sample penguins data
+df = pd.read_csv("https://github.com/mwaskom/seaborn-data/raw/master/penguins.csv")
+
+# Convert 'species' column to categorical dtype
+# By default, pandas sorts the individual categories in an alphabetical order.
+# For a non-alphabetical order, you have to manually adjust the list of
+# categories. For handling and manipulating categorical data in pandas,
+# have a look at:
+# https://pandas.pydata.org/docs/user_guide/categorical.html
+df.species = df.species.astype(dtype="category")
+
+# Make a list of the individual categories of the 'species' column
+# ['Adelie', 'Chinstrap', 'Gentoo']
+# They are (corresponding to the categorical number code) by default in
+# alphabetical order and later used for the colorbar annotations
+cb_annots = list(df.species.cat.categories)
+
+# Use pygmt.info to get region bounds (xmin, xmax, ymin, ymax)
+# The below example will return a numpy array like [30.0, 60.0, 12.0, 22.0]
+region = pygmt.info(
+    data=df[["bill_length_mm", "bill_depth_mm"]],  # x and y columns
+    per_column=True,  # Report the min/max values per column as a numpy array
+    # Round the min/max values of the first two columns to the nearest multiple
+    # of 3 and 2, respectively
+    spacing=(3, 2),
+)
+
+# Make a 2-D categorical scatter plot, coloring each of the 3 species
+# differently
+fig = pygmt.Figure()
+
+# Generate a basemap of 10 cm x 10 cm size
+fig.basemap(
+    region=region,
+    projection="X10c/10c",
+    frame=[
+        "xafg+lBill length (mm)",
+        "yafg+lBill depth (mm)",
+        "WSen+tPenguin size at Palmer Station",
+    ],
+)
+
+# Define a colormap for three categories, define the range of the
+# new discrete CPT using series=(lowest_value, highest_value, interval),
+# use color_model="+cAdelie,Chinstrap,Gentoo" to write the discrete color
+# palette "inferno" in categorical format and add the species names as
+# annotations for the colorbar
+pygmt.makecpt(
+    cmap="inferno",
+    # Use the minimum and maximum of the categorical number code
+    # to set the lowest_value and the highest_value of the CPT
+    series=(df.species.cat.codes.min(), df.species.cat.codes.max(), 1),
+    # Convert ['Adelie', 'Chinstrap', 'Gentoo'] to 'Adelie,Chinstrap,Gentoo'
+    color_model="+c" + ",".join(cb_annots),
+)
+
+fig.plot(
+    # Use bill length and bill depth as x and y data input, respectively
+    x=df.bill_length_mm,
+    y=df.bill_depth_mm,
+    # Vary symbol size according to the body mass, scaled by 7.5e-5
+    size=df.body_mass_g * 7.5e-5,
+    # Points colored by categorical number code (refers to the species)
+    fill=df.species.cat.codes.astype(int),
+    # Use colormap created by makecpt
+    cmap=True,
+    # Do not clip symbols that fall close to the plot bounds
+    no_clip=True,
+    # Use circles as symbols (the first "c") with diameter in
+    # centimeters (the second "c")
+    style="cc",
+    # Set transparency level for all symbols to deal with overplotting
+    transparency=40,
+)
+
+# Add colorbar legend
+fig.colorbar()
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.350 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/symbols/points_transparency.html b/v0.14.0/gallery/symbols/points_transparency.html new file mode 100644 index 00000000000..f0ddc9529f8 --- /dev/null +++ b/v0.14.0/gallery/symbols/points_transparency.html @@ -0,0 +1,288 @@ + + + + + + + + + Points with varying transparency — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Points with varying transparency

+

Points can be plotted with different transparency levels by passing in an array +argument to the transparency parameter of pygmt.Figure.plot.

+points transparency
import numpy as np
+import pygmt
+
+# prepare the input x and y data
+x = np.arange(0, 105, 5)
+y = np.ones(x.size)
+# transparency level in percentage from 0 (i.e., opaque) to 100
+transparency = x
+
+fig = pygmt.Figure()
+fig.basemap(
+    region=[-5, 105, 0, 2],
+    frame=["xaf+lTransparency level+u%", "WSrt"],
+    projection="X15c/6c",
+)
+fig.plot(x=x, y=y, style="c0.6c", fill="blue", pen="1p,red", transparency=transparency)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.176 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/symbols/scatter.html b/v0.14.0/gallery/symbols/scatter.html new file mode 100644 index 00000000000..351ed804d59 --- /dev/null +++ b/v0.14.0/gallery/symbols/scatter.html @@ -0,0 +1,307 @@ + + + + + + + + + Scatter plots with a legend — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Scatter plots with a legend

+

To create a scatter plot with a legend one may use a loop and create one +scatter plot per item to appear in the legend and set the label accordingly.

+

Modified from the matplotlib example: +https://matplotlib.org/stable/gallery/lines_bars_and_markers/scatter_with_legend.html

+scatter
import numpy as np
+import pygmt
+
+rng = np.random.default_rng(seed=19680801)
+n = 200  # number of random data points
+
+fig = pygmt.Figure()
+fig.basemap(
+    region=[-1, 1, -1, 1],
+    projection="X10c/10c",
+    frame=["xa0.5fg", "ya0.5fg", "WSrt"],
+)
+for fill in ["gray73", "darkorange", "slateblue"]:
+    # Generate standard normal distributions centered on 0
+    # with standard deviations of 1
+    x = rng.normal(loc=0, scale=0.5, size=n)  # random x data
+    y = rng.normal(loc=0, scale=0.5, size=n)  # random y data
+    size = rng.normal(loc=0, scale=0.5, size=n) * 0.5  # random size, in cm
+
+    # plot data points as circles (style="c"), with different sizes
+    fig.plot(
+        x=x,
+        y=y,
+        style="c",
+        size=size,
+        fill=fill,
+        # Set the legend label,
+        # and set the symbol size to be 0.25 cm (+S0.25c) in legend
+        label=f"{fill}+S0.25c",
+        transparency=50,  # set transparency level for all symbols
+    )
+
+fig.legend(transparency=30)  # set transparency level for legends
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.237 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/symbols/sg_execution_times.html b/v0.14.0/gallery/symbols/sg_execution_times.html new file mode 100644 index 00000000000..392e9efb51d --- /dev/null +++ b/v0.14.0/gallery/symbols/sg_execution_times.html @@ -0,0 +1,284 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:02.346 total execution time for 11 files from gallery/symbols:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Multi-parameter symbols (multi_parameter_symbols.py)

00:00.424

0.0

Color points by categories (points_categorical.py)

00:00.350

0.0

Scatter plots with a legend (scatter.py)

00:00.237

0.0

Vertical or horizontal bars (bars.py)

00:00.216

0.0

Bit and hachure patterns (patterns.py)

00:00.185

0.0

Basic geometric symbols (basic_symbols.py)

00:00.184

0.0

Points with varying transparency (points_transparency.py)

00:00.176

0.0

Points (points.py)

00:00.165

0.0

Custom symbols (custom_symbols.py)

00:00.147

0.0

Text symbols (text_symbols.py)

00:00.135

0.0

Datetime inputs (datetime_inputs.py)

00:00.127

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/gallery/symbols/text_symbols.html b/v0.14.0/gallery/symbols/text_symbols.html new file mode 100644 index 00000000000..63d89152bb3 --- /dev/null +++ b/v0.14.0/gallery/symbols/text_symbols.html @@ -0,0 +1,303 @@ + + + + + + + + + Text symbols — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Text symbols

+

The pygmt.Figure.plot method allows to plot text symbols. Text is normally +placed with the pygmt.Figure.text method but there are times we wish to treat a +character or even a string as a plottable symbol. A text symbol can be drawn by passing +lsize+tstring to the style parameter where size defines the size +of the text symbol (note: the size is only approximate; no individual scaling is done +for different characters) and string can be a letter or a text string (less than 256 +characters). Optionally, you can append +ffont,outlinecolor to select a +particular font [Default is FONT_ANNOT_PRIMARY] and outline color [Default +is black] as well as +jjustify to change the justification [Default is CM]. For +all supported fonts see Supported Fonts. The fill color of the text symbols can be +set with the fill parameter, and the outline width can be customized with the +pen parameter.

+text symbols
import pygmt
+
+fig = pygmt.Figure()
+
+fig.basemap(region=[0, 8, 0, 3], projection="X12c/4c", frame=True)
+
+pen = "1.5p"
+# plot an uppercase "A" of size 3.5c, color fill is set to "dodgerblue3"
+fig.plot(x=1, y=1.5, style="l3.5c+tA", fill="dodgerblue3", pen=pen)
+# plot an "asterisk" of size 3.5c, color fill is set to "red3"
+fig.plot(x=2.5, y=1, style="l3.5c+t*", fill="red3", pen=pen)
+# plot an uppercase "Z" of size 3.5c and use the "Courier-Bold" font,
+# color fill is set to "seagreen"
+fig.plot(x=4, y=1.5, style="l3.5c+tZ+fCourier-Bold", fill="seagreen", pen=pen)
+# plot a lowercase "s" of size 3.5c and use the "Times-Italic" font,
+# color fill is set to "gold"
+fig.plot(x=5.5, y=1.5, style="l3.5c+ts+fTimes-Italic", fill="gold", pen=pen)
+# plot the pi symbol of size 3.5c, the outline color of the symbol is set to
+# "darkorange", the color fill is set to "magenta4"
+fig.plot(x=7, y=1.5, style="l3.5c+tπ+fdarkorange", fill="magenta4", pen=pen)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.135 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/genindex.html b/v0.14.0/genindex.html new file mode 100644 index 00000000000..a3a6da8d2d5 --- /dev/null +++ b/v0.14.0/genindex.html @@ -0,0 +1,693 @@ + + + + + + + + Index — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ + +

Index

+ +
+ _ + | B + | C + | D + | E + | F + | G + | H + | I + | L + | M + | N + | O + | P + | R + | S + | T + | V + | W + | X + +
+

_

+ + + +
+ +

B

+ + + +
+ +

C

+ + + +
+ +

D

+ + + +
+ +

E

+ + + +
+ +

F

+ + + +
+ +

G

+ + + +
+ +

H

+ + + +
+ +

I

+ + + +
+ +

L

+ + + +
+ +

M

+ + + +
    +
  • + module + +
  • +
+ +

N

+ + +
+ +

O

+ + +
+ +

P

+ + + +
+ +

R

+ + + +
+ +

S

+ + + +
+ +

T

+ + + +
+ +

V

+ + + +
+ +

W

+ + + +
+ +

X

+ + + +
+ + + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/index.html b/v0.14.0/index.html new file mode 100644 index 00000000000..71a60cf41a8 --- /dev/null +++ b/v0.14.0/index.html @@ -0,0 +1,387 @@ + + + + + + + + + PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Why PyGMT?

+

A beautiful map is worth a thousand words. To truly understand how powerful PyGMT is, play with it online on +Binder! For a quicker introduction, check out our +3 minute overview!

+

Afterwards, feel free to look at our Tutorials, visit the +Gallery, and check out some +external PyGMT examples!

+

Quick Introduction to PyGMT YouTube Video

+
+
+

About

+

PyGMT is a library for processing geospatial and geophysical data and making publication-quality +maps and figures. It provides a Pythonic interface for the +Generic Mapping Tools (GMT), a command-line program +widely used across the Earth, Ocean, and Planetary sciences and beyond.

+
+
+

Project goals

+
    +
  • Make GMT more accessible to new users.

  • +
  • Build a Pythonic API for GMT.

  • +
  • Interface with the GMT C API directly using ctypes (no system calls).

  • +
  • Support for rich display in the Jupyter notebook.

  • +
  • Integration with the scientific Python ecosystem: numpy.ndarray or +pandas.DataFrame for data tables, xarray.DataArray for grids, and geopandas.GeoDataFrame for geographical data.

  • +
+
+
+

Quickstart

+
+

Installation

+

Simple installation using mamba:

+
mamba install --channel conda-forge pygmt
+
+
+

If you use conda:

+
conda install --channel conda-forge pygmt
+
+
+

For other ways to install pygmt, see the full installation instructions.

+
+
+

Getting started

+

As a starting point, you can open a Python interpreter +or a Jupyter notebook, and try the following example:

+
import pygmt
+fig = pygmt.Figure()
+fig.coast(projection="N15c", region="g", frame=True, land="tan", water="lightblue")
+fig.text(position="MC", text="PyGMT", font="80p,Helvetica-Bold,red@75")
+fig.show()
+
+
+

You should see a global map with land and water masses colored in tan and lightblue, respectively. On top, +there should be the semi-transparent text “PyGMT”. For more examples, please have a look at the +Gallery and +Tutorials.

+
+
+
+

Contacting us

+
    +
  • Most discussion happens on GitHub. +Feel free to open an issue or comment on any open +issue or pull request.

  • +
  • We have a Discourse forum where you can ask +questions and leave comments.

  • +
+
+
+

Contributing

+
+

Code of conduct

+

Please note that this project is released with a +Contributor Code of Conduct. +By participating in this project you agree to abide by its terms.

+
+
+

Contributing guidelines

+

Please read our Contributing Guide +to see how you can help and give feedback.

+
+
+

Imposter syndrome disclaimer

+

We want your help. No, really.

+

There may be a little voice inside your head that is telling you that you’re not ready to be an open source +contributor; that your skills aren’t nearly good enough to contribute. What could you possibly offer?

+

We assure you that the little voice in your head is wrong.

+

Being a contributor doesn’t just mean writing code. Equally important contributions include: writing or +proof-reading documentation, suggesting or implementing tests, or even giving feedback about the project +(including giving feedback about the contribution process). If you’re coming to the project with fresh eyes, +you might see the errors and assumptions that seasoned contributors have glossed over. If you can write any +code at all, you can contribute code to open source. We are constantly trying out new skills, making mistakes, +and learning from those mistakes. That’s how we all improve and we are happy to help others learn.

+

This disclaimer was adapted from the MetPy project.

+
+
+
+

Citing PyGMT

+

PyGMT is a community developed project. See the +AUTHORS.md file on GitHub for a list of +the people involved and a definition of the term “PyGMT Developers”. Feel free to cite our work in your +research using the following BibTeX:

+
@software{
+  pygmt_2024_14535921,
+  author       = {Tian, Dongdong and
+                  Uieda, Leonardo and
+                  Leong, Wei Ji and
+                  Fröhlich, Yvonne and
+                  Schlitzer, William and
+                  Grund, Michael and
+                  Jones, Max and
+                  Toney, Liam and
+                  Yao, Jiayuan and
+                  Tong, Jing-Hui and
+                  Magen, Yohai and
+                  Materna, Kathryn and
+                  Belem, Andre and
+                  Newton, Tyler and
+                  Anant, Abhishek and
+                  Ziebarth, Malte and
+                  Quinn, Jamie and
+                  Wessel, Paul},
+  title        = {{PyGMT: A Python interface for the Generic Mapping Tools}},
+  month        = dec,
+  year         = 2024,
+  publisher    = {Zenodo},
+  version      = {0.14.0},
+  doi          = {10.5281/zenodo.14535921},
+  url          = {https://doi.org/10.5281/zenodo.14535921}
+}
+
+
+

To cite a specific version of PyGMT, go to our Zenodo page at https://doi.org/10.5281/zenodo.3781524 +and use the “Export to BibTeX” function there. It is also strongly recommended to cite the +GMT 6 paper (which PyGMT wraps around). Note that some modules +like dimfilter, surface, and x2sys also have their dedicated citations. Further information for +all these can be found at https://www.generic-mapping-tools.org/cite.

+
+
+

License

+

PyGMT is free software: you can redistribute it and/or modify it under the terms of the +BSD 3-clause License. A copy of this license is provided in +LICENSE.txt.

+
+
+

Support

+

The development of PyGMT has been supported by NSF grants +OCE-1558403 and +EAR-1948603.

+
+ + + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/install.html b/v0.14.0/install.html new file mode 100644 index 00000000000..8151e127278 --- /dev/null +++ b/v0.14.0/install.html @@ -0,0 +1,624 @@ + + + + + + + + + Installing — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Installing

+
+

Quickstart

+

The fastest way to install PyGMT is with the mamba +or conda +package manager which takes care of setting up a virtual environment, as well as the +installation of GMT and all the dependencies PyGMT depends on:

+
+ +
+
mamba create --name pygmt --channel conda-forge pygmt
+
+
+
+ +
+
conda create --name pygmt --channel conda-forge pygmt
+
+
+
+
+

To activate the virtual environment, you can do:

+
+ +
+
mamba activate pygmt
+
+
+
+ +
+
conda activate pygmt
+
+
+
+
+

After this, check that everything works by running the following in a Python interpreter +(e.g., in a Jupyter notebook):

+
+
+
import pygmt
+pygmt.show_versions()
+
+
+
+
+ + +Hide code cell output + +
+
PyGMT information:
+  version: v0.14.0
+System information:
+  python: 3.13.1 | packaged by conda-forge | (main, Dec  5 2024, 21:23:54) [GCC 13.3.0]
+  executable: /home/runner/micromamba/envs/pygmt/bin/python
+  machine: Linux-6.8.0-1017-azure-x86_64-with-glibc2.39
+Dependency information:
+  numpy: 2.2.1
+  pandas: 2.2.3
+  xarray: 2024.11.0
+  netCDF4: 1.7.2
+  packaging: 24.2
+  contextily: 1.6.2
+  geopandas: 1.0.1
+  IPython: 8.31.0
+  pyarrow: 18.1.0
+  rioxarray: 0.17.0
+  gdal: 3.10.0
+  ghostscript: 10.04.0
+GMT library information:
+  version: 6.5.0
+  padding: 2
+  share dir: /home/runner/micromamba/envs/pygmt/share/gmt
+  plugin dir: /home/runner/micromamba/envs/pygmt/lib/gmt/plugins
+  library path: /home/runner/micromamba/envs/pygmt/lib/libgmt.so
+  cores: 4
+  grid layout: rows
+  image layout: 
+  binary version: 6.5.0
+
+
+
+
+
+

You are now ready to make your first figure! Start by looking at our Intro, +Tutorials, and Gallery. Good luck!

+
+

Note

+

The sections below provide more detailed, step by step instructions to install and test +PyGMT for those who may have a slightly different setup or want to install the latest +development version.

+
+
+
+

Which Python?

+

PyGMT is tested to run on Python >=3.11.

+

We recommend using the Miniforge +Python distribution to ensure you have all dependencies installed and +the mamba package manager +in the base environment. Installing Miniforge does not require administrative rights to +your computer and doesn’t interfere with any other Python installations on your system.

+
+
+

Which GMT?

+

PyGMT requires Generic Mapping Tools (GMT) >=6.4.0 since there are many +changes being made to GMT itself in response to the development of PyGMT.

+

Compiled conda packages of GMT for Linux, macOS and Windows are provided through +conda-forge. Advanced users can also +build GMT from source +instead.

+

We recommend following the instructions further on to install GMT 6.

+
+
+

Dependencies

+

PyGMT requires the following packages to be installed:

+ +
+

Note

+

For the minimum supported versions of the dependencies, please see Minimum Supported Versions.

+
+
+

Note

+

Some optional dependencies (e.g., IPython, +GeoPandas) add more functionality to PyGMT. +For a complete list of the optional dependencies, refer to Ecosystem.

+
+
+
+

Installing GMT and other dependencies

+

Before installing PyGMT, we must install GMT itself along with the other dependencies. +The easiest way to do this is via the mamba or conda package manager. We recommend +working in an isolated +virtual environment +to avoid issues with conflicting versions of dependencies.

+

First, we must configure conda to get packages from the conda-forge channel:

+
conda config --prepend channels conda-forge
+
+
+

Now we can create a new virtual environment with Python and all our dependencies +installed (we’ll call it pygmt but feel free to change it to whatever you want):

+
+ +
+
mamba create --name pygmt python=3.13 numpy pandas xarray netcdf4 packaging gmt
+
+
+
+ +
+
conda create --name pygmt python=3.13 numpy pandas xarray netcdf4 packaging gmt
+
+
+
+
+

Activate the environment by running the following (do not forget this step!):

+
+ +
+
mamba activate pygmt
+
+
+
+ +
+
conda activate pygmt
+
+
+
+
+

From now on, all commands will take place inside the virtual environment called pygmt +and won’t affect your default base installation.

+
+

Tip

+

You can also enable more PyGMT functionalities by installing PyGMT’s optional +dependencies in the environment.

+
+ +
+
mamba install contextily geopandas ipython pyarrow-core rioxarray
+
+
+
+ +
+
conda install contextily geopandas ipython pyarrow-core rioxarray
+
+
+
+
+
+
+
+

Installing PyGMT

+

Now that you have GMT installed and your virtual environment activated, you can install +PyGMT using any of the following methods.

+ +
+

Using pip

+

This installs the latest stable release from PyPI:

+
python -m pip install pygmt
+
+
+
+

Tip

+

You can also run python -m pip install pygmt[all] to install PyGMT with all of its +optional dependencies.

+
+

Alternatively, you can install the latest development version from +TestPyPI:

+
python -m pip install --pre --extra-index-url https://test.pypi.org/simple/ pygmt
+
+
+

To upgrade the installed stable release or development version to be the latest one, +just add --upgrade to the corresponding command above.

+

Any of the above methods (mamba/conda/pip) should allow you to use the PyGMT package +from Python.

+
+
+
+

Testing your install

+

To ensure that PyGMT and its dependencies are installed correctly, run the following +in your Python interpreter:

+
+
+
import pygmt
+pygmt.show_versions()
+
+
+
+
+ + +Hide code cell output + +
+
PyGMT information:
+  version: v0.14.0
+System information:
+  python: 3.13.1 | packaged by conda-forge | (main, Dec  5 2024, 21:23:54) [GCC 13.3.0]
+  executable: /home/runner/micromamba/envs/pygmt/bin/python
+  machine: Linux-6.8.0-1017-azure-x86_64-with-glibc2.39
+Dependency information:
+  numpy: 2.2.1
+  pandas: 2.2.3
+  xarray: 2024.11.0
+  netCDF4: 1.7.2
+  packaging: 24.2
+  contextily: 1.6.2
+  geopandas: 1.0.1
+  IPython: 8.31.0
+  pyarrow: 18.1.0
+  rioxarray: 0.17.0
+  gdal: 3.10.0
+  ghostscript: 10.04.0
+GMT library information:
+  version: 6.5.0
+  padding: 2
+  share dir: /home/runner/micromamba/envs/pygmt/share/gmt
+  plugin dir: /home/runner/micromamba/envs/pygmt/lib/gmt/plugins
+  library path: /home/runner/micromamba/envs/pygmt/lib/libgmt.so
+  cores: 4
+  grid layout: rows
+  image layout: 
+  binary version: 6.5.0
+
+
+
+
+
+
+
+
fig = pygmt.Figure()
+fig.coast(projection="N15c", region="g", frame=True, land="tan", water="lightblue")
+fig.text(position="MC", text="PyGMT", font="80p,Helvetica-Bold,red@75")
+fig.show()
+
+
+
+
+_images/a9bb1433fed9d9d76328850660ff89d8093e2996d8363e267481ceb0f94fb8ca.png +
+
+

You should see a global map with land and water masses colored in tan and lightblue +respectively. On top, there should be the semi-transparent text “PyGMT”. If the +semi-transparency does not show up, there is probably an incompatibility between your +GMT and Ghostscript versions. For details, please run pygmt.show_versions() and see +Not working transparency.

+
+
+

Common installation issues

+

If you have any issues with the installation, please check out the following common +problems and solutions.

+
+

“Error loading GMT shared library at …”

+

Sometimes, PyGMT will be unable to find the correct version of the GMT shared library +(libgmt). This can happen if you have multiple versions of GMT installed.

+

You can tell PyGMT exactly where to look for libgmt by setting the environment +variable GMT_LIBRARY_PATH to the directory where libgmt.so, libgmt.dylib or +gmt.dll can be found on Linux, macOS or Windows, respectively.

+

For Linux/macOS, add the following line to your shell configuration file (usually +~/.bashrc for Bash on Linux and ~/.zshrc for Zsh on macOS):

+
export GMT_LIBRARY_PATH=$HOME/miniforge3/envs/pygmt/lib
+
+
+

For Windows, add the environment variable GMT_LIBRARY_PATH following these +instructions +and set its value to a path like:

+
C:\Users\USERNAME\Miniforge3\envs\pygmt\Library\bin\
+
+
+
+
+

ModuleNotFoundError in Jupyter notebook environment

+

If you can successfully import PyGMT in a Python interpreter or IPython, but get a +ModuleNotFoundError when importing PyGMT in Jupyter, you may need to activate your +pygmt virtual environment (using mamba activate pygmt or conda activate pygmt) +and install a pygmt kernel following the commands below:

+
python -m ipykernel install --user --name pygmt  # install virtual environment properly
+jupyter kernelspec list --json
+
+
+

After that, you need to restart Jupyter, open your notebook, select the pygmt kernel +and then import pygmt.

+
+
+

Not working transparency

+

It is known that some combinations of GMT and Ghostscript versions cause issues, +especially regarding transparency. If the transparency doesn’t work in your figures, +please check your GMT and Ghostscript versions (you can run pygmt.show_versions()). +We recommend:

+
    +
  • Ghostscript 9.53-9.56 for GMT 6.4.0 (or below)

  • +
  • Ghostscript 10.03 or later for GMT 6.5.0

  • +
+
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/intro/01_first_figure.html b/v0.14.0/intro/01_first_figure.html new file mode 100644 index 00000000000..8ee42b8fe87 --- /dev/null +++ b/v0.14.0/intro/01_first_figure.html @@ -0,0 +1,408 @@ + + + + + + + + + 1. Making your first figure — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

1. Making your first figure

+

This tutorial covers the basics of creating a figure using PyGMT - a +Python wrapper for the Generic Mapping Tools (GMT). It will only use +the pygmt.Figure.coast method for plotting. Later tutorials will +address other PyGMT methods.

+
+

Loading the library

+

The first step is to import pygmt. All methods and figure generation +are accessible from the pygmt top level package.

+
import pygmt
+
+
+
+
+

Creating a figure

+

All figure generation in PyGMT is handled by the pygmt.Figure class. +Start a new figure by creating an instance of this class:

+ +

To add elements to the figure instance or object (fig in this example) +different methods can be called on it. This example will use the +pygmt.Figure.coast method, which can be used to create a map without +any other methods or external data. The pygmt.Figure.coast +method plots the coastlines, borders, and bodies of water using a database +that is included in GMT.

+

First, a region for the figure must be selected. This example will plot some +of the coast of Maine in the northeastern US. A Python list can be passed to +the region parameter with the minimum and maximum X-values (longitude) +and the minimum and maximum Y-values (latitude). For this example, the +minimum (bottom left) coordinates are (N43.75, W69) and the maximum (top +right) coordinates are (N44.75, W68). Negative values can be passed for +latitudes in the southern hemisphere or longitudes in the western hemisphere.

+

In addition to the region, an argument needs to be passed to +pygmt.Figure.coast to tell it what to plot. In this example, +pygmt.Figure.coast will be told to plot the shorelines by passing the +Boolean value True to the shorelines parameter. The shorelines +parameter has other options for finer control, but setting it to True +uses the default values.

+
fig.coast(region=[-69, -68, 43.75, 44.75], shorelines=True)
+
+
+

To see the figure, call pygmt.Figure.show.

+
+
+01 first figure
+
+

Color the land and water

+

This figure plots all of the coastlines in the given region, but it does not +indicate where the land and water are. Color values can be passed to land +and water to set the colors on the figure.

+

When plotting colors in PyGMT, there are multiple +color codes, that can be used. This includes +standard GMT color names (like "skyblue"), R/G/B levels (like +"0/0/255"), a hex value (like "#333333"), or a gray level (like +"gray50"). For this example, GMT color names are used.

+
fig = pygmt.Figure()
+fig.coast(
+    region=[-69, -68, 43.75, 44.75],
+    shorelines=True,
+    land="lightgreen",
+    water="lightblue",
+)
+fig.show()
+
+
+01 first figure
+
+

Set the projection

+

This figure now has its colors set. By default the projection and size +of the map is set to "Q15c+du". Here, "Q" defines a +cylindrical equidistant map projection, "15c+du" means setting +the maximum (upper) map dimension to 15 cm. However, both of +these values can be customized according to the requirements using +the projection parameter.

+

The appropriate projection varies for the type of map. The available +projections are explained in the projection +gallery. For this example, the Mercator projection is set using "M". +The width of the figure will be 10 centimeters, as set by "10c". +The map size can also be set in inches using “i” (e.g. a 5-inch wide +Mercator projection would use "M5i").

+
fig = pygmt.Figure()
+fig.coast(
+    region=[-69, -68, 43.75, 44.75],
+    shorelines=True,
+    land="lightgreen",
+    water="lightblue",
+    projection="M10c",
+)
+fig.show()
+
+
+01 first figure
+
+

Add a frame

+

While the map’s colors, projection, and size have been set, the region +that is being displayed is not apparent. A frame can be added to +annotate the latitude and longitude of the region.

+

The frame parameter is used to add a frame to the figure. For now, it +will be set to "a" to annotate the axes automatically.

+
fig = pygmt.Figure()
+fig.coast(
+    region=[-69, -68, 43.75, 44.75],
+    shorelines=True,
+    land="lightgreen",
+    water="lightblue",
+    projection="M10c",
+    frame="a",
+)
+fig.show()
+
+
+01 first figure
+
+

Add a title

+

The frame parameter can be used to add a title to the figure. The title +is set by passing "+t" followed by the title (e.g. setting the map +title to “Title” would be "+tTitle").

+

To pass multiple arguments to frame, a list can be used, as shown in the +example below. This format uses frame to set both the axes annotations +and the figure title.

+
fig = pygmt.Figure()
+fig.coast(
+    region=[-69, -68, 43.75, 44.75],
+    shorelines=True,
+    land="lightgreen",
+    water="lightblue",
+    projection="M10c",
+    frame=["a", "+tMaine"],
+)
+fig.show()
+
+
+01 first figure
+
+

Additional exercises

+

This is the end of the first tutorial. Here are some additional exercises +for the concepts that were discussed:

+
    +
  1. Make a map of Germany using its ISO country code (“DE”). Pass the ISO +code as a Python string to the region parameter.

  2. +
  3. Change the color of the landmass to “khaki” and the water to “azure”.

  4. +
  5. Change the color of the lakes (using the lakes parameter) to “red”.

  6. +
  7. Create a global map. Set the region to “d” to center the map at the Prime +Meridian or “g” to center the map at the International Date Line. When the +region is set without using a list full of integers or floating numbers, +the argument needs to be passed as a Python string. Create a map with a +width of 15 centimeters using the Mollweide (“W”) projection.

  8. +
+

Total running time of the script: (0 minutes 1.055 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/intro/02_contour_map.html b/v0.14.0/intro/02_contour_map.html new file mode 100644 index 00000000000..d365ff6f39e --- /dev/null +++ b/v0.14.0/intro/02_contour_map.html @@ -0,0 +1,365 @@ + + + + + + + + + 2. Create a contour map — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

2. Create a contour map

+

This tutorial page covers the basics of creating a figure of the Earth relief, using a +remote dataset hosted by GMT, using the method pygmt.datasets.load_earth_relief. +It will use the pygmt.Figure.grdimage, pygmt.Figure.grdcontour, +pygmt.Figure.colorbar, and pygmt.Figure.coast methods for plotting.

+
import pygmt
+
+
+
+

Loading the Earth relief dataset

+

The first step is to use pygmt.datasets.load_earth_relief. The resolution +parameter sets the resolution of the remote grid file, which will affect the +resolution of the plot made later in the tutorial. The registration parameter +determines the grid registration.

+

This grid region covers the islands of Guam and Rota in the western Pacific Ocean.

+
grid = pygmt.datasets.load_earth_relief(
+    resolution="30s", region=[144.5, 145.5, 13, 14.5], registration="gridline"
+)
+
+
+
+
+

Plotting Earth relief

+

To plot Earth relief data, the method pygmt.Figure.grdimage can be used to +plot a color-coded figure to display the topography and bathymetry in the grid file. +The grid parameter accepts the input grid, which in this case is the remote file +downloaded in the previous step. If the region parameter is not set, the region +boundaries of the input grid are used.

+

The cmap parameter sets the color palette table (CPT) used for portraying the +Earth relief. The pygmt.Figure.grdimage method uses the input grid to relate +the Earth relief values to a specific color within the CPT. In this case, the CPT +“oleron” is used; a full list of CPTs can be found at https://docs.generic-mapping-tools.org/6.5/reference/cpts.html.

+
fig = pygmt.Figure()
+fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron")
+fig.show()
+
+
+02 contour map
+
+

Adding a colorbar

+

To show how the plotted colors relate to the Earth relief, a colorbar can be added +using the pygmt.Figure.colorbar method.

+

To control the annotation and labels on the colorbar, a list is passed to the +frame parameter. The value beginning with "a" sets the interval for the +annotation on the colorbar, in this case every 1,000 meters. To set the label for an +axis on the colorbar, the argument begins with either "x+l" (x-axis) or "y+l" +(y-axis), followed by the intended label.

+

By default, the CPT for the colorbar is the same as the one set in +pygmt.Figure.grdimage.

+
fig = pygmt.Figure()
+fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron")
+fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"])
+fig.show()
+
+
+02 contour map
+
+

Adding contour lines

+

To add contour lines to the color-coded figure, the pygmt.Figure.grdcontour +method is used. The frame and projection are already set using +pygmt.Figure.grdimage and are not needed again. However, the same input for +grid (in this case, the variable named “grid”) must be input again. The levels +parameter sets the spacing between adjacent contour lines (in this case, 500 meters). +The annotation parameter annotates the contour lines corresponding to the given +interval (in this case, 1,000 meters) with the related values, here elevation or +bathymetry. By default, these contour lines are drawn thicker. Optionally, the +appearance (thickness, color, style) of the annotated and the not-annotated contour +lines can be adjusted (separately) by specifying the desired pen.

+
fig = pygmt.Figure()
+fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron")
+fig.grdcontour(grid=grid, levels=500, annotation=1000)
+fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"])
+fig.show()
+
+
+02 contour map
+
+

Color in land

+

To make it clear where the islands are located, the pygmt.Figure.coast method +can be used to color in the landmasses. The land is colored in as “lightgray”, and +the shorelines parameter draws a border around the islands.

+
fig = pygmt.Figure()
+fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron")
+fig.grdcontour(grid=grid, levels=500, annotation=1000)
+fig.coast(shorelines="2p", land="lightgray")
+fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"])
+fig.show()
+
+
+02 contour map
+
+

Additional exercises

+

This is the end of the second tutorial. Here are some additional exercises for the +concepts that were discussed:

+
    +
  1. Change the resolution of the grid file to either "01m" (1 arc-minute, a lower +resolution) or "15s" (15 arc-seconds, a higher resolution). Note that higher +resolution grids will have larger file sizes. Available resolutions can be found +at pygmt.datasets.load_earth_relief.

  2. +
  3. Create a contour map of the area around Mt. Rainier. A suggestion for the +region would be [-122, -121, 46.5, 47.5]. Adjust the +pygmt.Figure.grdcontour and pygmt.Figure.colorbar settings as +needed to make the figure look good.

  4. +
  5. Create a contour map of São Miguel Island in the Azores; a suggested region is +[-26, -25, 37.5, 38]. Instead of coloring in land, set water to +“lightblue” to only display Earth relief information for the land.

  6. +
  7. Try other CPTs, such as “SCM/fes” or “geo”.

  8. +
+

Total running time of the script: (0 minutes 0.993 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/intro/03_figure_element.html b/v0.14.0/intro/03_figure_element.html new file mode 100644 index 00000000000..12c3a9f8b3a --- /dev/null +++ b/v0.14.0/intro/03_figure_element.html @@ -0,0 +1,331 @@ + + + + + + + + + 3. Figure elements — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

3. Figure elements

+

The figure below shows the naming of figure elements in PyGMT.

+
    +
  • pygmt.Figure: having a number of plotting methods. Every new +figure must start with the creation of a pygmt.Figure instance

  • +
  • frame: setting plot or map boundaries (a combination of the single +letters of WSNE, wsne, or lbtr), adding annotations, ticks, +gridlines (afg), axis labels (+l), and title (+t), e.g., +in pygmt.Figure.basemap. Detailed examples can be found at +frame and axes attributes

  • +
  • pygmt.Figure.plot: plotting lines or symbols based on pen +or style parameters, respectively

  • +
  • pygmt.Figure.text: plotting text strings whereby the font +parameter adjusts fontsize, fontstyle, and color

  • +
  • pygmt.Figure.legend: showing the naming of lines or symbols while +the label is given in pygmt.Figure.plot

  • +
  • pygmt.Figure.show: previewing the content added to the current +figure instance

  • +
+03 figure element
import pygmt
+
+fig = pygmt.Figure()
+
+x = range(0, 11, 2)
+y_1 = [10, 11, 15, 8, 9, 13]
+y_2 = [4, 5, 6, 3, 5, 5]
+
+fig.basemap(
+    region=[0, 10, 0, 20],
+    projection="X10c/8c",
+    frame=["WStr+tTitle", "xa2f1g2+lxlabel", "ya5f1g5+lylabel"],
+)
+fig.plot(x=x, y=y_1, style="t0.3c", label="fig.plot (style)")
+fig.plot(x=x, y=y_2, pen="1.5p,red", label="fig.plot (pen)")
+
+mainexplain = {"font": "12p,2,darkblue", "justify": "TC", "no_clip": True}
+minorexplain = {"font": "10p,8", "justify": "TC", "no_clip": True}
+# ============ Figure
+fig.text(x=12, y=22, text="Figure", **mainexplain)
+fig.text(x=12, y=20.8, text="pygmt.Figure()", **minorexplain)
+# ============ Title
+fig.text(x=7.5, y=22, text='frame="+tTitle"', **minorexplain)
+# ============ xlabel
+fig.text(x=5, y=-3, text='frame="x+lxlabel"', **minorexplain)
+# ============ ylabel
+fig.text(x=-1.7, y=10, text='frame="y+lylabel"', angle=90, **minorexplain)
+# ============ x-majorticks
+fig.plot(x=10, y=-0.2, style="c1c", pen="2p,darkblue", no_clip=True)
+fig.text(x=10, y=-1.6, text="Annotation", **mainexplain)
+fig.text(x=10, y=-2.8, text='frame="xa2"', **minorexplain)
+# ============ y-majorticks
+fig.plot(x=-0.2, y=20, style="c1c", pen="2p,darkblue", no_clip=True)
+fig.text(x=0, y=23.4, text="Annotation", **mainexplain)
+fig.text(x=0, y=22.2, text='frame="ya5"', **minorexplain)
+# ============ x-minorticks
+fig.plot(x=1, y=-0.2, style="c0.7c", pen="2p,darkblue", no_clip=True)
+fig.text(x=1, y=-1.4, text="Frame", **mainexplain)
+fig.text(x=1, y=-2.6, text='frame="xf1"', **minorexplain)
+# ============ y-minorticks
+fig.plot(x=0, y=2, style="c0.7c", pen="2p,darkblue", no_clip=True)
+fig.text(x=-1.5, y=1, text='frame="yf1"', **minorexplain)
+# ============ Grid
+fig.plot(x=2, y=15, style="c0.5c", pen="2p,darkblue")
+fig.text(x=2, y=17, text="Grid", **mainexplain)
+fig.text(x=2.4, y=18, text='frame=["xg2", "yg5"]', **minorexplain)
+# ============ Map Boundaries
+fig.plot(x=10, y=9, style="c0.5c", pen="2p,darkblue", no_clip=True)
+fig.text(x=11.5, y=8, text="Map Boundary", **mainexplain)
+fig.text(x=11.5, y=6.8, text='frame="WStr"', **minorexplain)
+# ============ fig.plot (style)
+fig.plot(x=6, y=8, style="c0.7c", pen="2p,darkblue")
+fig.text(x=7, y=6.5, text="fig.plot(style)", **minorexplain)
+# ============ fig.plot (pen)
+fig.plot(x=4, y=6, style="c0.7c", pen="2p,darkblue")
+fig.text(x=3, y=4.5, text="fig.plot(pen)", **minorexplain)
+# ============ Legend
+fig.legend()
+fig.text(x=8, y=16.9, text="Legend", **mainexplain)
+fig.text(x=8, y=15.8, text="fig.legend()", **minorexplain)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.274 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/intro/04_table_inputs.html b/v0.14.0/intro/04_table_inputs.html new file mode 100644 index 00000000000..acd293e3cf9 --- /dev/null +++ b/v0.14.0/intro/04_table_inputs.html @@ -0,0 +1,393 @@ + + + + + + + + + 4. PyGMT I/O: Table inputs — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

4. PyGMT I/O: Table inputs

+

Generally, PyGMT accepts two different types of data inputs: tables and grids.

+
    +
  • A table is a 2-D array with rows and columns. Each column represents a different +variable (e.g., x, y and z) and each row represents a different record.

  • +
  • A grid is a 2-D array of data that is regularly spaced in the x and y directions (or +longitude and latitude).

  • +
+

In this tutorial, we’ll focus on working with table inputs, and cover grid inputs in a +separate tutorial.

+

PyGMT supports a variety of table input types that allow you to work with data in a +format that suits your needs. In this tutorial, we’ll explore the different table input +types available in PyGMT and provide examples for each. By understanding the different +table input types, you can choose the one that best fits your data and analysis needs, +and work more efficiently with PyGMT.

+
from pathlib import Path
+
+import geopandas as gpd
+import numpy as np
+import pandas as pd
+import pygmt
+
+
+
+

ASCII table file

+

Most PyGMT functions/methods that accept table input data have a data parameter. +The easiest way to provide table input data to PyGMT is by specifying the file name of +an ASCII table (e.g., data="input_data.dat"). This is useful when your data is +stored in a separate text file.

+
# Create an example file with 3 rows and 2 columns
+data = np.array([[1.0, 2.0], [5.0, 4.0], [8.0, 3.0]])
+np.savetxt("input_data.dat", data, fmt="%f")
+
+# Pass the file name to the data parameter
+fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True)
+fig.plot(data="input_data.dat", style="p0.2c", fill="blue")
+fig.show()
+
+# Now let's delete the example file
+Path("input_data.dat").unlink()
+
+
+04 table inputs

Besides a plain string to a table file, the following variants are also accepted:

+
    +
  • A pathlib.Path object.

  • +
  • A full URL. PyGMT will download the file to the current directory first.

  • +
  • A file name prefixed with @ (e.g., data="@input_data.dat"), which is a +special syntax in GMT to indicate that the file is a remote file hosted on the GMT +data server.

  • +
+

Additionally, PyGMT also supports a list of file names, pathlib.Path objects, +URLs, or remote files, to provide more flexibility in specifying input files.

+
+
+

2-D array: list, numpy.ndarray, and pandas.DataFrame

+

The data parameter also accepts a 2-D array, e.g.,

+ +

This is useful when you want to plot data that is already in memory.

+
fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True)
+
+# Pass a 2-D list to the 'data' parameter
+fig.plot(data=[[1.0, 2.0], [3.0, 4.0]], style="c0.2c", fill="black")
+
+# Pass a 2-D numpy array to the 'data' parameter
+fig.plot(data=np.array([[4.0, 2.0], [6.0, 4.0]]), style="t0.2c", fill="red")
+
+# Pass a pandas.DataFrame to the 'data' parameter
+df = pd.DataFrame(np.array([[7.0, 3.0], [9.0, 2.0]]), columns=["x", "y"])
+fig.plot(data=df, style="a0.2c", fill="blue")
+
+fig.show()
+
+
+04 table inputs
+
+

geopandas.GeoDataFrame

+

If you’re working with geospatial data, you can read your data as a +geopandas.GeoDataFrame object and pass it to the data parameter. This is +useful if your data is stored in a geospatial data format (e.g., GeoJSON, etc.) that +GMT and PyGMT do not support natively.

+
# Example GeoDataFrame
+gdf = gpd.GeoDataFrame(
+    {
+        "geometry": gpd.points_from_xy([2, 5, 9], [2, 3, 4]),
+        "value": [10, 20, 30],
+    }
+)
+
+# Use the GeoDataFrame to specify the 'data' parameter
+fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True)
+fig.plot(data=gdf, style="c0.2c", fill="purple")
+fig.show()
+
+
+04 table inputs
/home/runner/micromamba/envs/pygmt/lib/python3.13/site-packages/pyogrio/geopandas.py:662: UserWarning: 'crs' was not provided.  The output dataset will not have projection information defined and may not be usable in other systems.
+  write(
+
+
+
+
+

Scalar values or 1-D arrays

+

In addition to the data parameter, some PyGMT functions/methods also provide +individual parameters (e.g., x and y for data coordinates) which allow you to +specify the data. These parameters accept individual scalar values or 1-D arrays +(lists or 1-D numpy arrays).

+
fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True)
+
+# Pass scalar values to plot a single data point
+fig.plot(x=1.0, y=2.0, style="a0.2c", fill="blue")
+
+# Pass 1-D lists to plot multiple data points
+fig.plot(x=[5.0, 5.0, 5.0], y=[2.0, 3.0, 4.0], style="t0.2c", fill="green")
+
+# Pass 1-D numpy arrays to plot multiple data points
+fig.plot(
+    x=np.array([8.0, 8.0, 8.0]), y=np.array([2.0, 3.0, 4.0]), style="c0.2c", fill="red"
+)
+
+fig.show()
+
+
+04 table inputs
+
+

Conclusion

+

In PyGMT, you have the flexibility to provide data in various table input types, +including file names, 2-D arrays (2-D list, numpy.ndarray, +pandas.DataFrames), scalar values or a series of 1-D arrays, and +geopandas.GeoDataFrame. Choose the input type that best suits your data +source and analysis requirements.

+

Total running time of the script: (0 minutes 0.470 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/intro/index.html b/v0.14.0/intro/index.html new file mode 100644 index 00000000000..5b42c15c081 --- /dev/null +++ b/v0.14.0/intro/index.html @@ -0,0 +1,254 @@ + + + + + + + + + Intro to PyGMT — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Intro to PyGMT

+

Welcome to PyGMT! The tutorials in this intro are designed to teach basic concepts to +create maps in PyGMT.

+

About this intro

+

It is assumed that PyGMT has been successfully installed on your +system. To test this, run import pygmt in a Python IDE or +Jupyter notebook.

+

This intro will progressively cover PyGMT data manipulation and plotting concepts, and +later tutorials will use concepts explained in previous ones. It will not cover all +PyGMT functions and methods.

+
+

1. Making your first figure

+
1. Making your first figure
+
+

2. Create a contour map

+
2. Create a contour map
+
+

3. Figure elements

+
3. Figure elements
+
+

4. PyGMT I/O: Table inputs

+
4. PyGMT I/O: Table inputs
+
+
+

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/intro/sg_execution_times.html b/v0.14.0/intro/sg_execution_times.html new file mode 100644 index 00000000000..3041d4f6d4f --- /dev/null +++ b/v0.14.0/intro/sg_execution_times.html @@ -0,0 +1,256 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:02.791 total execution time for 4 files from intro:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

1. Making your first figure (01_first_figure.py)

00:01.055

0.0

2. Create a contour map (02_contour_map.py)

00:00.993

0.0

4. PyGMT I/O: Table inputs (04_table_inputs.py)

00:00.470

0.0

3. Figure elements (03_figure_element.py)

00:00.274

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/maintenance.html b/v0.14.0/maintenance.html new file mode 100644 index 00000000000..5eab94580d4 --- /dev/null +++ b/v0.14.0/maintenance.html @@ -0,0 +1,543 @@ + + + + + + + + + Maintainers Guide — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Maintainers Guide

+

This page contains instructions for project maintainers about how our setup works, +making releases, creating packages, etc.

+

If you want to make a contribution to the project, see the Contributors Guide instead.

+
+

Onboarding/Offboarding Access Checklist

+

Note that anyone can contribute to PyGMT, even without being added to the +GenericMappingTools team. +The onboarding items below are for people who would like to make regular +contributions, and could benefit from extra permissions to the developer and +communication tools we use.

+
+

As a Contributor

+
    +
  • Add to the pygmt-contributors team (gives ‘write’ permission to the repository)

  • +
  • Add as a collaborator on DAGsHub (gives ‘write’ permission to dvc remote storage)

  • +
  • Add as a member on HackMD (for draft announcements) [optional]

  • +
+
+
+

As a Maintainer

+ +
+
+

As an Administrator

+ +

Note: When a maintainer is no longer active (no activity in one year), we will mirror +the onboarding access checklist:

+ +
+
+
+

Branches

+
    +
  • main: Always tested and ready to become a new version. Don’t push directly to this +branch. Make a new branch and submit a pull request instead.

  • +
  • gh-pages: Holds the HTML documentation and is served by GitHub. Pages for the main +branch are in the dev folder. Pages for each release are in their own folders. +Automatically updated by GitHub Actions so you shouldn’t have to make commits here.

  • +
+
+
+

Managing GitHub Issues

+

A few guidelines for managing GitHub issues:

+
    +
  • Assign labels and the expected +milestone to issues as +appropriate.

  • +
  • When people request to work on an open issue, either assign the issue to that person +and post a comment about the assignment or explain why you are not assigning the +issue to them and, if possible, recommend other issues for them to work on.

  • +
  • People with write access should self-assign issues and/or comment on the issues that +they will address.

  • +
  • For upstream bugs, close the issue after an upstream release fixes the bug. If +possible, post a comment when an upstream PR is merged that fixes the problem, and +consider adding a regression test for serious bugs.

  • +
+
+
+

Reviewing and Merging Pull Requests

+

A few guidelines for reviewing:

+
    +
  • Always be polite and give constructive feedback.

  • +
  • Welcome new users and thank them for their time, even if we don’t plan on merging the +PR.

  • +
  • Don’t be harsh with code style or performance. If the code is bad, either (1) merge +the pull request and open a new one fixing the code and pinging the original submitter +or (2) comment on the PR detailing how the code could be improved. Both ways are +focused on showing the contributor how to write good code, not shaming them.

  • +
+

Pull requests should be squash merged. +This means that all commits will be collapsed into one. +The main advantages of this are:

+
    +
  • Eliminates experimental commits or commits to undo previous changes.

  • +
  • Makes sure every commit on the main branch passes the tests and has a defined purpose.

  • +
  • The maintainer writes the final commit message, so we can make sure it’s good and +descriptive.

  • +
+
+
+

Continuous Integration

+

We use GitHub Actions continuous integration (CI) services to build, test and +manage the project on Linux, macOS and Windows. The GitHub Actions CI are +controlled by workflow files located in .github/workflows. Here we briefly +summarize the functions of the workflows. Please refer to the comments in the +workflow files for more details.

+
    +
  • benchmarks.yml: Benchmarks the execution speed of tests to track performance of PyGMT functions

  • +
  • cache_data.yaml: Cache GMT remote data files and uplodas as artifacts

  • +
  • check-links.yml: Check links in the repository and documentation

  • +
  • ci_docs.yml: Build documentation on Linux/macOS/Windows and deploy to GitHub

  • +
  • ci_doctest.yaml: Run all doctests on Linux/macOS/Windows

  • +
  • ci_tests.yaml: Run regular PyGMT tests on Linux/macOS/Windows

  • +
  • ci_tests_dev.yaml: Run regular PyGMT tests with GMT dev version on Linux/macOS/Windows

  • +
  • ci_tests_legacy.yaml: Run regular PyGMT tests with GMT legacy versions on Linux/macOS/Windows

  • +
  • dvc-diff.yml: Report changes in test images

  • +
  • format-command.yml: Format the codes using slash command

  • +
  • publish-to-pypi.yml: Publish archives to PyPI and TestPyPI

  • +
  • release-baseline-images.yml: Upload the ZIP archive of baseline images as a release asset

  • +
  • release-drafter.yml: Draft the next release notes

  • +
  • slash-command-dispatch.yml: Support slash commands in pull requests

  • +
  • style_checks.yaml: Code lint and style checks

  • +
  • type_checks.yml: Static type checks

  • +
+
+
+

Continuous Documentation

+

We use the ReadtheDocs service to preview changes +made to our documentation website every time we make a commit in a pull request. +The service has a configuration file .readthedocs.yaml, with a list of options +to change the default behaviour at https://docs.readthedocs.io/en/stable/config-file/index.html.

+
+
+

Continuous Benchmarking

+

We use the CodSpeed service to continuously track PyGMT’s +performance. The pytest-codspeed plugin collects benchmark data and uploads it to the +CodSpeed server, where results are available at https://codspeed.io/GenericMappingTools/pygmt.

+

Benchmarking is handled through the benchmarks.yml GitHub Actions workflow. It’s +automatically executed when a pull request is merged into the main branch. To trigger +benchmarking in a pull request, add the run/benchmark label to the pull request.

+

To include a new test in the benchmark suite, apply the @pytest.mark.benchmark +decorator to a test function.

+
+
+

Dependencies Policy

+

PyGMT has adopted SPEC 0 alongside the +rest of the scientific Python ecosystem, and made a few extensions based on the needs of +the project. Please see Minimum Supported Versions for the detailed +policy and the minimum supported versions of GMT, Python and core package dependencies.

+

In pyproject.toml, the requires-python key should be set to the minimum supported +version of Python. Minimum supported versions of GMT, Python and core package +dependencies should be adjusted upward on every major and minor release, but never on a +patch release.

+
+
+

Backwards Compatibility and Deprecation Policy

+

PyGMT is still undergoing rapid development. All of the API is subject to change until +the v1.0.0 release. Versioning in PyGMT is based on the +semantic versioning specification +(i.e., vMAJOR.MINOR.PATCH). Basic policy for backwards compatibility:

+
    +
  • Any incompatible changes should go through the deprecation process below.

  • +
  • Incompatible changes are only allowed in major and minor releases, not in patch releases.

  • +
  • Incompatible changes should be documented in the release notes.

  • +
+

When making incompatible changes, we should follow the process:

+
    +
  • Discuss whether the incompatible changes are necessary on GitHub.

  • +
  • Make the changes in a backwards compatible way, and raise a FutureWarning warning +for the old usage. At least one test using the old usage should be added.

  • +
  • The warning message should clearly explain the changes and include the versions in +which the old usage is deprecated and is expected to be removed.

  • +
  • The FutureWarning warning should appear for 2-4 minor versions, depending on the +impact of the changes. It means the deprecation period usually lasts 3-12 months.

  • +
  • Remove the old usage and warning when reaching the declared version.

  • +
+
+

Deprecating a function parameter

+

To rename a function parameter, add the @deprecate_parameter decorator near the top +after the @fmt_docstring decorator but before the @use_alias decorator (if those two +exist). A TODO comment should also be added to indicate the deprecation period (see below). +Here is an example:

+
# TODO(PyGMT>=0.6.0): Remove the deprecated "columns" parameter.
+@fmt_docstring
+@deprecate_parameter("columns", "incols", "v0.4.0", remove_version="v0.6.0")
+@use_alias(J="projection", R="region", V="verbose", i="incols")
+@kwargs_to_strings(R="sequence", i="sequence_comma")
+def plot(self, x=None, y=None, data=None, size=None, direction=None, **kwargs):
+    pass
+
+
+

In this case, the old parameter name columns is deprecated since v0.4.0, and will be +fully removed in v0.6.0. The new parameter name is incols.

+
+
+

TODO comments

+

Occasionally, we need to implement temporary code that should be removed in the future. +This can occur in situations such as:

+
    +
  • When a parameter, function, or method is deprecated and scheduled for removal.

  • +
  • When workarounds are necessary to address issues in older or upcoming versions of GMT +or other dependencies.

  • +
+

To track these temporary codes or workarounds, we use TODO comments. These comments +should adhere to the following format:

+
# TODO(package>=X.Y.Z): A brief description of the TODO item.
+# Additional details if necessary.
+
+
+

The TODO comment indicates that we should address the item when package version +X.Y.Z or later is required.

+

It’s important not to overuse TODO comments for tracking unimplemented features. +Instead, open issues to monitor these features.

+
+
+
+

Making a Release

+

We try to automate the release process as much as possible. +GitHub Actions workflow handles publishing new releases to PyPI and updating the documentation. +The version number is set automatically using setuptools_scm +based information obtained from git. +There are a few steps that still must be done manually, though.

+
+

Updating the Changelog

+

The Release Drafter GitHub Action +will automatically keep a draft changelog at +https://github.com/GenericMappingTools/pygmt/releases, adding a new entry +every time a pull request (with a proper label) is merged into the main branch. +This release drafter tool has two configuration files, one for the GitHub Action +at .github/workflows/release-drafter.yml, and one for the changelog template +at .github/release-drafter.yml. Configuration settings can be found at +https://github.com/release-drafter/release-drafter.

+

The drafted release notes are not perfect, so we will need to tidy it prior to +publishing the actual release notes at Changelog.

+
    +
  1. Go to https://github.com/GenericMappingTools/pygmt/releases and click on the +‘Edit’ button next to the current draft release note. Copy the text of the +automatically drafted release notes under the ‘Write’ tab to +doc/changes.md. Add a section separator --- between the new and old +changelog sections.

  2. +
  3. Update the DOI badge in the changelog. Remember to replace the DOI number +inside the badge url.

    +
    [![Digital Object Identifier for PyGMT vX.Y.Z](https://zenodo.org/badge/DOI/10.5281/zenodo.<INSERT-DOI-HERE>.svg)](https://doi.org/10.5281/zenodo.<INSERT-DOI-HERE>)
    +
    +
    +
  4. +
  5. Open a new pull request using the title ‘Changelog entry for vX.Y.Z’ with +the updated release notes, so that other people can help to review and +collaborate on the changelog curation process described next.

  6. +
  7. Edit the change list to remove any trivial changes (updates to the README, +typo fixes, CI configuration, test updates due to GMT releases, etc).

  8. +
  9. Sort the items within each section (i.e., New Features, Enhancements, etc.) +such that similar items are located near each other (e.g., new wrapped +modules and methods, gallery examples, API docs changes) and entries within each group +are alphabetical.

  10. +
  11. Move a few important items from the main sections to the Highlights section.

  12. +
  13. Edit the list of people who contributed to the release, linking to their +GitHub accounts. Sort their names by the number of commits made since the +last release (e.g., use git shortlog HEAD...v0.4.0 -sne).

  14. +
  15. Update doc/minversions.md with new information on the new release version, +including a vX.Y.Z documentation link, and minimum required versions of GMT, Python +and core package dependencies (NumPy, pandas, Xarray). Follow +SPEC 0 for updates.

  16. +
  17. Refresh citation information. Specifically, the BibTeX in README.md and +CITATION.cff needs to be updated with any metadata changes, including the +DOI, release date, and version information. Please also follow +guidelines in AUTHORSHIP.md for updating the author list in the BibTeX. +More information about the CITATION.cff specification can be found at +https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md.

  18. +
+
+
+

Pushing to PyPI and Updating the Documentation

+

After the changelog is updated, making a release can be done by going to +https://github.com/GenericMappingTools/pygmt/releases, editing the draft release, +and clicking on publish. A git tag will also be created, make sure that this +tag is a proper version number (following Semantic Versioning) +with a leading v (e.g., v0.2.1).

+

Once the release/tag is created, this should trigger GitHub Actions to do all the work for us. +A new source distribution will be uploaded to PyPI, a new folder with the documentation +HTML will be pushed to gh-pages, and the latest link will be updated to point to +this new folder.

+
+
+

Archiving on Zenodo

+

Grab both the source code and baseline images ZIP files from the GitHub release page +and upload them to Zenodo using the previously reserved DOI.

+
+
+

Updating the Conda Package

+

When a new version is released on PyPI, conda-forge’s bot automatically creates version +updates for the feedstock. In most cases, the maintainers can simply merge that PR.

+

If changes need to be done manually, you can:

+
    +
  1. Fork the pygmt feedstock repository if +you haven’t already. If you have a fork, update it.

  2. +
  3. Update the version number and sha256 hash on recipe/meta.yaml. You can get the hash +from the PyPI “Download files” section.

  4. +
  5. Add or remove any new dependencies (most are probably only run dependencies).

  6. +
  7. Make sure the minimum support versions of all dependencies are correctly pinned.

  8. +
  9. Make a new branch, commit, and push the changes to your personal fork.

  10. +
  11. Create a PR against the original feedstock main.

  12. +
  13. Once the CI tests pass, merge the PR or ask a maintainer to do so.

  14. +
+
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/minversions.html b/v0.14.0/minversions.html new file mode 100644 index 00000000000..42befaa7225 --- /dev/null +++ b/v0.14.0/minversions.html @@ -0,0 +1,399 @@ + + + + + + + + + Minimum Supported Versions — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Minimum Supported Versions

+

PyGMT has adopted SPEC 0 alongside the +rest of the scientific Python ecosystem, and will therefore:

+
    +
  • Drop support for Python versions 3 years after their initial release.

  • +
  • Drop support for core package dependencies (NumPy, pandas, Xarray) 2 years after their +initial release.

  • +
+

In addition to the above, the PyGMT team has also decided to:

+
    +
  • Drop support for GMT versions 3 years after their initial release, while ensuring at +least two latest minor versions remain supported.

  • +
  • Maintain support for optional dependencies for at +least 1 year after their initial release. Users are encouraged to use the most +up-to-date optional dependencies where possible.

  • +
+
+

Note

+

The SPEC 0 policy is enforced on a best-effort basis, and the PyGMT team may decide to +drop support for core (and optional) package dependencies earlier than recommended for +compatibility reasons.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

PyGMT Version

GMT

Python

NumPy

pandas

Xarray

Dev* [Docs]

>=6.4.0

>=3.11

>=1.25

>=2.0

>=2023.04

v0.14.0 [Docs]

>=6.4.0

>=3.11

>=1.25

>=2.0

>=2023.04

v0.13.0 [Docs]

>=6.3.0

>=3.10

>=1.24

>=1.5

>=2022.09

v0.12.0 [Docs]

>=6.3.0

>=3.10

>=1.23

>=1.5

>=2022.06

v0.11.0 [Docs]

>=6.3.0

>=3.9

>=1.23

v0.10.0 [Docs]

>=6.3.0

>=3.9

>=1.22

v0.9.0 [Docs]

>=6.3.0

>=3.8

>=1.21

v0.8.0 [Docs]

>=6.3.0

>=3.8

>=1.20

v0.7.0 [Docs]

>=6.3.0

>=3.8

>=1.20

v0.6.1 [Docs]

>=6.3.0

>=3.8

>=1.19

v0.6.0 [Docs]

>=6.3.0

>=3.8

>=1.19

v0.5.0 [Docs]

>=6.2.0

>=3.7

>=1.18

v0.4.1 [Docs]

>=6.2.0

>=3.7

>=1.17

v0.4.0 [Docs]

>=6.2.0

>=3.7

>=1.17

v0.3.1 [Docs]

>=6.1.1

>=3.7

v0.3.0 [Docs]

>=6.1.1

>=3.7

v0.2.1 [Docs]

>=6.1.1

>=3.6

v0.2.0 [Docs]

>=6.1.1

3.6 - 3.8

v0.1.2 [Docs]

>=6.0.0

3.6 - 3.8

v0.1.1 [Docs]

>=6.0.0

3.6 - 3.8

v0.1.0 [Docs]

>=6.0.0

3.6 - 3.8

+

*Dev reflects the main branch and is for the upcoming release.

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/objects.inv b/v0.14.0/objects.inv new file mode 100644 index 00000000000..74b7b24d949 Binary files /dev/null and b/v0.14.0/objects.inv differ diff --git a/v0.14.0/overview.html b/v0.14.0/overview.html new file mode 100644 index 00000000000..4de9958bbe0 --- /dev/null +++ b/v0.14.0/overview.html @@ -0,0 +1,301 @@ + + + + + + + + + Overview — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Overview

+
+

About

+

PyGMT is a Python wrapper for the +Generic Mapping Tools (GMT), +a command-line program widely used across the Earth, Ocean, and Planetary sciences and +beyond. It provides capabilities for processing spatial data (gridding, filtering, +masking, FFTs, etc) and making high quality plots and maps.

+

PyGMT is different from Python libraries like Bokeh +and Matplotlib, which have a larger focus on interactivity +and allowing different backends. GMT uses the +PostScript format to generate high quality +(static) vector graphics for publications, posters, talks, etc. It is memory efficient +and very fast. The PostScript figures can be converted to other formats like PDF, PNG, +and JPG for use on the web and elsewhere. In fact, PyGMT users will usually not have any +contact with the original PostScript files and get only the more convenient formats like +PDF and PNG.

+

The project was started in 2017 by Leonardo Uieda and +Paul Wessel (the co-creator and main developer of +GMT) at the University of Hawaiʻi at Mānoa. The development of PyGMT has been supported +by NSF grants OCE-1558403 +and EAR-1948602.

+

We welcome any feedback and ideas! Let us know by submitting +issues on GitHub or by posting on +our Discourse forum.

+
+
+

Presentations

+

These are conference presentations about the development of PyGMT (previously “GMT/Python”):

+
    +
  • “Accessing and Integrating GMT with Python and the Scientific Python Ecosystem”. +2024. +Yvonne Fröhlich, Dongdong Tian, Wei Ji Leong, Max Jones, and Michael Grund. +Presented at AGU 2024. +doi:10.6084/m9.figshare.28049495

    +

    +
  • +
  • “Geospatial Analysis & Visualization with PyGMT”. +2022. +Max Jones, Wei Ji Leong, and Leonardo Uieda. +Presented at SciPy 2022. +doi:10.6084/m9.figshare.20483793

    +

    +
  • +
  • “PyGMT: Accessing the Generic Mapping Tools from Python”. +2019. +Leonardo Uieda and Paul Wessel. +Presented at AGU 2019. +doi:10.6084/m9.figshare.11320280

    +

    +
  • +
  • “Building an object-oriented Python interface for the Generic Mapping Tools”. +2018. +Leonardo Uieda and Paul Wessel. +Presented at SciPy 2018. +doi:10.6084/m9.figshare.6814052

    +

    +
  • +
  • “Integrating the Generic Mapping Tools with the Scientific Python Ecosystem”. +2018. +Leonardo Uieda and Paul Wessel. +Presented at AOGS Annual Meeting 2018. +doi:10.6084/m9.figshare.6399944

    +

    +
  • +
  • “Bringing the Generic Mapping Tools to Python”. +2017. +Leonardo Uieda and Paul Wessel. +Presented at SciPy 2017. +doi:10.6084/m9.figshare.7635833

    +

    +
  • +
  • “A modern Python interface for the Generic Mapping Tools”. +2017. +Leonardo Uieda and Paul Wessel. +Presented at AGU 2017. +doi:10.6084/m9.figshare.5662411

    +

    +
  • +
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/azim/azim_equidistant.html b/v0.14.0/projections/azim/azim_equidistant.html new file mode 100644 index 00000000000..fef141d532d --- /dev/null +++ b/v0.14.0/projections/azim/azim_equidistant.html @@ -0,0 +1,287 @@ + + + + + + + + + Azimuthal equidistant projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Azimuthal equidistant projection

+

The main advantage of this projection is that distances from the projection +center are displayed in correct proportions. Also directions measured from the +projection center are correct. It is very useful for a global view on locations +that lie within a certain distance or for comparing distances of different +locations relative to the projection center.

+

elon0/lat0[/horizon]/scale or +Elon0/lat0[/horizon]/width

+

The projection type is set with e or E. lon0/lat0 specifies the +projection center, and the optional parameter horizon specifies the maximum +distance to the projection center (i.e. the visible portion of the rest of the +world map) in degrees <= 180° (default 180°). The size of the figure is set by +scale or width.

+azim equidistant
coast [WARNING]: Fill/clip continent option (-G) may not work for this projection.
+coast [WARNING]: If the antipode (0/4.64276e-310) is in the ocean then chances are good it will work.
+coast [WARNING]: Otherwise, avoid projection center coordinates that are exact multiples of 80 degrees.
+
+
+
+

+
+
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    region="g", projection="E-100/40/15c", frame="afg", land="khaki", water="white"
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.368 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/azim/azim_general_perspective.html b/v0.14.0/projections/azim/azim_general_perspective.html new file mode 100644 index 00000000000..36aeaa5ed73 --- /dev/null +++ b/v0.14.0/projections/azim/azim_general_perspective.html @@ -0,0 +1,288 @@ + + + + + + + + + Perspective projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Perspective projection

+

The perspective projection imitates the view of the Earth from a finite +point in space. In a full view of the earth one third of its surface area can +be seen.

+

glon0/lat0/scale[+aazimuth][+ttilt][+vvwidth/vheight][+wtwist][+zaltitude] or Glon0/lat0/width[+aazimuth][+ttilt][+vvwidth/vheight][+wtwist][+zaltitude]

+

The projection type is set with g or G. lon0/lat0 specifies the +projection center and scale or width determine the size of the figure. +With +aazimuth the direction (in degrees) in which you are looking is +specified, measured clockwise from north. +ttilt is given in degrees +and is the viewing angle relative to zenith. A tilt of 0° is looking straight +down, 60° is looking 30° above horizon. The viewport angle in degrees is +described via +vvwidth/vheight and +wtwist is the clockwise +rotation of the image (in degrees). +zaltitude sets the height in km +of the viewpoint above local sea level (If altitude is less than 10, then it is +the distance from the center of the earth to the viewpoint in earth radii).

+

The example shows the coast of Northern Europe viewed from 250 km above sea +level looking 30° from north at a tilt of 45°. The height and width of the +viewing angle is both 60°, which imitates viewing with naked eye.

+azim general perspective
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    region="g",
+    projection="G4/52/12c+a30+t45+v60/60+w0+z250",
+    frame="afg",
+    land="khaki",
+    water="white",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 1.542 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/azim/azim_general_stereographic.html b/v0.14.0/projections/azim/azim_general_stereographic.html new file mode 100644 index 00000000000..71f4b0ec9e7 --- /dev/null +++ b/v0.14.0/projections/azim/azim_general_stereographic.html @@ -0,0 +1,283 @@ + + + + + + + + + General stereographic projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

General stereographic projection

+

This map projection is a conformal, azimuthal projection. It is mainly used +with a projection center in one of the poles. Then meridians appear as straight +lines and cross latitudes at a right angle. Unlike the azimuthal equidistant +projection, the distances in this projection are not displayed in correct +proportions. It is often used as a hemisphere map like the Lambert Azimuthal +Equal Area projection.

+

slon0/lat0[/horizon]/scale +or Slon0/lat0[/horizon]/width

+

The projection type is set with s or S. lon0/lat0 specifies the +projection center, the optional horizon parameter specifies the maximum +distance from projection center (in degrees, < 180, default 90), and the +scale or width sets the size of the figure.

+azim general stereographic
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    region=[4, 14, 52, 57],
+    projection="S0/90/12c",
+    frame="afg",
+    land="khaki",
+    water="white",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.193 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/azim/azim_gnomonic.html b/v0.14.0/projections/azim/azim_gnomonic.html new file mode 100644 index 00000000000..57d0b5353f3 --- /dev/null +++ b/v0.14.0/projections/azim/azim_gnomonic.html @@ -0,0 +1,284 @@ + + + + + + + + + Gnomonic projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Gnomonic projection

+

The point of perspective of the gnomonic projection lies at the center of the +Earth. As a consequence great circles (orthodromes) on the surface of the Earth +are displayed as straight lines, which makes it suitable for distance +estimation for navigational purposes. It is neither conformal nor equal-area +and the distortion increases greatly with distance to the projection center. It +follows that the scope of application is restricted to a small area around the +projection center (at a maximum of 60°).

+

flon0/lat0[/horizon]/scale +or Flon0/lat0[/horizon]/width

+

f or F specifies the projection type, lon0/lat0 specifies the +projection center, the optional parameter horizon specifies the maximum +distance from projection center (in degrees, < 90, default 60), and scale or +width sets the size of the figure.

+azim gnomonic
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    region="g",
+    projection="F-90/15/12c",
+    frame="afg",
+    land="khaki",
+    water="white",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.237 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/azim/azim_lambert.html b/v0.14.0/projections/azim/azim_lambert.html new file mode 100644 index 00000000000..6a2876c6222 --- /dev/null +++ b/v0.14.0/projections/azim/azim_lambert.html @@ -0,0 +1,281 @@ + + + + + + + + + Lambert azimuthal equal-area projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Lambert azimuthal equal-area projection

+

This projection was developed by Johann Heinrich Lambert in 1772 and is +typically used for mapping large regions like continents and hemispheres. It is +an azimuthal, equal-area projection, but is not perspective. Distortion is zero +at the center of the projection, and increases radially away from this point.

+

alon0/lat0[/horizon]/scale +or Alon0/lat0[/horizon]/width

+

a or A specifies the projection type, and lon0/lat0 specifies the +projection center, horizon specifies the maximum distance from projection +center (in degrees, <= 180, default 90), and scale or width sets the size +of the figure.

+azim lambert
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    region="g",
+    projection="A30/-20/60/12c",
+    frame="afg",
+    land="khaki",
+    water="white",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.219 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/azim/azim_orthographic.html b/v0.14.0/projections/azim/azim_orthographic.html new file mode 100644 index 00000000000..7525625a7c2 --- /dev/null +++ b/v0.14.0/projections/azim/azim_orthographic.html @@ -0,0 +1,282 @@ + + + + + + + + + Orthographic projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Orthographic projection

+

This is a perspective projection like the general perspective, but with the +difference that the point of perspective lies in infinite distance. +It is therefore often used to give the appearance of a globe viewed from outer +space, were one hemisphere can be seen as a whole. It is neither conformal nor +equal-area and the distortion increases near the edges.

+

glon0/lat0[/horizon]/scale +or Glon0/lat0[/horizon]/width

+

g or G specifies the projection type, lon0/lat0 specifies the +projection center, the optional parameter horizon specifies the maximum +distance from projection center (in degrees, <= 90, default 90), and scale +and width set the figure size.

+azim orthographic
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    region="g",
+    projection="G10/52/12c",
+    frame="afg",
+    land="khaki",
+    water="white",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.246 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/azim/sg_execution_times.html b/v0.14.0/projections/azim/sg_execution_times.html new file mode 100644 index 00000000000..8635e02b1db --- /dev/null +++ b/v0.14.0/projections/azim/sg_execution_times.html @@ -0,0 +1,264 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:02.805 total execution time for 6 files from projections/azim:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Perspective projection (azim_general_perspective.py)

00:01.542

0.0

Azimuthal equidistant projection (azim_equidistant.py)

00:00.368

0.0

Orthographic projection (azim_orthographic.py)

00:00.246

0.0

Gnomonic projection (azim_gnomonic.py)

00:00.237

0.0

Lambert azimuthal equal-area projection (azim_lambert.py)

00:00.219

0.0

General stereographic projection (azim_general_stereographic.py)

00:00.193

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/conic/conic_albers.html b/v0.14.0/projections/conic/conic_albers.html new file mode 100644 index 00000000000..2e009f5a75f --- /dev/null +++ b/v0.14.0/projections/conic/conic_albers.html @@ -0,0 +1,284 @@ + + + + + + + + + Albers conic equal-area projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Albers conic equal-area projection

+

This projection, developed by Heinrich C. Albers in 1805, is predominantly used +to map regions of large east-west extent, in particular the United States. It +is a conic, equal-area projection, in which parallels are unequally spaced arcs +of concentric circles, more closely spaced at the north and south edges of the +map. Meridians, on the other hand, are equally spaced radii about a common +center, and cut the parallels at right angles. Distortion in scale and shape +vanishes along the two standard parallels. Between them, the scale along +parallels is too small; beyond them it is too large. The opposite is true for +the scale along meridians.

+

blon0/lat0/lat1/lat2/scale +or Blon0/lat0/lat1/lat2/width

+

The projection is set with b or B. The projection center is set by +lon0/lat0 and two standard parallels for the map are set with lat1/lat2. +The figure size is set with scale or width.

+conic albers
import pygmt
+
+fig = pygmt.Figure()
+# Use the ISO country code for Brazil and add a padding of 2 degrees (+R2)
+fig.coast(
+    region="BR+R2",
+    projection="B-55/-15/-25/0/12c",
+    frame="afg",
+    land="seagreen",
+    water="gray90",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.287 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/conic/conic_equidistant.html b/v0.14.0/projections/conic/conic_equidistant.html new file mode 100644 index 00000000000..29f7d54eedf --- /dev/null +++ b/v0.14.0/projections/conic/conic_equidistant.html @@ -0,0 +1,278 @@ + + + + + + + + + Equidistant conic projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Equidistant conic projection

+

The equidistant conic projection was described by the Greek philosopher +Claudius Ptolemy about A.D. 150. It is neither conformal or equal-area, but +serves as a compromise between them. The scale is true along all meridians and +the standard parallels.

+

dlon0/lat0/lat1/lat2/scale +or Dlon0/lat0/lat1/lat2/width

+

The projection is set with d or D. The projection center is set by +lon0/lat0 and two standard parallels for the map are set with lat1/lat2. +The figure size is set with scale or width.

+conic equidistant
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    region=[-88, -70, 18, 24],
+    projection="D-79/21/19/23/12c",
+    frame="afg",
+    land="seagreen",
+    water="gray90",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.157 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/conic/conic_lambert.html b/v0.14.0/projections/conic/conic_lambert.html new file mode 100644 index 00000000000..efbe2abe8fe --- /dev/null +++ b/v0.14.0/projections/conic/conic_lambert.html @@ -0,0 +1,282 @@ + + + + + + + + + Lambert conic conformal projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Lambert conic conformal projection

+

This conic projection was designed by the Alsatian mathematician Johann +Heinrich Lambert (1772) and has been used extensively for mapping of regions +with predominantly east-west orientation, just like the Albers projection. +Unlike the Albers projection, Lambert’s conformal projection is not equal-area. +The parallels are arcs of circles with a common origin, and meridians are the +equally spaced radii of these circles. As with Albers projection, it is only +the two standard parallels that are distortion-free.

+

llon0/lat0/lat1/lat2/scale +or Llon0/lat0/lat1/lat2/width

+

The projection is set with l or L. The projection center is set by +lon0/lat0 and two standard parallels for the map are set with lat1/lat2. +The figure size is set with scale or width.

+conic lambert
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    region=[-130, -70, 24, 52],
+    projection="L-100/35/33/45/12c",
+    frame="afg",
+    land="seagreen",
+    water="gray90",
+)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.193 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/conic/polyconic.html b/v0.14.0/projections/conic/polyconic.html new file mode 100644 index 00000000000..b8930b36435 --- /dev/null +++ b/v0.14.0/projections/conic/polyconic.html @@ -0,0 +1,287 @@ + + + + + + + + + Polyconic projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Polyconic projection

+

The polyconic projection, in Europe usually referred to as the American +polyconic projection, was introduced shortly before 1820 by the Swiss-American +cartographer Ferdinand Rodulph Hassler (1770-1843). As head of the Survey of +the Coast, he was looking for a projection that would give the least distortion +for mapping the coast of the United States. The projection acquired its name +from the construction of each parallel, which is achieved by projecting the +parallel onto the cone while it is rolled around the globe, along the central +meridian, tangent to that parallel. As a consequence, the projection involves +many cones rather than a single one used in regular conic projections.

+

The polyconic projection is neither equal-area, nor conformal. It is true to +scale without distortion along the central meridian. Each parallel is true to +scale as well, but the meridians are not as they get further away from the +central meridian. As a consequence, no parallel is standard because conformity +is lost with the lengthening of the meridians.

+

poly/[lon0/[lat0/]]scale or +Poly/[lon0/[lat0/]]width

+

The projection is set with poly or Poly. The figure size is set +with scale or width.

+polyconic
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    region=[-180, -20, 0, 90],
+    projection="Poly/12c",
+    frame="afg",
+    land="seagreen",
+    water="gray90",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.168 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/conic/sg_execution_times.html b/v0.14.0/projections/conic/sg_execution_times.html new file mode 100644 index 00000000000..b283effb173 --- /dev/null +++ b/v0.14.0/projections/conic/sg_execution_times.html @@ -0,0 +1,256 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:00.805 total execution time for 4 files from projections/conic:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Albers conic equal-area projection (conic_albers.py)

00:00.287

0.0

Lambert conic conformal projection (conic_lambert.py)

00:00.193

0.0

Polyconic projection (polyconic.py)

00:00.168

0.0

Equidistant conic projection (conic_equidistant.py)

00:00.157

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/cyl/cyl_cassini.html b/v0.14.0/projections/cyl/cyl_cassini.html new file mode 100644 index 00000000000..709d9c7a2af --- /dev/null +++ b/v0.14.0/projections/cyl/cyl_cassini.html @@ -0,0 +1,287 @@ + + + + + + + + + Cassini cylindrical projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Cassini cylindrical projection

+

This cylindrical projection was developed in 1745 by César-François Cassini de +Thury for the survey of France. It is occasionally called Cassini-Soldner since +the latter provided the more accurate mathematical analysis that led to the +development of the ellipsoidal formulae. The projection is neither conformal +nor equal-area, and behaves as a compromise between the two end-members. The +distortion is zero along the central meridian. It is best suited for mapping +regions of north-south extent. The central meridian, each meridian 90° away, +and equator are straight lines; all other meridians and parallels are complex +curves.

+

clon0/lat0/scale or Clon0/lat0/width

+

The projection is set with c or C. The projection center is set by +lon0/lat0, and the figure size is set with scale or width.

+cyl cassini
import pygmt
+
+fig = pygmt.Figure()
+# Use the ISO code for Madagascar (MG) and pad it by 2 degrees (+R2)
+fig.coast(
+    region="MG+R2",
+    projection="C47/-19/12c",
+    frame="afg",
+    land="gray80",
+    water="steelblue",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.287 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/cyl/cyl_equal_area.html b/v0.14.0/projections/cyl/cyl_equal_area.html new file mode 100644 index 00000000000..758e8246c6c --- /dev/null +++ b/v0.14.0/projections/cyl/cyl_equal_area.html @@ -0,0 +1,281 @@ + + + + + + + + + Cylindrical equal-area projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Cylindrical equal-area projection

+

This cylindrical projection is actually several projections, depending on what +latitude is selected as the standard parallel. However, they are all equal area +and hence non-conformal. All meridians and parallels are straight lines.

+

ylon0/lat0/scale or Ylon0/lat0/width

+

The projection is set with y or Y. The projection center is set by +lon0/lat0, and the figure size is set with scale or width.

+cyl equal area
import pygmt
+
+fig = pygmt.Figure()
+# Use region "d" to specify global region (-180/180/-90/90)
+fig.coast(
+    region="d",
+    projection="Y35/30/12c",
+    frame="afg",
+    land="gray80",
+    water="steelblue",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.196 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/cyl/cyl_equidistant.html b/v0.14.0/projections/cyl/cyl_equidistant.html new file mode 100644 index 00000000000..16daf30a398 --- /dev/null +++ b/v0.14.0/projections/cyl/cyl_equidistant.html @@ -0,0 +1,285 @@ + + + + + + + + + Cylindrical equidistant projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Cylindrical equidistant projection

+

This simple cylindrical projection is really a linear scaling of longitudes and +latitudes. The most common form is the Plate Carrée projection, where the +scaling of longitudes and latitudes is the same. All meridians and parallels +are straight lines.

+

q[lon0/[lat0/]]scale or Q[lon0/[lat0/]]width

+

The projection is set with q or Q, and the figure size is set with +scale or width. Optionally, the central meridian can be set with lon0 +[Default is the middle of the map]. Optionally, the standard parallel can +be set with lat0 [Default is the equator]. When supplied, the central +meridian must be supplied as well.

+cyl equidistant
import pygmt
+
+fig = pygmt.Figure()
+# Use region "d" to specify global region (-180/180/-90/90)
+fig.coast(
+    region="d",
+    projection="Q12c",
+    frame="afg",
+    land="gray80",
+    water="steelblue",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.201 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/cyl/cyl_mercator.html b/v0.14.0/projections/cyl/cyl_mercator.html new file mode 100644 index 00000000000..526131a0951 --- /dev/null +++ b/v0.14.0/projections/cyl/cyl_mercator.html @@ -0,0 +1,288 @@ + + + + + + + + + Mercator projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Mercator projection

+

The Mercator projection takes its name from the Flemish cartographer Gheert +Cremer, better known as Gerardus Mercator, who presented it in 1569. The +projection is a cylindrical and conformal, with no distortion along the +equator. A major navigational feature of the projection is that a line of +constant azimuth is straight. Such a line is called a rhumb line or loxodrome. +Thus, to sail from one point to another one only had to connect the points with +a straight line, determine the azimuth of the line, and keep this constant +course for the entire voyage. The Mercator projection has been used extensively +for world maps in which the distortion towards the polar regions grows +rather large.

+

m[lon0/[lat0/]]scale or M[lon0/[lat0/]]width

+

The projection is set with m or M. The central meridian is set with the +optional lon0 and the standard parallel is set with the optional lat0. +The figure size is set with scale or width.

+cyl mercator
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    region=[0, 360, -80, 80],
+    projection="M0/0/12c",
+    frame="afg",
+    land="gray80",
+    water="steelblue",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.220 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/cyl/cyl_miller.html b/v0.14.0/projections/cyl/cyl_miller.html new file mode 100644 index 00000000000..706b6e612c2 --- /dev/null +++ b/v0.14.0/projections/cyl/cyl_miller.html @@ -0,0 +1,284 @@ + + + + + + + + + Miller cylindrical projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Miller cylindrical projection

+

This cylindrical projection, presented by Osborn Maitland Miller of the +American Geographic Society in 1942, is neither equal nor conformal. All +meridians and parallels are straight lines. The projection was designed to be a +compromise between Mercator and other cylindrical projections. Specifically, +Miller spaced the parallels by using Mercator’s formula with 0.8 times the +actual latitude, thus avoiding the singular poles; the result was then divided +by 0.8.

+

j[lon0/]/scale or J[lon0/]/width

+

The projection is set with j or J. The central meridian is set by the +optional lon0, and the figure size is set with scale or width.

+cyl miller
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    region=[-180, 180, -80, 80],
+    projection="J-65/12c",
+    frame="afg",
+    land="gray80",
+    water="steelblue",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.206 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/cyl/cyl_oblique_mercator.html b/v0.14.0/projections/cyl/cyl_oblique_mercator.html new file mode 100644 index 00000000000..84938945480 --- /dev/null +++ b/v0.14.0/projections/cyl/cyl_oblique_mercator.html @@ -0,0 +1,329 @@ + + + + + + + + + Oblique Mercator projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Oblique Mercator projection

+

Oblique configurations of the cylinder give rise to the oblique Mercator projection. +It is particularly useful when mapping regions of large lateral extent in an oblique +direction. Both parallels and meridians are complex curves. The projection was +developed in the early 1900s by several workers.

+

The projection is set with o or O. There are three different specification +ways (a|A, b|B, c|C) available. For all three +definitions, the upper case letter mean the projection pole is set in the southern +hemisphere [Default is northern hemisphere]. Align the y-axis with the optional +modifier +v. The figure size is set with scale or width.

+
+

1. Using the origin and azimuth

+

oa|oAlon0/lat0/azimuth/scale[+v] or +Oa|OAlon0/lat0/azimuth/width[+v]

+

The central meridian is set by lon0/lat0. The oblique equator is set by azimuth.

+
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    projection="Oa-120/25/-30/3c+v",
+    # Set bottom left and top right coordinates of the figure with "+r"
+    region="-122/35/-107/22+r",
+    frame="afg",
+    land="gray80",
+    water="steelblue",
+)
+fig.show()
+
+
+cyl oblique mercator
+
+

2. Using two points

+

ob|oBlon0/lat0/lon1/lat1/scale[+v] or +Ob|OBlon0/lat0/lon1/lat1/width[+v]

+

The central meridian is set by lon0/lat0. The oblique equator is set by lon1/lat1.

+
fig = pygmt.Figure()
+fig.coast(
+    projection="Ob130/35/25/35/3c",
+    region="130/35/145/40+r",
+    frame="afg",
+    land="gray80",
+    water="steelblue",
+)
+fig.show()
+
+
+cyl oblique mercator
+
+

3. Using the origin and projection pole

+

oc|oClon0/lat0/lonp/latp/scale[+v] or +Oc|OClon0/lat0/lonp/latp/width[+v]

+

The central meridian is set by lon0/lat0. The projection pole is set by lonp/latp.

+
fig = pygmt.Figure()
+fig.coast(
+    projection="Oc280/25.5/22/69/4c",
+    region="270/20/305/25+r",
+    frame="afg",
+    land="gray80",
+    water="steelblue",
+)
+fig.show()
+
+
+cyl oblique mercator

Total running time of the script: (0 minutes 0.399 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/cyl/cyl_stereographic.html b/v0.14.0/projections/cyl/cyl_stereographic.html new file mode 100644 index 00000000000..86a0ef610d3 --- /dev/null +++ b/v0.14.0/projections/cyl/cyl_stereographic.html @@ -0,0 +1,295 @@ + + + + + + + + + Cylindrical stereographic projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Cylindrical stereographic projection

+

The cylindrical stereographic projections are certainly not as notable as other +cylindrical projections, but are still used because of their relative +simplicity and their ability to overcome some of the downsides of other +cylindrical projections, like extreme distortions of the higher latitudes. The +stereographic projections are perspective projections, projecting the sphere +onto a cylinder in the direction of the antipodal point on the equator. The +cylinder crosses the sphere at two standard parallels, equidistant from the +equator.

+

cyl_stere/[lon0/[lat0/]]scale or +Cyl_stere/[lon0/[lat0/]]width

+

The projection is set with cyl_stere or Cyl_stere. The central meridian +is set by the optional lon0, and the figure size is set with scale or +width.

+

The standard parallel is typically one of these (but can be any value):

+
    +
  • 66.159467 - Miller’s modified Gall

  • +
  • 55 - Kamenetskiy’s First

  • +
  • 45 - Gall’s Stereographic

  • +
  • 30 - Bolshoi Sovietskii Atlas Mira or Kamenetskiy’s Second

  • +
  • 0 - Braun’s Cylindrical

  • +
+cyl stereographic
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    region="g",
+    projection="Cyl_stere/30/-20/12c",
+    frame="afg",
+    land="gray80",
+    water="steelblue",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.215 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/cyl/cyl_transverse_mercator.html b/v0.14.0/projections/cyl/cyl_transverse_mercator.html new file mode 100644 index 00000000000..58af0090e0d --- /dev/null +++ b/v0.14.0/projections/cyl/cyl_transverse_mercator.html @@ -0,0 +1,284 @@ + + + + + + + + + Transverse Mercator projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Transverse Mercator projection

+

The transverse Mercator was invented by Johann Heinrich Lambert in 1772. In +this projection the cylinder touches a meridian along which there is no +distortion. The distortion increases away from the central meridian and goes to +infinity at 90° from center. The central meridian, each meridian 90° away from +the center, and equator are straight lines; other parallels and meridians are +complex curves.

+

tlon0[/lat0]/scale or Tlon0[/lat0]/width

+

The projection is set with t or T. The central meridian is set +by lon0, the latitude of the origin is set by the optional lat0, and the +figure size is set with scale or width.

+cyl transverse mercator
import pygmt
+
+fig = pygmt.Figure()
+fig.coast(
+    region=[20, 50, 30, 45],
+    projection="T35/12c",
+    frame="afg",
+    land="gray80",
+    water="steelblue",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.177 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/cyl/cyl_universal_transverse_mercator.html b/v0.14.0/projections/cyl/cyl_universal_transverse_mercator.html new file mode 100644 index 00000000000..1a2c3a63c6c --- /dev/null +++ b/v0.14.0/projections/cyl/cyl_universal_transverse_mercator.html @@ -0,0 +1,302 @@ + + + + + + + + + Universal Transverse Mercator projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Universal Transverse Mercator projection

+

A particular subset of the +transverse Merctor +is the Universal Transverse Mercator (UTM) which was adopted by the US Army +for large-scale military maps. Here, the globe is divided into 60 zones +between 84°S and 84°N, most of which are 6° (in longitude) wide. +Each of these UTM zones have their unique central meridian. +Furthermore, each zone is divided into latitude bands but these are +not needed to specify the projection for most cases. See Figure +Universal Transverse Mercator for all zone designations.

+
+https://docs.generic-mapping-tools.org/latest/_images/GMT_utm_zones.png +
+

Universal Transverse Mercator zone layout.

+
+
+

In order to minimize the distortion in any given zone, a scale factor of 0.9996 +has been factored into the formulae (although a standard, you can change this +with PROJ_SCALE_FACTOR). This makes the UTM projection a secant +projection and not a tangent projection like the +transverse Merctor. +The scale only varies by 1 part in 1,000 from true scale at equator. The +ellipsoidal projection expressions are accurate for map areas that extend +less than 10° away from the central meridian. For larger regions we use the +conformal latitude in the general spherical formulae instead.

+

uzone/scale or Uzone/width

+

The projection is set with u or U. zone sets the zone for the figure, +and the figure size is set with scale or width.

+cyl universal transverse mercator
import pygmt
+
+fig = pygmt.Figure()
+# UTM Zone is set to 52R
+fig.coast(
+    region=[127.5, 128.5, 26, 27],
+    projection="U52R/12c",
+    frame="afg",
+    land="gray80",
+    water="steelblue",
+)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.202 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/cyl/sg_execution_times.html b/v0.14.0/projections/cyl/sg_execution_times.html new file mode 100644 index 00000000000..da1104cf9cd --- /dev/null +++ b/v0.14.0/projections/cyl/sg_execution_times.html @@ -0,0 +1,276 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:02.102 total execution time for 9 files from projections/cyl:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Oblique Mercator projection (cyl_oblique_mercator.py)

00:00.399

0.0

Cassini cylindrical projection (cyl_cassini.py)

00:00.287

0.0

Mercator projection (cyl_mercator.py)

00:00.220

0.0

Cylindrical stereographic projection (cyl_stereographic.py)

00:00.215

0.0

Miller cylindrical projection (cyl_miller.py)

00:00.206

0.0

Universal Transverse Mercator projection (cyl_universal_transverse_mercator.py)

00:00.202

0.0

Cylindrical equidistant projection (cyl_equidistant.py)

00:00.201

0.0

Cylindrical equal-area projection (cyl_equal_area.py)

00:00.196

0.0

Transverse Mercator projection (cyl_transverse_mercator.py)

00:00.177

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/index.html b/v0.14.0/projections/index.html new file mode 100644 index 00000000000..ac1d1327616 --- /dev/null +++ b/v0.14.0/projections/index.html @@ -0,0 +1,399 @@ + + + + + + + + + Projections — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Projections

+

PyGMT supports many map projections; see GMT Map Projections for an overview. +Use the projection parameter to specify which one you want to use in all plotting +methods. The projection is specified by a one-letter code along with (sometimes optional) +reference longitude and latitude and the width of the map (for example, +Alon0/lat0[/horizon]/width). The map height is determined based on the +region and projection.

+

These are all the available projections:

+
+

Azimuthal Projections

+
+

Azimuthal equidistant projection

+
Azimuthal equidistant projection
+
+

General stereographic projection

+
General stereographic projection
+
+

Gnomonic projection

+
Gnomonic projection
+
+

Lambert azimuthal equal-area projection

+
Lambert azimuthal equal-area projection
+
+

Orthographic projection

+
Orthographic projection
+
+

Perspective projection

+
Perspective projection
+
+
+
+
+

Conic Projections

+
+

Albers conic equal-area projection

+
Albers conic equal-area projection
+
+

Equidistant conic projection

+
Equidistant conic projection
+
+

Lambert conic conformal projection

+
Lambert conic conformal projection
+
+

Polyconic projection

+
Polyconic projection
+
+
+
+
+

Cylindric Projections

+
+

Cassini cylindrical projection

+
Cassini cylindrical projection
+
+

Cylindrical equal-area projection

+
Cylindrical equal-area projection
+
+

Cylindrical equidistant projection

+
Cylindrical equidistant projection
+
+

Cylindrical stereographic projection

+
Cylindrical stereographic projection
+
+

Mercator projection

+
Mercator projection
+
+

Miller cylindrical projection

+
Miller cylindrical projection
+
+

Oblique Mercator projection

+
Oblique Mercator projection
+
+

Transverse Mercator projection

+
Transverse Mercator projection
+
+

Universal Transverse Mercator projection

+
Universal Transverse Mercator projection
+
+
+
+
+

Miscellaneous Projections

+
+

Eckert IV equal-area projection

+
Eckert IV equal-area projection
+
+

Eckert VI equal-area projection

+
Eckert VI equal-area projection
+
+

Hammer projection

+
Hammer projection
+
+

Mollweide projection

+
Mollweide projection
+
+

Robinson projection

+
Robinson projection
+
+

Sinusoidal projection

+
Sinusoidal projection
+
+

Van der Grinten projection

+
Van der Grinten projection
+
+

Winkel Tripel projection

+
Winkel Tripel projection
+
+
+
+
+

Non-geographic Projections

+
+

Cartesian linear

+
Cartesian linear
+
+

Cartesian logarithmic

+
Cartesian logarithmic
+
+

Cartesian power

+
Cartesian power
+
+

Polar

+
Polar
+
+
+

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/misc/misc_eckertIV.html b/v0.14.0/projections/misc/misc_eckertIV.html new file mode 100644 index 00000000000..61a3fa4c333 --- /dev/null +++ b/v0.14.0/projections/misc/misc_eckertIV.html @@ -0,0 +1,275 @@ + + + + + + + + + Eckert IV equal-area projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Eckert IV equal-area projection

+

The Eckert IV projection, presented by the German cartographer Max +Eckert-Greiffendorff in 1906, is a pseudo-cylindrical equal-area projection. +Central meridian and all parallels are straight lines; other meridians are +equally spaced elliptical arcs. The scale is true along latitude 40°30’.

+

kf[lon0/]scale or Kf[lon0/]width

+

The projection is set with kf or Kf. The central meridian is set with +the optional lon0, and the figure size is set with scale or width.

+misc eckertIV
import pygmt
+
+fig = pygmt.Figure()
+# Use region "d" to specify global region (-180/180/-90/90)
+fig.coast(region="d", projection="Kf12c", frame="afg", land="ivory", water="bisque4")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.217 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/misc/misc_eckertVI.html b/v0.14.0/projections/misc/misc_eckertVI.html new file mode 100644 index 00000000000..0821db8ee16 --- /dev/null +++ b/v0.14.0/projections/misc/misc_eckertVI.html @@ -0,0 +1,275 @@ + + + + + + + + + Eckert VI equal-area projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Eckert VI equal-area projection

+

The Eckert VI projections, presented by the German cartographer Max +Eckert-Greiffendorff in 1906, is a pseudo-cylindrical equal-area projection. +Central meridian and all parallels are straight lines; other meridians are +equally spaced sinusoids. The scale is true along latitude 49°16’.

+

ks[lon0/]scale or Ks[lon0/]width

+

The projection is set with ks or Ks. The central meridian is set with +the optional lon0, and the figure size is set with scale or width.

+misc eckertVI
import pygmt
+
+fig = pygmt.Figure()
+# Use region "d" to specify global region (-180/180/-90/90)
+fig.coast(region="d", projection="Ks12c", frame="afg", land="ivory", water="bisque4")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.212 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/misc/misc_hammer.html b/v0.14.0/projections/misc/misc_hammer.html new file mode 100644 index 00000000000..e8e8c3df8e1 --- /dev/null +++ b/v0.14.0/projections/misc/misc_hammer.html @@ -0,0 +1,276 @@ + + + + + + + + + Hammer projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Hammer projection

+

The equal-area Hammer projection, first presented by the German mathematician +Ernst von Hammer in 1892, is also known as Hammer-Aitoff (the Aitoff projection +looks similar, but is not equal-area). The border is an ellipse, equator and +central meridian are straight lines, while other parallels and meridians are +complex curves.

+

h[lon0/]scale or H[lon0/]width

+

The projection is set with h or H. The central meridian is set with the +optional lon0, and the figure size is set with scale or width.

+misc hammer
import pygmt
+
+fig = pygmt.Figure()
+# Use region "d" to specify global region (-180/180/-90/90)
+fig.coast(region="d", projection="H12c", frame="afg", land="ivory", water="bisque4")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.210 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/misc/misc_mollweide.html b/v0.14.0/projections/misc/misc_mollweide.html new file mode 100644 index 00000000000..8f5491479ef --- /dev/null +++ b/v0.14.0/projections/misc/misc_mollweide.html @@ -0,0 +1,277 @@ + + + + + + + + + Mollweide projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Mollweide projection

+

This pseudo-cylindrical, equal-area projection was developed by the German +mathematician and astronomer Karl Brandan Mollweide in 1805. Parallels are +unequally spaced straight lines with the meridians being equally spaced +elliptical arcs. The scale is only true along latitudes 40°44’ north and south. +The projection is used mainly for global maps showing data distributions. It is +occasionally referenced under the name homalographic projection.

+

w[lon0/]scale or W[lon0/]width

+

The projection is set with w or W. The central meridian is set with the +optional lon0, and the figure size is set with scale or width.

+misc mollweide
import pygmt
+
+fig = pygmt.Figure()
+# Use region "d" to specify global region (-180/180/-90/90)
+fig.coast(region="d", projection="W12c", frame="afg", land="ivory", water="bisque4")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.218 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/misc/misc_robinson.html b/v0.14.0/projections/misc/misc_robinson.html new file mode 100644 index 00000000000..0727b8ef9d1 --- /dev/null +++ b/v0.14.0/projections/misc/misc_robinson.html @@ -0,0 +1,290 @@ + + + + + + + + + Robinson projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Robinson projection

+

The Robinson projection, presented by the American geographer and cartographer +Arthur H. Robinson in 1963, is a modified cylindrical projection that is +neither conformal nor equal-area. Central meridian and all parallels are +straight lines; other meridians are curved. It uses lookup tables rather than +analytic expressions to make the world map “look” right [1]. +The scale is true along latitudes 38° north and south. The projection was +originally developed for use by Rand McNally and is currently used by the +National Geographic Society.

+

n[lon0/]scale or N[lon0/]width

+

The projection is set with n or N. The central meridian is set with the +optional lon0, and the figure size is set with scale or width.

+

Footnotes

+ +misc robinson
import pygmt
+
+fig = pygmt.Figure()
+# Use region "d" to specify global region (-180/180/-90/90)
+fig.coast(region="d", projection="N12c", frame="afg", land="ivory", water="bisque4")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.207 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/misc/misc_sinusoidal.html b/v0.14.0/projections/misc/misc_sinusoidal.html new file mode 100644 index 00000000000..dcfdcdae076 --- /dev/null +++ b/v0.14.0/projections/misc/misc_sinusoidal.html @@ -0,0 +1,277 @@ + + + + + + + + + Sinusoidal projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Sinusoidal projection

+

The sinusoidal projection is one of the oldest known projections, is +equal-area, and has been used since the mid-16th century. It has also been +called the “Equal-area Mercator” projection. The central meridian is a straight +line; all other meridians are sinusoidal curves. Parallels are all equally +spaced straight lines, with scale being true along all parallels (and central +meridian).

+

i[lon0/]scale or I[lon0/]width

+

The projection is set with i or I. The central meridian is set with the +optional lon0, and the figure size is set with scale or width.

+misc sinusoidal
import pygmt
+
+fig = pygmt.Figure()
+# Use region "d" to specify global region (-180/180/-90/90)
+fig.coast(region="d", projection="I12c", frame="afg", land="ivory", water="bisque4")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.205 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/misc/misc_van_der_grinten.html b/v0.14.0/projections/misc/misc_van_der_grinten.html new file mode 100644 index 00000000000..a8a712ded62 --- /dev/null +++ b/v0.14.0/projections/misc/misc_van_der_grinten.html @@ -0,0 +1,276 @@ + + + + + + + + + Van der Grinten projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Van der Grinten projection

+

The Van der Grinten projection, presented by Alphons J. van der Grinten in +1904, is neither equal-area nor conformal. Central meridian and Equator are +straight lines; other meridians are arcs of circles. The scale is true along +the Equator only. Its main use is to show the entire world enclosed in a +circle.

+

v[lon0/]scale or V[lon0/]width

+

The projection is set with v or V. The central meridian is set with the +optional lon0, and the figure size is set with scale or width.

+misc van der grinten
import pygmt
+
+fig = pygmt.Figure()
+# Use region "d" to specify global region (-180/180/-90/90)
+fig.coast(region="d", projection="V12c", frame="afg", land="ivory", water="bisque4")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.244 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/misc/misc_winkel_tripel.html b/v0.14.0/projections/misc/misc_winkel_tripel.html new file mode 100644 index 00000000000..4faccecac6e --- /dev/null +++ b/v0.14.0/projections/misc/misc_winkel_tripel.html @@ -0,0 +1,284 @@ + + + + + + + + + Winkel Tripel projection — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Winkel Tripel projection

+

In 1921, the German mathematician Oswald Winkel made a projection that was to +strike a compromise between the properties of three elements (area, angle and +distance). The German word “tripel” refers to this junction of where each of +these elements are least distorted when plotting global maps. The projection +was popularized when Bartholomew and Son started to use it in its +world-renowned “The Times Atlas of the World” in the mid-20th century. In 1998, +the National Geographic Society made the Winkel Tripel as its map projection of +choice for global maps.

+

Naturally, this projection is neither conformal, nor equal-area. Central +meridian and equator are straight lines; other parallels and meridians are +curved. The projection is obtained by averaging the coordinates of the +Equidistant Cylindrical and Aitoff (not Hammer-Aitoff) projections. The poles +map into straight lines 0.4 times the length of equator.

+

r[lon0/]scale or R[lon0/]width

+

The projection is set with r or R. The central meridian is set with the +optional lon0, and the figure size is set with scale or width.

+misc winkel tripel
import pygmt
+
+fig = pygmt.Figure()
+# Use region "d" to specify global region (-180/180/-90/90)
+fig.coast(region="d", projection="R12c", frame="afg", land="ivory", water="bisque4")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.245 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/misc/sg_execution_times.html b/v0.14.0/projections/misc/sg_execution_times.html new file mode 100644 index 00000000000..1ef9f85becf --- /dev/null +++ b/v0.14.0/projections/misc/sg_execution_times.html @@ -0,0 +1,272 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:01.758 total execution time for 8 files from projections/misc:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Winkel Tripel projection (misc_winkel_tripel.py)

00:00.245

0.0

Van der Grinten projection (misc_van_der_grinten.py)

00:00.244

0.0

Mollweide projection (misc_mollweide.py)

00:00.218

0.0

Eckert IV equal-area projection (misc_eckertIV.py)

00:00.217

0.0

Eckert VI equal-area projection (misc_eckertVI.py)

00:00.212

0.0

Hammer projection (misc_hammer.py)

00:00.210

0.0

Robinson projection (misc_robinson.py)

00:00.207

0.0

Sinusoidal projection (misc_sinusoidal.py)

00:00.205

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/nongeo/cartesian_linear.html b/v0.14.0/projections/nongeo/cartesian_linear.html new file mode 100644 index 00000000000..75da3086807 --- /dev/null +++ b/v0.14.0/projections/nongeo/cartesian_linear.html @@ -0,0 +1,277 @@ + + + + + + + + + Cartesian linear — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Cartesian linear

+

Xwidth[/height] or xx-scale[/y-scale]

+

Give the width of the figure and the optional height. The lower-case version +x is similar to X but expects an x-scale and an optional y-scale.

+

The Cartesian linear projection is primarily designed for regular floating point +data. To plot geographical data in a linear projection, see the upstream GMT +documentation Geographic coordinates. +To make the linear plot using calendar date/time as input coordinates, see the +tutorial Plotting datetime charts. +GMT documentation Calendar time coordinates.

+cartesian linear
import pygmt
+
+fig = pygmt.Figure()
+# The region parameter is specified as x_min, x_max, y_min, y_max
+fig.basemap(region=[0, 10, 0, 50], projection="X15c/10c", frame=["afg", "+gbisque"])
+fig.plot(x=[3, 9, 2], y=[4, 9, 37], pen="2p,black")
+# Plot data points on top of the line
+# Use squares with a size of 0.3 centimeters, an "orange" fill and a "black" outline
+fig.plot(x=[3, 9, 2], y=[4, 9, 37], style="s0.3c", fill="orange", pen="black")
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.149 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/nongeo/cartesian_logarithmic.html b/v0.14.0/projections/nongeo/cartesian_logarithmic.html new file mode 100644 index 00000000000..d845ae39c1a --- /dev/null +++ b/v0.14.0/projections/nongeo/cartesian_logarithmic.html @@ -0,0 +1,295 @@ + + + + + + + + + Cartesian logarithmic — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Cartesian logarithmic

+

Xwidth[l][/height[l]] or +xx-scale[l][/y-scale[l]]

+

Give the width of the figure and the optional height. +The lower-case version x is similar to X but expects +an x-scale and an optional y-scale. +Each axis with a logarithmic transformation requires l after +its size argument.

+cartesian logarithmic
import numpy as np
+import pygmt
+
+# Create a list of x-values 0-100
+xline = np.arange(0, 101)
+# Create a list of y-values that are the square root of the x-values
+yline = xline**0.5
+# Create a list of x-values for every 10 in 0-100
+xpoints = np.arange(0, 101, 10)
+# Create a list of y-values that are the square root of the x-values
+ypoints = xpoints**0.5
+
+fig = pygmt.Figure()
+fig.basemap(
+    region=[1, 100, 0, 10],
+    # Set a logarithmic transformation on the x-axis
+    projection="X15cl/10c",
+    # Set the figures frame and color as well as
+    # annotations, ticks, and gridlines
+    frame=["WSne+gbisque", "xa2g3", "ya2f1g2"],
+)
+
+# Set the line thickness to "2p", the color to "black", and the style to "dashed"
+fig.plot(x=xline, y=yline, pen="2p,black,dashed")
+
+# Plot the square root values on top of the line
+# Use squares with a size of 0.3 centimeters, an "orange" fill and a "black" outline
+# Symbols are not clipped if they go off the figure
+fig.plot(x=xpoints, y=ypoints, style="s0.3c", fill="orange", pen="black", no_clip=True)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.158 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/nongeo/cartesian_power.html b/v0.14.0/projections/nongeo/cartesian_power.html new file mode 100644 index 00000000000..56e396939e0 --- /dev/null +++ b/v0.14.0/projections/nongeo/cartesian_power.html @@ -0,0 +1,292 @@ + + + + + + + + + Cartesian power — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Cartesian power

+

Xwidth[ppvalue][/height[ppvalue]] or +xx-scale[ppvalue][/y-scale[ppvalue]]

+

Give the width of the figure and the optional argument height. +The lower-case version x is similar to X but expects +an x-scale and an optional y-scale. +Each axis with a power transformation requires p and the exponent +for that axis after its size argument.

+cartesian power
import numpy as np
+import pygmt
+
+# Create a list of y-values 0-10
+yvalues = np.arange(0, 11)
+# Create a list of x-values that are the square of the y-values
+xvalues = yvalues**2
+
+fig = pygmt.Figure()
+fig.basemap(
+    region=[0, 100, 0, 10],
+    # Set the power transformation of the x-axis, with a power of 0.5
+    projection="X15cp0.5/10c",
+    # Set the figures frame as well as annotations and ticks
+    # The "p" forces to show only square numbers as annotations of the x-axis
+    frame=["WSne+gbisque", "xfga1p", "ya2f1g"],
+)
+
+# Set the line thickness to "thick" (equals "1p", i.e. 1 point)
+# Use as color "black" (default) and as style "solid" (default)
+fig.plot(x=xvalues, y=yvalues, pen="thick,black,solid")
+
+# Plot the data points on top of the line
+# Use circles with 0.3 centimeters diameter, with an "orange" fill and a "black" outline
+# Symbols are not clipped if they go off the figure
+fig.plot(x=xvalues, y=yvalues, style="c0.3c", fill="orange", pen="black", no_clip=True)
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.149 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/nongeo/polar.html b/v0.14.0/projections/nongeo/polar.html new file mode 100644 index 00000000000..28fd278ddd3 --- /dev/null +++ b/v0.14.0/projections/nongeo/polar.html @@ -0,0 +1,400 @@ + + + + + + + + + Polar — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Polar

+

Polar projections allow plotting polar coordinate data (e.g. angle \(\theta\) and +radius r).

+

The full syntax for polar projections is:

+

Pwidth[+a][+f[e|p|radius]][+roffset][+torigin][+z[p|radius]]

+

Limits are set via the region parameter +([theta_min, theta_max, radius_min, radius_max]). When using Pwidth you +have to give the width of the figure. The lower-case version p is similar to P +but expects a scale instead of a width (pscale).

+

The following customizing modifiers are available:

+
    +
  • +a: by default, \(\theta\) refers to the angle that is equivalent to a +counterclockwise rotation with respect to the east direction (standard definition); ++a indicates that the input data are rotated clockwise relative to the north +direction (geographical azimuth angle).

  • +
  • +roffset: represents the offset of the r-axis. This modifier allows you to +offset the center of the circle from r=0.

  • +
  • +torigin: sets the angle corresponding to the east direction which is +equivalent to rotating the entire coordinate axis clockwise; if the +a modifier +is used, setting the angle corresponding to the north direction is equivalent to +rotating the entire coordinate axis counterclockwise.

  • +
  • +f: reverses the radial direction.

    +
      +
    • Append e to indicate that the r-axis is an elevation angle, and the range of the +r-axis should be between 0° and 90°.

    • +
    • Appending p sets the current Earth radius (determined by +PROJ_ELLIPSOID) to the maximum value of the r-axis when the r-axis is +reversed.

    • +
    • Append radius to set the maximum value of the r-axis.

    • +
    +
  • +
  • +z: indicates that the r-axis is marked as depth instead of radius (e.g., +r = radius - z).

    +
      +
    • Append p to set radius to the current Earth radius.

    • +
    • Append radius to set the value of the radius.

    • +
    +
  • +
+polar
import pygmt
+
+fig = pygmt.Figure()
+
+pygmt.config(FONT_TITLE="14p,Courier,black", FORMAT_GEO_MAP="+D")
+
+# ============
+# Top left
+fig.basemap(
+    # Set map limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1
+    region=[0, 360, 0, 1],
+    # Set map width to 5 cm
+    projection="P5c",
+    # Set the frame and title; @^ allows for a line break within the title
+    frame=["xa45f", "+gbisque+tprojection='P5c' @^ region=[0, 360, 0, 1]"],
+)
+
+fig.shift_origin(xshift="w+3c")
+
+# ============
+# Top middle
+fig.basemap(
+    # Set map limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1
+    region=[0, 360, 0, 1],
+    # Set map width to 5 cm and interpret input data as geographic azimuth instead of
+    # standard angle
+    projection="P5c+a",
+    # Set the frame and title; @^ allows for a line break within the title
+    frame=["xa45f", "+gbisque+tprojection='P5c+a' @^ region=[0, 360, 0, 1]"],
+)
+
+fig.shift_origin(xshift="w+3c")
+
+# ============
+# Top right
+fig.basemap(
+    # Set map limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1
+    region=[0, 90, 0, 1],
+    # Set map width to 5 cm and interpret input data as geographic azimuth instead of
+    # standard angle
+    projection="P5c+a",
+    # Set the frame and title; @^ allows for a line break within the title
+    frame=["xa45f", "ya0.2", "WNe+gbisque+tprojection='P5c+a' @^ region=[0, 90, 0, 1]"],
+)
+
+fig.shift_origin(xshift="-2w-6c", yshift="-h-2c")
+
+# ============
+# Bottom left
+fig.basemap(
+    # Set map limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1
+    region=[0, 90, 0, 1],
+    # Set map width to 5 cm and interpret input data as geographic azimuth instead of
+    # standard angle, rotate coordinate system counterclockwise by 45 degrees
+    projection="P5c+a+t45",
+    # Set the frame and title; @^ allows for a line break within the title
+    frame=[
+        "xa30f",
+        "ya0.2",
+        "WNe+gbisque+tprojection='P5c+a+t45' @^ region=[0, 90, 0, 1]",
+    ],
+)
+
+fig.shift_origin(xshift="w+3c", yshift="1.3c")
+
+# ============
+# Bottom middle
+fig.basemap(
+    # Set map limits to theta_min = 0, theta_max = 90, radius_min = 3480,
+    # radius_max = 6371 (Earth's radius)
+    region=[0, 90, 3480, 6371],
+    # Set map width to 5 cm and interpret input data as geographic azimuth instead of
+    # standard angle, rotate coordinate system counterclockwise by 45 degrees
+    projection="P5c+a+t45",
+    # Set the frame, and title; @^ allows for a line break within the title
+    frame=[
+        "xa30f",
+        "ya",
+        "WNse+gbisque+tprojection='P5c+a+t45' @^ region=[0, 90, 3480, 6371]",
+    ],
+)
+
+fig.shift_origin(xshift="w+3c")
+
+# ============
+# Bottom right
+fig.basemap(
+    # Set map limits to theta_min = 0, theta_max = 90, radius_min = 3480,
+    # radius_max = 6371 (Earth's radius)
+    region=[0, 90, 3480, 6371],
+    # Set map width to 5 cm and interpret input data as geographic azimuth instead of
+    # standard angle, rotate coordinate system counterclockwise by 45 degrees, r-axis
+    # is marked as depth
+    projection="P5c+a+t45+z",
+    # Set the frame, and title; @^ allows for a line break within the title
+    frame=[
+        "xa30f",
+        "ya",
+        "WNse+gbisque+tprojection='P5c+a+t45+\\z' @^ region=[0, 90, 3480, 6371]",
+    ],
+)
+
+fig.show()
+
+
+

Total running time of the script: (0 minutes 0.264 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/nongeo/sg_execution_times.html b/v0.14.0/projections/nongeo/sg_execution_times.html new file mode 100644 index 00000000000..68b379b827e --- /dev/null +++ b/v0.14.0/projections/nongeo/sg_execution_times.html @@ -0,0 +1,256 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:00.720 total execution time for 4 files from projections/nongeo:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Polar (polar.py)

00:00.264

0.0

Cartesian logarithmic (cartesian_logarithmic.py)

00:00.158

0.0

Cartesian power (cartesian_power.py)

00:00.149

0.0

Cartesian linear (cartesian_linear.py)

00:00.149

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/projections/sg_execution_times.html b/v0.14.0/projections/sg_execution_times.html new file mode 100644 index 00000000000..8de921284dd --- /dev/null +++ b/v0.14.0/projections/sg_execution_times.html @@ -0,0 +1,244 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:00.000 total execution time for 0 files from projections:

+
+ + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

N/A

N/A

N/A

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/py-modindex.html b/v0.14.0/py-modindex.html new file mode 100644 index 00000000000..3510b1364fa --- /dev/null +++ b/v0.14.0/py-modindex.html @@ -0,0 +1,227 @@ + + + + + + + + Python Module Index — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ + +

Python Module Index

+ +
+ p +
+ + + + + + + +
 
+ p
+ pygmt +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/search.html b/v0.14.0/search.html new file mode 100644 index 00000000000..3854fa4b1e1 --- /dev/null +++ b/v0.14.0/search.html @@ -0,0 +1,226 @@ + + + + + + + + Search — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ + + + +
+ +
+ +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/v0.14.0/searchindex.js b/v0.14.0/searchindex.js new file mode 100644 index 00000000000..9ec0e1ba638 --- /dev/null +++ b/v0.14.0/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"alltitles": {"1. Drapping a grid": [[269, "drapping-a-grid"]], "1. Making your first figure": [[209, "making-your-first-figure"]], "1. Using the origin and azimuth": [[235, "using-the-origin-and-azimuth"]], "2-D array: list, numpy.ndarray, and pandas.DataFrame": [[212, "d-array-list-numpy-ndarray-and-pandas-dataframe"]], "2. Create a contour map": [[210, "create-a-contour-map"]], "2. Draping an image": [[269, "draping-an-image"]], "2. Using two points": [[235, "using-two-points"]], "3-D scatter plots": [[139, "d-scatter-plots"]], "3. Figure elements": [[211, "figure-elements"]], "3. Using the origin and projection pole": [[235, "using-the-origin-and-projection-pole"]], "3D Plots": [[169, "d-plots"]], "4. PyGMT I/O: Table inputs": [[212, "pygmt-i-o-table-inputs"]], "API Reference": [[133, "module-pygmt"]], "ASCII table file": [[212, "ascii-table-file"]], "About": [[207, "about"], [217, "about"]], "Active Maintainers": [[257, "active-maintainers"]], "Add a color bar": [[270, "add-a-color-bar"]], "Add a frame": [[209, "add-a-frame"]], "Add a grid for Earth relief": [[277, "add-a-grid-for-earth-relief"]], "Add a title": [[209, "add-a-title"]], "Adding a colorbar": [[210, "adding-a-colorbar"]], "Adding a colormap": [[267, "adding-a-colormap"]], "Adding a single text label": [[285, "adding-a-single-text-label"]], "Adding a text box": [[285, "adding-a-text-box"]], "Adding an inset to the figure": [[272, "adding-an-inset-to-the-figure"]], "Adding contour lines": [[210, "adding-contour-lines"]], "Adding example code": [[135, "adding-example-code"]], "Adding multiple text labels with individual configurations": [[285, "adding-multiple-text-labels-with-individual-configurations"]], "Additional exercises": [[209, "additional-exercises"], [210, "additional-exercises"]], "Adjusting the text label": [[285, "adjusting-the-text-label"]], "Adobe ISOLatin1+ Encoding": [[258, "adobe-isolatin1-encoding"]], "Adobe Symbol Encoding": [[258, "adobe-symbol-encoding"]], "Adobe ZapfDingbats Encoding": [[258, "adobe-zapfdingbats-encoding"]], "Advanced": [[286, "advanced"]], "Advanced configuration": [[285, "advanced-configuration"]], "Advanced subplot layouts": [[275, "advanced-subplot-layouts"]], "Albers conic equal-area projection": [[225, "albers-conic-equal-area-projection"]], "Archiving on Zenodo": [[215, "archiving-on-zenodo"]], "As a Contributor": [[215, "as-a-contributor"]], "As a Maintainer": [[215, "as-a-maintainer"]], "As an Administrator": [[215, "as-an-administrator"]], "Axis labels": [[279, "axis-labels"]], "Azimuthal Projections": [[240, "azimuthal-projections"]], "Azimuthal equidistant projection": [[218, "azimuthal-equidistant-projection"]], "Backwards Compatibility and Deprecation Policy": [[215, "backwards-compatibility-and-deprecation-policy"]], "Base maps": [[169, "base-maps"]], "Basic geometric symbols": [[196, "basic-geometric-symbols"]], "Basics": [[286, "basics"]], "Bit and hachure patterns": [[200, "bit-and-hachure-patterns"], [262, "bit-and-hachure-patterns"]], "Blockmean": [[154, "blockmean"]], "Branches": [[215, "branches"]], "Bug Fixes": [[134, "bug-fixes"], [134, "id5"], [134, "id19"], [134, "id26"], [134, "id34"], [134, "id42"], [134, "id50"], [134, "id55"], [134, "id63"], [134, "id71"], [134, "id77"], [134, "id85"], [134, "id91"], [134, "id99"], [134, "id105"], [134, "id112"], [134, "id119"], [134, "id125"], [134, "id132"]], "Calculate the bins used for data transformation": [[271, "calculate-the-bins-used-for-data-transformation"], [271, "id1"]], "Calculating grid gradient and radiance": [[162, "calculating-grid-gradient-and-radiance"]], "Calculating grid gradient with custom azimuth and normalize parameters": [[163, "calculating-grid-gradient-with-custom-azimuth-and-normalize-parameters"]], "Cartesian histograms": [[265, "cartesian-histograms"]], "Cartesian linear": [[250, "cartesian-linear"]], "Cartesian logarithmic": [[251, "cartesian-logarithmic"]], "Cartesian power": [[252, "cartesian-power"]], "Cartesian, circular, and geographic vectors": [[182, "cartesian-circular-and-geographic-vectors"]], "Cassini cylindrical projection": [[230, "cassini-cylindrical-projection"]], "Change line attributes": [[280, "change-line-attributes"]], "Changelog": [[134, "changelog"]], "Choropleth map": [[185, "choropleth-map"]], "Citing PyGMT": [[207, "citing-pygmt"]], "Clipping grid values": [[161, "clipping-grid-values"]], "Close polygons": [[282, "close-polygons"]], "Coastlines and borders": [[278, "coastlines-and-borders"]], "Code Style": [[135, "code-style"]], "Code of conduct": [[207, "code-of-conduct"]], "Color in land": [[210, "color-in-land"]], "Color land and water": [[187, "color-land-and-water"]], "Color palette table generation": [[133, "color-palette-table-generation"]], "Color points by categories": [[202, "color-points-by-categories"]], "Color the land and water": [[209, "color-the-land-and-water"]], "Colorbar": [[144, "colorbar"]], "Common installation issues": [[208, "common-installation-issues"]], "Computation times": [[140, "computation-times"], [142, "computation-times"], [151, "computation-times"], [158, "computation-times"], [167, "computation-times"], [180, "computation-times"], [188, "computation-times"], [192, "computation-times"], [194, "computation-times"], [205, "computation-times"], [214, "computation-times"], [224, "computation-times"], [229, "computation-times"], [239, "computation-times"], [249, "computation-times"], [254, "computation-times"], [255, "computation-times"], [256, "computation-times"], [274, "computation-times"], [284, "computation-times"], [287, "computation-times"]], "Conclusion": [[212, "conclusion"]], "Configuring PyGMT defaults": [[266, "configuring-pygmt-defaults"]], "Configuring default GMT parameters": [[266, "configuring-default-gmt-parameters"]], "Configuring layout": [[133, "configuring-layout"]], "Configuring the display settings": [[133, "configuring-the-display-settings"]], "Conic Projections": [[240, "conic-projections"]], "Connection lines": [[170, "connection-lines"]], "Contacting us": [[207, "contacting-us"]], "Continuous Benchmarking": [[215, "continuous-benchmarking"]], "Continuous Documentation": [[215, "continuous-documentation"]], "Continuous Integration": [[215, "continuous-integration"]], "Contour limits": [[267, "contour-limits"]], "Contour line settings": [[267, "contour-line-settings"]], "Contours": [[159, "contours"]], "Contributing": [[207, "contributing"]], "Contributing Code": [[135, "contributing-code"]], "Contributing Documentation": [[135, "contributing-documentation"]], "Contributing Gallery Plots": [[135, "contributing-gallery-plots"]], "Contributing Tutorials": [[135, "contributing-tutorials"]], "Contributing guidelines": [[207, "contributing-guidelines"]], "Contributors": [[134, "contributors"], [134, "id8"], [134, "id14"], [134, "id22"], [134, "id29"], [134, "id37"], [134, "id45"], [134, "id53"], [134, "id58"], [134, "id66"], [134, "id74"], [134, "id80"], [134, "id88"], [134, "id94"], [134, "id101"], [134, "id107"], [134, "id114"], [134, "id121"], [134, "id127"], [134, "id135"]], "Contributors Guide": [[135, "contributors-guide"]], "Coordinates": [[283, "coordinates"]], "Counts and frequency percent": [[265, "counts-and-frequency-percent"]], "Create a plot": [[270, "create-a-plot"]], "Create a region map": [[270, "create-a-region-map"]], "Create contour plot": [[267, "create-contour-plot"]], "Create \u2018wet-dry\u2019 mask grid": [[164, "create-wet-dry-mask-grid"]], "Creating a 3-D perspective image": [[264, "creating-a-3-d-perspective-image"]], "Creating a figure": [[209, "creating-a-figure"]], "Creating a map with contour lines": [[267, "creating-a-map-with-contour-lines"]], "Cross-referencing with Sphinx": [[135, "cross-referencing-with-sphinx"]], "Cross-section along a transect": [[160, "cross-section-along-a-transect"]], "Crossover analysis with x2sys": [[133, "crossover-analysis-with-x2sys"]], "Cumulative values": [[265, "cumulative-values"]], "Custom symbols": [[197, "custom-symbols"]], "Cylindric Projections": [[240, "cylindric-projections"]], "Cylindrical equal-area projection": [[231, "cylindrical-equal-area-projection"]], "Cylindrical equidistant projection": [[232, "cylindrical-equidistant-projection"]], "Cylindrical stereographic projection": [[236, "cylindrical-stereographic-projection"]], "Data Processing": [[133, "data-processing"]], "Datasets": [[133, "datasets"]], "Datetime inputs": [[198, "datetime-inputs"]], "Day-night terminator line and twilights": [[152, "day-night-terminator-line-and-twilights"]], "Decorated lines": [[171, "decorated-lines"]], "Define subplot layout": [[275, "define-subplot-layout"]], "Dependencies": [[208, "dependencies"]], "Dependencies Policy": [[215, "dependencies-policy"]], "Deprecating a function parameter": [[215, "deprecating-a-function-parameter"]], "Deprecations": [[134, "deprecations"], [134, "id4"], [134, "id11"], [134, "id18"], [134, "id25"], [134, "id33"], [134, "id41"], [134, "id49"], [134, "id62"], [134, "id70"], [134, "id84"], [134, "id134"]], "Distinguished Contributors": [[257, "distinguished-contributors"]], "Documentation": [[134, "documentation"], [134, "id6"], [134, "id12"], [134, "id20"], [134, "id27"], [134, "id35"], [134, "id43"], [134, "id51"], [134, "id56"], [134, "id64"], [134, "id72"], [134, "id78"], [134, "id86"], [134, "id92"], [134, "id98"], [134, "id111"], [134, "id118"], [134, "id124"], [134, "id131"]], "Documentation Improvements": [[134, "documentation-improvements"]], "Double Y-axes graph": [[141, "double-y-axes-graph"]], "Draping a dataset on top of a topographic surface": [[269, "draping-a-dataset-on-top-of-a-topographic-surface"]], "Eckert IV equal-area projection": [[241, "eckert-iv-equal-area-projection"]], "Eckert VI equal-area projection": [[242, "eckert-vi-equal-area-projection"]], "Ecosystem": [[136, "ecosystem"]], "Editing the API Documentation": [[135, "editing-the-api-documentation"]], "Editing the Documentation Locally": [[135, "editing-the-documentation-locally"]], "Editing the Documentation on GitHub": [[135, "editing-the-documentation-on-github"]], "Enhancements": [[134, "enhancements"], [134, "id3"], [134, "id10"], [134, "id17"], [134, "id24"], [134, "id32"], [134, "id40"], [134, "id48"], [134, "id61"], [134, "id69"], [134, "id76"], [134, "id83"], [134, "id90"], [134, "id97"], [134, "id104"], [134, "id110"], [134, "id117"], [134, "id123"], [134, "id130"]], "Enums": [[133, "enums"]], "Envelope": [[172, "envelope"]], "Environment Variables": [[259, "environment-variables"]], "Equalize grid based on a linear distribution": [[271, "equalize-grid-based-on-a-linear-distribution"]], "Equalize grid based on a quadratic distribution": [[271, "equalize-grid-based-on-a-quadratic-distribution"]], "Equidistant conic projection": [[226, "equidistant-conic-projection"]], "Examples from Publications and Posters": [[137, "examples-from-publications-and-posters"]], "Examples using pygmt.Figure": [[0, "examples-using-pygmt-figure"]], "Examples using pygmt.Figure.basemap": [[1, "examples-using-pygmt-figure-basemap"]], "Examples using pygmt.Figure.coast": [[2, "examples-using-pygmt-figure-coast"]], "Examples using pygmt.Figure.colorbar": [[3, "examples-using-pygmt-figure-colorbar"]], "Examples using pygmt.Figure.contour": [[4, "examples-using-pygmt-figure-contour"]], "Examples using pygmt.Figure.grdcontour": [[5, "examples-using-pygmt-figure-grdcontour"]], "Examples using pygmt.Figure.grdimage": [[6, "examples-using-pygmt-figure-grdimage"]], "Examples using pygmt.Figure.grdview": [[7, "examples-using-pygmt-figure-grdview"]], "Examples using pygmt.Figure.histogram": [[8, "examples-using-pygmt-figure-histogram"]], "Examples using pygmt.Figure.image": [[10, "examples-using-pygmt-figure-image"]], "Examples using pygmt.Figure.inset": [[11, "examples-using-pygmt-figure-inset"]], "Examples using pygmt.Figure.legend": [[12, "examples-using-pygmt-figure-legend"]], "Examples using pygmt.Figure.logo": [[13, "examples-using-pygmt-figure-logo"]], "Examples using pygmt.Figure.meca": [[14, "examples-using-pygmt-figure-meca"]], "Examples using pygmt.Figure.plot": [[15, "examples-using-pygmt-figure-plot"]], "Examples using pygmt.Figure.plot3d": [[16, "examples-using-pygmt-figure-plot3d"]], "Examples using pygmt.Figure.rose": [[18, "examples-using-pygmt-figure-rose"]], "Examples using pygmt.Figure.set_panel": [[20, "examples-using-pygmt-figure-set-panel"]], "Examples using pygmt.Figure.shift_origin": [[21, "examples-using-pygmt-figure-shift-origin"]], "Examples using pygmt.Figure.show": [[22, "examples-using-pygmt-figure-show"]], "Examples using pygmt.Figure.solar": [[23, "examples-using-pygmt-figure-solar"]], "Examples using pygmt.Figure.subplot": [[24, "examples-using-pygmt-figure-subplot"]], "Examples using pygmt.Figure.ternary": [[25, "examples-using-pygmt-figure-ternary"]], "Examples using pygmt.Figure.text": [[26, "examples-using-pygmt-figure-text"]], "Examples using pygmt.Figure.tilemap": [[27, "examples-using-pygmt-figure-tilemap"]], "Examples using pygmt.Figure.timestamp": [[28, "examples-using-pygmt-figure-timestamp"]], "Examples using pygmt.Figure.velo": [[29, "examples-using-pygmt-figure-velo"]], "Examples using pygmt.Figure.wiggle": [[31, "examples-using-pygmt-figure-wiggle"]], "Examples using pygmt.blockmean": [[34, "examples-using-pygmt-blockmean"]], "Examples using pygmt.config": [[65, "examples-using-pygmt-config"]], "Examples using pygmt.datasets.load_earth_age": [[69, "examples-using-pygmt-datasets-load-earth-age"]], "Examples using pygmt.datasets.load_earth_relief": [[78, "examples-using-pygmt-datasets-load-earth-relief"]], "Examples using pygmt.datasets.load_sample_data": [[84, "examples-using-pygmt-datasets-load-sample-data"]], "Examples using pygmt.grd2xyz": [[99, "examples-using-pygmt-grd2xyz"]], "Examples using pygmt.grdclip": [[100, "examples-using-pygmt-grdclip"]], "Examples using pygmt.grdgradient": [[104, "examples-using-pygmt-grdgradient"]], "Examples using pygmt.grdhisteq.compute_bins": [[106, "examples-using-pygmt-grdhisteq-compute-bins"]], "Examples using pygmt.grdhisteq.equalize_grid": [[107, "examples-using-pygmt-grdhisteq-equalize-grid"]], "Examples using pygmt.grdlandmask": [[109, "examples-using-pygmt-grdlandmask"]], "Examples using pygmt.grdtrack": [[112, "examples-using-pygmt-grdtrack"]], "Examples using pygmt.info": [[114, "examples-using-pygmt-info"]], "Examples using pygmt.makecpt": [[116, "examples-using-pygmt-makecpt"]], "Examples using pygmt.project": [[118, "examples-using-pygmt-project"]], "Examples using pygmt.xyz2grd": [[132, "examples-using-pygmt-xyz2grd"]], "Exceptions": [[133, "exceptions"]], "External Resources": [[137, "external-resources"]], "Figure class overview": [[133, "figure-class-overview"]], "Focal mechanisms": [[191, "focal-mechanisms"]], "Founders": [[257, "founders"]], "Frames, ticks, titles, and labels": [[279, "frames-ticks-titles-and-labels"]], "GMT C API": [[133, "gmt-c-api"]], "GMT Defaults": [[133, "gmt-defaults"]], "GMT Map Projections": [[263, "gmt-map-projections"]], "GMT/PyGMT Environment Variables": [[259, "gmt-pygmt-environment-variables"]], "Gallery": [[169, "gallery"]], "General Guidelines": [[135, "general-guidelines"]], "General Guidelines for Making a Pull Request (PR):": [[135, "general-guidelines-for-making-a-pull-request-pr"]], "General Process for Pull Request Review:": [[135, "general-process-for-pull-request-review"]], "General stereographic projection": [[220, "general-stereographic-projection"]], "Generate points along great circles": [[173, "generate-points-along-great-circles"]], "Generating an automatic region": [[268, "generating-an-automatic-region"]], "GeoPandas": [[136, "geopandas"]], "GeoPandas: Plotting lines with LineString or MultiLineString geometry": [[177, "geopandas-plotting-lines-with-linestring-or-multilinestring-geometry"]], "Getting Help": [[135, "getting-help"]], "Getting started": [[207, "getting-started"]], "Global regions": [[283, "global-regions"]], "Globally overriding defaults": [[266, "globally-overriding-defaults"]], "Gnomonic projection": [[221, "gnomonic-projection"]], "Grouped bars": [[265, "grouped-bars"]], "Hammer projection": [[243, "hammer-projection"]], "Highlight country, continent and state polygons": [[186, "highlight-country-continent-and-state-polygons"]], "Highlights": [[134, "highlights"], [134, "id1"], [134, "id9"], [134, "id15"], [134, "id23"], [134, "id30"], [134, "id38"], [134, "id46"], [134, "id54"], [134, "id59"], [134, "id67"], [134, "id75"], [134, "id81"], [134, "id89"], [134, "id95"], [134, "id102"], [134, "id108"], [134, "id115"], [134, "id122"], [134, "id128"]], "Histogram": [[155, "histogram"]], "Histograms": [[169, "histograms"]], "IPython": [[136, "ipython"]], "ISO code": [[283, "iso-code"]], "ISO/IEC 8859": [[258, "iso-iec-8859"]], "Images on figures": [[165, "images-on-figures"]], "Images, contours, and fields": [[169, "images-contours-and-fields"]], "Imposter syndrome disclaimer": [[207, "imposter-syndrome-disclaimer"]], "Input/output": [[133, "input-output"]], "Inset": [[146, "inset"]], "Inset map showing a rectangular region": [[147, "inset-map-showing-a-rectangular-region"]], "Installation": [[207, "installation"]], "Installing": [[208, "installing"]], "Installing GMT and other dependencies": [[208, "installing-gmt-and-other-dependencies"]], "Installing PyGMT": [[208, "installing-pygmt"]], "Interactive data visualization using Panel": [[277, "interactive-data-visualization-using-panel"]], "Intro to PyGMT": [[213, "intro-to-pygmt"]], "Lambert azimuthal equal-area projection": [[222, "lambert-azimuthal-equal-area-projection"]], "Lambert conic conformal projection": [[227, "lambert-conic-conformal-projection"]], "Land and water": [[278, "land-and-water"]], "Legend": [[148, "legend"]], "License": [[207, "license"]], "Line colors with a custom CPT": [[174, "line-colors-with-a-custom-cpt"]], "Line fronts": [[176, "line-fronts"]], "Line segment caps and joints": [[175, "line-segment-caps-and-joints"]], "Line styles": [[178, "line-styles"]], "Lines and vectors": [[169, "lines-and-vectors"]], "Load sample data": [[271, "load-sample-data"]], "Loading the Earth relief dataset": [[210, "loading-the-earth-relief-dataset"]], "Loading the library": [[209, "loading-the-library"]], "Locally overriding defaults": [[266, "locally-overriding-defaults"]], "Logo": [[149, "logo"]], "Main Features": [[133, "main-features"]], "Maintainers Guide": [[215, "maintainers-guide"]], "Maintenance": [[134, "maintenance"], [134, "id7"], [134, "id13"], [134, "id21"], [134, "id28"], [134, "id36"], [134, "id44"], [134, "id52"], [134, "id57"], [134, "id65"], [134, "id73"], [134, "id79"], [134, "id87"], [134, "id93"], [134, "id100"], [134, "id106"], [134, "id113"], [134, "id120"], [134, "id126"], [134, "id133"]], "Make a static map": [[277, "make-a-static-map"]], "Make an interactive map": [[277, "make-an-interactive-map"]], "Making a Release": [[215, "making-a-release"]], "Making subplots": [[275, "making-subplots"]], "Making your first subplot": [[275, "making-your-first-subplot"]], "Managing GitHub Issues": [[215, "managing-github-issues"]], "Map settings": [[267, "map-settings"]], "Maps and map elements": [[169, "maps-and-map-elements"]], "Mercator projection": [[233, "mercator-projection"]], "Metadata": [[133, "metadata"]], "Miller cylindrical projection": [[234, "miller-cylindrical-projection"]], "Minimum Supported Versions": [[216, "minimum-supported-versions"]], "Miscellaneous": [[133, "miscellaneous"]], "Miscellaneous Projections": [[240, "miscellaneous-projections"]], "Mixing and matching Python datetime and ISO dates": [[268, "mixing-and-matching-python-datetime-and-iso-dates"]], "Module-Specific Environment Variables": [[259, "module-specific-environment-variables"]], "ModuleNotFoundError in Jupyter notebook environment": [[208, "modulenotfounderror-in-jupyter-notebook-environment"]], "Mollweide projection": [[244, "mollweide-projection"]], "Multi-parameter symbols": [[199, "multi-parameter-symbols"]], "Multiple colormaps": [[145, "multiple-colormaps"]], "New Features": [[134, "new-features"], [134, "id2"], [134, "id16"], [134, "id31"], [134, "id39"], [134, "id47"], [134, "id60"], [134, "id68"], [134, "id82"], [134, "id96"], [134, "id103"], [134, "id109"], [134, "id116"], [134, "id129"]], "Non-geographic Projections": [[240, "non-geographic-projections"]], "Not working transparency": [[208, "not-working-transparency"]], "NumPy*": [[136, "numpy"]], "Oblique Mercator projection": [[235, "oblique-mercator-projection"]], "Onboarding/Offboarding Access Checklist": [[215, "onboarding-offboarding-access-checklist"]], "Operations on raster data": [[133, "operations-on-raster-data"]], "Operations on tabular data": [[133, "operations-on-tabular-data"]], "Orthographic projection": [[223, "orthographic-projection"]], "Overlaid bars": [[265, "overlaid-bars"]], "Overview": [[217, "overview"]], "Performing grid histogram equalization": [[271, "performing-grid-histogram-equalization"]], "Perspective projection": [[219, "perspective-projection"]], "Plot Cartesian Vectors": [[276, "plot-cartesian-vectors"]], "Plot Circular Vectors": [[276, "plot-circular-vectors"]], "Plot Geographic Vectors": [[276, "plot-geographic-vectors"]], "Plot embellishments": [[169, "plot-embellishments"]], "Plot frame": [[279, "plot-frame"]], "Plot lines": [[280, "plot-lines"]], "Plot polygons": [[282, "plot-polygons"]], "Plot the equally distributed data": [[271, "plot-the-equally-distributed-data"]], "Plot the normally distributed data": [[271, "plot-the-normally-distributed-data"]], "Plot the original digital elevation model and data distribution": [[271, "plot-the-original-digital-elevation-model-and-data-distribution"]], "Plot the quadratic distribution of data": [[271, "plot-the-quadratic-distribution-of-data"]], "Plotting": [[133, "plotting"]], "Plotting Earth relief": [[210, "plotting-earth-relief"], [270, "plotting-earth-relief"]], "Plotting a surface": [[138, "plotting-a-surface"]], "Plotting data points": [[281, "plotting-data-points"]], "Plotting datetime charts": [[268, "plotting-datetime-charts"]], "Plotting lines": [[280, "plotting-lines"]], "Plotting map elements": [[133, "plotting-map-elements"]], "Plotting polygons": [[282, "plotting-polygons"]], "Plotting raster data": [[133, "plotting-raster-data"]], "Plotting tabular data": [[133, "plotting-tabular-data"]], "Plotting text": [[285, "plotting-text"]], "Plotting vectors": [[276, "plotting-vectors"]], "Points": [[201, "points"]], "Points with varying transparency": [[203, "points-with-varying-transparency"]], "Polar": [[253, "polar"]], "Political boundaries": [[184, "political-boundaries"]], "Polyconic projection": [[228, "polyconic-projection"]], "Presentations": [[217, "presentations"]], "Project goals": [[207, "project-goals"]], "Projections": [[240, "projections"]], "Providing Feedback": [[135, "providing-feedback"]], "Pull Request Workflow": [[135, "pull-request-workflow"]], "Pushing to PyPI and Updating the Documentation": [[215, "pushing-to-pypi-and-updating-the-documentation"]], "PyArrow": [[136, "pyarrow"]], "PyGMT Code Overview": [[135, "pygmt-code-overview"]], "PyGMT Documentation Overview": [[135, "pygmt-documentation-overview"]], "PyGMT Team": [[257, "pygmt-team"]], "PyGMT dependencies": [[136, "pygmt-dependencies"]], "PyGMT ecosystem": [[136, "pygmt-ecosystem"]], "Quickstart": [[207, "quickstart"], [208, "quickstart"]], "Quoted lines": [[179, "quoted-lines"]], "RGB image": [[166, "rgb-image"]], "Related projects": [[207, "related-projects"]], "Release v0.1.0 (2020/05/03)": [[134, "release-v0-1-0-2020-05-03"]], "Release v0.1.1 (2020/05/22)": [[134, "release-v0-1-1-2020-05-22"]], "Release v0.1.2 (2020/07/07)": [[134, "release-v0-1-2-2020-07-07"]], "Release v0.10.0 (2023/09/02)": [[134, "release-v0-10-0-2023-09-02"]], "Release v0.11.0 (2024/02/01)": [[134, "release-v0-11-0-2024-02-01"]], "Release v0.12.0 (2024/05/01)": [[134, "release-v0-12-0-2024-05-01"]], "Release v0.13.0 (2024/09/05)": [[134, "release-v0-13-0-2024-09-05"]], "Release v0.14.0 (2024/12/31)": [[134, "release-v0-14-0-2024-12-31"]], "Release v0.2.0 (2020/09/12)": [[134, "release-v0-2-0-2020-09-12"]], "Release v0.2.1 (2020/11/14)": [[134, "release-v0-2-1-2020-11-14"]], "Release v0.3.0 (2021/02/15)": [[134, "release-v0-3-0-2021-02-15"]], "Release v0.3.1 (2021/03/14)": [[134, "release-v0-3-1-2021-03-14"]], "Release v0.4.0 (2021/06/20)": [[134, "release-v0-4-0-2021-06-20"]], "Release v0.4.1 (2021/08/07)": [[134, "release-v0-4-1-2021-08-07"]], "Release v0.5.0 (2021/10/29)": [[134, "release-v0-5-0-2021-10-29"]], "Release v0.6.0 (2022/03/14)": [[134, "release-v0-6-0-2022-03-14"]], "Release v0.6.1 (2022/04/11)": [[134, "release-v0-6-1-2022-04-11"]], "Release v0.7.0 (2022/07/01)": [[134, "release-v0-7-0-2022-07-01"]], "Release v0.8.0 (2022/12/30)": [[134, "release-v0-8-0-2022-12-30"]], "Release v0.9.0 (2023/03/31)": [[134, "release-v0-9-0-2023-03-31"]], "Reporting Upstream Bugs": [[135, "reporting-upstream-bugs"]], "Reporting a Bug": [[135, "reporting-a-bug"]], "Resolutions": [[278, "resolutions"]], "Resources for New Contributors": [[135, "resources-for-new-contributors"]], "Reviewing and Merging Pull Requests": [[215, "reviewing-and-merging-pull-requests"]], "Robinson projection": [[245, "robinson-projection"]], "Rose diagram": [[156, "rose-diagram"]], "Sampling along tracks": [[168, "sampling-along-tracks"]], "Saving and displaying the figure": [[133, "saving-and-displaying-the-figure"]], "Scalar values or 1-D arrays": [[212, "scalar-values-or-1-d-arrays"]], "Scale bar": [[150, "scale-bar"]], "Scatter plot with histograms": [[157, "scatter-plot-with-histograms"]], "Scatter plots with a legend": [[204, "scatter-plots-with-a-legend"]], "Seismology and geodesy": [[169, "seismology-and-geodesy"]], "Set a color map": [[270, "set-a-color-map"]], "Set the projection": [[209, "set-the-projection"]], "Setting Primary and Secondary Time Axes": [[268, "setting-primary-and-secondary-time-axes"]], "Setting the region": [[283, "setting-the-region"]], "Setting up your Environment": [[135, "setting-up-your-environment"]], "Shared x- and y-axes": [[275, "shared-x-and-y-axes"]], "Shorelines": [[189, "shorelines"], [278, "shorelines"]], "Sinusoidal projection": [[246, "sinusoidal-projection"]], "Stacked bars": [[265, "stacked-bars"]], "Stair-steps": [[265, "stair-steps"]], "Standards for Example Code": [[135, "standards-for-example-code"]], "Submitting General Comments/Questions": [[135, "submitting-general-comments-questions"]], "Submitting a Feature Request": [[135, "submitting-a-feature-request"]], "Support": [[207, "support"]], "Supported Encodings and Non-ASCII Characters": [[258, "supported-encodings-and-non-ascii-characters"]], "Supported Fonts": [[260, "supported-fonts"]], "Symbols and markers": [[169, "symbols-and-markers"]], "System Environment Variables": [[259, "system-environment-variables"]], "TODO comments": [[215, "todo-comments"]], "Technical Reference": [[261, "technical-reference"]], "Ternary diagram": [[143, "ternary-diagram"]], "Testing Plots": [[135, "testing-plots"]], "Testing your Code": [[135, "testing-your-code"]], "Testing your install": [[208, "testing-your-install"]], "Text symbols": [[206, "text-symbols"]], "Ticks and grid lines": [[279, "ticks-and-grid-lines"]], "Tile maps": [[190, "tile-maps"]], "Timestamp": [[153, "timestamp"]], "Title": [[279, "title"]], "Transform grid based on a normal distribution": [[271, "transform-grid-based-on-a-normal-distribution"]], "Transverse Mercator projection": [[237, "transverse-mercator-projection"]], "Tutorials": [[137, "tutorials"], [286, "tutorials"]], "Tutorials & Gallery": [[134, "tutorials-gallery"]], "Typesetting non-ASCII text": [[273, "typesetting-non-ascii-text"]], "Universal Transverse Mercator projection": [[238, "universal-transverse-mercator-projection"]], "Updating the Changelog": [[215, "updating-the-changelog"]], "Updating the Conda Package": [[215, "updating-the-conda-package"]], "Using Data Version Control (dvc) to Manage Test Images": [[135, "using-data-version-control-dvc-to-manage-test-images"]], "Using ISO Format": [[268, "using-iso-format"]], "Using Python\u2019s datetime": [[268, "using-python-s-datetime"]], "Using an external input file": [[285, "using-an-external-input-file"]], "Using check_figures_equal": [[135, "using-check-figures-equal"]], "Using mamba/conda (recommended)": [[208, "using-mamba-conda-recommended"]], "Using mpl_image_compare": [[135, "using-mpl-image-compare"]], "Using numpy.datetime64": [[268, "using-numpy-datetime64"]], "Using pandas.date_range": [[268, "using-pandas-date-range"]], "Using pip": [[208, "using-pip"]], "Using the position parameter": [[285, "using-the-position-parameter"]], "Using xarray.DataArray": [[268, "using-xarray-dataarray"]], "Van der Grinten projection": [[247, "van-der-grinten-projection"]], "Vector heads and tails": [[181, "vector-heads-and-tails"]], "Velocity arrows and confidence ellipses": [[193, "velocity-arrows-and-confidence-ellipses"]], "Vertical and horizontal bars": [[265, "vertical-and-horizontal-bars"]], "Vertical or horizontal bars": [[195, "vertical-or-horizontal-bars"]], "Ways to Contribute": [[135, "ways-to-contribute"]], "Ways to Contribute Documentation and/or Code": [[135, "ways-to-contribute-documentation-and-or-code"]], "Ways to Contribute Feedback": [[135, "ways-to-contribute-feedback"]], "Ways to Contribute to Community Building": [[135, "ways-to-contribute-to-community-building"]], "Which GMT?": [[208, "which-gmt"]], "Which Python?": [[208, "which-python"]], "Why PyGMT?": [[207, "why-pygmt"]], "Wiggle along tracks": [[183, "wiggle-along-tracks"]], "Winkel Tripel projection": [[248, "winkel-tripel-projection"]], "Xarray*": [[136, "xarray"]], "contextily": [[136, "contextily"]], "geopandas.GeoDataFrame": [[212, "geopandas-geodataframe"]], "pandas*": [[136, "pandas"]], "pygmt.Figure": [[0, "pygmt-figure"]], "pygmt.Figure.basemap": [[1, "pygmt-figure-basemap"]], "pygmt.Figure.coast": [[2, "pygmt-figure-coast"]], "pygmt.Figure.colorbar": [[3, "pygmt-figure-colorbar"]], "pygmt.Figure.contour": [[4, "pygmt-figure-contour"]], "pygmt.Figure.grdcontour": [[5, "pygmt-figure-grdcontour"]], "pygmt.Figure.grdimage": [[6, "pygmt-figure-grdimage"]], "pygmt.Figure.grdview": [[7, "pygmt-figure-grdview"]], "pygmt.Figure.histogram": [[8, "pygmt-figure-histogram"]], "pygmt.Figure.hlines": [[9, "pygmt-figure-hlines"]], "pygmt.Figure.image": [[10, "pygmt-figure-image"]], "pygmt.Figure.inset": [[11, "pygmt-figure-inset"]], "pygmt.Figure.legend": [[12, "pygmt-figure-legend"]], "pygmt.Figure.logo": [[13, "pygmt-figure-logo"]], "pygmt.Figure.meca": [[14, "pygmt-figure-meca"]], "pygmt.Figure.plot": [[15, "pygmt-figure-plot"]], "pygmt.Figure.plot3d": [[16, "pygmt-figure-plot3d"]], "pygmt.Figure.psconvert": [[17, "pygmt-figure-psconvert"]], "pygmt.Figure.rose": [[18, "pygmt-figure-rose"]], "pygmt.Figure.savefig": [[19, "pygmt-figure-savefig"]], "pygmt.Figure.set_panel": [[20, "pygmt-figure-set-panel"]], "pygmt.Figure.shift_origin": [[21, "pygmt-figure-shift-origin"]], "pygmt.Figure.show": [[22, "pygmt-figure-show"]], "pygmt.Figure.solar": [[23, "pygmt-figure-solar"]], "pygmt.Figure.subplot": [[24, "pygmt-figure-subplot"]], "pygmt.Figure.ternary": [[25, "pygmt-figure-ternary"]], "pygmt.Figure.text": [[26, "pygmt-figure-text"]], "pygmt.Figure.tilemap": [[27, "pygmt-figure-tilemap"]], "pygmt.Figure.timestamp": [[28, "pygmt-figure-timestamp"]], "pygmt.Figure.velo": [[29, "pygmt-figure-velo"]], "pygmt.Figure.vlines": [[30, "pygmt-figure-vlines"]], "pygmt.Figure.wiggle": [[31, "pygmt-figure-wiggle"]], "pygmt.GMTDataArrayAccessor": [[32, "pygmt-gmtdataarrayaccessor"]], "pygmt.binstats": [[33, "pygmt-binstats"]], "pygmt.blockmean": [[34, "pygmt-blockmean"]], "pygmt.blockmedian": [[35, "pygmt-blockmedian"]], "pygmt.blockmode": [[36, "pygmt-blockmode"]], "pygmt.clib.Session": [[37, "pygmt-clib-session"]], "pygmt.clib.Session.__enter__": [[38, "pygmt-clib-session-enter"]], "pygmt.clib.Session.__exit__": [[39, "pygmt-clib-session-exit"]], "pygmt.clib.Session.__getitem__": [[40, "pygmt-clib-session-getitem"]], "pygmt.clib.Session.call_module": [[41, "pygmt-clib-session-call-module"]], "pygmt.clib.Session.create": [[42, "pygmt-clib-session-create"]], "pygmt.clib.Session.create_data": [[43, "pygmt-clib-session-create-data"]], "pygmt.clib.Session.destroy": [[44, "pygmt-clib-session-destroy"]], "pygmt.clib.Session.extract_region": [[45, "pygmt-clib-session-extract-region"]], "pygmt.clib.Session.get_common": [[46, "pygmt-clib-session-get-common"]], "pygmt.clib.Session.get_default": [[47, "pygmt-clib-session-get-default"]], "pygmt.clib.Session.get_libgmt_func": [[48, "pygmt-clib-session-get-libgmt-func"]], "pygmt.clib.Session.open_virtualfile": [[49, "pygmt-clib-session-open-virtualfile"]], "pygmt.clib.Session.put_matrix": [[50, "pygmt-clib-session-put-matrix"]], "pygmt.clib.Session.put_strings": [[51, "pygmt-clib-session-put-strings"]], "pygmt.clib.Session.put_vector": [[52, "pygmt-clib-session-put-vector"]], "pygmt.clib.Session.read_data": [[53, "pygmt-clib-session-read-data"]], "pygmt.clib.Session.read_virtualfile": [[54, "pygmt-clib-session-read-virtualfile"]], "pygmt.clib.Session.virtualfile_from_data": [[55, "pygmt-clib-session-virtualfile-from-data"]], "pygmt.clib.Session.virtualfile_from_grid": [[56, "pygmt-clib-session-virtualfile-from-grid"]], "pygmt.clib.Session.virtualfile_from_matrix": [[57, "pygmt-clib-session-virtualfile-from-matrix"]], "pygmt.clib.Session.virtualfile_from_stringio": [[58, "pygmt-clib-session-virtualfile-from-stringio"]], "pygmt.clib.Session.virtualfile_from_vectors": [[59, "pygmt-clib-session-virtualfile-from-vectors"]], "pygmt.clib.Session.virtualfile_in": [[60, "pygmt-clib-session-virtualfile-in"]], "pygmt.clib.Session.virtualfile_out": [[61, "pygmt-clib-session-virtualfile-out"]], "pygmt.clib.Session.virtualfile_to_dataset": [[62, "pygmt-clib-session-virtualfile-to-dataset"]], "pygmt.clib.Session.virtualfile_to_raster": [[63, "pygmt-clib-session-virtualfile-to-raster"]], "pygmt.clib.Session.write_data": [[64, "pygmt-clib-session-write-data"]], "pygmt.config": [[65, "pygmt-config"]], "pygmt.datasets.list_sample_data": [[66, "pygmt-datasets-list-sample-data"]], "pygmt.datasets.load_black_marble": [[67, "pygmt-datasets-load-black-marble"]], "pygmt.datasets.load_blue_marble": [[68, "pygmt-datasets-load-blue-marble"]], "pygmt.datasets.load_earth_age": [[69, "pygmt-datasets-load-earth-age"]], "pygmt.datasets.load_earth_deflection": [[70, "pygmt-datasets-load-earth-deflection"]], "pygmt.datasets.load_earth_dist": [[71, "pygmt-datasets-load-earth-dist"]], "pygmt.datasets.load_earth_free_air_anomaly": [[72, "pygmt-datasets-load-earth-free-air-anomaly"]], "pygmt.datasets.load_earth_geoid": [[73, "pygmt-datasets-load-earth-geoid"]], "pygmt.datasets.load_earth_magnetic_anomaly": [[74, "pygmt-datasets-load-earth-magnetic-anomaly"]], "pygmt.datasets.load_earth_mask": [[75, "pygmt-datasets-load-earth-mask"]], "pygmt.datasets.load_earth_mean_dynamic_topography": [[76, "pygmt-datasets-load-earth-mean-dynamic-topography"]], "pygmt.datasets.load_earth_mean_sea_surface": [[77, "pygmt-datasets-load-earth-mean-sea-surface"]], "pygmt.datasets.load_earth_relief": [[78, "pygmt-datasets-load-earth-relief"]], "pygmt.datasets.load_earth_vertical_gravity_gradient": [[79, "pygmt-datasets-load-earth-vertical-gravity-gradient"]], "pygmt.datasets.load_mars_relief": [[80, "pygmt-datasets-load-mars-relief"]], "pygmt.datasets.load_mercury_relief": [[81, "pygmt-datasets-load-mercury-relief"]], "pygmt.datasets.load_moon_relief": [[82, "pygmt-datasets-load-moon-relief"]], "pygmt.datasets.load_pluto_relief": [[83, "pygmt-datasets-load-pluto-relief"]], "pygmt.datasets.load_sample_data": [[84, "pygmt-datasets-load-sample-data"]], "pygmt.datasets.load_tile_map": [[85, "pygmt-datasets-load-tile-map"]], "pygmt.datasets.load_venus_relief": [[86, "pygmt-datasets-load-venus-relief"]], "pygmt.dimfilter": [[87, "pygmt-dimfilter"]], "pygmt.enums.GridRegistration": [[88, "pygmt-enums-gridregistration"]], "pygmt.enums.GridType": [[89, "pygmt-enums-gridtype"]], "pygmt.exceptions.GMTCLibError": [[90, "pygmt-exceptions-gmtcliberror"]], "pygmt.exceptions.GMTCLibNoSessionError": [[91, "pygmt-exceptions-gmtclibnosessionerror"]], "pygmt.exceptions.GMTCLibNotFoundError": [[92, "pygmt-exceptions-gmtclibnotfounderror"]], "pygmt.exceptions.GMTError": [[93, "pygmt-exceptions-gmterror"]], "pygmt.exceptions.GMTInvalidInput": [[94, "pygmt-exceptions-gmtinvalidinput"]], "pygmt.exceptions.GMTOSError": [[95, "pygmt-exceptions-gmtoserror"]], "pygmt.exceptions.GMTVersionError": [[96, "pygmt-exceptions-gmtversionerror"]], "pygmt.filter1d": [[97, "pygmt-filter1d"]], "pygmt.grd2cpt": [[98, "pygmt-grd2cpt"]], "pygmt.grd2xyz": [[99, "pygmt-grd2xyz"]], "pygmt.grdclip": [[100, "pygmt-grdclip"]], "pygmt.grdcut": [[101, "pygmt-grdcut"]], "pygmt.grdfill": [[102, "pygmt-grdfill"]], "pygmt.grdfilter": [[103, "pygmt-grdfilter"]], "pygmt.grdgradient": [[104, "pygmt-grdgradient"]], "pygmt.grdhisteq": [[105, "pygmt-grdhisteq"]], "pygmt.grdhisteq.compute_bins": [[106, "pygmt-grdhisteq-compute-bins"]], "pygmt.grdhisteq.equalize_grid": [[107, "pygmt-grdhisteq-equalize-grid"]], "pygmt.grdinfo": [[108, "pygmt-grdinfo"]], "pygmt.grdlandmask": [[109, "pygmt-grdlandmask"]], "pygmt.grdproject": [[110, "pygmt-grdproject"]], "pygmt.grdsample": [[111, "pygmt-grdsample"]], "pygmt.grdtrack": [[112, "pygmt-grdtrack"]], "pygmt.grdvolume": [[113, "pygmt-grdvolume"]], "pygmt.info": [[114, "pygmt-info"]], "pygmt.load_dataarray": [[115, "pygmt-load-dataarray"]], "pygmt.makecpt": [[116, "pygmt-makecpt"]], "pygmt.nearneighbor": [[117, "pygmt-nearneighbor"]], "pygmt.project": [[118, "pygmt-project"]], "pygmt.select": [[119, "pygmt-select"]], "pygmt.set_display": [[120, "pygmt-set-display"]], "pygmt.show_versions": [[121, "pygmt-show-versions"]], "pygmt.sph2grd": [[122, "pygmt-sph2grd"]], "pygmt.sphdistance": [[123, "pygmt-sphdistance"]], "pygmt.sphinterpolate": [[124, "pygmt-sphinterpolate"]], "pygmt.surface": [[125, "pygmt-surface"]], "pygmt.triangulate": [[126, "pygmt-triangulate"]], "pygmt.triangulate.delaunay_triples": [[127, "pygmt-triangulate-delaunay-triples"]], "pygmt.triangulate.regular_grid": [[128, "pygmt-triangulate-regular-grid"]], "pygmt.which": [[129, "pygmt-which"]], "pygmt.x2sys_cross": [[130, "pygmt-x2sys-cross"]], "pygmt.x2sys_init": [[131, "pygmt-x2sys-init"]], "pygmt.xyz2grd": [[132, "pygmt-xyz2grd"]], "rioxarray": [[136, "rioxarray"]], "\u201cError loading GMT shared library at \u2026\u201d": [[208, "error-loading-gmt-shared-library-at"]]}, "docnames": ["api/generated/pygmt.Figure", "api/generated/pygmt.Figure.basemap", "api/generated/pygmt.Figure.coast", "api/generated/pygmt.Figure.colorbar", "api/generated/pygmt.Figure.contour", "api/generated/pygmt.Figure.grdcontour", "api/generated/pygmt.Figure.grdimage", "api/generated/pygmt.Figure.grdview", "api/generated/pygmt.Figure.histogram", "api/generated/pygmt.Figure.hlines", "api/generated/pygmt.Figure.image", "api/generated/pygmt.Figure.inset", "api/generated/pygmt.Figure.legend", "api/generated/pygmt.Figure.logo", "api/generated/pygmt.Figure.meca", "api/generated/pygmt.Figure.plot", "api/generated/pygmt.Figure.plot3d", "api/generated/pygmt.Figure.psconvert", "api/generated/pygmt.Figure.rose", "api/generated/pygmt.Figure.savefig", "api/generated/pygmt.Figure.set_panel", "api/generated/pygmt.Figure.shift_origin", "api/generated/pygmt.Figure.show", "api/generated/pygmt.Figure.solar", "api/generated/pygmt.Figure.subplot", "api/generated/pygmt.Figure.ternary", "api/generated/pygmt.Figure.text", "api/generated/pygmt.Figure.tilemap", "api/generated/pygmt.Figure.timestamp", "api/generated/pygmt.Figure.velo", "api/generated/pygmt.Figure.vlines", "api/generated/pygmt.Figure.wiggle", "api/generated/pygmt.GMTDataArrayAccessor", "api/generated/pygmt.binstats", "api/generated/pygmt.blockmean", "api/generated/pygmt.blockmedian", "api/generated/pygmt.blockmode", "api/generated/pygmt.clib.Session", "api/generated/pygmt.clib.Session.__enter__", "api/generated/pygmt.clib.Session.__exit__", "api/generated/pygmt.clib.Session.__getitem__", "api/generated/pygmt.clib.Session.call_module", "api/generated/pygmt.clib.Session.create", "api/generated/pygmt.clib.Session.create_data", "api/generated/pygmt.clib.Session.destroy", "api/generated/pygmt.clib.Session.extract_region", "api/generated/pygmt.clib.Session.get_common", "api/generated/pygmt.clib.Session.get_default", "api/generated/pygmt.clib.Session.get_libgmt_func", "api/generated/pygmt.clib.Session.open_virtualfile", "api/generated/pygmt.clib.Session.put_matrix", "api/generated/pygmt.clib.Session.put_strings", "api/generated/pygmt.clib.Session.put_vector", "api/generated/pygmt.clib.Session.read_data", "api/generated/pygmt.clib.Session.read_virtualfile", "api/generated/pygmt.clib.Session.virtualfile_from_data", "api/generated/pygmt.clib.Session.virtualfile_from_grid", "api/generated/pygmt.clib.Session.virtualfile_from_matrix", "api/generated/pygmt.clib.Session.virtualfile_from_stringio", "api/generated/pygmt.clib.Session.virtualfile_from_vectors", "api/generated/pygmt.clib.Session.virtualfile_in", "api/generated/pygmt.clib.Session.virtualfile_out", "api/generated/pygmt.clib.Session.virtualfile_to_dataset", "api/generated/pygmt.clib.Session.virtualfile_to_raster", "api/generated/pygmt.clib.Session.write_data", "api/generated/pygmt.config", "api/generated/pygmt.datasets.list_sample_data", "api/generated/pygmt.datasets.load_black_marble", "api/generated/pygmt.datasets.load_blue_marble", "api/generated/pygmt.datasets.load_earth_age", "api/generated/pygmt.datasets.load_earth_deflection", "api/generated/pygmt.datasets.load_earth_dist", "api/generated/pygmt.datasets.load_earth_free_air_anomaly", "api/generated/pygmt.datasets.load_earth_geoid", "api/generated/pygmt.datasets.load_earth_magnetic_anomaly", "api/generated/pygmt.datasets.load_earth_mask", "api/generated/pygmt.datasets.load_earth_mean_dynamic_topography", "api/generated/pygmt.datasets.load_earth_mean_sea_surface", "api/generated/pygmt.datasets.load_earth_relief", "api/generated/pygmt.datasets.load_earth_vertical_gravity_gradient", "api/generated/pygmt.datasets.load_mars_relief", "api/generated/pygmt.datasets.load_mercury_relief", "api/generated/pygmt.datasets.load_moon_relief", "api/generated/pygmt.datasets.load_pluto_relief", "api/generated/pygmt.datasets.load_sample_data", "api/generated/pygmt.datasets.load_tile_map", "api/generated/pygmt.datasets.load_venus_relief", "api/generated/pygmt.dimfilter", "api/generated/pygmt.enums.GridRegistration", "api/generated/pygmt.enums.GridType", "api/generated/pygmt.exceptions.GMTCLibError", "api/generated/pygmt.exceptions.GMTCLibNoSessionError", "api/generated/pygmt.exceptions.GMTCLibNotFoundError", "api/generated/pygmt.exceptions.GMTError", "api/generated/pygmt.exceptions.GMTInvalidInput", "api/generated/pygmt.exceptions.GMTOSError", "api/generated/pygmt.exceptions.GMTVersionError", "api/generated/pygmt.filter1d", "api/generated/pygmt.grd2cpt", "api/generated/pygmt.grd2xyz", "api/generated/pygmt.grdclip", "api/generated/pygmt.grdcut", "api/generated/pygmt.grdfill", "api/generated/pygmt.grdfilter", "api/generated/pygmt.grdgradient", "api/generated/pygmt.grdhisteq", "api/generated/pygmt.grdhisteq.compute_bins", "api/generated/pygmt.grdhisteq.equalize_grid", "api/generated/pygmt.grdinfo", "api/generated/pygmt.grdlandmask", "api/generated/pygmt.grdproject", "api/generated/pygmt.grdsample", "api/generated/pygmt.grdtrack", "api/generated/pygmt.grdvolume", "api/generated/pygmt.info", "api/generated/pygmt.load_dataarray", "api/generated/pygmt.makecpt", "api/generated/pygmt.nearneighbor", "api/generated/pygmt.project", "api/generated/pygmt.select", "api/generated/pygmt.set_display", "api/generated/pygmt.show_versions", "api/generated/pygmt.sph2grd", "api/generated/pygmt.sphdistance", "api/generated/pygmt.sphinterpolate", "api/generated/pygmt.surface", "api/generated/pygmt.triangulate", "api/generated/pygmt.triangulate.delaunay_triples", "api/generated/pygmt.triangulate.regular_grid", "api/generated/pygmt.which", "api/generated/pygmt.x2sys_cross", "api/generated/pygmt.x2sys_init", "api/generated/pygmt.xyz2grd", "api/index", "changes", "contributing", "ecosystem", "external_resources", "gallery/3d_plots/grdview_surface", "gallery/3d_plots/scatter3d", "gallery/3d_plots/sg_execution_times", "gallery/basemaps/double_y_axes", "gallery/basemaps/sg_execution_times", "gallery/basemaps/ternary", "gallery/embellishments/colorbar", "gallery/embellishments/colorbars_multiple", "gallery/embellishments/inset", "gallery/embellishments/inset_rectangle_region", "gallery/embellishments/legend", "gallery/embellishments/logo", "gallery/embellishments/scalebar", "gallery/embellishments/sg_execution_times", "gallery/embellishments/solar", "gallery/embellishments/timestamp", "gallery/histograms/blockm", "gallery/histograms/histogram", "gallery/histograms/rose", "gallery/histograms/scatter_and_histograms", "gallery/histograms/sg_execution_times", "gallery/images/contours", "gallery/images/cross_section", "gallery/images/grdclip", "gallery/images/grdgradient", "gallery/images/grdgradient_shading", "gallery/images/grdlandmask", "gallery/images/image", "gallery/images/rgb_image", "gallery/images/sg_execution_times", "gallery/images/track_sampling", "gallery/index", "gallery/lines/connection_lines", "gallery/lines/decorated_lines", "gallery/lines/envelope", "gallery/lines/great_circles", "gallery/lines/line_custom_cpt", "gallery/lines/line_segment_ends", "gallery/lines/linefronts", "gallery/lines/linestrings", "gallery/lines/linestyles", "gallery/lines/quoted_lines", "gallery/lines/sg_execution_times", "gallery/lines/vector_heads_tails", "gallery/lines/vector_styles", "gallery/lines/wiggle", "gallery/maps/borders", "gallery/maps/choropleth_map", "gallery/maps/country_polygons", "gallery/maps/land_and_water", "gallery/maps/sg_execution_times", "gallery/maps/shorelines", "gallery/maps/tilemaps", "gallery/seismology/meca", "gallery/seismology/sg_execution_times", "gallery/seismology/velo_arrow_ellipse", "gallery/sg_execution_times", "gallery/symbols/bars", "gallery/symbols/basic_symbols", "gallery/symbols/custom_symbols", "gallery/symbols/datetime_inputs", "gallery/symbols/multi_parameter_symbols", "gallery/symbols/patterns", "gallery/symbols/points", "gallery/symbols/points_categorical", "gallery/symbols/points_transparency", "gallery/symbols/scatter", "gallery/symbols/sg_execution_times", "gallery/symbols/text_symbols", "index", "install", "intro/01_first_figure", "intro/02_contour_map", "intro/03_figure_element", "intro/04_table_inputs", "intro/index", "intro/sg_execution_times", "maintenance", "minversions", "overview", "projections/azim/azim_equidistant", "projections/azim/azim_general_perspective", "projections/azim/azim_general_stereographic", "projections/azim/azim_gnomonic", "projections/azim/azim_lambert", "projections/azim/azim_orthographic", "projections/azim/sg_execution_times", "projections/conic/conic_albers", "projections/conic/conic_equidistant", "projections/conic/conic_lambert", "projections/conic/polyconic", "projections/conic/sg_execution_times", "projections/cyl/cyl_cassini", "projections/cyl/cyl_equal_area", "projections/cyl/cyl_equidistant", "projections/cyl/cyl_mercator", "projections/cyl/cyl_miller", "projections/cyl/cyl_oblique_mercator", "projections/cyl/cyl_stereographic", "projections/cyl/cyl_transverse_mercator", "projections/cyl/cyl_universal_transverse_mercator", "projections/cyl/sg_execution_times", "projections/index", "projections/misc/misc_eckertIV", "projections/misc/misc_eckertVI", "projections/misc/misc_hammer", "projections/misc/misc_mollweide", "projections/misc/misc_robinson", "projections/misc/misc_sinusoidal", "projections/misc/misc_van_der_grinten", "projections/misc/misc_winkel_tripel", "projections/misc/sg_execution_times", "projections/nongeo/cartesian_linear", "projections/nongeo/cartesian_logarithmic", "projections/nongeo/cartesian_power", "projections/nongeo/polar", "projections/nongeo/sg_execution_times", "projections/sg_execution_times", "sg_execution_times", "team", "techref/encodings", "techref/environment_variables", "techref/fonts", "techref/index", "techref/patterns", "techref/projections", "tutorials/advanced/3d_perspective_image", "tutorials/advanced/cartesian_histograms", "tutorials/advanced/configuration", "tutorials/advanced/contour_map", "tutorials/advanced/date_time_charts", "tutorials/advanced/draping_on_3d_surface", "tutorials/advanced/earth_relief", "tutorials/advanced/grid_equalization", "tutorials/advanced/insets", "tutorials/advanced/non_ascii_text", "tutorials/advanced/sg_execution_times", "tutorials/advanced/subplots", "tutorials/advanced/vectors", "tutorials/advanced/working_with_panel", "tutorials/basics/coastlines", "tutorials/basics/frames", "tutorials/basics/lines", "tutorials/basics/plot", "tutorials/basics/polygons", "tutorials/basics/regions", "tutorials/basics/sg_execution_times", "tutorials/basics/text", "tutorials/index", "tutorials/sg_execution_times"], "envversion": {"sphinx": 61, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.viewcode": 1}, "filenames": ["api/generated/pygmt.Figure.rst", "api/generated/pygmt.Figure.basemap.rst", "api/generated/pygmt.Figure.coast.rst", "api/generated/pygmt.Figure.colorbar.rst", "api/generated/pygmt.Figure.contour.rst", "api/generated/pygmt.Figure.grdcontour.rst", "api/generated/pygmt.Figure.grdimage.rst", "api/generated/pygmt.Figure.grdview.rst", "api/generated/pygmt.Figure.histogram.rst", "api/generated/pygmt.Figure.hlines.rst", "api/generated/pygmt.Figure.image.rst", "api/generated/pygmt.Figure.inset.rst", "api/generated/pygmt.Figure.legend.rst", "api/generated/pygmt.Figure.logo.rst", "api/generated/pygmt.Figure.meca.rst", "api/generated/pygmt.Figure.plot.rst", "api/generated/pygmt.Figure.plot3d.rst", "api/generated/pygmt.Figure.psconvert.rst", "api/generated/pygmt.Figure.rose.rst", "api/generated/pygmt.Figure.savefig.rst", "api/generated/pygmt.Figure.set_panel.rst", "api/generated/pygmt.Figure.shift_origin.rst", "api/generated/pygmt.Figure.show.rst", "api/generated/pygmt.Figure.solar.rst", "api/generated/pygmt.Figure.subplot.rst", "api/generated/pygmt.Figure.ternary.rst", "api/generated/pygmt.Figure.text.rst", "api/generated/pygmt.Figure.tilemap.rst", "api/generated/pygmt.Figure.timestamp.rst", "api/generated/pygmt.Figure.velo.rst", "api/generated/pygmt.Figure.vlines.rst", "api/generated/pygmt.Figure.wiggle.rst", "api/generated/pygmt.GMTDataArrayAccessor.rst", "api/generated/pygmt.binstats.rst", "api/generated/pygmt.blockmean.rst", "api/generated/pygmt.blockmedian.rst", "api/generated/pygmt.blockmode.rst", "api/generated/pygmt.clib.Session.rst", "api/generated/pygmt.clib.Session.__enter__.rst", "api/generated/pygmt.clib.Session.__exit__.rst", "api/generated/pygmt.clib.Session.__getitem__.rst", "api/generated/pygmt.clib.Session.call_module.rst", "api/generated/pygmt.clib.Session.create.rst", "api/generated/pygmt.clib.Session.create_data.rst", "api/generated/pygmt.clib.Session.destroy.rst", "api/generated/pygmt.clib.Session.extract_region.rst", "api/generated/pygmt.clib.Session.get_common.rst", "api/generated/pygmt.clib.Session.get_default.rst", "api/generated/pygmt.clib.Session.get_libgmt_func.rst", "api/generated/pygmt.clib.Session.open_virtualfile.rst", "api/generated/pygmt.clib.Session.put_matrix.rst", "api/generated/pygmt.clib.Session.put_strings.rst", "api/generated/pygmt.clib.Session.put_vector.rst", "api/generated/pygmt.clib.Session.read_data.rst", "api/generated/pygmt.clib.Session.read_virtualfile.rst", "api/generated/pygmt.clib.Session.virtualfile_from_data.rst", "api/generated/pygmt.clib.Session.virtualfile_from_grid.rst", "api/generated/pygmt.clib.Session.virtualfile_from_matrix.rst", "api/generated/pygmt.clib.Session.virtualfile_from_stringio.rst", "api/generated/pygmt.clib.Session.virtualfile_from_vectors.rst", "api/generated/pygmt.clib.Session.virtualfile_in.rst", "api/generated/pygmt.clib.Session.virtualfile_out.rst", "api/generated/pygmt.clib.Session.virtualfile_to_dataset.rst", "api/generated/pygmt.clib.Session.virtualfile_to_raster.rst", "api/generated/pygmt.clib.Session.write_data.rst", "api/generated/pygmt.config.rst", "api/generated/pygmt.datasets.list_sample_data.rst", "api/generated/pygmt.datasets.load_black_marble.rst", "api/generated/pygmt.datasets.load_blue_marble.rst", "api/generated/pygmt.datasets.load_earth_age.rst", "api/generated/pygmt.datasets.load_earth_deflection.rst", "api/generated/pygmt.datasets.load_earth_dist.rst", "api/generated/pygmt.datasets.load_earth_free_air_anomaly.rst", "api/generated/pygmt.datasets.load_earth_geoid.rst", "api/generated/pygmt.datasets.load_earth_magnetic_anomaly.rst", "api/generated/pygmt.datasets.load_earth_mask.rst", "api/generated/pygmt.datasets.load_earth_mean_dynamic_topography.rst", "api/generated/pygmt.datasets.load_earth_mean_sea_surface.rst", "api/generated/pygmt.datasets.load_earth_relief.rst", "api/generated/pygmt.datasets.load_earth_vertical_gravity_gradient.rst", "api/generated/pygmt.datasets.load_mars_relief.rst", "api/generated/pygmt.datasets.load_mercury_relief.rst", "api/generated/pygmt.datasets.load_moon_relief.rst", "api/generated/pygmt.datasets.load_pluto_relief.rst", "api/generated/pygmt.datasets.load_sample_data.rst", "api/generated/pygmt.datasets.load_tile_map.rst", "api/generated/pygmt.datasets.load_venus_relief.rst", "api/generated/pygmt.dimfilter.rst", "api/generated/pygmt.enums.GridRegistration.rst", "api/generated/pygmt.enums.GridType.rst", "api/generated/pygmt.exceptions.GMTCLibError.rst", "api/generated/pygmt.exceptions.GMTCLibNoSessionError.rst", "api/generated/pygmt.exceptions.GMTCLibNotFoundError.rst", "api/generated/pygmt.exceptions.GMTError.rst", "api/generated/pygmt.exceptions.GMTInvalidInput.rst", "api/generated/pygmt.exceptions.GMTOSError.rst", "api/generated/pygmt.exceptions.GMTVersionError.rst", "api/generated/pygmt.filter1d.rst", "api/generated/pygmt.grd2cpt.rst", "api/generated/pygmt.grd2xyz.rst", "api/generated/pygmt.grdclip.rst", "api/generated/pygmt.grdcut.rst", "api/generated/pygmt.grdfill.rst", "api/generated/pygmt.grdfilter.rst", "api/generated/pygmt.grdgradient.rst", "api/generated/pygmt.grdhisteq.rst", "api/generated/pygmt.grdhisteq.compute_bins.rst", "api/generated/pygmt.grdhisteq.equalize_grid.rst", "api/generated/pygmt.grdinfo.rst", "api/generated/pygmt.grdlandmask.rst", "api/generated/pygmt.grdproject.rst", "api/generated/pygmt.grdsample.rst", "api/generated/pygmt.grdtrack.rst", "api/generated/pygmt.grdvolume.rst", "api/generated/pygmt.info.rst", "api/generated/pygmt.load_dataarray.rst", "api/generated/pygmt.makecpt.rst", "api/generated/pygmt.nearneighbor.rst", "api/generated/pygmt.project.rst", "api/generated/pygmt.select.rst", "api/generated/pygmt.set_display.rst", "api/generated/pygmt.show_versions.rst", "api/generated/pygmt.sph2grd.rst", "api/generated/pygmt.sphdistance.rst", "api/generated/pygmt.sphinterpolate.rst", "api/generated/pygmt.surface.rst", "api/generated/pygmt.triangulate.rst", "api/generated/pygmt.triangulate.delaunay_triples.rst", "api/generated/pygmt.triangulate.regular_grid.rst", "api/generated/pygmt.which.rst", "api/generated/pygmt.x2sys_cross.rst", "api/generated/pygmt.x2sys_init.rst", "api/generated/pygmt.xyz2grd.rst", "api/index.rst", "changes.md", "contributing.md", "ecosystem.md", "external_resources.md", "gallery/3d_plots/grdview_surface.rst", "gallery/3d_plots/scatter3d.rst", "gallery/3d_plots/sg_execution_times.rst", "gallery/basemaps/double_y_axes.rst", "gallery/basemaps/sg_execution_times.rst", "gallery/basemaps/ternary.rst", "gallery/embellishments/colorbar.rst", "gallery/embellishments/colorbars_multiple.rst", "gallery/embellishments/inset.rst", "gallery/embellishments/inset_rectangle_region.rst", "gallery/embellishments/legend.rst", "gallery/embellishments/logo.rst", "gallery/embellishments/scalebar.rst", "gallery/embellishments/sg_execution_times.rst", "gallery/embellishments/solar.rst", "gallery/embellishments/timestamp.rst", "gallery/histograms/blockm.rst", "gallery/histograms/histogram.rst", "gallery/histograms/rose.rst", "gallery/histograms/scatter_and_histograms.rst", "gallery/histograms/sg_execution_times.rst", "gallery/images/contours.rst", "gallery/images/cross_section.rst", "gallery/images/grdclip.rst", "gallery/images/grdgradient.rst", "gallery/images/grdgradient_shading.rst", "gallery/images/grdlandmask.rst", "gallery/images/image.rst", "gallery/images/rgb_image.rst", "gallery/images/sg_execution_times.rst", "gallery/images/track_sampling.rst", "gallery/index.rst", "gallery/lines/connection_lines.rst", "gallery/lines/decorated_lines.rst", "gallery/lines/envelope.rst", "gallery/lines/great_circles.rst", "gallery/lines/line_custom_cpt.rst", "gallery/lines/line_segment_ends.rst", "gallery/lines/linefronts.rst", "gallery/lines/linestrings.rst", "gallery/lines/linestyles.rst", "gallery/lines/quoted_lines.rst", "gallery/lines/sg_execution_times.rst", "gallery/lines/vector_heads_tails.rst", "gallery/lines/vector_styles.rst", "gallery/lines/wiggle.rst", "gallery/maps/borders.rst", "gallery/maps/choropleth_map.rst", "gallery/maps/country_polygons.rst", "gallery/maps/land_and_water.rst", "gallery/maps/sg_execution_times.rst", "gallery/maps/shorelines.rst", "gallery/maps/tilemaps.rst", "gallery/seismology/meca.rst", "gallery/seismology/sg_execution_times.rst", "gallery/seismology/velo_arrow_ellipse.rst", "gallery/sg_execution_times.rst", "gallery/symbols/bars.rst", "gallery/symbols/basic_symbols.rst", "gallery/symbols/custom_symbols.rst", "gallery/symbols/datetime_inputs.rst", "gallery/symbols/multi_parameter_symbols.rst", "gallery/symbols/patterns.rst", "gallery/symbols/points.rst", "gallery/symbols/points_categorical.rst", "gallery/symbols/points_transparency.rst", "gallery/symbols/scatter.rst", "gallery/symbols/sg_execution_times.rst", "gallery/symbols/text_symbols.rst", "index.md", "install.md", "intro/01_first_figure.rst", "intro/02_contour_map.rst", "intro/03_figure_element.rst", "intro/04_table_inputs.rst", "intro/index.rst", "intro/sg_execution_times.rst", "maintenance.md", "minversions.md", "overview.md", "projections/azim/azim_equidistant.rst", "projections/azim/azim_general_perspective.rst", "projections/azim/azim_general_stereographic.rst", "projections/azim/azim_gnomonic.rst", "projections/azim/azim_lambert.rst", "projections/azim/azim_orthographic.rst", "projections/azim/sg_execution_times.rst", "projections/conic/conic_albers.rst", "projections/conic/conic_equidistant.rst", "projections/conic/conic_lambert.rst", "projections/conic/polyconic.rst", "projections/conic/sg_execution_times.rst", "projections/cyl/cyl_cassini.rst", "projections/cyl/cyl_equal_area.rst", "projections/cyl/cyl_equidistant.rst", "projections/cyl/cyl_mercator.rst", "projections/cyl/cyl_miller.rst", "projections/cyl/cyl_oblique_mercator.rst", "projections/cyl/cyl_stereographic.rst", "projections/cyl/cyl_transverse_mercator.rst", "projections/cyl/cyl_universal_transverse_mercator.rst", "projections/cyl/sg_execution_times.rst", "projections/index.rst", "projections/misc/misc_eckertIV.rst", "projections/misc/misc_eckertVI.rst", "projections/misc/misc_hammer.rst", "projections/misc/misc_mollweide.rst", "projections/misc/misc_robinson.rst", "projections/misc/misc_sinusoidal.rst", "projections/misc/misc_van_der_grinten.rst", "projections/misc/misc_winkel_tripel.rst", "projections/misc/sg_execution_times.rst", "projections/nongeo/cartesian_linear.rst", "projections/nongeo/cartesian_logarithmic.rst", "projections/nongeo/cartesian_power.rst", "projections/nongeo/polar.rst", "projections/nongeo/sg_execution_times.rst", "projections/sg_execution_times.rst", "sg_execution_times.rst", "team.md", "techref/encodings.md", "techref/environment_variables.md", "techref/fonts.md", "techref/index.md", "techref/patterns.md", "techref/projections.md", "tutorials/advanced/3d_perspective_image.rst", "tutorials/advanced/cartesian_histograms.rst", "tutorials/advanced/configuration.rst", "tutorials/advanced/contour_map.rst", "tutorials/advanced/date_time_charts.rst", "tutorials/advanced/draping_on_3d_surface.rst", "tutorials/advanced/earth_relief.rst", "tutorials/advanced/grid_equalization.rst", "tutorials/advanced/insets.rst", "tutorials/advanced/non_ascii_text.rst", "tutorials/advanced/sg_execution_times.rst", "tutorials/advanced/subplots.rst", "tutorials/advanced/vectors.rst", "tutorials/advanced/working_with_panel.rst", "tutorials/basics/coastlines.rst", "tutorials/basics/frames.rst", "tutorials/basics/lines.rst", "tutorials/basics/plot.rst", "tutorials/basics/polygons.rst", "tutorials/basics/regions.rst", "tutorials/basics/sg_execution_times.rst", "tutorials/basics/text.rst", "tutorials/index.rst", "tutorials/sg_execution_times.rst"], "indexentries": {"__enter__() (pygmt.clib.session method)": [[38, "pygmt.clib.Session.__enter__", false]], "__exit__() (pygmt.clib.session method)": [[39, "pygmt.clib.Session.__exit__", false]], "__getitem__() (pygmt.clib.session method)": [[40, "pygmt.clib.Session.__getitem__", false]], "basemap() (pygmt.figure method)": [[1, "pygmt.Figure.basemap", false]], "binstats() (in module pygmt)": [[33, "pygmt.binstats", false]], "blockmean() (in module pygmt)": [[34, "pygmt.blockmean", false]], "blockmedian() (in module pygmt)": [[35, "pygmt.blockmedian", false]], "blockmode() (in module pygmt)": [[36, "pygmt.blockmode", false]], "call_module() (pygmt.clib.session method)": [[41, "pygmt.clib.Session.call_module", false]], "cartesian (pygmt.enums.gridtype attribute)": [[89, "pygmt.enums.GridType.CARTESIAN", false]], "coast() (pygmt.figure method)": [[2, "pygmt.Figure.coast", false]], "colorbar() (pygmt.figure method)": [[3, "pygmt.Figure.colorbar", false]], "compute_bins() (pygmt.grdhisteq static method)": [[106, "pygmt.grdhisteq.compute_bins", false]], "config (class in pygmt)": [[65, "pygmt.config", false]], "contour() (pygmt.figure method)": [[4, "pygmt.Figure.contour", false]], "create() (pygmt.clib.session method)": [[42, "pygmt.clib.Session.create", false]], "create_data() (pygmt.clib.session method)": [[43, "pygmt.clib.Session.create_data", false]], "delaunay_triples() (pygmt.triangulate static method)": [[127, "pygmt.triangulate.delaunay_triples", false]], "destroy() (pygmt.clib.session method)": [[44, "pygmt.clib.Session.destroy", false]], "dimfilter() (in module pygmt)": [[87, "pygmt.dimfilter", false]], "equalize_grid() (pygmt.grdhisteq static method)": [[107, "pygmt.grdhisteq.equalize_grid", false]], "extract_region() (pygmt.clib.session method)": [[45, "pygmt.clib.Session.extract_region", false]], "figure (class in pygmt)": [[0, "pygmt.Figure", false]], "filter1d() (in module pygmt)": [[97, "pygmt.filter1d", false]], "geographic (pygmt.enums.gridtype attribute)": [[89, "pygmt.enums.GridType.GEOGRAPHIC", false]], "get_common() (pygmt.clib.session method)": [[46, "pygmt.clib.Session.get_common", false]], "get_default() (pygmt.clib.session method)": [[47, "pygmt.clib.Session.get_default", false]], "get_libgmt_func() (pygmt.clib.session method)": [[48, "pygmt.clib.Session.get_libgmt_func", false]], "gmt_library_path": [[259, "term-GMT_LIBRARY_PATH", true]], "gmtcliberror": [[90, "pygmt.exceptions.GMTCLibError", false]], "gmtclibnosessionerror": [[91, "pygmt.exceptions.GMTCLibNoSessionError", false]], "gmtclibnotfounderror": [[92, "pygmt.exceptions.GMTCLibNotFoundError", false]], "gmtdataarrayaccessor (class in pygmt)": [[32, "pygmt.GMTDataArrayAccessor", false]], "gmterror": [[93, "pygmt.exceptions.GMTError", false]], "gmtinvalidinput": [[94, "pygmt.exceptions.GMTInvalidInput", false]], "gmtoserror": [[95, "pygmt.exceptions.GMTOSError", false]], "gmtversionerror": [[96, "pygmt.exceptions.GMTVersionError", false]], "grd2cpt() (in module pygmt)": [[98, "pygmt.grd2cpt", false]], "grd2xyz() (in module pygmt)": [[99, "pygmt.grd2xyz", false]], "grdclip() (in module pygmt)": [[100, "pygmt.grdclip", false]], "grdcontour() (pygmt.figure method)": [[5, "pygmt.Figure.grdcontour", false]], "grdcut() (in module pygmt)": [[101, "pygmt.grdcut", false]], "grdfill() (in module pygmt)": [[102, "pygmt.grdfill", false]], "grdfilter() (in module pygmt)": [[103, "pygmt.grdfilter", false]], "grdgradient() (in module pygmt)": [[104, "pygmt.grdgradient", false]], "grdhisteq (class in pygmt)": [[105, "pygmt.grdhisteq", false]], "grdimage() (pygmt.figure method)": [[6, "pygmt.Figure.grdimage", false]], "grdinfo() (in module pygmt)": [[108, "pygmt.grdinfo", false]], "grdlandmask() (in module pygmt)": [[109, "pygmt.grdlandmask", false]], "grdproject() (in module pygmt)": [[110, "pygmt.grdproject", false]], "grdsample() (in module pygmt)": [[111, "pygmt.grdsample", false]], "grdtrack() (in module pygmt)": [[112, "pygmt.grdtrack", false]], "grdview() (pygmt.figure method)": [[7, "pygmt.Figure.grdview", false]], "grdvolume() (in module pygmt)": [[113, "pygmt.grdvolume", false]], "gridline (pygmt.enums.gridregistration attribute)": [[88, "pygmt.enums.GridRegistration.GRIDLINE", false]], "gridregistration (class in pygmt.enums)": [[88, "pygmt.enums.GridRegistration", false]], "gridtype (class in pygmt.enums)": [[89, "pygmt.enums.GridType", false]], "gtype (pygmt.gmtdataarrayaccessor property)": [[32, "pygmt.GMTDataArrayAccessor.gtype", false]], "histogram() (pygmt.figure method)": [[8, "pygmt.Figure.histogram", false]], "hlines() (pygmt.figure method)": [[9, "pygmt.Figure.hlines", false]], "image() (pygmt.figure method)": [[10, "pygmt.Figure.image", false]], "info (pygmt.clib.session property)": [[37, "pygmt.clib.Session.info", false]], "info() (in module pygmt)": [[114, "pygmt.info", false]], "inset() (pygmt.figure method)": [[11, "pygmt.Figure.inset", false]], "legend() (pygmt.figure method)": [[12, "pygmt.Figure.legend", false]], "list_sample_data() (in module pygmt.datasets)": [[66, "pygmt.datasets.list_sample_data", false]], "load_black_marble() (in module pygmt.datasets)": [[67, "pygmt.datasets.load_black_marble", false]], "load_blue_marble() (in module pygmt.datasets)": [[68, "pygmt.datasets.load_blue_marble", false]], "load_dataarray() (in module pygmt)": [[115, "pygmt.load_dataarray", false]], "load_earth_age() (in module pygmt.datasets)": [[69, "pygmt.datasets.load_earth_age", false]], "load_earth_deflection() (in module pygmt.datasets)": [[70, "pygmt.datasets.load_earth_deflection", false]], "load_earth_dist() (in module pygmt.datasets)": [[71, "pygmt.datasets.load_earth_dist", false]], "load_earth_free_air_anomaly() (in module pygmt.datasets)": [[72, "pygmt.datasets.load_earth_free_air_anomaly", false]], "load_earth_geoid() (in module pygmt.datasets)": [[73, "pygmt.datasets.load_earth_geoid", false]], "load_earth_magnetic_anomaly() (in module pygmt.datasets)": [[74, "pygmt.datasets.load_earth_magnetic_anomaly", false]], "load_earth_mask() (in module pygmt.datasets)": [[75, "pygmt.datasets.load_earth_mask", false]], "load_earth_mean_dynamic_topography() (in module pygmt.datasets)": [[76, "pygmt.datasets.load_earth_mean_dynamic_topography", false]], "load_earth_mean_sea_surface() (in module pygmt.datasets)": [[77, "pygmt.datasets.load_earth_mean_sea_surface", false]], "load_earth_relief() (in module pygmt.datasets)": [[78, "pygmt.datasets.load_earth_relief", false]], "load_earth_vertical_gravity_gradient() (in module pygmt.datasets)": [[79, "pygmt.datasets.load_earth_vertical_gravity_gradient", false]], "load_mars_relief() (in module pygmt.datasets)": [[80, "pygmt.datasets.load_mars_relief", false]], "load_mercury_relief() (in module pygmt.datasets)": [[81, "pygmt.datasets.load_mercury_relief", false]], "load_moon_relief() (in module pygmt.datasets)": [[82, "pygmt.datasets.load_moon_relief", false]], "load_pluto_relief() (in module pygmt.datasets)": [[83, "pygmt.datasets.load_pluto_relief", false]], "load_sample_data() (in module pygmt.datasets)": [[84, "pygmt.datasets.load_sample_data", false]], "load_tile_map() (in module pygmt.datasets)": [[85, "pygmt.datasets.load_tile_map", false]], "load_venus_relief() (in module pygmt.datasets)": [[86, "pygmt.datasets.load_venus_relief", false]], "logo() (pygmt.figure method)": [[13, "pygmt.Figure.logo", false]], "makecpt() (in module pygmt)": [[116, "pygmt.makecpt", false]], "meca() (pygmt.figure method)": [[14, "pygmt.Figure.meca", false]], "module": [[133, "module-pygmt", false]], "nearneighbor() (in module pygmt)": [[117, "pygmt.nearneighbor", false]], "open_virtualfile() (pygmt.clib.session method)": [[49, "pygmt.clib.Session.open_virtualfile", false]], "pixel (pygmt.enums.gridregistration attribute)": [[88, "pygmt.enums.GridRegistration.PIXEL", false]], "plot() (pygmt.figure method)": [[15, "pygmt.Figure.plot", false]], "plot3d() (pygmt.figure method)": [[16, "pygmt.Figure.plot3d", false]], "project() (in module pygmt)": [[118, "pygmt.project", false]], "psconvert() (pygmt.figure method)": [[17, "pygmt.Figure.psconvert", false]], "put_matrix() (pygmt.clib.session method)": [[50, "pygmt.clib.Session.put_matrix", false]], "put_strings() (pygmt.clib.session method)": [[51, "pygmt.clib.Session.put_strings", false]], "put_vector() (pygmt.clib.session method)": [[52, "pygmt.clib.Session.put_vector", false]], "pygmt": [[133, "module-pygmt", false]], "pygmt_use_external_display": [[259, "term-PYGMT_USE_EXTERNAL_DISPLAY", true]], "read_data() (pygmt.clib.session method)": [[53, "pygmt.clib.Session.read_data", false]], "read_virtualfile() (pygmt.clib.session method)": [[54, "pygmt.clib.Session.read_virtualfile", false]], "region (pygmt.figure property)": [[0, "pygmt.Figure.region", false]], "registration (pygmt.gmtdataarrayaccessor property)": [[32, "pygmt.GMTDataArrayAccessor.registration", false]], "regular_grid() (pygmt.triangulate static method)": [[128, "pygmt.triangulate.regular_grid", false]], "rose() (pygmt.figure method)": [[18, "pygmt.Figure.rose", false]], "savefig() (pygmt.figure method)": [[19, "pygmt.Figure.savefig", false]], "select() (in module pygmt)": [[119, "pygmt.select", false]], "session (class in pygmt.clib)": [[37, "pygmt.clib.Session", false]], "session_pointer (pygmt.clib.session property)": [[37, "pygmt.clib.Session.session_pointer", false]], "set_display() (in module pygmt)": [[120, "pygmt.set_display", false]], "set_panel() (pygmt.figure method)": [[20, "pygmt.Figure.set_panel", false]], "shift_origin() (pygmt.figure method)": [[21, "pygmt.Figure.shift_origin", false]], "show() (pygmt.figure method)": [[22, "pygmt.Figure.show", false]], "show_versions() (in module pygmt)": [[121, "pygmt.show_versions", false]], "solar() (pygmt.figure method)": [[23, "pygmt.Figure.solar", false]], "sph2grd() (in module pygmt)": [[122, "pygmt.sph2grd", false]], "sphdistance() (in module pygmt)": [[123, "pygmt.sphdistance", false]], "sphinterpolate() (in module pygmt)": [[124, "pygmt.sphinterpolate", false]], "subplot() (pygmt.figure method)": [[24, "pygmt.Figure.subplot", false]], "surface() (in module pygmt)": [[125, "pygmt.surface", false]], "ternary() (pygmt.figure method)": [[25, "pygmt.Figure.ternary", false]], "text() (pygmt.figure method)": [[26, "pygmt.Figure.text", false]], "tilemap() (pygmt.figure method)": [[27, "pygmt.Figure.tilemap", false]], "timestamp() (pygmt.figure method)": [[28, "pygmt.Figure.timestamp", false]], "triangulate (class in pygmt)": [[126, "pygmt.triangulate", false]], "tz": [[259, "term-TZ", true]], "velo() (pygmt.figure method)": [[29, "pygmt.Figure.velo", false]], "virtualfile_from_data() (pygmt.clib.session method)": [[55, "pygmt.clib.Session.virtualfile_from_data", false]], "virtualfile_from_grid() (pygmt.clib.session method)": [[56, "pygmt.clib.Session.virtualfile_from_grid", false]], "virtualfile_from_matrix() (pygmt.clib.session method)": [[57, "pygmt.clib.Session.virtualfile_from_matrix", false]], "virtualfile_from_stringio() (pygmt.clib.session method)": [[58, "pygmt.clib.Session.virtualfile_from_stringio", false]], "virtualfile_from_vectors() (pygmt.clib.session method)": [[59, "pygmt.clib.Session.virtualfile_from_vectors", false]], "virtualfile_in() (pygmt.clib.session method)": [[60, "pygmt.clib.Session.virtualfile_in", false]], "virtualfile_out() (pygmt.clib.session method)": [[61, "pygmt.clib.Session.virtualfile_out", false]], "virtualfile_to_dataset() (pygmt.clib.session method)": [[62, "pygmt.clib.Session.virtualfile_to_dataset", false]], "virtualfile_to_raster() (pygmt.clib.session method)": [[63, "pygmt.clib.Session.virtualfile_to_raster", false]], "vlines() (pygmt.figure method)": [[30, "pygmt.Figure.vlines", false]], "which() (in module pygmt)": [[129, "pygmt.which", false]], "wiggle() (pygmt.figure method)": [[31, "pygmt.Figure.wiggle", false]], "write_data() (pygmt.clib.session method)": [[64, "pygmt.clib.Session.write_data", false]], "x2sys_cross() (in module pygmt)": [[130, "pygmt.x2sys_cross", false]], "x2sys_home": [[259, "term-X2SYS_HOME", true]], "x2sys_init() (in module pygmt)": [[131, "pygmt.x2sys_init", false]], "xyz2grd() (in module pygmt)": [[132, "pygmt.xyz2grd", false]]}, "objects": {"": [[133, 0, 0, "-", "pygmt"]], "pygmt": [[0, 1, 1, "", "Figure"], [32, 1, 1, "", "GMTDataArrayAccessor"], [33, 4, 1, "", "binstats"], [34, 4, 1, "", "blockmean"], [35, 4, 1, "", "blockmedian"], [36, 4, 1, "", "blockmode"], [65, 1, 1, "", "config"], [87, 4, 1, "", "dimfilter"], [97, 4, 1, "", "filter1d"], [98, 4, 1, "", "grd2cpt"], [99, 4, 1, "", "grd2xyz"], [100, 4, 1, "", "grdclip"], [101, 4, 1, "", "grdcut"], [102, 4, 1, "", "grdfill"], [103, 4, 1, "", "grdfilter"], [104, 4, 1, "", "grdgradient"], [105, 1, 1, "", "grdhisteq"], [108, 4, 1, "", "grdinfo"], [109, 4, 1, "", "grdlandmask"], [110, 4, 1, "", "grdproject"], [111, 4, 1, "", "grdsample"], [112, 4, 1, "", "grdtrack"], [113, 4, 1, "", "grdvolume"], [114, 4, 1, "", "info"], [115, 4, 1, "", "load_dataarray"], [116, 4, 1, "", "makecpt"], [117, 4, 1, "", "nearneighbor"], [118, 4, 1, "", "project"], [119, 4, 1, "", "select"], [120, 4, 1, "", "set_display"], [121, 4, 1, "", "show_versions"], [122, 4, 1, "", "sph2grd"], [123, 4, 1, "", "sphdistance"], [124, 4, 1, "", "sphinterpolate"], [125, 4, 1, "", "surface"], [126, 1, 1, "", "triangulate"], [129, 4, 1, "", "which"], [130, 4, 1, "", "x2sys_cross"], [131, 4, 1, "", "x2sys_init"], [132, 4, 1, "", "xyz2grd"]], "pygmt.Figure": [[1, 2, 1, "", "basemap"], [2, 2, 1, "", "coast"], [3, 2, 1, "", "colorbar"], [4, 2, 1, "", "contour"], [5, 2, 1, "", "grdcontour"], [6, 2, 1, "", "grdimage"], [7, 2, 1, "", "grdview"], [8, 2, 1, "", "histogram"], [9, 2, 1, "", "hlines"], [10, 2, 1, "", "image"], [11, 2, 1, "", "inset"], [12, 2, 1, "", "legend"], [13, 2, 1, "", "logo"], [14, 2, 1, "", "meca"], [15, 2, 1, "", "plot"], [16, 2, 1, "", "plot3d"], [17, 2, 1, "", "psconvert"], [0, 3, 1, "", "region"], [18, 2, 1, "", "rose"], [19, 2, 1, "", "savefig"], [20, 2, 1, "", "set_panel"], [21, 2, 1, "", "shift_origin"], [22, 2, 1, "", "show"], [23, 2, 1, "", "solar"], [24, 2, 1, "", "subplot"], [25, 2, 1, "", "ternary"], [26, 2, 1, "", "text"], [27, 2, 1, "", "tilemap"], [28, 2, 1, "", "timestamp"], [29, 2, 1, "", "velo"], [30, 2, 1, "", "vlines"], [31, 2, 1, "", "wiggle"]], "pygmt.GMTDataArrayAccessor": [[32, 3, 1, "", "gtype"], [32, 3, 1, "", "registration"]], "pygmt.clib": [[37, 1, 1, "", "Session"]], "pygmt.clib.Session": [[38, 2, 1, "", "__enter__"], [39, 2, 1, "", "__exit__"], [40, 2, 1, "", "__getitem__"], [41, 2, 1, "", "call_module"], [42, 2, 1, "", "create"], [43, 2, 1, "", "create_data"], [44, 2, 1, "", "destroy"], [45, 2, 1, "", "extract_region"], [46, 2, 1, "", "get_common"], [47, 2, 1, "", "get_default"], [48, 2, 1, "", "get_libgmt_func"], [37, 3, 1, "", "info"], [49, 2, 1, "", "open_virtualfile"], [50, 2, 1, "", "put_matrix"], [51, 2, 1, "", "put_strings"], [52, 2, 1, "", "put_vector"], [53, 2, 1, "", "read_data"], [54, 2, 1, "", "read_virtualfile"], [37, 3, 1, "", "session_pointer"], [55, 2, 1, "", "virtualfile_from_data"], [56, 2, 1, "", "virtualfile_from_grid"], [57, 2, 1, "", "virtualfile_from_matrix"], [58, 2, 1, "", "virtualfile_from_stringio"], [59, 2, 1, "", "virtualfile_from_vectors"], [60, 2, 1, "", "virtualfile_in"], [61, 2, 1, "", "virtualfile_out"], [62, 2, 1, "", "virtualfile_to_dataset"], [63, 2, 1, "", "virtualfile_to_raster"], [64, 2, 1, "", "write_data"]], "pygmt.datasets": [[66, 4, 1, "", "list_sample_data"], [67, 4, 1, "", "load_black_marble"], [68, 4, 1, "", "load_blue_marble"], [69, 4, 1, "", "load_earth_age"], [70, 4, 1, "", "load_earth_deflection"], [71, 4, 1, "", "load_earth_dist"], [72, 4, 1, "", "load_earth_free_air_anomaly"], [73, 4, 1, "", "load_earth_geoid"], [74, 4, 1, "", "load_earth_magnetic_anomaly"], [75, 4, 1, "", "load_earth_mask"], [76, 4, 1, "", "load_earth_mean_dynamic_topography"], [77, 4, 1, "", "load_earth_mean_sea_surface"], [78, 4, 1, "", "load_earth_relief"], [79, 4, 1, "", "load_earth_vertical_gravity_gradient"], [80, 4, 1, "", "load_mars_relief"], [81, 4, 1, "", "load_mercury_relief"], [82, 4, 1, "", "load_moon_relief"], [83, 4, 1, "", "load_pluto_relief"], [84, 4, 1, "", "load_sample_data"], [85, 4, 1, "", "load_tile_map"], [86, 4, 1, "", "load_venus_relief"]], "pygmt.enums": [[88, 1, 1, "", "GridRegistration"], [89, 1, 1, "", "GridType"]], "pygmt.enums.GridRegistration": [[88, 5, 1, "", "GRIDLINE"], [88, 5, 1, "", "PIXEL"]], "pygmt.enums.GridType": [[89, 5, 1, "", "CARTESIAN"], [89, 5, 1, "", "GEOGRAPHIC"]], "pygmt.exceptions": [[90, 6, 1, "", "GMTCLibError"], [91, 6, 1, "", "GMTCLibNoSessionError"], [92, 6, 1, "", "GMTCLibNotFoundError"], [93, 6, 1, "", "GMTError"], [94, 6, 1, "", "GMTInvalidInput"], [95, 6, 1, "", "GMTOSError"], [96, 6, 1, "", "GMTVersionError"]], "pygmt.grdhisteq": [[106, 2, 1, "", "compute_bins"], [107, 2, 1, "", "equalize_grid"]], "pygmt.triangulate": [[127, 2, 1, "", "delaunay_triples"], [128, 2, 1, "", "regular_grid"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "property", "Python property"], "4": ["py", "function", "Python function"], "5": ["py", "attribute", "Python attribute"], "6": ["py", "exception", "Python exception"]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:property", "4": "py:function", "5": "py:attribute", "6": "py:exception"}, "terms": {"": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 46, 53, 56, 58, 62, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 98, 99, 101, 102, 103, 104, 106, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 120, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 141, 144, 147, 150, 153, 154, 168, 171, 173, 174, 176, 179, 182, 186, 190, 195, 196, 206, 207, 208, 209, 212, 215, 220, 227, 234, 236, 238, 253, 258, 259, 263, 264, 273, 275, 276, 279, 281], "0": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 41, 43, 45, 46, 49, 50, 52, 53, 54, 56, 57, 58, 60, 61, 62, 63, 75, 85, 87, 88, 89, 97, 98, 99, 100, 103, 104, 106, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 130, 131, 132, 135, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 214, 215, 216, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 258, 260, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 287], "00": [45, 140, 142, 151, 152, 158, 167, 180, 188, 192, 194, 198, 205, 214, 224, 229, 239, 249, 254, 255, 256, 268, 274, 284, 285, 287], "000": [5, 100, 185, 194, 210, 238, 255, 264, 267, 287], "0001": 190, "00084": 185, "001": 18, "004e": 85, "0060": 182, "01": [78, 158, 162, 167, 180, 188, 198, 214, 224, 249, 256, 268, 274, 284], "015625": 166, "0174532925199433": 166, "019284e": 113, "01_first_figur": [209, 214, 256], "01d": [32, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 134, 145, 270], "01m": [67, 68, 69, 70, 71, 72, 73, 75, 77, 78, 79, 80, 81, 82, 83, 86, 210], "01t05": 268, "01t12": [198, 268], "02": [140, 151, 180, 198, 205, 214, 224, 239, 256, 268, 274, 281], "02_contour_map": [210, 214, 256], "02m": [67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82, 83, 86], "03": [78, 162, 167, 198, 208, 256, 268, 271, 284], "03_figure_el": [211, 214, 256], "03m": [67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82, 83, 86, 161, 163], "03x": 258, "03x03": [161, 163], "04": [85, 167, 208, 216, 256, 268], "046": [166, 167, 256], "046875": 166, "0479": 276, "04_table_input": [212, 214, 256], "04m": [67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82, 83, 86], "04t00": [198, 268], "04t14": [198, 268], "04x": 258, "05": [18, 138, 166, 268], "053": 172, "053b": 172, "055": [209, 214, 256], "05971": 177, "05axi": 166, "05m": [67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82, 83, 86, 135, 267], "05x": 258, "06": [166, 180, 198, 216, 268], "0625": 82, "0682": 276, "06841": 177, "06axi": 166, "06m": [67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82, 83, 86], "06x": 258, "07": [85, 188, 256, 274], "0715": [182, 276], "0732883317": 83, "07c": 148, "07m": 76, "07x": 258, "0807": 177, "081e": 85, "09": [188, 216, 284], "0997": 276, "0add_offset": 166, "0c": [125, 144, 160, 161, 162, 164, 171, 176, 178, 179, 181, 271, 276, 285], "0e": 283, "0e23": 14, "0false_east": 166, "0false_north": 166, "0longitude_of_central_meridian": 166, "0p": [182, 183], "0prime_meridian_nam": 166, "0rc1": 134, "0scale_factor_at_central_meridian": 166, "0semi_minor_axi": 166, "0x0": 193, "0xarrai": 166, "1": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 20, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 41, 43, 45, 46, 49, 51, 52, 54, 56, 57, 58, 59, 60, 61, 62, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 97, 98, 99, 100, 103, 104, 106, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 132, 135, 138, 139, 141, 143, 144, 145, 146, 147, 148, 150, 152, 155, 156, 157, 159, 160, 162, 163, 164, 165, 166, 170, 171, 172, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 190, 191, 195, 196, 197, 198, 199, 200, 201, 202, 204, 206, 208, 210, 211, 213, 214, 215, 216, 219, 238, 245, 251, 252, 253, 256, 258, 260, 262, 263, 264, 265, 267, 268, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "10": [2, 3, 4, 5, 6, 7, 9, 18, 21, 30, 37, 41, 45, 46, 56, 57, 62, 85, 99, 100, 101, 103, 104, 106, 107, 110, 111, 113, 117, 120, 125, 130, 132, 135, 141, 143, 144, 148, 149, 150, 153, 156, 157, 159, 160, 161, 162, 163, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 185, 193, 198, 200, 201, 202, 207, 208, 209, 211, 212, 215, 216, 217, 219, 238, 250, 251, 252, 258, 260, 265, 268, 269, 270, 275, 276, 277, 279, 280, 281, 283, 285], "100": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 23, 25, 26, 29, 31, 33, 98, 108, 116, 117, 135, 141, 143, 144, 155, 173, 175, 183, 186, 200, 201, 203, 218, 227, 251, 252, 265, 271, 276, 277, 285], "1000": [5, 100, 134, 147, 157, 210, 264, 267, 268, 269, 277], "10000": [100, 147], "100000": 166, "1000px": 269, "1006": 134, "101": [251, 256, 278, 284], "1013": 134, "1016": 134, "1017": 208, "1019": 134, "102": [239, 281], "1020": 134, "1022": 134, "1029": 134, "103": [186, 188, 256, 264], "1031": 134, "1033": 134, "1034": 134, "1036": 134, "1040": 134, "105": [203, 276], "1062": 134, "1065": 134, "107": [112, 235], "1070": 134, "1072": 134, "1074": 134, "108": [264, 285], "1089": 134, "1090": 134, "1092": 134, "109375": 166, "10c": [9, 21, 30, 143, 150, 159, 181, 202, 204, 209, 250, 251, 252, 268, 276, 280], "10cm": 276, "10e": 283, "10m": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 117, 145, 160, 264, 269, 270, 277], "10n": 173, "10p": [150, 160, 163, 175, 211, 265], "10x": 258, "10x10": 269, "11": [26, 57, 62, 84, 132, 167, 200, 205, 208, 211, 216, 252, 258, 260, 273], "110": [141, 276], "1101": 134, "1104": 134, "1105": 134, "1108": 134, "1109": 134, "1116": 134, "1117": 134, "1119": 134, "112": [182, 285], "1121": 134, "1122": 134, "1125": 134, "1127": 134, "113": 256, "11320280": 217, "114": [276, 285], "1145": 134, "115": [266, 276], "1155": 271, "116": 182, "1160": 134, "1176": 268, "118": [112, 285], "1186": 134, "1189": 134, "119": [162, 266, 271, 276, 285], "1190": 134, "1193": 134, "1194": 134, "11x": 258, "12": [21, 57, 58, 62, 80, 101, 112, 113, 132, 160, 162, 182, 183, 186, 191, 200, 202, 211, 215, 216, 260, 268, 269, 270, 277, 285], "120": [69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 199, 235, 276], "1206": 134, "121": [210, 285], "1210": 134, "1211": 134, "1219": 134, "122": [0, 160, 182, 191, 210, 235, 276], "1235": 268, "1236": 134, "124": [180, 183, 191, 256], "1249": 134, "125": [109, 191], "1251": 134, "1254": 134, "1256": 134, "1258": 134, "126": 160, "1260": 134, "1261": 134, "1264": 134, "1265": 134, "1267": 134, "1269": 134, "127": [182, 198, 205, 238, 256, 276], "1272": 134, "1273": 134, "1276": 134, "128": [238, 269], "1280": 134, "1282": 134, "1284": 134, "1287": 134, "1288": 134, "129": 147, "1295": 134, "1298": 134, "1299": 134, "12c": [147, 186, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 233, 234, 236, 237, 238, 276, 277, 283], "12p": [26, 211, 285], "12x": 258, "13": [26, 112, 132, 180, 208, 210, 211, 212, 216, 258, 260, 268, 269, 271, 273, 274], "130": [7, 109, 154, 186, 227, 235, 264], "1300": 134, "1301": 134, "1302": 134, "1303": 134, "1306": 134, "1307": 134, "1308": 134, "131": [156, 158, 256, 281], "1310": 134, "1312": 134, "1314": 134, "1316": 134, "1317": 134, "1318": 134, "1319": 134, "1321": 134, "1325": 134, "1329": 134, "1335": 134, "1336": 268, "1339": 134, "1343": 134, "1348": 134, "135": [78, 138, 199, 205, 206, 256], "1352": 271, "1355": 134, "136": 78, "1360": 134, "1369": 134, "137": 147, "1375": 271, "1376": 134, "1377": 134, "1379": 134, "138": 276, "1380": 134, "1382": 134, "1383": 134, "1386": 134, "1387": 134, "1390": 134, "1394": 134, "1396": 134, "13p": 182, "13x": 258, "14": [21, 37, 56, 82, 113, 145, 181, 190, 196, 207, 208, 210, 216, 220, 258, 260, 268, 270, 281], "140": 258, "1401": 134, "1405": 134, "1407": 134, "141": [147, 281], "1415": 134, "1418": 134, "142": 281, "1420": 134, "1423": 134, "1426": 134, "1428": 134, "1429": 134, "1430": 134, "1431": 134, "1433": 134, "1434": 134, "1438": 134, "1439": 134, "144": [148, 151, 210, 256], "1446": 134, "1448": 134, "1449": 134, "145": [0, 210, 235, 281], "1450": 134, "1451": 134, "1452": 134, "1453": 134, "14535921": 207, "1455": 134, "1456": 134, "1458": 134, "146": [147, 160], "1468873601": 80, "1469": 134, "147": [197, 205, 256], "1471": 134, "1474": 134, "1475": 134, "1476": 134, "1477": 134, "1478": 134, "1479": 134, "148": [179, 180, 256], "1484": 134, "1487": 134, "149": [160, 250, 252, 254, 256, 281], "1492": 134, "14934": 177, "1494": 134, "1496": 134, "1497": 134, "1498": 134, "1499": 134, "14p": 253, "14x": 258, "15": [5, 24, 26, 45, 46, 75, 78, 80, 82, 99, 100, 101, 104, 106, 107, 110, 111, 113, 135, 145, 150, 157, 160, 161, 163, 168, 181, 198, 201, 209, 210, 211, 221, 225, 258, 260, 264, 268, 270, 272, 275, 276, 277, 279, 283], "150": [3, 45, 103, 168, 184, 201, 226, 281], "1500": [100, 134], "1501": 134, "1502": 134, "1503": 134, "1504": 134, "150m": 154, "150x150": 154, "1510": 134, "1512": 134, "1515": 134, "1516": 134, "152": 154, "1521": 134, "1522": 134, "1526": 134, "153": 269, "1530": 134, "1531": 134, "1538": 134, "154": 45, "1540": 134, "1546": 134, "1547": 134, "1548": 134, "1554": 134, "1558403": [207, 217], "1560": 134, "1561": 134, "1562": 134, "1565": 134, "1569": 233, "157": [170, 180, 190, 226, 229, 256, 269, 278], "1573": 268, "1577": 134, "158": [251, 254, 256, 278], "1581": 134, "159": [166, 191, 192, 256], "1591": 134, "1592": 134, "159467": 236, "1598": 134, "15c": [135, 141, 145, 152, 157, 168, 176, 179, 184, 209, 218, 275], "15i": 58, "15m": [5, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86], "15p": [160, 196, 197, 285], "15x": 258, "15x15": 269, "16": [21, 26, 105, 106, 134, 211, 242, 258, 260, 273, 281], "160": [69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86], "1601": 134, "1603": 134, "1605": 271, "1607": 134, "1610": 134, "1611": 134, "1618": 134, "1634": 268, "164": 45, "1643": 134, "1648": 134, "1649": 134, "165": [45, 144, 151, 201, 205, 256], "1652": 134, "1659": 134, "166707e": 113, "1670": 134, "1673": 134, "1674": 134, "1675": 134, "1676": 134, "168": [228, 229, 256], "1685": 134, "1688": 134, "1689": 134, "1695": 134, "1696": 134, "16th": 246, "16x": 258, "17": [134, 152, 208, 211, 216, 260, 268], "170": [75, 144, 175], "1701": 134, "1711": 134, "1713": 134, "1717": 134, "1718": 134, "171875": 166, "1719": [134, 271], "1720": 134, "1721": 134, "1722": 134, "1724": 134, "1725": 134, "1726": 134, "1727": 134, "1729": 134, "1730": 134, "1731": 134, "1745": 230, "1754": 134, "1755": 134, "1756": 134, "176": [203, 205, 256], "1760": 134, "1769": 134, "177": [158, 237, 239, 256], "1770": 228, "1771": 134, "1772": [222, 227, 237], "1776": 134, "1783": 134, "1784": 134, "1785": 134, "1786": 134, "1790": 134, "1792": 134, "17x": 258, "18": [23, 45, 134, 208, 211, 216, 226, 260], "180": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 18, 23, 25, 26, 29, 31, 85, 104, 119, 131, 163, 178, 180, 182, 218, 220, 222, 228, 231, 232, 234, 241, 242, 243, 244, 245, 246, 247, 248, 256, 264, 273, 274, 276, 279, 283], "1804": 134, "1805": [134, 225, 244], "1806": 134, "1807": [100, 106], "1809": 134, "180e": 283, "180w": 283, "1815": 134, "1818": 134, "1820": 228, "1821": [134, 271], "1823": 134, "183": [100, 106], "1831": 134, "1833": 134, "1837": 134, "1838": 134, "184": [196, 205, 256], "1843": 228, "1844": 134, "1845": 134, "1846": [134, 177], "1847": 134, "1848": 134, "185": [200, 205, 256], "1857": 134, "1859": 134, "186": [164, 167, 256], "1862": 134, "18637": 18, "1866": 134, "1867": 134, "1868": 134, "1872": 134, "1883": 134, "1892": 243, "1893": 268, "1894": 134, "18p": 273, "19": [87, 134, 166, 200, 216, 226, 230, 256, 260], "190": [37, 56], "1900": 235, "1904": 247, "19049": 177, "1906": [241, 242], "1909": 134, "1913": 134, "1918": 134, "1920": 134, "1921": [134, 248], "1922": 134, "1924": 134, "193": [220, 224, 227, 229, 256], "1931": 134, "1932": 134, "1934": 134, "1935": 134, "1937": 134, "1941": 134, "1942": 234, "1945": 134, "1948602": 217, "1948603": 207, "1953": 134, "1954": 134, "1955": 134, "1956": 134, "196": [231, 239, 256], "1961": 134, "1963": [134, 245], "1964": 134, "1967": 134, "19680801": 204, "1969": 134, "1971": 134, "1972": 271, "1975": 134, "1976": 134, "1977": 134, "1978": 134, "1982": [126, 127, 128], "1984projected_crs_nam": 166, "1985": 134, "1987": 281, "1988": 134, "1990": [125, 134], "1993": 84, "1996": [84, 126, 127, 128], "1997": 23, "1998": 248, "1_alpha": 283, "1c": [24, 125, 139, 141, 143, 147, 150, 171, 172, 175, 176, 179, 191, 265, 269, 275, 282, 285], "1d": [98, 116, 134], "1i": [46, 58], "1p": [2, 9, 12, 23, 30, 141, 147, 148, 154, 155, 156, 157, 160, 163, 172, 173, 175, 177, 178, 179, 182, 184, 196, 197, 198, 200, 203, 252, 264, 265, 268, 271, 276, 278, 285], "1st": [4, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 99, 112, 114, 117, 119, 122, 125, 127, 128, 132], "2": [0, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 41, 43, 46, 49, 50, 51, 54, 57, 58, 59, 60, 61, 62, 75, 78, 85, 87, 97, 99, 102, 103, 104, 106, 108, 109, 112, 113, 114, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 132, 135, 137, 138, 139, 140, 141, 142, 144, 145, 146, 147, 148, 149, 150, 156, 157, 159, 160, 165, 166, 168, 170, 171, 172, 174, 176, 177, 178, 179, 182, 183, 184, 185, 186, 191, 192, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 206, 208, 211, 213, 214, 215, 216, 225, 230, 250, 252, 253, 256, 258, 260, 263, 265, 268, 270, 271, 272, 273, 275, 276, 278, 280, 281, 282, 283, 285], "20": [0, 11, 24, 34, 35, 36, 45, 74, 84, 102, 117, 119, 138, 146, 153, 159, 164, 166, 168, 174, 175, 176, 179, 183, 198, 211, 212, 216, 222, 228, 235, 236, 237, 260, 265, 268, 271, 275, 276, 279, 283], "200": [113, 141, 142, 143, 162, 204, 256, 265, 269], "2000": [152, 161, 267, 277], "2009": [18, 134], "201": [232, 239, 256], "2010": [198, 268], "2011": [198, 268], "2012": [198, 268], "2013": [198, 268], "2014": 268, "2015": 198, "2016": [198, 268], "2017": [217, 268], "2018": [198, 217, 268], "2019": [134, 137, 161, 163, 198, 217, 268, 269], "202": [238, 239, 256], "2020": [137, 198, 268, 269], "20200712": 268, "20200714": 268, "20200716": 268, "20200719": 268, "20200721": 268, "20200724": 268, "20200729": 268, "2021": [137, 268], "2022": [137, 216, 217], "2023": [166, 216], "2024": [137, 207, 208, 217], "204": [141, 142, 256, 269], "2046": 134, "20483793": 217, "205": [246, 249, 256], "2053": 134, "2057": 134, "206": [175, 180, 234, 239, 256], "2069": 134, "207": [245, 249, 256], "2071": 134, "2072": 134, "2076": 134, "207732e": 113, "2078": 134, "2079": 134, "2081": 134, "209": [256, 270, 274], "2091": 134, "2093": 134, "20_20": 175, "20c": 183, "20e": 283, "20m": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86], "20p": 273, "20p_20p": 178, "20th": 248, "20x": 258, "21": [18, 101, 119, 134, 185, 190, 208, 216, 226, 260, 274, 278], "210": [176, 180, 243, 249, 256], "2112": 134, "212": [161, 167, 192, 193, 242, 249, 256], "2125": 134, "2126": 134, "2131": 271, "2135": 134, "2136": 134, "2138": 134, "2139": 134, "214": [149, 151, 256], "2142": 134, "2145": 134, "2146": 134, "2147": 134, "2148": 134, "215": [236, 239, 256], "2153": 134, "2156": 271, "2158": 134, "216": [155, 158, 173, 180, 195, 205, 256], "2160": 134, "2162": 134, "217": [159, 167, 241, 249, 256], "2170": 134, "2172": 134, "2174": 134, "2177": 134, "2178": 134, "218": [244, 249, 256], "2181": 134, "219": [222, 224, 256], "2192": 134, "2196": 134, "21c": 163, "21x": 258, "22": [27, 85, 123, 190, 202, 211, 216, 235, 260, 276], "220": [233, 239, 256], "2200": 134, "2202": 134, "2205": 134, "2206": 134, "2208": 134, "2211": 134, "2213": 134, "2214": 134, "2216": 134, "2224": 134, "2226": 134, "2235": 134, "2236": 134, "2238": 134, "2239": 134, "2240": 134, "2241": 134, "2245": 271, "225": 163, "2256": 134, "226": [113, 167, 174, 180, 256], "2265": 134, "2266": 134, "2267": 134, "2270": 271, "2274": 134, "2281": 134, "22x": 258, "23": [21, 45, 56, 123, 134, 166, 208, 211, 216, 226, 260, 268, 276, 285], "230": 264, "2300000": 166, "2300009": 166, "2300029": 166, "2300048": 166, "2300068": 166, "2300087": 166, "2300107": 166, "2300126": 166, "2300146": 166, "2300166": 166, "2300185": 166, "2301": 134, "2303": 134, "2304": 134, "2305": 134, "2306": 134, "2308": 134, "2309": 134, "231": [187, 188, 189, 256], "2310": 134, "2312": 134, "2315": 134, "2317822": 166, "2317841": 166, "2317861": 166, "2317880": 166, "2317900": 166, "2317919": 166, "2317939": 166, "2317958": 166, "2317978": 166, "2317998": 166, "2318000": 166, "2318007": 166, "2321": 134, "2324": 134, "2329": 134, "2331": 134, "234": 166, "2342": 134, "234375": 166, "2345": 134, "235": 166, "2354": 134, "2355": 134, "2356": 134, "2357": 134, "236": 166, "236191e": 113, "2366": 134, "2369": 134, "237": [166, 204, 205, 221, 224, 256], "2370": 134, "2373": 134, "2375": 134, "238": 166, "2381": 134, "2383": 134, "2384": 134, "2385": 134, "2389": 134, "239": 166, "2391": [134, 271], "2394": 134, "2395": 134, "2398": 134, "2399": 134, "23x": 258, "24": [10, 23, 37, 56, 87, 101, 123, 134, 166, 171, 182, 186, 208, 216, 226, 227, 260, 262, 268, 276], "240": [166, 201], "241": 166, "2410": 134, "2417": 134, "242": 166, "2420": 134, "2425": 134, "2427": 134, "2428": 134, "243": [166, 256, 271, 274], "2433": 134, "2435": 134, "244": [166, 247, 249, 256], "2441": 134, "2443": 134, "2445": 134, "245": [34, 35, 36, 117, 248, 249, 256, 284, 285], "2450": 134, "2453": 134, "2456": 134, "2458": 134, "246": [119, 223, 224, 256], "2466": 134, "247": 119, "2473": 134, "2481": 134, "2484": 134, "2487": 134, "2488": 134, "2491": 134, "2492": 134, "2493": 134, "2496": 134, "2498": 134, "24b": 166, "24p": 58, "24x": 258, "25": [33, 45, 81, 99, 100, 101, 104, 106, 107, 110, 111, 113, 125, 134, 139, 150, 155, 157, 160, 176, 178, 186, 195, 197, 199, 204, 210, 216, 225, 235, 260, 268, 276, 277, 280, 282, 283, 285], "250": [5, 103, 113, 219, 267], "2500": 134, "2515": 134, "2520": 271, "2533": 134, "2536": 134, "2538": 276, "2546": 134, "2549": 134, "2549741829": 190, "2549765742": 190, "255": [6, 34, 35, 36, 117, 187, 190, 209, 269], "2551": 276, "2559": 134, "256": [85, 206, 269], "2563": 134, "2564": 134, "2565": 134, "2566": 134, "2569": 134, "257": 113, "2572": 134, "257223563": 166, "257223563reference_ellipsoid_nam": 166, "2573": 134, "2576": 134, "2578": 134, "258": [256, 268, 274], "2581": 134, "2582": 134, "2584": 134, "2585": 134, "258570e": 113, "2586": 134, "2587": 134, "2589": 134, "2590": 134, "2592": 134, "2595": 134, "25c": [163, 176, 204], "25p": [2, 4, 5, 8, 14, 17, 23, 26, 29, 31, 58, 160, 171, 176, 179, 182, 191, 276, 277], "25x": 258, "26": [134, 210, 238, 260], "260": 175, "2608": 134, "2612": 134, "2615": 134, "2618": 134, "2632": 134, "2634": 134, "2635": 134, "2636": 134, "2638": 134, "264": [253, 254, 256], "2641": 134, "2652": 134, "2656": 134, "265625": 166, "2660": 135, "2662": 134, "267": [180, 181, 256], "2673": 134, "2674": 134, "268": 134, "2691": 134, "2692": 134, "2694": 134, "2697": 134, "2698": 134, "26x": 258, "27": [166, 238, 260], "270": [18, 104, 162, 163, 235, 269, 276], "2706": 134, "271": [138, 140, 157, 158, 256], "2711": 134, "2713": 134, "2717": 134, "2719": 134, "2720": 134, "2722": 134, "2726": 134, "2729": 134, "2730": 134, "2739": 271, "274": [134, 211, 214, 256], "2741": 134, "2743": 134, "275": 134, "275864e": 113, "2760": 134, "2761": 134, "2762": 134, "2766": 134, "2771": 134, "2772": 134, "2773": 134, "2774": 134, "2777": 134, "278": 134, "2780": 134, "2796": 134, "27x": 258, "28": [161, 166, 260], "2800": 136, "28049495": 217, "2808": 134, "2809": 134, "2810": 134, "28125": 166, "2813": 134, "2822": 134, "2823": 134, "2826": 134, "2833": 134, "2838": 134, "284": 134, "2841": 134, "2845": 134, "2847": 134, "2849": 134, "285": 190, "2850347554": 190, "2850360149": 190, "2856": 134, "2859": 134, "286": 134, "2862": 134, "2867": 134, "287": [225, 229, 230, 239, 256], "2874": 134, "2876": 134, "2879": 134, "288": 113, "2881": 134, "2883": 134, "2884": 134, "289": 134, "2890": 134, "28c": [141, 163], "29": [182, 260, 276, 281], "290": 134, "2906": 134, "2907": 134, "2908": 134, "2917": 134, "293": 134, "2930": 134, "2933": 134, "2934": 134, "2938": 134, "2939": 134, "294": 134, "2940": 134, "2944": 134, "2945": 134, "2946": 134, "2951": 134, "2953": 134, "2957": 134, "2958": 134, "2960": 134, "2962": 134, "2963": 134, "296875": 166, "297": 134, "298": 166, "2986": 134, "2991": 134, "2992": 134, "2993": 134, "2994": 134, "2996": 134, "2999": 134, "2c": [7, 11, 12, 21, 24, 141, 146, 148, 160, 170, 171, 172, 178, 179, 181, 182, 185, 212, 253, 265, 272, 275, 285], "2d": [134, 268], "2f": [0, 45], "2g0": 156, "2g2f": 193, "2mb": 166, "2nd": [4, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 99, 112, 114, 117, 119, 122, 125, 127, 128, 132], "2p": [1, 2, 3, 11, 147, 160, 173, 178, 181, 186, 196, 199, 210, 211, 250, 251, 276, 282], "2t": 119, "2w": [21, 253], "2x2": 275, "3": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 15, 16, 18, 21, 22, 26, 29, 30, 43, 46, 49, 54, 57, 59, 60, 61, 62, 75, 78, 85, 87, 103, 106, 112, 113, 114, 116, 118, 123, 129, 130, 132, 135, 136, 138, 140, 144, 146, 147, 148, 149, 150, 157, 159, 160, 161, 162, 163, 165, 166, 169, 170, 171, 172, 176, 177, 183, 184, 185, 191, 193, 195, 196, 197, 198, 199, 201, 202, 206, 207, 208, 212, 213, 214, 215, 216, 250, 251, 252, 256, 258, 260, 263, 267, 268, 269, 271, 273, 274, 275, 276, 278, 280, 281, 282, 283, 285, 286], "30": [2, 6, 7, 26, 32, 34, 35, 36, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 98, 99, 100, 101, 104, 106, 107, 109, 110, 111, 113, 117, 138, 145, 147, 150, 153, 156, 157, 160, 162, 166, 171, 173, 174, 175, 176, 177, 179, 181, 184, 191, 202, 204, 210, 212, 219, 231, 235, 236, 237, 241, 260, 264, 268, 269, 270, 276, 277, 279, 285], "300": [17, 22, 113, 163, 199, 200], "3000": 145, "3002": 134, "301": [180, 182, 256], "3011": 134, "3015": 134, "3027": 134, "3028": 134, "303": [160, 167, 256], "3032": 134, "3034": 134, "3035": 134, "3036": 134, "3037": 134, "3039": 134, "3043": 134, "3044": 134, "3045": 134, "3048": 134, "305": 235, "3054": 134, "3057": 134, "3068": 134, "307": [171, 180, 256], "3070": 134, "308": 134, "3081": 134, "3082": 134, "3083": 134, "3085": 134, "309": [145, 151, 256], "3097": 134, "30m": [6, 7, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 98, 99, 100, 101, 104, 106, 107, 110, 111, 112, 113], "30n": 173, "30x": 258, "30x30": 269, "31": [18, 208, 260, 263, 268], "310": 218, "3102": 134, "3103": 134, "3106": 134, "3107": 134, "3108": 134, "3109": 134, "311": 134, "3110": 134, "3112": 134, "3116": 134, "3117": 134, "3119": 134, "312": 134, "3120": 134, "3127": 134, "3128": 134, "3129": 134, "313": [134, 172, 180, 256], "3131": 134, "3132": 134, "3133": 134, "3134": 134, "3136": 134, "3137": 134, "3139": 134, "314": 134, "3140": 134, "314245179inverse_flatten": 166, "3148": 134, "3149": 134, "315": [104, 139], "3151": 134, "3152": 134, "3157": 134, "3158": 134, "3163": 134, "3165": 134, "3166": [2, 283], "3174": 134, "318": 134, "3182": 134, "3184": 134, "3186": 134, "3187": 134, "3189": 134, "318e": 166, "3192": 134, "3193": 134, "3199": 134, "31x": 258, "32": [10, 134, 154, 166, 186, 260, 269], "320": 134, "3206": 134, "3207": 134, "3209": 134, "321": 134, "3213": 134, "3214": 134, "3222": 134, "3225": 134, "323": [113, 134], "323600e": 113, "324": 134, "3244": 134, "3247": 134, "3249": 134, "325": 134, "3254": 134, "3257": 134, "3260": 134, "32604": 166, "3261": 134, "3266": 134, "3267": 134, "3280": 134, "328125": 166, "3283": 134, "3286": 134, "329": 134, "3296": 134, "32x": 258, "33": [166, 182, 186, 227, 260], "330": [134, 191, 199], "331": 134, "3310": 134, "3316": 134, "3317": 134, "3319": 134, "332": [134, 147, 151, 256], "3321": [134, 182, 276], "3322": 134, "3323": 134, "3324": 134, "3326": 134, "333": 134, "3330": 134, "333333": [187, 209], "3334": 134, "3336": 134, "3338": 134, "3348": 134, "3350": 134, "3351": 134, "336": [151, 153, 256], "3360": 134, "3364": 134, "3367": 134, "3372": 134, "3376": 134, "3378": 134, "3379": 134, "338": 134, "3380": 134, "3383": 134, "3388": 134, "3389": 134, "339": [134, 150, 151, 256], "3396": 134, "33x": 258, "34": [147, 186, 198, 260, 268, 276, 281], "3401": 134, "3404": 134, "3408": 134, "3411": 134, "3413": 134, "3414": 134, "3418": 134, "3427": 134, "3428": 134, "343": 134, "3432": 134, "3438": 134, "344": 134, "3443": 134, "3446": 134, "3447": 134, "3449": 134, "3450": 134, "3455": 134, "3457": 134, "346": 205, "3460": 134, "3463": 134, "3466": 134, "3468": 136, "3469": 134, "3475": 134, "3480": 253, "34806": 177, "3482": 134, "349": 134, "3490": 134, "3492": 134, "3493": 134, "34x": 258, "35": [78, 109, 125, 134, 145, 163, 177, 186, 227, 235, 260, 264, 270, 272, 283, 285], "350": [113, 173, 202, 205, 256], "3505": 134, "3506": 134, "352": 134, "3522": 134, "3531": 134, "3533": 271, "3540": 271, "355": 134, "3553": 134, "3554": 134, "3559": 134, "356": 269, "3563": 134, "3566": 134, "3579": 134, "358": 134, "359": 134, "3592": 134, "3593": 134, "359375": 166, "3596": 134, "35n": 283, "35x": 258, "36": [78, 166, 177, 269, 276], "360": [0, 15, 16, 18, 32, 104, 125, 131, 135, 156, 233, 253, 283], "3600": 271, "3603": 134, "3606": 134, "360e": 283, "361": [134, 277], "3611": 134, "3616": 134, "3617": 134, "3619": 134, "362": [184, 188, 256], "363": 134, "3631": 134, "364": [151, 152, 256], "3647": 134, "366": [113, 269], "3661": 134, "3662": 134, "3665": 134, "3672": 134, "368": [218, 224, 256], "3685": 134, "3689": 134, "369": 134, "3693": 134, "3697": 134, "3698": 134, "36x": 258, "37": [147, 162, 182, 210, 250, 271, 276], "3703": 134, "3706": 134, "371": [139, 140, 256], "3711": 134, "371655e": 113, "3717": 134, "3718": 134, "3719": 134, "372": 192, "3722": 134, "3723": 134, "3724": 134, "3726": 134, "3727": 134, "3728": 134, "376": 134, "378": 134, "3781524": 207, "37899": 177, "37x": 258, "38": [210, 245], "383": 134, "384": 134, "385": 134, "3857": [27, 85], "386": [167, 168, 256], "38e": 166, "39": [166, 193, 208, 276, 281], "390": [162, 167, 256], "390625": 166, "395": 106, "397": 134, "398": 134, "399": [235, 239, 256], "3arrai": 166, "3c": [3, 21, 24, 147, 149, 154, 160, 170, 171, 173, 176, 181, 193, 211, 235, 250, 251, 252, 253, 268, 271, 275, 281], "3d": [134, 137], "3d_perspective_imag": [256, 264, 274], "3d_plot": [140, 256], "3e": 166, "3i": 58, "3m": 269, "3p": [24, 185], "3r": 117, "3rd": [15, 16, 31, 112, 117, 119, 139], "3x3": [125, 193], "3y": 166, "4": [0, 1, 2, 3, 4, 8, 9, 14, 15, 16, 17, 18, 22, 28, 29, 30, 31, 33, 34, 35, 36, 43, 46, 49, 57, 59, 60, 62, 74, 75, 87, 99, 103, 104, 106, 109, 112, 113, 114, 117, 119, 122, 123, 125, 127, 128, 129, 132, 139, 141, 144, 158, 162, 163, 166, 170, 171, 172, 176, 177, 178, 179, 182, 185, 193, 195, 196, 197, 198, 199, 200, 206, 208, 211, 213, 214, 215, 216, 218, 220, 229, 248, 250, 254, 256, 258, 260, 265, 266, 268, 269, 271, 273, 276, 278, 280, 281, 282, 285], "40": [103, 154, 160, 164, 166, 182, 202, 218, 235, 241, 244, 264, 271, 276, 285], "400": 113, "4000": [162, 182, 267, 276], "401": 134, "404": [134, 142], "405": 134, "408": 134, "41": [177, 182, 185, 197, 272, 276], "410": 134, "411": 134, "413": 134, "4179": 276, "419": 134, "42": [112, 150, 160, 166, 177, 182, 185, 201, 265, 276, 281], "421": 134, "421875": 166, "423": [134, 188, 190, 256, 283, 284], "424": [199, 205, 256], "425": 134, "43": [166, 209, 272], "430": 134, "432": 134, "4326": [166, 177], "434": 134, "438": 134, "44": [182, 209, 244, 276], "440": 134, "441": 134, "444": [256, 267, 274], "4455": 276, "446": 134, "45": [0, 6, 7, 104, 138, 144, 150, 163, 176, 186, 198, 199, 219, 227, 236, 237, 253, 268, 276, 283], "452": 134, "453125": 166, "454": 134, "459": 134, "45c": [173, 268], "45n": 283, "46": [147, 166, 210], "461": 134, "464": 134, "466": 134, "468": 134, "47": [37, 56, 166, 182, 191, 210, 276, 285], "470": [212, 214, 256], "471": 134, "472": [106, 134], "474": 134, "475": 134, "476": 134, "47e": 146, "48": [166, 177, 191], "480": 134, "480847": 113, "481": 134, "482": 134, "4826": [8, 97, 108, 112], "484": 134, "484375": 166, "485": 134, "488": 134, "489": 281, "49": [112, 160, 166, 191, 242, 281], "490": 134, "492": [134, 256, 265, 274], "493": [146, 151, 256], "498": 134, "4_2": 178, "4c": [24, 162, 171, 176, 181, 195, 196, 197, 198, 206, 235, 268, 271, 276], "4n": 166, "4ngrid_mapping_nam": 166, "4p": [1, 2, 3, 11, 24, 178], "4x6": 193, "5": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 41, 45, 46, 49, 56, 57, 59, 60, 62, 65, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 135, 137, 138, 139, 144, 145, 146, 147, 148, 150, 152, 154, 155, 156, 157, 160, 161, 162, 163, 164, 166, 170, 171, 172, 173, 175, 177, 178, 179, 181, 182, 183, 189, 191, 193, 195, 196, 197, 198, 199, 201, 202, 203, 204, 206, 208, 209, 210, 211, 212, 216, 235, 238, 245, 251, 252, 253, 258, 260, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 278, 279, 280, 281, 282, 283, 285], "50": [32, 33, 75, 113, 117, 157, 159, 163, 166, 172, 173, 181, 183, 199, 204, 237, 250, 265, 269, 272, 276, 281, 285], "500": [22, 100, 134, 150, 210, 267, 270, 271], "5000": 173, "500000": 166, "502": 134, "503": [134, 256, 274, 276], "506": 134, "508": 271, "509": 134, "50w": 173, "51": [87, 166, 269], "512": [85, 134], "513": 134, "515625": 166, "516": 134, "519": 134, "5199": 276, "51w": 87, "52": [0, 23, 83, 154, 166, 186, 219, 220, 223, 227, 269], "520": 134, "521": 155, "523815e": 113, "525": 134, "5260": 276, "5281": [207, 215], "529": 134, "52r": 238, "53": [0, 166, 177, 182, 208, 276], "530": 134, "531": [134, 180], "53125": 166, "53125arrai": 166, "536": 134, "537": [134, 256, 266, 274], "538": 134, "539": 134, "54": [56, 147, 166, 208, 269, 276, 281], "541": 134, "542": [134, 219, 224, 256], "544": 134, "546": 134, "546875": 166, "54p": [28, 153], "55": [2, 37, 56, 87, 104, 166, 225, 236], "550": 134, "554": 134, "555": 134, "559": [154, 158, 256], "5595": 276, "55e": 166, "55w": 87, "56": [81, 166, 198, 208, 268, 281], "560": 134, "562": 134, "5662411": 217, "567": 134, "568": 134, "57": [166, 173, 177, 220], "574": 134, "575": [106, 134], "577": 134, "578125": 166, "5786": 276, "58": [45, 166], "580": 134, "581": 134, "583": 134, "586": 134, "588": 134, "589": [134, 256, 282, 284], "58arrai": 166, "59": 166, "590": 134, "591": 134, "59215": 185, "59231": 185, "596": 134, "598": 134, "5c": [11, 24, 120, 143, 144, 145, 146, 153, 154, 156, 160, 161, 162, 164, 170, 171, 176, 179, 182, 185, 195, 197, 198, 201, 206, 211, 212, 264, 268, 269, 271, 272, 276, 278, 285], "5e": 202, "5f0": [144, 199], "5fg": 204, "5g15": 279, "5i": [46, 276], "5in": 276, "5m": [34, 35, 36, 117, 164], "5n": 173, "5p": [18, 146, 150, 152, 159, 170, 172, 175, 176, 178, 179, 182, 183, 184, 186, 189, 191, 195, 206, 211, 265, 278, 279, 280, 283, 285], "5th": [4, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 99, 112, 114, 117, 119, 122, 125, 127, 128, 132], "5w": 173, "6": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 23, 24, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 46, 49, 57, 59, 60, 62, 64, 65, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 135, 144, 145, 148, 149, 161, 162, 163, 171, 172, 177, 178, 179, 181, 188, 193, 196, 197, 198, 199, 207, 208, 210, 211, 212, 215, 216, 224, 238, 258, 260, 266, 268, 269, 270, 271, 273, 275, 276, 278, 281, 285], "60": [2, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86, 145, 166, 184, 199, 201, 202, 219, 221, 222, 238, 270, 279, 285], "600": [87, 103], "6000": [145, 160], "602": 134, "603": 134, "604": 134, "605": [256, 269, 274], "6062": [182, 276], "6067": 185, "60671": 185, "607": 134, "6084": 217, "60914": 185, "60915": 185, "61": 166, "611": 134, "614": 134, "616": [134, 185, 188, 256, 274, 275], "619": 134, "6197": 276, "62": [161, 166], "620": 134, "621": 134, "624": 134, "625": 134, "626": 134, "627": [134, 165, 167, 256], "62879": 185, "6288": 185, "6298": [182, 276], "63": 166, "630": 134, "6326": 166, "634": 134, "6356752": 166, "636": 134, "6371": 253, "6378137": 166, "639": 134, "6399944": 217, "64": [28, 166, 182, 276, 281], "640625": 166, "641": 134, "642": [134, 140], "64215": 185, "64249": 185, "64276e": 218, "643": 134, "64362": 177, "644": [134, 135], "646": 134, "648": 134, "64d6a49a19cb3a000147a65b": 166, "64d6a49a19cb3a000147a65c": 166, "64x64": 262, "65": [164, 166, 175, 195, 234, 272, 285], "650": 134, "651": 134, "654": 134, "65456": 185, "66": [166, 236], "660": 134, "661": 134, "662": [134, 212], "664": 134, "666": 134, "666666": [168, 187, 278], "667": [134, 269], "67": [166, 281], "67141": 177, "673": 134, "675": 134, "676": 134, "678": 134, "679": 134, "68": [161, 173, 209, 281], "681": 134, "6814052": 217, "682": [256, 274, 277], "684": 134, "685": 185, "68508": 185, "686": 134, "689": 134, "68n": 173, "69": [166, 209, 235, 272, 276], "695": [134, 151], "69644": 185, "69646": 185, "69715": 177, "699": 134, "6c": [149, 173, 181, 186, 203, 253, 275, 276], "6h": 268, "6p": [1, 2, 3, 8, 11, 193, 276, 285], "6x": 193, "6x4": 193, "7": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 49, 57, 59, 60, 62, 76, 85, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 139, 144, 150, 156, 160, 161, 163, 166, 170, 171, 172, 175, 178, 181, 182, 183, 186, 196, 197, 198, 199, 202, 206, 208, 211, 212, 216, 258, 260, 266, 267, 268, 269, 271, 276, 279, 280, 283, 284, 285], "70": [166, 173, 175, 186, 226, 227, 269], "700": [134, 268], "7000": [160, 163], "701": 134, "702": 134, "7030": 166, "703125": 166, "705": 134, "706": 185, "707": 134, "70714": 185, "709": [106, 134], "71": [45, 276], "712": 134, "7128": 182, "713": 134, "716": 134, "72": [166, 185, 186, 276], "720": [17, 134, 254], "721": 134, "722": 274, "723": 134, "724": 134, "725": 134, "726": 134, "727": 134, "72716": 177, "728": [134, 137], "729": 134, "73": 185, "731": 134, "736": 134, "737988": 166, "737998": 166, "738": 134, "738000": 166, "738017": 166, "738037": 166, "738056": 166, "738076": 166, "738095": 166, "738115": 166, "738134": 166, "738154": 166, "738173": 166, "739": 134, "74": [182, 185, 272], "741": 134, "742": 134, "7420": 276, "743": 134, "744": 134, "745": 134, "75": [23, 33, 175, 185, 195, 207, 208, 209], "750": [134, 173], "752": [134, 256, 281, 284], "753": 134, "754": 134, "754814": 166, "754833": 166, "754853": 166, "754873": 166, "754892": 166, "754912": 166, "754931": 166, "754951": 166, "754970": 166, "754990": 166, "755000": 166, "756": 134, "757": 134, "758": 249, "75c": [171, 176, 179, 195], "75p": [4, 5, 186], "76": 185, "760": 134, "761": 134, "762": 134, "763": 134, "7635833": 217, "765": 134, "765625": 166, "766": 134, "77": [185, 281], "772": 134, "773": 134, "774": 134, "775": 134, "777": 134, "7783": 276, "779": 134, "781": 134, "787": 134, "788": 134, "79": [134, 226, 281], "791": [134, 214], "794": 134, "795": 134, "796": 134, "796875": 166, "797": 134, "798": 134, "799": 134, "799990801": 190, "799990966": 190, "7c": [144, 148, 160, 171, 211, 273], "7kb": 166, "7p": [175, 280, 285], "8": [2, 4, 8, 9, 10, 15, 16, 18, 23, 28, 30, 31, 33, 34, 35, 36, 37, 49, 56, 57, 59, 60, 62, 99, 112, 113, 117, 119, 121, 122, 123, 125, 127, 128, 132, 137, 139, 144, 145, 150, 157, 160, 170, 172, 177, 179, 181, 182, 183, 190, 193, 196, 197, 198, 200, 206, 208, 211, 212, 216, 234, 249, 258, 260, 262, 265, 268, 271, 276, 278, 280, 281, 285], "80": [32, 109, 119, 143, 152, 181, 218, 233, 234, 272, 276, 278], "800": 134, "8000": [145, 160], "8017": 185, "80189": 185, "802": 134, "803": 134, "80363": 177, "804": 134, "805": [224, 229], "80676": 185, "808": 134, "809": 134, "80p": [207, 208], "81": 45, "810": 134, "812": 134, "8125": 166, "814": 134, "816": 185, "8165": 185, "81681": 185, "81693": 185, "82": [0, 5, 7, 123, 267, 276, 281], "820": 134, "822": 134, "823": 134, "825": [162, 271], "826": 134, "828125": 166, "831": 134, "832": 134, "835": 134, "836554": 113, "83658": 185, "838": 134, "839": 134, "84": [166, 190, 238, 281], "840016369": 190, "840070056": 190, "841": 134, "844": 185, "84469": 185, "84horizontal_datum_nam": 166, "84longitude_of_prime_meridian": 166, "85": [123, 152, 281], "851699": 113, "853": 134, "858e": 85, "859": [163, 167, 256], "859375": 166, "86": 123, "8601": 198, "861": 134, "862": 134, "865": 134, "87": [123, 182, 185, 276], "8701": 276, "870441e": 113, "871": 166, "87150": 166, "872": [134, 256, 279, 284], "873": 134, "876": 99, "878": [134, 177, 180, 256], "8781": [182, 276], "88": [135, 226], "881": 134, "882": 134, "883": 134, "8859": [26, 134, 273], "89": 281, "890": 134, "8901": 166, "890625": 166, "899955": 113, "8b": 166, "8c": [144, 145, 160, 178, 193, 195, 211, 279], "8p": [160, 186, 285], "9": [2, 9, 30, 49, 57, 59, 60, 62, 141, 144, 151, 166, 167, 170, 172, 174, 178, 196, 198, 208, 211, 212, 216, 239, 250, 258, 260, 268, 269, 271, 272, 280, 281, 283], "90": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 18, 23, 25, 26, 29, 31, 32, 85, 104, 118, 135, 163, 173, 182, 184, 191, 200, 211, 220, 221, 222, 223, 228, 230, 231, 232, 237, 241, 242, 243, 244, 245, 246, 247, 248, 253, 262, 264, 276, 281, 283], "900": 134, "9001": 166, "90109": 177, "905736": 113, "906": 134, "90e": 18, "90n": 283, "90w": [18, 173], "90x90": [161, 163], "91": 45, "910": 134, "9122": 166, "919": 134, "92": [5, 7, 267], "921875": 166, "922": 166, "922x": 166, "923": 134, "925": 134, "930": 284, "931": 134, "9375": 276, "938": 134, "94": [0, 276], "941": 134, "948": [256, 280, 284], "95": [29, 150, 152, 175, 182], "950": 134, "9511": [182, 276], "952": 134, "953125": 166, "955": 134, "959": [256, 264, 274], "960": 134, "961": 134, "965": [99, 134], "967": 188, "975": 134, "976": 134, "977": 134, "97715": 177, "981": [37, 56], "984375": 166, "9864": 185, "990": 134, "992": 134, "993": [210, 214, 256], "994": 134, "995": [134, 256, 272, 274], "996e": 85, "998": 185, "99817": 185, "999": 134, "9996": [166, 238], "9996spatial_ref": 166, "9999": [4, 8, 15, 16, 18, 29, 31, 34, 35, 36, 99, 112, 117, 119, 125, 127, 128, 132], "9c": 196, "9p": 29, "A": [0, 1, 2, 4, 5, 8, 10, 12, 14, 15, 16, 17, 18, 20, 24, 26, 27, 29, 31, 33, 37, 42, 43, 45, 46, 49, 53, 58, 59, 60, 64, 85, 97, 98, 102, 104, 108, 109, 111, 112, 114, 116, 117, 118, 119, 130, 132, 134, 135, 144, 148, 160, 171, 176, 178, 179, 181, 194, 197, 200, 202, 206, 207, 209, 210, 212, 215, 217, 219, 222, 226, 233, 235, 238, 240, 255, 257, 258, 263, 265, 270, 275, 276, 283, 285, 287], "AS": [186, 276], "As": [8, 20, 104, 114, 125, 130, 135, 162, 163, 207, 221, 227, 228, 273, 285], "At": [1, 135, 215, 281], "BY": 166, "Be": [135, 273], "Being": 207, "But": 269, "By": [3, 6, 8, 9, 11, 12, 13, 14, 15, 16, 17, 27, 30, 37, 49, 70, 72, 78, 97, 98, 103, 109, 110, 111, 112, 114, 116, 118, 122, 126, 128, 130, 132, 139, 141, 153, 173, 195, 200, 202, 207, 209, 210, 212, 262, 265, 267, 270, 271, 279, 280, 282], "For": [3, 4, 5, 6, 7, 8, 10, 14, 15, 16, 17, 18, 20, 21, 26, 28, 29, 31, 32, 33, 34, 35, 36, 43, 49, 58, 64, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 130, 132, 135, 136, 139, 148, 171, 172, 176, 178, 179, 181, 184, 196, 197, 200, 202, 206, 207, 208, 209, 215, 235, 238, 257, 258, 260, 261, 262, 265, 268, 270, 271, 273, 275, 278, 279, 280, 281, 282, 285], "IT": 186, "If": [1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 24, 25, 26, 27, 28, 29, 30, 33, 34, 35, 36, 37, 41, 43, 46, 47, 50, 51, 52, 53, 54, 56, 57, 59, 61, 62, 63, 78, 85, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 135, 136, 150, 176, 186, 207, 208, 210, 212, 215, 218, 219, 259, 267, 268, 272, 273, 275, 276, 279, 281], "In": [6, 17, 26, 29, 32, 43, 47, 97, 101, 103, 105, 112, 115, 118, 119, 125, 129, 133, 135, 136, 139, 159, 160, 161, 162, 181, 191, 197, 200, 202, 209, 210, 212, 215, 216, 217, 219, 237, 238, 248, 258, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 279, 282, 283], "It": [4, 5, 9, 12, 17, 23, 28, 30, 41, 53, 69, 70, 71, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 111, 112, 114, 115, 121, 125, 133, 135, 136, 150, 163, 186, 190, 207, 208, 209, 210, 213, 215, 217, 218, 220, 221, 222, 223, 225, 226, 228, 230, 235, 244, 245, 246, 259, 265, 266, 267, 268, 269, 270, 275, 285], "Its": [136, 247], "NO": [182, 276], "NOT": [18, 118, 119, 134], "No": [20, 24, 26, 61, 112, 118, 207, 260, 265], "Not": [33, 50, 52, 57, 123], "Of": 275, "On": [135, 207, 208, 276], "One": [15, 16, 31, 112, 117, 119, 125, 129, 276], "Or": [11, 15, 16], "Such": [6, 20, 24, 114, 132, 233], "That": 207, "The": [0, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 56, 57, 58, 59, 60, 61, 62, 63, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 97, 98, 99, 100, 101, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 115, 116, 117, 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 172, 173, 174, 175, 176, 177, 178, 181, 182, 183, 184, 185, 186, 187, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 206, 207, 208, 209, 210, 211, 212, 213, 215, 216, 217, 218, 219, 220, 221, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 258, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 275, 276, 277, 278, 279, 280, 281, 282, 283], "Then": [99, 118, 132, 177, 185, 220, 265], "There": [43, 102, 135, 144, 187, 207, 215, 235, 275, 285], "These": [15, 16, 27, 33, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 85, 86, 98, 99, 116, 123, 125, 131, 132, 133, 135, 212, 215, 217, 240, 259, 262, 268, 275, 276, 286], "To": [2, 4, 6, 8, 15, 16, 17, 18, 29, 31, 33, 34, 35, 36, 69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86, 99, 101, 108, 110, 112, 114, 117, 118, 119, 122, 125, 127, 128, 132, 135, 136, 137, 139, 141, 144, 145, 148, 150, 157, 168, 171, 176, 179, 181, 185, 195, 200, 204, 207, 208, 209, 210, 213, 215, 245, 250, 264, 265, 268, 269, 272, 273, 276, 277, 279, 280, 283, 285], "Will": [43, 49, 120, 134, 257], "With": [182, 219, 283], "_": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 258], "__doctest_skip__": 135, "__geo_interface__": 177, "__getitem__": 134, "__gmt_version__": 134, "__init__": [48, 269], "__pycache__": 134, "_build": 135, "_funcptr": 48, "_generatorcontextmanag": 60, "_gmt_dataset": [54, 61], "_gmt_grid": 54, "_io": 121, "_load_remote_dataset": 134, "_pane": 277, "_static": 165, "_validate_data_input": 134, "a0": [196, 198, 212, 268, 269], "a10": 186, "a1000": [210, 270], "a1o": 268, "a20": 179, "a2000f1000": [145, 277], "a2500": 270, "a2f1": [138, 285], "a30": [182, 219, 222, 276], "a30f7": 279, "a40": 182, "a4000f2000": 145, "a45": [138, 181], "a4f2": 163, "a50": 181, "a500": 264, "a5f1g5": 138, "a80": 181, "aafg": 143, "aall": 87, "aaron": 135, "abbrevi": 135, "abcd": [273, 275], "abcde12345": 273, "abhishek": [134, 207], "abid": [135, 207], "abil": 236, "abl": 275, "abort": [109, 119], "about": [20, 32, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 108, 112, 114, 115, 121, 134, 135, 213, 215, 225, 226, 257, 271, 276], "abov": [5, 7, 8, 14, 19, 26, 43, 74, 87, 100, 103, 104, 108, 113, 114, 125, 134, 144, 160, 198, 208, 216, 219, 266, 268, 273, 275, 277], "absolut": [8, 33, 97, 108, 112, 119, 125, 134], "accept": [17, 19, 97, 104, 134, 135, 168, 176, 186, 210, 212, 267, 268, 270, 283], "access": [20, 24, 32, 37, 48, 60, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 91, 133, 134, 136, 207, 209, 217, 259, 281], "accessor": [32, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 134], "accomplish": [135, 269], "accord": [3, 87, 99, 109, 132, 139, 163, 174, 202, 209, 275], "accordingli": [204, 276], "account": [106, 107, 135, 215], "accumul": 195, "accur": [18, 230, 238], "achiev": [228, 265], "ackground": 262, "acklei": 138, "ackley_funct": 138, "acquir": [123, 228], "across": [24, 112, 117, 133, 134, 164, 207, 217], "act": 112, "action": [134, 135, 215], "activ": [17, 20, 45, 134, 135, 145, 208, 215, 275], "acton": 185, "actual": [18, 24, 33, 43, 61, 63, 104, 108, 110, 126, 127, 128, 215, 231, 234], "ad": [0, 2, 6, 11, 17, 22, 24, 43, 50, 99, 110, 112, 113, 134, 146, 148, 150, 153, 186, 209, 211, 215, 256, 265, 268, 274, 275, 276, 277, 280, 283, 286], "adapt": [136, 207], "add": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 18, 23, 25, 26, 28, 29, 31, 33, 34, 35, 36, 49, 87, 99, 104, 106, 108, 110, 112, 114, 117, 119, 122, 125, 127, 128, 132, 134, 135, 136, 137, 138, 139, 143, 144, 146, 147, 148, 149, 150, 155, 157, 160, 164, 171, 172, 174, 175, 176, 177, 179, 185, 186, 200, 202, 208, 210, 215, 225, 264, 265, 267, 269, 275, 276, 279, 282, 283, 285], "add_offset": 166, "addionali": 285, "addit": [2, 4, 8, 15, 16, 17, 18, 19, 22, 24, 29, 31, 33, 34, 35, 36, 47, 60, 87, 98, 99, 112, 116, 117, 119, 122, 125, 127, 128, 132, 133, 135, 136, 137, 191, 200, 212, 215, 216, 261, 267, 268, 270, 273, 275, 280, 283], "addition": [98, 116, 153, 202, 212, 268, 276], "address": [209, 215, 265], "adeli": 202, "adequ": 117, "adher": 215, "adjac": [210, 275], "adjust": [4, 5, 14, 17, 21, 26, 27, 33, 34, 35, 36, 85, 103, 109, 110, 111, 112, 117, 118, 122, 123, 124, 125, 128, 132, 134, 139, 144, 148, 150, 163, 170, 171, 176, 179, 181, 191, 196, 202, 210, 211, 215, 265, 267, 275, 279, 282], "admin": 215, "administr": [134, 208], "adob": [17, 26, 273], "adopt": [134, 215, 216, 238], "advanc": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 23, 25, 26, 29, 31, 134, 135, 178, 208, 256, 274], "advantag": [215, 218], "aeiou": 135, "af": [144, 147, 150, 154, 157, 160, 166, 170, 174, 186, 198, 268, 275, 279, 285], "affect": [6, 7, 18, 42, 98, 103, 116, 124, 134, 208, 210], "affili": 134, "affin": 269, "afg": [153, 184, 186, 190, 211, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 268, 276], "africa": [186, 276], "after": [4, 6, 8, 15, 16, 18, 22, 26, 28, 29, 31, 32, 33, 34, 35, 36, 44, 53, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 99, 104, 106, 108, 109, 110, 112, 117, 119, 122, 125, 127, 128, 132, 134, 135, 136, 197, 199, 200, 208, 215, 216, 251, 252, 272, 275, 276, 279, 280], "afterward": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 207], "ag": [6, 69, 134, 159, 195, 268, 269, 276, 279, 283], "again": [120, 210, 264, 269], "against": [17, 130, 215], "agnitud": 29, "agre": 207, "agu": [134, 137, 217], "agu24": 134, "agu24workshop": 137, "aim": [133, 136], "air": [72, 134, 143], "airbnb": 185, "aitoff": [243, 248], "aki": [14, 191], "akima": 130, "al": [31, 84, 161, 163, 269], "alabel": [25, 134, 143], "alber": [0, 2, 22, 227, 229, 240, 256, 263], "algebra": 136, "algorithm": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 171, 179], "alia": [134, 135], "alias": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 29, 31, 33, 34, 35, 36, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134], "alicia": 134, "align": [26, 144, 150, 235, 264, 265], "alik": 273, "all": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 23, 24, 25, 26, 27, 29, 30, 31, 33, 34, 35, 36, 50, 52, 59, 60, 62, 70, 72, 74, 75, 78, 79, 80, 81, 82, 83, 85, 87, 93, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 133, 134, 135, 141, 148, 154, 156, 157, 161, 164, 173, 184, 190, 202, 204, 206, 207, 208, 209, 213, 215, 226, 230, 231, 232, 234, 235, 238, 240, 241, 242, 245, 246, 256, 257, 268, 271, 273, 275, 276, 280, 283, 285], "alloc": [43, 49], "allow": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 20, 22, 23, 25, 26, 27, 29, 31, 53, 64, 85, 87, 97, 100, 101, 103, 118, 131, 134, 136, 149, 150, 155, 161, 164, 165, 170, 173, 176, 177, 178, 181, 185, 190, 197, 200, 206, 208, 212, 215, 217, 253, 262, 268, 275, 276, 279, 285], "almost": [105, 106, 134], "alon": [3, 98, 116], "along": [0, 1, 2, 3, 4, 5, 6, 8, 9, 15, 16, 21, 22, 26, 30, 31, 78, 84, 112, 118, 123, 130, 134, 135, 141, 150, 163, 167, 169, 171, 176, 179, 180, 208, 225, 226, 228, 230, 233, 237, 240, 241, 242, 244, 245, 246, 247, 256, 272], "alongsid": [215, 216], "alperen": 134, "alpha": [2, 18, 108, 283], "alphabet": [134, 139, 202, 215], "alphon": 247, "alreadi": [33, 34, 35, 36, 43, 50, 51, 52, 63, 103, 109, 110, 111, 117, 118, 122, 123, 124, 125, 128, 131, 132, 135, 197, 210, 212, 215, 281], "alsatian": 227, "also": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 28, 29, 31, 34, 35, 36, 47, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 98, 99, 101, 108, 109, 110, 112, 116, 118, 119, 121, 125, 126, 128, 129, 130, 131, 133, 134, 135, 136, 141, 145, 165, 168, 171, 178, 181, 182, 185, 186, 190, 199, 200, 207, 208, 209, 212, 215, 216, 218, 243, 246, 258, 266, 268, 271, 273, 275, 276, 281, 285], "alter": 15, "altern": [1, 2, 3, 6, 7, 8, 10, 11, 15, 16, 17, 18, 20, 23, 29, 98, 99, 101, 104, 109, 112, 113, 116, 117, 118, 119, 125, 135, 168, 176, 208, 262], "although": 238, "altimetr": 78, "altitud": [74, 162, 219, 263], "alwai": [4, 7, 8, 15, 16, 18, 24, 26, 29, 31, 32, 33, 34, 35, 36, 44, 99, 106, 112, 117, 119, 122, 125, 127, 128, 132, 135, 153, 190, 215], "am": 268, "amanda": 134, "amax": 25, "amazonaw": 166, "ambient": [6, 7, 104], "ambigu": 18, "america": [2, 184, 186, 259], "american": [228, 234, 245], "amin": 25, "among": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132], "amount": [2, 15, 16, 27, 50, 85, 100, 176], "amp": [104, 163], "amplitud": 163, "an": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 31, 33, 34, 35, 36, 37, 43, 45, 49, 54, 56, 57, 59, 61, 62, 63, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 96, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 136, 138, 139, 141, 144, 146, 147, 148, 150, 160, 162, 163, 165, 166, 168, 172, 176, 177, 182, 185, 186, 190, 193, 196, 198, 199, 202, 203, 206, 207, 208, 209, 210, 212, 217, 222, 235, 240, 243, 250, 251, 252, 253, 256, 257, 266, 267, 270, 271, 274, 275, 276, 279, 281, 282, 286], "anaconda": 134, "analog": 200, "analysi": [84, 135, 136, 212, 217, 230], "analyt": [134, 136, 245], "anant": [134, 207], "anchor": [1, 3, 11, 28, 144, 148, 150, 272, 285], "andr": [134, 137, 207], "andrebelem": 137, "andr\u00e9": 134, "angl": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 23, 25, 26, 29, 30, 31, 104, 134, 138, 139, 163, 175, 176, 181, 182, 211, 219, 220, 225, 248, 253, 276, 285], "angle_in_degre": 276, "ani": [2, 4, 6, 7, 8, 15, 16, 17, 18, 19, 20, 24, 28, 29, 31, 33, 34, 35, 36, 37, 55, 60, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 98, 99, 101, 103, 109, 111, 112, 114, 116, 117, 118, 119, 120, 122, 123, 125, 127, 128, 129, 132, 134, 135, 141, 144, 166, 169, 177, 185, 207, 208, 209, 215, 217, 236, 238, 258, 275], "anim": 133, "anisotropi": 29, "annot": [1, 2, 3, 4, 5, 7, 8, 12, 24, 134, 138, 139, 141, 143, 144, 159, 160, 164, 184, 196, 197, 202, 209, 210, 211, 251, 252, 264, 265, 266, 267, 268, 270, 272, 277, 279, 283, 285], "annot_int": [4, 5], "annotcontlabel": [4, 5], "announc": [135, 215], "annual": [8, 15, 16, 18, 26, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132, 217], "anomali": [31, 72, 74, 134, 183, 200], "anoth": [1, 2, 3, 6, 8, 10, 11, 119, 233, 266, 268, 269, 272, 275, 276, 279], "answer": 135, "antarct": 137, "antarctica": [137, 186], "anti": [17, 19], "anti_alia": 19, "anti_alias": [17, 19], "antipod": [218, 236], "anymor": 134, "anyon": 215, "anyth": 135, "anywai": 135, "anywher": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132, 135], "aog": 217, "ap": 171, "ap30": 171, "apach": 136, "apart": [97, 118], "apex": [181, 276], "api": [27, 37, 38, 39, 41, 42, 44, 47, 48, 49, 53, 64, 85, 91, 129, 134, 207, 215, 257], "api_bin_vers": 47, "api_bindir": 47, "api_cor": 47, "api_datadir": 47, "api_grid_layout": 47, "api_image_layout": 47, "api_librari": 47, "api_pad": 47, "api_plugindir": 47, "api_sharedir": 47, "api_vers": 47, "app": 134, "appar": 209, "appeal": 269, "appear": [4, 5, 14, 104, 175, 178, 204, 210, 215, 220, 223, 264, 265, 268, 273, 276], "append": [1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 21, 24, 26, 29, 31, 33, 34, 35, 36, 87, 97, 98, 99, 101, 102, 103, 108, 109, 110, 111, 112, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 135, 144, 148, 150, 156, 171, 172, 176, 179, 181, 195, 199, 200, 206, 253, 262, 283], "appli": [2, 4, 5, 6, 7, 8, 9, 14, 15, 16, 18, 20, 26, 29, 30, 31, 33, 34, 35, 36, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 117, 119, 122, 123, 124, 125, 126, 127, 128, 132, 134, 135, 146, 150, 175, 181, 199, 215, 262, 266, 268, 269, 270, 272, 276], "applic": [105, 123, 134, 221, 266], "approach": [125, 135, 276], "appropri": [10, 17, 104, 129, 134, 185, 199, 209, 215, 275], "approxim": [18, 104, 206], "ar": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 41, 43, 44, 46, 47, 49, 50, 52, 53, 54, 59, 61, 63, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 139, 141, 143, 144, 145, 146, 147, 148, 150, 153, 154, 157, 163, 168, 171, 173, 176, 178, 185, 187, 190, 193, 195, 196, 197, 198, 199, 200, 201, 202, 206, 207, 208, 209, 210, 212, 213, 215, 216, 217, 218, 219, 220, 221, 225, 226, 227, 228, 230, 231, 232, 234, 235, 236, 237, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 251, 252, 253, 257, 259, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 281, 282, 285], "arab": 24, "arang": [32, 57, 138, 148, 174, 179, 182, 183, 203, 251, 252, 276, 277], "arbitrari": [4, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 99, 112, 114, 117, 118, 119, 122, 125, 127, 128, 132], "arbitrarili": [33, 34, 35, 36, 117], "arc": [5, 6, 7, 9, 15, 16, 31, 33, 34, 35, 36, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 98, 103, 109, 110, 111, 112, 117, 119, 122, 123, 124, 125, 128, 132, 154, 160, 161, 162, 163, 164, 182, 210, 225, 227, 241, 244, 247, 269, 270, 277], "arch": [87, 97, 103], "arcstyl": 182, "arcuat": 176, "area": [0, 2, 19, 22, 27, 33, 75, 78, 85, 98, 99, 101, 102, 105, 106, 107, 109, 113, 117, 119, 123, 126, 127, 128, 134, 147, 152, 160, 161, 162, 163, 166, 168, 183, 186, 190, 200, 210, 219, 220, 221, 223, 224, 226, 227, 228, 229, 230, 238, 239, 240, 243, 244, 245, 246, 247, 248, 249, 256, 262, 263, 269, 270, 271, 272, 275, 283], "area_or_point": 166, "area_thresh": [2, 109, 119, 134, 147, 173, 182, 276], "areascale_factor": 166, "aren": [135, 207], "arg": [4, 5, 6, 7, 41, 59], "args_in_kwarg": 134, "argtyp": 48, "argument": [2, 6, 7, 14, 19, 22, 27, 33, 34, 35, 36, 41, 45, 48, 56, 57, 59, 64, 97, 103, 108, 109, 110, 111, 117, 118, 119, 122, 123, 124, 125, 128, 129, 132, 134, 135, 138, 165, 168, 171, 176, 177, 179, 185, 199, 203, 209, 210, 251, 252, 258, 263, 264, 268, 270, 273, 279, 280, 282, 283, 285], "arithmet": 32, "armi": 238, "around": [1, 2, 3, 9, 10, 11, 12, 13, 26, 30, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 115, 125, 134, 147, 160, 161, 162, 163, 165, 172, 179, 207, 210, 221, 228, 265, 268, 271, 277, 281, 282], "arrai": [4, 8, 14, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 43, 45, 46, 49, 50, 51, 52, 56, 57, 59, 60, 62, 64, 75, 85, 98, 99, 112, 114, 116, 117, 119, 122, 123, 125, 127, 128, 132, 134, 136, 139, 166, 171, 175, 176, 178, 179, 182, 183, 191, 198, 199, 202, 203, 268, 276, 281, 282], "array_to_datetim": 134, "arrow": [0, 22, 29, 136, 169, 176, 181, 182, 192, 256, 276], "arthur": 245, "artifact": [134, 215], "artifici": 7, "as_arrai": 134, "as_c_contigu": 134, "asarrai": 134, "ascii": [0, 1, 4, 8, 15, 18, 22, 25, 26, 29, 31, 33, 34, 35, 36, 97, 99, 105, 106, 112, 114, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 134, 135, 148, 168, 256, 260, 261, 274, 286], "ascontiguousarrai": [50, 51, 52, 134], "asia": 186, "asid": [20, 24, 268], "ask": [135, 207, 215], "aspati": [15, 16, 26, 33, 34, 35, 36, 112, 114, 117, 125, 134, 185], "aspect": [17, 104, 136, 261, 265, 268, 269], "asscoiat": 19, "assembl": 135, "assert": [0, 54, 61, 62, 63], "asset": [134, 215], "assign": [6, 32, 33, 48, 98, 109, 116, 117, 123, 132, 134, 164, 174, 215, 271], "associ": [49, 131, 134, 174, 270], "assort": 136, "assum": [3, 11, 21, 27, 33, 34, 35, 36, 43, 85, 103, 104, 109, 110, 111, 112, 117, 118, 120, 122, 123, 124, 125, 128, 131, 132, 213], "assumpt": [58, 118, 207], "assur": 207, "ast": 29, "asterisk": [135, 136, 206], "astroid": 197, "astronom": [23, 152, 244], "astyp": [139, 202], "asymmetr": [3, 172], "atkinson": 134, "atla": [236, 248], "atlant": 269, "atop": 173, "attach": [50, 51, 52], "attempt": 259, "attrib": [29, 178], "attribut": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 14, 15, 16, 18, 23, 24, 25, 26, 29, 30, 31, 32, 37, 42, 44, 53, 64, 130, 134, 136, 138, 166, 178, 181, 182, 185, 211, 275, 276], "aug": [134, 166], "august": 166, "ault": 176, "auth": 135, "authent": 135, "author": [134, 166, 207, 215, 257], "authorship": [134, 215], "autic": [15, 16, 31, 112, 117, 119], "auto": [27, 85, 134, 197], "autocomplet": 134, "autodoc": 135, "autolabel": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 20, 23, 24, 25, 26, 29, 31, 145, 275], "autom": [133, 135, 215], "automat": [3, 6, 8, 12, 14, 15, 16, 17, 19, 20, 24, 25, 27, 29, 32, 37, 49, 60, 85, 98, 109, 112, 116, 119, 133, 134, 135, 139, 145, 147, 148, 157, 184, 187, 189, 209, 215, 265, 275, 279, 281, 282], "avail": [1, 2, 4, 5, 6, 7, 15, 22, 23, 24, 33, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 117, 119, 122, 123, 124, 125, 128, 132, 134, 135, 144, 148, 186, 190, 200, 209, 210, 212, 215, 235, 240, 253, 257, 258, 270], "avantgard": 260, "averag": [6, 33, 34, 35, 36, 87, 97, 104, 110, 112, 117, 154, 248], "avoid": [6, 22, 110, 125, 130, 134, 135, 136, 164, 208, 218, 234, 259, 273], "awai": [26, 125, 134, 222, 228, 230, 237, 238], "awar": 135, "awk": 135, "ax": [0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 14, 15, 16, 18, 22, 23, 24, 25, 29, 31, 65, 118, 134, 138, 142, 144, 169, 209, 211, 256, 264, 272, 279, 283], "axi": [1, 3, 7, 8, 14, 16, 24, 29, 118, 134, 138, 139, 141, 155, 157, 166, 198, 210, 211, 235, 251, 252, 253, 264, 265, 268, 270, 272, 275, 276, 277, 283], "az": 112, "az0": [18, 156], "az1": [18, 156], "azi": 163, "azim": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 18, 23, 25, 26, 29, 31, 104, 224, 256], "azim2": 104, "azim_equidist": [218, 224, 256], "azim_general_perspect": [219, 224, 256], "azim_general_stereograph": [220, 224, 256], "azim_gnomon": [221, 224, 256], "azim_lambert": [222, 224, 256], "azim_orthograph": [223, 224, 256], "azimuth": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 22, 23, 24, 25, 26, 29, 30, 31, 65, 78, 84, 104, 112, 116, 118, 134, 138, 139, 146, 156, 162, 167, 169, 186, 199, 219, 220, 224, 233, 253, 256, 263, 264, 269], "azimuthc": 112, "azor": 210, "azur": [134, 208, 209], "azure1": 147, "b": [1, 2, 3, 4, 5, 6, 7, 8, 10, 14, 15, 16, 17, 18, 23, 24, 25, 26, 27, 28, 29, 31, 33, 34, 35, 36, 46, 87, 97, 98, 99, 103, 104, 108, 110, 111, 112, 114, 116, 117, 118, 119, 122, 125, 127, 128, 132, 141, 144, 150, 160, 163, 172, 176, 181, 187, 195, 200, 209, 225, 235, 258, 262, 263, 265, 269, 275, 276, 279, 285], "b0": 195, "b018": 166, "b1": 195, "b1c": 195, "b2": 195, "b7": 269, "ba": 181, "back": [6, 22, 98, 110, 116, 118, 134, 136, 262], "backend": 217, "background": [1, 2, 3, 6, 10, 11, 12, 16, 19, 98, 116, 155, 156, 200, 262, 265, 269], "bacon": 134, "bad": [135, 215], "badg": [134, 215], "baf": 46, "bafg": 143, "baja": [34, 35, 36, 84, 119], "balanc": 112, "band": [27, 43, 47, 85, 134, 136, 166, 195, 238, 269], "bandpandasindexpandasindex": 166, "banerje": 134, "bar": [0, 1, 2, 3, 8, 15, 18, 20, 22, 24, 29, 31, 65, 116, 117, 134, 135, 151, 155, 157, 169, 171, 174, 181, 183, 200, 205, 256, 264], "barscal": 29, "bartholomew": 248, "barwidth": [8, 265], "base": [1, 6, 7, 16, 17, 21, 27, 29, 33, 43, 85, 93, 98, 105, 107, 112, 116, 119, 126, 127, 128, 131, 133, 134, 135, 136, 141, 143, 147, 150, 160, 162, 170, 172, 185, 191, 195, 198, 208, 211, 215, 240, 269, 270], "baselin": [134, 135, 215, 265], "basemap": [0, 3, 9, 21, 27, 30, 41, 46, 85, 120, 134, 135, 136, 141, 142, 144, 147, 148, 149, 150, 153, 157, 160, 161, 164, 165, 168, 170, 171, 172, 173, 174, 175, 176, 178, 179, 181, 183, 184, 185, 187, 189, 190, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 211, 212, 250, 251, 252, 253, 256, 266, 273, 275, 278, 279, 280, 281, 282, 285], "bash": 208, "bashrc": 208, "basi": [29, 216], "basic": [0, 1, 5, 6, 7, 15, 22, 26, 33, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 117, 122, 123, 124, 125, 128, 132, 134, 135, 136, 160, 169, 205, 209, 210, 213, 215, 256, 266, 268, 284], "basic_symbol": [196, 205, 256], "bathymetr": [84, 102, 117, 161], "bathymetri": [34, 35, 36, 78, 84, 112, 117, 119, 168, 210], "batlow": [143, 144, 154, 164, 174, 269], "bb_style": [17, 19, 22], "bc": [6, 7, 26, 28, 104, 110, 111, 112, 144, 181, 276, 285], "beachbal": [14, 134, 191], "beaglei": 134, "beam": 135, "beauti": [137, 207], "becaus": [40, 41, 49, 87, 103, 109, 119, 130, 228, 236, 281], "becki": 134, "becom": [215, 257], "been": [33, 34, 35, 36, 46, 103, 109, 110, 111, 117, 118, 122, 123, 124, 125, 128, 132, 207, 209, 213, 217, 227, 233, 238, 246, 271, 272], "befor": [3, 20, 22, 27, 29, 32, 37, 42, 44, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 98, 101, 116, 119, 126, 127, 128, 131, 134, 135, 208, 215, 228, 257, 265, 268, 275], "begin": [24, 98, 116, 135, 176, 181, 210, 268, 276], "beginn": 135, "behav": 230, "behavior": [98, 116, 129, 132, 134, 259, 269], "behaviour": 215, "behind": [13, 14, 17, 44, 135], "being": [4, 5, 8, 15, 16, 26, 96, 105, 106, 135, 148, 208, 209, 215, 244, 246, 268, 281, 282], "belem": [134, 137, 207], "belong": [15, 132], "below": [2, 5, 8, 14, 15, 16, 25, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 100, 113, 130, 135, 136, 137, 139, 161, 162, 163, 166, 175, 184, 185, 193, 202, 208, 209, 211, 215, 258, 260, 262, 263, 264, 266, 267, 270, 272, 275, 276, 279], "benchmark": 134, "beneath": [8, 13], "benefit": 215, "beren": 18, "besid": [19, 133, 171, 197, 212, 282], "best": [14, 109, 125, 134, 135, 212, 216, 230], "better": [118, 128, 134, 135, 145, 233], "between": [1, 2, 3, 6, 7, 8, 11, 15, 16, 20, 24, 26, 27, 29, 31, 43, 85, 100, 108, 109, 110, 111, 112, 113, 117, 118, 119, 125, 130, 131, 132, 133, 135, 145, 152, 156, 170, 174, 176, 178, 179, 208, 210, 215, 225, 226, 230, 234, 238, 248, 253, 268, 271, 275, 278, 280, 282, 285], "bevel": 175, "beyond": [75, 98, 116, 118, 119, 125, 133, 207, 217, 225], "bgap": [1, 2, 3, 11], "bi": [4, 6, 8, 15, 16, 18, 31, 33, 34, 35, 36, 46, 99, 110, 112, 117, 119, 122, 125, 127, 128, 132, 181], "bibtex": [134, 207, 215], "bicub": [6, 7, 102, 104, 110, 111, 112], "big": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132, 136], "bigger": 134, "bilinear": [6, 7, 104, 110, 111, 112], "bill": 202, "bill_depth_mm": 202, "bill_length_mm": 202, "bin": [8, 18, 33, 34, 35, 36, 106, 119, 131, 154, 155, 156, 208, 265], "bin_id": [106, 271], "binari": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 47, 99, 112, 117, 119, 122, 123, 125, 127, 128, 130, 131, 132, 134, 208], "bind": 136, "binder": [134, 207], "binstat": 134, "binwidth": 265, "bisque4": [241, 242, 243, 244, 245, 246, 247, 248], "bit": [0, 1, 2, 6, 8, 10, 14, 15, 17, 18, 22, 23, 25, 26, 29, 31, 134, 169, 205, 256, 258, 261], "bit_color": 134, "bitcolor": [6, 10, 134], "bl": [3, 11, 26, 28, 144, 153, 272, 285], "blabel": [25, 134, 143], "black": [2, 4, 5, 6, 8, 9, 12, 14, 17, 23, 26, 28, 29, 30, 31, 45, 67, 134, 153, 154, 160, 171, 175, 178, 182, 184, 186, 189, 191, 196, 197, 199, 200, 201, 206, 212, 250, 251, 252, 253, 262, 265, 266, 271, 272, 276, 278, 280, 281, 282, 285], "blackdoc": 134, "blank": [4, 8, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 99, 102, 106, 112, 117, 119, 122, 125, 127, 128, 132], "blob": [135, 215], "block": [4, 8, 15, 16, 18, 22, 26, 29, 31, 33, 34, 35, 36, 37, 42, 44, 49, 56, 57, 59, 99, 106, 112, 117, 119, 122, 125, 127, 128, 132, 133, 134, 135, 136, 154], "blockm": [134, 154, 158, 256], "blockmean": [0, 2, 3, 6, 15, 21, 22, 84, 125, 132, 134, 158, 169, 256], "blockmedian": [125, 134], "blockmod": [125, 134], "blue": [9, 30, 68, 134, 141, 147, 152, 166, 171, 178, 179, 182, 183, 184, 186, 187, 203, 212, 268, 269, 272, 285], "bmax": 25, "bmin": 25, "bmp": [17, 19], "bmt": 112, "bo": 46, "bodi": [202, 209, 278], "body_mass_g": 202, "bokeh": 217, "bold": [26, 135, 153, 171, 176, 179, 181, 182, 196, 197, 200, 206, 207, 208, 260, 273, 285], "boldital": 260, "boldobliqu": 260, "bolshoi": 236, "book": 260, "bookman": 260, "bookobliqu": 260, "bool": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 29, 30, 31, 33, 34, 35, 36, 46, 60, 72, 78, 85, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132], "boolean": [134, 135, 209], "border": [0, 1, 2, 3, 7, 10, 11, 12, 13, 21, 22, 109, 146, 165, 177, 182, 184, 186, 188, 209, 210, 243, 256, 268, 272, 276, 283, 284, 286], "bordervalu": 109, "borneo": 285, "bot": [134, 215], "both": [3, 4, 5, 11, 14, 15, 16, 17, 20, 24, 29, 41, 103, 111, 112, 123, 125, 130, 132, 134, 135, 136, 148, 150, 181, 209, 215, 219, 235, 265, 268, 272, 279, 283], "bottom": [3, 11, 24, 26, 28, 135, 141, 144, 147, 148, 150, 153, 160, 175, 209, 235, 253, 268, 272, 275, 277, 279, 283], "bottomcent": 285, "bottomleft": 285, "bottomright": [150, 285], "boulevard": 185, "bound": [0, 11, 17, 21, 27, 85, 108, 112, 125, 136, 139, 144, 148, 150, 160, 172, 202, 272, 281, 283, 285], "boundari": [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 18, 22, 23, 24, 26, 29, 31, 88, 89, 98, 99, 101, 109, 112, 116, 125, 126, 127, 128, 169, 188, 210, 211, 256, 272, 279, 283], "boundingbox": [10, 17], "bow": 87, "box": [0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 17, 21, 24, 26, 27, 28, 85, 103, 108, 134, 141, 144, 146, 147, 148, 150, 160, 165, 176, 179, 272, 283], "boxcar": [87, 97], "bq": 268, "br": [26, 28, 147, 148, 160, 225, 285], "bracket": [104, 108, 135], "branch": [134, 135, 216], "brandan": 244, "braun": 236, "brazil": 225, "break": [4, 8, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 99, 106, 112, 117, 119, 122, 125, 127, 128, 132, 134, 135, 253], "bred3": 200, "bridg": 135, "brief": 215, "briefli": 215, "bright": [104, 163], "brightest": 152, "bring": 217, "britain": 186, "broken": [134, 135], "brook": 134, "brown": [146, 171], "brows": 135, "browser": [22, 134, 135], "bsd": 207, "bt": 181, "bubbl": 14, "buchi": 134, "buffer": 134, "bug": [121, 215], "bugfix": [134, 135], "build": [3, 6, 8, 14, 15, 16, 22, 25, 29, 98, 116, 134, 136, 159, 172, 207, 208, 215, 217, 257, 259], "build_arg_list": 134, "build_arg_str": 134, "built": [32, 98, 116, 133, 134, 135, 136, 171, 197, 198, 268], "bump": 134, "buseck": 134, "busi": 268, "butt": 175, "button": [135, 215, 277], "bwhite": 265, "bwsen": 41, "bx": 118, "bypass": 20, "byte": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 115, 117, 119, 122, 125, 127, 128, 132], "c": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 25, 26, 27, 28, 29, 31, 33, 34, 35, 36, 37, 42, 43, 44, 48, 50, 51, 52, 53, 56, 57, 58, 59, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 136, 138, 139, 144, 150, 168, 171, 173, 176, 179, 181, 196, 202, 204, 207, 208, 225, 230, 235, 258, 263, 268, 275, 276, 278, 281, 285], "c0": [141, 143, 148, 154, 157, 168, 170, 172, 174, 175, 179, 196, 198, 203, 211, 212, 252, 268, 281], "c1c": 211, "c20": 102, "c47": 230, "c_int": 48, "c_void_p": [37, 42, 43, 48, 49, 50, 51, 52, 64], "ca": [144, 276], "cach": [84, 129, 134, 135, 185, 215, 281], "cache_data": [134, 215], "cadeli": 202, "cafg": 143, "calcul": [0, 3, 6, 21, 22, 24, 33, 34, 35, 36, 65, 78, 87, 103, 104, 110, 112, 113, 116, 118, 123, 126, 127, 128, 130, 131, 132, 135, 147, 154, 157, 167, 169, 256, 265], "calendar": [250, 259], "california": [34, 35, 36, 84, 119], "call": [2, 3, 6, 7, 11, 20, 37, 38, 39, 41, 42, 43, 44, 46, 53, 56, 57, 59, 98, 108, 116, 117, 120, 131, 133, 134, 135, 146, 147, 171, 176, 179, 207, 208, 209, 230, 233, 246, 267, 272, 273, 275, 279], "call_modul": [37, 46, 49, 54, 56, 57, 59, 60, 61, 62, 63, 133, 134], "callabl": 48, "callback": 134, "can": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 41, 42, 43, 44, 45, 49, 51, 56, 57, 59, 60, 62, 63, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 98, 99, 101, 102, 103, 104, 105, 106, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 138, 139, 141, 143, 144, 147, 148, 150, 152, 153, 155, 156, 157, 159, 160, 165, 166, 168, 169, 170, 171, 172, 173, 174, 175, 176, 178, 181, 182, 183, 184, 185, 186, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 206, 207, 208, 209, 210, 211, 212, 215, 217, 219, 223, 232, 236, 238, 258, 259, 260, 262, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "canal": 2, "cancel": 134, "cannot": [6, 18, 98, 108, 110, 116, 118, 119, 123, 273], "canva": [19, 275], "cap": [0, 1, 15, 21, 22, 26, 65, 134, 169, 180, 256], "capabl": 217, "capit": [200, 268, 273], "caption": 18, "car": 103, "card": 134, "care": [118, 135, 208, 265], "carefulli": 135, "carocamargo": 134, "carri": 104, "carr\u00e9": 232, "cartesian": [0, 1, 2, 8, 9, 12, 15, 16, 20, 21, 22, 26, 27, 30, 32, 87, 89, 99, 103, 104, 108, 112, 118, 119, 123, 126, 127, 128, 130, 131, 133, 134, 160, 161, 163, 169, 180, 181, 201, 240, 254, 256, 263, 269, 274, 279, 280, 282, 286], "cartesian_histogram": [256, 265, 274], "cartesian_linear": [250, 254, 256], "cartesian_logarithm": [251, 254, 256], "cartesian_pow": [252, 254, 256], "cartodb": 190, "cartograph": [228, 233, 241, 242, 245], "case": [4, 6, 8, 15, 16, 17, 18, 26, 29, 31, 32, 34, 35, 36, 97, 99, 101, 104, 105, 109, 112, 114, 115, 117, 118, 119, 125, 127, 128, 129, 132, 134, 135, 141, 150, 160, 171, 172, 176, 179, 199, 210, 215, 235, 238, 250, 251, 252, 253, 262, 265, 268, 269, 271, 273, 275, 279, 281], "cassini": [0, 2, 22, 239, 240, 256, 263], "cast": 54, "cat": [139, 202], "catch": 135, "categor": [98, 116, 134, 139, 144, 164, 174, 202, 259], "categori": [0, 1, 3, 15, 22, 98, 114, 116, 134, 139, 164, 169, 205, 256], "caucasu": 163, "cauchi": [104, 163], "caus": [125, 135, 208, 276], "cautiou": 273, "cb_annot": 202, "cborder": 109, "cc": [166, 202, 281], "cd": 135, "cdf": 98, "cdll": 48, "ceil": [17, 157], "celeb": 285, "cell": [109, 119, 125, 271], "center": [1, 2, 3, 8, 14, 18, 26, 110, 112, 117, 118, 123, 144, 146, 157, 160, 165, 173, 176, 179, 182, 204, 209, 218, 219, 220, 221, 222, 223, 225, 226, 227, 230, 231, 237, 253, 271, 272, 277, 283, 285], "centimet": [2, 11, 21, 25, 26, 31, 110, 119, 135, 138, 139, 141, 143, 148, 150, 157, 160, 171, 172, 179, 183, 191, 200, 202, 209, 250, 251, 252, 264, 265, 268, 269, 270, 272, 276, 277, 281, 283, 285], "central": [8, 228, 230, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 277], "central_lon": 277, "central_meridian": 166, "centuri": [246, 248], "certain": [10, 100, 134, 163, 218], "certainli": 236, "cf": [4, 5, 29, 134], "cff": [134, 215], "cflrsz": 119, "chain": 276, "chanc": [135, 218], "chang": [3, 8, 10, 11, 13, 14, 15, 16, 17, 18, 21, 22, 26, 28, 31, 40, 65, 98, 99, 102, 105, 107, 109, 110, 111, 112, 116, 117, 119, 125, 132, 134, 135, 141, 150, 175, 195, 200, 206, 208, 209, 210, 215, 238, 264, 266, 276, 285], "channel": [207, 208], "char": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132, 134], "charact": [2, 3, 4, 5, 11, 21, 26, 28, 41, 99, 112, 132, 134, 135, 144, 150, 206, 260, 261, 268, 273, 283, 285], "charset": 134, "chart": [0, 2, 15, 22, 65, 114, 250, 256, 274, 286], "chauhan": 134, "cheatsheet": 135, "check": [46, 101, 134, 135, 207, 208, 215, 276, 285], "check_figures_equ": 134, "check_kind": [55, 60], "checklist": 134, "checkout": 135, "chi": [182, 276], "chicago": [185, 276], "china": [160, 285], "chinstrap": 202, "choic": [7, 14, 46, 98, 112, 128, 248], "choos": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 60, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 120, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 138, 150, 155, 160, 184, 212, 265], "choropleth": [0, 1, 3, 15, 22, 116, 134, 169, 188, 256, 282], "choropleth_map": [185, 188, 256], "chosen": [2, 15, 16, 26, 27, 85, 109, 112, 117, 126, 127, 128, 176, 276, 282, 285], "chri": 135, "ci": [134, 215], "ci_doc": 215, "ci_doctest": 215, "ci_test": 215, "ci_tests_dev": 215, "ci_tests_legaci": 215, "circ_subregion": 101, "circl": [0, 1, 2, 14, 15, 16, 18, 22, 33, 58, 87, 101, 103, 112, 117, 118, 119, 131, 134, 143, 156, 157, 160, 168, 169, 171, 175, 176, 180, 181, 196, 202, 204, 221, 225, 227, 247, 252, 253, 256, 268, 276, 281], "circstat": 18, "circular": [0, 2, 15, 18, 22, 26, 112, 117, 169, 180, 256], "circular_vector": 276, "circular_vector_1": 276, "circular_vector_2": 276, "circumfer": [14, 29], "citat": [134, 207, 215], "cite": 135, "citi": [98, 116], "civil": [23, 152], "cl": [4, 5, 15, 29], "clabel": [25, 134, 143], "clair": 134, "clarifi": 134, "class": [0, 32, 37, 48, 65, 88, 89, 93, 105, 126, 134, 135, 136, 141, 185, 209, 271, 277, 279, 285], "claudio": 134, "claudiu": 226, "claus": 207, "clean": [0, 37, 134, 135, 165], "cleanup": [103, 285], "clear": [210, 265], "clearanc": [1, 2, 3, 10, 11, 12, 20, 24, 26, 285], "clearli": 215, "clever": 135, "clib": [133, 134], "clib_full_nam": 134, "click": [135, 169, 215], "clip": [0, 1, 3, 4, 6, 9, 11, 15, 16, 21, 22, 26, 30, 78, 100, 160, 164, 167, 169, 202, 218, 251, 252, 256], "clip_box": 166, "clock": [25, 132], "clockwis": [25, 26, 29, 104, 118, 171, 179, 181, 199, 219, 253, 276, 285], "clone": 135, "close": [15, 16, 33, 49, 56, 57, 59, 115, 117, 118, 119, 128, 160, 172, 202, 215, 225], "closer": [27, 85, 130, 190], "closest": [14, 117, 118], "cloud": 166, "cluster": [105, 106], "cm": [3, 5, 6, 7, 12, 14, 18, 20, 21, 24, 139, 144, 145, 146, 147, 149, 156, 161, 162, 165, 166, 168, 176, 196, 201, 202, 204, 206, 209, 253, 275, 276, 285], "cmap": [3, 6, 7, 8, 14, 15, 16, 18, 25, 29, 69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86, 98, 116, 134, 135, 138, 139, 143, 144, 145, 154, 160, 161, 162, 163, 164, 168, 174, 185, 195, 202, 210, 264, 267, 269, 270, 271, 277, 281], "cmax": 25, "cmin": 25, "cml": 134, "cmt": 14, "cmyk": [98, 116], "cn": 56, "cne": [76, 77, 134], "co": [32, 87, 97, 103, 104, 138, 148, 183, 217], "co2": 84, "coard": 130, "coarser": 125, "coast": [11, 23, 41, 45, 134, 146, 147, 150, 152, 153, 154, 168, 173, 177, 182, 184, 186, 187, 189, 191, 200, 207, 208, 209, 210, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 266, 272, 275, 276, 277, 278, 279, 281, 283, 285], "coastlin": [0, 1, 2, 21, 22, 71, 109, 119, 135, 209, 256, 272, 277, 279, 284, 286], "code": [0, 2, 3, 11, 15, 16, 25, 26, 28, 37, 41, 45, 64, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 97, 98, 116, 134, 136, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 209, 210, 211, 212, 215, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 257, 258, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 285], "code1": 2, "code2": 2, "code_of_conduct": 134, "codebas": 135, "codecov": 134, "codespel": 134, "codi": 134, "codspe": [134, 215], "coe": [130, 131], "coeffici": [97, 122], "coexist": 134, "cog": 166, "col": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 20, 23, 25, 26, 29, 31, 33, 34, 35, 36, 43, 99, 112, 114, 117, 119, 125, 127, 128, 132, 275], "col1": 62, "col2": 62, "col3": 62, "colab": [134, 137], "colat": 118, "colatitud": 118, "colinfo": [1, 4, 5, 6, 7, 15, 16, 26, 31, 34, 35, 36, 99, 101, 103, 104, 108, 111, 112, 114, 117, 118, 119, 125, 127, 128, 132], "collabor": [135, 215], "collaps": 215, "collect": [135, 137, 215], "colobar": 160, "colon": [171, 179], "color": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16, 17, 18, 22, 23, 25, 26, 28, 29, 30, 31, 69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86, 98, 114, 116, 134, 139, 143, 144, 146, 147, 150, 152, 155, 156, 157, 160, 163, 164, 166, 168, 169, 170, 171, 172, 175, 178, 179, 180, 183, 184, 186, 188, 191, 195, 196, 197, 200, 205, 206, 207, 208, 211, 251, 252, 256, 262, 264, 265, 269, 272, 276, 277, 278, 280, 281, 282, 283, 285], "color1": [3, 6, 8, 14, 15, 16, 25, 29], "color2": [3, 6, 8, 14, 15, 16, 25, 29], "color3": [3, 6, 8, 14, 15, 16, 25, 29], "color_background": [65, 98, 116], "color_cpt": 65, "color_foreground": [65, 98, 116, 135], "color_hsv_max_": 65, "color_hsv_max_v": 65, "color_hsv_min_": 65, "color_hsv_min_v": 65, "color_model": [65, 98, 116, 139, 144, 164, 174, 202], "color_nan": [65, 98, 116, 269], "color_set": 65, "colorbar": [0, 1, 21, 22, 116, 134, 135, 138, 139, 143, 145, 151, 154, 160, 161, 162, 163, 164, 169, 174, 185, 202, 256, 264, 267, 269, 270, 271, 277, 279, 281], "colorbars_multipl": [145, 151, 256], "colorblind": 134, "colormap": [0, 3, 6, 15, 16, 20, 22, 24, 78, 98, 105, 106, 116, 134, 139, 143, 144, 151, 163, 164, 169, 185, 202, 256, 269, 271, 277, 281], "colour": [98, 116], "coltext": 62, "coltyp": [1, 4, 5, 6, 7, 15, 16, 26, 31, 34, 35, 36, 99, 101, 103, 104, 108, 111, 112, 114, 117, 118, 119, 125, 127, 128, 132, 134, 268], "column": [1, 4, 5, 6, 7, 8, 14, 15, 16, 18, 20, 24, 25, 26, 29, 31, 33, 34, 35, 36, 43, 46, 49, 51, 52, 59, 60, 62, 97, 99, 101, 103, 104, 106, 108, 111, 112, 114, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 134, 139, 143, 144, 145, 147, 148, 154, 156, 159, 160, 163, 168, 172, 177, 185, 202, 212, 215, 268, 275, 277, 285], "column_nam": 62, "column_stack": [182, 276], "columnar": 136, "com": [134, 135, 137, 139, 166, 202, 215], "combin": [4, 8, 14, 15, 16, 17, 18, 26, 28, 29, 31, 33, 34, 35, 36, 98, 99, 112, 114, 116, 117, 118, 119, 122, 125, 127, 128, 130, 132, 134, 135, 144, 157, 166, 178, 208, 211, 265], "combit": 130, "come": [2, 51, 207, 268, 278, 281], "comma": [2, 3, 4, 6, 8, 14, 15, 16, 18, 25, 29, 31, 33, 34, 35, 36, 98, 99, 112, 114, 116, 117, 119, 122, 125, 127, 128, 132, 134, 144, 186, 282], "command": [1, 2, 17, 18, 20, 26, 126, 127, 128, 133, 134, 135, 136, 174, 207, 208, 215, 217, 266, 275], "comment": [4, 8, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 58, 99, 106, 112, 117, 119, 122, 125, 127, 128, 132, 134, 207], "commit": [134, 135, 215], "common": [20, 24, 46, 99, 105, 134, 135, 141, 150, 161, 225, 227, 232, 265, 269, 270, 275], "common_opt": 134, "commun": [37, 134, 185, 207, 215, 257], "companion": [19, 134], "compar": [119, 134, 135, 218], "comparison": [134, 135, 271], "compass": 1, "compat": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 216], "compens": 18, "compil": [156, 208], "complet": [104, 129, 134, 135, 195, 200, 208, 257, 273, 285, 286], "complex": [135, 230, 235, 237, 243, 275], "complic": [135, 148], "compon": [14, 15, 16, 25, 29, 70, 135, 136, 143, 191, 261], "compos": 85, "composit": 84, "comprehens": 134, "compress": [14, 191], "compression": 29, "compressionfil": [14, 191, 200], "compromis": [226, 230, 234, 248], "comput": [18, 21, 22, 33, 43, 87, 99, 103, 104, 112, 113, 114, 117, 118, 123, 130, 132, 136, 208, 271], "compute_bin": [105, 134, 271], "concaten": 265, "concav": 26, "concentr": 225, "concept": [209, 210, 213, 268, 276], "concert": 112, "concis": [135, 136], "concurr": 134, "conda": [134, 135, 207], "condit": [112, 125, 126, 127, 128, 134], "conduct": [134, 135], "cone": 228, "conf": [65, 98, 116, 134, 245, 266], "confer": [134, 137, 217], "confid": [0, 18, 22, 29, 112, 135, 169, 192, 256], "config": [134, 135, 141, 150, 162, 163, 166, 175, 208, 215, 253, 266, 268, 269, 271, 276], "configur": [0, 1, 2, 10, 21, 22, 44, 47, 65, 134, 135, 162, 163, 208, 215, 235, 256, 268, 271, 274, 275, 278, 286], "conflict": 208, "conform": [0, 2, 22, 220, 221, 223, 226, 228, 229, 230, 231, 233, 234, 238, 240, 245, 247, 248, 256, 263], "conic": [0, 2, 22, 228, 229, 256, 263], "conic_alb": [225, 229, 256], "conic_equidist": [226, 229, 256], "conic_lambert": [227, 229, 256], "conjunct": [112, 118], "connect": [0, 1, 15, 16, 21, 22, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 112, 126, 127, 128, 134, 169, 180, 233, 256, 277, 282], "connection_lin": [170, 180, 256], "conor": 134, "consecut": [15, 16, 31, 112, 117, 119], "consequ": [221, 228], "consid": [4, 5, 15, 33, 98, 99, 101, 109, 112, 116, 117, 119, 126, 127, 128, 134, 135, 215, 269], "consider": [18, 87, 112, 135], "consist": [6, 134, 135, 160, 269], "consol": [22, 120], "conson": 135, "constant": [3, 6, 7, 9, 16, 17, 29, 30, 40, 98, 102, 116, 134, 150, 233], "constantli": 207, "constrain": 110, "constraint": 125, "construct": [17, 64, 123, 215, 228], "consult": [18, 26, 132], "contact": [217, 272], "contain": [4, 5, 8, 10, 12, 14, 15, 16, 18, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 41, 43, 50, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 64, 97, 99, 101, 106, 112, 113, 114, 115, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 132, 134, 135, 136, 147, 159, 169, 177, 182, 185, 215, 258, 268, 275, 276, 279, 280, 285], "content": [17, 37, 58, 61, 115, 211], "context": [11, 37, 42, 44, 56, 57, 59, 60, 65, 133, 181, 266, 268, 272], "contextili": [27, 85, 133, 134, 190, 208], "contextlib": [60, 134], "contigu": [50, 51, 52, 56, 57, 59], "contin": [0, 2, 22, 169, 188, 218, 222, 256], "continent": [182, 276], "continu": [3, 6, 8, 14, 15, 16, 25, 29, 98, 116, 125, 134, 135, 185, 271, 281], "contlabel": [4, 5], "contour": [0, 2, 3, 5, 6, 7, 22, 78, 113, 116, 134, 167, 213, 214, 256, 264, 274, 286], "contour_map": [256, 267, 274], "contourpen": [7, 264], "contrast": 115, "contribut": [117, 134, 137, 215, 257], "contributor": 207, "control": [4, 5, 6, 8, 13, 15, 16, 18, 22, 26, 28, 29, 31, 33, 34, 35, 36, 99, 104, 106, 110, 112, 114, 117, 119, 122, 125, 127, 128, 130, 131, 132, 134, 138, 139, 141, 150, 163, 178, 182, 209, 210, 215, 259, 266, 275, 281], "conveni": [60, 217], "convent": [2, 14, 19, 29, 99, 104, 118, 132, 134, 135, 191, 283], "converg": 125, "convers": [6, 7, 33, 34, 35, 36, 48, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 130, 132, 133, 134, 268], "convert": [3, 5, 8, 10, 15, 16, 17, 18, 26, 31, 33, 34, 35, 36, 48, 99, 103, 109, 110, 111, 112, 117, 119, 122, 123, 124, 125, 127, 128, 132, 134, 139, 154, 177, 202, 217, 268], "convex": 26, "convolut": [87, 97, 103], "coord": [32, 60, 85, 138], "coordin": [3, 4, 6, 8, 9, 11, 15, 16, 18, 26, 27, 30, 31, 32, 33, 34, 35, 36, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 99, 103, 109, 110, 111, 112, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 134, 136, 138, 144, 150, 157, 166, 177, 182, 195, 209, 212, 218, 235, 245, 248, 250, 253, 276, 282, 285], "coords_arrai": 123, "coords_list": 123, "copi": [50, 51, 52, 56, 57, 59, 98, 116, 134, 135, 207, 215, 258, 273], "copybutton": 134, "core": [6, 37, 47, 101, 103, 109, 111, 121, 122, 130, 134, 136, 208, 215, 216, 257], "corner": [1, 2, 3, 11, 12, 18, 25, 26, 28, 99, 110, 138, 139, 141, 144, 146, 147, 148, 149, 153, 160, 272, 275, 283], "cornsilk": [153, 191], "correct": [32, 104, 134, 135, 208, 218, 220], "correctli": [32, 41, 134, 208, 215], "correl": 29, "correlation_en": 193, "correspond": [14, 26, 29, 33, 34, 35, 36, 43, 53, 99, 101, 103, 109, 110, 111, 112, 117, 118, 119, 122, 123, 124, 125, 128, 131, 132, 135, 139, 148, 159, 160, 181, 185, 195, 196, 197, 199, 202, 208, 210, 253, 265, 277, 285], "cosin": [87, 97, 103], "could": [60, 92, 135, 207, 215, 268, 276], "couldn": 37, "count": [8, 18, 33, 99, 132, 155, 156], "counter": [25, 26, 29, 118, 171, 179, 181, 199, 276, 285], "counterclockwis": [104, 118, 253], "counterpart": 269, "countri": [0, 2, 22, 45, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 134, 169, 188, 209, 225, 256, 279], "country_polygon": [186, 188, 256], "coupl": [14, 135, 275], "courier": [171, 176, 179, 181, 200, 206, 253, 260, 285], "cours": [134, 137, 233, 275], "courtesi": [161, 163, 269], "cover": [7, 27, 85, 101, 111, 190, 209, 210, 212, 213, 272, 275, 283], "coverag": [117, 134, 135], "cpt": [0, 1, 3, 4, 5, 6, 7, 8, 14, 15, 16, 18, 22, 25, 29, 69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86, 98, 116, 134, 135, 139, 144, 145, 164, 169, 180, 202, 210, 256, 264, 270], "cr": [85, 134, 136, 212], "craft": [137, 285], "crash": 134, "creat": [0, 1, 2, 3, 5, 6, 7, 11, 12, 17, 19, 22, 23, 24, 32, 37, 38, 43, 44, 49, 50, 51, 52, 56, 57, 58, 59, 61, 64, 78, 87, 98, 99, 100, 101, 104, 107, 109, 111, 112, 113, 115, 116, 117, 118, 122, 123, 124, 130, 132, 134, 135, 138, 139, 141, 144, 145, 146, 147, 148, 150, 152, 157, 160, 167, 169, 170, 173, 174, 175, 182, 183, 198, 201, 202, 204, 208, 212, 213, 214, 215, 251, 252, 256, 261, 262, 265, 268, 269, 271, 272, 274, 275, 276, 277, 280, 281, 282, 285, 286], "create_data": [49, 50, 51, 52, 56, 57, 59, 64], "creation": [98, 116, 211, 268, 275], "creator": 217, "cremer": 233, "criteria": [15, 16, 31, 100, 102, 109, 112, 117, 119, 124], "criterion": [15, 16, 31, 112, 117, 119], "critic": [18, 112, 135], "crop": [17, 19], "cross": [0, 1, 3, 6, 15, 21, 22, 26, 29, 78, 112, 118, 130, 134, 167, 169, 171, 196, 220, 236, 256], "cross_scal": 29, "cross_sect": [160, 167, 256], "crossov": [130, 131], "crossover_error": 130, "crossprofil": [112, 135], "crs84": 27, "crude": 278, "crustal": [69, 134, 269], "csetosa": 139, "css": 278, "cstyle": 99, "csv": [139, 202], "ctp": 54, "ctype": [37, 42, 43, 48, 49, 50, 51, 52, 54, 64, 133, 134, 207], "ctypeslib": 134, "cube": [43, 53, 54, 63, 134, 136, 139], "cubhelix": 139, "cubic": [6, 110, 130], "cumul": [8, 98, 104, 105, 107, 163, 269, 271], "curat": [137, 215], "current": [0, 9, 13, 15, 16, 17, 18, 20, 21, 22, 23, 24, 28, 29, 30, 31, 37, 39, 42, 44, 45, 46, 47, 58, 91, 98, 101, 112, 116, 117, 119, 120, 129, 130, 131, 135, 149, 165, 171, 176, 178, 179, 211, 212, 215, 245, 253, 257, 259, 266, 275], "curv": [15, 16, 87, 97, 134, 171, 176, 179, 230, 235, 237, 243, 245, 246, 248], "curvatur": 125, "custom": [0, 1, 3, 6, 8, 15, 16, 17, 18, 22, 24, 26, 28, 31, 34, 35, 36, 65, 78, 85, 97, 104, 112, 116, 117, 119, 125, 127, 128, 132, 133, 134, 147, 150, 153, 167, 169, 171, 178, 180, 205, 206, 209, 253, 256, 262, 264, 275, 276, 285], "custom_symbol": [197, 205, 256], "cut": [4, 5, 134, 225], "cval": 113, "cw": 29, "cwater": 164, "cx": 118, "cy": 118, "cycl": [8, 15, 16, 18, 26, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132], "cyclic": [8, 15, 16, 18, 26, 31, 34, 35, 36, 98, 112, 116, 117, 119, 125, 127, 128, 132, 134], "cyl": [239, 256], "cyl_cassini": [230, 239, 256], "cyl_equal_area": [231, 239, 256], "cyl_equidist": [232, 239, 256], "cyl_merc": [233, 239, 256], "cyl_mil": [234, 239, 256], "cyl_oblique_merc": [235, 239, 256], "cyl_ster": [168, 236, 263, 283], "cyl_stereograph": [236, 239, 256], "cyl_transverse_merc": [237, 239, 256], "cyl_universal_transverse_merc": [238, 239, 256], "cylind": [235, 236, 237], "cylindr": [0, 2, 22, 130, 168, 209, 233, 239, 241, 242, 244, 245, 248, 256, 263, 267, 270], "c\u00e9sar": 230, "d": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 28, 29, 31, 32, 33, 34, 35, 36, 45, 50, 51, 52, 57, 59, 60, 61, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 136, 138, 140, 144, 152, 153, 159, 168, 169, 171, 172, 179, 183, 186, 191, 196, 199, 202, 209, 226, 231, 232, 241, 242, 243, 244, 245, 246, 247, 248, 253, 256, 258, 263, 268, 269, 274, 276, 277, 283, 286], "d0": [171, 196], "d1c": 171, "dagshub": [135, 215], "dagshub_pass": 135, "dagshub_us": 135, "dai": [0, 2, 8, 15, 16, 18, 22, 23, 26, 31, 34, 35, 36, 67, 68, 112, 117, 119, 125, 127, 128, 132, 134, 135, 151, 169, 200, 256, 268, 281], "daili": [8, 15, 16, 18, 26, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132], "danub": 177, "dark": [105, 106, 152, 191], "darkblu": 211, "darkest": 152, "darkgrai": [150, 154, 172, 265, 283, 285], "darkgreen": [2, 23, 152], "darkorang": [196, 197, 204, 206, 285], "darkr": [148, 196, 282], "daroari": 134, "dash": [160, 171, 172, 178, 179, 186, 196, 251, 265, 280, 282, 285], "dashboard": 277, "dat": 212, "data": [0, 1, 2, 3, 4, 5, 6, 7, 8, 14, 15, 16, 18, 22, 25, 26, 29, 31, 32, 33, 34, 35, 36, 37, 41, 43, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 134, 136, 138, 139, 141, 143, 144, 145, 147, 148, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 166, 170, 171, 172, 175, 177, 179, 182, 183, 185, 191, 193, 195, 198, 199, 201, 202, 203, 204, 207, 209, 210, 212, 213, 215, 217, 244, 250, 252, 253, 256, 259, 264, 265, 267, 268, 269, 270, 274, 276, 280, 282, 284, 286], "data01": 265, "data02": 265, "data_bmean": 34, "data_bmedian": 35, "data_bmod": 36, "data_kind": 134, "data_merg": 265, "data_point": 54, "data_ptr": 43, "data_sourc": [74, 78, 134], "data_var": 60, "dataarrai": [4, 5, 6, 7, 8, 15, 16, 18, 25, 29, 31, 32, 33, 34, 35, 36, 37, 56, 60, 63, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 117, 118, 119, 122, 123, 124, 125, 127, 128, 132, 133, 134, 135, 136, 138, 162, 163, 166, 168, 198, 207, 269, 270], "dataarrayband": 166, "databas": [84, 109, 131, 209, 259, 278], "datacub": 134, "datafram": [4, 8, 14, 15, 16, 18, 25, 29, 31, 33, 34, 35, 36, 62, 84, 97, 99, 105, 106, 112, 113, 114, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 132, 134, 135, 136, 160, 168, 172, 193, 207, 268, 273, 281], "datarrai": 115, "dataset": [0, 3, 4, 5, 6, 7, 8, 15, 16, 18, 22, 25, 27, 29, 31, 32, 33, 34, 35, 36, 43, 46, 49, 50, 51, 52, 53, 54, 59, 60, 61, 62, 65, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 132, 134, 135, 136, 139, 143, 145, 154, 156, 160, 161, 162, 163, 168, 177, 184, 185, 202, 212, 256, 264, 267, 268, 270, 271, 274, 277, 281, 286], "datasetread": 269, "datastor": 115, "datatyp": [61, 136], "date": [23, 132, 134, 198, 209, 215, 216, 250, 283], "date32": [134, 136], "date64": [134, 136], "date_format": 134, "date_max": 198, "date_min": 198, "date_rang": 198, "date_time_chart": [256, 268, 274], "datelin": 131, "datetim": [0, 1, 15, 22, 23, 65, 114, 134, 152, 169, 205, 250, 256, 274, 286], "datetime64": [52, 134, 198], "datetime_input": [198, 205, 256], "datetimeindex": [198, 268], "datum": 166, "davi": 84, "day_night": [23, 152], "daynight": [67, 68], "daytim": 152, "dc": [14, 131], "dcw": [2, 11, 134, 146, 147, 186, 272], "dd": [198, 268], "ddd": [132, 162, 266, 271], "ddthh": 198, "de": [186, 209, 230], "deactiv": 29, "deal": [60, 134, 157, 202], "debug": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135], "dec": [207, 208], "decid": [216, 275], "decim": 266, "decis": 101, "declar": 215, "decod": 132, "decolin": 171, "decor": [0, 1, 15, 22, 26, 134, 135, 169, 176, 180, 215, 256], "decorated_lin": [171, 180, 256], "dedic": [207, 257], "def": [135, 138, 215, 277], "default": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 43, 48, 49, 50, 53, 54, 60, 61, 62, 63, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 139, 141, 143, 144, 148, 150, 153, 155, 160, 170, 173, 175, 176, 178, 181, 191, 195, 196, 200, 202, 206, 208, 209, 210, 215, 218, 220, 221, 222, 223, 232, 235, 252, 253, 256, 259, 262, 264, 265, 267, 270, 271, 272, 274, 276, 278, 279, 280, 282, 283, 285, 286], "default_rng": [155, 157, 201, 204, 265], "defer_load": 277, "defin": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 18, 23, 24, 25, 26, 29, 31, 34, 35, 36, 43, 87, 98, 101, 109, 112, 113, 116, 117, 118, 119, 126, 128, 129, 130, 133, 138, 139, 141, 143, 145, 153, 154, 155, 156, 160, 161, 162, 163, 164, 172, 173, 176, 185, 186, 196, 197, 198, 199, 202, 206, 209, 212, 215, 259, 262, 265, 268, 269, 271, 276, 277, 282, 285], "definit": [12, 23, 53, 112, 118, 131, 134, 207, 235, 253], "deflect": [70, 134], "deg2rad": 32, "degener": 118, "degre": [18, 26, 29, 32, 33, 34, 35, 36, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 103, 104, 109, 110, 111, 112, 117, 118, 119, 122, 123, 124, 125, 128, 132, 156, 160, 161, 162, 163, 166, 171, 173, 176, 181, 182, 199, 218, 219, 220, 221, 222, 223, 225, 230, 253, 264, 266, 269, 270, 276, 277, 283, 285], "degree_start": 276, "degree_stop": 276, "delaunai": [124, 126, 127, 128], "delaunay_tripl": 134, "delet": [22, 37, 46, 104, 134, 212], "delimit": 285, "delin": 268, "delta": 113, "dem": 162, "demi": 260, "demiital": 260, "demiobliqu": 260, "demonstr": [135, 200, 266, 268, 273], "denot": [135, 141, 268], "densiti": 33, "dep": 135, "depend": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 23, 24, 25, 26, 27, 29, 31, 33, 34, 35, 36, 46, 53, 64, 85, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 121, 122, 123, 124, 125, 127, 128, 129, 131, 132, 134, 135, 216, 231, 277], "dependabot": 134, "deploi": [134, 215], "deploy": [134, 135], "deprecate_paramet": [134, 215], "depth": [10, 14, 100, 154, 191, 202, 253, 267, 281, 285], "depth_km": [154, 281], "der": [0, 2, 22, 240, 249, 256, 263], "deriv": [6, 7, 104, 112, 133, 136], "describ": [14, 15, 16, 31, 112, 117, 119, 135, 215, 219, 226], "descript": [66, 134, 135, 200, 215, 258, 275], "design": [117, 134, 136, 144, 213, 227, 234, 238, 250], "desir": [8, 11, 19, 27, 33, 34, 35, 36, 62, 97, 98, 99, 103, 106, 108, 109, 110, 111, 112, 113, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 131, 132, 135, 144, 148, 150, 160, 165, 171, 175, 179, 185, 199, 200, 202, 210, 279], "despit": 276, "destroi": [37, 39, 42], "detail": [2, 4, 5, 9, 27, 29, 30, 33, 34, 35, 36, 53, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 98, 103, 109, 110, 111, 115, 116, 117, 119, 122, 123, 124, 125, 128, 132, 134, 135, 136, 145, 148, 171, 179, 190, 197, 208, 211, 215, 257, 261, 275, 285], "detect": [6, 60], "determin": [4, 5, 7, 14, 15, 16, 17, 18, 20, 24, 26, 27, 29, 32, 33, 53, 62, 85, 101, 103, 108, 110, 112, 113, 117, 118, 119, 130, 131, 134, 145, 210, 219, 233, 240, 253, 265, 269, 272, 275, 279], "dev": [112, 134, 135, 215, 216], "develop": [134, 135, 136, 207, 208, 215, 217, 222, 225, 230, 235, 244, 245, 268], "deviat": [8, 33, 97, 108, 112, 125, 132, 155, 157, 172, 204, 265], "deviator": 14, "devic": 6, "df": [139, 154, 193, 202, 212, 268], "df_bound": 172, "df_devi": 172, "dfile": 112, "dgrid": 162, "diagon": 26, "diagram": [0, 3, 8, 18, 22, 25, 84, 116, 142, 158, 169, 256, 265], "diamet": [14, 18, 87, 118, 143, 156, 157, 199, 202, 252, 268, 281], "diamond": 196, "dichotomi": 84, "dict": [14, 19, 22, 27, 37, 60, 62, 66, 134], "dict_col": 175, "dictionari": [37, 62, 134, 175, 191, 195, 259], "didn": 281, "diep": 134, "diff": [134, 215], "differ": [1, 2, 3, 4, 5, 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 23, 26, 30, 31, 34, 35, 36, 41, 43, 53, 62, 75, 98, 102, 109, 112, 115, 116, 117, 119, 125, 127, 128, 130, 132, 134, 135, 139, 141, 145, 148, 152, 154, 171, 174, 175, 176, 178, 179, 182, 184, 185, 202, 203, 204, 206, 208, 209, 212, 217, 218, 223, 235, 245, 258, 265, 268, 273, 275, 276, 281, 283, 285], "differenti": 186, "difficult": [135, 265], "diffus": 104, "digit": [2, 18, 74, 156, 215, 268], "dim": [43, 49, 87, 269], "dimens": [6, 8, 17, 20, 22, 24, 43, 45, 102, 108, 136, 139, 145, 154, 157, 193, 209, 212, 268, 269, 275], "dimension": [20, 29, 136, 163, 264, 276], "dimfilt": [134, 207], "dip": [14, 191], "dip1": 14, "dip2": 14, "dir": 208, "dir_cach": 65, "dir_data": 65, "dir_dcw": 65, "dir_gshhg": 65, "direct": [1, 2, 3, 4, 11, 15, 16, 18, 21, 24, 25, 26, 49, 98, 104, 112, 116, 118, 125, 134, 139, 148, 149, 150, 153, 154, 156, 159, 160, 161, 162, 163, 164, 171, 172, 179, 181, 182, 196, 199, 212, 215, 218, 219, 235, 236, 253, 264, 265, 269, 275, 276, 283, 285], "direction_degre": 276, "directli": [24, 114, 115, 133, 134, 136, 198, 202, 207, 215, 264, 265, 273], "directori": [37, 47, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 129, 130, 131, 133, 134, 135, 165, 208, 212, 259, 281], "disabl": [4, 5, 18, 22, 120, 130, 134], "disallow": 134, "disclaim": 134, "discontinu": 131, "discours": [135, 207, 217], "discret": [3, 98, 116, 136, 139, 164, 174, 202, 271], "discreteslid": 277, "discuss": [135, 207, 209, 210, 215, 276], "disk": 136, "dispatch": 215, "displai": [3, 8, 9, 19, 22, 23, 30, 120, 134, 189, 207, 209, 210, 218, 220, 221, 259, 268, 270, 275, 277, 283], "dist": [71, 112, 118, 119, 123, 173], "dist2lin": 119, "dist2pt": 119, "distanc": [3, 15, 16, 18, 25, 31, 33, 71, 87, 101, 103, 112, 117, 118, 119, 123, 125, 130, 131, 134, 150, 171, 176, 179, 183, 199, 218, 219, 220, 221, 222, 223, 248], "distant": 117, "distc": 112, "distcalc": [112, 131, 135], "distclean": 134, "distinct": 273, "distinguish": [134, 215, 276], "distl": 112, "distort": [221, 222, 223, 225, 227, 228, 230, 233, 236, 237, 238, 248], "distr": 112, "distribut": [8, 98, 104, 105, 107, 108, 134, 155, 157, 163, 176, 204, 208, 215, 244, 265, 269], "divers": [135, 257], "divid": [4, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 87, 105, 106, 108, 112, 114, 117, 119, 122, 125, 127, 128, 132, 144, 234, 238, 271, 275, 278], "divis": [105, 106, 107, 271], "divisor": [4, 8, 15, 16, 18, 21, 29, 31, 33, 34, 35, 36, 112, 114, 117, 119, 122, 125, 127, 128, 132], "dk": 131, "dll": 208, "do": [4, 5, 6, 8, 9, 11, 14, 15, 16, 17, 18, 26, 29, 30, 31, 34, 35, 36, 40, 43, 87, 98, 104, 112, 116, 117, 118, 119, 125, 127, 128, 130, 132, 134, 135, 136, 160, 169, 202, 208, 212, 215, 268, 276, 282], "doc": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 65, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 139, 144, 145, 148, 160, 171, 178, 179, 181, 197, 202, 210, 215, 216, 266, 270, 285], "docformatt": 134, "docstr": [134, 135], "doctest": [134, 215], "doctestplu": 134, "document": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 18, 22, 23, 25, 26, 29, 31, 33, 34, 35, 36, 53, 64, 66, 84, 99, 101, 103, 104, 108, 111, 112, 114, 115, 117, 118, 119, 122, 125, 127, 128, 132, 148, 160, 171, 179, 207, 250, 257, 259, 265, 273, 285], "dodgerblu": [148, 170, 176, 198, 199, 268], "dodgerblue3": 206, "dodgerblue4": [186, 196, 197], "doe": [2, 4, 8, 15, 16, 18, 22, 26, 29, 31, 34, 35, 36, 97, 106, 107, 112, 117, 119, 125, 127, 128, 130, 132, 133, 134, 135, 136, 208, 209, 264, 266, 267, 272, 279], "doesn": [42, 43, 47, 134, 135, 136, 207, 208, 268, 273], "doi": [18, 207, 215, 217], "domain": [3, 6, 33, 34, 35, 36, 87, 97, 101, 103, 104, 108, 109, 110, 111, 112, 117, 122, 123, 124, 125, 128, 132], "domin": [6, 110], "don": [32, 64, 135, 215, 275, 281], "done": [44, 112, 118, 135, 139, 206, 215, 268, 276, 279], "dongdong": [134, 207, 217, 257], "dot": [22, 110, 178, 186, 200, 265, 280], "doubl": [0, 1, 2, 4, 8, 12, 14, 15, 16, 18, 22, 31, 33, 34, 35, 36, 65, 99, 112, 117, 119, 122, 125, 127, 128, 132, 134, 142, 169, 256], "double_y_ax": [141, 142, 256], "doubt": 101, "dougla": 185, "douro": 177, "down": [24, 104, 114, 135, 171, 176, 178, 179, 181, 219, 264, 266, 285], "downhil": 104, "download": [5, 7, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 129, 133, 134, 135, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 209, 210, 211, 212, 215, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "download_test_data": 134, "downsid": 236, "dpi": [6, 10, 17, 19, 22, 27, 110, 200, 262], "draft": [134, 215], "drafter": [134, 215], "drape": [0, 3, 7, 22, 65, 69, 78, 116, 134, 256, 274, 286], "drapegrid": [7, 269], "drapgrid": 269, "draping_on_3d_surfac": [256, 269, 274], "draw": [1, 2, 3, 4, 5, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 23, 24, 26, 29, 31, 135, 143, 147, 153, 155, 156, 159, 160, 165, 171, 175, 176, 181, 183, 184, 186, 191, 210, 264, 265, 275, 276, 280], "drawn": [2, 4, 5, 7, 14, 15, 16, 18, 29, 141, 176, 206, 210, 265, 280, 282], "driven": 135, "driver": 269, "drop": [109, 119, 134, 216, 278], "dry": [0, 1, 2, 3, 6, 22, 109, 116, 119, 167, 169, 256], "dt": 153, "dtype": [49, 50, 51, 52, 62, 75, 134, 139, 166, 198, 202, 268], "du": 209, "due": [3, 32, 134, 215, 273], "dummy_context": 134, "dump": 4, "duplic": [49, 123, 132], "durat": 136, "dure": [4, 8, 10, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 97, 99, 112, 114, 117, 119, 125, 127, 128, 132, 135, 166], "dvc": [134, 215], "dx": [1, 2, 3, 10, 11, 12, 13, 14, 15, 16, 24, 26, 31, 56, 87, 103, 104, 108, 110, 114, 131, 195], "dy": [1, 2, 3, 10, 11, 12, 13, 14, 15, 16, 24, 26, 31, 56, 104, 108, 110, 114, 131, 195], "dylib": 208, "dynam": [76, 98, 105, 106, 116, 134], "dyne": 14, "dz": [16, 104, 108, 114], "e": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 40, 41, 43, 47, 49, 53, 56, 57, 59, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 141, 144, 150, 155, 163, 165, 171, 176, 179, 181, 182, 186, 190, 193, 198, 199, 203, 208, 209, 211, 212, 215, 218, 252, 253, 258, 259, 262, 263, 269, 273, 275, 276, 277, 279, 282, 283, 285], "e0": 193, "e1": 163, "e10": 163, "e3": 283, "e45": 199, "e7": 29, "ea": [181, 182, 276], "each": [3, 6, 8, 14, 15, 16, 18, 24, 25, 26, 31, 33, 34, 41, 87, 97, 98, 99, 103, 104, 106, 108, 110, 112, 114, 116, 117, 119, 123, 126, 130, 132, 134, 135, 139, 145, 154, 155, 163, 174, 176, 184, 202, 212, 215, 228, 230, 237, 238, 248, 251, 252, 257, 258, 260, 265, 268, 272, 275, 276, 280, 283], "eal": 181, "ear": [207, 217], "earli": 235, "earlier": [2, 216], "earth": [0, 3, 6, 19, 22, 23, 27, 32, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 84, 85, 87, 100, 112, 118, 131, 133, 134, 145, 160, 161, 163, 168, 190, 207, 217, 219, 221, 253, 256, 264, 267, 269, 271, 274, 286], "earth_ag": 69, "earth_age_10m_g": 269, "earth_dai": 68, "earth_day_01d": 134, "earth_defl": 70, "earth_defl_typ": 70, "earth_dist": 71, "earth_edefl": 70, "earth_faa": 72, "earth_faa_typ": 72, "earth_faaerror": 72, "earth_gebco": 78, "earth_gebcosi": 78, "earth_geoid": 73, "earth_mag": 74, "earth_mag4km": 74, "earth_mag_typ": 74, "earth_mask": 75, "earth_mdt": 76, "earth_mss": 77, "earth_ndefl": 70, "earth_night": 67, "earth_relief": [78, 256, 270, 274], "earth_relief_01d_g": [54, 63, 135], "earth_relief_03m_g": [161, 163], "earth_relief_30m": [99, 100, 101, 104, 106, 107, 110, 111, 112, 113], "earth_relief_30m_g": 103, "earth_relief_30s_g": 269, "earth_relief_hol": [84, 102, 134], "earth_relief_typ": 78, "earth_synbath": 78, "earth_vgg": 79, "earth_wdmam": 74, "earthbyt": 269, "earthquak": [84, 154, 281], "easi": [133, 134, 136], "easier": [134, 135, 136, 275], "easiest": [208, 212, 258], "easili": [134, 135], "east": [7, 11, 18, 24, 33, 34, 35, 36, 45, 70, 85, 103, 104, 109, 110, 111, 112, 117, 122, 123, 124, 125, 128, 132, 134, 144, 160, 162, 163, 166, 225, 227, 253, 264, 269, 277, 279, 283], "east_sigma": 193, "east_veloc": 193, "eastward": 29, "ebro": 177, "eckert": [0, 2, 22, 240, 249, 256, 263], "econd": [15, 16, 31, 112, 117, 119], "econom": 2, "ecosystem": [133, 134, 207, 208, 215, 216, 217], "edefl": 70, "edg": [8, 29, 87, 103, 112, 125, 150, 179, 223, 225, 285], "edgewat": 185, "edison": 185, "edit": 215, "editor": 135, "edu": 137, "eea": 177, "eet": [15, 16, 31, 112, 117, 119], "ef": 17, "effect": [3, 4, 5, 12, 87, 108, 125], "effici": [136, 212, 217], "effort": 216, "eft": [24, 26, 28, 144, 150, 275, 285], "egm2008": 73, "egm96_to_36": 122, "egre": [15, 16, 31, 112, 117, 119], "egu": [134, 137], "egu22pygmt": 137, "ei": 181, "eigenvalu": 29, "eight": [18, 275], "eighth": 134, "einc": 283, "either": [1, 2, 3, 4, 5, 8, 9, 11, 14, 15, 16, 17, 18, 23, 24, 25, 27, 29, 30, 31, 32, 34, 35, 36, 41, 49, 51, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 97, 108, 109, 111, 112, 114, 117, 119, 120, 125, 126, 127, 128, 129, 130, 131, 134, 135, 150, 152, 172, 191, 210, 215, 259, 260, 262, 265, 266, 267, 275, 276], "elabel": 18, "elb": 177, "element": [0, 1, 11, 12, 15, 22, 26, 46, 64, 99, 132, 134, 209, 213, 214, 248, 256, 272, 275], "elev": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 23, 25, 26, 29, 30, 31, 34, 35, 36, 78, 104, 106, 117, 118, 124, 125, 127, 128, 132, 134, 138, 139, 144, 155, 160, 161, 162, 168, 210, 253, 264, 267, 269, 277], "eleven": 134, "eleventh": 134, "elimin": [125, 134, 215], "ellips": [0, 22, 29, 118, 169, 192, 199, 200, 243, 256], "ellipsoid": [112, 131, 230, 238], "ellipt": [241, 244], "els": 46, "elsewher": 217, "em": [18, 134], "emag2": 74, "emag2_4km": 74, "embed": 119, "embellish": [11, 151, 256], "emerg": 137, "emili": 134, "empti": [33, 34, 35, 36, 43, 102, 117, 134], "en": [19, 23, 119, 138, 152, 215, 283], "enabl": [6, 103, 109, 111, 122, 134, 135, 136, 164, 208], "encapsul": 10, "enclos": 247, "encod": [26, 121, 134, 260, 261, 273], "encompass": 283, "encount": [90, 101], "encourag": [135, 216], "end": [3, 4, 8, 9, 15, 16, 18, 29, 30, 31, 33, 34, 35, 36, 37, 97, 98, 99, 108, 112, 114, 115, 116, 117, 118, 119, 122, 125, 127, 128, 132, 134, 135, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 209, 210, 211, 212, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "end_latitud": 276, "end_longitud": 276, "endian": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132], "endlessli": [98, 116], "endpoint": [118, 119, 160, 173, 182], "enforc": [17, 112, 135, 216], "engag": 257, "engin": 134, "enhanc": [131, 163, 215], "enough": [15, 16, 31, 112, 117, 119, 207], "ensur": [119, 134, 135, 138, 208, 216, 283], "enter": [28, 117, 125, 144], "entimet": [15, 16, 31, 112, 117, 119], "entir": [4, 8, 15, 16, 17, 18, 24, 26, 31, 33, 34, 35, 36, 84, 99, 112, 113, 117, 119, 122, 125, 127, 128, 130, 132, 135, 145, 186, 233, 247, 253, 270, 275, 283], "entr": [26, 150, 285], "entri": [3, 4, 5, 8, 12, 15, 16, 18, 98, 116, 132, 134, 148, 215, 265], "enum": [53, 134], "env": [134, 135, 208, 212, 269], "envelop": [0, 1, 15, 21, 22, 112, 134, 169, 180, 256], "environ": [22, 28, 37, 130, 131, 134, 153, 261, 277], "eotvo": 79, "ep": [10, 17, 19, 134, 165, 190], "epicent": 281, "eps1": 29, "eps2": 29, "epsg": [27, 85, 166, 177], "equal": [0, 2, 3, 4, 6, 8, 15, 16, 18, 20, 22, 24, 26, 29, 31, 33, 34, 35, 36, 65, 78, 87, 97, 98, 99, 103, 104, 105, 106, 107, 109, 110, 111, 112, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 132, 134, 138, 144, 166, 171, 179, 186, 190, 207, 220, 221, 223, 224, 226, 227, 228, 229, 230, 234, 239, 240, 243, 244, 245, 246, 247, 248, 249, 252, 256, 263, 269, 274, 276, 286], "equalize_grid": [105, 271], "equals": [3, 144], "equat": [118, 125, 230, 232, 233, 235, 236, 237, 238, 243, 247, 248, 283], "equidist": [0, 2, 22, 98, 112, 116, 118, 209, 220, 224, 229, 236, 239, 240, 248, 256, 263, 267, 270], "equilater": [126, 127, 128], "equival": [8, 33, 34, 35, 36, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 132, 135, 253], "erect": 112, "ernst": 243, "errmsg": 134, "error": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 53, 87, 90, 93, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 136, 200, 207, 269], "error_bar": 15, "especi": 208, "essenti": [261, 268], "esteban": 137, "estim": [29, 33, 34, 35, 36, 87, 97, 104, 117, 124, 130, 221], "et": [84, 161, 163, 181, 269], "etc": [3, 6, 11, 20, 21, 24, 41, 121, 129, 133, 135, 177, 185, 212, 215, 217, 275, 279], "eu": [2, 186, 269], "eur": 276, "europ": [2, 177, 186, 219, 228, 259, 269], "european": 269, "evalu": 122, "even": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 206, 207, 215, 281], "evenli": 155, "event": [14, 134, 154, 191], "event_nam": 14, "everi": [34, 35, 36, 118, 134, 135, 156, 159, 173, 210, 211, 215, 245, 251, 267, 268], "everyon": 135, "everyth": [135, 208], "everywher": [6, 7], "ex026": 160, "exact": [18, 108, 112, 218], "exactli": [17, 33, 34, 35, 36, 103, 109, 110, 111, 112, 117, 118, 122, 123, 124, 125, 128, 132, 176, 208], "exagger": 139, "examin": [15, 16, 31, 112, 117, 119], "exampl": [9, 17, 30, 32, 35, 36, 37, 45, 46, 48, 49, 51, 54, 56, 57, 58, 59, 60, 61, 62, 63, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 85, 86, 87, 98, 101, 102, 103, 110, 111, 113, 117, 119, 120, 122, 123, 124, 125, 127, 128, 130, 134, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 209, 210, 211, 212, 214, 215, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 260, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287], "exc_typ": 39, "exc_valu": 39, "exce": [6, 15, 16, 17, 31, 99, 101, 103, 109, 111, 112, 117, 119, 122], "exceed": 131, "except": [2, 19, 46, 70, 72, 74, 78, 79, 80, 81, 82, 83, 99, 103, 112, 125, 132, 134, 135, 176, 279], "exclud": [18, 108, 134, 262], "exclus": 135, "execut": [17, 22, 27, 85, 133, 134, 135, 140, 142, 151, 158, 167, 180, 188, 192, 194, 205, 208, 214, 215, 224, 229, 239, 249, 254, 255, 256, 274, 284, 287], "exemplari": 197, "exist": [0, 4, 8, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 46, 47, 98, 99, 101, 106, 112, 116, 117, 119, 122, 125, 127, 128, 130, 132, 134, 135, 215], "exit": [37, 50, 51, 52, 56, 57, 59, 134, 272], "exp": [104, 138, 183, 263], "expand": [134, 283], "expect": [29, 32, 49, 98, 108, 116, 132, 134, 135, 199, 215, 250, 251, 252, 253], "expens": 123, "experi": [125, 134, 136], "experiment": 215, "explain": [43, 134, 135, 209, 213, 215, 276], "explan": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 134], "explicit": 134, "explicitli": [6, 15, 16, 21, 26, 69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86, 134, 275], "explor": 212, "expon": [14, 252], "export": [207, 208], "expos": 37, "express": [4, 8, 15, 16, 18, 26, 29, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132, 135, 136, 238, 245], "ext": 17, "extend": [17, 32, 101, 136, 157, 238, 258, 269, 283], "extens": [14, 17, 19, 29, 98, 116, 130, 131, 134, 135, 136, 191, 215, 227, 233, 277], "extension": 29, "extensionfil": [14, 191, 200], "extent": [2, 6, 27, 43, 85, 110, 114, 126, 127, 128, 136, 225, 230, 235], "exterior": 24, "extern": [15, 19, 22, 120, 130, 134, 207, 209, 259], "extlink": 134, "extra": [17, 24, 27, 29, 33, 45, 56, 87, 103, 134, 208, 215], "extra_arrai": [55, 60], "extract": [26, 45, 101, 160], "extrem": [8, 100, 108, 112, 114, 236], "extrud": 11, "ey": [207, 219], "f": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 24, 26, 29, 31, 33, 34, 35, 36, 37, 45, 46, 49, 56, 57, 59, 60, 87, 97, 98, 99, 101, 103, 104, 108, 109, 110, 111, 112, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 131, 132, 134, 135, 138, 144, 150, 157, 160, 163, 175, 176, 179, 183, 200, 204, 206, 212, 221, 253, 258, 262, 263, 265, 275, 277, 278, 279, 285], "f0": 176, "f10p": [4, 5], "f12p": 179, "f18": 193, "f1c": 176, "f1d": 268, "f5c": 176, "f5p": 179, "faa": 72, "faaerror": 72, "facad": 7, "facadepen": 7, "fact": [6, 112, 217, 275], "factor": [4, 5, 8, 15, 16, 17, 18, 21, 29, 31, 33, 34, 35, 36, 112, 114, 117, 119, 122, 125, 127, 128, 132, 139, 238], "fade": 17, "fail": [27, 53, 85, 117, 134], "failur": 134, "fall": [8, 14, 15, 16, 22, 29, 107, 109, 112, 119, 132, 134, 160, 202], "fallback": 134, "fallback_vers": 134, "fals": [4, 6, 9, 11, 14, 19, 22, 26, 27, 29, 30, 46, 55, 60, 72, 78, 85, 97, 98, 108, 110, 116, 118, 125, 129, 134, 166, 259, 277], "false_east": 166, "false_north": 166, "famili": [43, 49, 50, 51, 52, 53, 64, 134, 285], "familiar": 266, "fanci": [1, 150, 266], "farther": [118, 125], "fashion": 102, "fast": [136, 217], "faster": [104, 134], "fastest": [87, 97, 103, 208], "fatal": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132], "fault": [29, 171, 176], "fault_typ": 14, "fblack": 265, "fcourier": 206, "fdarkorang": 206, "fe": 210, "featur": [2, 6, 11, 14, 29, 98, 109, 116, 119, 145, 178, 215, 233, 276, 285], "federico": 137, "feedback": [207, 215, 217], "feedstock": 215, "feel": [207, 208], "feet": [110, 123, 131, 150], "ferdinand": 228, "fetch": [27, 85, 135], "few": [133, 134, 135, 215], "ff": 24, "fft": 217, "fi": 46, "field": [98, 103, 108, 116, 125, 135], "fifth": 134, "fig": [0, 2, 3, 5, 6, 7, 9, 11, 21, 23, 28, 30, 45, 98, 120, 134, 135, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 208, 209, 210, 211, 212, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "fig_numb": 135, "fig_ref": 135, "fig_test": 135, "figshar": 217, "figsiz": [24, 145, 163, 271, 275], "figur": [45, 98, 104, 105, 106, 116, 120, 134, 135, 136, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 208, 210, 212, 213, 214, 217, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 256, 262, 264, 265, 266, 267, 268, 269, 270, 271, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285, 286], "file": [0, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 17, 18, 19, 25, 26, 27, 29, 31, 33, 34, 35, 36, 37, 44, 45, 47, 49, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 140, 142, 148, 151, 158, 159, 162, 163, 165, 166, 167, 168, 180, 183, 185, 188, 190, 191, 192, 194, 199, 205, 207, 208, 210, 214, 215, 217, 224, 229, 239, 245, 249, 254, 255, 256, 257, 262, 266, 269, 273, 274, 281, 284, 287], "file_context": 60, "filenam": [115, 134, 165, 166], "filename_extens": 19, "filename_or_obj": 115, "filenotfounderror": [129, 134], "fill": [1, 2, 3, 4, 5, 7, 8, 10, 11, 12, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 78, 102, 125, 132, 134, 135, 139, 141, 147, 148, 150, 152, 154, 155, 156, 157, 160, 168, 170, 171, 172, 173, 175, 176, 179, 181, 182, 183, 185, 186, 187, 191, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 212, 218, 250, 251, 252, 262, 264, 265, 268, 272, 276, 277, 278, 281, 282, 285], "filled_grid": 102, "fillneg": [31, 134, 183, 200], "fillposit": [31, 134, 183, 200], "filter": [87, 97, 103, 119, 133, 135, 161, 163, 217, 269], "filter1d": 134, "filter_typ": 97, "filtered_grid": 87, "filtered_pacif": 103, "fin": [37, 56, 57, 58, 59, 60], "final": [1, 2, 3, 6, 17, 18, 24, 33, 34, 35, 36, 87, 101, 103, 104, 108, 109, 110, 111, 112, 117, 118, 119, 122, 123, 124, 125, 128, 132, 134, 195, 215, 265, 267, 283], "find": [4, 8, 15, 16, 18, 26, 29, 31, 34, 35, 36, 37, 92, 104, 105, 106, 112, 113, 114, 117, 119, 125, 126, 127, 128, 129, 130, 132, 134, 135, 208, 259, 268], "fine": 275, "finer": [209, 275], "finish": 135, "finit": 219, "finland": 186, "fiona": 134, "first": [0, 1, 2, 4, 6, 8, 14, 15, 16, 17, 18, 20, 22, 23, 24, 26, 29, 31, 33, 34, 35, 36, 43, 50, 51, 52, 53, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 99, 108, 112, 114, 117, 119, 122, 125, 126, 127, 128, 130, 132, 133, 134, 135, 136, 138, 139, 143, 145, 147, 161, 165, 168, 172, 173, 176, 185, 202, 208, 210, 212, 213, 214, 236, 243, 256, 268, 269, 271, 272, 276, 281, 285], "fit": [4, 33, 34, 35, 36, 103, 109, 110, 111, 112, 117, 122, 123, 124, 125, 128, 132, 176, 193, 212], "five": [4, 5, 138, 197], "fix": [4, 5, 8, 15, 28, 125, 135, 215], "fixedlabel": [20, 275], "fixture_xr_imag": 134, "flag": [46, 87, 99, 118, 132, 134, 269], "flag_of_europ": 269, "flake8": 134, "flakeheaven": 134, "flash": 197, "flat": [105, 106, 112, 118, 131, 136], "flat_earth": 118, "flatten": [125, 132, 159], "flemish": 233, "flexibl": [136, 212], "flightbrown": 200, "flip": [8, 112, 157, 265, 269], "float": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 21, 22, 23, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 43, 46, 53, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 98, 99, 101, 102, 103, 104, 107, 109, 110, 111, 112, 113, 117, 118, 119, 122, 123, 124, 125, 127, 128, 132, 134, 136, 209, 250, 276], "float32": [50, 52], "float64": [50, 52, 85, 166, 281], "float642": 166, "float647": 166, "floor": 157, "flower": 139, "fmt": [17, 212], "fmt_docstr": 215, "fmtfile": 131, "fname": [19, 56, 57, 58, 59, 60, 61, 62, 63, 129], "fo": 46, "focal": [0, 2, 14, 22, 134, 169, 192, 200, 256], "focal_mechan": 191, "focu": [135, 160, 212, 217], "focus": [9, 30, 215, 268, 282], "folder": [129, 134, 135, 215], "follow": [3, 4, 7, 8, 11, 14, 15, 16, 18, 20, 24, 25, 26, 29, 31, 32, 33, 34, 35, 36, 47, 58, 85, 87, 97, 99, 103, 104, 106, 112, 114, 117, 119, 122, 125, 127, 128, 132, 133, 134, 135, 137, 144, 154, 179, 181, 195, 197, 198, 207, 208, 209, 210, 212, 215, 221, 253, 258, 262, 268, 272, 275, 277], "font": [4, 5, 8, 12, 14, 24, 26, 28, 29, 65, 134, 153, 160, 166, 171, 176, 179, 181, 182, 196, 197, 200, 206, 207, 208, 211, 261, 273, 285], "font_annot": 65, "font_annot_primari": [12, 65, 141, 206], "font_annot_secondari": 65, "font_head": [24, 65], "font_label": [65, 141], "font_logo": 65, "font_subtitl": 65, "font_tag": [24, 65], "font_titl": [65, 163, 166, 253], "fontnam": 14, "fontsiz": 211, "fontstly": 196, "fontstyl": [197, 211], "foot": [33, 34, 35, 36, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 132], "footnot": 245, "forc": [4, 6, 7, 8, 15, 16, 17, 18, 31, 33, 34, 35, 36, 97, 98, 99, 103, 106, 107, 108, 109, 110, 112, 113, 114, 116, 117, 118, 119, 122, 125, 127, 128, 130, 131, 132, 134, 150, 160, 166, 179, 252, 282], "force_scan": 108, "fore": 262, "foreground": [1, 2, 3, 6, 10, 11, 16, 98, 116, 200, 262, 265], "forg": [134, 207, 208, 215], "forget": [135, 208], "fork": [135, 215], "form": [27, 53, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 104, 108, 113, 114, 123, 125, 134, 136, 139, 198, 232, 270, 282, 283], "format": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 43, 60, 62, 85, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 134, 135, 136, 139, 153, 159, 164, 165, 166, 174, 177, 185, 198, 199, 202, 209, 212, 215, 217, 259, 266, 283], "format_clock_in": [65, 268], "format_clock_map": [65, 268], "format_clock_out": [65, 268], "format_date_in": [65, 268], "format_date_map": [65, 268], "format_date_out": [65, 268], "format_float_map": 65, "format_float_out": 65, "format_geo_map": [65, 162, 253, 266, 271], "format_geo_out": 65, "format_time_map": 65, "format_time_primary_map": 65, "format_time_secondary_map": 65, "format_time_stamp": 65, "formatt": 277, "former": [132, 262], "formula": [230, 234, 238], "fortran": [43, 99], "forum": [135, 207, 215, 217, 257], "forward": [6, 11, 110], "foss4g": 137, "foss4g2019oceania": 137, "found": [75, 87, 97, 98, 101, 103, 104, 108, 109, 112, 116, 119, 129, 130, 144, 148, 197, 207, 208, 210, 211, 215, 266, 268, 270, 276, 285], "four": [2, 3, 11, 15, 17, 18, 24, 108, 109, 112, 124, 135, 163, 196, 268, 275, 276, 283], "fourier": 136, "fourteenth": 134, "fourth": [16, 25, 134, 143], "fout": [37, 56, 57, 59, 60], "fp": [54, 61, 62], "fr": [14, 134], "frac": [104, 117], "fraction": 3, "fractur": [84, 134, 156], "frame": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 15, 16, 18, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 45, 120, 134, 135, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 208, 210, 211, 212, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 256, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 280, 281, 282, 283, 284, 285, 286], "framework": 135, "franc": [186, 230], "fran\u00e7oi": 230, "free": [44, 72, 87, 101, 134, 135, 207, 208, 227], "freebsd": 134, "freq": [198, 268], "frequenc": [155, 271], "frequency_perc": 8, "frequent": [87, 103], "fresh": 207, "fridai": 134, "friendli": [134, 135], "from": [0, 2, 3, 4, 5, 6, 7, 8, 12, 14, 15, 16, 17, 18, 20, 22, 24, 25, 26, 27, 29, 31, 32, 33, 34, 35, 36, 37, 45, 48, 49, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 122, 123, 124, 125, 127, 128, 129, 131, 132, 133, 134, 135, 136, 140, 141, 142, 144, 145, 147, 150, 151, 154, 155, 156, 157, 158, 159, 160, 162, 163, 165, 166, 167, 168, 171, 173, 174, 176, 177, 178, 179, 180, 181, 184, 185, 186, 188, 190, 192, 194, 195, 199, 200, 203, 204, 205, 207, 208, 209, 212, 214, 215, 217, 218, 219, 220, 221, 222, 223, 224, 228, 229, 233, 236, 237, 238, 239, 249, 253, 254, 255, 256, 258, 262, 264, 265, 268, 269, 270, 272, 273, 274, 275, 276, 279, 281, 283, 284, 285, 287], "front": [0, 1, 15, 22, 26, 134, 169, 171, 180, 186, 256, 285], "frontal": 7, "frontend": 136, "frontstyl": 176, "frozen": 85, "fr\u00f6hlich": [134, 137, 207, 217, 257], "ft": 131, "ftime": 206, "full": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 65, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 209, 210, 211, 212, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "fuller": 185, "fulli": [101, 215], "fullwidth": [161, 163, 269], "func": [48, 135], "function": [6, 7, 17, 23, 28, 31, 32, 37, 41, 43, 48, 50, 51, 52, 53, 60, 61, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 90, 94, 97, 98, 105, 107, 112, 116, 117, 130, 133, 134, 135, 136, 138, 145, 154, 159, 161, 162, 163, 164, 168, 173, 202, 207, 208, 212, 213, 259, 270, 271, 273, 276, 277], "function_nam": 135, "fundament": 136, "further": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 20, 21, 23, 25, 26, 27, 29, 31, 85, 101, 115, 135, 136, 181, 207, 208, 228, 265, 282, 283], "furthermor": [126, 128, 171, 238], "futur": [134, 135, 215], "futurewarn": [134, 215], "g": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 29, 31, 32, 33, 34, 35, 36, 40, 41, 43, 46, 47, 49, 53, 56, 57, 59, 64, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 99, 101, 103, 104, 109, 110, 111, 112, 114, 116, 117, 118, 119, 122, 124, 125, 127, 128, 129, 130, 131, 132, 133, 134, 135, 144, 145, 146, 150, 160, 163, 165, 168, 171, 179, 181, 182, 187, 189, 196, 198, 207, 208, 209, 211, 212, 215, 218, 219, 221, 222, 223, 236, 253, 258, 259, 263, 273, 275, 277, 278, 279, 282, 283, 285], "g0": [144, 196, 277], "g1": 165, "g10": 223, "g170": 144, "g2": 19, "g30": 277, "g4": 219, "g47": [11, 146], "g600": 103, "g_n": 104, "ga": 134, "gall": 236, "galleri": [138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 215, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 256, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285, 286], "gallery_head": 134, "gap": [1, 2, 3, 10, 11, 12, 15, 16, 24, 31, 97, 112, 117, 119, 131, 175, 176, 178], "gather": 135, "gaussian": [87, 97, 103, 106, 107, 161, 163, 269, 271], "gb": 186, "gbisqu": [250, 251, 252, 253], "gblack": 171, "gblue": 182, "gcc": 208, "gcmt": [14, 134], "gcp": 269, "gdal": [6, 10, 117, 134, 208, 269], "gdarkgrai": 269, "gdf": [177, 185, 212], "gdodgerblu": 179, "gdodgerblue4": 186, "gebco": [78, 134], "gebcosi": [78, 134], "gener": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 42, 49, 56, 57, 58, 59, 61, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 136, 137, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 208, 209, 210, 211, 212, 213, 217, 218, 219, 221, 222, 223, 224, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 256, 257, 263, 264, 265, 266, 267, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285, 286], "genericmappingtool": [134, 135, 137, 215], "gentoo": 202, "geo": [6, 7, 78, 131, 133, 135, 145, 210, 264, 270], "geo_interfac": 134, "geoarrow": 136, "geoda": 185, "geodacent": 185, "geodatafram": [4, 8, 15, 16, 18, 25, 29, 31, 33, 34, 35, 36, 112, 114, 117, 118, 119, 122, 123, 124, 125, 127, 128, 132, 134, 136, 177, 185, 207, 282], "geodataset": [134, 177, 185], "geodes": [112, 118, 131], "geodesi": 29, "geodet": 166, "geogc": 166, "geograph": [0, 1, 2, 4, 5, 6, 7, 9, 11, 15, 16, 22, 26, 27, 30, 31, 32, 33, 34, 35, 36, 85, 89, 99, 101, 103, 104, 106, 107, 108, 109, 110, 111, 112, 114, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 130, 131, 132, 133, 134, 150, 169, 177, 180, 185, 190, 199, 207, 234, 245, 248, 250, 253, 256, 266, 279], "geoid": [73, 74, 134], "geojson": [134, 177, 185, 212], "geolog": 156, "geologi": 84, "geometr": [0, 1, 15, 22, 26, 134, 136, 169, 205, 256], "geometri": [0, 2, 15, 22, 43, 46, 49, 53, 64, 87, 103, 117, 134, 136, 169, 180, 185, 212, 256, 282], "geopackag": [177, 185], "geopanda": [0, 2, 4, 8, 15, 16, 18, 22, 25, 29, 31, 33, 34, 35, 36, 112, 114, 117, 118, 119, 122, 123, 124, 125, 127, 128, 132, 134, 169, 180, 185, 207, 208, 256, 282], "geophys": [133, 137, 207], "georeferenc": [27, 85], "geoseri": 136, "geospati": [133, 136, 137, 207, 212, 217], "geotiff": [6, 19, 134, 136, 166], "geotransform": [166, 269], "geoz": 131, "gerardu": 233, "german": [241, 242, 243, 244, 248], "germani": [186, 209], "get": [3, 17, 26, 40, 47, 48, 49, 53, 103, 108, 114, 115, 126, 127, 128, 133, 134, 139, 144, 150, 157, 162, 163, 179, 195, 202, 208, 215, 217, 228, 257, 268, 285], "get_path": [177, 185], "gfill": 29, "ggold": 171, "ggrai": [171, 264], "ggray30": 186, "ggrei": 264, "gh": [134, 215], "gheert": 233, "ghostscript": [17, 121, 134, 208], "gi": 137, "gif": 6, "git": [47, 134, 135, 215], "github": [134, 137, 139, 185, 202, 207, 217], "github_token": 134, "gitignor": 135, "gitter": 134, "give": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 78, 97, 98, 101, 103, 104, 109, 110, 111, 112, 116, 117, 122, 123, 124, 125, 126, 127, 128, 130, 131, 132, 134, 135, 150, 157, 171, 172, 178, 179, 193, 200, 207, 215, 223, 228, 235, 250, 251, 252, 253, 260, 265, 277, 285], "given": [3, 4, 6, 8, 14, 15, 16, 17, 18, 20, 21, 22, 25, 26, 28, 29, 31, 33, 34, 35, 36, 41, 50, 51, 52, 53, 61, 64, 87, 88, 89, 97, 98, 99, 100, 101, 103, 104, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 131, 132, 134, 135, 143, 144, 148, 150, 154, 176, 199, 209, 210, 211, 219, 238, 269, 271, 278, 282, 285], "glibc2": 208, "glightblu": 171, "glightbrown": 147, "glightgrai": [155, 156, 200], "glightr": 272, "global": [6, 14, 32, 65, 112, 122, 124, 126, 127, 128, 134, 152, 161, 162, 163, 187, 189, 207, 208, 209, 218, 231, 232, 241, 242, 243, 244, 245, 246, 247, 248, 270, 277], "globe": [145, 223, 228, 238, 270, 277, 283], "gloss": 207, "gmagenta4": 186, "gmt": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 20, 23, 25, 26, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 90, 91, 92, 93, 96, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 145, 148, 149, 150, 153, 160, 161, 163, 165, 171, 175, 178, 179, 187, 197, 200, 207, 209, 210, 212, 215, 216, 217, 240, 245, 250, 257, 261, 262, 269, 270, 275, 278, 279, 281, 285], "gmt_cachedir": 129, "gmt_call_command": 135, "gmt_call_modul": 41, "gmt_close_virtualfil": 49, "gmt_compat": [65, 134], "gmt_container_and_data": 43, "gmt_container_onli": [43, 49], "gmt_create_sess": 42, "gmt_cube": 43, "gmt_custom_lib": 65, "gmt_data_onli": 43, "gmt_data_serv": 65, "gmt_data_server_limit": 65, "gmt_data_update_interv": 65, "gmt_datadir": 129, "gmt_dataset": [43, 57, 58, 134], "gmt_destroy_sess": [44, 48], "gmt_doubl": 43, "gmt_enable_openmp": 134, "gmt_enum_read": 53, "gmt_export_typ": 65, "gmt_extrapolate_v": 65, "gmt_fft": 65, "gmt_get_common": 134, "gmt_get_enum": 134, "gmt_graphics_dpu": 65, "gmt_graphics_format": 65, "gmt_grid": [43, 57, 134], "gmt_grid_head": 134, "gmt_grid_node_reg": 43, "gmt_grid_pixel_reg": 43, "gmt_histori": 65, "gmt_imag": [43, 134], "gmt_in": 49, "gmt_inquire_virtualfil": 134, "gmt_int": 49, "gmt_interpol": [65, 245], "gmt_is_cub": 43, "gmt_is_dataset": [43, 49, 50, 52, 53, 64], "gmt_is_dupl": 49, "gmt_is_grid": 43, "gmt_is_imag": 43, "gmt_is_matrix": [43, 51, 64], "gmt_is_point": [43, 49, 53, 64], "gmt_is_refer": 49, "gmt_is_vector": [43, 51, 64], "gmt_languag": [18, 65], "gmt_library_path": [37, 134, 208, 259], "gmt_matrix": [43, 50, 51, 56, 57], "gmt_max_cor": 65, "gmt_option": 41, "gmt_out": 49, "gmt_pad_default": 43, "gmt_paramet": 135, "gmt_put_matrix": 50, "gmt_put_str": [51, 134], "gmt_put_vector": 52, "gmt_read_data": [53, 134], "gmt_read_norm": 53, "gmt_read_virtualfil": 134, "gmt_session_extern": 40, "gmt_session_nam": 134, "gmt_session_nogdalclos": 134, "gmt_sharedir": 130, "gmt_str16": 134, "gmt_theme": 65, "gmt_triangul": [65, 126, 127, 128], "gmt_userdir": 129, "gmt_vector": [43, 51, 52], "gmt_verbos": [65, 135], "gmt_vf_len": 134, "gmt_via_matrix": [50, 64], "gmt_via_vector": [49, 52, 64], "gmt_with_str": 43, "gmt_write_data": 64, "gmtapi_ctrl": [42, 44], "gmtbinstat": 33, "gmtcliberror": [41, 47, 50, 51, 52, 53, 64], "gmtclibnosessionerror": 37, "gmtclibnotfounderror": 37, "gmtdataarrai": 134, "gmtdataarrayaccessor": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 115, 134], "gmterror": 133, "gmtfile_path": 130, "gmtinfo": [114, 134], "gmtinvalidinput": [41, 46, 134], "gmtlogo": 13, "gmtmex": 207, "gmtread": 269, "gmtsampledata": 134, "gmtselect": [119, 134], "gmttempfil": [37, 49, 54, 56, 57, 59, 60, 61, 62, 63], "gmtwhich": [129, 134], "gnomon": [0, 2, 22, 224, 240, 256, 263], "go": [17, 20, 118, 131, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 209, 210, 211, 212, 215, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "goal": 135, "goe": [118, 135, 237, 276], "gold": [146, 170, 198, 206], "gold2": 196, "good": [125, 135, 207, 208, 210, 215, 218, 285], "googl": [19, 134, 137], "gorang": 186, "govern": 135, "gp8": 171, "gpd": [177, 185, 212], "gpink": 186, "gpkg": [177, 185], "grab": 215, "gradat": 3, "gradient": [0, 3, 6, 21, 22, 24, 65, 78, 79, 104, 116, 124, 134, 167, 169, 256], "grai": [6, 7, 11, 17, 98, 105, 106, 116, 146, 160, 162, 168, 172, 183, 184, 186, 187, 191, 209, 264, 272, 277, 283], "grain": 275, "grand": 185, "grant": [207, 217], "graph": [0, 1, 12, 15, 22, 65, 134, 142, 169, 256, 266, 276], "graphic": [2, 217], "gratier": 134, "graviti": [78, 79, 134], "gray10": 185, "gray30": [150, 172, 177, 186, 191, 285], "gray40": 196, "gray50": [1, 2, 3, 11, 177, 187, 209, 277], "gray73": 204, "gray80": [230, 231, 232, 233, 234, 235, 236, 237, 238], "gray90": [225, 226, 227, 228], "gray95": 177, "grayscal": 17, "grayshad": [2, 10], "grayton": [105, 106], "grd": [5, 6, 7, 33, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 117, 122, 123, 124, 125, 128, 132, 134, 154, 269], "grd2cpt": [106, 107, 134], "grd2xyz": [134, 271], "grd_age": 269, "grd_relief": [269, 277], "grdblend": [161, 163, 269], "grdclip": [134, 161, 167, 256], "grdcontour": [134, 210, 267], "grdcut": 134, "grdfile": [33, 34, 35, 36, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 132], "grdfill": 134, "grdfilter": [87, 134], "grdgradient": [6, 7, 134, 162, 163, 167, 256], "grdgradient_shad": [163, 167, 256], "grdhisteq": [6, 134, 271], "grdimag": [27, 98, 104, 105, 106, 134, 135, 145, 154, 160, 161, 162, 163, 164, 166, 168, 190, 210, 267, 270, 271, 277], "grdinfo": [37, 56, 101, 134], "grdlandmask": [134, 164, 167, 256], "grdmath": 6, "grdproject": 134, "grdsampl": 134, "grdtrack": [134, 160, 168], "grdtrack_stacked_profil": 112, "grdview": [104, 105, 106, 134, 135, 138, 264, 269], "grdview_surfac": [138, 140, 256], "grdvolum": 134, "great": [0, 1, 2, 15, 16, 22, 112, 118, 131, 160, 169, 180, 186, 221, 256], "great_circl": [173, 180, 256], "greatli": 221, "gred": [4, 5, 11, 182, 193, 272], "gred3": [146, 186], "greek": [226, 273], "green": [135, 152, 166, 212, 280, 285], "green3": [148, 170, 268], "green4": 175, "greenwich": [131, 166], "greenwichgeographic_crs_nam": 166, "greenwood": 185, "grei": [191, 276], "greiffendorff": [241, 242], "grid": [0, 1, 3, 5, 6, 7, 8, 20, 21, 22, 24, 32, 33, 34, 35, 36, 37, 43, 47, 50, 53, 54, 56, 57, 60, 61, 63, 65, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 88, 89, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 115, 116, 117, 119, 122, 123, 124, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 138, 145, 154, 160, 166, 167, 168, 169, 207, 208, 210, 211, 212, 217, 256, 264, 267, 268, 270, 274, 275, 286], "grid2": 32, "grid_dist": 271, "grid_equ": [256, 271, 274], "grid_glob": 145, "grid_map": 160, "grid_subset": 145, "gridformat": 134, "gridlin": [1, 5, 6, 7, 18, 32, 33, 34, 35, 36, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 88, 98, 99, 103, 108, 109, 110, 111, 114, 117, 122, 123, 124, 125, 128, 132, 134, 138, 141, 143, 156, 160, 184, 210, 211, 251, 277, 283], "gridmask": 119, "gridregistr": 134, "gridtyp": 134, "grinten": [0, 2, 22, 240, 249, 256, 263], "ground": 166, "group": [2, 15, 112, 215, 259], "grow": 233, "grund": [134, 137, 207, 217, 257], "gs_option": [17, 19, 22], "gs_path": [17, 19, 22, 134], "gseagreen": 186, "gshhg": [71, 75, 134], "gt": 166, "gtan": 171, "gthread": 134, "gtomato": 186, "gtype": [32, 56, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 108, 134], "guadalquivir": 177, "guam": 210, "guarante": [109, 119], "guid": [134, 207, 257], "guidelin": [134, 215], "gunzip": 115, "gwhite": [12, 147, 150, 160], "gz": 115, "h": [2, 3, 4, 8, 15, 16, 18, 21, 26, 28, 29, 31, 33, 34, 35, 36, 46, 58, 87, 97, 98, 99, 103, 106, 107, 109, 112, 116, 117, 118, 119, 122, 125, 127, 128, 130, 132, 144, 153, 160, 163, 175, 181, 182, 196, 243, 245, 253, 258, 263, 266, 268, 275, 278], "h0": [181, 182, 196], "h10c": [153, 186], "h12c": 243, "h5": 130, "h5py": 115, "ha": [6, 21, 26, 28, 34, 35, 36, 46, 99, 102, 105, 106, 107, 112, 117, 118, 119, 121, 130, 134, 135, 139, 176, 178, 198, 200, 207, 209, 213, 215, 216, 217, 227, 233, 238, 246, 265, 269, 271, 272, 276, 279], "hacht": 200, "hachur": [0, 1, 2, 8, 14, 15, 18, 22, 23, 25, 26, 29, 31, 169, 205, 256, 261], "hackmd": 215, "had": 233, "hain": 166, "half": [18, 24, 97, 99, 103, 112, 134, 181, 265, 269, 276], "halv": 112, "hammer": [0, 2, 22, 240, 248, 249, 256, 263], "hand": [56, 57, 59, 131, 225], "handl": [0, 8, 15, 16, 26, 33, 34, 35, 36, 41, 112, 114, 115, 117, 123, 125, 130, 132, 133, 134, 135, 139, 172, 202, 209, 215, 266, 267, 275, 276, 278, 279, 280, 282, 285], "happen": [17, 37, 98, 116, 133, 135, 207, 208, 275], "happi": 207, "hardwar": 136, "hardwir": [104, 118], "harmon": [122, 125], "harsh": 215, "hasattr": 85, "hash": [135, 215], "hassler": 228, "have": [3, 4, 6, 7, 8, 10, 12, 15, 16, 18, 19, 24, 26, 29, 31, 33, 34, 35, 36, 43, 45, 49, 51, 64, 78, 97, 99, 103, 104, 105, 106, 108, 109, 110, 111, 112, 117, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 134, 135, 136, 139, 148, 157, 171, 179, 202, 207, 208, 209, 210, 211, 212, 215, 217, 238, 253, 265, 266, 267, 268, 269, 271, 272, 273, 275, 276, 281], "haven": 215, "hawai": 166, "hawaii": 144, "hawai\u02bbi": [45, 166, 217], "haxbi": 267, "hdf": 115, "he": 228, "head": [0, 1, 15, 18, 22, 24, 26, 29, 99, 130, 169, 176, 177, 180, 182, 207, 215, 228, 256, 275, 276, 281], "header": [4, 8, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 43, 46, 53, 58, 62, 98, 99, 106, 107, 108, 112, 116, 117, 118, 119, 122, 123, 125, 127, 128, 132, 134, 135], "hear": 135, "height": [10, 11, 12, 17, 21, 24, 28, 113, 134, 147, 150, 157, 160, 199, 219, 240, 250, 251, 252, 263, 264, 266, 272, 275], "heinrich": [222, 225, 227, 237], "help": [98, 116, 136, 207, 215, 268, 281, 285], "helper": [37, 49, 54, 56, 57, 59, 60, 61, 62, 63, 134], "helvetica": [26, 28, 29, 182, 196, 197, 207, 208, 260, 273, 285], "hemispher": [84, 209, 220, 222, 223, 235], "henc": [6, 114, 176, 195, 231], "here": [1, 2, 3, 6, 8, 11, 17, 18, 21, 104, 109, 112, 117, 125, 130, 133, 135, 138, 148, 156, 166, 171, 172, 178, 179, 181, 185, 195, 198, 202, 209, 210, 215, 238, 259, 265, 266, 269, 271, 273, 277, 281, 282, 285], "hesit": 135, "hex": [187, 209, 278], "hexagon": 196, "hh": 268, "hham": 268, "hi": 45, "hide": 134, "hierarch": [2, 98, 109, 116, 119, 136, 145], "high": [3, 5, 9, 13, 30, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86, 97, 100, 105, 107, 113, 136, 145, 201, 217, 261, 267, 275, 278], "higher": [2, 6, 27, 69, 70, 71, 72, 73, 74, 77, 78, 79, 80, 81, 82, 83, 85, 86, 98, 109, 116, 119, 130, 190, 210, 236, 270], "highest": [3, 98, 116, 135], "highest_valu": [139, 164, 202], "highli": 135, "highlight": [0, 2, 22, 105, 106, 135, 146, 147, 169, 175, 188, 215, 256, 272], "highresboundingbox": 17, "hillshad": 162, "hint": 134, "hiresboundingbox": 17, "histogram": [0, 1, 3, 6, 12, 15, 18, 20, 21, 22, 24, 65, 78, 98, 99, 103, 105, 106, 107, 116, 134, 156, 158, 200, 256, 274, 286], "histtyp": [8, 155, 157, 265, 271], "hline": 134, "hold": [37, 43, 112, 215], "hole": [84, 102], "homalograph": 244, "home": [134, 185, 208, 212, 269], "homepag": 134, "honolulu": 153, "honor": 15, "hook": [134, 135], "horizon": [162, 186, 218, 219, 220, 221, 222, 223, 240, 263], "horizont": [0, 1, 3, 8, 9, 11, 15, 20, 22, 24, 26, 28, 29, 116, 118, 134, 144, 148, 150, 157, 160, 169, 179, 181, 199, 205, 256, 268, 275, 276, 277, 285], "host": [135, 166, 210, 212], "hot": [27, 85], "hotosm": 166, "hotpot": 84, "hotspot": [84, 134], "houpert": 134, "hour": [8, 15, 16, 18, 23, 26, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132, 152, 268], "hourli": [8, 15, 16, 18, 26, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132], "how": [15, 16, 20, 26, 33, 34, 35, 36, 53, 64, 87, 98, 103, 104, 112, 114, 116, 117, 125, 126, 127, 128, 130, 131, 134, 135, 139, 143, 145, 148, 150, 154, 162, 171, 179, 202, 207, 210, 215, 257, 264, 268, 273, 285, 286], "howev": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 104, 130, 209, 210, 231, 268, 273, 275, 276, 283], "howto": [134, 137], "hq": 137, "hr": 131, "hsv": [98, 116], "html": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 139, 144, 145, 148, 171, 178, 179, 181, 197, 202, 204, 210, 215, 266, 270, 278, 285], "html_baseurl": 134, "htmlcov": 135, "http": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 23, 24, 25, 26, 27, 29, 31, 33, 34, 35, 36, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 137, 138, 139, 144, 145, 148, 152, 160, 161, 163, 165, 166, 171, 178, 179, 181, 185, 190, 197, 202, 204, 207, 208, 210, 215, 266, 269, 270, 283, 285], "hui": [134, 137, 207], "humanitarian": [27, 85], "hurrican": 197, "hyperleg": 134, "hyphen": [101, 119, 134, 135], "hypothet": [84, 156], "i": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 56, 57, 60, 61, 62, 63, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 141, 144, 145, 146, 147, 148, 150, 152, 155, 156, 160, 163, 164, 166, 168, 171, 172, 173, 174, 175, 176, 178, 179, 181, 183, 184, 185, 190, 191, 195, 196, 197, 199, 200, 201, 203, 206, 207, 208, 209, 210, 211, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 256, 257, 258, 259, 262, 263, 264, 265, 266, 267, 268, 269, 270, 272, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "i0": [196, 198, 201, 268], "i1": 199, "i10": 18, "i12c": 246, "i4": 195, "ibcso": 137, "ibord": 109, "ic": 78, "icc": 17, "icc_grai": 134, "iceland": 161, "id": [123, 126, 134, 135, 213], "idaho": 276, "iddl": [26, 28, 144, 150, 285], "idea": [130, 135, 217], "ideal": [104, 135], "ident": [269, 282], "identifi": [102, 130, 215, 275], "igh": [2, 109, 119], "ight": [24, 26, 28, 144, 150, 285], "ignacio": 134, "ignor": [8, 14, 15, 18, 19, 43, 61, 62, 69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86, 98, 103, 104, 108, 112, 117, 118, 119, 129, 132, 134, 269], "igpp": [70, 72, 78, 79, 134], "il": [15, 16, 31, 112, 117, 119], "illumin": [3, 6, 7, 15, 16, 29, 104, 138, 162, 163, 269], "illustr": [17, 24, 133, 134], "ilomet": [15, 16, 31, 112, 117, 119], "im": 134, "imag": [0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 25, 26, 29, 31, 43, 47, 53, 54, 61, 63, 65, 67, 68, 78, 85, 104, 105, 106, 120, 134, 136, 167, 208, 215, 219, 256, 259, 260, 262, 274, 286], "imagefil": [10, 165], "imageri": 166, "img": [103, 108, 112, 166], "img_in": 6, "img_out": 134, "imit": 219, "immedi": [131, 135, 268], "impact": 215, "implement": [41, 43, 134, 135, 136, 177, 207, 215, 266], "impli": [6, 11, 24, 110, 112], "implicitli": [69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86], "import": [0, 2, 3, 5, 6, 7, 9, 11, 21, 23, 28, 30, 32, 34, 35, 36, 37, 45, 48, 49, 54, 56, 57, 58, 59, 60, 61, 62, 63, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 109, 110, 111, 112, 113, 117, 119, 120, 122, 123, 124, 125, 132, 134, 135, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 208, 209, 210, 211, 212, 213, 215, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "importerror": [85, 134], "importlib": 134, "impos": [15, 16, 17, 31, 112, 117, 119, 125], "improv": [135, 207, 215], "inact": 257, "inc": [4, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 43, 98, 99, 112, 114, 116, 117, 119, 122, 125, 127, 128, 132, 138], "inch": [3, 11, 13, 21, 22, 25, 26, 31, 46, 110, 119, 209, 276], "inclass": 137, "includ": [7, 8, 15, 18, 19, 56, 57, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 97, 98, 108, 109, 112, 116, 117, 118, 121, 131, 133, 134, 135, 136, 139, 187, 197, 198, 200, 202, 207, 209, 212, 215, 257, 261, 267, 268, 272, 276, 280, 281, 283, 285], "inclus": [134, 257], "incol": [4, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 99, 112, 114, 117, 119, 122, 125, 127, 128, 132, 134, 215], "incom": [3, 15, 98, 116, 132], "incompat": [96, 121, 134, 208, 215], "incomplet": 136, "inconveni": 104, "incorrect": [134, 273], "increas": [24, 98, 116, 118, 134, 135, 221, 222, 223, 237, 268, 276], "increment": [33, 34, 35, 36, 43, 46, 87, 99, 103, 108, 109, 110, 111, 114, 117, 118, 119, 122, 123, 124, 125, 128, 132, 134, 155, 195, 283], "indent": 182, "independ": [26, 97, 136, 150, 285], "index": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 20, 23, 25, 26, 29, 31, 60, 62, 99, 129, 131, 134, 135, 166, 208, 215, 275], "index_col": 62, "indic": [1, 2, 3, 4, 7, 8, 11, 15, 16, 18, 25, 26, 29, 31, 33, 34, 35, 36, 49, 58, 70, 87, 97, 99, 101, 103, 106, 109, 110, 111, 112, 117, 119, 122, 123, 124, 125, 127, 128, 131, 132, 135, 136, 143, 195, 209, 212, 215, 253, 258, 275, 285], "indirectli": 101, "individu": [1, 2, 3, 4, 8, 11, 15, 16, 17, 18, 24, 25, 29, 31, 33, 34, 35, 36, 99, 112, 114, 117, 119, 122, 125, 127, 128, 132, 133, 134, 139, 150, 173, 181, 186, 195, 196, 197, 199, 202, 206, 212, 275], "inf": 101, "infer": [78, 134], "inferno": 202, "infil": [53, 134], "infin": [130, 131, 237], "infinit": 223, "influenc": [44, 119], "info": [26, 37, 49, 57, 59, 60, 108, 134, 139, 202, 268], "inform": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 45, 47, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 121, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 136, 152, 171, 179, 207, 208, 210, 212, 215, 257, 261, 268, 276, 283], "ingest": [4, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 112, 114, 117, 119, 122, 125, 127, 128, 132], "inher": 130, "inherit": 20, "initi": [11, 14, 20, 33, 34, 35, 36, 97, 101, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 131, 132, 134, 136, 216, 268, 275], "inlin": [22, 120, 134, 135], "inner": [1, 2, 3, 11, 199], "inout": [5, 6, 7, 33, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 117, 122, 123, 124, 125, 128, 132], "inplac": 32, "input": [0, 1, 4, 5, 6, 7, 8, 12, 14, 15, 16, 17, 18, 22, 25, 26, 29, 31, 33, 34, 35, 36, 37, 46, 48, 49, 50, 51, 52, 53, 60, 64, 87, 94, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 125, 126, 127, 128, 132, 134, 139, 143, 156, 162, 163, 168, 169, 171, 179, 182, 195, 199, 202, 203, 205, 210, 213, 214, 250, 253, 256, 264, 267, 268, 270, 276, 282, 283], "input_data": 212, "inquir": [18, 46, 63], "insensit": [4, 8, 15, 16, 18, 26, 29, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132], "insert": [22, 135, 215], "inset": [0, 1, 2, 15, 22, 98, 116, 134, 151, 169, 256, 274, 286], "inset_rectangle_region": [147, 151, 256], "insid": [4, 11, 12, 14, 15, 16, 29, 34, 37, 55, 57, 59, 60, 75, 101, 103, 109, 113, 117, 119, 123, 135, 144, 146, 147, 150, 154, 160, 193, 207, 208, 215, 266, 272, 275], "inspect": 135, "instal": [10, 85, 121, 126, 127, 128, 134, 135, 136, 213, 259], "instanc": [3, 7, 32, 56, 150, 160, 170, 175, 209, 211, 271, 275, 277], "instead": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 54, 56, 57, 59, 64, 72, 97, 98, 99, 103, 108, 109, 110, 111, 112, 114, 116, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 129, 132, 134, 135, 144, 150, 156, 171, 176, 179, 195, 208, 210, 215, 238, 253, 262, 268, 272, 273, 275, 276, 277, 283, 285], "institut": 137, "instruct": [6, 85, 134, 135, 137, 148, 207, 208, 215], "int": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 26, 27, 29, 31, 33, 34, 35, 36, 40, 43, 46, 50, 52, 54, 62, 85, 87, 97, 98, 99, 103, 106, 107, 108, 109, 110, 111, 112, 117, 119, 122, 125, 127, 128, 130, 132, 134, 136, 139, 202, 276, 277], "int16": [50, 52, 134], "int16_t": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132], "int32": [50, 52, 134], "int32_t": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132], "int64": [50, 52, 134, 166, 277], "int640crs_wkt": 166, "int641": 166, "int64_t": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132], "int8": [50, 52, 75, 134], "int8_t": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132], "intact": [98, 116], "integ": [3, 33, 34, 35, 36, 40, 43, 87, 98, 99, 100, 103, 109, 110, 111, 116, 117, 122, 123, 124, 125, 128, 132, 134, 190, 209], "integr": [133, 134, 135, 136, 207, 217], "inten": 29, "intend": 210, "intens": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 163], "intensfil": 6, "interact": [0, 2, 3, 6, 22, 78, 116, 134, 136, 217, 256, 274, 286], "interchang": 262, "interest": [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 18, 23, 24, 26, 29, 31, 33, 34, 35, 36, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 117, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 138, 156, 161, 162, 164], "interfac": [133, 136, 207, 217], "interfer": 208, "interior": [24, 125], "intermedi": [112, 125, 134, 245, 278], "intermitt": 2, "intern": [8, 130, 134, 209, 257, 265, 283], "internet": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 136], "interplai": 134, "interpol": [3, 6, 7, 17, 97, 98, 104, 110, 111, 112, 116, 124, 128, 130, 135, 164, 245], "interpret": [9, 14, 15, 16, 25, 30, 115, 134, 176, 207, 208, 253, 281], "interquartil": 33, "intersect": [130, 283], "interv": [1, 3, 4, 5, 8, 18, 32, 98, 106, 112, 113, 116, 123, 134, 139, 144, 155, 159, 164, 174, 202, 210, 267, 268, 270], "intro": [134, 208, 214, 256], "introduc": [134, 135, 136, 228], "introduct": [134, 197, 207], "intuit": 136, "inut": [15, 16, 31, 112, 117, 119], "invalid": [50, 51, 52, 64, 94, 134], "invent": 237, "invers": [6, 110, 171], "invert": [173, 196, 200, 201], "invis": [3, 11, 176], "invok": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86], "involv": [37, 207, 228, 257, 268, 275], "io": [12, 58, 115, 134, 137, 185, 215], "io_col_separ": 65, "io_first_head": 65, "io_gridfile_format": 65, "io_gridfile_shorthand": 65, "io_head": 65, "io_header_mark": 65, "io_lonlat_toggl": 65, "io_n_header_rec": 65, "io_nan_record": 65, "io_nc4_chunk_s": 65, "io_nc4_deflation_level": 65, "io_segment_binari": 65, "io_segment_mark": 65, "ipykernel": 208, "ipynb": [138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 209, 210, 211, 212, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "ipython": [134, 135, 208], "ircl": 176, "iri": [137, 139], "irregular": 134, "irrelev": 135, "irrig": 2, "isinst": [54, 61, 62, 63], "island": [2, 75, 109, 119, 210, 278], "isn": 135, "iso": [0, 2, 26, 45, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 134, 198, 209, 225, 230, 273, 279], "iso8601": 134, "iso_3166": 283, "isol": [135, 208], "isolatin1": [26, 134, 273], "isort": 134, "isotrop": 103, "issu": [20, 134, 135, 136, 207, 217], "ital": [206, 260], "itali": 186, "italic": 135, "item": [1, 2, 3, 4, 8, 11, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132, 148, 204, 215, 268], "iter": [125, 277], "its": [3, 6, 14, 26, 28, 29, 46, 98, 110, 112, 115, 116, 118, 133, 134, 136, 146, 147, 160, 186, 207, 208, 209, 219, 228, 233, 248, 251, 252, 268, 269, 272], "itself": [121, 208], "iv": [0, 2, 22, 240, 249, 256, 263], "ivori": [241, 242, 243, 244, 245, 246, 247, 248], "ixel": 111, "j": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 23, 24, 26, 27, 29, 31, 46, 101, 110, 112, 119, 127, 128, 131, 132, 134, 144, 148, 150, 160, 179, 199, 206, 215, 234, 247, 258, 263, 272, 275], "j120": 199, "jack": 134, "jami": [134, 207], "januari": 152, "japan": [0, 84, 147, 281, 283], "japan_quak": [84, 154, 281], "japanes": 134, "jason": 134, "java": 285, "jbc": [143, 163], "jbl": [144, 150, 272], "jbr": [11, 147, 148, 150, 160], "jcm": 165, "jg": 134, "ji": [134, 137, 207, 217, 257], "jiayuan": [134, 207, 257], "jing": [134, 137, 207], "jl": 207, "jml": [162, 185], "jmr": [138, 144, 150, 161, 164, 183, 271], "job": 134, "johann": [222, 227, 237], "join": [0, 45, 139, 202], "joint": [0, 1, 15, 21, 22, 26, 65, 112, 134, 169, 180, 256], "jone": [134, 137, 207, 217, 257], "jp": [0, 137, 147, 283], "jpeg": [17, 19, 134], "jpg": [6, 19, 165, 217], "json": [134, 208], "jss": 18, "jtc": 179, "jtl": [11, 141, 146], "jtr": [12, 144, 148, 149], "julia": 207, "juliu": 134, "jump": 130, "jun": 268, "junction": 248, "june": 23, "jupyt": [22, 120, 133, 134, 135, 136, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 209, 210, 211, 212, 213, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "just": [6, 7, 29, 57, 97, 99, 104, 108, 109, 112, 118, 119, 127, 128, 133, 135, 176, 207, 208, 227, 260, 275, 278, 281], "justif": [3, 11, 20, 24, 26, 28, 112, 134, 179, 181, 206], "justifi": [3, 10, 11, 12, 13, 14, 26, 28, 31, 134, 150, 153, 171, 175, 176, 178, 179, 181, 200, 206, 211, 273, 285], "jx": [18, 25], "jx10c": 41, "jx5i": 46, "jz": [1, 7, 16], "k": [15, 16, 31, 33, 34, 35, 36, 98, 99, 103, 109, 110, 111, 112, 116, 117, 119, 122, 123, 124, 125, 128, 131, 132, 134, 135, 150, 171, 197, 242, 258, 263], "kadatatlu": 134, "kamenetskii": 236, "karl": 244, "kastroid": 197, "kathryn": [134, 207], "kc": 276, "keep": [112, 115, 123, 125, 131, 132, 134, 135, 215, 233, 264, 267], "kei": [14, 112, 131, 134, 135, 215], "kentucki": 186, "kenwood": 185, "kept": [32, 119], "kernel": [134, 136, 208], "kernelspec": 208, "keyword": [19, 22, 27, 134, 135], "kf": [241, 263], "kf12c": 241, "kflash": 197, "khaki": [209, 218, 219, 220, 221, 222, 223], "khurrican": 197, "kilic": 134, "kilomet": [14, 71, 87, 103, 110, 123, 131, 150, 154], "kind": [53, 54, 60, 61, 62, 63, 105, 131, 134, 135], "kishor": 134, "klima": 134, "km": [2, 18, 33, 34, 35, 36, 74, 87, 103, 109, 110, 111, 112, 117, 118, 119, 122, 123, 124, 125, 128, 131, 132, 147, 161, 163, 166, 173, 219, 269, 281, 285], "kml": [19, 134], "knot": 131, "know": [135, 136, 217], "knowledg": [130, 135], "known": [100, 135, 208, 233, 243, 246], "ks12c": 242, "kstar4": 197, "kvolcano": 197, "kwarg": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 29, 31, 33, 34, 35, 36, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 215, 269], "kwargs_to_str": [134, 215], "ky": 186, "l": [1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 15, 16, 18, 24, 26, 28, 29, 31, 33, 34, 35, 36, 87, 97, 98, 99, 104, 108, 109, 110, 111, 112, 114, 116, 117, 118, 119, 122, 123, 125, 127, 128, 129, 130, 132, 134, 135, 141, 144, 148, 150, 160, 163, 164, 176, 177, 179, 181, 183, 186, 206, 210, 211, 227, 251, 258, 263, 265, 275, 277, 278, 279, 285], "l0": [56, 130, 285], "l1": [8, 97, 104, 108, 112], "l2": 104, "l3": 206, "l6": 87, "l_": 118, "l_max": 118, "l_min": 118, "la": 132, "lab": [185, 277], "label": [0, 1, 2, 3, 4, 5, 8, 9, 12, 13, 14, 15, 16, 18, 20, 22, 24, 25, 28, 29, 30, 31, 98, 116, 134, 135, 136, 139, 141, 143, 144, 145, 148, 150, 153, 155, 160, 174, 175, 179, 183, 204, 210, 211, 215, 256, 264, 265, 268, 270, 273, 275, 277, 284, 286], "label_plac": [4, 5], "labelbox": 14, "lair": 143, "lajolla": 271, "lake": [2, 75, 109, 119, 134, 209, 278], "lakeshor": [2, 278], "lambert": [0, 2, 22, 134, 186, 220, 224, 229, 237, 240, 256, 263], "lambertian": 104, "land": [0, 1, 2, 11, 22, 23, 45, 71, 74, 75, 78, 109, 119, 134, 146, 147, 150, 152, 153, 154, 164, 168, 169, 177, 184, 186, 188, 191, 200, 207, 208, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 256, 266, 272, 276, 277, 281, 283, 285], "land_and_wat": [187, 188, 256], "landmask": 109, "landmass": [154, 186, 209, 210], "languag": [136, 197, 273], "laplac": [104, 163, 269], "laplacian": 125, "larg": [6, 15, 16, 31, 103, 109, 110, 111, 112, 117, 119, 122, 123, 126, 127, 128, 130, 133, 135, 177, 222, 225, 233, 235, 238, 272, 275], "large_riv": 177, "large_str": 134, "larger": [2, 6, 11, 22, 27, 56, 57, 62, 85, 87, 104, 125, 135, 146, 147, 210, 217, 238, 268, 272, 276, 281], "largest": [18, 87, 134, 156], "last": [8, 14, 15, 16, 18, 21, 24, 25, 46, 112, 132, 134, 147, 199, 215, 276, 285], "lastli": 276, "lat": [11, 32, 56, 75, 99, 101, 112, 119, 123, 124, 130, 134, 199, 263], "lat0": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 18, 23, 25, 26, 29, 31, 186, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 235, 236, 237, 240], "lat1": [225, 226, 227, 235], "lat2": [225, 226, 227], "lat_max": [160, 269], "lat_min": [160, 269], "latc": 112, "later": [60, 139, 176, 202, 208, 209, 210, 213, 215, 235, 265], "latest": [129, 134, 135, 160, 208, 215, 216], "latgrid": 32, "latitud": [4, 9, 14, 26, 27, 29, 32, 33, 34, 35, 36, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 99, 100, 101, 103, 104, 106, 107, 109, 110, 111, 112, 113, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 144, 147, 150, 154, 160, 162, 168, 191, 209, 212, 220, 231, 232, 234, 236, 237, 238, 240, 241, 242, 244, 245, 269, 276, 281, 285], "latitude_of_origin": 166, "latl": 112, "latp": 235, "latr": 112, "latter": [2, 98, 116, 132, 172, 230, 262, 273], "lattic": [109, 123], "launch": [22, 130], "launch_external_view": 134, "law": [17, 281], "lawrenc": 134, "layer": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 23, 25, 26, 29, 31, 43], "layout": [24, 33, 47, 99, 145, 148, 208, 238], "lazi": 115, "lbill": 202, "lborder": 109, "lbtr": 211, "lcount": [154, 155, 157, 265], "lcr": 112, "lcumul": 265, "lcurv": 179, "ldepth": 281, "ldistanc": [160, 273], "lead": [27, 85, 112, 118, 176, 215, 268, 273], "leaman": 134, "learn": [134, 135, 207, 275], "least": [1, 6, 8, 18, 26, 103, 109, 111, 117, 119, 122, 125, 134, 135, 141, 215, 216, 228, 248, 283], "leav": [3, 4, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 49, 98, 99, 112, 114, 116, 117, 119, 122, 125, 127, 128, 132, 135, 207], "led": 230, "left": [3, 8, 11, 20, 24, 26, 28, 44, 97, 99, 104, 110, 112, 118, 132, 134, 141, 144, 146, 147, 150, 153, 160, 170, 172, 176, 181, 182, 209, 235, 253, 265, 268, 272, 275, 276, 279, 283, 285], "legaci": 215, "legend": [0, 1, 4, 5, 8, 9, 15, 16, 21, 22, 30, 58, 134, 139, 141, 151, 169, 174, 185, 197, 202, 205, 211, 256, 265], "lelev": [144, 145, 155, 160, 161, 162, 163, 210, 264, 267, 270, 271, 277], "len": 265, "length": [1, 2, 3, 9, 14, 15, 16, 18, 21, 29, 30, 31, 84, 99, 112, 118, 134, 135, 139, 144, 150, 156, 166, 181, 182, 183, 202, 248, 276], "length_sum": 18, "lengthen": 228, "leonardo": [134, 137, 207, 217, 257], "leong": [134, 137, 207, 217, 257], "leouieda": 257, "less": [4, 5, 27, 85, 87, 103, 125, 136, 206, 219, 238, 268], "lesson": 137, "let": [8, 15, 25, 37, 43, 98, 109, 110, 120, 134, 135, 136, 212, 217, 265, 275, 281], "letter": [23, 24, 26, 98, 116, 118, 144, 206, 211, 235, 240, 268, 273, 279, 285], "level": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 27, 29, 30, 31, 33, 34, 35, 36, 46, 74, 85, 87, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 133, 134, 136, 145, 152, 157, 159, 184, 187, 190, 202, 203, 204, 209, 210, 219, 267, 278], "lfrequenc": 265, "lgap": [1, 2, 3, 11], "li": [119, 125, 221, 223], "liam": [134, 137, 207, 257], "liamtonei": [137, 257], "lib": [37, 45, 46, 48, 49, 54, 58, 61, 62, 63, 208, 212, 269], "libgmt": [37, 48, 208], "librari": [37, 47, 48, 90, 92, 121, 133, 134, 136, 190, 207, 217, 259, 277], "licens": [134, 166], "lie": [119, 218], "life": 135, "light": [6, 7, 23, 104, 152, 162, 163, 187, 200, 260, 272, 283], "lightblu": [2, 11, 23, 146, 152, 160, 178, 191, 193, 207, 208, 209, 210, 272, 276, 277], "lightblue1": 193, "lightbrown": [147, 276], "lightgrai": [155, 156, 196, 199, 200, 210, 269, 283], "lightgreen": 209, "lightital": 260, "lightseagreen": [196, 268], "lightyellow": 272, "like": [32, 41, 60, 98, 115, 116, 133, 134, 135, 136, 139, 150, 178, 187, 202, 207, 208, 209, 215, 217, 220, 222, 223, 227, 236, 238, 266, 268, 275, 276, 278, 282, 283], "likelihood": [33, 87, 97, 103, 112], "likewis": [2, 99, 132], "limeston": 143, "limit": [5, 6, 9, 25, 27, 29, 30, 32, 85, 98, 101, 103, 109, 111, 112, 117, 119, 122, 125, 130, 131, 134, 135, 139, 141, 157, 175, 193, 198, 253, 265, 266, 273], "line": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 15, 16, 18, 21, 22, 23, 24, 25, 26, 29, 30, 31, 33, 34, 35, 36, 58, 61, 65, 78, 99, 106, 108, 109, 112, 116, 117, 118, 119, 122, 125, 126, 127, 128, 132, 133, 134, 135, 136, 141, 151, 159, 160, 173, 180, 181, 184, 189, 193, 196, 207, 208, 209, 211, 217, 220, 221, 230, 231, 232, 233, 234, 237, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 256, 264, 268, 272, 274, 276, 278, 282, 283, 284, 286], "line_cap": 175, "line_custom_cpt": [174, 180, 256], "line_join": 175, "line_segment_end": [175, 180, 256], "linear": [0, 1, 3, 6, 8, 14, 15, 16, 22, 25, 29, 98, 104, 105, 106, 107, 130, 136, 232, 240, 254, 256, 263, 275, 276], "linear_dist": 271, "linearli": 271, "lineat": 104, "linecolor": 196, "linefil": 119, "linefront": [176, 180, 256], "lines_bars_and_mark": 204, "linestr": [0, 2, 15, 22, 134, 169, 180, 256], "linestyl": [178, 180, 256], "linewidth": 196, "link": [37, 134, 135, 215, 258], "linspac": [141, 159, 182, 276], "lint": [134, 135, 215], "linter": 135, "linux": [134, 135, 208, 215], "lip": 176, "list": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 29, 31, 33, 34, 35, 36, 41, 47, 48, 60, 62, 64, 65, 85, 87, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 136, 138, 139, 143, 144, 148, 174, 184, 190, 198, 199, 200, 202, 207, 208, 209, 210, 215, 251, 252, 257, 258, 259, 260, 265, 266, 267, 268, 270, 273, 275, 276, 277, 278, 279, 280, 283, 285], "list_sample_data": [84, 134], "liter": [22, 23, 26, 27, 28, 34, 35, 36, 43, 53, 54, 61, 62, 63, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 97, 99, 106, 112, 113, 118, 119, 120, 127, 134, 135], "littl": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132, 207], "lkm": [150, 154], "ll": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 125, 135, 166, 208, 212, 275, 281], "llength": 268, "llimeston": 143, "lm": [3, 8, 33, 108, 144, 145, 160, 161, 162, 175, 210, 264, 267, 270, 273, 277], "lmyr": 269, "lnt": 183, "loa": 84, "load": [5, 6, 7, 27, 34, 35, 36, 37, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 110, 111, 112, 113, 115, 117, 119, 124, 125, 133, 134, 139, 143, 145, 154, 156, 161, 162, 163, 166, 168, 177, 185, 202, 264, 267, 269, 270, 273, 281], "load_": 134, "load_black_marbl": 134, "load_blue_marbl": 134, "load_dataarrai": 134, "load_earth_ag": 269, "load_earth_deflect": 134, "load_earth_dist": 134, "load_earth_free_air_anomali": 134, "load_earth_geoid": 134, "load_earth_magnetic_anomali": 134, "load_earth_mask": 134, "load_earth_mean_dynamic_topographi": 134, "load_earth_mean_sea_surfac": 134, "load_earth_relief": [5, 6, 7, 32, 87, 98, 99, 100, 101, 103, 104, 106, 107, 110, 111, 112, 113, 134, 145, 160, 161, 162, 163, 168, 210, 264, 267, 269, 270, 271, 277], "load_earth_vertical_gravity_gradi": 134, "load_fractures_compil": 134, "load_hotspot": 134, "load_japan_quak": 134, "load_mars_shap": 134, "load_ocean_ridge_point": 134, "load_sample_bathymetri": 134, "load_sample_data": [34, 35, 36, 66, 102, 112, 117, 119, 124, 125, 134, 143, 154, 156, 168, 281], "load_static_earth_relief": [37, 56, 134], "load_tile_map": [27, 134, 136], "load_usgs_quak": 134, "loc": [155, 157, 204, 265], "local": [27, 28, 48, 65, 85, 104, 124, 125, 128, 129, 134, 150, 175, 190, 219], "locat": [1, 4, 6, 8, 14, 15, 16, 25, 33, 34, 35, 36, 75, 84, 97, 105, 107, 108, 110, 112, 117, 118, 119, 123, 135, 150, 154, 191, 199, 210, 215, 218, 259, 272, 276], "log": [3, 4, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 98, 112, 114, 116, 117, 119, 122, 125, 127, 128, 132, 134], "log10": [3, 4, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 98, 112, 114, 116, 117, 119, 122, 125, 127, 128, 132], "logarithm": [0, 1, 3, 15, 22, 98, 116, 240, 254, 256, 263, 281], "logic": [134, 135, 136], "logo": [0, 1, 11, 21, 22, 28, 134, 151, 153, 165, 169, 256], "lon": [11, 32, 56, 75, 99, 101, 112, 119, 123, 124, 130, 134, 199, 263], "lon0": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 18, 23, 25, 26, 29, 31, 186, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 240, 241, 242, 243, 244, 245, 246, 247, 248], "lon1": 235, "lon_max": [160, 269], "lon_min": [160, 269], "lonc": 112, "london": 259, "long": [24, 47, 99, 132, 134, 135, 175, 178], "long_nam": 134, "longer": [28, 134, 215], "longitud": [4, 14, 15, 16, 26, 27, 29, 30, 32, 33, 34, 35, 36, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 99, 100, 101, 103, 104, 106, 107, 109, 110, 111, 112, 113, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 144, 147, 150, 154, 160, 168, 191, 209, 212, 232, 238, 240, 268, 269, 276, 277, 281, 285], "longitudin": 130, "longlong": [50, 52, 134], "longnam": 134, "longrid": 32, "lonl": 112, "lonlat": [27, 85], "lonp": 235, "lonr": 112, "look": [7, 18, 37, 112, 125, 129, 130, 135, 139, 150, 202, 207, 208, 210, 219, 228, 243, 245, 264, 265, 273, 275], "lookup": [15, 16, 29, 245], "loop": 204, "loos": [134, 135], "lord": 18, "loria": 134, "lose": [32, 97], "lost": [32, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 228], "lot": 135, "loung": 135, "low": [3, 5, 33, 87, 97, 100, 103, 105, 107, 113, 133, 201, 267, 278], "lower": [2, 3, 11, 18, 26, 27, 85, 87, 97, 98, 109, 110, 112, 116, 118, 119, 125, 130, 141, 150, 160, 172, 196, 210, 250, 251, 252, 253, 269, 279], "lowercas": [24, 206], "lowermost": 97, "lowest": [3, 87, 98, 116, 132], "lowest_valu": [139, 164, 202], "loxodrom": [112, 233], "lo\u00efc": 134, "lpercent": 271, "lpermitt": 143, "lpetal": 139, "lpopul": 185, "lrel": 271, "lrtb": 275, "lseafloor": 269, "lsepal": 139, "lset": 162, "lsne": 265, "lspeed": 268, "lstraight": 179, "lt": [166, 285], "ltemperatur": 144, "ltext": 179, "ltranspar": 203, "lu": 125, "luck": [208, 285], "lvalid": 150, "lvalu": 273, "lveloc": [3, 144], "lwater": 143, "lx": [141, 148, 279], "lxlabel": 211, "ly": [148, 279], "ly1": 141, "ly2": 141, "lylabel": 211, "l\u0101hain\u0101": 166, "m": [3, 4, 6, 7, 8, 10, 11, 14, 15, 16, 17, 18, 24, 26, 27, 28, 29, 31, 33, 34, 35, 36, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 99, 103, 104, 106, 108, 109, 110, 111, 112, 116, 117, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 134, 135, 144, 145, 150, 153, 155, 160, 161, 163, 173, 182, 208, 209, 233, 258, 263, 268, 271, 275, 276, 277, 285], "m0": [6, 14, 150, 182, 233, 276], "m1": 103, "m10c": [2, 5, 7, 110, 150, 177, 209, 210, 266, 267, 276, 285], "m12c": [45, 160, 161, 162, 164, 173, 190, 269, 283], "m15c": [182, 264, 270, 272, 281, 283], "m25c": 279, "m3c": 272, "m5c": 278, "m5i": 209, "m600": [87, 103], "m6c": [185, 191], "m7c": 0, "m9": 217, "ma": 272, "mac": 134, "machin": [130, 135, 208], "maco": [134, 135, 208, 215], "macro": 197, "mad": [8, 33, 97, 108, 112], "madagascar": [146, 230], "made": [4, 7, 8, 10, 12, 15, 16, 18, 25, 29, 31, 33, 34, 35, 36, 112, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 132, 135, 174, 208, 210, 215, 248], "maeda": 137, "mag": 74, "magen": [134, 207], "magenta": 186, "magenta4": [186, 196, 197, 206], "magnet": [1, 74, 134], "magnitud": [14, 29, 104, 191, 281], "mai": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 25, 26, 27, 29, 31, 32, 33, 34, 35, 36, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 99, 103, 104, 106, 108, 109, 110, 111, 112, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 132, 135, 148, 181, 196, 204, 207, 208, 212, 216, 218, 245, 257, 262, 269, 273, 275], "main": [11, 20, 24, 130, 134, 135, 136, 147, 157, 163, 171, 176, 179, 208, 209, 215, 216, 217, 218, 247, 268, 275], "mainexplain": 211, "mainli": [220, 244], "maintain": [20, 98, 116, 134, 135, 145, 216], "maitland": 234, "major": [2, 29, 43, 118, 215, 233, 268, 272], "major_axi": 199, "majortick": 211, "makassar": 285, "make": [0, 1, 2, 6, 7, 9, 10, 12, 20, 21, 22, 24, 26, 30, 50, 51, 52, 56, 57, 58, 98, 99, 101, 104, 105, 106, 116, 118, 119, 125, 126, 131, 132, 133, 134, 136, 139, 163, 176, 184, 187, 189, 200, 202, 207, 208, 210, 213, 214, 217, 221, 238, 245, 250, 256, 264, 274, 282, 286], "makecpt": [98, 105, 106, 108, 114, 134, 135, 139, 143, 144, 145, 162, 163, 164, 174, 185, 195, 202, 269, 271, 277, 281], "makefil": [134, 135], "malt": 207, "mamba": [134, 135, 207], "mambaforg": 134, "man": 257, "manag": [11, 37, 42, 44, 56, 57, 59, 60, 65, 133, 134, 208, 259, 266, 272], "mani": [114, 134, 135, 165, 181, 187, 208, 228, 240, 275, 283], "manipul": [32, 98, 116, 136, 139, 202, 213, 268], "mantissa": 14, "manual": [32, 42, 44, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 135, 139, 202, 215, 275], "map": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 23, 24, 25, 26, 27, 29, 31, 33, 34, 35, 36, 62, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 139, 141, 144, 145, 148, 149, 150, 151, 156, 160, 161, 162, 163, 165, 166, 171, 177, 178, 179, 181, 184, 187, 188, 189, 191, 197, 207, 208, 209, 211, 213, 214, 217, 218, 220, 222, 225, 226, 227, 228, 230, 232, 233, 235, 238, 240, 244, 245, 248, 253, 256, 257, 261, 266, 269, 271, 272, 274, 275, 276, 279, 281, 282, 285, 286], "map_annot_min_angl": 65, "map_annot_min_spac": 65, "map_annot_obliqu": 65, "map_annot_offset": 65, "map_annot_offset_primari": 65, "map_annot_offset_secondari": 65, "map_annot_ortho": 65, "map_default_pen": [18, 65], "map_defaults_pen": [1, 2, 3], "map_degree_symbol": 65, "map_embellishment_mod": 65, "map_frame_ax": 65, "map_frame_pen": [10, 12, 65, 141], "map_frame_perc": 65, "map_frame_typ": [65, 162, 163, 266, 271], "map_frame_width": 65, "map_grid_cross_s": 65, "map_grid_cross_size_primari": 65, "map_grid_cross_size_secondari": 65, "map_grid_pen": 65, "map_grid_pen_primari": 65, "map_grid_pen_secondari": 65, "map_heading_offset": 65, "map_label_mod": 65, "map_label_offset": [25, 65], "map_line_step": 65, "map_logo": 65, "map_logo_po": 65, "map_origin_i": 65, "map_origin_x": 65, "map_polar_cap": 65, "map_scal": [1, 2, 134, 150], "map_scale_height": [65, 150], "map_tick_length": 65, "map_tick_length_primari": 65, "map_tick_length_secondari": 65, "map_tick_pen": [65, 141], "map_tick_pen_primari": 65, "map_tick_pen_secondari": 65, "map_title_offset": [65, 163], "map_vector_shap": 65, "mapproject": 118, "mar": [80, 84, 124, 134], "marbl": [67, 68, 134], "margin": [11, 17, 20, 24, 145, 146, 147, 157, 195, 275, 285], "marin": [2, 184], "mark": [1, 18, 20, 24, 41, 134, 135, 138, 141, 215, 253, 268, 275, 279], "markdown": [134, 135], "marker": [134, 281, 285], "mars_relief": 80, "mars_shap": [84, 124], "mask": [0, 1, 3, 6, 22, 75, 109, 116, 119, 125, 133, 134, 136, 167, 168, 169, 217, 256], "maskvalu": [109, 164], "mass": [2, 160, 164, 187, 200, 202, 207, 208, 277], "massachusett": 272, "master": [98, 116, 134, 137, 139, 202], "match": [4, 8, 9, 14, 15, 16, 18, 26, 29, 30, 31, 34, 35, 36, 98, 112, 116, 117, 119, 125, 127, 128, 132, 135], "materna": [134, 207], "math": 182, "mathemat": [136, 230, 273], "mathematician": [227, 243, 244, 248], "matlab": [18, 130, 134, 207], "matplotlib": [134, 136, 204, 217, 275, 281], "matric": 136, "matrix": [4, 15, 16, 18, 31, 34, 35, 36, 50, 56, 57, 60, 87, 103, 117, 125, 134, 159, 269], "matter": 17, "matthew": 134, "mauna": 84, "maunaloa_co2": [84, 134], "max": [8, 25, 33, 34, 35, 36, 56, 98, 100, 101, 103, 104, 108, 109, 110, 111, 112, 114, 116, 117, 118, 119, 122, 123, 124, 125, 128, 132, 134, 137, 139, 157, 185, 202, 207, 217, 241, 242, 257, 269, 277, 281], "max_level": [2, 109, 119], "max_r": 18, "max_retri": [27, 85], "maxi": 166, "maxim": 18, "maxima": [125, 283], "maximum": [6, 17, 27, 33, 85, 87, 97, 100, 103, 104, 108, 109, 111, 112, 113, 122, 125, 130, 131, 132, 135, 139, 202, 209, 218, 220, 221, 222, 223, 253, 267, 268, 269, 277, 281], "maxradiu": 125, "maxrjon": 257, "maxx": 166, "mb": [2, 140, 142, 151, 158, 167, 180, 188, 192, 194, 205, 214, 224, 229, 239, 249, 254, 255, 256, 274, 284, 287], "mbox": [104, 118], "mc": [26, 28, 144, 207, 208, 275, 285], "mcmullan": 134, "mcnalli": 245, "md": [134, 135, 207, 215, 257], "md5sum": 135, "mdt": 76, "me": 276, "mean": [8, 12, 14, 17, 18, 24, 27, 28, 29, 33, 34, 43, 62, 63, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 85, 87, 101, 104, 108, 112, 113, 117, 119, 125, 130, 131, 132, 134, 135, 145, 147, 150, 154, 155, 156, 168, 176, 182, 190, 193, 195, 207, 209, 215, 235, 265, 268, 281], "mean_az": 18, "mean_r": 18, "mean_result": 18, "meant": [57, 135], "measur": [26, 29, 104, 110, 112, 113, 134, 181, 218, 219, 276, 285], "meca": [134, 191, 192, 200, 256], "mechan": [0, 2, 14, 22, 134, 135, 169, 192, 200, 256], "med": 108, "median": [8, 33, 35, 87, 97, 103, 108, 112], "mediumital": 260, "meet": [100, 135, 217], "megan": 134, "mem": [140, 142, 151, 158, 167, 180, 188, 192, 194, 205, 214, 224, 229, 239, 249, 254, 255, 256, 274, 284, 287], "member": [102, 215, 230], "membership": 134, "memori": [37, 43, 44, 49, 50, 51, 52, 56, 57, 59, 60, 115, 123, 133, 134, 135, 136, 166, 212, 217, 268], "mention": [26, 134, 268, 276], "mercat": [0, 2, 5, 6, 7, 22, 27, 85, 103, 108, 134, 135, 145, 147, 150, 160, 173, 182, 209, 234, 239, 240, 246, 256, 263, 264, 269, 270, 272, 276, 279, 283], "merctor": 238, "mercuri": [81, 134], "mercury_relief": 81, "merg": [85, 134, 135], "meridian": [11, 15, 16, 30, 112, 118, 209, 220, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 283], "mesh": [7, 264], "meshgrid": [32, 132, 138, 159], "meshlin": 7, "meshpen": 7, "messag": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 215], "met": [15, 16, 31, 112, 117, 119], "meta": 215, "metadata": [56, 57, 115, 134, 215, 268], "meter": [5, 11, 33, 34, 35, 36, 73, 76, 77, 78, 80, 81, 82, 83, 86, 103, 109, 110, 111, 112, 117, 119, 122, 123, 124, 125, 128, 131, 132, 150, 210, 264, 267, 277], "meth": 135, "method": [0, 2, 3, 9, 11, 15, 20, 21, 22, 23, 24, 27, 30, 37, 42, 44, 48, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 94, 105, 106, 107, 110, 112, 120, 126, 127, 128, 131, 133, 134, 135, 136, 138, 139, 141, 143, 144, 146, 147, 148, 149, 150, 153, 155, 156, 159, 165, 166, 170, 171, 172, 176, 177, 178, 179, 181, 182, 183, 185, 186, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 206, 208, 209, 210, 211, 212, 213, 215, 240, 264, 265, 267, 270, 271, 272, 273, 275, 279, 280, 281, 282, 283, 285], "metpi": 207, "metr": 166, "metrearrai": 166, "meurer": 135, "mff": 14, "mg": [11, 146, 230], "mgal": 72, "mgd77": [130, 131], "mgd77_home": 130, "mgd77_path": 130, "mgg": [130, 131], "mi": 131, "michael": [134, 137, 207, 217, 257], "michaelgrund": [137, 257], "micro": 70, "micromamba": [134, 208, 212, 269], "mid": [246, 248, 269, 283], "middl": [26, 33, 34, 35, 36, 87, 103, 105, 106, 109, 110, 111, 117, 122, 123, 124, 125, 128, 132, 138, 144, 150, 170, 172, 182, 183, 232, 253, 272, 285], "middlecent": 285, "middleleft": 285, "middleright": [150, 285], "migg": 137, "might": [17, 40, 44, 135, 207], "migrat": 134, "miguel": 210, "mile": [15, 16, 31, 33, 34, 35, 36, 103, 109, 110, 111, 112, 117, 119, 122, 123, 124, 125, 128, 131, 132, 150], "mileston": 215, "militari": 238, "miller": [0, 2, 22, 236, 239, 240, 256, 263], "million": 69, "min": [8, 25, 33, 56, 98, 100, 101, 108, 112, 114, 116, 118, 119, 134, 139, 157, 185, 202, 269, 277, 281], "min_area": [2, 109, 119], "min_level": [2, 109, 119], "min_sector": 117, "mini": [134, 166], "miniconda": 134, "miniforg": [134, 135, 208], "miniforge3": 208, "minim": 238, "minima": [125, 283], "minimum": [17, 33, 87, 97, 100, 108, 112, 113, 125, 132, 134, 139, 202, 208, 209, 215, 267, 268, 269, 277, 281], "minmax_po": 108, "minor": [2, 29, 118, 134, 215, 216, 268], "minor_axi": 199, "minorexplain": 211, "minortick": 211, "minu": [15, 16, 31, 108, 112, 117, 119], "minut": [5, 6, 7, 8, 15, 16, 18, 23, 26, 31, 33, 34, 35, 36, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 98, 103, 109, 110, 111, 112, 117, 119, 122, 123, 124, 125, 127, 128, 131, 132, 135, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 209, 210, 211, 212, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "minvers": 215, "minx": 166, "mira": 236, "mirror": [11, 24, 215], "misc": [249, 256], "misc_eckertiv": [241, 249, 256], "misc_eckertvi": [242, 249, 256], "misc_hamm": [243, 249, 256], "misc_mollweid": [244, 249, 256], "misc_robinson": [245, 249, 256], "misc_sinusoid": [246, 249, 256], "misc_van_der_grinten": [247, 249, 256], "misc_winkel_tripel": [248, 249, 256], "miss": [78, 102, 130, 134, 176], "misspel": 134, "mistak": 207, "miter": 175, "mix": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132, 134, 135, 265, 273], "ml": [26, 28, 160, 171, 176, 178, 179, 181, 200, 285], "mm": [132, 198, 202, 268], "mod": [135, 215], "modal": [87, 97], "mode": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 23, 24, 25, 26, 29, 31, 33, 36, 43, 49, 53, 54, 61, 62, 64, 87, 97, 98, 102, 104, 108, 109, 110, 111, 112, 116, 121, 130, 131, 135, 145, 275], "mode_fil": 18, "model": [74, 98, 116, 122, 162], "moder": 215, "modern": [98, 116, 135, 136, 145, 217], "modif": 268, "modifi": [3, 4, 5, 6, 7, 8, 15, 16, 18, 20, 26, 29, 31, 33, 34, 35, 36, 49, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 117, 119, 122, 123, 124, 125, 127, 128, 132, 134, 135, 148, 171, 172, 176, 179, 181, 182, 204, 207, 235, 236, 245, 253, 262, 268, 269, 272], "modul": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 37, 41, 49, 50, 51, 52, 56, 57, 58, 59, 78, 87, 88, 89, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 133, 134, 135, 207, 215, 268], "modulenotfounderror": 134, "mollweid": [0, 2, 6, 22, 152, 187, 189, 209, 240, 249, 256, 263], "moment": [14, 191], "mondai": 134, "monitor": 215, "monochrom": [6, 7, 10, 17, 27], "monoton": [98, 116], "month": [23, 152, 207, 215, 268, 281], "monthli": [8, 15, 16, 18, 26, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132], "moon": [82, 134], "moon_relief": 82, "moor": 134, "more": [2, 6, 17, 19, 20, 24, 26, 27, 29, 57, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 99, 109, 110, 112, 117, 119, 123, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 148, 152, 176, 178, 190, 207, 208, 212, 215, 217, 225, 230, 257, 265, 268, 275, 280, 285], "morgan": 185, "most": [29, 37, 42, 46, 97, 105, 106, 126, 127, 128, 133, 134, 135, 136, 207, 212, 215, 216, 232, 238, 275, 279], "mostli": [100, 133], "mount": 185, "mountain": [105, 106], "move": [15, 16, 118, 134, 136, 144, 160, 171, 176, 178, 179, 181, 215, 257, 275, 276], "moyo": 134, "mpl": [134, 135], "mpl_image_compar": 134, "mr": [26, 28, 138, 144, 183, 285], "mrf": 14, "mrr": 14, "mrt": 14, "mss": 77, "mt": [14, 210], "mtf": 14, "mtt": 14, "much": [135, 136, 215, 276], "multi": [0, 1, 6, 15, 17, 22, 24, 97, 103, 109, 111, 122, 130, 134, 136, 148, 169, 195, 205, 256], "multi_parameter_symbol": [199, 205, 256], "multidimension": 136, "multilinestr": [0, 2, 15, 22, 134, 169, 180, 256], "multipl": [0, 2, 3, 4, 6, 8, 9, 11, 14, 15, 16, 18, 20, 22, 24, 29, 30, 31, 33, 34, 35, 36, 45, 78, 87, 97, 104, 108, 112, 114, 116, 117, 119, 122, 125, 127, 128, 132, 134, 135, 139, 148, 151, 169, 184, 186, 202, 208, 209, 212, 218, 256, 270, 276, 278, 279, 280, 283], "multipli": [3, 18, 29, 125], "multipoint": 134, "multipolygon": 185, "multiprocess": 134, "munzek": 134, "muss": 285, "must": [1, 2, 4, 6, 7, 8, 9, 10, 14, 15, 16, 17, 18, 20, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 50, 51, 52, 56, 57, 59, 60, 64, 87, 97, 98, 99, 101, 104, 112, 116, 117, 118, 119, 122, 125, 127, 128, 131, 132, 135, 165, 170, 181, 190, 195, 208, 209, 210, 211, 215, 232, 245, 267, 272, 276], "mutual": 135, "mv": 135, "mwaskom": [139, 202], "mx": 7, "my": [0, 7, 41, 58, 135, 275, 285], "mypi": 134, "myr": 69, "myst": 134, "m\u00fcller": 84, "m\u0101noa": 217, "n": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 24, 26, 27, 29, 31, 33, 34, 35, 36, 46, 49, 56, 57, 58, 59, 60, 61, 75, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 134, 135, 141, 144, 148, 150, 154, 170, 171, 179, 190, 194, 196, 204, 238, 245, 255, 258, 263, 269, 275, 279, 285, 287], "n0": [144, 150, 196, 268], "n00e000": 163, "n00w090": 161, "n12c": 245, "n15c": [207, 208], "n2": 148, "n43": 209, "n44": 209, "n45e000": 269, "n6": 171, "n_azimuth": 14, "n_cell": 125, "n_col": 97, "n_column": 56, "n_nan": 108, "n_plung": 14, "n_row": 56, "n_valu": 14, "na": 186, "nabla": 125, "nake": 219, "name": [3, 4, 5, 6, 7, 8, 14, 15, 16, 17, 18, 19, 23, 25, 26, 29, 31, 33, 34, 35, 36, 37, 40, 41, 42, 43, 47, 48, 49, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 88, 89, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 121, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 136, 139, 143, 154, 156, 166, 168, 177, 186, 187, 193, 197, 202, 208, 209, 210, 211, 212, 215, 228, 233, 244, 260, 262, 263, 268, 277, 278, 279, 281, 285], "name_of_test_fil": 135, "nan": [3, 4, 6, 7, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 98, 99, 101, 102, 103, 109, 110, 112, 114, 116, 117, 119, 125, 127, 128, 130, 132, 134, 144], "nan_transpar": [6, 27], "nano": 74, "nanoradian": 29, "napoleon": 134, "narrow": 260, "nasa": [67, 68, 78], "nathan": 134, "nation": [2, 184, 245, 248, 283], "nativ": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 130, 132, 212], "natur": [112, 123, 125, 126, 128, 248], "nautic": [23, 33, 34, 35, 36, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 131, 132, 150, 152], "navgat": 134, "navi": 152, "navig": [221, 233], "navyblu": [23, 152], "nb": 134, "nbsphinx": 134, "nc": [63, 103, 166], "nche": [15, 16, 31, 112, 117, 119], "ncol": [4, 8, 15, 16, 18, 24, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132, 145, 163, 195, 271, 275], "ncolumn": 49, "ndarrai": [0, 4, 8, 15, 16, 18, 25, 26, 29, 31, 33, 34, 35, 36, 45, 46, 50, 51, 52, 57, 62, 97, 99, 106, 112, 113, 114, 117, 118, 119, 122, 123, 124, 125, 127, 128, 132, 133, 134, 159, 207, 268], "ndefl": 70, "ne0": 269, "nearbi": 272, "nearest": [6, 7, 102, 104, 108, 110, 111, 112, 114, 117, 119, 123, 126, 128, 139, 202, 283], "nearest_multipl": [108, 114], "nearli": 207, "nearneighbor": 134, "necessari": [22, 123, 135, 215], "necessarili": 112, "need": [6, 14, 27, 32, 43, 44, 59, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 97, 99, 104, 112, 114, 125, 132, 135, 141, 154, 168, 185, 199, 208, 209, 210, 212, 215, 238, 264, 267, 268, 273, 275, 280], "neg": [3, 6, 25, 31, 33, 70, 71, 97, 103, 104, 109, 111, 112, 122, 134, 163, 176, 183, 209, 265, 285], "negat": 104, "neighbor": [6, 7, 24, 102, 104, 110, 111, 112, 117, 123, 126, 128], "neighborhood": 125, "neither": [221, 223, 226, 228, 230, 234, 245, 247, 248], "nep": 134, "nep29": 134, "nest": 275, "nested_sect": 134, "netcdf": [33, 87, 100, 101, 102, 103, 104, 107, 109, 110, 111, 115, 117, 122, 123, 124, 125, 128, 130, 131, 132, 134, 135, 168, 269], "netcdf3": 115, "netcdf4": [115, 134, 208], "network": [4, 15, 170], "neumann": 134, "never": 215, "new": [2, 3, 5, 6, 7, 17, 23, 32, 42, 44, 87, 98, 100, 101, 103, 104, 107, 110, 111, 112, 116, 117, 119, 122, 131, 133, 139, 148, 150, 160, 164, 168, 170, 175, 202, 207, 208, 209, 211, 215, 257, 271, 272, 275, 277, 281], "new_grid": [100, 101, 104, 110, 111, 122], "new_york": 259, "newcenturyschlbk": 260, "newcolnam": [112, 160, 168], "newer": 134, "newli": 115, "newton": [134, 207], "next": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 20, 23, 25, 26, 27, 29, 31, 85, 87, 103, 117, 135, 181, 185, 215, 275, 276, 285], "ngdc": 84, "ngoc": 134, "nice": [135, 275], "night": [0, 2, 22, 23, 67, 68, 151, 169, 256], "nightli": 134, "nighttim": 152, "ninc": 283, "nine": 271, "ninth": 134, "nist": 134, "nlabel": 18, "nlevel": 98, "nm": 276, "nn": 164, "nnotat": [4, 5, 209, 279], "no_bg": [98, 116], "no_clip": [4, 6, 9, 11, 14, 15, 16, 26, 27, 29, 30, 134, 160, 202, 211, 251, 252, 285], "no_data": 102, "no_scal": 18, "no_skip": [112, 135], "no_sort": 16, "noaa": 84, "nodal": [14, 191], "nodata": [4, 8, 15, 16, 18, 29, 31, 34, 35, 36, 99, 112, 117, 119, 125, 127, 128, 132], "node": [6, 7, 33, 34, 35, 36, 43, 75, 99, 101, 102, 103, 104, 106, 107, 109, 110, 111, 112, 114, 117, 119, 122, 123, 124, 125, 128, 132, 164], "node_t": 123, "nois": 87, "nomin": [15, 16, 29], "non": [0, 1, 6, 14, 22, 26, 34, 35, 36, 41, 50, 51, 52, 64, 87, 97, 103, 112, 119, 134, 135, 139, 202, 231, 256, 259, 260, 261, 268, 274, 285, 286], "non_ascii_text": [256, 273, 274], "non_ascii_to_oct": 134, "none": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 43, 44, 48, 49, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 120, 122, 123, 124, 125, 127, 128, 130, 131, 132, 134, 170, 215, 265], "nongeo": [254, 256], "noor": 134, "noqa": 166, "nor": [163, 221, 223, 228, 230, 234, 245, 247, 248], "norm": [18, 104, 107, 156], "normal": [0, 3, 4, 5, 6, 8, 11, 15, 16, 18, 22, 24, 26, 31, 33, 34, 35, 36, 65, 78, 98, 101, 104, 107, 112, 116, 117, 119, 125, 127, 128, 129, 132, 134, 144, 150, 155, 156, 157, 167, 168, 169, 195, 204, 206, 256, 265, 269], "normal_dist": 271, "north": [11, 18, 24, 29, 33, 34, 35, 36, 45, 70, 85, 103, 104, 109, 110, 111, 112, 117, 118, 122, 123, 124, 125, 128, 130, 132, 134, 160, 163, 166, 186, 219, 225, 230, 244, 245, 253, 264, 269, 277, 279, 283], "north_sigma": 193, "north_veloc": 193, "northeastern": 209, "northern": [219, 235], "northward": 29, "northwest": [139, 269], "norwai": 186, "not_in_cach": 135, "notabl": [236, 268], "notat": 131, "note": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 25, 26, 27, 29, 31, 32, 33, 34, 35, 36, 43, 76, 80, 81, 82, 83, 85, 98, 99, 103, 104, 109, 110, 111, 112, 113, 116, 117, 118, 119, 122, 123, 124, 125, 128, 130, 132, 134, 135, 138, 144, 150, 157, 168, 190, 193, 197, 206, 207, 210, 215, 258, 265, 275, 276, 282], "notebook": [22, 120, 133, 134, 135, 136, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 209, 210, 211, 212, 213, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "notgeoreferencedwarn": 269, "noth": 134, "notic": [20, 135, 161, 163, 269, 275, 276, 281], "notre_dame_topographi": [84, 125, 134], "now": [109, 134, 135, 136, 208, 209, 212, 269, 282], "np": [14, 32, 49, 57, 59, 62, 112, 123, 132, 134, 138, 141, 148, 155, 157, 159, 171, 174, 175, 176, 178, 179, 182, 183, 198, 201, 203, 204, 212, 251, 252, 265, 268, 276, 277, 281, 282], "nplane": 14, "nrow": [24, 49, 145, 163, 195, 271, 275], "nsf": [207, 217], "nt": [7, 74, 183], "nt1": 6, "ntermedi": [2, 109, 119], "ntu": 137, "null": 43, "nullcontext": 134, "num": [141, 182], "number": [4, 5, 6, 8, 14, 15, 16, 18, 22, 24, 25, 27, 29, 31, 33, 34, 35, 36, 43, 46, 47, 52, 62, 85, 87, 97, 98, 99, 103, 106, 107, 109, 110, 111, 112, 114, 116, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 130, 132, 134, 139, 148, 154, 171, 176, 179, 195, 200, 202, 204, 209, 211, 215, 252, 258, 260, 262, 265, 266, 268, 275, 278], "numer": [3, 4, 8, 15, 16, 18, 24, 26, 29, 31, 33, 34, 35, 36, 99, 108, 112, 114, 117, 118, 119, 122, 125, 127, 128, 132, 134], "numpi": [4, 8, 14, 15, 16, 18, 25, 29, 31, 32, 33, 34, 35, 36, 45, 49, 50, 51, 52, 57, 59, 60, 62, 64, 97, 99, 106, 112, 113, 114, 117, 118, 119, 121, 122, 123, 124, 125, 127, 128, 132, 133, 134, 135, 138, 139, 141, 148, 155, 157, 159, 171, 174, 175, 176, 178, 179, 182, 183, 198, 199, 201, 202, 203, 204, 207, 208, 215, 216, 251, 252, 265, 276, 277, 282], "numpoint": 130, "numpydoc": 134, "nx": [10, 108, 150, 190, 195], "ny": [10, 108, 150, 190, 195], "nyc": 182, "nz": 137, "nzasc2021": 137, "o": [0, 1, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 18, 22, 24, 26, 28, 29, 31, 33, 34, 35, 36, 46, 98, 99, 101, 103, 104, 106, 108, 111, 112, 114, 116, 117, 118, 119, 122, 125, 127, 128, 132, 134, 136, 144, 150, 153, 160, 176, 179, 185, 213, 214, 235, 256, 258, 259, 265, 268, 272], "o0": [11, 12, 141, 144, 146, 147, 148, 149, 160, 161, 164, 176, 272], "o0c": 143, "o1": [162, 271], "o1c": [144, 150], "o2": 176, "oa": [235, 263], "oahu": 278, "oakland": 185, "ob": [235, 263], "ob130": 235, "obanei": 134, "object": [5, 6, 7, 12, 21, 23, 27, 33, 34, 35, 36, 49, 58, 62, 63, 69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 115, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 132, 133, 134, 135, 136, 148, 162, 163, 166, 177, 185, 209, 212, 215, 217, 268, 270, 276, 277, 282], "obliqu": [0, 2, 7, 22, 101, 118, 134, 239, 240, 256, 260, 263], "obscur": 6, "observ": [33, 34, 35, 36, 74, 78, 84, 119, 130], "obtain": [6, 97, 110, 112, 215, 248], "obviou": 135, "oc": [186, 207, 217, 235, 263], "oc280": 235, "occasion": [215, 230, 244], "occupi": 275, "occur": [97, 105, 106, 215], "ocean": [71, 74, 75, 78, 84, 109, 112, 119, 133, 168, 207, 210, 217, 218], "ocean_ridge_point": [84, 112, 168], "oceania": [137, 161, 163, 186, 269], "octagon": 196, "octal": 258, "octav": 207, "odd": 103, "off": [4, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 84, 97, 99, 101, 108, 109, 112, 114, 117, 119, 122, 125, 127, 128, 130, 132, 251, 252], "offboard": 134, "offer": [98, 116, 175, 207, 275], "offici": [134, 207], "offlin": 135, "offset": [1, 2, 3, 4, 8, 11, 12, 14, 15, 16, 18, 21, 24, 26, 28, 29, 31, 33, 34, 35, 36, 104, 110, 112, 114, 117, 119, 122, 125, 127, 128, 132, 134, 141, 144, 146, 147, 148, 149, 150, 153, 157, 160, 171, 176, 178, 179, 181, 253, 263, 265, 272, 285], "offset_i": 28, "offset_x": 28, "oficina_pygmt": 137, "ofil": 49, "often": [135, 171, 220, 223, 275, 285], "ogc": 27, "ogr": [134, 177, 185], "ogr_gmt": 134, "ohar": 185, "ohm": 273, "oidc": 134, "oin": 166, "oint": [15, 16, 31, 112, 117, 119], "ok": 135, "old": [87, 100, 131, 134, 215], "older": 215, "oldest": 246, "oleron": [144, 160, 161, 210, 277], "omega": 273, "omit": [64, 111, 117, 119], "onboard": 134, "onc": [24, 32, 87, 101, 103, 134, 135, 186, 215, 275], "one": [1, 2, 3, 4, 7, 8, 9, 11, 15, 16, 17, 18, 20, 24, 26, 29, 30, 31, 33, 34, 35, 36, 42, 43, 44, 49, 87, 97, 98, 99, 103, 104, 109, 110, 111, 112, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 134, 135, 138, 141, 144, 148, 157, 159, 181, 195, 198, 204, 208, 210, 212, 215, 219, 220, 223, 228, 233, 236, 240, 245, 246, 257, 262, 265, 268, 272, 275, 276, 282, 283, 285], "ones": [87, 135, 195, 197, 199, 203, 213, 278], "onli": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 43, 49, 50, 52, 53, 62, 64, 70, 72, 74, 78, 79, 80, 81, 82, 83, 85, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 136, 141, 148, 150, 154, 171, 179, 181, 196, 206, 209, 210, 215, 217, 227, 233, 238, 244, 247, 252, 262, 265, 268, 272, 273, 275, 277, 278, 279, 283], "onlin": [135, 137, 207], "onto": [6, 26, 110, 118, 119, 228, 236], "ontour": [4, 5], "op": [24, 26, 28, 99, 132, 144, 150, 285], "opaqu": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 23, 25, 26, 29, 31, 98, 116, 203], "open": [22, 37, 39, 44, 49, 54, 61, 62, 91, 115, 134, 135, 136, 181, 207, 208, 215, 259, 266, 269, 285], "open_dataarrai": [115, 134], "open_rasterio": 166, "open_virtual_fil": 134, "open_virtualfil": [56, 57, 59, 134], "openaerialmap": 166, "opendap": 115, "openid": 134, "openmp": [6, 103, 109, 111, 122, 134], "openstreetmap": [27, 85, 190], "opentopomap": 85, "oper": [5, 6, 7, 22, 32, 33, 37, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 95, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 117, 121, 122, 123, 124, 125, 126, 127, 128, 132, 136, 268], "oppos": [24, 27, 85], "opposit": [11, 24, 103, 144, 225], "optim": [124, 166], "option": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 41, 43, 46, 53, 54, 60, 64, 70, 72, 74, 78, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 141, 144, 148, 150, 153, 176, 181, 190, 206, 208, 209, 210, 215, 216, 218, 220, 221, 223, 232, 233, 234, 235, 236, 237, 240, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 265, 266, 270, 275, 277, 280, 282, 285], "orang": [148, 173, 175, 186, 199, 250, 251, 252, 265, 282], "order": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 20, 23, 25, 26, 29, 31, 33, 34, 35, 36, 99, 112, 114, 117, 118, 119, 122, 125, 127, 128, 132, 134, 135, 136, 139, 150, 162, 170, 202, 238, 268, 275, 285], "ordinari": [105, 106], "oreground": 262, "org": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 23, 24, 25, 26, 27, 29, 31, 33, 34, 35, 36, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 137, 138, 139, 144, 145, 148, 152, 160, 161, 163, 165, 171, 178, 179, 181, 190, 197, 202, 204, 207, 208, 210, 215, 266, 269, 270, 283, 285], "organ": [99, 136], "orient": [18, 26, 43, 99, 104, 132, 160, 217, 227], "origin": [13, 17, 21, 26, 28, 32, 53, 78, 101, 106, 112, 118, 128, 130, 134, 139, 150, 154, 157, 160, 161, 162, 172, 178, 215, 217, 227, 237, 245, 253, 263, 265, 266, 275, 276], "orth": 29, "orthodrom": 221, "orthogon": [112, 119, 146], "orthograph": [0, 2, 22, 224, 240, 256, 263, 277], "osborn": 234, "oscil": 125, "oswald": 248, "other": [1, 2, 3, 6, 11, 17, 18, 21, 24, 32, 42, 43, 60, 87, 97, 104, 110, 112, 113, 114, 118, 123, 130, 131, 132, 134, 135, 136, 176, 200, 207, 209, 210, 212, 215, 217, 225, 230, 234, 236, 237, 241, 242, 243, 245, 246, 247, 248, 261, 262, 265, 270, 272, 273, 275, 276, 280, 285], "otherwis": [6, 12, 22, 33, 34, 35, 36, 44, 46, 61, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 130, 131, 132, 135, 218, 277], "ottom": [24, 26, 28, 99, 132, 144, 150, 275, 285], "our": [135, 207, 208, 215, 217, 271, 275], "out": [49, 87, 98, 99, 104, 112, 116, 119, 135, 207, 208, 272, 281, 285], "outcol": [34, 35, 36, 99, 112, 119], "outcom": [42, 87, 124], "outer": [223, 265], "outfil": [34, 35, 36, 97, 99, 106, 112, 113, 118, 119, 127, 130, 134, 168], "outgrid": [33, 63, 87, 100, 101, 102, 103, 104, 105, 107, 109, 110, 111, 117, 122, 123, 124, 125, 126, 128, 132, 134], "outlier": 97, "outlin": [2, 7, 8, 11, 14, 15, 16, 17, 18, 24, 25, 29, 31, 109, 147, 150, 155, 156, 160, 170, 171, 172, 176, 179, 183, 186, 191, 193, 200, 206, 250, 251, 252, 265, 281, 282, 285], "outlinecolor": 206, "outnp": 62, "outpd": 62, "outpd2": 62, "output": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 22, 23, 25, 26, 29, 31, 33, 34, 35, 36, 37, 46, 49, 56, 57, 59, 60, 61, 62, 63, 64, 87, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 130, 132, 134, 135, 160, 168, 173, 212, 271], "output_datafram": [112, 113], "output_typ": [34, 35, 36, 58, 62, 97, 99, 106, 112, 113, 118, 119, 127, 134, 271], "outreach": 257, "outsid": [4, 6, 8, 9, 11, 14, 15, 16, 27, 29, 30, 37, 85, 101, 109, 112, 113, 119, 130, 144, 150, 160, 283, 285], "outstr": 62, "outtmp": 62, "outward": 112, "over": [42, 44, 74, 109, 130, 135, 166, 182, 207, 268, 269, 276], "overal": [145, 275], "overarch": 24, "overcom": 236, "overflow": 134, "overflowerror": 134, "overlai": [14, 27, 190], "overlaid": 12, "overlap": [108, 265], "overplot": [157, 202], "overrid": [1, 2, 3, 11, 14, 20, 22, 33, 34, 35, 36, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 130, 132, 275], "overridden": [9, 30], "overrul": [14, 98, 112, 116], "overrule_bg": [98, 116, 269], "overus": 215, "overview": [134, 207, 240], "overview_level": 166, "overwritten": [2, 43], "ow": [2, 109, 119, 164], "own": [24, 97, 116, 134, 135, 197, 215, 272, 278], "ox": 176, "p": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14, 15, 16, 17, 18, 21, 23, 24, 25, 26, 27, 29, 31, 33, 34, 35, 36, 46, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 97, 103, 104, 108, 109, 110, 111, 112, 114, 117, 118, 119, 122, 125, 128, 132, 134, 135, 150, 160, 171, 172, 173, 176, 179, 182, 196, 200, 252, 253, 258, 262, 263, 265], "p0": [147, 150, 160, 170, 172, 179, 186, 196, 212], "p1": [146, 176], "p19": 200, "p1p": [12, 147, 171, 182, 186, 193], "p2p": 171, "p300": 58, "p5c": 253, "p5p": 171, "p8": [200, 265], "p_azimuth": 14, "p_plung": 14, "p_valu": 14, "pacif": [153, 210], "packag": [133, 134, 135, 136, 177, 208, 209, 212, 216, 265, 269, 277, 281], "pad": [43, 47, 50, 208, 225, 230], "page": [17, 19, 134, 135, 136, 207, 210, 215, 277], "page_nam": 135, "page_source_suffix": 134, "pages": 17, "paint": [2, 6, 7, 17, 24, 29, 98, 116, 262, 272], "pair": [11, 15, 18, 24, 114, 130, 195, 276], "palatino": 260, "palett": [7, 69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86, 98, 116, 139, 144, 164, 174, 202, 210, 270], "palmer": 202, "panda": [4, 8, 14, 15, 16, 18, 25, 29, 31, 33, 34, 35, 36, 58, 59, 62, 84, 97, 99, 105, 106, 112, 113, 114, 117, 118, 119, 121, 122, 123, 124, 125, 127, 128, 130, 132, 133, 134, 135, 139, 160, 168, 172, 193, 198, 202, 207, 208, 215, 216, 271, 273, 281], "panel": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 20, 22, 23, 24, 25, 26, 27, 29, 31, 78, 98, 116, 134, 145, 163, 195, 256, 271, 274, 275, 286], "paper": [144, 207, 275], "paragraph": [26, 135], "parallel": [9, 11, 15, 16, 24, 112, 150, 171, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 241, 242, 243, 244, 245, 246, 248], "paramet": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 40, 41, 42, 43, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 138, 139, 141, 144, 146, 147, 148, 150, 152, 153, 154, 155, 156, 159, 161, 162, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 191, 195, 196, 197, 198, 200, 201, 202, 203, 205, 206, 209, 210, 211, 212, 218, 220, 221, 223, 240, 245, 250, 253, 256, 264, 265, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283], "parameters_1": 199, "parameters_2": 199, "parameters_i": 199, "paramfunct": 277, "parent": 134, "parenthes": 24, "park": 185, "pars": [28, 62, 132, 268], "part": [14, 24, 26, 118, 134, 135, 160, 161, 238, 258, 277], "partial": [14, 112, 134], "particip": [135, 207], "particular": [4, 5, 110, 118, 131, 135, 136, 206, 225, 238, 266], "particularli": [98, 116, 235], "partit": 126, "partli": 265, "pass": [2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 19, 20, 22, 23, 25, 26, 27, 29, 31, 32, 34, 35, 36, 41, 43, 49, 50, 51, 52, 56, 57, 58, 59, 60, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 97, 103, 104, 112, 114, 115, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 132, 133, 134, 135, 148, 159, 168, 176, 177, 179, 181, 184, 185, 191, 195, 196, 197, 198, 199, 202, 203, 206, 209, 210, 212, 215, 264, 265, 268, 269, 270, 272, 273, 275, 276, 278, 279, 280, 281, 282, 283, 285], "password": 135, "past": [258, 268, 273], "patch": [105, 134, 215], "path": [0, 17, 27, 37, 47, 54, 60, 61, 62, 63, 85, 103, 115, 118, 129, 131, 134, 135, 159, 162, 163, 165, 168, 181, 208, 212, 269, 285], "pathlib": [0, 12, 54, 60, 61, 62, 63, 103, 115, 134, 165, 212, 285], "pattern": [0, 1, 2, 4, 8, 14, 15, 16, 18, 22, 23, 25, 26, 29, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132, 134, 150, 169, 171, 178, 191, 205, 256, 261, 265, 282], "paul": [207, 217, 257], "paulwessel": 257, "pblack": 272, "pborder": 109, "pd": [59, 62, 134, 139, 172, 193, 198, 202, 212, 268], "pdf": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 25, 26, 29, 31, 120, 134, 165, 217], "peak": 112, "peer": 134, "pen": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 23, 24, 25, 26, 29, 30, 31, 134, 141, 146, 147, 148, 152, 154, 155, 156, 157, 159, 160, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 191, 193, 195, 196, 197, 198, 199, 200, 203, 206, 210, 211, 250, 251, 252, 264, 265, 268, 271, 276, 277, 278, 280, 281, 282, 283, 285], "penguin": 202, "pentagon": 196, "peopl": [207, 215], "pep440": 134, "pep517": 134, "pep518": 134, "pep621": 134, "pep8": 135, "per": [3, 22, 29, 32, 33, 43, 99, 108, 110, 112, 114, 117, 132, 135, 139, 195, 202, 204, 265], "per_column": [108, 114, 134, 139, 202, 268], "percent": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 23, 25, 26, 29, 31, 108, 109, 119, 150], "percentag": [26, 125, 155, 203], "perfect": [135, 215], "perform": [0, 3, 6, 8, 20, 22, 24, 65, 78, 97, 99, 102, 105, 106, 107, 112, 116, 123, 124, 125, 126, 127, 128, 134, 136, 215, 256, 274, 286], "perhap": 33, "perimet": 7, "period": [8, 15, 16, 18, 26, 31, 34, 35, 36, 99, 112, 117, 119, 125, 126, 127, 128, 132, 198, 215, 268], "perman": [2, 266], "permiss": [131, 134, 135, 215], "perpendicular": 118, "person": 215, "perspect": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 22, 23, 25, 26, 27, 29, 30, 31, 78, 134, 138, 139, 221, 222, 223, 224, 236, 240, 256, 263, 269, 274, 286], "pertain": [7, 123], "petal": 139, "petal_length": 139, "petal_width": 139, "peucker": 104, "pgreen": 11, "phase": [8, 15, 16, 18, 26, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132], "philipp": 134, "philosoph": 226, "pi": [104, 138, 179, 183, 206], "pick": [98, 116, 275], "pie": [15, 199], "piec": [268, 276], "piecewis": 104, "pin": [134, 215], "ping": 215, "pink": 186, "pink3": 186, "pip": [85, 135], "pipelin": 134, "pixel": [6, 10, 17, 22, 32, 33, 34, 35, 36, 43, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 88, 102, 103, 108, 109, 110, 111, 114, 117, 122, 123, 124, 125, 128, 132, 134, 262, 269], "pkg_resourc": 134, "place": [3, 8, 10, 11, 12, 13, 14, 24, 25, 34, 35, 36, 98, 99, 105, 107, 108, 112, 116, 118, 119, 129, 135, 138, 144, 146, 147, 148, 149, 150, 160, 165, 181, 206, 208, 268, 272, 275], "placehold": [27, 85, 134], "placement": [4, 5, 13, 20, 144, 181, 285], "plai": [135, 207], "plain": [131, 134, 135, 150, 162, 163, 181, 212, 266, 271, 276], "plaintext": 134, "plan": [135, 215], "planar": [126, 128], "plane": [7, 14, 29, 104, 113, 118, 125, 191, 264, 269], "planetari": [133, 134, 137, 207, 217], "planetarymap": 137, "plate": 232, "platform": 136, "pleas": [27, 98, 116, 135, 136, 145, 148, 190, 195, 197, 207, 208, 215, 265, 268, 277], "pleasant": 135, "plot": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 46, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 98, 100, 109, 114, 116, 119, 134, 136, 137, 140, 141, 143, 144, 146, 147, 148, 150, 153, 154, 155, 156, 158, 159, 160, 161, 162, 164, 166, 168, 170, 171, 172, 173, 174, 175, 176, 178, 179, 180, 181, 182, 183, 184, 185, 187, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 205, 206, 209, 211, 212, 213, 215, 217, 240, 248, 250, 251, 252, 253, 256, 264, 265, 266, 269, 272, 273, 274, 275, 277, 278, 283, 284, 286], "plot3d": [134, 139], "plot_latitud": 14, "plot_longitud": 14, "plottabl": 206, "plr6201": 134, "plt": 275, "plu": [24, 108, 112, 160, 172, 196, 265], "plug": 135, "plugin": [47, 134, 208, 215], "pluto": [83, 134], "pluto_relief": 83, "plw1514": 134, "pm": 268, "pn": 277, "png": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 25, 26, 27, 29, 31, 85, 120, 134, 135, 165, 190, 217, 269, 277], "point": [0, 1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 15, 16, 18, 21, 22, 23, 24, 26, 28, 30, 31, 33, 34, 35, 36, 43, 84, 87, 99, 100, 101, 102, 110, 112, 114, 116, 117, 118, 119, 123, 125, 126, 127, 128, 130, 131, 132, 134, 139, 141, 143, 144, 146, 148, 150, 152, 154, 155, 157, 159, 160, 161, 163, 165, 168, 169, 170, 171, 172, 175, 176, 178, 179, 180, 181, 182, 183, 184, 185, 189, 191, 196, 200, 204, 205, 207, 212, 215, 219, 221, 222, 223, 233, 236, 250, 252, 256, 263, 265, 268, 276, 277, 280, 282, 283, 284, 285, 286], "point_1": 276, "point_2": 276, "pointer": [37, 42, 43, 44, 49, 50, 51, 52, 53, 54, 64], "pointfil": 119, "points1": 173, "points2": 173, "points3": 173, "points_categor": [202, 205, 256], "points_from_xi": 212, "points_transpar": [203, 205, 256], "polar": [0, 1, 9, 18, 21, 22, 30, 65, 126, 127, 128, 130, 134, 156, 233, 240, 254, 256, 263], "pole": [99, 118, 128, 130, 220, 234, 248, 263], "poli": [228, 263], "polici": [134, 216], "polit": [0, 1, 2, 22, 169, 188, 215, 256], "polycon": [0, 2, 22, 229, 240, 256, 263], "polygon": [0, 1, 2, 4, 7, 15, 16, 21, 22, 25, 108, 109, 119, 123, 126, 128, 133, 134, 160, 169, 185, 188, 200, 256, 262, 284, 286], "polygonfil": 119, "pond": [109, 119], "pop": [22, 259], "popul": 185, "popular": [135, 248], "portion": [13, 105, 106, 218, 264], "portrai": 210, "portrait": 134, "portugues": [134, 137], "posit": [3, 10, 11, 12, 13, 25, 26, 29, 31, 33, 34, 35, 36, 70, 71, 97, 99, 104, 112, 118, 119, 126, 130, 132, 134, 138, 139, 141, 143, 144, 146, 147, 148, 149, 150, 157, 160, 161, 162, 163, 164, 165, 183, 185, 207, 208, 265, 269, 271, 272, 275], "positron": 190, "possibl": [27, 46, 85, 97, 125, 126, 127, 128, 130, 135, 186, 190, 215, 216, 266, 275, 285], "possibli": [112, 207], "post": [135, 215, 217], "poster": [134, 217], "postscript": [6, 10, 17, 45, 134, 217, 260, 273, 285], "potenti": 125, "power": [0, 1, 3, 15, 22, 28, 136, 153, 207, 240, 254, 256, 263, 281], "ppm": [17, 19, 134], "pprint": 84, "pr": [134, 136, 215], "practic": [15, 16, 135, 136], "pre": [123, 133, 134, 135, 208], "precis": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132], "preconfigur": 2, "predefin": [200, 262], "predominantli": [225, 227], "prefer": [41, 42, 44, 135], "prefix": [17, 113, 131, 134, 135, 212], "premad": 131, "prepar": [62, 134, 203, 275], "prepend": [2, 3, 4, 8, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 99, 106, 112, 117, 119, 122, 125, 127, 128, 132, 138, 208], "preprocess": 125, "presenc": 125, "present": [4, 5, 15, 16, 25, 26, 33, 112, 130, 132, 134, 233, 234, 241, 242, 243, 245, 247, 285], "presum": 102, "pretend": 57, "prevent": 87, "preview": [0, 22, 120, 134, 135, 211, 215], "previou": [15, 16, 21, 31, 112, 117, 119, 134, 210, 213, 215, 268, 276], "previous": [215, 217, 276], "prews9": 137, "pricipal_axi": 134, "primari": [4, 8, 12, 15, 16, 18, 24, 26, 29, 31, 33, 34, 35, 36, 87, 99, 106, 112, 114, 117, 119, 122, 125, 127, 128, 132, 135, 146], "primarili": [135, 250], "prime": [209, 283], "primem": 166, "princip": [14, 18], "principal_axi": [14, 134], "print": [0, 37, 45, 46, 49, 54, 56, 57, 59, 60, 61, 62, 106, 113, 114, 121, 134, 135, 177, 185, 281, 285], "print_clib_info": 134, "printabl": [134, 273], "prior": [130, 215, 267, 272], "prioriti": 135, "privat": 134, "probabl": [87, 97, 103, 132, 208, 215], "problem": [37, 130, 135, 208, 215], "proceed": 135, "process": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 22, 23, 25, 26, 29, 31, 32, 34, 35, 36, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 112, 117, 119, 123, 125, 127, 128, 130, 132, 134, 136, 207, 215, 217], "processor": 130, "produc": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 60, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 135, 181, 268, 271], "product": 99, "profil": [7, 17, 112, 118, 134, 173], "program": [131, 133, 136, 207, 217], "progress": [98, 116, 130, 134, 136, 213], "proj_aux_latitud": [65, 112, 131], "proj_datum": 65, "proj_ellipsoid": [33, 34, 35, 36, 65, 103, 109, 110, 111, 112, 117, 122, 123, 124, 125, 128, 131, 132, 253], "proj_geodes": [65, 112, 131], "proj_length_unit": [17, 21, 26, 29, 31, 47, 65, 119, 276], "proj_mean_radiu": [65, 112, 131], "proj_scale_factor": [65, 238], "projc": 166, "projcod": [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 23, 24, 26, 29, 31, 101, 110, 119, 127, 128, 132], "project": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 21, 22, 23, 24, 26, 27, 29, 30, 31, 45, 46, 85, 98, 101, 103, 110, 112, 117, 119, 120, 126, 127, 128, 130, 132, 134, 135, 136, 138, 141, 144, 145, 146, 147, 148, 149, 150, 152, 153, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 208, 210, 211, 212, 215, 217, 224, 229, 239, 249, 250, 251, 252, 253, 254, 255, 256, 257, 261, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "projection_x_coordinateunit": 166, "projection_y_coordinateunit": 166, "projectionstandard_nam": 166, "projparam": [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 23, 24, 26, 29, 31, 101, 110, 119, 127, 128, 132], "prompt": 259, "prone": 136, "proof": 207, "proper": [134, 215], "properli": [134, 208], "properti": [0, 32, 37, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 104, 134, 177, 248, 275], "proport": [14, 135, 218, 220], "propos": 135, "protect": 130, "provid": [2, 3, 4, 6, 7, 8, 9, 14, 15, 16, 17, 18, 24, 26, 27, 29, 30, 31, 34, 35, 36, 49, 78, 85, 98, 104, 105, 106, 107, 108, 112, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 132, 133, 134, 136, 138, 148, 159, 160, 177, 185, 190, 191, 200, 207, 208, 212, 217, 230, 245, 261, 262, 264, 268, 270, 275, 281, 285], "provis": 134, "ps_char_encod": [65, 134], "ps_color_model": 65, "ps_comment": 65, "ps_convert": 65, "ps_image_compress": 65, "ps_line_cap": [65, 175], "ps_line_join": [65, 175], "ps_media": 65, "ps_miter_limit": [65, 175], "ps_page_color": 65, "ps_page_orient": 65, "ps_scale_i": 65, "ps_scale_x": 65, "ps_transpar": 65, "psconvert": [19, 22, 134], "pseudo": [241, 242, 244], "pth": 134, "ptolemi": 226, "public": [133, 136, 207, 217], "publish": [134, 207, 215], "pull": [134, 137, 207, 257], "pure": 8, "purepath": [12, 19], "purpl": [212, 268], "purpos": [168, 181, 215, 221], "push": [134, 135], "put": [37, 135, 275], "put_matrix": [43, 56, 57], "put_vector": [43, 49, 59], "pvalu": 252, "px": [103, 118], "pxa5d": 268, "pxa6h": 268, "py": [103, 118, 134, 135, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 214, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 256, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285], "pya1": 268, "pyarrow": [134, 208], "pydata": [134, 139, 202], "pygmt": [133, 134, 137, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 209, 210, 211, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 256, 258, 260, 261, 262, 263, 264, 265, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285, 286], "pygmt2021": 137, "pygmt_2024_14535921": 207, "pygmt_use_external_displai": [22, 134, 259], "pylint": 134, "pylintrc": 134, "pyogrio": [136, 212], "pyopensci": 134, "pypi": [134, 208], "pyproject": [134, 215], "pytest": [134, 135, 215], "pytestunknownmarkwarn": 134, "python": [8, 22, 23, 25, 48, 85, 115, 120, 121, 133, 134, 135, 136, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 209, 210, 211, 212, 213, 215, 216, 217, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 257, 259, 264, 265, 266, 267, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "python3": [212, 269], "q": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 27, 29, 31, 33, 34, 35, 36, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 179, 198, 209, 232, 258, 263], "q12c": 232, "q15c": 209, "qd1": 179, "qd1c": 179, "qe": 268, "qn": 179, "qn5": 179, "quad": 117, "quadrant": [14, 117, 191], "quadrat": [106, 107], "quadratic_dist": 271, "quadruplet": [34, 35, 36, 117], "qualiti": [133, 135, 136, 207, 217, 261], "qualnam": [88, 89], "quant": 33, "quantil": 33, "quantiti": [29, 33, 123, 144, 154, 160, 277], "quarter": [99, 268], "quarterli": [134, 135], "question": [20, 207, 275], "quick": [134, 135], "quicker": 207, "quickfix": 134, "quickli": 135, "quickstart": 134, "quiet": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132], "quinn": [134, 207], "quit": 135, "quot": [0, 1, 4, 5, 15, 22, 26, 134, 166, 169, 180, 256], "quotat": [41, 134], "quoted_lin": [179, 180, 256], "quotedlin": 179, "qupti": 134, "r": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 46, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 135, 141, 144, 145, 147, 150, 156, 166, 173, 176, 181, 187, 199, 200, 209, 215, 235, 248, 253, 258, 262, 263, 279, 283, 285], "r0": [18, 41, 46, 156], "r1": [18, 156, 199], "r100": 200, "r12c": [248, 270], "r2": [11, 146, 225, 230], "r3": 283, "r3p": 150, "r4": 199, "r5": 45, "r_i": 117, "radial": [18, 156, 222, 253], "radian": [29, 70], "radianc": [0, 3, 6, 21, 22, 65, 78, 104, 116, 167, 169, 256], "radic": 258, "radii": [18, 182, 219, 225, 227], "radiu": [1, 2, 3, 9, 10, 11, 12, 14, 30, 33, 101, 102, 112, 117, 119, 124, 131, 150, 171, 182, 199, 253, 263, 276], "radius_max": 253, "radius_min": 253, "railwai": 178, "rainbow": 144, "rainier": 210, "rais": [37, 41, 47, 50, 51, 52, 53, 64, 85, 94, 96, 129, 134, 215, 269], "rake": [14, 191], "rake1": 14, "rake2": 14, "rand": 245, "random": [118, 136, 155, 157, 201, 204, 265, 276], "randomli": 125, "rang": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 43, 75, 87, 98, 99, 100, 101, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 119, 122, 125, 127, 128, 130, 132, 136, 139, 156, 161, 164, 174, 202, 211, 253, 262, 265, 268, 269, 275, 277, 281, 283], "raphic": 17, "rapid": 215, "raster": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 23, 25, 26, 29, 31, 60, 63, 84, 85, 134, 136, 168, 262], "rasterio": [27, 85, 136, 269], "rate": [27, 85], "rather": [87, 97, 104, 135, 228, 233, 245, 271], "ratio": [17, 269], "raw": [6, 136, 139, 198, 202], "rayleigh": 18, "rb": 175, "re": [17, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 109, 120, 135, 136, 207, 212, 275, 278], "reach": 215, "read": [4, 5, 6, 7, 8, 10, 12, 15, 16, 18, 25, 27, 29, 31, 33, 34, 35, 36, 37, 49, 53, 54, 56, 57, 59, 60, 61, 62, 63, 84, 85, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 132, 134, 135, 136, 165, 166, 177, 185, 207, 212, 269], "read_csv": [134, 139, 202], "read_fil": [177, 185], "read_text": 61, "read_virtualfil": 61, "readabl": 135, "readi": [207, 208, 215], "readm": [134, 215], "readthedoc": [134, 135, 215], "real": 136, "realist": 78, "realli": [42, 207, 232], "reason": [135, 216, 276], "recalcul": [33, 34, 35, 36, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 132], "recent": 46, "recip": 215, "recogn": [112, 114, 134, 257, 268, 285], "recommend": [27, 85, 87, 125, 134, 135, 137, 207, 215, 216, 273, 275], "recomput": [87, 103], "record": [4, 8, 15, 16, 18, 25, 26, 29, 31, 33, 34, 35, 36, 46, 99, 106, 108, 112, 114, 117, 118, 119, 122, 125, 127, 128, 132, 134, 170, 212, 268], "rectangl": [3, 11, 26, 134, 144, 147, 193, 199], "rectangular": [0, 1, 2, 3, 6, 10, 11, 12, 13, 15, 22, 24, 101, 103, 110, 119, 151, 165, 169, 256], "recurs": 134, "red": [4, 5, 9, 26, 30, 117, 141, 160, 166, 171, 178, 179, 182, 183, 184, 186, 191, 193, 203, 207, 208, 209, 211, 212, 268, 272, 273, 276, 278, 280, 285], "red3": [146, 155, 156, 173, 176, 181, 182, 186, 197, 198, 199, 200, 206, 265, 276], "redesign": 134, "redirect": 134, "redistribut": 207, "reduc": [134, 161, 163, 269], "reduct": 101, "redund": [99, 125, 132], "refactor": 134, "refer": [1, 2, 3, 7, 9, 10, 11, 12, 13, 14, 15, 21, 23, 24, 26, 27, 29, 30, 31, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 98, 99, 116, 118, 126, 131, 134, 135, 136, 139, 144, 145, 148, 150, 152, 165, 170, 178, 181, 197, 200, 202, 208, 210, 215, 228, 240, 248, 253, 258, 259, 268, 270, 273, 285], "referenc": [6, 244], "reflect": [75, 104, 105, 107, 162, 216], "reflink": 135, "refpoint": [1, 2, 3, 10, 11, 12, 13, 15, 24, 31], "refresh": [134, 215], "reg": [56, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86], "regard": [118, 134, 208], "regardless": [118, 130, 135], "regexp": [4, 8, 15, 16, 18, 26, 29, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132], "region": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 33, 34, 35, 36, 45, 46, 53, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 117, 119, 120, 122, 123, 124, 125, 126, 127, 128, 130, 131, 132, 134, 135, 139, 141, 143, 144, 145, 146, 148, 149, 150, 151, 152, 153, 154, 156, 157, 159, 160, 161, 162, 163, 164, 165, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 208, 209, 210, 211, 212, 215, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 256, 264, 265, 266, 267, 269, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 284, 285, 286], "region_2d": 269, "region_3d": 269, "region_map": 160, "regist": [32, 33, 34, 35, 36, 44, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 97, 99, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 132, 134], "registr": [5, 6, 7, 32, 33, 34, 35, 36, 43, 46, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 88, 98, 103, 104, 108, 109, 110, 111, 114, 117, 122, 123, 124, 125, 127, 128, 132, 134, 160, 210, 269], "regress": [134, 215], "regular": [4, 5, 8, 15, 16, 18, 26, 29, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132, 155, 215, 228, 250, 275, 276], "regularli": 212, "reject": [27, 85, 119], "rejoic": 134, "rel": [1, 2, 3, 11, 13, 14, 21, 28, 74, 105, 107, 110, 116, 134, 153, 171, 179, 195, 218, 219, 236, 253, 271, 272, 285], "relat": [12, 14, 72, 87, 93, 103, 136, 210, 259, 265], "releas": [207, 208, 216, 257], "relev": [6, 8, 135], "reli": [40, 136], "relief": [0, 3, 6, 7, 22, 32, 78, 80, 81, 82, 83, 84, 86, 87, 100, 134, 145, 160, 161, 162, 163, 168, 256, 264, 267, 269, 271, 274, 286], "reliefgrid": 7, "remain": [8, 109, 118, 119, 196, 197, 216], "remark": [4, 8, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 99, 106, 112, 117, 119, 122, 125, 127, 128, 132], "rememb": [18, 42, 118, 119, 215], "remot": [32, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 122, 129, 134, 135, 137, 161, 163, 210, 212, 215, 269, 270], "remov": [4, 8, 15, 16, 17, 18, 26, 29, 31, 33, 34, 35, 36, 99, 106, 112, 117, 119, 122, 125, 127, 128, 132, 134, 215, 268], "remove_vers": 215, "renam": [134, 215], "render": 14, "renown": 248, "reorder": 134, "reorgan": 134, "repeat": [4, 8, 10, 15, 16, 18, 20, 24, 29, 31, 33, 34, 35, 36, 98, 99, 112, 114, 116, 117, 119, 122, 125, 127, 128, 132, 134, 262, 267, 268], "repeatedli": 134, "replac": [4, 8, 15, 16, 18, 28, 29, 31, 34, 35, 36, 97, 99, 102, 112, 117, 119, 125, 127, 128, 132, 134, 215, 258, 262], "repo": [134, 135], "report": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 66, 84, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 121, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 139, 154, 202, 215, 271], "repositori": [134, 135, 215, 257], "repres": [2, 6, 8, 21, 33, 99, 132, 134, 135, 150, 212, 253, 258, 265, 271, 276], "represent": [99, 132], "reproject": [27, 136], "request": [3, 24, 27, 85, 109, 119, 131, 134, 137, 178, 207, 257], "requir": [1, 2, 3, 11, 14, 15, 16, 17, 18, 26, 27, 29, 34, 35, 36, 42, 50, 57, 60, 69, 70, 71, 72, 73, 74, 77, 78, 79, 80, 81, 82, 83, 85, 86, 97, 99, 104, 106, 112, 113, 118, 119, 123, 127, 132, 134, 135, 136, 176, 195, 208, 209, 212, 215, 251, 252, 265, 269, 270, 272, 276, 277], "required_data": [55, 60], "required_z": [55, 60], "rerunfailur": 134, "resampl": [5, 6, 98, 112, 116, 123], "rescal": 29, "research": 207, "reserv": [20, 24, 134, 215], "reset": [15, 22, 32, 33, 34, 35, 36, 103, 109, 110, 111, 117, 120, 122, 123, 124, 125, 128, 132, 134, 190], "reshap": 57, "residu": 112, "resiz": [17, 19, 22], "resolut": [2, 5, 6, 7, 17, 22, 32, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 99, 100, 101, 104, 106, 107, 109, 110, 111, 112, 113, 119, 131, 134, 145, 160, 161, 162, 163, 164, 177, 200, 210, 262, 264, 267, 269, 270, 271, 277], "resolv": 135, "resourc": 134, "respect": [4, 8, 15, 16, 18, 21, 26, 27, 31, 33, 34, 35, 36, 49, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 99, 100, 103, 109, 110, 111, 112, 117, 119, 122, 123, 124, 125, 127, 128, 130, 132, 135, 139, 147, 153, 159, 160, 162, 163, 170, 173, 187, 191, 202, 207, 208, 211, 253, 262, 265, 268, 277, 279], "respons": [208, 257], "rest": [134, 135, 215, 216, 218], "restart": 208, "restrict": [117, 221], "restructur": 134, "restructuredtext": 135, "restyp": 48, "result": [6, 18, 33, 34, 35, 36, 62, 63, 97, 98, 99, 103, 104, 105, 106, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 132, 135, 215, 234, 245, 262, 273, 276], "ret": [33, 34, 35, 36, 87, 97, 99, 100, 101, 102, 103, 104, 106, 107, 109, 110, 111, 112, 113, 117, 118, 119, 122, 123, 124, 125, 127, 128, 132], "retain": [15, 16, 17, 104, 266], "retriev": [45, 136], "return": [33, 34, 35, 36, 40, 41, 43, 45, 46, 47, 48, 49, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 97, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 132, 134, 135, 138, 139, 162, 163, 202, 266, 269, 277], "revers": [3, 8, 98, 99, 112, 116, 119, 127, 128, 185, 253, 262, 269], "review": [134, 257], "revis": [108, 134], "rewrit": 134, "rgap": [1, 2, 3, 11], "rgb": [0, 6, 22, 65, 85, 98, 116, 134, 167, 169, 256], "rgb_imag": [166, 167, 256], "rhumb": [112, 233], "riangl": 176, "rich": [133, 136, 207], "richard": [14, 191], "rid": 134, "ridg": [84, 112, 168, 269], "ridlin": [33, 34, 35, 36, 103, 109, 110, 111, 114, 117, 122, 125, 128, 132], "right": [11, 12, 18, 24, 26, 97, 99, 112, 132, 134, 138, 141, 144, 147, 148, 149, 150, 157, 160, 163, 170, 172, 176, 181, 182, 183, 208, 209, 220, 225, 235, 245, 253, 265, 272, 275, 279, 283, 285], "ring": 199, "rio": [85, 134, 166], "rioxarrai": [85, 134, 166, 208], "rise": 235, "river": [2, 177], "rlbt": 200, "rltb": 175, "rm": [33, 108, 112, 125, 132, 135], "rng": [155, 157, 201, 204, 265], "ro": 186, "robinson": [0, 2, 22, 240, 249, 256, 263], "robust": 97, "rock": 84, "rock_composit": [84, 143], "rodulph": 228, "roll": 228, "roma": [3, 138, 144, 195], "roman": [24, 166, 260], "romania": 186, "root": [33, 108, 125, 135, 251], "rose": [0, 1, 2, 22, 84, 134, 137, 158, 169, 200, 256], "rota": 210, "rotat": [8, 29, 118, 171, 179, 199, 219, 253, 277, 285], "rough": 87, "round": [1, 2, 3, 11, 17, 26, 45, 108, 112, 114, 117, 139, 150, 175, 179, 199, 202, 283, 285], "routin": [128, 136], "row": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 20, 23, 24, 25, 26, 29, 31, 43, 62, 99, 101, 112, 132, 145, 163, 177, 185, 196, 208, 212, 275], "rpc": 269, "rsp": 118, "rst": [134, 135], "rtlb": 285, "rude": [2, 109, 119], "ruff": [134, 135], "rule": [134, 135], "run": [6, 22, 90, 101, 104, 130, 131, 134, 135, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 208, 209, 210, 211, 212, 213, 215, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 259, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "runner": [185, 208, 212, 269], "runtim": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132], "runtimewarn": 134, "rw": 135, "s0": [141, 148, 170, 196, 198, 204, 220, 250, 251, 268, 285], "s2c": [20, 24, 200], "s3": 166, "s45": 176, "sa": [100, 186, 276], "sa0": 171, "sai": 108, "sail": 233, "salvag": 134, "same": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 37, 49, 59, 60, 87, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 135, 138, 141, 157, 170, 172, 176, 178, 197, 199, 210, 232, 265, 268, 270, 273, 275, 276, 280], "sampl": [0, 1, 2, 6, 15, 22, 62, 66, 78, 84, 87, 98, 102, 103, 112, 117, 125, 134, 135, 139, 141, 143, 154, 156, 161, 162, 167, 169, 170, 175, 177, 202, 256, 260, 264, 267, 270, 281, 282], "satellit": 166, "satisfi": [117, 124], "satriano": 134, "save": [0, 18, 19, 34, 35, 36, 62, 63, 97, 98, 99, 103, 104, 106, 112, 113, 116, 118, 119, 123, 127, 130, 134, 136, 168, 269, 281], "savefig": [0, 134], "savetxt": 212, "sb": 100, "sc": [24, 131], "sc0": 171, "sc5": 137, "sca": 275, "scalar": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 23, 25, 26, 29, 31, 104, 134, 199], "scale": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 23, 24, 26, 29, 31, 33, 34, 35, 36, 65, 87, 97, 98, 101, 103, 104, 108, 110, 112, 114, 116, 117, 119, 122, 125, 127, 128, 132, 134, 138, 139, 144, 149, 151, 155, 157, 165, 166, 169, 183, 191, 193, 202, 204, 206, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 256, 265, 281], "scale_factor": 166, "scalebar": [144, 150, 151, 256], "scaled_mean_r": 18, "scan": [108, 119], "scanlin": [7, 99, 132], "scatter": [0, 1, 3, 8, 12, 15, 16, 21, 22, 114, 116, 134, 140, 158, 169, 202, 205, 256], "scatter3d": [139, 140, 256], "scatter_and_histogram": [157, 158, 256], "scatter_with_legend": 204, "scenario": 6, "schedul": [134, 215], "schema": 215, "scheme": [15, 49, 98, 112, 116, 134], "schlitzer": [134, 207, 257], "scienc": [133, 137, 207, 217], "scientif": [98, 116, 133, 134, 136, 144, 207, 215, 216, 217], "scipi": [115, 134, 217], "scm": [134, 210], "scope": [221, 266], "score": [107, 268], "script": [134, 135, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 209, 210, 211, 212, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 259, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "scroll": 135, "sd0": 171, "sdist": 134, "se": [56, 57, 59, 60, 131], "sea": [74, 77, 134, 182, 219, 276, 285], "seaborn": [139, 202], "seafloor": [69, 78, 134, 269], "seagreen": [157, 173, 186, 196, 197, 198, 199, 206, 225, 226, 227, 228, 285], "seamless": 136, "seamount": 78, "sean0921": 134, "search": [33, 102, 112, 113, 117, 130], "search_radiu": [33, 117], "season": 207, "secant": 238, "second": [8, 14, 15, 16, 18, 22, 23, 26, 27, 31, 33, 34, 35, 36, 43, 67, 68, 75, 78, 80, 81, 82, 83, 85, 87, 97, 103, 109, 110, 111, 112, 117, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 134, 135, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 209, 210, 211, 212, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "secondari": [1, 2, 3, 11, 87], "secret": 134, "section": [0, 1, 3, 6, 15, 21, 22, 23, 26, 78, 112, 118, 134, 135, 167, 169, 195, 208, 215, 256, 261, 268], "sector": [18, 87, 117, 156, 199, 200], "secur": 24, "see": [3, 4, 5, 6, 7, 12, 15, 16, 17, 18, 19, 24, 25, 26, 27, 29, 32, 33, 34, 35, 36, 43, 53, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 115, 116, 117, 118, 122, 123, 124, 125, 126, 127, 128, 130, 131, 132, 135, 136, 138, 148, 162, 169, 171, 176, 178, 179, 181, 182, 190, 197, 206, 207, 208, 209, 215, 238, 240, 250, 257, 260, 262, 265, 266, 270, 280, 282], "seed": [155, 201, 204, 265], "seen": [219, 223, 268], "seghead": [4, 8, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 99, 106, 112, 117, 119, 122, 125, 127, 128, 132], "segment": [0, 1, 4, 8, 15, 16, 18, 21, 22, 26, 29, 31, 33, 34, 35, 36, 43, 58, 65, 97, 99, 106, 112, 117, 118, 119, 122, 123, 125, 127, 128, 130, 132, 134, 169, 178, 180, 181, 256, 280, 282], "sei": 14, "seisman": 257, "seismic": [14, 144], "seismologi": [192, 256], "seismologist": 137, "sel": 75, "select": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 23, 24, 25, 26, 29, 30, 31, 33, 34, 35, 36, 74, 78, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 154, 155, 181, 185, 202, 206, 208, 209, 231, 245, 257, 272], "self": [24, 215], "semant": 215, "semi": [29, 207, 208], "semi_major_axi": 166, "send": [49, 56, 57, 59, 60], "sens": [9, 30, 98, 104, 116, 119, 163], "sensibl": 134, "sepal": 139, "sepal_length": 139, "sepal_width": 139, "separ": [1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 18, 24, 25, 29, 31, 33, 34, 35, 36, 41, 98, 99, 108, 112, 114, 116, 117, 119, 122, 123, 125, 127, 128, 132, 134, 135, 141, 144, 170, 171, 179, 186, 210, 212, 215, 280, 282], "sequenc": [9, 26, 28, 30, 43, 53, 59, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 112, 134, 215, 266], "sequence_comma": 215, "sequence_plu": 134, "sequence_spac": 134, "sequence_to_ctypes_arrai": 134, "sequenti": [24, 118], "ser": 29, "seri": [3, 6, 8, 14, 15, 16, 25, 29, 59, 97, 98, 116, 133, 134, 136, 139, 143, 144, 145, 155, 157, 162, 163, 164, 174, 185, 195, 202, 212, 265, 269, 271, 277, 281, 282], "seriou": [121, 215], "serv": [15, 27, 131, 215, 226], "server": [27, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 129, 161, 163, 190, 212, 215, 269, 270], "servic": [135, 215], "session": [91, 98, 116, 133, 134, 137, 266, 268], "session_point": [37, 42, 44], "set": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 42, 43, 44, 46, 47, 60, 62, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 134, 136, 138, 139, 141, 144, 145, 146, 147, 148, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 170, 171, 173, 174, 175, 176, 179, 181, 183, 185, 190, 191, 196, 197, 200, 201, 202, 204, 206, 208, 210, 211, 215, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 251, 252, 253, 256, 258, 259, 260, 262, 264, 265, 266, 269, 272, 273, 275, 276, 277, 279, 280, 281, 282, 284, 285, 286], "set_cr": 134, "set_displai": [22, 134], "set_panel": [145, 195, 271, 275], "seton": 269, "setosa": 139, "setup": [134, 163, 208, 215, 266, 271], "setuptool": 134, "setuptools_scm": [134, 215], "seven": 134, "seventh": 134, "sever": [1, 2, 24, 99, 102, 110, 119, 124, 132, 134, 135, 136, 145, 181, 199, 231, 235, 265, 285], "sft": 131, "sg0": 171, "sh0": 171, "sha256": 215, "shade": [1, 2, 3, 6, 7, 10, 11, 12, 17, 27, 29, 104, 105, 106, 134, 138, 163, 269], "shahid": 134, "shame": 215, "shape": [26, 56, 134, 136, 166, 181, 182, 225, 276, 282], "shapefil": [134, 177, 185], "share": [24, 37, 47, 48, 90, 92, 112, 134, 135, 141, 259, 269], "sharei": [24, 134, 163, 195, 275], "sharex": [24, 134, 163, 195, 275], "shell": [136, 208, 259], "shewchuk": [126, 127, 128], "shift": [1, 2, 3, 8, 11, 18, 21, 26, 134, 139, 150, 157, 160, 161, 162, 171, 172, 179, 265, 266, 272, 285], "shift_origin": [134, 139, 154, 157, 160, 161, 162, 170, 172, 175, 253, 265, 266, 275, 278, 282, 285], "shine": [104, 281], "shinx": 134, "ship": [34, 35, 36, 84, 119], "ship_data": 119, "shivani": 134, "shore": [2, 278], "shorelin": [0, 1, 2, 11, 22, 71, 75, 109, 134, 146, 147, 164, 169, 173, 177, 182, 186, 188, 191, 209, 210, 256, 272, 276, 277, 279, 283, 285], "short": [22, 66, 99, 131, 134, 135], "shortcut": [181, 195, 196, 197, 199], "shorten": 26, "shorter": 134, "shortli": 228, "shortlog": 215, "should": [4, 6, 8, 10, 15, 16, 18, 24, 26, 27, 29, 31, 33, 34, 35, 36, 49, 50, 64, 85, 99, 104, 106, 109, 110, 112, 117, 118, 119, 122, 123, 125, 126, 127, 128, 132, 134, 135, 141, 182, 207, 208, 215, 253, 268, 275, 276], "shouldn": 215, "show": [0, 1, 2, 3, 5, 6, 7, 9, 11, 15, 18, 19, 21, 23, 28, 30, 98, 120, 134, 135, 138, 139, 141, 143, 144, 145, 146, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 208, 209, 210, 211, 212, 215, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 256, 260, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "show_vers": [134, 208], "showcas": [134, 135], "shown": [28, 153, 161, 162, 185, 196, 197, 209, 266, 268, 270, 273, 276, 277, 279, 283], "shp": [177, 185], "shrink": 101, "si": [78, 100, 134, 135], "si0": 171, "side": [1, 2, 3, 11, 17, 20, 24, 99, 130, 131, 134, 135, 144, 157, 160, 176, 181, 195, 275, 276, 279], "sidebar": 134, "sigma": [29, 33, 104], "sign": [4, 8, 15, 16, 18, 21, 31, 33, 34, 35, 36, 97, 98, 99, 112, 116, 117, 119, 122, 125, 127, 128, 132, 273], "signatur": 84, "signific": 18, "silenc": 134, "sim": 125, "similar": [114, 134, 135, 199, 200, 215, 243, 250, 251, 252, 253, 264, 265, 268, 273, 275], "similarli": [21, 276], "simpl": [1, 2, 135, 207, 208, 232, 275, 276], "simpler": 104, "simpli": [4, 8, 15, 16, 18, 29, 31, 33, 34, 35, 36, 61, 99, 101, 112, 114, 117, 119, 122, 125, 127, 128, 132, 165, 181, 215, 276, 279], "simplic": [58, 236], "simplifi": 134, "simul": [15, 16, 29, 136], "simultan": 181, "sin": [32, 104, 148, 174, 179], "sinc": [28, 43, 123, 126, 127, 128, 134, 208, 215, 230, 246, 283], "sine": 179, "singl": [2, 3, 4, 8, 9, 10, 11, 14, 15, 16, 17, 18, 24, 28, 29, 30, 31, 33, 34, 35, 36, 41, 62, 97, 98, 99, 108, 109, 112, 114, 115, 116, 117, 118, 119, 122, 125, 127, 128, 132, 134, 135, 150, 195, 199, 211, 212, 228, 265, 266, 275, 276, 277], "single_form": 123, "singular": 234, "sinusoid": [0, 2, 22, 184, 240, 242, 249, 256, 263], "site": [13, 134, 193, 212, 269], "situat": 215, "six": 134, "sixth": 134, "size": [1, 3, 4, 5, 6, 7, 12, 14, 15, 16, 17, 18, 20, 24, 25, 26, 28, 29, 59, 60, 84, 85, 108, 134, 135, 139, 144, 146, 155, 156, 157, 160, 166, 168, 171, 176, 179, 183, 191, 196, 197, 200, 201, 202, 203, 204, 206, 209, 210, 215, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 265, 272, 275, 276, 281, 283, 285], "skill": 207, "skip": [4, 8, 13, 14, 15, 16, 18, 25, 26, 29, 31, 33, 34, 35, 36, 98, 99, 101, 106, 112, 114, 116, 117, 119, 122, 123, 125, 127, 128, 132, 134, 176], "skip_if_no": 134, "skiprow": [99, 112, 119, 127, 128], "sksquaroid": 171, "sky": 187, "skyblu": [187, 195, 209, 266, 278, 281], "slabel": 18, "slash": [4, 5, 11, 134, 215], "slat": 150, "slateblu": [196, 204], "slice": [15, 32, 51, 56, 57, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 98, 116, 134, 277, 285], "slider": 277, "slider_lon": 277, "slightli": [33, 34, 35, 36, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 132, 135, 154, 208, 245, 281], "slip": 176, "slon": 150, "slope": 104, "slope_fil": 104, "slow": [22, 27, 85], "slower": [87, 103], "sm": [7, 17], "small": [14, 17, 78, 105, 106, 118, 126, 127, 128, 135, 136, 221, 225], "smaller": [2, 6, 11, 18, 27, 75, 85, 109, 110, 119, 135, 161, 190, 268], "smallest": 87, "smith": [84, 125], "smooth": [5, 87, 103], "smooth_field": 103, "sn0": 171, "sne": 215, "snippet": 266, "snlr": 183, "so": [3, 6, 15, 16, 18, 22, 28, 32, 45, 49, 56, 57, 59, 60, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 98, 101, 103, 116, 118, 125, 128, 134, 135, 145, 156, 163, 171, 176, 179, 208, 215, 271, 275, 281], "societi": [234, 245, 248], "softwar": [18, 207], "soham": 134, "solar": [134, 151, 152, 200, 256], "soldner": 230, "solid": [2, 8, 14, 17, 23, 26, 29, 31, 150, 160, 175, 178, 191, 252, 265, 280, 282, 285], "solut": [125, 208], "solv": 125, "some": [21, 44, 97, 102, 105, 112, 123, 131, 132, 134, 135, 136, 148, 157, 207, 208, 209, 210, 212, 236, 268, 273, 275, 276, 281], "someth": [135, 139], "sometim": [208, 240, 273], "somewhat": 269, "son": 248, "sort": [16, 108, 118, 132, 134, 135, 136, 139, 202, 215], "sourc": [0, 19, 22, 27, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 134, 135, 136, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 208, 209, 210, 211, 212, 215, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 257, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "south": [7, 11, 18, 20, 24, 29, 45, 70, 85, 112, 118, 130, 134, 144, 150, 160, 163, 186, 225, 230, 244, 245, 264, 268, 276, 279, 283, 285], "southeast": 138, "southern": [209, 235, 268], "sovietskii": 236, "sp0": 171, "space": [1, 2, 3, 4, 8, 11, 12, 15, 16, 18, 20, 24, 31, 32, 33, 34, 35, 36, 43, 87, 97, 99, 103, 104, 108, 109, 110, 111, 112, 114, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 131, 132, 134, 139, 143, 145, 154, 155, 156, 164, 171, 179, 202, 210, 212, 219, 223, 225, 227, 234, 241, 242, 244, 246, 268, 272, 275, 285], "spain": 186, "span": 118, "spatial": [33, 87, 119, 125, 133, 136, 217], "spatial_ref": [85, 166], "spec": [12, 14, 29, 134, 148, 191, 193, 215, 216], "speci": [139, 202], "special": [21, 41, 97, 99, 118, 133, 134, 212, 258, 260, 273, 285], "specif": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 19, 23, 25, 26, 29, 31, 32, 33, 34, 35, 36, 58, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 115, 117, 118, 119, 122, 123, 124, 125, 127, 128, 131, 132, 134, 135, 136, 150, 176, 197, 207, 210, 215, 234, 235, 262, 268, 269, 270, 276, 283], "specifi": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 30, 31, 33, 34, 35, 36, 37, 61, 62, 63, 69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 136, 138, 143, 147, 150, 156, 164, 165, 168, 176, 181, 183, 184, 187, 191, 200, 210, 212, 218, 219, 220, 221, 222, 223, 231, 232, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 250, 259, 260, 262, 265, 266, 267, 268, 269, 275, 276, 278, 279, 283, 285], "spectrum": 133, "specular": 104, "speed": [130, 131, 215], "speedup": 134, "sph2grd": 134, "sphdistanc": 134, "sphere": [123, 236], "spheric": [27, 85, 87, 103, 112, 118, 119, 122, 123, 124, 131, 238], "spheroid": 166, "sphinterpol": 134, "sphinx": [134, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 209, 210, 211, 212, 213, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285, 286], "sphinx_gallery_thumbnail_numb": 135, "sphtriangul": [126, 127, 128], "spline": [6, 7, 102, 104, 110, 111, 112, 125, 130], "split": [24, 106, 130, 134, 135, 195, 277], "split_file4co": 130, "spread": 135, "sprint": 134, "spuriou": 125, "sqrt": [26, 102, 104, 138], "squar": [8, 33, 108, 125, 134, 135, 171, 173, 175, 196, 200, 250, 251, 252], "squaroid": 171, "squash": 215, "sr": [24, 100], "src": 135, "srijac": 134, "srtm": [78, 134], "srtm15": [78, 134, 161, 163, 269], "ss": [132, 198, 268], "ss0": 171, "st": [112, 141], "st0": 171, "st_size": [62, 63, 134], "stabl": [134, 135, 204, 208, 215], "stack": 112, "stage": [135, 152], "stai": 118, "stair": [8, 15, 16], "stamen": 134, "stamp": 17, "stand": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 276], "standalon": 134, "standard": [6, 8, 27, 33, 98, 107, 108, 112, 116, 132, 134, 136, 155, 157, 187, 204, 209, 225, 226, 227, 228, 231, 232, 233, 236, 238, 253, 258, 259, 260, 265, 272, 273], "star": [135, 171, 196, 269], "star4": 197, "start": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 20, 23, 25, 26, 29, 30, 31, 33, 34, 35, 36, 52, 88, 89, 98, 99, 106, 112, 114, 116, 117, 119, 122, 125, 126, 127, 128, 131, 132, 134, 135, 160, 171, 174, 176, 179, 182, 195, 198, 208, 209, 211, 217, 248, 266, 268, 271, 275, 276, 277, 279, 282], "start_latitud": 276, "start_longitud": 276, "startdir": [182, 199, 276], "starter": 134, "stastic": 78, "stat": [18, 62, 63, 134], "state": [0, 2, 22, 60, 103, 148, 169, 184, 188, 191, 225, 228, 256, 272], "statement": [11, 134, 135, 146, 147, 150, 272], "static": [98, 106, 107, 116, 127, 128, 134, 215, 217], "station": [29, 193, 202], "statist": [18, 33, 84, 104, 105, 107, 136, 271], "statu": [41, 50, 51, 52, 64, 135], "statut": [110, 150], "std": [108, 168], "stddev": [155, 265], "stderr": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132], "stdout": 121, "stead": 265, "steelblu": [150, 175, 177, 186, 230, 231, 232, 233, 234, 235, 236, 237, 238, 285], "steep": 125, "stem": 276, "step": [8, 43, 53, 113, 134, 135, 138, 144, 160, 174, 208, 209, 210, 215, 277, 279], "stereograph": [0, 2, 22, 168, 224, 239, 240, 256, 263], "stickler": 134, "still": [17, 32, 136, 215, 236, 276], "stop": [4, 8, 15, 16, 18, 27, 29, 31, 33, 34, 35, 36, 85, 99, 101, 106, 112, 114, 117, 119, 122, 125, 127, 128, 132, 134, 174, 182, 271, 276], "stopdir": [182, 199, 276], "storag": 215, "store": [32, 33, 34, 35, 36, 44, 55, 56, 57, 58, 59, 60, 61, 62, 63, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 109, 110, 111, 112, 113, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 132, 133, 134, 135, 160, 177, 185, 191, 212, 259, 268, 276], "str": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 40, 41, 42, 43, 46, 47, 48, 49, 51, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134], "str_": 52, "straight": [9, 15, 16, 26, 30, 219, 220, 221, 230, 231, 232, 233, 234, 237, 241, 242, 243, 244, 245, 246, 247, 248], "straight_lin": [15, 16], "strain": 29, "strait": 285, "strang": 134, "strftime": 28, "strictli": [15, 16, 118], "strike": [14, 104, 176, 191, 248], "strike1": 14, "strike2": 14, "string": [2, 4, 5, 8, 11, 12, 14, 15, 16, 18, 20, 23, 26, 28, 29, 31, 33, 34, 35, 36, 41, 43, 51, 62, 85, 99, 106, 108, 112, 115, 117, 119, 122, 125, 127, 128, 132, 134, 135, 136, 144, 153, 159, 162, 163, 172, 198, 206, 209, 211, 212, 258, 259, 267, 268, 273, 280, 282, 283], "string_view": 134, "stringarrai": 26, "stringio": [12, 58, 134], "strings_to_ctypes_arrai": 134, "strip": [37, 49, 56, 57, 59, 60, 101], "strive": 135, "strongli": 207, "struct": [42, 44], "structur": [37, 41, 49, 53, 104, 129, 134, 136, 276], "studi": [160, 269], "style": [0, 1, 2, 3, 9, 11, 13, 15, 16, 22, 25, 26, 28, 30, 99, 112, 134, 139, 141, 143, 147, 148, 150, 154, 157, 168, 169, 170, 171, 172, 173, 175, 176, 177, 179, 180, 181, 182, 185, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 210, 211, 212, 215, 250, 251, 252, 256, 265, 266, 268, 276, 279, 280, 281, 282, 285], "style_check": 215, "sub": [78, 103, 111, 119, 130], "subdirectori": 129, "subduct": [171, 176], "subject": 215, "submit": [121, 137, 215, 217], "submitt": 215, "subpackag": 135, "subplot": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 20, 21, 22, 23, 25, 26, 29, 31, 98, 116, 134, 135, 145, 163, 195, 256, 271, 274, 285, 286], "subregion": [53, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 101, 108, 134], "subsampl": 17, "subsect": 99, "subsequ": [44, 104, 275], "subset": [101, 117, 119, 134, 145, 166, 238], "subset_region": 145, "subsiz": [24, 195], "substanti": 257, "substitut": [4, 8, 15, 16, 18, 29, 31, 34, 35, 36, 99, 112, 117, 119, 125, 127, 128, 132, 134], "subtitl": 275, "subtract": 110, "successfulli": [208, 213], "suffix": [54, 61, 62, 63, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 130, 131, 265], "suggest": [125, 135, 207, 210], "suit": [134, 135, 212, 215, 230], "suitabl": [6, 24, 112, 135, 144, 221], "sulu": 285, "sum": [3, 24, 33, 34, 132], "sum_i": 117, "summar": [135, 215], "summari": [0, 34, 37, 105, 126, 154], "supplement": [14, 29, 108, 130, 131], "suppli": [2, 18, 20, 29, 33, 34, 35, 36, 99, 103, 104, 109, 110, 111, 112, 114, 117, 118, 119, 122, 123, 124, 125, 127, 128, 132, 138, 159, 232], "support": [3, 4, 5, 6, 8, 10, 15, 16, 18, 19, 26, 27, 29, 31, 33, 34, 35, 36, 41, 47, 50, 52, 60, 85, 99, 104, 106, 112, 115, 117, 119, 122, 125, 127, 128, 130, 132, 133, 134, 136, 177, 185, 198, 200, 206, 208, 212, 215, 217, 240, 261, 262, 265, 268, 273, 275, 276, 282, 285], "suppress": [99, 112, 119, 125, 127, 128, 134, 171, 179], "sure": [0, 50, 51, 52, 56, 57, 119, 134, 135, 215, 285], "surfac": [0, 3, 7, 22, 27, 65, 69, 75, 77, 78, 85, 104, 113, 116, 126, 128, 134, 140, 144, 169, 190, 207, 219, 221, 256, 264, 274, 286], "surftyp": [7, 138, 264, 269], "surround": [6, 24, 26, 101, 110, 148, 150], "survei": [33, 34, 35, 36, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 131, 132, 150, 160, 228, 230], "suspend": 22, "svg": [215, 269], "swap": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132], "sweden": 186, "swiss": 228, "switch": 134, "sx0": 171, "sxa1k": 268, "sxa1of1d": 268, "sy": 268, "sy0": 171, "symbol": [0, 1, 4, 8, 12, 14, 15, 16, 22, 25, 26, 29, 84, 133, 134, 139, 148, 157, 170, 171, 176, 200, 201, 202, 204, 205, 211, 251, 252, 256, 260, 273, 281, 285], "symlink": 135, "symmetr": [108, 172], "synbath": [78, 134], "sync": 135, "synopsi": 24, "syntax": [21, 134, 200, 212, 253, 262], "syria": 276, "system": [3, 9, 22, 27, 30, 32, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 95, 110, 118, 121, 128, 134, 135, 136, 166, 177, 207, 208, 212, 213, 253, 268], "systemat": 24, "s\u00e3o": 210, "t": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 41, 42, 43, 46, 47, 50, 51, 52, 64, 85, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 136, 141, 144, 150, 163, 171, 176, 181, 196, 206, 207, 208, 209, 211, 215, 219, 237, 253, 258, 263, 268, 273, 275, 276, 279, 281, 285], "t0": [196, 198, 211, 212], "t1": 163, "t10": 163, "t2": [19, 61], "t3": 61, "t35": [237, 276], "t45": [219, 253], "tO": 285, "t_azimuth": 14, "t_plung": 14, "t_valu": 14, "ta": 206, "tab": [108, 134, 135, 215], "tabl": [0, 1, 4, 7, 8, 15, 16, 18, 22, 25, 29, 31, 33, 34, 35, 36, 43, 60, 61, 62, 69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 97, 98, 99, 112, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 144, 159, 168, 207, 210, 213, 214, 245, 256, 258, 260, 263], "tabular": [4, 8, 15, 16, 18, 25, 29, 31, 33, 34, 35, 36, 62, 84, 99, 112, 114, 117, 118, 119, 122, 123, 124, 125, 127, 128, 132, 136, 159], "tackl": 135, "tag": [24, 130, 131, 215, 285], "tag_path": 130, "tail": [0, 1, 15, 22, 26, 108, 169, 180, 256, 276], "take": [3, 4, 5, 8, 11, 15, 16, 18, 29, 31, 33, 34, 35, 36, 98, 112, 114, 116, 117, 119, 122, 125, 127, 128, 132, 134, 135, 196, 208, 233, 264, 267, 268, 270, 275, 276, 280, 283], "taken": [4, 5, 29, 34, 35, 36, 99, 112, 118, 119, 135], "takuto": 137, "talk": [134, 217], "tall": 264, "tan": [104, 150, 207, 208], "tangent": [228, 238], "tankerslei": 134, "target": [134, 136, 161, 162, 163, 185], "task": [135, 286], "tasymmetr": 172, "tawanda": 134, "tazimuth": 163, "tbit": 200, "tbound": 172, "tc": [14, 24, 26, 28, 134, 211, 285], "tch": 134, "tclip": 161, "tcolorbar": 144, "td": [1, 54, 61, 62, 134], "tdecor": 171, "teach": [213, 286], "team": [134, 215, 216], "teardown": 266, "technic": [134, 135, 178, 197, 285], "techniqu": 276, "technologi": 136, "televis": [6, 10], "tell": [49, 87, 207, 208, 209], "temp": [37, 49], "templat": [134, 135, 215], "temporari": [134, 136, 215], "temporarili": [112, 134, 266], "ten": 3, "tend": 125, "tension": [102, 122, 124, 125], "tensor": [14, 29, 191], "tenth": 134, "ter": [15, 16, 31, 112, 117, 119], "term": [9, 18, 30, 135, 207], "termin": [0, 2, 22, 23, 42, 44, 134, 135, 151, 169, 181, 200, 256], "terminator_datetim": [23, 152], "ternari": [0, 3, 22, 84, 116, 134, 142, 169, 200, 256], "terra": [163, 168], "territori": 186, "tesla": 74, "test": [18, 22, 37, 56, 66, 84, 97, 99, 112, 117, 119, 127, 128, 134, 148, 207, 213, 215, 259], "test_logo": 135, "test_my_plotting_cas": 135, "testpypi": [134, 208, 215], "texa": [2, 186], "text": [0, 1, 2, 4, 8, 13, 14, 15, 16, 18, 20, 21, 22, 24, 28, 29, 31, 33, 34, 35, 36, 54, 61, 62, 99, 108, 112, 114, 117, 118, 119, 122, 125, 127, 128, 132, 134, 135, 144, 148, 150, 160, 169, 171, 175, 176, 178, 179, 181, 182, 196, 197, 200, 205, 207, 208, 211, 212, 215, 256, 258, 274, 275, 284, 286], "text1": 62, "text123": 62, "text23": 62, "text4": 62, "text456789": 62, "text567": 62, "text8": 62, "text90": 62, "text_symbol": [205, 206, 256], "textfil": [26, 285], "textiowrapp": 121, "textstr": 109, "textur": 2, "tfw": 19, "tg": [54, 63], "tgap": [1, 2, 3, 11], "th": [114, 117], "than": [2, 4, 5, 6, 8, 20, 24, 27, 28, 57, 62, 69, 70, 71, 72, 73, 74, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 103, 104, 109, 110, 112, 116, 118, 119, 125, 130, 132, 134, 135, 161, 206, 216, 219, 228, 238, 245, 257, 265, 271, 276, 281], "thank": 215, "thei": [15, 16, 18, 27, 43, 59, 85, 87, 103, 104, 109, 119, 132, 133, 135, 136, 139, 191, 202, 215, 228, 231, 251, 252, 273, 281], "them": [2, 4, 5, 10, 15, 16, 18, 26, 32, 98, 109, 116, 123, 133, 135, 157, 160, 184, 185, 215, 225, 226, 260, 267, 268, 269, 273, 275, 281], "therefor": [216, 223], "theta": [118, 253, 263], "theta_max": 253, "theta_min": 253, "thi": [0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 34, 35, 36, 37, 40, 41, 42, 43, 44, 48, 49, 50, 51, 52, 53, 56, 57, 59, 60, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 123, 125, 127, 128, 129, 130, 131, 132, 134, 135, 136, 137, 145, 146, 150, 159, 160, 169, 171, 179, 181, 195, 197, 207, 208, 209, 210, 212, 213, 215, 218, 220, 222, 223, 225, 227, 230, 231, 232, 233, 234, 237, 238, 244, 248, 253, 259, 265, 266, 268, 269, 271, 272, 273, 275, 276, 277, 281, 282, 283, 285], "thick": [150, 152, 160, 171, 172, 174, 175, 179, 184, 189, 191, 200, 210, 251, 252, 264, 265, 276, 277, 278, 280, 282, 283, 285], "thicker": [210, 267], "thillshad": 162, "thin": [11, 115, 146, 272], "thing": [133, 135], "think": 135, "thinner": 195, "third": [14, 15, 99, 112, 119, 127, 128, 134, 173, 219, 265], "thirteenth": 134, "thistogram": 155, "thorizont": 195, "those": [2, 3, 4, 6, 8, 10, 14, 15, 16, 24, 25, 29, 98, 116, 118, 136, 199, 207, 208, 215, 285], "though": 215, "thousand": 207, "thread": [6, 103, 109, 111, 122, 134], "three": [4, 8, 11, 15, 16, 18, 25, 29, 31, 33, 34, 35, 36, 41, 98, 99, 103, 112, 114, 116, 117, 118, 119, 122, 125, 127, 128, 132, 134, 139, 141, 143, 159, 163, 178, 199, 202, 235, 248, 259, 264, 275, 277, 285], "threshold": [6, 7, 104, 110, 111, 112, 147], "through": [0, 15, 16, 26, 98, 118, 129, 133, 135, 191, 208, 215, 259, 268, 276, 279, 281], "throughout": [135, 268], "thu": [22, 27, 85, 87, 98, 176, 190, 233, 234, 265], "thumb": [135, 269], "thumbnail": [134, 135], "thuri": 230, "tian": [134, 207, 217, 257], "tick": [0, 1, 2, 3, 22, 24, 138, 141, 144, 156, 160, 184, 187, 189, 211, 251, 252, 256, 265, 266, 268, 272, 277, 284, 286], "tidi": 215, "tie": 87, "tif": [19, 166], "tiff": [6, 17, 19, 134], "tile": [0, 3, 22, 27, 33, 78, 85, 104, 108, 133, 134, 136, 161, 163, 169, 188, 256, 269], "tilemap": [134, 136, 188, 190, 256], "tileprovid": [27, 85], "tilt": [219, 263], "time": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 43, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 133, 134, 135, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 209, 210, 211, 212, 215, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 259, 260, 263, 264, 265, 266, 267, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "time_col": 97, "time_epoch": 65, "time_interval_fract": 65, "time_is_interv": 65, "time_leap_second": 65, "time_report": 65, "time_unit": 65, "time_week_start": 65, "time_y2k_offset_year": 65, "timedelta64": [52, 134], "timefmt": [28, 153], "timestamp": [0, 1, 2, 22, 46, 134, 151, 169, 256], "timezon": 259, "tip": 273, "tiri": 139, "titl": [0, 1, 2, 3, 4, 8, 15, 16, 18, 22, 24, 26, 29, 31, 33, 34, 35, 36, 41, 99, 106, 112, 117, 119, 122, 125, 127, 128, 132, 134, 135, 139, 155, 166, 207, 211, 215, 253, 256, 268, 271, 273, 275, 284, 286], "tktmyd": 137, "tl": [24, 26, 28, 141, 146, 153, 166, 285], "tla": 99, "tline": [176, 178], "tm": 1, "tmain": 209, "tmean": 154, "tmpfile": [54, 61, 62, 63], "tmy": 41, "tnumber": 154, "to_cr": 177, "to_dataarrai": 134, "to_datetim": 268, "to_numpi": 269, "to_str": 85, "tobago": 279, "todo": 134, "togeth": [98, 116, 135, 179, 181, 197, 276], "toggl": 103, "token": [134, 135], "told": 209, "tomato": [178, 195, 196], "toml": [134, 215], "tomli": 134, "tomographi": 144, "tonei": [134, 137, 207, 257], "tong": [134, 137, 207], "too": [6, 103, 109, 111, 122, 186, 225], "tool": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 133, 135, 136, 137, 144, 145, 148, 161, 163, 165, 171, 178, 179, 181, 197, 207, 208, 209, 210, 215, 217, 257, 266, 269, 270, 285], "toolbox": 18, "toolkit": 136, "top": [0, 3, 7, 11, 12, 14, 22, 24, 26, 65, 69, 78, 104, 116, 133, 134, 135, 136, 141, 144, 146, 148, 149, 150, 154, 157, 160, 163, 172, 175, 179, 207, 208, 209, 215, 235, 250, 251, 252, 253, 256, 265, 272, 274, 275, 277, 279, 283, 285, 286], "topcent": 285, "topic": 135, "topleft": 285, "topograph": [0, 3, 7, 22, 65, 69, 78, 84, 116, 134, 256, 274, 286], "topographi": [76, 78, 105, 106, 125, 134, 144, 163, 210], "topright": 285, "torigin": [161, 162], "torr": 134, "total": [27, 85, 112, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 214, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 287], "total_bound": 185, "touch": [135, 237], "toward": [17, 104, 118, 136, 233], "tozer": [134, 161, 163, 269], "tpenguin": 202, "tpopul": 185, "tproject": 253, "tquot": 179, "tr": [26, 28, 148, 149, 285], "trace": [14, 109], "traceback": [39, 46], "track": [0, 1, 2, 6, 15, 22, 31, 78, 84, 109, 112, 118, 130, 131, 134, 135, 150, 167, 169, 178, 180, 215, 256], "track_df": 160, "track_sampl": [167, 168, 256], "trackvalu": 130, "trail": [4, 8, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 62, 99, 108, 112, 114, 117, 118, 119, 122, 125, 127, 128, 132], "train": 150, "transect": [0, 1, 3, 6, 15, 21, 22, 26, 78, 112, 118, 134, 167, 169, 256], "transform": [4, 6, 8, 10, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 110, 112, 114, 117, 118, 119, 122, 125, 127, 128, 132, 136, 251, 252], "transit": 152, "translat": [111, 123, 132], "transpar": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 25, 26, 27, 29, 31, 46, 98, 116, 134, 150, 152, 154, 157, 160, 169, 172, 200, 202, 204, 205, 207, 256, 262, 265], "transvers": [0, 2, 22, 147, 239, 240, 256, 263, 276], "transverse_merc": 166, "transverse_mercatorlatitude_of_projection_origin": 166, "travers": 109, "travi": 134, "travisci": 134, "treat": 206, "tri": [22, 91], "triag": [135, 257], "triangl": [4, 126, 127, 128, 171, 173, 176, 196, 201], "triangul": [4, 124, 134, 159], "triangular_mesh_pen": 4, "trick": 178, "trigger": [134, 215], "trigonometri": 118, "trinidad": 279, "tripel": [0, 2, 22, 145, 240, 249, 256, 263, 270], "triplet": [4, 16, 31, 34, 35, 36, 99, 117, 118, 125, 126, 183], "trivial": 215, "troubl": [130, 135], "trough": 112, "true": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 29, 30, 31, 33, 34, 35, 36, 45, 46, 55, 60, 72, 78, 85, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 120, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 139, 141, 143, 144, 145, 148, 149, 153, 156, 157, 160, 162, 163, 164, 165, 168, 173, 174, 177, 179, 182, 185, 186, 187, 189, 191, 193, 195, 196, 197, 199, 201, 202, 206, 207, 208, 209, 211, 212, 225, 226, 228, 238, 241, 242, 244, 245, 246, 247, 251, 252, 264, 265, 266, 267, 268, 269, 271, 275, 276, 277, 278, 279, 280, 281, 282, 285], "truli": 207, "truncat": [3, 6, 98, 103, 109, 111, 116, 122], "try": [6, 27, 37, 85, 103, 109, 111, 122, 129, 134, 135, 207, 210, 215, 281], "tryceratop": 134, "tsplit": 195, "tstack": 195, "tsunami": 281, "tsymmetr": 172, "tt": 279, "ttext": 61, "ttitl": [209, 211, 273], "ttrinidad": 279, "tuesdai": 134, "tune": 275, "tupl": 275, "turbo": [69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86, 264, 270], "turkei": 276, "turku": 271, "turn": [15, 16, 109, 130, 134], "tutori": [207, 208, 209, 210, 212, 213, 250, 256, 265, 268, 269, 274, 275, 277, 282, 283, 284, 287], "tvector": 181, "tvertic": 195, "twelfth": 134, "twice": [3, 15, 16, 18, 43, 178], "twilight": [0, 2, 22, 23, 151, 169, 256], "twist": [219, 263], "twitter": 134, "two": [4, 5, 6, 8, 14, 15, 16, 17, 24, 26, 28, 43, 53, 87, 97, 99, 104, 105, 108, 109, 110, 112, 113, 114, 130, 131, 132, 134, 135, 136, 138, 141, 147, 148, 150, 160, 163, 164, 168, 171, 176, 178, 179, 199, 202, 212, 215, 216, 225, 226, 227, 230, 236, 263, 265, 268, 269, 271, 275, 276, 280, 283, 285], "tx": [2, 186], "txt": [3, 54, 61, 62, 112, 122, 130, 134, 135, 207, 285], "tyler": [134, 207], "typ": 134, "type": [1, 2, 4, 5, 6, 7, 8, 14, 15, 16, 18, 23, 26, 31, 32, 33, 34, 35, 36, 37, 40, 43, 45, 46, 47, 48, 49, 51, 56, 57, 58, 59, 60, 61, 62, 63, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 97, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 136, 155, 176, 177, 179, 181, 198, 209, 212, 215, 218, 219, 220, 221, 222, 223, 264, 268, 283], "type_check": 215, "typeset": [0, 1, 22, 24, 26, 134, 256, 274, 286], "typic": [131, 176, 222, 236], "typo": [134, 135, 215], "tz": [28, 153, 206, 259], "t\u03c0": 206, "u": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 23, 24, 26, 29, 31, 33, 34, 35, 36, 45, 46, 62, 87, 97, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 117, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 136, 139, 143, 150, 160, 165, 166, 177, 182, 185, 186, 203, 209, 215, 217, 238, 258, 263, 265, 272, 275, 276, 286], "u10": 130, "u18": 62, "u52r": 238, "u54": 147, "uaf": 137, "ubuntu": 134, "uc": 139, "ucm": 268, "uieda": [134, 137, 207, 217, 257], "uint": 136, "uint16": [50, 52, 134], "uint16_t": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132], "uint32": [50, 52], "uint32_t": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132], "uint64": [50, 52], "uint64_t": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132], "uint8": [50, 52, 85, 134, 166], "uint8_t": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132], "ukm": 268, "ull": [2, 109, 119], "ulonglong": [50, 52, 134], "ulp": 119, "unabl": [208, 268], "unaffect": 130, "unannot": 267, "unawar": [126, 127, 128], "uncertainti": [29, 33, 72, 134, 200], "uncertaintycolor": 134, "uncertaintyfil": [29, 134, 193, 200], "unconstrain": [125, 132], "undefin": [98, 116, 258], "under": [11, 129, 135, 166, 207, 215, 244], "undergo": 215, "underli": [4, 159, 273], "underneath": [196, 197], "underscor": [134, 135], "understand": [145, 207, 212], "undesir": 125, "undo": 215, "unequ": [20, 225, 244], "unexpect": 273, "unfil": 102, "unicod": [258, 273], "unicodedecodeerror": 134, "uniform": [1, 2, 3, 11, 17, 18, 201], "uniformli": [98, 283], "unimpl": 215, "union": [26, 27, 85, 269], "uniqu": [118, 123, 131, 134, 135, 238], "unit": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 73, 74, 79, 87, 97, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 134, 135, 137, 144, 150, 156, 166, 173, 183, 225, 228, 272, 276, 281, 283], "unit_in_the_last_plac": 119, "uniti": 18, "univers": [0, 2, 22, 147, 217, 239, 240, 256, 263], "unix": [28, 134, 135], "unknown": [43, 46], "unless": [1, 2, 3, 11, 12, 14, 15, 16, 29, 87, 108, 112, 114, 115, 118, 119], "unlik": [220, 227], "unlink": [0, 103, 165, 212, 285], "unnecessari": 134, "unneed": 134, "unpin": 134, "unrecogn": 134, "unsign": [4, 8, 15, 16, 18, 31, 33, 34, 35, 36, 99, 112, 117, 119, 122, 125, 127, 128, 132], "unspecifi": 134, "unsupport": [95, 134], "until": [4, 8, 15, 16, 18, 20, 29, 31, 33, 34, 35, 36, 98, 99, 112, 114, 116, 117, 119, 122, 125, 127, 128, 132, 215, 276], "untouch": [17, 20, 24], "unus": [49, 134], "up": [0, 4, 7, 8, 15, 16, 18, 22, 25, 29, 31, 33, 34, 35, 36, 37, 43, 78, 104, 112, 114, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 132, 134, 144, 148, 149, 160, 165, 170, 175, 208, 216, 259, 264, 269, 275, 277, 282], "upcom": [215, 216], "updat": [29, 104, 134, 208], "upgrad": [134, 208], "upload": [134, 215, 269], "uploda": 215, "upon": [56, 57, 59, 270], "upper": [3, 11, 15, 16, 26, 31, 33, 87, 97, 112, 117, 119, 125, 130, 132, 147, 150, 171, 172, 179, 196, 199, 209, 235, 262, 269, 279], "uppercas": [24, 134, 206], "uppermost": 97, "upstream": [134, 171, 179, 215, 250], "upward": 215, "url": [13, 27, 85, 115, 129, 134, 165, 185, 207, 208, 212, 215], "url_to_imag": 269, "us": [17, 19, 32, 33, 35, 36, 37, 42, 44, 45, 48, 49, 50, 51, 52, 53, 56, 57, 59, 60, 64, 70, 71, 72, 74, 76, 77, 79, 80, 81, 82, 83, 85, 86, 87, 96, 97, 98, 102, 103, 105, 108, 110, 111, 113, 117, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 133, 134, 136, 137, 139, 141, 143, 144, 146, 147, 148, 150, 152, 154, 155, 156, 157, 159, 160, 162, 163, 164, 165, 166, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 189, 190, 191, 193, 195, 196, 197, 199, 200, 201, 202, 204, 206, 207, 209, 210, 212, 213, 215, 216, 217, 218, 220, 222, 223, 225, 227, 228, 230, 231, 232, 233, 234, 236, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 256, 258, 259, 260, 262, 264, 265, 266, 267, 269, 270, 272, 273, 274, 275, 276, 278, 279, 280, 281, 282, 283, 286], "usabl": 212, "usag": [42, 44, 134, 135, 215, 266], "use_alia": [134, 215], "use_srtm": 78, "use_word": [26, 134], "user": [1, 2, 3, 8, 11, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 97, 102, 112, 119, 121, 125, 129, 131, 132, 133, 134, 135, 136, 148, 172, 197, 207, 208, 215, 216, 217, 262, 266, 277], "user_guid": [139, 202], "userdist": 131, "usernam": 208, "usertim": 131, "userwarn": [134, 212], "usg": 84, "usgs_quak": 84, "usual": [24, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 118, 125, 135, 208, 215, 217, 228, 275, 281], "utc": [23, 152, 259], "utf": 121, "utm": [147, 166, 238], "uto": 109, "uuid": 134, "uuid4": 134, "v": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 27, 29, 31, 33, 34, 35, 36, 46, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 137, 144, 179, 181, 182, 195, 215, 219, 235, 247, 258, 263, 276], "v0": [18, 181, 182, 208, 215, 216, 276], "v031": 18, "v0c": [181, 276], "v1": [134, 215], "v12c": 247, "v1c": [181, 276], "v2": [134, 137, 161, 163, 269], "v4": 195, "v60": 219, "valid": [8, 15, 16, 19, 22, 26, 43, 46, 49, 53, 54, 60, 61, 63, 64, 119, 134, 150, 259, 268], "validate_output_table_typ": 134, "vallei": [162, 271], "valu": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 40, 43, 46, 47, 53, 54, 56, 61, 63, 65, 70, 71, 72, 75, 76, 77, 78, 85, 87, 88, 89, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 132, 134, 135, 139, 143, 144, 150, 154, 156, 157, 159, 163, 164, 167, 168, 169, 174, 176, 187, 195, 199, 202, 208, 209, 210, 236, 245, 251, 252, 253, 256, 267, 268, 269, 270, 271, 276, 277, 280, 281, 282, 283], "van": [0, 2, 22, 240, 249, 256, 263], "vanish": 225, "vari": [0, 1, 15, 16, 22, 26, 53, 64, 99, 106, 107, 114, 134, 139, 169, 199, 202, 205, 209, 238, 256, 277, 285], "variabl": [4, 8, 15, 16, 18, 22, 25, 26, 28, 29, 31, 32, 33, 34, 35, 36, 37, 97, 112, 114, 115, 117, 118, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 134, 138, 208, 210, 212, 261], "variant": 212, "variat": [3, 160, 265], "varieti": [212, 262, 268], "variou": [13, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 121, 136, 212, 259, 268, 286], "ve": [46, 135], "vecstyl": 181, "vector": [0, 1, 2, 15, 16, 18, 19, 22, 26, 29, 49, 51, 52, 59, 60, 65, 104, 123, 133, 134, 138, 176, 180, 193, 217, 256, 274, 286], "vector_1": 276, "vector_2": 276, "vector_3": 276, "vector_heads_tail": [180, 181, 256], "vector_num": 276, "vector_param": 18, "vector_styl": [180, 182, 256], "velo": [134, 193, 200], "velo_arrow_ellips": [192, 193, 256], "veloc": [0, 3, 22, 29, 169, 192, 200, 256], "velscal": 29, "venu": [86, 134], "venus_relief": 86, "verbos": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 29, 31, 33, 34, 35, 36, 46, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 215], "vercel": 134, "veri": [6, 15, 17, 105, 106, 126, 127, 128, 135, 217, 218, 266], "versa": [111, 190], "versicolor": 139, "version": [37, 47, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 96, 97, 100, 121, 134, 141, 199, 207, 208, 215, 250, 251, 252, 253, 259, 279], "versu": 124, "vertex": 25, "vertic": [0, 1, 3, 7, 8, 11, 15, 20, 22, 24, 26, 28, 30, 31, 79, 116, 134, 139, 144, 148, 150, 169, 171, 183, 205, 256, 275, 277, 285], "vfarg": 49, "vfile": [49, 61], "vfname": [49, 54, 58, 62, 63], "vgg": 79, "vheight": [219, 263], "vi": [0, 2, 22, 240, 249, 256, 263], "via": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 23, 24, 25, 26, 28, 29, 31, 34, 35, 36, 43, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 97, 98, 101, 102, 103, 104, 108, 109, 112, 115, 116, 117, 118, 119, 123, 125, 126, 127, 128, 130, 132, 133, 134, 143, 144, 148, 150, 153, 154, 155, 160, 161, 165, 170, 171, 173, 175, 176, 179, 186, 190, 191, 196, 199, 200, 202, 208, 219, 253, 265, 269, 275, 277, 282, 285], "vice": [111, 190], "video": 134, "view": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 19, 23, 25, 26, 29, 30, 31, 104, 112, 134, 135, 138, 139, 181, 218, 219, 223, 264, 277], "viewer": [16, 19, 22, 120, 134, 259], "viewpoint": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 23, 25, 26, 29, 30, 31, 219, 264], "viewport": 219, "vik": 271, "vingrd": 134, "vintbl": 134, "violat": 134, "virginica": 139, "viridi": 281, "virtual": [28, 37, 49, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 133, 134, 135, 208], "virtualfil": [60, 134, 135], "virtualfile_from_data": 134, "virtualfile_from_grid": [37, 57], "virtualfile_from_stringio": 134, "virtualfile_from_vector": 134, "virtualfile_in": 134, "virtualfile_out": [54, 62, 63, 134], "virtualfile_to_dataset": [58, 134], "visibl": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 23, 25, 26, 29, 31, 218, 265, 267], "visit": [98, 116, 207, 261], "visitor": 134, "visual": [0, 2, 3, 6, 22, 78, 116, 134, 135, 136, 137, 139, 168, 202, 217, 256, 260, 261, 265, 269, 273, 274, 286], "vitor": 134, "vline": 134, "voic": 207, "void": [43, 49, 50, 51, 52, 54], "void_point": 54, "volcano": 197, "volum": 113, "von": 243, "voronoi": [123, 126, 128], "vote": 257, "voutgrd": [54, 63], "vouttbl": [54, 61, 62], "vowel": 135, "voyag": 233, "vwidth": [219, 263], "vx": 215, "w": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 54, 56, 61, 62, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 121, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 141, 144, 148, 150, 154, 161, 170, 172, 183, 190, 199, 209, 219, 244, 253, 258, 263, 265, 268, 279, 282, 285], "w0": [152, 219], "w100": 183, "w10c": [6, 23, 163], "w120": 135, "w12c": 244, "w15c": [0, 135, 187, 189, 278], "w1c": [20, 24], "w2": 199, "w3": [11, 146, 185], "w3c": [11, 149, 165, 271, 272], "w4c": 144, "w500k": 150, "w5c": 160, "w68": 209, "w69": 209, "w6c": 148, "w7c": [144, 162], "w8c": [161, 164], "w_": 118, "w_i": 117, "w_max": 118, "w_min": 118, "wa": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 20, 23, 25, 26, 29, 31, 37, 46, 62, 63, 103, 108, 132, 134, 135, 136, 207, 212, 217, 222, 226, 227, 228, 230, 234, 235, 237, 238, 244, 245, 248, 269, 275], "wai": [11, 15, 41, 43, 103, 104, 105, 106, 107, 110, 118, 134, 197, 207, 208, 212, 215, 235, 258, 266, 268, 275], "wait": [22, 27, 85, 134], "want": [6, 20, 26, 87, 97, 102, 112, 118, 135, 148, 207, 208, 212, 215, 240, 259, 269, 273, 275, 278], "warn": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 121, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 134, 135, 164, 190, 215, 218, 268], "washington": 191, "watch": 137, "water": [0, 1, 2, 11, 22, 23, 109, 113, 143, 146, 147, 150, 152, 153, 160, 164, 169, 186, 188, 191, 200, 207, 208, 210, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 256, 266, 272, 276, 277, 281, 283, 285], "waterfal": 7, "watson": [126, 127, 128], "wc": 7, "wdmam": 74, "we": [1, 2, 3, 6, 11, 15, 16, 17, 18, 20, 25, 26, 29, 31, 49, 56, 57, 58, 59, 60, 87, 97, 98, 99, 101, 103, 104, 108, 109, 111, 112, 114, 116, 118, 119, 122, 125, 129, 130, 131, 132, 135, 136, 138, 139, 141, 156, 159, 161, 162, 165, 166, 168, 171, 176, 181, 185, 191, 195, 196, 198, 199, 202, 206, 207, 208, 212, 215, 217, 238, 257, 259, 266, 269, 271, 272, 273, 275, 276, 279, 281, 285], "weather": [171, 176], "web": [22, 27, 85, 134, 217], "webinar": 137, "websit": [134, 165, 215], "wedg": [29, 199, 200], "wedgemag": 29, "wedgescal": 29, "wednesdai": 134, "week": 268, "weekli": [8, 15, 16, 18, 26, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132, 134], "wei": [134, 137, 207, 217, 257], "weight": [8, 33, 34, 35, 36, 87, 97, 99, 103, 106, 107, 112, 117, 285], "weiji14": [137, 257], "welcom": [135, 213, 215, 217, 257], "well": [1, 2, 3, 11, 18, 29, 45, 119, 133, 134, 135, 136, 160, 172, 175, 185, 196, 206, 208, 228, 232, 251, 252, 268], "were": [53, 132, 209, 210, 223, 268], "wesn": [0, 64], "wessel": [125, 207, 217, 257], "west": [11, 18, 20, 24, 29, 45, 70, 85, 104, 112, 134, 150, 160, 162, 163, 225, 227, 264, 268, 269, 279, 283], "western": [209, 210, 268], "wet": [0, 1, 2, 3, 6, 22, 109, 116, 119, 167, 169, 256], "wf": 7, "wg": 166, "wgs_1984": 166, "what": [13, 17, 27, 85, 108, 135, 169, 207, 209, 231, 275], "whatev": 208, "wheel": 134, "when": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 29, 31, 32, 33, 34, 35, 36, 37, 43, 49, 50, 53, 60, 69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82, 83, 86, 87, 90, 94, 96, 97, 98, 99, 100, 101, 104, 108, 109, 110, 111, 112, 114, 116, 117, 118, 119, 120, 121, 122, 123, 125, 127, 128, 131, 132, 134, 135, 136, 141, 148, 150, 174, 176, 181, 208, 209, 212, 215, 232, 235, 248, 253, 258, 259, 260, 268, 272, 273, 275, 276, 281, 282], "whenev": 135, "where": [1, 2, 3, 4, 5, 8, 11, 15, 16, 17, 18, 21, 24, 25, 26, 29, 31, 33, 34, 35, 36, 37, 70, 71, 74, 98, 99, 102, 104, 112, 114, 116, 117, 118, 119, 122, 125, 127, 128, 129, 131, 132, 135, 150, 166, 168, 176, 190, 195, 206, 207, 208, 209, 210, 215, 216, 232, 248, 259, 262, 268, 276], "wherea": 178, "wherebi": 211, "wherev": [98, 116], "whether": [15, 16, 18, 33, 34, 35, 36, 46, 60, 87, 100, 101, 102, 103, 104, 109, 110, 111, 114, 117, 119, 122, 123, 124, 125, 128, 131, 132, 215, 259, 265], "which": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 25, 26, 29, 31, 32, 33, 34, 35, 36, 42, 53, 70, 72, 74, 78, 79, 80, 81, 82, 83, 87, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 130, 131, 132, 134, 135, 136, 139, 141, 156, 168, 171, 175, 176, 185, 193, 196, 197, 202, 207, 209, 210, 212, 215, 217, 219, 221, 225, 228, 233, 237, 238, 240, 253, 257, 258, 259, 264, 266, 267, 268, 269, 275, 276, 278, 279, 280, 281, 283], "while": [22, 24, 33, 97, 108, 112, 132, 135, 173, 195, 209, 211, 216, 228, 243, 268, 285], "whilst": 113, "white": [6, 11, 12, 14, 105, 106, 146, 147, 150, 154, 157, 160, 175, 178, 182, 186, 191, 200, 218, 219, 220, 221, 222, 223, 262, 265, 272, 281, 283, 285], "whitespac": [41, 134], "who": [208, 215, 233], "whole": [2, 53, 135, 223, 275], "whose": [15, 16, 25, 99, 112, 118, 119, 127, 128, 135, 154, 173], "why": [135, 215, 276], "wide": [13, 133, 134, 135, 136, 143, 145, 149, 165, 178, 207, 209, 217, 238, 270, 275], "widget": 277, "width": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 84, 87, 97, 101, 103, 110, 112, 118, 119, 127, 128, 132, 134, 139, 143, 144, 145, 146, 147, 148, 150, 155, 156, 157, 160, 161, 170, 172, 178, 183, 186, 199, 206, 209, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 263, 265, 269, 272, 275, 277, 279, 280, 282], "width2": 103, "wieczorek": 134, "wiggl": [0, 1, 22, 134, 169, 180, 200, 256], "wiki": [19, 23, 119, 138, 152, 283], "wikimedia": 269, "wikipedia": [19, 23, 119, 138, 152, 269, 283], "wildfir": 166, "william": 207, "willing": 135, "willschlitz": 257, "winc": 283, "window": [22, 118, 130, 134, 135, 208, 215, 259], "windros": [18, 156], "winkel": [0, 2, 22, 145, 240, 249, 256, 263, 270], "wise": 25, "wish": [103, 125, 135, 206, 275], "within": [2, 11, 33, 34, 35, 36, 75, 101, 103, 108, 112, 117, 118, 119, 130, 135, 146, 147, 148, 150, 154, 183, 184, 191, 210, 215, 218, 253, 259, 272, 275, 276], "without": [6, 17, 37, 59, 61, 91, 132, 134, 135, 141, 150, 181, 209, 215, 228, 269, 275, 282, 283], "wlabel": 18, "wm": 7, "wmode_fil": 18, "wne": 253, "wnse": [253, 271], "won": [22, 32, 50, 51, 52, 135, 208], "woodson": 134, "word": [4, 8, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 43, 99, 112, 114, 117, 119, 122, 125, 127, 128, 132, 135, 207, 248], "work": [17, 19, 22, 27, 29, 32, 37, 45, 78, 85, 112, 134, 135, 136, 200, 207, 212, 215, 218, 277], "workaround": [32, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 134, 215], "worker": 235, "workflow": [134, 215], "workflow_dispatch": 134, "working_with_panel": [256, 274, 277], "workshop": [134, 137], "world": [2, 19, 74, 84, 108, 134, 136, 166, 168, 218, 233, 245, 247, 248, 279], "world_fil": 19, "worldfil": [19, 134], "worldview": 166, "worldwind": 134, "worri": 135, "worth": 207, "would": [6, 20, 24, 135, 209, 210, 215, 228, 271, 275], "wpen": 178, "wrap": [8, 15, 16, 18, 26, 31, 34, 35, 36, 41, 50, 51, 52, 53, 64, 98, 112, 116, 117, 119, 125, 127, 128, 132, 134, 135, 207, 215, 268], "wrapper": [9, 30, 49, 115, 133, 134, 207, 209, 217, 268], "write": [4, 8, 15, 16, 18, 26, 29, 31, 33, 34, 35, 36, 49, 61, 64, 87, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 116, 117, 119, 122, 123, 124, 125, 127, 128, 131, 132, 134, 135, 136, 139, 148, 164, 174, 202, 207, 212, 215, 285], "write_cr": 134, "write_data": 134, "writer": 269, "written": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23, 24, 25, 26, 29, 31, 33, 34, 35, 36, 61, 64, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, 130, 131, 132, 135, 267], "wrong": 207, "wrote": 135, "wsen": [198, 202, 268, 273], "wsne": [7, 144, 147, 148, 150, 155, 161, 166, 170, 172, 174, 193, 211, 251, 252, 264, 265, 271, 275, 279, 285], "wsnez": 139, "wsnez3": 139, "wsnr": 265, "wsrt": [157, 160, 162, 203, 204, 275], "wstr": [211, 265, 285], "ww": [98, 116], "www": [67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 86, 129, 134, 135, 137, 165, 207], "x": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 25, 26, 27, 29, 30, 31, 33, 34, 35, 36, 45, 46, 49, 55, 59, 60, 85, 87, 99, 102, 103, 104, 105, 107, 108, 109, 110, 111, 112, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 130, 131, 132, 134, 138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 153, 154, 155, 157, 159, 160, 161, 162, 164, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 185, 190, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 209, 210, 211, 212, 215, 250, 251, 252, 258, 263, 264, 265, 267, 268, 269, 270, 271, 272, 273, 276, 277, 279, 280, 281, 282, 283, 285], "x0": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 18, 23, 25, 26, 29, 31, 108, 156, 193, 196], "x1": [108, 166, 195], "x10c": [3, 9, 21, 30, 120, 148, 153, 159, 165, 172, 179, 183, 200, 202, 204, 211, 212, 265, 268, 276, 279], "x12c": [160, 196, 197, 206], "x14c": [21, 273], "x15c": [141, 171, 176, 178, 179, 181, 198, 201, 203, 250, 268, 280], "x15cl": 251, "x15cp0": 252, "x1p": 175, "x2": 195, "x27": 166, "x2sy": [130, 131, 207, 259], "x2sys_cross": 134, "x2sys_get": 130, "x2sys_hom": [130, 131, 259], "x2sys_init": [134, 259], "x3": [157, 195], "x3c": [144, 199], "x4": 195, "x5c": [144, 282, 285], "x5i": 276, "x6c": [149, 170], "x86_64": 208, "x_end": 268, "x_inc": [33, 34, 35, 36, 87, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 132, 190], "x_max": [160, 250], "x_min": [160, 190, 250], "x_start": [268, 276], "xa": [7, 264], "xa0": [144, 162, 204], "xa1000f500": 162, "xa1f0": 199, "xa2": 211, "xa2000f500": 163, "xa2f1": [160, 172, 183], "xa2f1g2": 211, "xa2g3": 251, "xa30f": 253, "xa45f": 253, "xa5f1": 161, "xaf": [141, 148, 203, 264, 271, 273, 279, 281], "xaf10": 265, "xaf10g10": 265, "xafg": [139, 202], "xarrai": [4, 5, 6, 7, 8, 15, 16, 18, 25, 29, 31, 32, 33, 34, 35, 36, 37, 56, 60, 63, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 117, 118, 119, 121, 122, 123, 124, 125, 127, 128, 132, 133, 134, 135, 138, 162, 163, 166, 168, 198, 207, 208, 215, 216, 269, 270], "xarray_obj": 32, "xdist": 134, "xf": 157, "xf1": 211, "xfail": 134, "xfga1p": 252, "xg2": 211, "xgap": [1, 2, 3, 11], "xinc": [108, 283], "xl": [15, 16], "xlabel": 211, "xline": 251, "xlong_nam": 166, "xmax": [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 23, 24, 26, 27, 29, 31, 33, 34, 35, 36, 53, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 117, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 139, 157, 202, 265, 270, 283], "xmin": [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 23, 24, 26, 27, 29, 31, 33, 34, 35, 36, 53, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 117, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 139, 157, 202, 265, 270, 283], "xml": 134, "xn": 11, "xnone": 134, "xoff": [21, 108], "xoffset": 150, "xpandasindexpandasindex": 166, "xpoint": 251, "xr": [32, 60, 63, 134, 138, 198, 268, 269], "xshift": [21, 46, 134, 139, 154, 157, 161, 162, 170, 172, 253, 265, 278, 282, 285], "xvalu": 252, "xw": 46, "xx": [132, 266], "xy": [112, 131], "xypqrsz": 118, "xyz": [27, 85, 99, 131, 133, 134], "xyz2grd": [134, 154], "xyz_datafram": 99, "xyzpqr": 118, "xyzservic": [27, 85], "y": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 46, 49, 55, 59, 60, 65, 85, 87, 98, 99, 102, 103, 104, 105, 107, 108, 109, 110, 111, 112, 116, 117, 118, 119, 122, 123, 124, 125, 126, 127, 128, 130, 131, 132, 134, 138, 139, 142, 144, 145, 146, 147, 148, 149, 150, 153, 154, 155, 157, 159, 160, 161, 162, 164, 166, 168, 169, 170, 171, 172, 173, 174, 175, 176, 178, 179, 181, 182, 183, 190, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 209, 210, 211, 212, 215, 231, 235, 245, 250, 251, 252, 256, 258, 263, 264, 265, 267, 268, 269, 270, 272, 273, 276, 277, 279, 280, 281, 282, 283, 285], "y0": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 18, 23, 25, 26, 29, 31, 108, 196], "y1": [108, 141, 148], "y2": [141, 148], "y3": 148, "y30g30": 156, "y35": 231, "y4": 148, "y_1": 211, "y_2": 211, "y_bound_low": 172, "y_bound_upp": 172, "y_deviation_low": 172, "y_deviation_upp": 172, "y_end": 268, "y_inc": [33, 34, 35, 36, 87, 103, 109, 110, 111, 117, 122, 123, 124, 125, 128, 132, 190], "y_max": [160, 250], "y_min": [160, 190, 250], "y_start": [268, 276], "ya": [7, 253, 264], "ya0": [162, 199, 204, 253], "ya1f0": [148, 172], "ya1f1": 265, "ya2f1": [161, 265], "ya2f1g": 252, "ya2f1g2": 251, "ya4000": 160, "ya5": 211, "ya5f1": 265, "ya5f1g5": 211, "yaf": [141, 157, 264, 271, 273, 279], "yafg": [139, 202], "yaml": [134, 215], "yao": [134, 207, 257], "ye": 134, "year": [23, 69, 152, 207, 215, 216, 257, 268, 281], "yearli": [8, 15, 16, 18, 26, 31, 34, 35, 36, 112, 117, 119, 125, 127, 128, 132], "yellow": [268, 269, 272, 276], "yet": [43, 197], "yf0": 172, "yf1": 211, "yg5": 211, "ygap": [1, 2, 3, 11], "yh": 46, "yield": [49, 56, 57, 58, 59, 61, 104, 178, 262], "yinc": [108, 283], "yiq": [6, 10], "yl": [15, 16], "ylabel": 211, "yline": 251, "ylong_nam": 166, "ymax": [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 23, 24, 26, 27, 29, 30, 31, 33, 34, 35, 36, 53, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 117, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 139, 157, 198, 202, 265, 270, 283], "ymin": [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 23, 24, 26, 27, 29, 30, 31, 33, 34, 35, 36, 53, 64, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 117, 119, 122, 123, 124, 125, 127, 128, 130, 131, 132, 139, 157, 198, 202, 265, 270, 283], "yml": [134, 135, 215], "yn": 11, "yoff": 108, "yoffset": 150, "yohai": [134, 207], "yosemit": [162, 271], "you": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 29, 31, 32, 33, 34, 35, 36, 37, 43, 44, 49, 51, 56, 57, 59, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 97, 98, 101, 103, 104, 108, 109, 110, 111, 112, 116, 117, 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 130, 131, 132, 134, 135, 136, 139, 165, 176, 184, 185, 202, 206, 207, 208, 212, 215, 219, 238, 240, 253, 258, 259, 260, 268, 273, 275, 277, 278, 281], "young": 78, "your": [0, 2, 18, 20, 22, 24, 32, 49, 50, 51, 52, 56, 57, 59, 97, 98, 100, 101, 116, 118, 119, 126, 128, 129, 130, 131, 136, 137, 164, 165, 185, 207, 212, 213, 214, 215, 256, 259, 268, 279], "yourself": [32, 135, 136], "youtub": 137, "ypandasindexpandasindex": 166, "ypoint": 251, "yr": 29, "yshift": [21, 46, 134, 157, 160, 175, 253, 266, 275], "yvalu": 252, "yvonn": [134, 137, 207, 217, 257], "yvonnefroehlich": [137, 257], "yy": 132, "yyyi": [198, 268], "z": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 18, 23, 25, 26, 27, 29, 31, 33, 34, 35, 36, 55, 59, 60, 85, 98, 99, 101, 104, 108, 112, 113, 116, 117, 118, 119, 123, 124, 125, 126, 127, 128, 130, 131, 132, 134, 138, 139, 153, 159, 174, 183, 185, 190, 206, 212, 215, 219, 253, 258, 263, 269, 270, 271], "z0": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 18, 23, 25, 26, 29, 31, 56, 108, 112], "z1": [56, 108, 112], "z2": 112, "z250": 219, "z_i": 117, "z_onli": [112, 135], "z_subregion": [101, 119], "za5f1g5": 138, "zaf": 139, "zafg": 139, "zapfchanceri": 260, "zapfdingbat": [26, 260, 273], "zc": 112, "zeit": 134, "zenith": 219, "zenodo": [134, 207], "zero": [14, 41, 50, 51, 52, 64, 108, 112, 113, 118, 119, 134, 182, 183, 222, 230, 268], "zfile": 3, "zhi": 3, "zhigh": [98, 116], "zi": 112, "ziebarth": 207, "zip": [138, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 193, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 209, 210, 211, 212, 215, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285], "zlevel": [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 18, 23, 25, 26, 29, 31], "zlo": 3, "zlow": [98, 116], "zmax": [7, 53, 64, 108, 114, 139], "zmin": [7, 53, 64, 108, 114, 139], "zn": 112, "zone": [110, 147, 153, 166, 171, 176, 238, 259, 263], "zoom": [27, 85, 190, 272], "zoom_adjust": [27, 85, 134], "zscale": [1, 7, 16, 138, 139], "zsh": 208, "zshrc": 208, "zsize": [1, 7, 16, 264, 269], "zuber": 84, "zval": 32, "zvalu": [15, 16, 29, 174], "zvcy7vduhiw": 137, "zz": 132, "\u00aa": 258, "\u00b2": 258, "\u00b3": 258, "\u00b5": 258, "\u00b9": 258, "\u00ba": 258, "\u00bc": 258, "\u00bd": 258, "\u00be": 258, "\u00df": 258, "\u00e0": 258, "\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e8\u00ec\u00f2\u00f9\u00e0\u00e8\u00ec\u00f2\u00f9": 273, "\u00e1": 258, "\u00e2": 258, "\u00e3": 258, "\u00e4": 258, "\u00e5": 258, "\u00e6": 258, "\u00e7": 258, "\u00e8": 258, "\u00e9": 258, "\u00ea": 258, "\u00eb": 258, "\u00ec": 258, "\u00ed": 258, "\u00ee": 258, "\u00ef": 258, "\u00f0": 258, "\u00f1": 258, "\u00f2": 258, "\u00f3": 258, "\u00f4": 258, "\u00f5": 258, "\u00f6": 258, "\u00f8": 258, "\u00f9": 258, "\u00fa": 258, "\u00fb": 258, "\u00fc": 258, "\u00fd": 258, "\u00fe": 258, "\u00ff": 258, "\u0131": 258, "\u0142": 258, "\u0153": 258, "\u0161": 258, "\u017e": 258, "\u0192": 258, "\u02c6": 258, "\u02c7": 258, "\u03b1": 258, "\u03b1\u00b2": 273, "\u03b1\u03b2\u03b3\u03b4": 273, "\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8": 273, "\u03b2": 258, "\u03b2\u00b2": 273, "\u03b3": 258, "\u03b4": 258, "\u03b5": 258, "\u03b6": 258, "\u03b7": 258, "\u03b8": 258, "\u03b9": 258, "\u03ba": 258, "\u03bb": 258, "\u03bc": 258, "\u03bd": 258, "\u03be": 258, "\u03bf": 258, "\u03c0": 258, "\u03c1": 258, "\u03c2": 258, "\u03c3": 258, "\u03c4": 258, "\u03c5": 258, "\u03c6": 258, "\u03c7": 258, "\u03c8": 258, "\u03c9": [258, 273], "\u03d1": 258, "\u03d2": 258, "\u03d5": 258, "\u03d6": 258, "\u2111": 258, "\u211c": 258, "\u2135": 258, "\u2460": 258, "\u2460\u2461\u2462": 273, "\u2461": 258, "\u2462": 258, "\u2463": 258, "\u2464": 258, "\u2465": 258, "\u2466": 258, "\u2467": 258, "\u2468": 258, "\u2469": 258, "\u2776": 258, "\u2777": 258, "\u2778": 258, "\u2779": 258, "\u277a": 258, "\u277b": 258, "\u277c": 258, "\u277d": 258, "\u277e": 258, "\u277f": 258, "\u2780": 258, "\u2781": 258, "\u2782": 258, "\u2783": 258, "\u2784": 258, "\u2785": 258, "\u2786": 258, "\u2787": 258, "\u2788": 258, "\u2789": 258, "\u278a": 258, "\u278a\u278b\u278c": 273, "\u278b": 258, "\u278c": 258, "\u278d": 258, "\u278e": 258, "\u278f": 258, "\u2790": 258, "\u2791": 258, "\u2792": 258, "\u2793": 258, "\ufb01": 258}, "titles": ["pygmt.Figure", "pygmt.Figure.basemap", "pygmt.Figure.coast", "pygmt.Figure.colorbar", "pygmt.Figure.contour", "pygmt.Figure.grdcontour", "pygmt.Figure.grdimage", "pygmt.Figure.grdview", "pygmt.Figure.histogram", "pygmt.Figure.hlines", "pygmt.Figure.image", "pygmt.Figure.inset", "pygmt.Figure.legend", "pygmt.Figure.logo", "pygmt.Figure.meca", "pygmt.Figure.plot", "pygmt.Figure.plot3d", "pygmt.Figure.psconvert", "pygmt.Figure.rose", "pygmt.Figure.savefig", "pygmt.Figure.set_panel", "pygmt.Figure.shift_origin", "pygmt.Figure.show", "pygmt.Figure.solar", "pygmt.Figure.subplot", "pygmt.Figure.ternary", "pygmt.Figure.text", "pygmt.Figure.tilemap", "pygmt.Figure.timestamp", "pygmt.Figure.velo", "pygmt.Figure.vlines", "pygmt.Figure.wiggle", "pygmt.GMTDataArrayAccessor", "pygmt.binstats", "pygmt.blockmean", "pygmt.blockmedian", "pygmt.blockmode", "pygmt.clib.Session", "pygmt.clib.Session.__enter__", "pygmt.clib.Session.__exit__", "pygmt.clib.Session.__getitem__", "pygmt.clib.Session.call_module", "pygmt.clib.Session.create", "pygmt.clib.Session.create_data", "pygmt.clib.Session.destroy", "pygmt.clib.Session.extract_region", "pygmt.clib.Session.get_common", "pygmt.clib.Session.get_default", "pygmt.clib.Session.get_libgmt_func", "pygmt.clib.Session.open_virtualfile", "pygmt.clib.Session.put_matrix", "pygmt.clib.Session.put_strings", "pygmt.clib.Session.put_vector", "pygmt.clib.Session.read_data", "pygmt.clib.Session.read_virtualfile", "pygmt.clib.Session.virtualfile_from_data", "pygmt.clib.Session.virtualfile_from_grid", "pygmt.clib.Session.virtualfile_from_matrix", "pygmt.clib.Session.virtualfile_from_stringio", "pygmt.clib.Session.virtualfile_from_vectors", "pygmt.clib.Session.virtualfile_in", "pygmt.clib.Session.virtualfile_out", "pygmt.clib.Session.virtualfile_to_dataset", "pygmt.clib.Session.virtualfile_to_raster", "pygmt.clib.Session.write_data", "pygmt.config", "pygmt.datasets.list_sample_data", "pygmt.datasets.load_black_marble", "pygmt.datasets.load_blue_marble", "pygmt.datasets.load_earth_age", "pygmt.datasets.load_earth_deflection", "pygmt.datasets.load_earth_dist", "pygmt.datasets.load_earth_free_air_anomaly", "pygmt.datasets.load_earth_geoid", "pygmt.datasets.load_earth_magnetic_anomaly", "pygmt.datasets.load_earth_mask", "pygmt.datasets.load_earth_mean_dynamic_topography", "pygmt.datasets.load_earth_mean_sea_surface", "pygmt.datasets.load_earth_relief", "pygmt.datasets.load_earth_vertical_gravity_gradient", "pygmt.datasets.load_mars_relief", "pygmt.datasets.load_mercury_relief", "pygmt.datasets.load_moon_relief", "pygmt.datasets.load_pluto_relief", "pygmt.datasets.load_sample_data", "pygmt.datasets.load_tile_map", "pygmt.datasets.load_venus_relief", "pygmt.dimfilter", "pygmt.enums.GridRegistration", "pygmt.enums.GridType", "pygmt.exceptions.GMTCLibError", "pygmt.exceptions.GMTCLibNoSessionError", "pygmt.exceptions.GMTCLibNotFoundError", "pygmt.exceptions.GMTError", "pygmt.exceptions.GMTInvalidInput", "pygmt.exceptions.GMTOSError", "pygmt.exceptions.GMTVersionError", "pygmt.filter1d", "pygmt.grd2cpt", "pygmt.grd2xyz", "pygmt.grdclip", "pygmt.grdcut", "pygmt.grdfill", "pygmt.grdfilter", "pygmt.grdgradient", "pygmt.grdhisteq", "pygmt.grdhisteq.compute_bins", "pygmt.grdhisteq.equalize_grid", "pygmt.grdinfo", "pygmt.grdlandmask", "pygmt.grdproject", "pygmt.grdsample", "pygmt.grdtrack", "pygmt.grdvolume", "pygmt.info", "pygmt.load_dataarray", "pygmt.makecpt", "pygmt.nearneighbor", "pygmt.project", "pygmt.select", "pygmt.set_display", "pygmt.show_versions", "pygmt.sph2grd", "pygmt.sphdistance", "pygmt.sphinterpolate", "pygmt.surface", "pygmt.triangulate", "pygmt.triangulate.delaunay_triples", "pygmt.triangulate.regular_grid", "pygmt.which", "pygmt.x2sys_cross", "pygmt.x2sys_init", "pygmt.xyz2grd", "API Reference", "Changelog", "Contributors Guide", "Ecosystem", "External Resources", "Plotting a surface", "3-D scatter plots", "Computation times", "Double Y-axes graph", "Computation times", "Ternary diagram", "Colorbar", "Multiple colormaps", "Inset", "Inset map showing a rectangular region", "Legend", "Logo", "Scale bar", "Computation times", "Day-night terminator line and twilights", "Timestamp", "Blockmean", "Histogram", "Rose diagram", "Scatter plot with histograms", "Computation times", "Contours", "Cross-section along a transect", "Clipping grid values", "Calculating grid gradient and radiance", "Calculating grid gradient with custom azimuth and normalize parameters", "Create \u2018wet-dry\u2019 mask grid", "Images on figures", "RGB image", "Computation times", "Sampling along tracks", "Gallery", "Connection lines", "Decorated lines", "Envelope", "Generate points along great circles", "Line colors with a custom CPT", "Line segment caps and joints", "Line fronts", "GeoPandas: Plotting lines with LineString or MultiLineString geometry", "Line styles", "Quoted lines", "Computation times", "Vector heads and tails", "Cartesian, circular, and geographic vectors", "Wiggle along tracks", "Political boundaries", "Choropleth map", "Highlight country, continent and state polygons", "Color land and water", "Computation times", "Shorelines", "Tile maps", "Focal mechanisms", "Computation times", "Velocity arrows and confidence ellipses", "Computation times", "Vertical or horizontal bars", "Basic geometric symbols", "Custom symbols", "Datetime inputs", "Multi-parameter symbols", "Bit and hachure patterns", "Points", "Color points by categories", "Points with varying transparency", "Scatter plots with a legend", "Computation times", "Text symbols", "Home", "Installing", "1. Making your first figure", "2. Create a contour map", "3. Figure elements", "4. PyGMT I/O: Table inputs", "Intro to PyGMT", "Computation times", "Maintainers Guide", "Minimum Supported Versions", "Overview", "Azimuthal equidistant projection", "Perspective projection", "General stereographic projection", "Gnomonic projection", "Lambert azimuthal equal-area projection", "Orthographic projection", "Computation times", "Albers conic equal-area projection", "Equidistant conic projection", "Lambert conic conformal projection", "Polyconic projection", "Computation times", "Cassini cylindrical projection", "Cylindrical equal-area projection", "Cylindrical equidistant projection", "Mercator projection", "Miller cylindrical projection", "Oblique Mercator projection", "Cylindrical stereographic projection", "Transverse Mercator projection", "Universal Transverse Mercator projection", "Computation times", "Projections", "Eckert IV equal-area projection", "Eckert VI equal-area projection", "Hammer projection", "Mollweide projection", "Robinson projection", "Sinusoidal projection", "Van der Grinten projection", "Winkel Tripel projection", "Computation times", "Cartesian linear", "Cartesian logarithmic", "Cartesian power", "Polar", "Computation times", "Computation times", "Computation times", "PyGMT Team", "Supported Encodings and Non-ASCII Characters", "Environment Variables", "Supported Fonts", "Technical Reference", "Bit and hachure patterns", "GMT Map Projections", "Creating a 3-D perspective image", "Cartesian histograms", "Configuring PyGMT defaults", "Creating a map with contour lines", "Plotting datetime charts", "Draping a dataset on top of a topographic surface", "Plotting Earth relief", "Performing grid histogram equalization", "Adding an inset to the figure", "Typesetting non-ASCII text", "Computation times", "Making subplots", "Plotting vectors", "Interactive data visualization using Panel", "Coastlines and borders", "Frames, ticks, titles, and labels", "Plotting lines", "Plotting data points", "Plotting polygons", "Setting the region", "Computation times", "Plotting text", "Tutorials", "Computation times"], "titleterms": {"": 268, "0": 134, "01": 134, "02": 134, "03": 134, "04": 134, "05": 134, "06": 134, "07": 134, "08": 134, "09": 134, "1": [134, 209, 212, 235, 269], "10": 134, "11": 134, "12": 134, "13": 134, "14": 134, "15": 134, "2": [134, 210, 212, 235, 269], "20": 134, "2020": 134, "2021": 134, "2022": 134, "2023": 134, "2024": 134, "22": 134, "29": 134, "3": [134, 139, 211, 235, 264], "30": 134, "31": 134, "3d": 169, "4": [134, 212], "5": 134, "6": 134, "7": 134, "8": 134, "8859": 258, "9": 134, "As": 215, "Not": 208, "__enter__": 38, "__exit__": 39, "__getitem__": 40, "about": [207, 217], "access": 215, "activ": 257, "ad": [135, 210, 267, 272, 285], "add": [209, 270, 277], "addit": [209, 210], "adjust": 285, "administr": 215, "adob": 258, "advanc": [275, 285, 286], "alber": 225, "along": [160, 168, 173, 183], "an": [215, 268, 269, 272, 277, 285], "analysi": 133, "api": [133, 135], "archiv": 215, "area": [222, 225, 231, 241, 242], "arrai": 212, "arrow": 193, "ascii": [212, 258, 273], "attribut": 280, "automat": 268, "ax": [141, 268, 275], "axi": 279, "azimuth": [163, 218, 222, 235, 240], "backward": 215, "bar": [150, 195, 265, 270], "base": [169, 271], "basemap": 1, "basic": [196, 286], "benchmark": 215, "bin": 271, "binstat": 33, "bit": [200, 262], "blockmean": [34, 154], "blockmedian": 35, "blockmod": 36, "border": 278, "boundari": 184, "box": 285, "branch": 215, "bug": [134, 135], "build": 135, "c": 133, "calcul": [162, 163, 271], "call_modul": 41, "cap": 175, "cartesian": [182, 250, 251, 252, 265, 276], "cassini": 230, "categori": 202, "chang": 280, "changelog": [134, 215], "charact": 258, "chart": 268, "check_figures_equ": 135, "checklist": 215, "choropleth": 185, "circl": 173, "circular": [182, 276], "cite": 207, "class": 133, "clib": [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64], "clip": 161, "close": 282, "coast": 2, "coastlin": 278, "code": [135, 207, 283], "color": [133, 174, 187, 202, 209, 210, 270], "colorbar": [3, 144, 210], "colormap": [145, 267], "comment": [135, 215], "common": 208, "commun": 135, "compat": 215, "comput": [140, 142, 151, 158, 167, 180, 188, 192, 194, 205, 214, 224, 229, 239, 249, 254, 255, 256, 274, 284, 287], "compute_bin": 106, "conclus": 212, "conda": [208, 215], "conduct": 207, "confid": 193, "config": 65, "configur": [133, 266, 285], "conform": 227, "conic": [225, 226, 227, 240], "connect": 170, "contact": 207, "contextili": 136, "contin": 186, "continu": 215, "contour": [4, 159, 169, 210, 267], "contribut": [135, 207], "contributor": [134, 135, 215, 257], "control": 135, "coordin": 283, "count": 265, "countri": 186, "cpt": 174, "creat": [42, 164, 209, 210, 264, 267, 270], "create_data": 43, "cross": [135, 160], "crossov": 133, "cumul": 265, "custom": [163, 174, 197], "cylindr": [230, 231, 232, 234, 236, 240], "d": [139, 212, 264], "dai": 152, "data": [133, 135, 271, 277, 281], "dataarrai": 268, "datafram": 212, "dataset": [66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 133, 210, 269], "date": 268, "date_rang": 268, "datetim": [198, 268], "datetime64": 268, "decor": 171, "default": [133, 266], "defin": 275, "delaunay_tripl": 127, "depend": [136, 208, 215], "deprec": [134, 215], "der": 247, "destroi": 44, "diagram": [143, 156], "digit": 271, "dimfilt": 87, "disclaim": 207, "displai": 133, "distinguish": 257, "distribut": 271, "document": [134, 135, 215], "doubl": 141, "drap": 269, "drape": 269, "dry": 164, "dvc": 135, "earth": [210, 270, 277], "eckert": [241, 242], "ecosystem": 136, "edit": 135, "element": [133, 169, 211], "elev": 271, "ellips": 193, "embellish": 169, "encod": 258, "enhanc": 134, "enum": [88, 89, 133], "envelop": 172, "environ": [135, 208, 259], "equal": [222, 225, 231, 241, 242, 271], "equalize_grid": 107, "equidist": [218, 226, 232], "error": 208, "exampl": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 34, 65, 69, 78, 84, 99, 100, 104, 106, 107, 109, 112, 114, 116, 118, 132, 135, 137], "except": [90, 91, 92, 93, 94, 95, 96, 133], "exercis": [209, 210], "extern": [137, 285], "extract_region": 45, "featur": [133, 134, 135], "feedback": 135, "field": 169, "figur": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 133, 165, 209, 211, 272], "file": [212, 285], "filter1d": 97, "first": [209, 275], "fix": 134, "focal": 191, "font": 260, "format": 268, "founder": 257, "frame": [209, 279], "frequenc": 265, "from": 137, "front": 176, "function": 215, "galleri": [134, 135, 169], "gener": [133, 135, 173, 220, 268], "geodatafram": 212, "geodesi": 169, "geograph": [182, 240, 276], "geometr": 196, "geometri": 177, "geopanda": [136, 177, 212], "get": [135, 207], "get_common": 46, "get_default": 47, "get_libgmt_func": 48, "github": [135, 215], "global": [266, 283], "gmt": [133, 208, 259, 263, 266], "gmtcliberror": 90, "gmtclibnosessionerror": 91, "gmtclibnotfounderror": 92, "gmtdataarrayaccessor": 32, "gmterror": 93, "gmtinvalidinput": 94, "gmtoserror": 95, "gmtversionerror": 96, "gnomon": 221, "goal": 207, "gradient": [162, 163], "graph": 141, "grd2cpt": 98, "grd2xyz": 99, "grdclip": 100, "grdcontour": 5, "grdcut": 101, "grdfill": 102, "grdfilter": 103, "grdgradient": 104, "grdhisteq": [105, 106, 107], "grdimag": 6, "grdinfo": 108, "grdlandmask": 109, "grdproject": 110, "grdsampl": 111, "grdtrack": 112, "grdview": 7, "grdvolum": 113, "great": 173, "grid": [161, 162, 163, 164, 269, 271, 277, 279], "gridregistr": 88, "gridtyp": 89, "grinten": 247, "group": 265, "guid": [135, 215], "guidelin": [135, 207], "hachur": [200, 262], "hammer": 243, "head": 181, "help": 135, "highlight": [134, 186], "histogram": [8, 155, 157, 169, 265, 271], "hline": 9, "horizont": [195, 265], "i": 212, "iec": 258, "imag": [10, 135, 165, 166, 169, 264, 269], "impost": 207, "improv": 134, "individu": 285, "info": 114, "input": [133, 198, 212, 285], "inset": [11, 146, 147, 272], "instal": [207, 208], "integr": 215, "interact": 277, "intro": 213, "ipython": 136, "iso": [258, 268, 283], "isolatin1": 258, "issu": [208, 215], "iv": 241, "joint": 175, "jupyt": 208, "label": [279, 285], "lambert": [222, 227], "land": [187, 209, 210, 278], "layout": [133, 275], "legend": [12, 148, 204], "librari": [208, 209], "licens": 207, "limit": 267, "line": [152, 169, 170, 171, 174, 175, 176, 177, 178, 179, 210, 267, 279, 280], "linear": [250, 271], "linestr": 177, "list": 212, "list_sample_data": 66, "load": [208, 209, 210, 271], "load_black_marbl": 67, "load_blue_marbl": 68, "load_dataarrai": 115, "load_earth_ag": 69, "load_earth_deflect": 70, "load_earth_dist": 71, "load_earth_free_air_anomali": 72, "load_earth_geoid": 73, "load_earth_magnetic_anomali": 74, "load_earth_mask": 75, "load_earth_mean_dynamic_topographi": 76, "load_earth_mean_sea_surfac": 77, "load_earth_relief": 78, "load_earth_vertical_gravity_gradi": 79, "load_mars_relief": 80, "load_mercury_relief": 81, "load_moon_relief": 82, "load_pluto_relief": 83, "load_sample_data": 84, "load_tile_map": 85, "load_venus_relief": 86, "local": [135, 266], "logarithm": 251, "logo": [13, 149], "main": 133, "maintain": [215, 257], "mainten": 134, "make": [135, 209, 215, 275, 277], "makecpt": 116, "mamba": 208, "manag": [135, 215], "map": [133, 147, 169, 185, 190, 210, 263, 267, 270, 277], "marker": 169, "mask": 164, "match": 268, "meca": 14, "mechan": 191, "mercat": [233, 235, 237, 238], "merg": 215, "metadata": 133, "miller": 234, "minimum": 216, "miscellan": [133, 240], "mix": 268, "model": 271, "modul": 259, "modulenotfounderror": 208, "mollweid": 244, "mpl_image_compar": 135, "multi": 199, "multilinestr": 177, "multipl": [145, 285], "ndarrai": 212, "nearneighbor": 117, "new": [134, 135], "night": 152, "non": [240, 258, 273], "normal": [163, 271], "notebook": 208, "numpi": [136, 212, 268], "o": 212, "obliqu": 235, "offboard": 215, "onboard": 215, "open_virtualfil": 49, "oper": 133, "origin": [235, 271], "orthograph": 223, "other": 208, "output": 133, "overlaid": 265, "overrid": 266, "overview": [133, 135, 217], "packag": 215, "palett": 133, "panda": [136, 212, 268], "panel": 277, "paramet": [163, 199, 215, 266, 285], "pattern": [200, 262], "percent": 265, "perform": 271, "perspect": [219, 264], "pip": 208, "plot": [15, 133, 135, 138, 139, 157, 169, 177, 204, 210, 267, 268, 270, 271, 276, 279, 280, 281, 282, 285], "plot3d": 16, "point": [173, 201, 202, 203, 235, 281], "polar": 253, "pole": 235, "polici": 215, "polit": 184, "polycon": 228, "polygon": [186, 282], "posit": 285, "poster": 137, "power": 252, "pr": 135, "present": 217, "primari": 268, "process": [133, 135], "project": [118, 207, 209, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 240, 241, 242, 243, 244, 245, 246, 247, 248, 263], "provid": 135, "psconvert": 17, "public": 137, "pull": [135, 215], "push": 215, "put_matrix": 50, "put_str": 51, "put_vector": 52, "pyarrow": 136, "pygmt": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 135, 136, 207, 208, 212, 213, 257, 259, 266], "pypi": 215, "python": [208, 268], "quadrat": 271, "question": 135, "quickstart": [207, 208], "quot": 179, "radianc": 162, "raster": 133, "read_data": 53, "read_virtualfil": 54, "recommend": 208, "rectangular": 147, "refer": [133, 261], "referenc": 135, "region": [147, 268, 270, 283], "regular_grid": 128, "relat": 207, "releas": [134, 215], "relief": [210, 270, 277], "report": 135, "request": [135, 215], "resolut": 278, "resourc": [135, 137], "review": [135, 215], "rgb": 166, "rioxarrai": 136, "robinson": 245, "rose": [18, 156], "sampl": [168, 271], "save": 133, "savefig": 19, "scalar": 212, "scale": 150, "scatter": [139, 157, 204], "secondari": 268, "section": 160, "segment": 175, "seismologi": 169, "select": 119, "session": [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64], "set": [133, 135, 209, 267, 268, 270, 283], "set_displai": 120, "set_panel": 20, "share": [208, 275], "shift_origin": 21, "shorelin": [189, 278], "show": [22, 147], "show_vers": 121, "singl": 285, "sinusoid": 246, "solar": 23, "specif": 259, "sph2grd": 122, "sphdistanc": 123, "sphinterpol": 124, "sphinx": 135, "stack": 265, "stair": 265, "standard": 135, "start": 207, "state": 186, "static": 277, "step": 265, "stereograph": [220, 236], "style": [135, 178], "submit": 135, "subplot": [24, 275], "support": [207, 216, 258, 260], "surfac": [125, 138, 269], "symbol": [169, 196, 197, 199, 206, 258], "syndrom": 207, "system": 259, "tabl": [133, 212], "tabular": 133, "tail": 181, "team": 257, "technic": 261, "termin": 152, "ternari": [25, 143], "test": [135, 208], "text": [26, 206, 273, 285], "tick": 279, "tile": 190, "tilemap": 27, "time": [140, 142, 151, 158, 167, 180, 188, 192, 194, 205, 214, 224, 229, 239, 249, 254, 255, 256, 268, 274, 284, 287], "timestamp": [28, 153], "titl": [209, 279], "todo": 215, "top": 269, "topograph": 269, "track": [168, 183], "transect": 160, "transform": 271, "transpar": [203, 208], "transvers": [237, 238], "triangul": [126, 127, 128], "tripel": 248, "tutori": [134, 135, 137, 286], "twilight": 152, "two": 235, "typeset": 273, "u": 207, "univers": 238, "up": 135, "updat": 215, "upstream": 135, "us": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 34, 65, 69, 78, 84, 99, 100, 104, 106, 107, 109, 112, 114, 116, 118, 132, 135, 208, 235, 268, 271, 277, 285], "v0": 134, "valu": [161, 212, 265], "van": 247, "vari": 203, "variabl": 259, "vector": [169, 181, 182, 276], "velo": 29, "veloc": 193, "version": [135, 216], "vertic": [195, 265], "vi": 242, "virtualfile_from_data": 55, "virtualfile_from_grid": 56, "virtualfile_from_matrix": 57, "virtualfile_from_stringio": 58, "virtualfile_from_vector": 59, "virtualfile_in": 60, "virtualfile_out": 61, "virtualfile_to_dataset": 62, "virtualfile_to_rast": 63, "visual": 277, "vline": 30, "wai": 135, "water": [187, 209, 278], "wet": 164, "which": [129, 208], "why": 207, "wiggl": [31, 183], "winkel": 248, "work": 208, "workflow": 135, "write_data": 64, "x": 275, "x2sy": 133, "x2sys_cross": 130, "x2sys_init": 131, "xarrai": [136, 268], "xyz2grd": 132, "y": [141, 275], "your": [135, 208, 209, 275], "zapfdingbat": 258, "zenodo": 215}}) \ No newline at end of file diff --git a/v0.14.0/sg_execution_times.html b/v0.14.0/sg_execution_times.html new file mode 100644 index 00000000000..41742c87b8b --- /dev/null +++ b/v0.14.0/sg_execution_times.html @@ -0,0 +1,688 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Computation times

+

01:19.993 total execution time for 113 files from all galleries:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Draping a dataset on top of a topographic surface (../examples/tutorials/advanced/draping_on_3d_surface.py)

00:07.605

0.0

Highlight country, continent and state polygons (../examples/gallery/maps/country_polygons.py)

00:07.103

0.0

Calculating grid gradient with custom azimuth and normalize parameters (../examples/gallery/images/grdgradient_shading.py)

00:04.859

0.0

Setting the region (../examples/tutorials/basics/regions.py)

00:03.423

0.0

Clipping grid values (../examples/gallery/images/grdclip.py)

00:03.212

0.0

GeoPandas: Plotting lines with LineString or MultiLineString geometry (../examples/gallery/lines/linestrings.py)

00:02.878

0.0

Plotting vectors (../examples/tutorials/advanced/vectors.py)

00:02.503

0.0

Plotting a surface (../examples/gallery/3d_plots/grdview_surface.py)

00:02.271

0.0

Frames, ticks, titles, and labels (../examples/tutorials/basics/frames.py)

00:01.872

0.0

Interactive data visualization using Panel (../examples/tutorials/advanced/working_with_panel.py)

00:01.682

0.0

Perspective projection (../examples/projections/azim/azim_general_perspective.py)

00:01.542

0.0

Cartesian histograms (../examples/tutorials/advanced/cartesian_histograms.py)

00:01.492

0.0

Creating a map with contour lines (../examples/tutorials/advanced/contour_map.py)

00:01.444

0.0

Tile maps (../examples/gallery/maps/tilemaps.py)

00:01.423

0.0

Plotting datetime charts (../examples/tutorials/advanced/date_time_charts.py)

00:01.258

0.0

Plotting text (../examples/tutorials/basics/text.py)

00:01.245

0.0

Performing grid histogram equalization (../examples/tutorials/advanced/grid_equalization.py)

00:01.243

0.0

Plotting Earth relief (../examples/tutorials/advanced/earth_relief.py)

00:01.209

0.0

Quoted lines (../examples/gallery/lines/quoted_lines.py)

00:01.148

0.0

Coastlines and borders (../examples/tutorials/basics/coastlines.py)

00:01.101

0.0

1. Making your first figure (../examples/intro/01_first_figure.py)

00:01.055

0.0

RGB image (../examples/gallery/images/rgb_image.py)

00:01.046

0.0

Adding an inset to the figure (../examples/tutorials/advanced/insets.py)

00:00.995

0.0

2. Create a contour map (../examples/intro/02_contour_map.py)

00:00.993

0.0

Creating a 3-D perspective image (../examples/tutorials/advanced/3d_perspective_image.py)

00:00.959

0.0

Plotting lines (../examples/tutorials/basics/lines.py)

00:00.948

0.0

Plotting data points (../examples/tutorials/basics/plot.py)

00:00.752

0.0

Images on figures (../examples/gallery/images/image.py)

00:00.627

0.0

Choropleth map (../examples/gallery/maps/choropleth_map.py)

00:00.616

0.0

Making subplots (../examples/tutorials/advanced/subplots.py)

00:00.616

0.0

Plotting polygons (../examples/tutorials/basics/polygons.py)

00:00.589

0.0

Blockmean (../examples/gallery/histograms/blockm.py)

00:00.559

0.0

Configuring PyGMT defaults (../examples/tutorials/advanced/configuration.py)

00:00.537

0.0

Inset (../examples/gallery/embellishments/inset.py)

00:00.493

0.0

4. PyGMT I/O: Table inputs (../examples/intro/04_table_inputs.py)

00:00.470

0.0

Multi-parameter symbols (../examples/gallery/symbols/multi_parameter_symbols.py)

00:00.424

0.0

Oblique Mercator projection (../examples/projections/cyl/cyl_oblique_mercator.py)

00:00.399

0.0

Calculating grid gradient and radiance (../examples/gallery/images/grdgradient.py)

00:00.390

0.0

Sampling along tracks (../examples/gallery/images/track_sampling.py)

00:00.386

0.0

3-D scatter plots (../examples/gallery/3d_plots/scatter3d.py)

00:00.371

0.0

Azimuthal equidistant projection (../examples/projections/azim/azim_equidistant.py)

00:00.368

0.0

Day-night terminator line and twilights (../examples/gallery/embellishments/solar.py)

00:00.364

0.0

Political boundaries (../examples/gallery/maps/borders.py)

00:00.362

0.0

Color points by categories (../examples/gallery/symbols/points_categorical.py)

00:00.350

0.0

Scale bar (../examples/gallery/embellishments/scalebar.py)

00:00.339

0.0

Timestamp (../examples/gallery/embellishments/timestamp.py)

00:00.336

0.0

Inset map showing a rectangular region (../examples/gallery/embellishments/inset_rectangle_region.py)

00:00.332

0.0

Envelope (../examples/gallery/lines/envelope.py)

00:00.313

0.0

Multiple colormaps (../examples/gallery/embellishments/colorbars_multiple.py)

00:00.309

0.0

Decorated lines (../examples/gallery/lines/decorated_lines.py)

00:00.307

0.0

Cross-section along a transect (../examples/gallery/images/cross_section.py)

00:00.303

0.0

Cartesian, circular, and geographic vectors (../examples/gallery/lines/vector_styles.py)

00:00.301

0.0

Albers conic equal-area projection (../examples/projections/conic/conic_albers.py)

00:00.287

0.0

Cassini cylindrical projection (../examples/projections/cyl/cyl_cassini.py)

00:00.287

0.0

3. Figure elements (../examples/intro/03_figure_element.py)

00:00.274

0.0

Scatter plot with histograms (../examples/gallery/histograms/scatter_and_histograms.py)

00:00.271

0.0

Vector heads and tails (../examples/gallery/lines/vector_heads_tails.py)

00:00.267

0.0

Polar (../examples/projections/nongeo/polar.py)

00:00.264

0.0

Orthographic projection (../examples/projections/azim/azim_orthographic.py)

00:00.246

0.0

Winkel Tripel projection (../examples/projections/misc/misc_winkel_tripel.py)

00:00.245

0.0

Van der Grinten projection (../examples/projections/misc/misc_van_der_grinten.py)

00:00.244

0.0

Gnomonic projection (../examples/projections/azim/azim_gnomonic.py)

00:00.237

0.0

Scatter plots with a legend (../examples/gallery/symbols/scatter.py)

00:00.237

0.0

Color land and water (../examples/gallery/maps/land_and_water.py)

00:00.231

0.0

Shorelines (../examples/gallery/maps/shorelines.py)

00:00.231

0.0

Line colors with a custom CPT (../examples/gallery/lines/line_custom_cpt.py)

00:00.226

0.0

Mercator projection (../examples/projections/cyl/cyl_mercator.py)

00:00.220

0.0

Lambert azimuthal equal-area projection (../examples/projections/azim/azim_lambert.py)

00:00.219

0.0

Mollweide projection (../examples/projections/misc/misc_mollweide.py)

00:00.218

0.0

Eckert IV equal-area projection (../examples/projections/misc/misc_eckertIV.py)

00:00.217

0.0

Contours (../examples/gallery/images/contours.py)

00:00.217

0.0

Histogram (../examples/gallery/histograms/histogram.py)

00:00.216

0.0

Vertical or horizontal bars (../examples/gallery/symbols/bars.py)

00:00.216

0.0

Generate points along great circles (../examples/gallery/lines/great_circles.py)

00:00.216

0.0

Cylindrical stereographic projection (../examples/projections/cyl/cyl_stereographic.py)

00:00.215

0.0

Logo (../examples/gallery/embellishments/logo.py)

00:00.214

0.0

Eckert VI equal-area projection (../examples/projections/misc/misc_eckertVI.py)

00:00.212

0.0

Velocity arrows and confidence ellipses (../examples/gallery/seismology/velo_arrow_ellipse.py)

00:00.212

0.0

Hammer projection (../examples/projections/misc/misc_hammer.py)

00:00.210

0.0

Line fronts (../examples/gallery/lines/linefronts.py)

00:00.210

0.0

Robinson projection (../examples/projections/misc/misc_robinson.py)

00:00.207

0.0

Miller cylindrical projection (../examples/projections/cyl/cyl_miller.py)

00:00.206

0.0

Line segment caps and joints (../examples/gallery/lines/line_segment_ends.py)

00:00.206

0.0

Sinusoidal projection (../examples/projections/misc/misc_sinusoidal.py)

00:00.205

0.0

Double Y-axes graph (../examples/gallery/basemaps/double_y_axes.py)

00:00.204

0.0

Universal Transverse Mercator projection (../examples/projections/cyl/cyl_universal_transverse_mercator.py)

00:00.202

0.0

Cylindrical equidistant projection (../examples/projections/cyl/cyl_equidistant.py)

00:00.201

0.0

Ternary diagram (../examples/gallery/basemaps/ternary.py)

00:00.200

0.0

Cylindrical equal-area projection (../examples/projections/cyl/cyl_equal_area.py)

00:00.196

0.0

General stereographic projection (../examples/projections/azim/azim_general_stereographic.py)

00:00.193

0.0

Lambert conic conformal projection (../examples/projections/conic/conic_lambert.py)

00:00.193

0.0

Create ‘wet-dry’ mask grid (../examples/gallery/images/grdlandmask.py)

00:00.186

0.0

Bit and hachure patterns (../examples/gallery/symbols/patterns.py)

00:00.185

0.0

Basic geometric symbols (../examples/gallery/symbols/basic_symbols.py)

00:00.184

0.0

Line styles (../examples/gallery/lines/linestyles.py)

00:00.180

0.0

Typesetting non-ASCII text (../examples/tutorials/advanced/non_ascii_text.py)

00:00.180

0.0

Transverse Mercator projection (../examples/projections/cyl/cyl_transverse_mercator.py)

00:00.177

0.0

Points with varying transparency (../examples/gallery/symbols/points_transparency.py)

00:00.176

0.0

Polyconic projection (../examples/projections/conic/polyconic.py)

00:00.168

0.0

Colorbar (../examples/gallery/embellishments/colorbar.py)

00:00.165

0.0

Points (../examples/gallery/symbols/points.py)

00:00.165

0.0

Focal mechanisms (../examples/gallery/seismology/meca.py)

00:00.159

0.0

Cartesian logarithmic (../examples/projections/nongeo/cartesian_logarithmic.py)

00:00.158

0.0

Equidistant conic projection (../examples/projections/conic/conic_equidistant.py)

00:00.157

0.0

Connection lines (../examples/gallery/lines/connection_lines.py)

00:00.157

0.0

Cartesian power (../examples/projections/nongeo/cartesian_power.py)

00:00.149

0.0

Cartesian linear (../examples/projections/nongeo/cartesian_linear.py)

00:00.149

0.0

Custom symbols (../examples/gallery/symbols/custom_symbols.py)

00:00.147

0.0

Legend (../examples/gallery/embellishments/legend.py)

00:00.144

0.0

Text symbols (../examples/gallery/symbols/text_symbols.py)

00:00.135

0.0

Rose diagram (../examples/gallery/histograms/rose.py)

00:00.131

0.0

Datetime inputs (../examples/gallery/symbols/datetime_inputs.py)

00:00.127

0.0

Wiggle along tracks (../examples/gallery/lines/wiggle.py)

00:00.124

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/team.html b/v0.14.0/team.html new file mode 100644 index 00000000000..e3ed74d0a49 --- /dev/null +++ b/v0.14.0/team.html @@ -0,0 +1,357 @@ + + + + + + + + + PyGMT Team — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

PyGMT Team

+

We are an international team dedicated to building a Pythonic API for the Generic Mapping +Tools (GMT).

+

All are welcome to become involved with the PyGMT project! For more information about how +to get involved, see the Contributors Guide. A more complete list of contributors +is available in the AUTHORS.md +file in the source repository.

+

Distinguished Contributors are recognized for their substantial contributions to PyGMT, +which may include code, documentation, pull request review, triaging, forum responses, +community building and engagement, outreach, and inclusion and diversity. Maintainers +are recognized for their responsibilities in maintaining the project, as detailed in +the Maintainers Guide.

+

New Distinguished Contributors and Active Maintainers are selected and voted by current +Active Maintainers before each release. Maintainers that are inactive for more than one +year will be moved to Distinguished Contributors.

+
+

Founders

+
+
+
+
+ +
+
+Leonardo Uieda
+

@leouieda

+
+
+
+
+
+ +
+
+Paul Wessel
+

@PaulWessel

+
+
+
+
+
+
+
+

Active Maintainers

+
+
+
+
+ +
+
+Dongdong Tian
+

@seisman

+
+
+
+
+
+ +
+
+Wei Ji Leong
+

@weiji14

+
+
+
+
+
+ +
+
+Michael Grund
+

@michaelgrund

+
+
+
+
+
+ +
+
+Yvonne Fröhlich
+

@yvonnefroehlich

+
+
+
+
+
+
+
+

Distinguished Contributors

+
+
+
+
+ +
+
+Max Jones
+

@maxrjones

+
+
+
+
+
+ +
+
+Jiayuan Yao
+

@core-man

+
+
+
+
+
+ +
+
+Liam Toney
+

@liamtoney

+
+
+
+
+
+ +
+
+Will Schlitzer
+

@willschlitzer

+
+
+
+
+
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/techref/encodings.html b/v0.14.0/techref/encodings.html new file mode 100644 index 00000000000..b42a65c277c --- /dev/null +++ b/v0.14.0/techref/encodings.html @@ -0,0 +1,1124 @@ + + + + + + + + + Supported Encodings and Non-ASCII Characters — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+
+
+

Supported Encodings and Non-ASCII Characters

+

PyGMT supports a number of encodings and each encoding contains a set of ASCII and +non-ASCII characters. In PyGMT, you can use any of these ASCII and non-ASCII characters +in arguments and text strings. When using non-ASCII characters in PyGMT, the easiest way +is to copy and paste the character from the encoding tables below.

+

Note: The special character � (REPLACEMENT CHARACTER) is used to indicate +that the character is undefined in the encoding.

+
+

Adobe ISOLatin1+ Encoding

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Octal

0

1

2

3

4

5

6

7

\03x

ž

\04x

!

#

$

%

&

\05x

(

)

*

+

,

.

/

\06x

0

1

2

3

4

5

6

7

\07x

8

9

:

;

<

=

>

?

\10x

@

A

B

C

D

E

F

G

\11x

H

I

J

K

L

M

N

O

\12x

P

Q

R

S

T

U

V

W

\13x

X

Y

Z

[

\

]

^

_

\14x

a

b

c

d

e

f

g

\15x

h

i

j

k

l

m

n

o

\16x

p

q

r

s

t

u

v

w

\17x

x

y

z

{

|

}

~

š

\20x

Œ

Ł

Š

\21x

œ

Ÿ

Ž

ł

\22x

ı

`

´

ˆ

˜

¯

˘

˙

\23x

¨

˚

¸

˝

˛

ˇ

\24x

¡

¢

£

¤

¥

¦

§

\25x

¨

©

ª

«

¬

-

®

¯

\26x

°

±

²

³

´

µ

·

\27x

¸

¹

º

»

¼

½

¾

¿

\30x

À

Á

Â

Ã

Ä

Å

Æ

Ç

\31x

È

É

Ê

Ë

Ì

Í

Î

Ï

\32x

Ð

Ñ

Ò

Ó

Ô

Õ

Ö

×

\33x

Ø

Ù

Ú

Û

Ü

Ý

Þ

ß

\34x

à

á

â

ã

ä

å

æ

ç

\35x

è

é

ê

ë

ì

í

î

ï

\36x

ð

ñ

ò

ó

ô

õ

ö

÷

\37x

ø

ù

ú

û

ü

ý

þ

ÿ

+
+
+
+
+

Adobe Symbol Encoding

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Octal

0

1

2

3

4

5

6

7

\04x

!

#

%

&

\05x

(

)

+

,

.

/

\06x

0

1

2

3

4

5

6

7

\07x

8

9

:

;

<

=

>

?

\10x

Α

Β

Χ

Ε

Φ

Γ

\11x

Η

Ι

ϑ

Κ

Λ

Μ

Ν

Ο

\12x

Π

Θ

Ρ

Σ

Τ

Υ

ς

\13x

Ξ

Ψ

Ζ

[

]

_

\14x

α

β

χ

δ

ε

φ

γ

\15x

η

ι

ϕ

κ

λ

μ

ν

ο

\16x

π

θ

ρ

σ

τ

υ

ϖ

ω

\17x

ξ

ψ

ζ

{

|

}

\24x

ϒ

ƒ

\25x

\26x

°

±

×

\27x

÷

\30x

\31x

\32x

®

©

\33x

¬

\34x

®

©

\35x

\36x

\37x

+
+
+

Note: The octal code \140 represents the RADICAL EXTENDER character, which is not +available in the Unicode character set.

+
+
+

Adobe ZapfDingbats Encoding

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Octal

0

1

2

3

4

5

6

7

\04x

\05x

\06x

\07x

\10x

\11x

\12x

\13x

\14x

\15x

\16x

\17x

\20x

\21x

\24x

\25x

\26x

\27x

\30x

\31x

\32x

\33x

\34x

\35x

\36x

\37x

+
+
+
+
+

ISO/IEC 8859

+

PyGMT also supports the ISO/IEC 8859 standard for 8-bit character encodings. Refer to +ISO/IEC 8859 for descriptions of the +different parts of the standard.

+

For a list of the characters in each part of the standard, refer to the following links:

+ +
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/techref/environment_variables.html b/v0.14.0/techref/environment_variables.html new file mode 100644 index 00000000000..8a7f7dca164 --- /dev/null +++ b/v0.14.0/techref/environment_variables.html @@ -0,0 +1,273 @@ + + + + + + + + + Environment Variables — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Environment Variables

+

PyGMT’s behavior can be controlled through various environment variables. These variables +can be set either in your shell environment or within your Python script using the +os.environ dictionary.

+

Here we list the environment variables used by PyGMT which are categorized into three groups:

+
    +
  1. System environment variables

  2. +
  3. GMT/PyGMT environment variables

  4. +
  5. Module-specific environment variables

  6. +
+
+

System Environment Variables

+
+
TZ

Specify the time zone for the current calendar time. It can be set to a string that +defines the timezone, such as "UTC", "America/New_York", or "Europe/London". +Refer to Specifying the Time Zone with TZ +for the valid format. If not set, the system’s default timezone is used.

+
+
+
+
+

GMT/PyGMT Environment Variables

+
+
GMT_LIBRARY_PATH

Specify the directory where the GMT shared library is located. This is useful when +GMT is installed in a non-standard location or when you want to use a specific +version of GMT. If not set, PyGMT will attempt to find the GMT library in standard +system locations.

+
+
PYGMT_USE_EXTERNAL_DISPLAY

Whether to use external viewers for displaying images. If set to "false", PyGMT +will not attempt to open images in external viewers. This can be useful when running +tests or building the documentation to avoid popping up windows.

+
+
+
+
+

Module-Specific Environment Variables

+
+
X2SYS_HOME

Specify the directory where x2sys databases and related settings will be stored. +This environment variable is used by x2sys-related functions (e.g., +pygmt.x2sys_init) to manage and access x2sys data. If not set, these +functions will use a default directory or prompt for a location.

+
+
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/techref/fonts.html b/v0.14.0/techref/fonts.html new file mode 100644 index 00000000000..b10ee4e1b3c --- /dev/null +++ b/v0.14.0/techref/fonts.html @@ -0,0 +1,341 @@ + + + + + + + + + Supported Fonts — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Supported Fonts

+

PyGMT supports the 35 standard PostScript fonts. The table below lists them with their +font numbers and font names. When specifying fonts in PyGMT, you can either give the +font name or just the font number. For example, to use the font “Helvetica”, you can use +either "Helvetica" or "0". For the special fonts “Symbol” (12) and +“ZapfDingbats” (34), see the Supported Encodings and Non-ASCII Characters for the character set. +The image below the table shows a visual sample for each font.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Font No.

Font Name

Font No.

Font Name

0

Helvetica

17

Bookman-Demi

1

Helvetica-Bold

18

Bookman-DemiItalic

2

Helvetica-Oblique

19

Bookman-Light

3

Helvetica-BoldOblique

20

Bookman-LightItalic

4

Times-Roman

21

Helvetica-Narrow

5

Times-Bold

22

Helvetica-Narrow-Bold

6

Times-Italic

23

Helvetica-Narrow-Oblique

7

Times-BoldItalic

24

Helvetica-Narrow-BoldOblique

8

Courier

25

NewCenturySchlbk-Roman

9

Courier-Bold

26

NewCenturySchlbk-Italic

10

Courier-Oblique

27

NewCenturySchlbk-Bold

11

Courier-BoldOblique

28

NewCenturySchlbk-BoldItalic

12

Symbol

29

Palatino-Roman

13

AvantGarde-Book

30

Palatino-Italic

14

AvantGarde-BookOblique

31

Palatino-Bold

15

AvantGarde-Demi

32

Palatino-BoldItalic

16

AvantGarde-DemiOblique

33

ZapfChancery-MediumItalic

34

ZapfDingbats

+
+
+
+
+../_images/9196824ac766e9fbf9254a4bb45977e8cd5426b0904ea50106ec1ecda201873a.png +
+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/techref/index.html b/v0.14.0/techref/index.html new file mode 100644 index 00000000000..f1fd598dc47 --- /dev/null +++ b/v0.14.0/techref/index.html @@ -0,0 +1,238 @@ + + + + + + + + + Technical Reference — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Technical Reference

+

The Technical Reference section provides detailed information on the technical aspects of +GMT and PyGMT, including supported encodings, fonts, bit and hachure patterns, and other +essential components for creating high-quality visualizations. For additional details, +visit the GMT Technical Reference.

+ +
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/techref/patterns.html b/v0.14.0/techref/patterns.html new file mode 100644 index 00000000000..2022a28bfb8 --- /dev/null +++ b/v0.14.0/techref/patterns.html @@ -0,0 +1,242 @@ + + + + + + + + + Bit and hachure patterns — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Bit and hachure patterns

+

PyGMT supports a variety of bit and hachure patterns that can be used to fill polygons.

+

These patterns can be defined using the following syntax:

+

P|ppattern[+bcolor][+fcolor][+rdpi]

+

pattern can either be a number in the range 1-90 or the name of a 1-, 8-, or 24-bit +image raster file. The former will result in one of the 90 predefined 64x64 bit-patterns +provided by GMT (see the figure below). The latter allows the user to create customized, +repeating images using image raster files.

+

By specifying upper case P instead of p the image will be bit-reversed, i.e., +white and black areas will be interchanged (only applies to 1-bit images or predefined +bit-image patterns). For these patterns and other 1-bit images one may specify +alternative background and foreground colors (by appending +bcolor and/or ++fcolor) that will replace the default white and black pixels, respectively. +Excluding color from a fore- or background specification yields a transparent image +where only the back- or foreground pixels will be painted. The +rdpi modifier sets +the resolution in dpi.

+

The image below shows the 90 predefined bit patterns that can be used in PyGMT.

+

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/techref/projections.html b/v0.14.0/techref/projections.html new file mode 100644 index 00000000000..5a38811a112 --- /dev/null +++ b/v0.14.0/techref/projections.html @@ -0,0 +1,329 @@ + + + + + + + + + GMT Map Projections — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

GMT Map Projections

+

The table below shows the projection codes for the 31 GMT map projections:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

PyGMT Projection Argument

Projection Name

Alon0/lat0[/horizon]/width

Lambert azimuthal equal-area projection

Blon0/lat0/lat1/lat2/width

Albers conic equal-area projection

Clon0/lat0/width

Cassini cylindrical projection

Cyl_stere/[lon0/[lat0/]]width

Cylindrical stereographic projection

Dlon0/lat0/lat1/lat2/width

Equidistant conic projection

Elon0/lat0[/horizon]/width

Azimuthal equidistant projection

Flon0/lat0[/horizon]/width

Gnomonic projection

Glon0/lat0[/horizon]/width

Orthographic projection

Glon0/lat0/width[+aazimuth][+ttilt][+vvwidth/vheight][+wtwist][+zaltitude]

Perspective projection

H[lon0/]width

Hammer projection

I[lon0/]width

Sinusoidal projection

J[lon0/]width

Miller cylindrical projection

Kf[lon0/]width

Eckert IV equal-area projection

Ks[lon0/]width

Eckert VI equal-area projection

Llon0/lat0/lat1/lat2/width

Lambert conic conformal projection

M[lon0/[lat0/]]width

Mercator projection

N[lon0/]width

Robinson projection

Oalon0/lat0/azimuth/width[+v]

Oblique Mercator projection: 1. origin and azimuth

Oblon0/lat0/lon1/lat1/width[+v]

Oblique Mercator projection: 2. two points

Oclon0/lat0/lonp/latp/width[+v]

Oblique Mercator projection: 3. origin and projection pole

Pwidth[+a][+f[e|p|radius]][+roffset][+torigin][+z[p|radius]]

Polar azimuthal (\(\theta, r\)) or cylindrical

Poly/[lon0/[lat0/]]width

Polyconic projection

Q[lon0/[lat0/]]width

Cylindrical equidistant projection

R[lon0/]width

Winkel Tripel projection

Slon0/lat0[/horizon]/width

General stereographic projection

Tlon0[/lat0]/width

Transverse Mercator projection

Uzone/width

Universal Transverse Mercator projection

V[lon0/]width

Van der Grinten projection

W[lon0/]width

Mollweide projection

Xwidth[l|pexp|T|t][/height[l|pexp|T|t]][d]

Cartesian linear, logarithmic, power, and time

Ylon0/lat0/width

Cylindrical equal-area projection

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/3d_perspective_image.html b/v0.14.0/tutorials/advanced/3d_perspective_image.html new file mode 100644 index 00000000000..50d1637b8a0 --- /dev/null +++ b/v0.14.0/tutorials/advanced/3d_perspective_image.html @@ -0,0 +1,351 @@ + + + + + + + + + Creating a 3-D perspective image — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Creating a 3-D perspective image

+

Create 3-D perspective image or surface mesh from a grid +using pygmt.Figure.grdview.

+
import pygmt
+
+# Load sample earth relief data
+grid = pygmt.datasets.load_earth_relief(resolution="10m", region=[-108, -103, 35, 40])
+
+
+

The pygmt.Figure.grdview method takes the grid input. +The perspective parameter changes the azimuth and elevation of the +viewpoint; the default is [180, 90], which is looking directly down on the +figure and north is “up”. The zsize parameter sets how tall the +three-dimensional portion appears.

+

The default grid surface type is mesh plot.

+
fig = pygmt.Figure()
+fig.grdview(
+    grid=grid,
+    # Sets the view azimuth as 130 degrees, and the view elevation as 30
+    # degrees
+    perspective=[130, 30],
+    # Sets the x- and y-axis labels, and annotates the west, south, and east
+    # axes
+    frame=["xa", "ya", "WSnE"],
+    # Sets a Mercator projection on a 15-centimeter figure
+    projection="M15c",
+    # Sets the height of the three-dimensional relief at 1.5 centimeters
+    zsize="1.5c",
+)
+fig.show()
+
+
+3d perspective image

The grid surface type can be set with the surftype parameter. +The default CPT is turbo and can be customized with the cmap parameter.

+
fig = pygmt.Figure()
+fig.grdview(
+    grid=grid,
+    perspective=[130, 30],
+    frame=["xa", "yaf", "WSnE"],
+    projection="M15c",
+    zsize="1.5c",
+    # Set the surftype to "surface"
+    surftype="s",
+    # Set the CPT to "geo"
+    cmap="geo",
+)
+fig.show()
+
+
+3d perspective image

The plane parameter sets the elevation and color of a plane that provides +a fill below the surface relief.

+
fig = pygmt.Figure()
+fig.grdview(
+    grid=grid,
+    perspective=[130, 30],
+    frame=["xa", "yaf", "WSnE"],
+    projection="M15c",
+    zsize="1.5c",
+    surftype="s",
+    cmap="geo",
+    # Set the plane elevation to 1,000 meters and make the fill "gray"
+    plane="1000+ggray",
+)
+fig.show()
+
+
+3d perspective image

The perspective azimuth can be changed to set the direction that is “up” +in the figure. The contourpen parameter sets the pen used to draw contour +lines on the surface. pygmt.Figure.colorbar can be used to add a +color bar to the figure. The cmap parameter does not need to be passed +again. To keep the color bar’s alignment similar to the figure, use True +as argument for the perspective parameter.

+
fig = pygmt.Figure()
+fig.grdview(
+    grid=grid,
+    # Set the azimuth to -130 (230) degrees and the elevation to 30 degrees
+    perspective=[-130, 30],
+    frame=["xaf", "yaf", "WSnE"],
+    projection="M15c",
+    zsize="1.5c",
+    surftype="s",
+    cmap="geo",
+    plane="1000+ggrey",
+    # Set the contour pen thickness to "0.1p"
+    contourpen="0.1p",
+)
+fig.colorbar(perspective=True, frame=["a500", "x+lElevation", "y+lm"])
+fig.show()
+
+
+3d perspective image

Total running time of the script: (0 minutes 0.959 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/cartesian_histograms.html b/v0.14.0/tutorials/advanced/cartesian_histograms.html new file mode 100644 index 00000000000..f5be32b8b62 --- /dev/null +++ b/v0.14.0/tutorials/advanced/cartesian_histograms.html @@ -0,0 +1,621 @@ + + + + + + + + + Cartesian histograms — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Cartesian histograms

+

Cartesian histograms can be generated using the pygmt.Figure.histogram method. +In this tutorial, different histogram related aspects are addressed:

+
    +
  • Using vertical and horizontal bars

  • +
  • Using stair-steps

  • +
  • Showing counts and frequency percent

  • +
  • Adding annotations to the bars

  • +
  • Showing cumulative values

  • +
  • Using color and pattern as fill for the bars

  • +
  • Using overlaid, stacked, and grouped bars

  • +
+

Import the required packages

+
import numpy as np
+import pygmt
+
+
+

Generate random data from a normal distribution:

+
rng = np.random.default_rng(seed=100)
+
+# Mean of distribution
+mean = 100
+# Standard deviation of distribution
+stddev = 20
+
+# Create two data sets
+data01 = rng.normal(loc=mean, scale=stddev, size=42)
+data02 = rng.normal(loc=mean, scale=stddev * 2, size=42)
+
+
+
+

Vertical and horizontal bars

+

To define the width of the bins, the series parameter has to be specified. The +bars can be filled via the fill parameter with either a color or a pattern (see +later in this tutorial). Use the pen parameter to adjust width, color, and style +of the outlines. By default, a histogram with vertical bars is created. Horizontal +bars can be achieved via horizontal=True.

+
fig = pygmt.Figure()
+
+# Create histogram for data01 with vertical bars
+fig.histogram(
+    # Define the plot range as a list of xmin, xmax, ymin, ymax
+    # Let ymin and ymax determined automatically by setting both to the same value
+    region=[0, 200, 0, 0],
+    projection="X10c",  # Cartesian projection with a width of 10 centimeters
+    # Add frame, annotations ("a"), ticks ("f"), and y-axis label ("+l") "Counts"; the
+    # numbers give the steps of annotations and ticks
+    frame=["WStr", "xaf10", "ya1f1+lCounts"],
+    data=data01,
+    # Set the bin width via the "series" parameter
+    series=10,
+    # Fill the bars with color "red3"
+    fill="red3",
+    # Draw a 1-point thick, solid outline in "darkgray" around the bars
+    pen="1p,darkgray,solid",
+    # Choose counts via the "histtype" parameter
+    histtype=0,
+)
+
+# Shift plot origin by the figure width ("w") plus 2 centimeters to the right
+fig.shift_origin(xshift="w+2c")
+
+# Create histogram for data01 with horizontal bars
+fig.histogram(
+    region=[0, 200, 0, 0],
+    projection="X10c",
+    frame=["WStr", "xaf10", "ya1f1+lCounts"],
+    data=data01,
+    series=10,
+    fill="red3",
+    pen="1p,darkgray,solid",
+    histtype=0,
+    # Use horizontal bars. Note that the x- and y-axis are flipped, with the x-axis
+    # plotted vertically and the y-axis plotted horizontally.
+    horizontal=True,
+)
+
+fig.show()
+
+
+cartesian histograms
+
+

Stair-steps

+

A stair-step diagram can be created by setting stairs=True. Then only the +outer outlines of the bars are drawn, and no internal bars are visible.

+
fig = pygmt.Figure()
+
+# Create histogram for data01
+fig.histogram(
+    region=[0, 200, 0, 0],
+    projection="X10c",
+    frame=["WSne", "xaf10", "ya1f1+lCounts"],
+    data=data01,
+    series=10,
+    # Draw a 1-point thick, dotted outline in "red3"
+    pen="1p,red3,dotted",
+    histtype=0,
+    # Draw stair-steps in stead of bars
+    stairs=True,
+)
+
+fig.shift_origin(xshift="w+2c")
+
+# Create histogram for data02
+fig.histogram(
+    region=[0, 200, 0, 0],
+    projection="X10c",
+    frame=["WSne", "xaf10", "ya1f1+lCounts"],
+    data=data02,
+    series=10,
+    # Draw a 1.5-points thick, dashed outline in "orange"
+    pen="1.5p,orange,dashed",
+    histtype=0,
+    stairs=True,
+)
+
+fig.show()
+
+
+cartesian histograms
+
+

Counts and frequency percent

+

By default, a histogram showing the counts in each bin is created (histtype=0). +To show the frequency percent set the histtype parameter to 1. For further +options please have a look at the documentation of pygmt.Figure.histogram.

+
fig = pygmt.Figure()
+
+# Create histogram for data02 showing counts
+fig.histogram(
+    region=[0, 200, 0, 0],
+    projection="X10c",
+    frame=["WSnr", "xaf10", "ya1f1+lCounts"],
+    data=data02,
+    series=10,
+    fill="orange",
+    pen="1p,darkgray,solid",
+    # Choose counts via the "histtype" parameter
+    histtype=0,
+)
+
+fig.shift_origin(xshift="w+1c")
+
+# Create histogram for data02 showing frequency percent
+fig.histogram(
+    region=[0, 200, 0, 0],
+    projection="X10c",
+    # Add suffix % (+u)
+    frame=["lSnE", "xaf10", "ya2f1+u%+lFrequency percent"],
+    data=data02,
+    series=10,
+    fill="orange",
+    pen="1p,darkgray,solid",
+    # Choose frequency percent via the "histtype" parameter
+    histtype=1,
+)
+
+fig.show()
+
+
+cartesian histograms
+
+

Cumulative values

+

To create a histogram showing the cumulative values set cumulative=True. Here, +the bars of the cumulative histogram are filled with a pattern via the fill +parameter. Annotate each bar with the counts it represents using the annotate +parameter.

+
fig = pygmt.Figure()
+
+# Create histogram for data01 showing the counts per bin
+fig.histogram(
+    region=[0, 200, 0, len(data01) + 1],
+    projection="X10c",
+    frame=["WSne", "xaf10", "ya5f1+lCounts"],
+    data=data01,
+    series=10,
+    fill="red3",
+    pen="1p,darkgray,solid",
+    histtype=0,
+    # Annotate each bar with the counts it represents
+    annotate=True,
+)
+
+fig.shift_origin(xshift="w+1c")
+
+# Create histogram for data01 showing the cumulative counts
+fig.histogram(
+    region=[0, 200, 0, len(data01) + 1],
+    projection="X10c",
+    frame=["wSnE", "xaf10", "ya5f1+lCumulative counts"],
+    data=data01,
+    series=10,
+    # Use pattern ("p") number 8 as fill for the bars
+    # Set the background ("+b") to white [Default]
+    # Set the foreground ("+f") to black [Default]
+    fill="p8+bwhite+fblack",
+    pen="1p,darkgray,solid",
+    histtype=0,
+    # Show cumulative counts
+    cumulative=True,
+    # Offset ("+o") the label by 10 points in negative y-direction
+    annotate="+o-10p",
+)
+
+fig.show()
+
+
+cartesian histograms
+
+

Overlaid bars

+

Overlaid or overlapping bars can be achieved by plotting two or several histograms, +each for one data set, on top of each other. The legend entry can be specified via +the label parameter.

+

Limitations of histograms with overlaid bars are:

+
    +
  • Mixing of colors or/and patterns

  • +
  • Visually more colors or/and patterns than data sets

  • +
  • Visually a “third histogram” (or more in case of more than two data sets)

  • +
+
fig = pygmt.Figure()
+
+# Create histogram for data01
+fig.histogram(
+    region=[0, 200, 0, 0],
+    projection="X10c",
+    frame=["WSne", "xaf10", "ya1f1+lCounts"],
+    data=data01,
+    series=10,
+    fill="red3",
+    pen="1p,darkgray,solid",
+    histtype=0,
+    # Set legend entry
+    label="data01",
+)
+
+# Create histogram for data02
+# It is plotted on top of the histogram for data01
+fig.histogram(
+    data=data02,
+    series=10,
+    # Fill bars with color "orange", use a transparency of 50% ("@50")
+    fill="orange@50",
+    pen="1p,darkgray,solid",
+    histtype=0,
+    label="data02",
+)
+
+# Add legend
+fig.legend()
+
+fig.show()
+
+
+cartesian histograms
+
+

Stacked bars

+

Histograms with stacked bars are not directly supported by PyGMT. Thus, before +plotting, combined data sets have to be created from the single data sets. Then, +stacked bars can be achieved similar to overlaid bars via plotting two or several +histograms on top of each other.

+

Limitations of histograms with stacked bars are:

+
    +
  • No common baseline

  • +
  • Partly not directly clear whether overlaid or stacked bars

  • +
+
# Combine the two data sets to one data set
+data_merge = np.concatenate((data01, data02), axis=None)
+
+fig = pygmt.Figure()
+
+# Create histogram for data02 by using the combined data set
+fig.histogram(
+    region=[0, 200, 0, 0],
+    projection="X10c",
+    frame=["WSne", "xaf10", "ya1f1+lCounts"],
+    data=data_merge,
+    series=10,
+    fill="orange",
+    pen="1p,darkgray,solid",
+    histtype=0,
+    # The combined data set appears in the final histogram visually as data set data02
+    label="data02",
+)
+
+# Create histogram for data01
+# It is plotted on top of the histogram for data02
+fig.histogram(
+    data=data01,
+    series=10,
+    fill="red3",
+    pen="1p,darkgray,solid",
+    histtype=0,
+    label="data01",
+)
+
+# Add legend
+fig.legend()
+
+fig.show()
+
+
+cartesian histograms
+
+

Grouped bars

+

By setting the barwidth parameter in respect to the values passed to the +series parameter histograms with grouped bars can be created.

+

Limitations of histograms with grouped bars are:

+
    +
  • Careful setting width and position of the bars in respect to the bin width

  • +
  • Difficult to see the variations of the single data sets

  • +
+
# Width used for binning the data
+binwidth = 10
+
+fig = pygmt.Figure()
+
+# Create histogram for data01
+fig.histogram(
+    region=[0, 200, 0, 0],
+    projection="X10c",
+    frame=["WSne", "xaf10g10", "ya1f1+lCounts"],
+    data=data01,
+    series=binwidth,
+    fill="red3",
+    pen="1p,darkgray,solid",
+    histtype=0,
+    # Calculate the bar width in respect to the bin width, here for two data sets half
+    # of the bin width
+    # Offset ("+o") the bars to align each bar with the left limit of the corresponding
+    # bin
+    barwidth=f"{binwidth/2}+o-{binwidth/4}",
+    label="data01",
+)
+
+# Create histogram for data02
+fig.histogram(
+    data=data02,
+    series=binwidth,
+    fill="orange",
+    pen="1p,darkgray,solid",
+    histtype=0,
+    barwidth=f"{binwidth/2}+o{binwidth/4}",
+    label="data02",
+)
+
+# Add legend
+fig.legend()
+
+fig.show()
+
+
+cartesian histograms

Total running time of the script: (0 minutes 1.492 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/configuration.html b/v0.14.0/tutorials/advanced/configuration.html new file mode 100644 index 00000000000..cf2112aaad0 --- /dev/null +++ b/v0.14.0/tutorials/advanced/configuration.html @@ -0,0 +1,334 @@ + + + + + + + + + Configuring PyGMT defaults — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Configuring PyGMT defaults

+

Default GMT parameters can be set globally or locally using pygmt.config.

+
import pygmt
+
+
+
+

Configuring default GMT parameters

+

Users can override default parameters either temporarily (locally) or permanently +(globally) using pygmt.config. The full list of default parameters that can +be changed can be found at https://docs.generic-mapping-tools.org/6.5/gmt.conf.html.

+

We demonstrate the usage of pygmt.config by configuring a map plot.

+
# Start with a basic figure with the default style
+fig = pygmt.Figure()
+fig.basemap(region=[115, 119.5, 4, 7.5], projection="M10c", frame=True)
+fig.coast(land="black", water="skyblue")
+
+fig.show()
+
+
+configuration
+
+

Globally overriding defaults

+

The MAP_FRAME_TYPE parameter specifies the style of map frame to use, of which +there are 5 options: fancy (default, see above), fancy+, plain, graph +(which does not apply to geographical maps) and inside.

+

The FORMAT_GEO_MAP parameter controls the format of geographical tick annotations. +The default uses degrees and minutes. Here we specify the ticks to be a decimal number +of degrees.

+
fig = pygmt.Figure()
+
+# Configuration for the 'current figure'
+pygmt.config(MAP_FRAME_TYPE="plain")
+pygmt.config(FORMAT_GEO_MAP="ddd.xx")
+
+fig.basemap(region=[115, 119.5, 4, 7.5], projection="M10c", frame=True)
+fig.coast(land="black", water="skyblue")
+
+fig.show()
+
+
+configuration
+
+

Locally overriding defaults

+

It is also possible to temporarily override the default parameters, which is very +useful for limiting the scope of changes to a particular plot. pygmt.config +is implemented as a context manager, which handles the setup and teardown of a GMT +session. Python users are likely familiar with the with open(...) as file: +snippet, which returns a file context manager. In this way, it can be used to +override a parameter for a single command, or a sequence of commands. An application +of pygmt.config as a context manager is shown below:

+
fig = pygmt.Figure()
+
+# This will have a fancy+ frame
+with pygmt.config(MAP_FRAME_TYPE="fancy+"):
+    fig.basemap(region=[115, 119.5, 4, 7.5], projection="M10c", frame=True)
+fig.coast(land="black", water="skyblue")
+
+# Shift plot origin down by the height of the figure to plot another map
+fig.shift_origin(yshift="-h")
+
+# This figure retains the default "fancy" frame
+fig.basemap(region=[115, 119.5, 4, 7.5], projection="M10c", frame=True)
+fig.coast(land="black", water="skyblue")
+
+fig.show()
+
+
+configuration

Total running time of the script: (0 minutes 0.537 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/contour_map.html b/v0.14.0/tutorials/advanced/contour_map.html new file mode 100644 index 00000000000..0e1ae34f3c7 --- /dev/null +++ b/v0.14.0/tutorials/advanced/contour_map.html @@ -0,0 +1,344 @@ + + + + + + + + + Creating a map with contour lines — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Creating a map with contour lines

+

Plotting a contour map is handled by pygmt.Figure.grdcontour.

+
import pygmt
+
+# Load sample earth relief data
+grid = pygmt.datasets.load_earth_relief(resolution="05m", region=[-92.5, -82.5, -3, 7])
+
+
+
+

Create contour plot

+

The pygmt.Figure.grdcontour method takes the grid input. It plots annotated +contour lines, which are thicker and have the elevation/depth written on them, and +unannotated contour lines. In the example below, the default contour line intervals +are 500 meters, with an annotated contour line every 1,000 meters. By default, it +plots the map with the equidistant cylindrical projection and with no frame.

+ +contour map
+
+

Contour line settings

+

Use the annotation and levels parameters to adjust contour line intervals. In +the example below, there are contour intervals every 250 meters and annotated contour +lines every 1,000 meters.

+
fig = pygmt.Figure()
+fig.grdcontour(grid=grid, annotation=1000, levels=250)
+fig.show()
+
+
+contour map
+
+

Contour limits

+

The limit parameter sets the minimum and maximum values for the contour lines. The +parameter takes the low and high values, and is either a list (as below) or a string +limit="-4000/-2000".

+
fig = pygmt.Figure()
+fig.grdcontour(grid=grid, annotation=1000, levels=250, limit=[-4000, -2000])
+fig.show()
+
+
+contour map
+
+

Map settings

+

The pygmt.Figure.grdcontour method accepts additional parameters, including +setting the projection and frame.

+
fig = pygmt.Figure()
+fig.grdcontour(
+    grid=grid,
+    annotation=1000,
+    levels=250,
+    limit=[-4000, -2000],
+    projection="M10c",
+    frame=True,
+)
+fig.show()
+
+
+contour map
+
+

Adding a colormap

+

The pygmt.Figure.grdimage method can be used to add a colormap to the contour +map. It must be called prior to pygmt.Figure.grdcontour to keep the contour +lines visible on the final map. If the projection parameter is specified in the +pygmt.Figure.grdimage method, it does not need to be repeated in the +pygmt.Figure.grdcontour method. Finally, a colorbar is added using the +pygmt.Figure.colorbar method.

+
fig = pygmt.Figure()
+fig.grdimage(grid=grid, cmap="haxby", projection="M10c", frame=True)
+fig.grdcontour(grid=grid, annotation=1000, levels=250, limit=[-4000, -2000])
+fig.colorbar(frame=["x+lelevation", "y+lm"])
+fig.show()
+
+
+contour map

Total running time of the script: (0 minutes 1.444 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/date_time_charts.html b/v0.14.0/tutorials/advanced/date_time_charts.html new file mode 100644 index 00000000000..7218ca72bed --- /dev/null +++ b/v0.14.0/tutorials/advanced/date_time_charts.html @@ -0,0 +1,601 @@ + + + + + + + + + Plotting datetime charts — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Plotting datetime charts

+

PyGMT accepts a variety of datetime objects to plot data and create charts. Aside from +the built-in Python datetime module, PyGMT supports inputs containing ISO formatted +strings as well as objects generated with numpy, pandas, and xarray. These +data types can be used to plot specific points as well as get passed into the region +parameter to create a range of the data on an axis.

+

The following examples will demonstrate how to create plots using these different +datetime objects.

+
import datetime
+
+import numpy as np
+import pandas as pd
+import pygmt
+import xarray as xr
+
+
+
+

Using Python’s datetime

+

In this example, Python’s built-in datetime module is used to create data points +stored in the list x. Additionally, dates are passed into the region parameter +in the format [x_start, x_end, y_start, y_end], where the date range is plotted on +the x-axis. An additional notable parameter is style, where it’s specified that +data points are plotted as circles with a diameter of 0.3 centimeters.

+
x = [
+    datetime.date(2010, 6, 1),
+    datetime.date(2011, 6, 1),
+    datetime.date(2012, 6, 1),
+    datetime.date(2013, 6, 1),
+]
+y = [1, 2, 3, 5]
+
+fig = pygmt.Figure()
+fig.plot(
+    projection="X10c/5c",
+    region=[datetime.date(2010, 1, 1), datetime.date(2014, 12, 1), 0, 6],
+    frame=["WSen", "afg"],
+    x=x,
+    y=y,
+    style="c0.3c",
+    pen="1p",
+)
+fig.show()
+
+
+date time charts

In addition to specifying the date, datetime supports the time at which the data +points were recorded. Using datetime.datetime the region parameter as well +as data points can be created with both date and time information.

+

Some notable differences to the previous example include:

+
    +
  • Modifying frame to only include West (left) and South (bottom) borders, and +removing grid lines

  • +
  • Using circles to plot data points defined by c in the argument passed through +the style parameter

  • +
+
x = [
+    datetime.datetime(2021, 1, 1, 3, 45, 1),
+    datetime.datetime(2021, 1, 1, 6, 15, 1),
+    datetime.datetime(2021, 1, 1, 13, 30, 1),
+    datetime.datetime(2021, 1, 1, 20, 30, 1),
+]
+y = [5, 3, 1, 2]
+
+fig = pygmt.Figure()
+fig.plot(
+    projection="X10c/5c",
+    region=[
+        datetime.datetime(2021, 1, 1, 0, 0, 0),
+        datetime.datetime(2021, 1, 2, 0, 0, 0),
+        0,
+        6,
+    ],
+    frame=["WS", "af"],
+    x=x,
+    y=y,
+    style="c0.4c",
+    pen="1p",
+    fill="blue",
+)
+fig.show()
+
+
+date time charts
pygmt-session [WARNING]: Unable to parse 4 longitude strings
+
+
+
+
+

Using ISO Format

+

In addition to Python’s datetime module, PyGMT also supports passing dates in ISO +format. Basic ISO strings are formatted as YYYY-MM-DD with each - delineated +section marking the four-digit year value, two-digit month value, and two-digit day +value, respectively.

+

For including the time into an ISO string, the T character is used, as it can be +seen in the following example. This character is immediately followed by a string +formatted as hh:mm:ss where each : delineated section marking the two-digit +hour value, two-digit minute value, and two-digit second value, respectively. The +figure in the following example is plotted over a horizontal range of one year from +2016-01-01 to 2017-01-01.

+
x = ["2016-02-01", "2016-06-04T14", "2016-10-04T00:00:15", "2016-12-01T05:00:15"]
+y = [1, 3, 5, 2]
+
+fig = pygmt.Figure()
+fig.plot(
+    projection="X10c/5c",
+    region=["2016-01-01", "2017-01-01", 0, 6],
+    frame=["WSen", "afg"],
+    x=x,
+    y=y,
+    style="a0.45c",
+    pen="1p",
+    fill="dodgerblue",
+)
+fig.show()
+
+
+date time charts
+

Note

+

PyGMT doesn’t recognize non-ISO datetime strings like “Jun 05, 2018”. If your data +contain non-ISO datetime strings, you can convert them to a recognized format +using pandas.to_datetime and then pass it to PyGMT.

+
+
+
+

Mixing and matching Python datetime and ISO dates

+

The following example provides context on how both datetime and ISO date data can +be plotted using PyGMT. This can be helpful when dates and times are coming from +different sources, meaning conversions do not need to take place between ISO and +datetime in order to create valid plots.

+
x = ["2020-02-01", "2020-06-04", "2020-10-04", datetime.datetime(2021, 1, 15)]
+y = [1.3, 2.2, 4.1, 3]
+
+fig = pygmt.Figure()
+fig.plot(
+    projection="X10c/5c",
+    region=[datetime.datetime(2020, 1, 1), datetime.datetime(2021, 3, 1), 0, 6],
+    frame=["WSen", "afg"],
+    x=x,
+    y=y,
+    style="i0.4c",
+    pen="1p",
+    fill="yellow",
+)
+fig.show()
+
+
+date time charts
+
+

Using pandas.date_range

+

In the following example, pandas.date_range produces a list of +pandas.DatetimeIndex objects, which is used to pass date data to the PyGMT +figure. Specifically x contains 7 different pandas.DatetimeIndex objects, +with the number being manipulated by the periods parameter. Each period begins at +the start of a business quarter as denoted by BQS when passed to the freq +parameter. The initial date is the first argument that is passed to +pandas.date_range and it marks the first data point in the list x that +will be plotted.

+
x = pd.date_range("2018-03-01", periods=7, freq="BQS")
+y = [4, 5, 6, 8, 6, 3, 5]
+
+fig = pygmt.Figure()
+fig.plot(
+    projection="X10c/10c",
+    region=[datetime.datetime(2017, 12, 31), datetime.datetime(2019, 12, 31), 0, 10],
+    frame=["WSen", "ag"],
+    x=x,
+    y=y,
+    style="i0.4c",
+    pen="1p",
+    fill="purple",
+)
+fig.show()
+
+
+date time charts
+
+

Using xarray.DataArray

+

In this example, instead of using a list of pandas.DatetimeIndex objects, +x is initialized as an xarray.DataArray object. This object provides a +wrapper around numpy ndarrays. It also allows the data to have labeled dimensions +while supporting operations that use various pieces of metadata. The following code +uses pandas.date_range to fill the DataArray with data, but this is not +essential for the creation of a valid DataArray.

+
x = xr.DataArray(data=pd.date_range(start="2020-01-01", periods=4, freq="QE"))
+y = [4, 7, 5, 6]
+
+fig = pygmt.Figure()
+fig.plot(
+    projection="X10c/10c",
+    region=[datetime.datetime(2020, 1, 1), datetime.datetime(2021, 4, 1), 0, 10],
+    frame=["WSen", "ag"],
+    x=x,
+    y=y,
+    style="n0.4c",
+    pen="1p",
+    fill="red",
+)
+fig.show()
+
+
+date time charts
+
+

Using numpy.datetime64

+

In this example, instead of using pd.date_range, x is initialized as an +np.array object. Similar to xarray.DataArray this wraps the dataset +before passing it as an argument. However, np.array objects use less memory and +allow developers to specify data types.

+
x = np.array(
+    ["2010-06-01", "2011-06-01T12", "2012-01-01T12:34:56"], dtype=np.datetime64
+)
+y = [2, 7, 5]
+
+fig = pygmt.Figure()
+fig.plot(
+    projection="X10c/10c",
+    region=[datetime.datetime(2010, 1, 1), datetime.datetime(2012, 6, 1), 0, 10],
+    frame=["WS", "ag"],
+    x=x,
+    y=y,
+    style="s0.5c",
+    pen="1p",
+    fill="blue",
+)
+fig.show()
+
+
+date time charts
+
+

Generating an automatic region

+

Another way of creating charts involving datetime data can be done by automatically +generating the region of the plot. This can be done by passing the DataFrame to +pygmt.info, which will find the maximum and minimum values for each column and +create a list that could be passed as region. Additionally, the spacing parameter +can be used to increase the range past the maximum and minimum data points.

+
data = [
+    ["20200712", 1000],
+    ["20200714", 1235],
+    ["20200716", 1336],
+    ["20200719", 1176],
+    ["20200721", 1573],
+    ["20200724", 1893],
+    ["20200729", 1634],
+]
+df = pd.DataFrame(data, columns=["Date", "Score"])
+df.Date = pd.to_datetime(df["Date"], format="%Y%m%d")
+region = pygmt.info(
+    data=df[["Date", "Score"]], per_column=True, spacing=(700, 700), coltypes="T"
+)
+
+fig = pygmt.Figure()
+fig.plot(
+    region=region,
+    projection="X15c/10c",
+    frame=["WSen", "afg"],
+    x=df.Date,
+    y=df.Score,
+    style="c0.4c",
+    pen="1p",
+    fill="green3",
+)
+fig.show()
+
+
+date time charts
+
+

Setting Primary and Secondary Time Axes

+

This example focuses on annotating the axes and setting the interval in which the +annotations should appear. All of these modifications are passed to the frame +parameter and each item in that list modifies a specific aspect of the frame.

+

Adding "WS" means that only the Western/Left (W) and Southern/Bottom (S) +borders of the plot are annotated. For more information on this, please refer to the +Frames, ticks, titles, and labels tutorial.

+

Another important item in the list passed to frame is "sxa1Of1D". This string +modifies the secondary annotation (s) of the x-axis (x). Specifically, it sets +the main annotation and major tick spacing interval to one month (a1O) (capital +letter O, not zero). Additionally, it sets the minor tick spacing interval to 1 day +(f1D). To use the month name instead of its number set FORMAT_DATE_MAP +to o. More information on configuring date formats can be found at +FORMAT_DATE_MAP, FORMAT_DATE_IN, and +FORMAT_DATE_OUT.

+
x = pd.date_range("2013-05-02", periods=10, freq="2D")
+y = [4, 5, 6, 8, 9, 5, 8, 9, 4, 2]
+
+fig = pygmt.Figure()
+with pygmt.config(FORMAT_DATE_MAP="o"):
+    fig.plot(
+        projection="X15c/10c",
+        region=[datetime.datetime(2013, 5, 1), datetime.datetime(2013, 5, 25), 0, 10],
+        frame=["WS", "sxa1Of1D", "pxa5d", "sy+lLength", "pya1+ucm"],
+        x=x,
+        y=y,
+        style="c0.4c",
+        pen="1p",
+        fill="green3",
+    )
+fig.show()
+
+
+date time charts

The same concept shown above can be applied to smaller as well as larger intervals. In +this example, data are plotted for different times throughout two days. The primary +x-axis annotations are modified to repeat every 6 hours, and the secondary x-axis +annotations repeat every day and show the day of the week.

+

Another notable mention in this example is setting FORMAT_CLOCK_MAP to +-hhAM which specifies the format used for time. In this case, leading zeros are +removed using (-), and only hours are displayed. Additionally, an AM/PM system is +used instead of a 24-hour system. More information on configuring time formats can be +found at FORMAT_CLOCK_MAP, FORMAT_CLOCK_IN, and +FORMAT_CLOCK_OUT.

+
x = pd.date_range("2021-04-15", periods=8, freq="6h")
+y = [2, 5, 3, 1, 5, 7, 9, 6]
+
+fig = pygmt.Figure()
+with pygmt.config(FORMAT_CLOCK_MAP="-hhAM"):
+    fig.plot(
+        projection="X15c/10c",
+        region=[
+            datetime.datetime(2021, 4, 14, 23, 0, 0),
+            datetime.datetime(2021, 4, 17),
+            0,
+            10,
+        ],
+        frame=["WS", "sxa1K", "pxa6H", "sy+lSpeed", "pya1+ukm/h"],
+        x=x,
+        y=y,
+        style="n0.4c",
+        pen="1p",
+        fill="lightseagreen",
+    )
+fig.show()
+
+
+date time charts

Total running time of the script: (0 minutes 1.258 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/draping_on_3d_surface.html b/v0.14.0/tutorials/advanced/draping_on_3d_surface.html new file mode 100644 index 00000000000..3acc56a1036 --- /dev/null +++ b/v0.14.0/tutorials/advanced/draping_on_3d_surface.html @@ -0,0 +1,405 @@ + + + + + + + + + Draping a dataset on top of a topographic surface — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Draping a dataset on top of a topographic surface

+

It can be visually appealing to “drape” a dataset over a topographic surface. This can +be accomplished using the drapegrid parameter of pygmt.Figure.grdview.

+

This tutorial consists of two examples:

+
    +
  1. Draping a grid

  2. +
  3. Draping an image

  4. +
+
# Load the required packages
+import pygmt
+import rasterio
+import xarray as xr
+
+
+
+

1. Drapping a grid

+

In the first example, the seafloor crustal age is plotted with color-coding on top of +the topographic map of an area of the Mid-Atlantic Ridge.

+
# Define the study area in degrees East or North
+region_2d = [-50, 0, 36, 70]  # [lon_min, lon_max, lat_min, lat_max]
+
+# Download elevation and crustal age grids for the study region with a resolution of 10
+# arc-minutes and load them into xarray.DataArrays
+grd_relief = pygmt.datasets.load_earth_relief(resolution="10m", region=region_2d)
+grd_age = pygmt.datasets.load_earth_age(resolution="10m", region=region_2d)
+
+# Determine the 3-D region from the minimum and maximum values of the relief grid
+region_3d = [*region_2d, grd_relief.min().to_numpy(), grd_relief.max().to_numpy()]
+
+
+
gmtread [NOTICE]: Remote data courtesy of GMT data server oceania [http://oceania.generic-mapping-tools.org]
+gmtread [NOTICE]: EarthByte Earth Seafloor Age at 10x10 arc minutes reduced by Gaussian Cartesian filtering (52.4 km fullwidth) [Seton et al., 2020].
+gmtread [NOTICE]:   -> Download grid file [1.3M]: earth_age_10m_g.grd
+
+
+

The topographic surface is created based on the grid passed to the grid parameter +of pygmt.Figure.grdview; here we use a grid of the Earth relief. To add a +color-coding based on another grid we have to pass a second grid to the +drapegrid parameter; here we use a grid of the crustal age. In this case the +colormap specified via the cmap parameter applies to the grid passed to +drapegrid, not to grid. The azimuth and elevation of the 3-D plot are set via +the perspective parameter.

+
fig = pygmt.Figure()
+
+# Set up colormap for the crustal age
+pygmt.config(COLOR_NAN="lightgray")
+pygmt.makecpt(cmap="batlow", series=[0, 200, 1], reverse=True, overrule_bg=True)
+
+fig.grdview(
+    projection="M12c",  # Mercator projection with a width of 12 centimeters
+    region=region_3d,
+    grid=grd_relief,  # Use elevation grid for z values
+    drapegrid=grd_age,  # Use crustal age grid for color-coding
+    cmap=True,  # Use colormap created for the crustal age
+    surftype="i",  # Create an image plot
+    # Use an illumination from the azimuthal directions 0° (north) and 270°
+    # (west) with a normalization via a cumulative Laplace distribution for
+    # the shading
+    shading="+a0/270+ne0.6",
+    perspective=[157.5, 30],  # Azimuth and elevation for the 3-D plot
+    zsize="1.5c",
+    plane="+gdarkgray",
+    frame=True,
+)
+
+# Add colorbar for the crustal age
+fig.colorbar(frame=["x+lseafloor crustal age", "y+lMyr"], position="+n")
+
+fig.show()
+
+
+draping on 3d surface
+
+

2. Draping an image

+

In the second example, the flag of the European Union (EU) is plotted on top of a +topographic map of northwest Europe. This example is modified from +GMT example 32. +We have to consider the dimension of the image we want to drap. The image we will +download in this example has 1000 x 667 pixels, i.e. an aspect ratio of 3 x 2.

+
# Define the study area in degrees East or North, with an extend of 6 degrees for
+# the longitude and 4 degrees for the latitude
+region_2d = [3, 9, 50, 54]  # [lon_min, lon_max, lat_min, lat_max]
+
+# Download elevation grid for the study region with a resolution of 30 arc-seconds and
+# pixel registration and load it into an xarray.DataArray
+grd_relief = pygmt.datasets.load_earth_relief(resolution="30s", region=region_2d)
+
+# Determine the 3-D region from the minimum and maximum values of the relief grid
+region_3d = [*region_2d, grd_relief.min().to_numpy(), grd_relief.max().to_numpy()]
+
+# Download an PNG image of the flag of the EU using rasterio and load it into a
+# xarray.DataArray
+url_to_image = "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Flag_of_Europe.svg/1000px-Flag_of_Europe.svg.png"
+with rasterio.open(url_to_image) as dataset:
+    data = dataset.read()
+    drapegrid = xr.DataArray(data, dims=("band", "y", "x"))
+
+
+
grdblend [NOTICE]: Remote data courtesy of GMT data server oceania [http://oceania.generic-mapping-tools.org]
+grdblend [NOTICE]: SRTM15 Earth Relief v2.6 at 30x30 arc seconds reduced by Gaussian Cartesian filtering (2.6 km fullwidth) [Tozer et al., 2019].
+grdblend [NOTICE]:   -> Download 15x15 degree grid tile (earth_relief_30s_g): N45E000
+/home/runner/micromamba/envs/pygmt/lib/python3.13/site-packages/rasterio/__init__.py:356: NotGeoreferencedWarning: Dataset has no geotransform, gcps, or rpcs. The identity matrix will be returned.
+  dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)
+
+
+

Again we create a 3-D plot with pygmt.Figure.grdview and pass an Earth relief +grid to the grid parameter to create the topographic surface. But now we pass the +PNG image which was loaded into an xarray.DataArray to the drapgrid +parameter.

+
fig = pygmt.Figure()
+
+# Set up a colormap with two colors for the EU flag: blue (0/51/153) for the background
+# (value 0 in the netCDF file -> lower half of 0-255 range) and yellow (255/204/0) for
+# the stars (value 255 -> upper half)
+pygmt.makecpt(cmap="0/51/153,255/204/0", series=[0, 256, 128])
+
+fig.grdview(
+    projection="M12c",  # Mercator projection with a width of 12 centimeters
+    region=region_3d,
+    grid=grd_relief,  # Use elevation grid for z values
+    drapegrid=drapegrid,  # Drap image grid for the EU flag on top
+    cmap=True,  # Use colormap defined for the EU flag
+    surftype="i",  # Create an image plot
+    # Use an illumination from the azimuthal directions 0° (north) and 270° (west) with
+    # a normalization via a cumulative Laplace distribution for the shading
+    shading="+a0/270+ne0.6",
+    perspective=[157.5, 30],  # Define azimuth, elevation for the 3-D plot
+    zsize="1c",
+    plane="+gdarkgray",
+    frame=True,
+)
+
+fig.show()
+
+
+draping on 3d surface
/home/runner/micromamba/envs/pygmt/lib/python3.13/site-packages/rasterio/__init__.py:366: NotGeoreferencedWarning: The given matrix is equal to Affine.identity or its flipped counterpart. GDAL may ignore this matrix and save no geotransform without raising an error. This behavior is somewhat driver-specific.
+  dataset = writer(
+
+
+

Total running time of the script: (0 minutes 7.605 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/earth_relief.html b/v0.14.0/tutorials/advanced/earth_relief.html new file mode 100644 index 00000000000..8da4703ed43 --- /dev/null +++ b/v0.14.0/tutorials/advanced/earth_relief.html @@ -0,0 +1,351 @@ + + + + + + + + + Plotting Earth relief — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Plotting Earth relief

+

PyGMT provides the pygmt.datasets.load_earth_relief function to download the +Earth relief data from the GMT remote server and load as an xarray.DataArray +object. The data can then be plotted using the pygmt.Figure.grdimage method.

+
import pygmt
+
+
+

Load sample Earth relief data for the entire globe at a resolution of 1 arc-degree. +Refer to pygmt.datasets.load_earth_relief for the other available resolutions.

+
+
+
+

Create a plot

+

The pygmt.Figure.grdimage method takes the grid input to create a figure. +It creates and applies a color palette to the figure based upon the z-values of the +data. By default, it plots the map with the turbo CPT, an equidistant cylindrical +projection, and with no frame.

+ +earth relief

pygmt.Figure.grdimage can take the optional parameter projection for the +map. In the example below, projection is set to "R12c" for a +12-centimeters-wide figure with a Winkel Tripel projection. For a list of available +projections, see GMT Map Projections.

+
fig = pygmt.Figure()
+fig.grdimage(grid=grid, projection="R12c")
+fig.show()
+
+
+earth relief
+
+

Set a color map

+

pygmt.Figure.grdimage takes the cmap parameter to set the CPT of the +figure. Examples of common CPTs for Earth relief are shown below. A full list of CPTs +can be found at https://docs.generic-mapping-tools.org/6.5/reference/cpts.html.

+

Using the geo CPT:

+
fig = pygmt.Figure()
+fig.grdimage(grid=grid, projection="R12c", cmap="geo")
+fig.show()
+
+
+earth relief

Using the relief CPT:

+
fig = pygmt.Figure()
+fig.grdimage(grid=grid, projection="R12c", cmap="relief")
+fig.show()
+
+
+earth relief
+
+

Add a color bar

+

The pygmt.Figure.colorbar method displays the CPT and the associated z-values +of the figure, and by default uses the same CPT set by the cmap parameter for +pygmt.Figure.grdimage. The frame parameter for +pygmt.Figure.colorbar can be used to set the axis intervals and labels. A list +is used to pass multiple arguments to frame. In the example below, "a2500" +sets the axis interval to 2,500, "x+lElevation" sets the x-axis label, and +"y+lm" sets the y-axis label.

+
fig = pygmt.Figure()
+fig.grdimage(grid=grid, projection="R12c", cmap="geo")
+fig.colorbar(frame=["a2500", "x+lElevation", "y+lm"])
+fig.show()
+
+
+earth relief
+
+

Create a region map

+

In addition to providing global data, the region parameter of +pygmt.datasets.load_earth_relief can be used to provide data for a specific +area. The region parameter is required for resolutions at 5 arc-minutes or higher, +and accepts a list in the form of [xmin, xmax, ymin, ymax].

+

The example below uses data with a 10 arc-minutes resolution, and plots it on a +15-centimeters-wide figure with a Mercator projection and a CPT set to geo. +frame="a" is used to add a frame with annotations to the figure.

+
grid = pygmt.datasets.load_earth_relief(resolution="10m", region=[-14, 30, 35, 60])
+fig = pygmt.Figure()
+fig.grdimage(grid=grid, projection="M15c", frame="a", cmap="geo")
+fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"])
+fig.show()
+
+
+earth relief

Total running time of the script: (0 minutes 1.209 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/grid_equalization.html b/v0.14.0/tutorials/advanced/grid_equalization.html new file mode 100644 index 00000000000..8d62f6187d3 --- /dev/null +++ b/v0.14.0/tutorials/advanced/grid_equalization.html @@ -0,0 +1,651 @@ + + + + + + + + + Performing grid histogram equalization — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Performing grid histogram equalization

+

The pygmt.grdhisteq.equalize_grid method creates a grid using +statistics based on a cumulative distribution function.

+
import pygmt
+
+
+
+

Load sample data

+

Load the sample Earth relief data for a region around Yosemite Valley +and use pygmt.grd2xyz to create a pandas.Series with the +z-values.

+
grid = pygmt.datasets.load_earth_relief(
+    resolution="03s", region=[-119.825, -119.4, 37.6, 37.825]
+)
+grid_dist = pygmt.grd2xyz(grid=grid, output_type="pandas")["z"]
+
+
+
+
+

Plot the original digital elevation model and data distribution

+

For comparison, we will create a map of the original digital elevation +model and a histogram showing the distribution of elevation data values.

+
# Create an instance of the Figure class
+fig = pygmt.Figure()
+# Define figure configuration
+pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain")
+# Define the colormap for the figure
+pygmt.makecpt(series=[500, 3540], cmap="turku")
+# Setup subplots with two panels
+with fig.subplot(
+    nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Digital Elevation Model"
+):
+    # Plot the original digital elevation model in the first panel
+    with fig.set_panel(panel=0):
+        fig.grdimage(grid=grid, projection="M?", frame="WSne", cmap=True)
+    # Plot a histogram showing the z-value distribution in the original digital
+    # elevation model
+    with fig.set_panel(panel=1):
+        fig.histogram(
+            data=grid_dist,
+            projection="X?",
+            region=[500, 3600, 0, 20],
+            series=[500, 3600, 100],
+            frame=["wnSE", "xaf+lElevation (m)", "yaf+lPercent frequency"],
+            cmap=True,
+            histtype=1,
+            pen="1p,black",
+        )
+        fig.colorbar(position="JMR+o1.5c/0c+w3c/0.3c", frame=True)
+fig.show()
+
+
+grid equalization
+
+

Equalize grid based on a linear distribution

+

The pygmt.grdhisteq.equalize_grid method creates a new grid with the +z-values representing the position of the original z-values in a given +cumulative distribution. By default, it computes the position in a linear +distribution. Here, we equalize the grid into nine divisions based on a +linear distribution and produce a pandas.Series with the z-values +for the new grid.

+ +
+
+

Calculate the bins used for data transformation

+

The pygmt.grdhisteq.compute_bins method reports statistics about the +grid equalization. Here, we report the bins that would linearly divide the +original data into 9 divisions with equal area. In our new grid produced by +pygmt.grdhisteq.equalize_grid, all the grid cells with values between +start and stop of bin_id=0 are assigned the value 0, all grid +cells with values between start and stop of bin_id=1 are assigned +the value 1, and so on.

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
startstop
bin_id
0508.01352.0
11352.01719.0
21719.01972.0
31972.02156.0
42156.02270.0
52270.02391.0
62391.02520.0
72520.02739.0
82739.03533.0
+
+
+
+
+
+

Plot the equally distributed data

+

Here we create a map showing the grid that has been transformed to +have a linear distribution with nine divisions and a histogram of the data +values.

+
# Create an instance of the Figure class
+fig = pygmt.Figure()
+# Define figure configuration
+pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain")
+# Define the colormap for the figure
+pygmt.makecpt(series=[0, divisions, 1], cmap="lajolla")
+# Setup subplots with two panels
+with fig.subplot(
+    nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Linear distribution"
+):
+    # Plot the grid with a linear distribution in the first panel
+    with fig.set_panel(panel=0):
+        fig.grdimage(grid=linear, projection="M?", frame="WSne", cmap=True)
+    # Plot a histogram showing the linear z-value distribution
+    with fig.set_panel(panel=1):
+        fig.histogram(
+            data=linear_dist,
+            projection="X?",
+            region=[-1, divisions, 0, 40],
+            series=[0, divisions, 1],
+            frame=["wnSE", "xaf+lRelative elevation", "yaf+lPercent frequency"],
+            cmap=True,
+            histtype=1,
+            pen="1p,black",
+            center=True,
+        )
+        fig.colorbar(position="JMR+o1.5c/0c+w3c/0.3c", frame=True)
+fig.show()
+
+
+grid equalization
+
+

Transform grid based on a normal distribution

+

The gaussian parameter of pygmt.grdhisteq.equalize_grid can be +used to transform the z-values relative to their position in a normal +distribution rather than a linear distribution. In this case, the output +data are continuous rather than discrete.

+
normal = pygmt.grdhisteq.equalize_grid(grid=grid, gaussian=True)
+normal_dist = pygmt.grd2xyz(grid=normal, output_type="pandas")["z"]
+
+
+
+
+

Plot the normally distributed data

+

Here we create a map showing the grid that has been transformed to have +a normal distribution and a histogram of the data values.

+
# Create an instance of the Figure class
+fig = pygmt.Figure()
+# Define figure configuration
+pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain")
+# Define the colormap for the figure
+pygmt.makecpt(series=[-4.5, 4.5], cmap="vik")
+# Setup subplots with two panels
+with fig.subplot(
+    nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Normal distribution"
+):
+    # Plot the grid with a normal distribution in the first panel
+    with fig.set_panel(panel=0):
+        fig.grdimage(grid=normal, projection="M?", frame="WSne", cmap=True)
+    # Plot a histogram showing the normal z-value distribution
+    with fig.set_panel(panel=1):
+        fig.histogram(
+            data=normal_dist,
+            projection="X?",
+            region=[-4.5, 4.5, 0, 20],
+            series=[-4.5, 4.5, 0.2],
+            frame=["wnSE", "xaf+lRelative elevation", "yaf+lPercent frequency"],
+            cmap=True,
+            histtype=1,
+            pen="1p,black",
+        )
+        fig.colorbar(position="JMR+o1.5c/0c+w3c/0.3c", frame=True)
+fig.show()
+
+
+grid equalization
+
+

Equalize grid based on a quadratic distribution

+

The quadratic parameter of pygmt.grdhisteq.equalize_grid can be +used to transform the z-values relative to their position in a quadratic +distribution rather than a linear distribution. Here, we equalize the grid +into nine divisions based on a quadratic distribution and produce a +pandas.Series with the z-values for the new grid.

+ +
+
+

Calculate the bins used for data transformation

+

We can also use the quadratic parameter of +pygmt.grdhisteq.compute_bins to report the bins used for dividing +the grid into 9 divisions based on their position in a quadratic +distribution.

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
startstop
bin_id
0508.01155.0
11155.01375.0
21375.01605.0
31605.01821.0
41821.01972.0
51972.02131.0
62131.02245.0
72245.02391.0
82391.03533.0
+
+
+
+
+
+

Plot the quadratic distribution of data

+

Here we create a map showing the grid that has been transformed to have +a quadratic distribution and a histogram of the data values.

+
# Create an instance of the Figure class
+fig = pygmt.Figure()
+# Define figure configuration
+pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain")
+# Define the colormap for the figure
+pygmt.makecpt(series=[0, divisions, 1], cmap="lajolla")
+# Setup subplots with two panels
+with fig.subplot(
+    nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Quadratic distribution"
+):
+    # Plot the grid with a quadratic distribution in the first panel
+    with fig.set_panel(panel=0):
+        fig.grdimage(grid=quadratic, projection="M?", frame="WSne", cmap=True)
+    # Plot a histogram showing the quadratic z-value distribution
+    with fig.set_panel(panel=1):
+        fig.histogram(
+            data=quadratic_dist,
+            projection="X?",
+            region=[-1, divisions, 0, 40],
+            series=[0, divisions, 1],
+            frame=["wnSE", "xaf+lRelative elevation", "yaf+lPercent frequency"],
+            cmap=True,
+            histtype=1,
+            pen="1p,black",
+            center=True,
+        )
+        fig.colorbar(position="JMR+o1.5c/0c+w3c/0.3c", frame=True)
+fig.show()
+
+
+grid equalization

Total running time of the script: (0 minutes 1.243 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/insets.html b/v0.14.0/tutorials/advanced/insets.html new file mode 100644 index 00000000000..e93788669f4 --- /dev/null +++ b/v0.14.0/tutorials/advanced/insets.html @@ -0,0 +1,366 @@ + + + + + + + + + Adding an inset to the figure — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Adding an inset to the figure

+

To plot an inset figure inside another larger figure, we can use the +pygmt.Figure.inset method. After a large figure has been created, +call inset using a with statement, and new plot elements will be +added to the inset figure instead of the larger figure.

+
import pygmt
+
+
+

Prior to creating an inset figure, a larger figure must first be plotted. In +the example below, pygmt.Figure.coast is used to create a map of the +US state of Massachusetts.

+
fig = pygmt.Figure()
+fig.coast(
+    region=[-74, -69.5, 41, 43],  # Set bounding box of the large figure
+    borders="2/thin",  # Plot state boundaries with thin lines
+    shorelines="thin",  # Plot coastline with thin lines
+    projection="M15c",  # Set Mercator projection and size of 15 centimeter
+    land="lightyellow",  # Color land areas light yellow
+    water="lightblue",  # Color water areas light blue
+    frame="a",  # Set frame with annotation and major tick spacing
+)
+fig.show()
+
+
+insets

The pygmt.Figure.inset method uses a context manager, and is called +using a with statement. The position parameter, including the inset +width, is required to plot the inset. Using the j modifier, the location +of the inset is set to one of the 9 anchors (Top - Middle - Bottom and Left - +Center - Right). In the example below, BL places the inset at the Bottom +Left corner. The box parameter can set the fill and border of the inset. +In the example below, +pblack sets the border color to black and ++glightred sets the fill to light red.

+
fig = pygmt.Figure()
+fig.coast(
+    region=[-74, -69.5, 41, 43],
+    borders="2/thin",
+    shorelines="thin",
+    projection="M15c",
+    land="lightyellow",
+    water="lightblue",
+    frame="a",
+)
+with fig.inset(position="jBL+w3c", box="+pblack+glightred"):
+    # pass is used to exit the with statement as no plotting methods are
+    # called
+    pass
+fig.show()
+
+
+insets

When using j to set the anchor of the inset, the default location is in +contact with the nearby axis or axes. The offset of the inset can be set with ++o, followed by the offsets along the x- and y-axis. If only one offset +is passed, it is applied to both axes. Each offset can have its own unit. In +the example below, the inset is shifted 0.5 centimeters on the x-axis and +0.2 centimeters on the y-axis.

+
fig = pygmt.Figure()
+fig.coast(
+    region=[-74, -69.5, 41, 43],
+    borders="2/thin",
+    shorelines="thin",
+    projection="M15c",
+    land="lightyellow",
+    water="lightblue",
+    frame="a",
+)
+with fig.inset(position="jBL+w3c+o0.5c/0.2c", box="+pblack+glightred"):
+    pass
+fig.show()
+
+
+insets

Standard plotting methods can be called from within the inset context +manager. The example below uses pygmt.Figure.coast to plot a zoomed +out map that selectively paints the state of Massachusetts to show its +location relative to other states.

+
fig = pygmt.Figure()
+fig.coast(
+    region=[-74, -69.5, 41, 43],
+    borders="2/thin",
+    shorelines="thin",
+    projection="M15c",
+    land="lightyellow",
+    water="lightblue",
+    frame="a",
+)
+# This does not include an inset fill as it is covered by the inset figure
+# Inset width/height are determined by the ``region`` and ``projection``
+# parameters.
+with fig.inset(
+    position="jBL+o0.5c/0.2c",
+    box="+pblack",
+    region=[-80, -65, 35, 50],
+    projection="M3c",
+):
+    # Use a plotting method to create a figure inside the inset.
+    fig.coast(
+        land="gray",
+        borders=[1, 2],
+        shorelines="1/thin",
+        water="white",
+        # Use dcw to selectively highlight an area
+        dcw="US.MA+gred",
+    )
+fig.show()
+
+
+insets

Total running time of the script: (0 minutes 0.995 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/non_ascii_text.html b/v0.14.0/tutorials/advanced/non_ascii_text.html new file mode 100644 index 00000000000..0629f75d917 --- /dev/null +++ b/v0.14.0/tutorials/advanced/non_ascii_text.html @@ -0,0 +1,327 @@ + + + + + + + + + Typesetting non-ASCII text — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Typesetting non-ASCII text

+

In addition to ASCII printable characters, sometimes you may also want to typeset +non-ASCII characters on the plot, such as Greek letters, mathematical symbols, or +special characters.

+

Due to the limitations of the underlying PostScript language, PyGMT doesn’t support +all characters in the Unicode standard. Instead, PyGMT supports a limited set of +characters in the “Adobe Symbol”, “Adobe ZapfDingbats”, “Adobe ISOLatin1+”, and +“ISO-8859-x” (x can be 1-11, 13-16) encodings. Refer to Supported Encodings and Non-ASCII Characters +for the complete list of supported characters.

+

In PyGMT, the supported (ASCII and non-ASCII) characters can be directly used in the +text parameter of the pygmt.Figure.text method for typesetting text strings. +They can also be used in the arguments of other plotting functions (e.g., in the +frame parameter to set the labels or title).

+

In this example, we demonstrate how to typeset non-ASCII characters in PyGMT.

+
import pygmt
+
+fig = pygmt.Figure()
+fig.basemap(
+    region=[0, 5, 0, 6],
+    projection="X14c/7c",
+    frame=["xaf+lDistance (°)", "yaf+lValue (‰)", "WSen+tTitle: α² ± β²"],
+)
+
+fig.text(
+    x=[0.2] * 5,
+    y=[5, 4, 3, 2, 1],
+    text=["ASCII:", "ISOLatin1+:", "Symbol:", "ZapfDingbats:", "Mixed:"],
+    font="20p,Helvetica-Bold,red",
+    justify="LM",
+)
+fig.text(
+    x=[2] * 5,
+    y=[5, 4, 3, 2, 1],
+    text=[
+        "ABCDE12345!#$:;<=>?",  # ASCII only
+        "±°ÀÁÂÃÄÅÈÌÒÙàèìòù",  # Non-ASCII characters from Adobe ISOLatin1+
+        "αβγδεζηθ⊗⊕∅⊃⊇⊄⊂⊆",  # Non-ASCII characters from Adobe Symbol
+        "✈♥♦♣♠❛❜❝❞❨❩❪❫❬❭❮❯→↔",  # Non-ASCII characters from Adobe ZapfDingbats
+        "ABCD αβγδ ①②③ ➊➋➌",  # Mix characters from ISOLatin1+, Symbol and ZapfDingbats
+    ],
+    font="18p,Helvetica",
+    justify="LM",
+)
+
+fig.show()
+
+
+non ascii text

Here are some important tips when using non-ASCII characters:

+
    +
  • Similar-looking characters: Be cautious when using characters that appear +visually similar but are distinct. For example, Ω (OHM SIGN) and (GREEK +CAPITAL LETTER OMEGA) may look alike, but PyGMT only supports the latter. Using the +incorrect character can lead to unexpected results. To avoid this, it’s recommended +to copy and paste characters from the Supported Encodings and Non-ASCII Characters documentation.

  • +
  • Mix characters from different encodings: As shown in the example above, you can +mix characters from different encodings in the same text string. However, due to the +limitations of the underlying PostScript language, you cannot mix characters from +the “Adobe ISOLatin1+” and “ISO-8859-x” encodings in the same text string. For +example, you cannot mix characters from “Adobe ISOLatin1+” and “ISO-8859-2”. If +you need to use characters from different encodings, you can use them in different +PyGMT function/method calls.

  • +
  • Non-ASCII characters in text files: Non-ASCII characters are not supported if +you have them in a text file and pass it to pygmt.Figure.text. In this case, +you may want to load the text file into pandas.DataFrame and then pass it +to the text parameter.

  • +
+

Total running time of the script: (0 minutes 0.180 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/sg_execution_times.html b/v0.14.0/tutorials/advanced/sg_execution_times.html new file mode 100644 index 00000000000..a2e5dd70c5e --- /dev/null +++ b/v0.14.0/tutorials/advanced/sg_execution_times.html @@ -0,0 +1,292 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:21.722 total execution time for 13 files from tutorials/advanced:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Draping a dataset on top of a topographic surface (draping_on_3d_surface.py)

00:07.605

0.0

Plotting vectors (vectors.py)

00:02.503

0.0

Interactive data visualization using Panel (working_with_panel.py)

00:01.682

0.0

Cartesian histograms (cartesian_histograms.py)

00:01.492

0.0

Creating a map with contour lines (contour_map.py)

00:01.444

0.0

Plotting datetime charts (date_time_charts.py)

00:01.258

0.0

Performing grid histogram equalization (grid_equalization.py)

00:01.243

0.0

Plotting Earth relief (earth_relief.py)

00:01.209

0.0

Adding an inset to the figure (insets.py)

00:00.995

0.0

Creating a 3-D perspective image (3d_perspective_image.py)

00:00.959

0.0

Making subplots (subplots.py)

00:00.616

0.0

Configuring PyGMT defaults (configuration.py)

00:00.537

0.0

Typesetting non-ASCII text (non_ascii_text.py)

00:00.180

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/subplots.html b/v0.14.0/tutorials/advanced/subplots.html new file mode 100644 index 00000000000..6468dae03bf --- /dev/null +++ b/v0.14.0/tutorials/advanced/subplots.html @@ -0,0 +1,470 @@ + + + + + + + + + Making subplots — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Making subplots

+

When you’re preparing a figure for a paper, there will often be times when +you’ll need to put many individual plots into one large figure, and label them +‘abcd’. These individual plots are called subplots.

+

There are two main ways to create subplots in GMT:

+ +

The first method is easier to use and should handle simple cases involving a +couple of subplots. For more advanced subplot layouts, however, we recommend +the use of pygmt.Figure.subplot which offers finer grained control, and +this is what the tutorial below will cover.

+
import pygmt
+
+
+

Let’s start by initializing a pygmt.Figure instance.

+ +
+

Define subplot layout

+

The pygmt.Figure.subplot method is used to set up the layout, size, +and other attributes of the figure. It divides the whole canvas into regular +grid areas with n rows and m columns. Each grid area can contain an +individual subplot. For example:

+
with fig.subplot(nrows=2, ncols=3, figsize=("15c", "6c"), frame="lrtb"):
+    ...
+
+
+

will define our figure to have a 2 row and 3 column grid layout. +figsize=("15c", "6c") defines the overall size of the figure to be 15 cm +wide by 6 cm high. Using frame="lrtb" allows us to customize the map +frame for all subplots instead of setting them individually. The figure +layout will look like the following:

+
with fig.subplot(nrows=2, ncols=3, figsize=("15c", "6c"), frame="lrtb"):
+    for i in range(2):  # row number starting from 0
+        for j in range(3):  # column number starting from 0
+            index = i * 3 + j  # index number starting from 0
+            with fig.set_panel(panel=index):  # sets the current panel
+                fig.text(
+                    position="MC",
+                    text=f"index: {index}; row: {i}, col: {j}",
+                    region=[0, 1, 0, 1],
+                )
+fig.show()
+
+
+subplots

The pygmt.Figure.set_panel method activates a specified subplot, +and all subsequent plotting methods will take place in that subplot panel. +This is similar to matplotlib’s plt.sca method. In order to specify a +subplot, you will need to provide the identifier for that subplot via the +panel parameter. Pass in either the index number, or a tuple/list like +(row, col) to panel.

+
+

Note

+

The row and column numbering starts from 0. So for a subplot layout with +N rows and M columns, row numbers will go from 0 to N-1, and column +numbers will go from 0 to M-1.

+
+

For example, to activate the subplot on the top right corner (index: 2) at +row=0 and col=2, so that all subsequent plotting commands happen +there, you can use the following command:

+
with fig.set_panel(panel=[0, 2]):
+    ...
+
+
+
+
+

Making your first subplot

+

Next, let’s use what we learned above to make a 2 row by 2 column subplot +figure. We’ll also pick up on some new parameters to configure our subplot.

+
fig = pygmt.Figure()
+with fig.subplot(
+    nrows=2,
+    ncols=2,
+    figsize=("15c", "6c"),
+    autolabel=True,
+    frame=["af", "WSne"],
+    margins=["0.1c", "0.2c"],
+    title="My Subplot Heading",
+):
+    fig.basemap(region=[0, 10, 0, 10], projection="X?", panel=[0, 0])
+    fig.basemap(region=[0, 20, 0, 10], projection="X?", panel=[0, 1])
+    fig.basemap(region=[0, 10, 0, 20], projection="X?", panel=[1, 0])
+    fig.basemap(region=[0, 20, 0, 20], projection="X?", panel=[1, 1])
+fig.show()
+
+
+subplots

In this example, we define a 2-row, 2-column (2x2) subplot layout using +pygmt.Figure.subplot. The overall figure dimensions is set to be +15 cm wide and 6 cm high (figsize=["15c", "6c"]). In addition, we use +some optional parameters to fine-tune some details of the figure creation:

+
    +
  • autolabel=True: Each subplot is automatically labelled ‘abcd’.

  • +
  • margins=["0.1c", "0.2c"]: Adjusts the space between adjacent subplots. +In this case, it is set as 0.1 cm in the x-direction and 0.2 cm in the +y-direction.

  • +
  • title="My Subplot Heading": Adds a title on top of the whole figure.

  • +
+

Notice that each subplot was set to use a linear projection "X?". +Usually, we need to specify the width and height of the map frame, but it is +also possible to use a question mark "?" to let GMT decide automatically +on what is the most appropriate width/height for each subplot’s map frame.

+
+

Tip

+

In the above example, we used the following commands to activate the +four subplots explicitly one after another:

+
fig.basemap(..., panel=[0, 0])
+fig.basemap(..., panel=[0, 1])
+fig.basemap(..., panel=[1, 0])
+fig.basemap(..., panel=[1, 1])
+
+
+

In fact, we can just use fig.basemap(..., panel=True) without +specifying any subplot index number, and GMT will automatically activate +the next subplot panel.

+
+
+

Note

+

All plotting methods (e.g. pygmt.Figure.coast, +pygmt.Figure.text, etc) are able to use panel parameter when +in subplot mode. Once a panel is activated using panel or +pygmt.Figure.set_panel, subsequent plotting commands that don’t +set a panel will have their elements added to the same panel as +before.

+
+
+
+

Shared x- and y-axes

+

In the example above with the four subplots, the two subplots for each row +have the same y-axis range, and the two subplots for each column have the +same x-axis range. You can use the sharex/sharey parameters to set a +common x- and/or y-axis between subplots.

+
fig = pygmt.Figure()
+with fig.subplot(
+    nrows=2,
+    ncols=2,
+    figsize=("15c", "6c"),  # width of 15 cm, height of 6 cm
+    autolabel=True,
+    margins=["0.3c", "0.2c"],  # horizontal 0.3 cm and vertical 0.2 cm margins
+    title="My Subplot Heading",
+    sharex="b",  # shared x-axis on the bottom side
+    sharey="l",  # shared y-axis on the left side
+    frame="WSrt",
+):
+    fig.basemap(region=[0, 10, 0, 10], projection="X?", panel=True)
+    fig.basemap(region=[0, 20, 0, 10], projection="X?", panel=True)
+    fig.basemap(region=[0, 10, 0, 20], projection="X?", panel=True)
+    fig.basemap(region=[0, 20, 0, 20], projection="X?", panel=True)
+fig.show()
+
+
+subplots

sharex="b" indicates that subplots in a column will share the x-axis, and +only the bottom axis is displayed. sharey="l" indicates that +subplots within a row will share the y-axis, and only the left axis is +displayed.

+

Of course, instead of using the sharex/sharey parameters, you can +also set a different frame for each subplot to control the axis +properties individually for each subplot.

+
+
+

Advanced subplot layouts

+

Nested subplots are currently not supported. If you want to create more +complex subplot layouts, some manual adjustments are needed.

+

The following example draws three subplots in a 2-row, 2-column layout, with +the first subplot occupying the first row.

+
fig = pygmt.Figure()
+# Bottom row, two subplots
+with fig.subplot(nrows=1, ncols=2, figsize=("15c", "3c"), autolabel="b)"):
+    fig.basemap(
+        region=[0, 5, 0, 5], projection="X?", frame=["af", "WSne"], panel=[0, 0]
+    )
+    fig.basemap(
+        region=[0, 5, 0, 5], projection="X?", frame=["af", "WSne"], panel=[0, 1]
+    )
+# Move plot origin by 1 cm above the height of the entire figure
+fig.shift_origin(yshift="h+1c")
+# Top row, one subplot
+with fig.subplot(nrows=1, ncols=1, figsize=("15c", "3c"), autolabel="a)"):
+    fig.basemap(
+        region=[0, 10, 0, 10], projection="X?", frame=["af", "WSne"], panel=[0, 0]
+    )
+    fig.text(text="TEXT", x=5, y=5)
+
+fig.show()
+
+
+subplots

We start by drawing the bottom two subplots, setting autolabel="b)" so +that the subplots are labelled ‘b)’ and ‘c)’. Next, we use +pygmt.Figure.shift_origin to move the plot origin 1 cm above the +height of the entire figure that is currently plotted (i.e. the bottom +row subplots). A single subplot is then plotted on the top row. You may need +to adjust the yshift parameter to make your plot look nice. This top row +uses autolabel="a)", and we also plotted some text inside. Note that +projection="X?" was used to let GMT automatically determine the size of +the subplot according to the size of the subplot area.

+

You can also manually override the autolabel for each subplot using for +example, fig.set_panel(..., fixedlabel="b) Panel 2") which would allow +you to manually label a single subplot as you wish. This can be useful for +adding a more descriptive subtitle to individual subplots.

+

Total running time of the script: (0 minutes 0.616 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/vectors.html b/v0.14.0/tutorials/advanced/vectors.html new file mode 100644 index 00000000000..c38595da8c1 --- /dev/null +++ b/v0.14.0/tutorials/advanced/vectors.html @@ -0,0 +1,689 @@ + + + + + + + + + Plotting vectors — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Plotting vectors

+

Plotting vectors is handled by pygmt.Figure.plot.

+
import numpy as np
+import pygmt
+
+
+
+

Plot Cartesian Vectors

+

Create a simple Cartesian vector using a start point through +x, y, and direction parameters. +On the shown figure, the plot is projected on a 10cm X 10cm region, +which is specified by the projection parameter. +The direction is specified +by a list of two 1-D arrays structured as [[angle_in_degrees], [length]]. +The angle is measured in degrees and moves counter-clockwise from the +horizontal. +The length of the vector uses centimeters by default but +could be changed using pygmt.config +(Check the next examples for unit changes).

+

Notice that the v in the style parameter stands for +vector; it distinguishes it from regular lines and allows for +different customization. 0c is used to specify the size +of the arrow head which explains why there is no arrow on either +side of the vector.

+
fig = pygmt.Figure()
+fig.plot(
+    region=[0, 10, 0, 10],
+    projection="X10c/10c",
+    frame="ag",
+    x=2,
+    y=8,
+    style="v0c",
+    direction=[[-45], [6]],
+)
+fig.show()
+
+
+vectors

In this example, we apply the same concept shown previously to plot multiple +vectors. Notice that instead of passing int/float to x and y, a list +of all x and y coordinates will be passed. Similarly, the length of direction +list will increase accordingly.

+

Additionally, we change the style of the vector to include a red +arrow head at the end (+e) of the vector and increase the +thickness (pen="2p") of the vector stem. A list of different +styling attributes can be found in +Vector heads and tails.

+
fig = pygmt.Figure()
+fig.plot(
+    region=[0, 10, 0, 10],
+    projection="X10c/10c",
+    frame="ag",
+    x=[2, 4],
+    y=[8, 1],
+    style="v0.6c+e",
+    direction=[[-45, 23], [6, 3]],
+    pen="2p",
+    fill="red3",
+)
+fig.show()
+
+
+vectors

The default unit of vector length is centimeters, +however, this can be changed to inches or points. Note that, in PyGMT, +one point is defined as 1/72 inch.

+

In this example, the graphed region is 5in X 5in, but +the length of the first vector is still graphed in centimeters. +Using pygmt.config(PROJ_LENGTH_UNIT="i"), the default unit +can be changed to inches in the second plotted vector.

+
fig = pygmt.Figure()
+# Vector 1 with default unit as cm
+fig.plot(
+    region=[0, 10, 0, 10],
+    projection="X5i/5i",
+    frame="ag",
+    x=2,
+    y=8,
+    style="v1c+e",
+    direction=[[0], [3]],
+    pen="2p",
+    fill="red3",
+)
+# Vector 2 after changing default unit to inches
+with pygmt.config(PROJ_LENGTH_UNIT="i"):
+    fig.plot(
+        x=2,
+        y=7,
+        direction=[[0], [3]],
+        style="v1c+e",
+        pen="2p",
+        fill="red3",
+    )
+fig.show()
+
+
+vectors

Vectors can also be plotted by including all the information +about a vector in a single list. However, this requires creating +a 2-D list or numpy array containing all vectors. +Each vector list contains the information structured as: +[x_start, y_start, direction_degrees, length].

+

If this approach is chosen, the data parameter must be +used instead of x, y, and direction.

+
# Create a list of lists that include each vector information
+vectors = [[2, 3, 45, 4]]
+
+fig = pygmt.Figure()
+fig.plot(
+    region=[0, 10, 0, 10],
+    projection="X10c/10c",
+    frame="ag",
+    data=vectors,
+    style="v0.6c+e",
+    pen="2p",
+    fill="red3",
+)
+fig.show()
+
+
+vectors

Using the functionality mentioned in the previous example, +multiple vectors can be plotted at the same time. Another +vector could be simply added to the 2-D list or numpy +array object and passed using data parameter.

+
# Vector specifications structured as:
+# [x_start, y_start, direction_degrees, length]
+vector_1 = [2, 3, 45, 4]
+vector_2 = [7.5, 8.3, -120.5, 7.2]
+# Create a list of lists that include each vector information
+vectors = [vector_1, vector_2]
+# Vectors structure: [[2, 3, 45, 4], [7.5, 8.3, -120.5, 7.2]]
+
+fig = pygmt.Figure()
+fig.plot(
+    region=[0, 10, 0, 10],
+    projection="X10c/10c",
+    frame="ag",
+    data=vectors,
+    style="v0.6c+e",
+    pen="2p",
+    fill="red3",
+)
+fig.show()
+
+
+vectors

In this example, Cartesian vectors are plotted over a Mercator +projection of the continental US. The x values represent the +longitude and y values represent the latitude where the vector starts.

+

This example also shows some of the styles a vector supports. +The beginning point of the vector (+b) +should take the shape of a circle (c). Similarly, the end +point of the vector (+e) should have an arrow shape (a) +(to draw a plain arrow, use A instead). Lastly, the +a +specifies the angle of the vector head apex (30 degrees in +this example).

+
# Create a plot with coast, Mercator projection (M) over the continental US
+fig = pygmt.Figure()
+fig.coast(
+    region=[-127, -64, 24, 53],
+    projection="M10c",
+    frame="ag",
+    borders=1,
+    shorelines="0.25p,black",
+    area_thresh=4000,
+    land="grey",
+    water="lightblue",
+)
+
+# Plot a vector using the x, y, direction parameters
+style = "v0.4c+bc+ea+a30"
+fig.plot(
+    x=-110,
+    y=40,
+    style=style,
+    direction=[[-25], [3]],
+    pen="1p",
+    fill="red3",
+)
+
+# vector specifications structured as:
+# [x_start, y_start, direction_degrees, length]
+vector_2 = [-82, 40.5, 138, 2.5]
+vector_3 = [-71.2, 45, -115.7, 4]
+# Create a list of lists that include each vector information
+vectors = [vector_2, vector_3]
+
+# Plot vectors using the data parameter.
+fig.plot(
+    data=vectors,
+    style=style,
+    pen="1p",
+    fill="yellow",
+)
+fig.show()
+
+
+vectors

Another example of plotting Cartesian vectors over a coast plot. This time a +Transverse Mercator projection is used. Additionally, numpy.linspace +is used to create 5 vectors with equal stops.

+
x = np.linspace(36, 42, 5)  # x values = [36.  37.5 39.  40.5 42. ]
+y = np.linspace(39, 39, 5)  # y values = [39. 39. 39. 39.]
+direction = np.linspace(-90, -90, 5)  # direction values = [-90. -90. -90. -90.]
+length = np.linspace(1.5, 1.5, 5)  # length values = [1.5 1.5 1.5 1.5]
+
+# Create a plot with coast,
+# Transverse Mercator projection (T) over Turkey and Syria
+fig = pygmt.Figure()
+fig.coast(
+    region=[20, 50, 30, 45],
+    projection="T35/10c",
+    frame=True,
+    borders=1,
+    shorelines="0.25p,black",
+    area_thresh=4000,
+    land="lightbrown",
+    water="lightblue",
+)
+
+fig.plot(
+    x=x,
+    y=y,
+    style="v0.4c+ea+bc",
+    direction=[direction, length],
+    pen="0.6p",
+    fill="red3",
+)
+
+fig.show()
+
+
+vectors
+
+

Plot Circular Vectors

+

When plotting circular vectors, all of the information for a single vector is +to be stored in a list. Each circular vector list is structured as: +[x_start, y_start, radius, degree_start, degree_stop]. The first two +values in the vector list represent the origin of the circle that will be +plotted. The next value is the radius which is represented on the plot in cm.

+

The last two values in the vector list represent the degree at which the plot +will start and stop. These values are measured counter-clockwise from the +horizontal axis. In this example, the result shown is the left half of a +circle as the plot starts at 90 degrees and goes until 270. Notice that the +m in the style parameter stands for circular vectors.

+
fig = pygmt.Figure()
+
+circular_vector_1 = [0, 0, 2, 90, 270]
+data = [circular_vector_1]
+fig.plot(
+    region=[-5, 5, -5, 5],
+    projection="X10c",
+    frame="ag",
+    data=data,
+    style="m0.5c+ea",
+    pen="2p",
+    fill="red3",
+)
+
+# Another example using np.array()
+circular_vector_2 = [0, 0, 4, -90, 90]
+data = np.array([circular_vector_2])
+
+fig.plot(
+    data=data,
+    style="m0.5c+ea",
+    pen="2p",
+    fill="red3",
+)
+fig.show()
+
+
+vectors

When plotting multiple circular vectors, a two dimensional array or numpy +array object should be passed as the data parameter. In this example, +numpy.column_stack is used to generate this two dimensional array. +Other numpy objects are used to generate linear values for the radius +parameter and random values for the degree_stop parameter discussed in +the previous example. This is the reason in which each vector has a different +appearance on the projection.

+
vector_num = 5
+radius = 3 - (0.5 * np.arange(0, vector_num))
+startdir = np.full(vector_num, 90)
+stopdir = 180 + (50 * np.arange(0, vector_num))
+data = np.column_stack(
+    [np.full(vector_num, 0), np.full(vector_num, 0), radius, startdir, stopdir]
+)
+
+fig = pygmt.Figure()
+fig.plot(
+    region=[-5, 5, -5, 5],
+    projection="X10c",
+    frame="ag",
+    data=data,
+    style="m0.5c+ea",
+    pen="2p",
+    fill="red3",
+)
+fig.show()
+
+
+vectors

Much like when plotting Cartesian vectors, the default unit used is +centimeters. When this is changed to inches, the size of the plot appears +larger when the projection units do not change. Below is an example of two +circular vectors. One is plotted using the default unit, and the second is +plotted using inches. Despite using the same list to plot the vectors, a +different measurement unit causes one to be larger than the other.

+
circular_vector = [6, 5, 1, 90, 270]
+
+fig = pygmt.Figure()
+fig.plot(
+    region=[0, 10, 0, 10],
+    projection="X10c",
+    frame="ag",
+    data=[circular_vector],
+    style="m0.5c+ea",
+    pen="2p",
+    fill="red3",
+)
+
+with pygmt.config(PROJ_LENGTH_UNIT="i"):
+    fig.plot(
+        data=[circular_vector],
+        style="m0.5c+ea",
+        pen="2p",
+        fill="red3",
+    )
+fig.show()
+
+
+vectors
+
+

Plot Geographic Vectors

+

On this map, +point_1 and point_2 are coordinate pairs used to set the +start and end points of the geographic vector. +The geographical vector is going from Idaho to +Chicago. To style geographic +vectors, use = at the beginning of the style parameter. +Other styling features such as vector stem thickness and head color +can be passed into the pen and fill parameters.

+

Note that the +s is added to use a start point and an end point +to represent the vector instead of input angle and length.

+
point_1 = [-114.7420, 44.0682]
+point_2 = [-87.6298, 41.8781]
+data = np.array([point_1 + point_2])
+
+fig = pygmt.Figure()
+fig.coast(
+    region=[-127, -64, 24, 53],
+    projection="M10c",
+    frame=True,
+    borders=1,
+    shorelines="0.25p,black",
+    area_thresh=4000,
+)
+fig.plot(
+    data=data,
+    style="=0.5c+ea+s",
+    pen="2p",
+    fill="red3",
+)
+fig.show()
+
+
+vectors

Using the same technique shown in the previous example, +multiple vectors can be plotted in a chain where the end point +of one is the start point of another. This can be done +by adding the coordinate lists together to create this structure: +[[start_latitude, start_longitude, end_latitude, end_longitude]]. +Each list within the 2-D list contains the start and end information +for each vector.

+
# Coordinate pairs for all the locations used
+ME = [-69.4455, 45.2538]
+CHI = [-87.6298, 41.8781]
+SEA = [-122.3321, 47.6062]
+NO = [-90.0715, 29.9511]
+KC = [-94.5786, 39.0997]
+CA = [-119.4179, 36.7783]
+
+# Add array to piece together the vectors
+data = [ME + CHI, CHI + SEA, SEA + KC, KC + NO, NO + CA]
+
+fig = pygmt.Figure()
+fig.coast(
+    region=[-127, -64, 24, 53],
+    projection="M10c",
+    frame=True,
+    borders=1,
+    shorelines="0.25p,black",
+    area_thresh=4000,
+)
+fig.plot(
+    data=data,
+    style="=0.5c+ea+s",
+    pen="2p",
+    fill="red3",
+)
+fig.show()
+
+
+vectors

This example plots vectors over a Mercator projection. The start points +are located at SA which is South Africa and going to four different +locations.

+
SA = [22.9375, -30.5595]
+EUR = [15.2551, 54.5260]
+ME = [-69.4455, 45.2538]
+AS = [100.6197, 34.0479]
+NM = [-105.8701, 34.5199]
+data = np.array([SA + EUR, SA + ME, SA + AS, SA + NM])
+
+fig = pygmt.Figure()
+fig.coast(
+    region=[-180, 180, -80, 80],
+    projection="M0/0/12c",
+    frame="afg",
+    land="lightbrown",
+    water="lightblue",
+)
+fig.plot(
+    data=data,
+    style="=0.5c+ea+s",
+    pen="2p",
+    fill="red3",
+)
+fig.show()
+
+
+vectors

Total running time of the script: (0 minutes 2.503 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/advanced/working_with_panel.html b/v0.14.0/tutorials/advanced/working_with_panel.html new file mode 100644 index 00000000000..26e3b8abfae --- /dev/null +++ b/v0.14.0/tutorials/advanced/working_with_panel.html @@ -0,0 +1,411 @@ + + + + + + + + + Interactive data visualization using Panel — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Interactive data visualization using Panel

+
+

Note

+

Please run the following code examples in a notebook environment +otherwise the interactive parts of this tutorial will not work. You can +use the button “Download Jupyter notebook” at the bottom of this page +to download this script as a Jupyter notebook.

+
+

The library Panel can be used to +create interactive dashboards by connecting user-defined widgets to plots. +Panel can be used as an extension to Jupyter notebook/lab.

+

This tutorial is split into three parts:

+
    +
  • Make a static map

  • +
  • Make an interactive map

  • +
  • Add a grid for Earth relief

  • +
+

Import the required packages

+
import numpy as np
+import panel as pn
+import pygmt
+
+pn.extension()
+
+
+
+

Make a static map

+

The Orthographic projection +can be used to show the Earth as a globe. Land and water masses are +filled with colors via the land and water parameters of +pygmt.Figure.coast, respectively. Coastlines are added using the +shorelines parameter.

+
# Create a new instance or object of the pygmt.Figure() class
+fig = pygmt.Figure()
+fig.coast(
+    # Orthographic projection (G) with projection center at 0° East and
+    # 15° North and a width of 12 centimeters
+    projection="G0/15/12c",
+    region="g",  # global
+    frame="g30",  # Add frame and gridlines in steps of 30 degrees on top
+    land="gray",  # Color land masses in "gray"
+    water="lightblue",  # Color water masses in "lightblue"
+    # Add coastlines with a 0.25 points thick pen in "gray50"
+    shorelines="1/0.25p,gray50",
+)
+fig.show()
+
+
+working with panel
+
+

Make an interactive map

+

To generate a rotation of the Earth around the vertical axis, the central +longitude of the Orthographic projection is varied iteratively in steps of +10 degrees. The library Panel is used to create an interactive dashboard +with a slider (works only in a notebook environment, e.g., Jupyter notebook).

+
# Create a slider
+slider_lon = pn.widgets.DiscreteSlider(
+    name="Central longitude",  # Give name for quantity shown at the slider
+    options=list(np.arange(0, 361, 10)),  # Range corresponding to longitude
+    value=0,  # Set start value
+)
+
+
+@pn.depends(central_lon=slider_lon)
+def view(central_lon):
+    """
+    Define a function for plotting the single slices.
+    """
+    # Create a new instance or object of the pygmt.Figure() class
+    fig = pygmt.Figure()
+    fig.coast(
+        # Vary the central longitude used for the Orthographic projection
+        projection=f"G{central_lon}/15/12c",
+        region="g",
+        frame="g30",
+        land="gray",
+        water="lightblue",
+        shorelines="1/0.25p,gray50",
+    )
+    return fig
+
+
+# Make an interactive dashboard
+pn.Column(slider_lon, view)
+
+
+
Column
+    [0] DiscreteSlider(formatter='%d', name='Central longitude', options=[np.int64(0), ...], value=0)
+    [1] ParamFunction(function, _pane=PNG, defer_load=False)
+
+
+
+
+

Add a grid for Earth relief

+

Instead of using colors as fill for the land and water masses a grid can be +displayed. Here, the Earth relief is shown by color-coding the elevation.

+
# Download a grid for Earth relief with a resolution of 10 arc-minutes
+grd_relief = pygmt.datasets.load_earth_relief(resolution="10m")
+
+# Create a slider
+slider_lon = pn.widgets.DiscreteSlider(
+    name="Central longitude",
+    options=list(np.arange(0, 361, 10)),
+    value=0,
+)
+
+
+@pn.depends(central_lon=slider_lon)
+def view(central_lon):
+    """
+    Define a function for plotting the single slices.
+    """
+    # Create a new instance or object of the pygmt.Figure() class
+    fig = pygmt.Figure()
+    # Set up a colormap for the elevation in meters
+    pygmt.makecpt(
+        cmap="oleron",
+        # minimum, maximum, step
+        series=[int(grd_relief.data.min()) - 1, int(grd_relief.data.max()) + 1, 100],
+    )
+    # Plot the grid for the elevation
+    fig.grdimage(
+        projection=f"G{central_lon}/15/12c",
+        region="g",
+        grid=grd_relief,  # Use grid downloaded above
+        cmap=True,  # Use colormap defined above
+        frame="g30",
+    )
+    # Add a horizontal colorbar for the elevation
+    # with annotations (a) in steps of 2000 and ticks (f) in steps of 1000
+    # and labels (+l) at the x-axis "Elevation" and y-axis "m" (meters)
+    fig.colorbar(frame=["a2000f1000", "x+lElevation", "y+lm"])
+    return fig
+
+
+# Make an interactive dashboard
+pn.Column(slider_lon, view)
+
+
+
Column
+    [0] DiscreteSlider(formatter='%d', name='Central longitude', options=[np.int64(0), ...], value=0)
+    [1] ParamFunction(function, _pane=PNG, defer_load=False)
+
+
+

Total running time of the script: (0 minutes 1.682 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/basics/coastlines.html b/v0.14.0/tutorials/basics/coastlines.html new file mode 100644 index 00000000000..73ae7185b8e --- /dev/null +++ b/v0.14.0/tutorials/basics/coastlines.html @@ -0,0 +1,331 @@ + + + + + + + + + Coastlines and borders — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Coastlines and borders

+

Plotting coastlines and borders is handled by pygmt.Figure.coast.

+
import pygmt
+
+
+
+

Shorelines

+

Use the shorelines parameter to plot only the shorelines:

+
fig = pygmt.Figure()
+fig.basemap(region="g", projection="W15c", frame=True)
+fig.coast(shorelines=True)
+fig.show()
+
+
+coastlines

The shorelines are divided in 4 levels:

+
    +
  1. coastline

  2. +
  3. lakeshore

  4. +
  5. island-in-lake shore

  6. +
  7. lake-in-island-in-lake shore

  8. +
+

You can specify which level you want to plot by passing the level number and +a GMT pen configuration. For example, to plot just the coastlines with 0.5p +thickness and black lines:

+
fig = pygmt.Figure()
+fig.basemap(region="g", projection="W15c", frame=True)
+fig.coast(shorelines="1/0.5p,black")
+fig.show()
+
+
+coastlines

You can specify multiple levels (with their own pens) by passing a list to +shorelines:

+
fig = pygmt.Figure()
+fig.basemap(region="g", projection="W15c", frame=True)
+fig.coast(shorelines=["1/1p,black", "2/0.5p,red"])
+fig.show()
+
+
+coastlines
+
+

Resolutions

+

The coastline database comes with 5 resolutions. The resolution drops by 80% +between levels:

+
    +
  1. "c": crude

  2. +
  3. "l": low (default)

  4. +
  5. "i": intermediate

  6. +
  7. "h": high

  8. +
  9. "f": full

  10. +
+
oahu = [-158.3, -157.6, 21.2, 21.8]
+fig = pygmt.Figure()
+for res in ["c", "l", "i", "h", "f"]:
+    fig.coast(resolution=res, shorelines="1p", region=oahu, projection="M5c")
+    fig.shift_origin(xshift="5c")
+fig.show()
+
+
+coastlines
+
+

Land and water

+

Use the land and water parameters to specify a fill color for land +and water bodies. The colors can be given by name or hex codes (like the ones +used in HTML and CSS):

+
fig = pygmt.Figure()
+fig.basemap(region="g", projection="W15c", frame=True)
+fig.coast(land="#666666", water="skyblue")
+fig.show()
+
+
+coastlines

Total running time of the script: (0 minutes 1.101 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/basics/frames.html b/v0.14.0/tutorials/basics/frames.html new file mode 100644 index 00000000000..9a22b89d894 --- /dev/null +++ b/v0.14.0/tutorials/basics/frames.html @@ -0,0 +1,359 @@ + + + + + + + + + Frames, ticks, titles, and labels — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Frames, ticks, titles, and labels

+

Setting frame, ticks, title, etc., of the plot is handled by the frame +parameter that most plotting methods of the pygmt.Figure class +contain.

+
import pygmt
+
+
+
+

Plot frame

+

By default, PyGMT does not add a frame to your plot. For example, we can plot +the coastlines of the world with a Mercator projection:

+
fig = pygmt.Figure()
+fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c")
+fig.show()
+
+
+frames

To add the default GMT frame style to the plot, use frame="f" in +pygmt.Figure.basemap or another plotting method (which has the +frame parameter, with the exception of pygmt.Figure.colorbar):

+
fig = pygmt.Figure()
+fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c")
+fig.basemap(frame="f")
+fig.show()
+
+
+frames
+
+

Ticks and grid lines

+

The automatic frame (frame=True or frame="af") adds the default GMT +frame style and automatically determines tick labels from the plot region. +In GMT the tick labels are called annotations.

+
fig = pygmt.Figure()
+fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c")
+fig.basemap(frame="af")
+fig.show()
+
+
+frames

Add automatic grid lines to the plot by passing g through the frame +parameter:

+
fig = pygmt.Figure()
+fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c")
+fig.basemap(frame="ag")
+fig.show()
+
+
+frames

To adjust the step widths of annotations, frame, and grid lines we can +add the desired step widths after a, f, or g. In the example +below, the step widths are set to 30°, 7.5°, and 15°, respectively.

+
fig = pygmt.Figure()
+fig.coast(shorelines="1/0.5p", region=[-180, 180, -60, 60], projection="M25c")
+fig.basemap(frame="a30f7.5g15")
+fig.show()
+
+
+frames
+
+

Title

+

The figure title can be set by passing +ttitle to the frame +parameter of pygmt.Figure.basemap. Passing multiple arguments to +frame can be done by using a list, as shown in the example below.

+
fig = pygmt.Figure()
+# region="TT" specifies Trinidad and Tobago using the ISO country code
+fig.coast(shorelines="1/0.5p", region="TT", projection="M25c")
+fig.basemap(frame=["a", "+tTrinidad and Tobago"])
+fig.show()
+
+
+frames
+
+

Axis labels

+

Axis labels, in GMT simply called labels, can be set by passing +x+llabel (or starting with y if +labeling the y-axis) to the frame parameter of +pygmt.Figure.basemap. The map boundaries (or plot axes) are named as +West/west/left (W, w, l), South/south/bottom +(S, s, b), North/north/top (N, n, t), and +East/east/right (E, e, r) sides of a figure. If an upper-case +letter (W, S, N, E) is passed, the axis is plotted with +tick marks and annotations. The lower-case version +(w, s, n, e) plots the axis only with tick marks. +To only plot the axis pass l, b, t, r. By default +(frame=True or frame="af"), the West and the South axes are +plotted with both tick marks and annotations.

+

The example below uses a Cartesian projection, as GMT does not allow +labels to be set for geographic maps.

+
fig = pygmt.Figure()
+fig.basemap(
+    region=[0, 10, 0, 20],
+    projection="X10c/8c",
+    # Plot axis with tick marks, annotations, and labels on the
+    # West and South axes
+    # Plot axis with tick marks on the north and east axes
+    frame=["WSne", "xaf+lx-axis", "yaf+ly-axis"],
+)
+fig.show()
+
+
+frames

Total running time of the script: (0 minutes 1.872 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/basics/lines.html b/v0.14.0/tutorials/basics/lines.html new file mode 100644 index 00000000000..8602c0f468d --- /dev/null +++ b/v0.14.0/tutorials/basics/lines.html @@ -0,0 +1,349 @@ + + + + + + + + + Plotting lines — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Plotting lines

+

Plotting lines is handled by the pygmt.Figure.plot method.

+
import pygmt
+
+
+
+

Plot lines

+

Create a Cartesian figure using the pygmt.Figure.basemap method. Pass lists +containing two values to the x and y parameters of the +pygmt.Figure.plot method. By default, a 0.25-points thick, black, solid +line is drawn between these two data points.

+
fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True)
+
+fig.plot(x=[1, 5], y=[5, 9])
+
+fig.show()
+
+
+lines

Additional line segments can be added by including more data points in the lists +passed to x and y.

+
fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True)
+
+fig.plot(x=[1, 5, 8], y=[5, 9, 4])
+
+fig.show()
+
+
+lines

To plot multiple lines, pygmt.Figure.plot needs to be used for each line +separately.

+
fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True)
+
+fig.plot(x=[1, 5, 8], y=[5, 9, 4])
+fig.plot(x=[2, 4, 9], y=[3, 7, 5])
+
+fig.show()
+
+
+lines
+
+

Change line attributes

+

The line attributes can be set by the pen parameter which takes a string +argument with the optional values width,color,style.

+
fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True)
+
+# Set the pen width to "5p" (5 points), and use the default color "black" and the
+# default style "solid"
+fig.plot(x=[1, 8], y=[3, 9], pen="5p")
+
+fig.show()
+
+
+lines

The line color can be set and is added after the line width to the pen +parameter.

+
fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True)
+
+# Set the line color to "red", use the default style "solid"
+fig.plot(x=[1, 8], y=[3, 9], pen="5p,red")
+
+fig.show()
+
+
+lines

The line style can be set and is added after the line width or color to the +pen parameter.

+
fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True)
+
+# Set the line style to "..-" (dot dot dash), use the default color "black"
+fig.plot(x=[1, 8], y=[3, 9], pen="5p,..-")
+
+fig.show()
+
+
+lines

The line width, color, and style can all be set in the same pen parameter. +For a gallery example showing other pen settings, see +Line styles.

+
fig = pygmt.Figure()
+fig.basemap(region=[0, 10, 0, 10], projection="X15c/10c", frame=True)
+
+# Draw a 7-points thick, green line with style "-.-" (dash dot dash)
+fig.plot(x=[1, 8], y=[3, 9], pen="7p,green,-.-")
+
+fig.show()
+
+
+lines

Total running time of the script: (0 minutes 0.948 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/basics/plot.html b/v0.14.0/tutorials/basics/plot.html new file mode 100644 index 00000000000..fdcf4c5bea9 --- /dev/null +++ b/v0.14.0/tutorials/basics/plot.html @@ -0,0 +1,347 @@ + + + + + + + + + Plotting data points — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Plotting data points

+

GMT shines when it comes to plotting data on a map. We can use some sample data +that is packaged with GMT to try this out. PyGMT provides access to these +datasets through the pygmt.datasets package. If you don’t have the data +files already, they are automatically downloaded and saved to a cache directory +the first time you use them (usually ~/.gmt/cache).

+
import pygmt
+
+
+

For example, let’s load the sample dataset of tsunami generating earthquakes +around Japan using pygmt.datasets.load_sample_data. +The data are loaded as a pandas.DataFrame.

+
data = pygmt.datasets.load_sample_data(name="japan_quakes")
+
+# Set the region for the plot to be slightly larger than the data bounds.
+region = [
+    data.longitude.min() - 1,
+    data.longitude.max() + 1,
+    data.latitude.min() - 1,
+    data.latitude.max() + 1,
+]
+
+print(region)
+print(data.head())
+
+
+
[np.float64(131.29), np.float64(150.89), np.float64(34.02), np.float64(50.77)]
+   year  month  day  latitude  longitude  depth_km  magnitude
+0  1987      1    4     49.77     149.29       489        4.1
+1  1987      1    9     39.90     141.68        67        6.8
+2  1987      1    9     39.82     141.64        84        4.0
+3  1987      1   14     42.56     142.85       102        6.5
+4  1987      1   16     42.79     145.10        54        5.1
+
+
+

We’ll use the pygmt.Figure.plot method to plot circles on the +earthquake epicenters.

+
fig = pygmt.Figure()
+fig.basemap(region=region, projection="M15c", frame=True)
+fig.coast(land="black", water="skyblue")
+fig.plot(x=data.longitude, y=data.latitude, style="c0.3c", fill="white", pen="black")
+fig.show()
+
+
+plot

We used the style c0.3c which means “circles with a diameter of 0.3 +centimeters”. The pen parameter controls the outline of the symbols and +the fill parameter controls the fill.

+

We can map the size of the circles to the earthquake magnitude by passing an +array to the size parameter. Because the magnitude is on a logarithmic +scale, it helps to show the differences by scaling the values using a power +law.

+
fig = pygmt.Figure()
+fig.basemap(region=region, projection="M15c", frame=True)
+fig.coast(land="black", water="skyblue")
+fig.plot(
+    x=data.longitude,
+    y=data.latitude,
+    size=0.02 * (2**data.magnitude),
+    style="cc",
+    fill="white",
+    pen="black",
+)
+fig.show()
+
+
+plot

Notice that we didn’t include the size in the style parameter this time, +just the symbol c (circles) and the unit c (centimeters). So in +this case, the size will be interpreted as being in centimeters.

+

We can also map the colors of the markers to the depths by passing an array +to the fill parameter and providing a colormap name (cmap). We can +even use the new matplotlib colormap “viridis”. Here, we first create a +continuous colormap ranging from the minimum depth to the maximum depth of +the earthquakes using pygmt.makecpt, then set cmap=True in +pygmt.Figure.plot to use the colormap. At the end of the plot, we +also plot a colorbar showing the colormap used in the plot.

+
fig = pygmt.Figure()
+fig.basemap(region=region, projection="M15c", frame=True)
+fig.coast(land="black", water="skyblue")
+pygmt.makecpt(cmap="viridis", series=[data.depth_km.min(), data.depth_km.max()])
+fig.plot(
+    x=data.longitude,
+    y=data.latitude,
+    size=0.02 * 2**data.magnitude,
+    fill=data.depth_km,
+    cmap=True,
+    style="cc",
+    pen="black",
+)
+fig.colorbar(frame="xaf+lDepth (km)")
+fig.show()
+
+
+plot

Total running time of the script: (0 minutes 0.752 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/basics/polygons.html b/v0.14.0/tutorials/basics/polygons.html new file mode 100644 index 00000000000..92a1eefb55e --- /dev/null +++ b/v0.14.0/tutorials/basics/polygons.html @@ -0,0 +1,344 @@ + + + + + + + + + Plotting polygons — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Plotting polygons

+

Plotting polygons is handled by the pygmt.Figure.plot method.

+

This tutorial focuses on input data given as NumPy arrays. Besides NumPy arrays, +array-like objects are supported. Here, a polygon is a closed shape defined by a series +of data points with x and y coordinates, connected by line segments, with the start and +end points being identical. For plotting a geopandas.GeoDataFrame object with +polygon geometries, e.g., to create a choropleth map, see the gallery example +Choropleth map.

+
import numpy as np
+import pygmt
+
+
+
+

Plot polygons

+

Set up sample data points as NumPy arrays for the x and y values.

+
x = np.array([-2, 1, 3, 0, -4, -2])
+y = np.array([-3, -1, 1, 3, 2, -3])
+
+
+

Create a Cartesian plot via the pygmt.Figure.basemap method. Pass arrays to +the x and y parameters of the pygmt.Figure.plot method. Without +further adjustments, lines are drawn between the data points. By default, the lines +are 0.25-points thick, black, and solid. In this example, the data points are chosen +to make the lines form a polygon.

+
fig = pygmt.Figure()
+fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True)
+fig.plot(x=x, y=y)
+fig.show()
+
+
+polygons

The pen parameter can be used to adjust the lines or outline of the polygon. The +argument passed to pen is one string with the comma-separated optional values +width,color,style.

+
fig = pygmt.Figure()
+fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True)
+# Use a 2-points thick, darkred, dashed outline
+fig.plot(x=x, y=y, pen="2p,darkred,dashed")
+fig.show()
+
+
+polygons

Use the fill parameter to fill the polygon with a color or +pattern. Note, that there are no lines drawn between the +data points by default if fill is used. Use the pen parameter to add an +outline around the polygon.

+
fig = pygmt.Figure()
+fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True)
+# Fill the polygon with color "orange"
+fig.plot(x=x, y=y, fill="orange")
+fig.show()
+
+
+polygons
+
+

Close polygons

+

Set up sample data points as NumPy arrays for the x and y values. Now, the data points +do not form a polygon.

+
x = np.array([-2, 1, 3, 0, -4])
+y = np.array([-3, -1, 1, 3, 2])
+
+
+

The close parameter can be used to force the polygon to be closed.

+
fig = pygmt.Figure()
+fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True)
+fig.plot(x=x, y=y, pen=True)
+
+fig.shift_origin(xshift="w+1c")
+
+fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True)
+fig.plot(x=x, y=y, pen=True, close=True)
+fig.show()
+
+
+polygons

When using the fill parameter, the polygon is automatically closed.

+
fig = pygmt.Figure()
+fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True)
+fig.plot(x=x, y=y, pen=True)
+
+fig.shift_origin(xshift="w+1c")
+
+fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True)
+fig.plot(x=x, y=y, pen=True, fill="orange")
+fig.show()
+
+
+polygons

Total running time of the script: (0 minutes 0.589 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/basics/regions.html b/v0.14.0/tutorials/basics/regions.html new file mode 100644 index 00000000000..8c124c90850 --- /dev/null +++ b/v0.14.0/tutorials/basics/regions.html @@ -0,0 +1,479 @@ + + + + + + + + + Setting the region — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Setting the region

+

Many of the plotting methods take the region parameter, which sets the +area that will be shown in the figure. This tutorial covers the different types +of inputs that it can accept.

+
import pygmt
+
+
+
+

Coordinates

+

A string of coordinates can be passed to region, in the form of +xmin/xmax/ymin/ymax.

+
fig = pygmt.Figure()
+fig.coast(
+    # Set the x-range from 10E to 20E and the y-range to 35N to 45N
+    region="10/20/35/45",
+    # Set projection to Mercator, and the figure size to 15 centimeters
+    projection="M15c",
+    # Set the color of the land to light gray
+    land="lightgray",
+    # Set the color of the water to white
+    water="white",
+    # Display the national borders and set the pen thickness to 0.5p
+    borders="1/0.5p",
+    # Display the shorelines and set the pen thickness to 0.5p
+    shorelines="1/0.5p",
+    # Set the frame to display annotations and gridlines
+    frame="ag",
+)
+fig.show()
+
+
+regions

The coordinates can be passed to region as a list, in the form of +[xmin, xmax, ymin, ymax].

+
fig = pygmt.Figure()
+fig.coast(
+    # Set the x-range from 10E to 20E and the y-range to 35N to 45N
+    region=[10, 20, 35, 45],
+    projection="M12c",
+    land="lightgray",
+    water="white",
+    borders="1/0.5p",
+    shorelines="1/0.5p",
+    frame="ag",
+)
+fig.show()
+
+
+regions

Instead of passing axes minima and maxima, the coordinates can be passed for +the bottom-left and top-right corners. The string format takes the +coordinates for the bottom-left and top-right coordinates. To specify corner +coordinates, append +r at the end of the region string.

+
fig = pygmt.Figure()
+fig.coast(
+    # Set the bottom-left corner as 10E, 35N and the top-right corner as
+    # 20E, 45N
+    region="10/35/20/45+r",
+    projection="M12c",
+    land="lightgray",
+    water="white",
+    borders="1/0.5p",
+    shorelines="1/0.5p",
+    frame="ag",
+)
+fig.show()
+
+
+regions
+
+

Global regions

+

In addition to passing coordinates, the argument d can be passed to set +the region to the entire globe. The range is 180W to 180E (-180, 180) and 90S +to 90N (-90 to 90). With no parameters set for the projection, the figure +defaults to be centered at the mid-point of both x- and y-axes. Using +d, the figure is centered at (0, 0), or the intersection of the equator +and prime meridian.

+
fig = pygmt.Figure()
+fig.coast(
+    region="d",
+    projection="Cyl_stere/12c",
+    land="darkgray",
+    water="white",
+    borders="1/0.5p",
+    shorelines="1/0.5p",
+    frame="ag",
+)
+fig.show()
+
+
+regions

The argument g can be passed, which encompasses the entire globe. The +range is 0E to 360E (0, 360) and 90S to 90N (-90 to 90). With no parameters +set for the projection, the figure is centered at (180, 0), or the +intersection of the equator and International Date Line.

+
fig = pygmt.Figure()
+fig.coast(
+    region="g",
+    projection="Cyl_stere/12c",
+    land="darkgray",
+    water="white",
+    borders="1/0.5p",
+    shorelines="1/0.5p",
+    frame="ag",
+)
+fig.show()
+
+
+regions
+
+

ISO code

+

The region can be set to include a specific area specified by the +two-character ISO 3166-1 alpha-2 convention +(for further information: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).

+
fig = pygmt.Figure()
+fig.coast(
+    # Set the figure region to encompass Japan with the ISO code "JP"
+    region="JP",
+    projection="M12c",
+    land="lightgray",
+    water="white",
+    borders="1/0.5p",
+    shorelines="1/0.5p",
+    frame="ag",
+)
+fig.show()
+
+
+regions

The area encompassed by the ISO code can be expanded by appending ++rincrement to the ISO code. The increment unit is in degrees, and +if only one value is added it expands the range of the region in all +directions. Using +r expands the final region boundaries to be multiples +of increment .

+
fig = pygmt.Figure()
+fig.coast(
+    # Expand the region boundaries to be multiples of 3 degrees in all
+    # directions
+    region="JP+r3",
+    projection="M12c",
+    land="lightgray",
+    water="white",
+    borders="1/0.5p",
+    shorelines="1/0.5p",
+    frame="ag",
+)
+fig.show()
+
+
+regions

Instead of expanding the range of the plot uniformly in all directions, two +values can be passed to expand differently on each axis. The format is +xinc/yinc.

+
fig = pygmt.Figure()
+fig.coast(
+    # Expand the region boundaries to be multiples of 3 degrees on the x-axis
+    # and 5 degrees on the y-axis.
+    region="JP+r3/5",
+    projection="M12c",
+    land="lightgray",
+    water="white",
+    borders="1/0.5p",
+    shorelines="1/0.5p",
+    frame="ag",
+)
+fig.show()
+
+
+regions

Instead of expanding the range of the plot uniformly in all directions, four +values can be passed to expand differently in each direction. +The format is winc/einc/sinc/ninc, which expands on the west, +east, south, and north axes.

+
fig = pygmt.Figure()
+fig.coast(
+    # Expand the region boundaries to be multiples of 3 degrees to the west, 5
+    # degrees to the east, 7 degrees to the south, and 9 degrees to the north.
+    region="JP+r3/5/7/9",
+    projection="M12c",
+    land="lightgray",
+    water="white",
+    borders="1/0.5p",
+    shorelines="1/0.5p",
+    frame="ag",
+)
+fig.show()
+
+
+regions

The region increment can be appended with +R, which adds the +increment without rounding.

+
fig = pygmt.Figure()
+fig.coast(
+    # Expand the region setting outside the range of Japan by 3 degrees in all
+    # directions, without rounding to the nearest increment.
+    region="JP+R3",
+    projection="M12c",
+    land="lightgray",
+    water="white",
+    borders="1/0.5p",
+    shorelines="1/0.5p",
+    frame="ag",
+)
+fig.show()
+
+
+regions

The region increment can be appended with +e, which is like +r +and expands the final region boundaries to be multiples of increment. +However, it ensures that the bounding box extends by at least 0.25 times the +increment.

+
fig = pygmt.Figure()
+fig.coast(
+    # Expand the region boundaries to be multiples of 3 degrees in all
+    # directions
+    region="JP+e3",
+    projection="M12c",
+    land="lightgray",
+    water="white",
+    borders="1/0.5p",
+    shorelines="1/0.5p",
+    frame="ag",
+)
+fig.show()
+
+
+regions

Total running time of the script: (0 minutes 3.423 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/basics/sg_execution_times.html b/v0.14.0/tutorials/basics/sg_execution_times.html new file mode 100644 index 00000000000..a082e46687f --- /dev/null +++ b/v0.14.0/tutorials/basics/sg_execution_times.html @@ -0,0 +1,268 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:09.930 total execution time for 7 files from tutorials/basics:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

Setting the region (regions.py)

00:03.423

0.0

Frames, ticks, titles, and labels (frames.py)

00:01.872

0.0

Plotting text (text.py)

00:01.245

0.0

Coastlines and borders (coastlines.py)

00:01.101

0.0

Plotting lines (lines.py)

00:00.948

0.0

Plotting data points (plot.py)

00:00.752

0.0

Plotting polygons (polygons.py)

00:00.589

0.0

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/basics/text.html b/v0.14.0/tutorials/basics/text.html new file mode 100644 index 00000000000..6b0d3096b0d --- /dev/null +++ b/v0.14.0/tutorials/basics/text.html @@ -0,0 +1,489 @@ + + + + + + + + + Plotting text — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ + +
+

Plotting text

+

It is often useful to add text annotations to a plot or map. This is handled by the +pygmt.Figure.text method of the pygmt.Figure class.

+
from pathlib import Path
+
+import pygmt
+
+
+
+

Adding a single text label

+

To add a single text label to a plot, use the text and x and y parameters +to specify the text and position.

+
fig = pygmt.Figure()
+fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True)
+fig.text(x=0, y=0, text="My text")
+fig.show()
+
+
+text
+
+

Adjusting the text label

+

There are several optional parameters to adjust the text label:

+
    +
  • font: Sets the size, family/weight, and color of the font for the text. +A list of all recognized fonts can be found at Supported Fonts. +For details of how to use non-default fonts, refer to +PostScript Fonts Used by GMT.

  • +
  • angle: Specifies the rotation of the text. It is measured counter-clockwise +from the horizontal in degrees.

  • +
  • justify: Defines the anchor point of the bounding box for the text. It is +specified by a two-letter (order independent) code, chosen from:

    +
      +
    • Vertical: T(op), M(iddle), B(ottom)

    • +
    • Horizontal: L(eft), C(entre), R(ight)

    • +
    +
  • +
  • offset: Shifts the text relatively to the reference point.

  • +
+
fig = pygmt.Figure()
+
+# -----------------------------------------------------------------------------
+# Left: "font", "angle", and "offset" parameters
+fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame="rtlb")
+
+# Change font size, family/weight, color of the text
+fig.text(x=0, y=3, text="my text", font="12p,Helvetica-Bold,blue")
+
+# Rotate the text by 30 degrees counter-clockwise from the horizontal
+fig.text(x=0, y=0, text="my text", angle=30)
+
+# Plot marker and text label for reference
+fig.plot(x=0, y=-3, style="s0.2c", fill="darkorange", pen="0.7p,darkgray")
+fig.text(x=0, y=-3, text="my text")
+# Shift the text label relatively to the position given via the x and y parameters
+# by 1 centimeter to the right (positive x direction) and 0.5 centimeters down
+# (negative y direction)
+fig.text(x=0, y=-3, text="my text", offset="1c/-0.5c")
+
+fig.shift_origin(xshift="w+0.5c")
+
+# -----------------------------------------------------------------------------
+# Right: "justify" parameter
+fig.basemap(region=[-1, 1, -1, 1], projection="X5c", frame="rtlb")
+
+# Plot markers for reference
+fig.plot(
+    x=[-0.5, 0, 0.5, -0.5, 0, 0.5, -0.5, 0, 0.5],
+    y=[0.5, 0.5, 0.5, 0, 0, 0, -0.5, -0.5, -0.5],
+    style="s0.2c",
+    fill="darkorange",
+    pen="0.7p,darkgray",
+)
+
+# Plot text labels at the x and y positions of the markers while varying the anchor
+# point via the justify parameter
+fig.text(x=-0.5, y=0.5, text="TL", justify="TL")  # TopLeft
+fig.text(x=0, y=0.5, text="TC", justify="TC")  # TopCenter
+fig.text(x=0.5, y=0.5, text="TR", justify="TR")  # TopRight
+fig.text(x=-0.5, y=0, text="ML", justify="ML")  # MiddleLeft
+fig.text(x=0, y=0, text="MC", justify="MC")  # MiddleCenter
+fig.text(x=0.5, y=0, text="MR", justify="MR")  # MiddleRight
+fig.text(x=-0.5, y=-0.5, text="BL", justify="BL")  # BottomLeft
+fig.text(x=0, y=-0.5, text="BC", justify="BC")  # BottomCenter
+fig.text(x=0.5, y=-0.5, text="BR", justify="BR")  # BottomRight
+
+fig.show()
+
+
+text
+
+

Adding a text box

+

There are different optional parameters to add and customize a text box:

+
    +
  • fill: Fills the text box with a color.

  • +
  • pen: Outlines the text box.

  • +
  • clearance: Adds margins in x and y directions between the text and the outline +of the text box. Can be used to get a text box with rounded edges.

  • +
+
fig = pygmt.Figure()
+
+fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame="rtlb")
+
+# Add a box with a fill in green color
+fig.text(x=0, y=3, text="My text", fill="green")
+
+# Add box with a seagreen, 1-point thick, solid outline
+fig.text(x=0, y=1, text="My text", pen="1p,seagreen,solid")
+
+# Add margins between the text and the outline of the text box of 0.1
+# centimeters in x direction and 0.2 centimeters in y direction
+fig.text(x=0, y=-1, text="My text", pen="1p,seagreen,dashed", clearance="0.1c/0.2c")
+
+# Get rounded edges by passing "+tO" to the "clearance" parameter
+fig.text(x=0, y=-3, text="My text", pen="1p,seagreen,solid", clearance="0.2c/0.2c+tO")
+
+fig.show()
+
+
+text
+
+

Adding multiple text labels with individual configurations

+

To add multiple text labels with individual font, angle, and justify, +one can provide lists with the corresponding arguments.

+
fig = pygmt.Figure()
+fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True)
+
+fig.text(
+    x=[0, 0, 0],
+    y=[3, 2, -2],
+    font=["5p,Helvetica,black", "5p,Helvetica,blue", "6p,Courier-Bold,red"],
+    angle=[0, 0, 30],
+    justify=["CM", "LT", "CM"],
+    text=[
+        "black text with justify='CM'",
+        "blue text with justify='LT'",
+        "red text with angle=30",
+    ],
+)
+
+fig.show()
+
+
+text
+
+

Using an external input file

+

It is also possible to add text labels via an external input file containing x, +y, and text columns. Addionaly, columns to set the angle, front, +and justify parameters can be provided. Here, we give a complete example.

+
fig = pygmt.Figure()
+fig.basemap(region=[108, 121, -5, 8], projection="M10c", frame="a2f1")
+fig.coast(land="darkgray", water="steelblue", shorelines="1/0.1p,gray30")
+
+# Create space-delimited file with region / sea names:
+# - longitude (x) and latitude (y) coordinates are in the first two columns
+# - angle, font, and justify muss be present in this order in the next three columns
+# - the text to be printed is given in the last column
+with Path.open("examples.txt", "w") as f:
+    f.write("114.00  0.50   0 15p,Helvetica-Bold,white CM BORNEO\n")
+    f.write("119.00  3.25   0  8p,Helvetica-Bold,black CM CELEBES SEA\n")
+    f.write("112.00 -4.60   0  8p,Helvetica-Bold,black CM JAVA SEA\n")
+    f.write("112.00  6.00  40  8p,Helvetica-Bold,black CM SOUTH CHINA SEA\n")
+    f.write("119.12  7.25 -40  8p,Helvetica-Bold,black CM SULU SEA\n")
+    f.write("118.40 -1.00  65  8p,Helvetica-Bold,black CM MAKASSAR STRAIT\n")
+
+# Setting the angle, font, and justify parameters to True indicates that those columns
+# are present in the text file
+fig.text(textfiles="examples.txt", angle=True, font=True, justify=True)
+
+# Cleanups
+Path("examples.txt").unlink()
+
+fig.show()
+
+
+text
+
+

Using the position parameter

+

Instead of using the x and y parameters, the position parameter can be +specified to set the reference point for the text on the plot. As for the justify +parameter, the position parameter is specified by a two-letter (order independent) +code, chosen from:

+
    +
  • Vertical: T(op), M(iddle), B(ottom)

  • +
  • Horizontal: L(eft), C(entre), R(ight)

  • +
+

This can be helpful to add a tag to a subplot or text labels out of the plot or map +frame, e.g., for depth slices.

+
fig = pygmt.Figure()
+
+# -----------------------------------------------------------------------------
+# Left: Add a tag to a subplot
+fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=["WStr", "af"])
+
+fig.text(
+    text="(a)",
+    position="TL",  # Top Left
+    justify="TL",  # Top Left
+    offset="0.1c/-0.1c",
+)
+
+fig.shift_origin(xshift="w+1c")
+
+# -----------------------------------------------------------------------------
+# Right: Add a text label outside of the plot or map frame
+fig.basemap(region=[-30, 30, 10, 60], projection="L0/35/23/47/5c", frame=["wSnE", "af"])
+
+fig.text(
+    text="@@100 km",  # "@@" gives "@" in GMT or PyGMT
+    position="TC",  # Top Center
+    justify="MC",  # Middle Center
+    offset="0c/0.2c",
+    no_clip=True,  # Allow plotting outside of the map or plot frame
+)
+
+fig.show()
+
+
+text
+
+

Advanced configuration

+

For crafting more advanced styles, including using special symbols and other character +sets, be sure to check out the GMT documentation at https://docs.generic-mapping-tools.org/6.5/text.html and also the +Technical References at https://docs.generic-mapping-tools.org/6.5/reference/features.html#placement-of-text. Good +luck!

+

Total running time of the script: (0 minutes 1.245 seconds)

+ +

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/index.html b/v0.14.0/tutorials/index.html new file mode 100644 index 00000000000..c2f4308798e --- /dev/null +++ b/v0.14.0/tutorials/index.html @@ -0,0 +1,324 @@ + + + + + + + + + Tutorials — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ +
+
+
+
+ +
+

Tutorials

+

These examples teach us how to complete various tasks using PyGMT!

+
+

Basics

+
+

Coastlines and borders

+
Coastlines and borders
+
+

Frames, ticks, titles, and labels

+
Frames, ticks, titles, and labels
+
+

Plotting data points

+
Plotting data points
+
+

Plotting lines

+
Plotting lines
+
+

Plotting polygons

+
Plotting polygons
+
+

Plotting text

+
Plotting text
+
+

Setting the region

+
Setting the region
+
+
+
+
+

Advanced

+
+

Adding an inset to the figure

+
Adding an inset to the figure
+
+

Cartesian histograms

+
Cartesian histograms
+
+

Configuring PyGMT defaults

+
Configuring PyGMT defaults
+
+

Creating a 3-D perspective image

+
Creating a 3-D perspective image
+
+

Creating a map with contour lines

+
Creating a map with contour lines
+
+

Draping a dataset on top of a topographic surface

+
Draping a dataset on top of a topographic surface
+
+

Interactive data visualization using Panel

+
Interactive data visualization using Panel
+
+

Making subplots

+
Making subplots
+
+

Performing grid histogram equalization

+
Performing grid histogram equalization
+
+

Plotting Earth relief

+
Plotting Earth relief
+
+

Plotting datetime charts

+
Plotting datetime charts
+
+

Plotting vectors

+
Plotting vectors
+
+

Typesetting non-ASCII text

+
Typesetting non-ASCII text
+
+
+

Gallery generated by Sphinx-Gallery

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/v0.14.0/tutorials/sg_execution_times.html b/v0.14.0/tutorials/sg_execution_times.html new file mode 100644 index 00000000000..f18bcd84675 --- /dev/null +++ b/v0.14.0/tutorials/sg_execution_times.html @@ -0,0 +1,244 @@ + + + + + + + + + Computation times — PyGMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
    +
  • + + + +
+
+
+
+
+ +
+

Computation times

+

00:00.000 total execution time for 0 files from tutorials:

+
+ + + + + + + + + + + + + + + + + +

Example

Time

Mem (MB)

N/A

N/A

N/A

+
+
+ + +
+
+ +
+ +
+ +
+

© Copyright 2017-2024, The PyGMT Developers. + Revision v0.14.0. + + Last updated on Dec 31, 2024. +

+
+ + +

+Built with Sphinx +using a theme +provided by Read the Docs +

+

+This website uses Google Analytics to gather usage statistics. +However, it does not use cookies or track you across different websites. +Page view data are used to help us improve the site and provide an estimate of the +software usage. +

+ + +
+
+
+
+
+ + + + \ No newline at end of file