|
27 | 27 | # ========================== |
28 | 28 | # |
29 | 29 | # ProPlot includes features for working with `polar axes <polar_>`_ and the |
30 | | -# `cartopy`_ and `basemap`_ geographic projection packages. These features are |
31 | | -# optional -- installation of cartopy or basemap is not required. |
| 30 | +# `cartopy`_ and `basemap`_ :ref:`geographic projection packages <why_cartopy_basemap>`. |
| 31 | +# These features are *optional*. Installation of cartopy or basemap is not required. |
32 | 32 | # |
33 | 33 | # To change the axes projection, pass ``proj='name'`` to `~proplot.ui.subplots`. To use |
34 | 34 | # different projections for different subplots, pass a dictionary of projection names |
|
56 | 56 | # `proplot.axes.PolarAxes.format` calls `proplot.axes.Axes.format`, it can be used to |
57 | 57 | # add axes titles, a-b-c labels, and figure titles, just like |
58 | 58 | # `~proplot.axes.CartesianAxes`. |
59 | | - |
60 | 59 | # |
61 | 60 | # For details, see `proplot.axes.PolarAxes.format`. |
62 | 61 |
|
|
102 | 101 | # Geographic axes |
103 | 102 | # --------------- |
104 | 103 | # |
105 | | -# ProPlot can create geographic projection axes using either `cartopy`_ or `basemap`_ |
106 | | -# as "backends". To draw geographic axes, pass ``proj='name'`` or e.g. |
107 | | -# ``proj={2: 'name'}`` (:ref:`see above <ug_proj>`) to `~proplot.ui.subplots` |
108 | | -# where ``name`` is any valid :ref:`PROJ projection name <proj_included>`. |
109 | | -# You can also use ``proj=projection_instance``, where ``projection_instance`` |
110 | | -# is a `cartopy.crs.Projection` or `mpl_toolkits.basemap.Basemap` returned by |
111 | | -# the `~proplot.constructor.Proj` constructor function. |
| 104 | +# ProPlot can create geographic projection axes using |
| 105 | +# either `cartopy`_ or `basemap`_ as "backends". To draw geographic axes, pass |
| 106 | +# ``proj='name'`` or e.g. ``proj={2: 'name'}`` (:ref:`see above <ug_proj>`) to |
| 107 | +# `~proplot.ui.subplots` where ``name`` is any valid :ref:`PROJ projection name |
| 108 | +# <proj_included>`. You can also use ``proj=projection_instance``, where |
| 109 | +# ``projection_instance`` is a `cartopy.crs.Projection` or |
| 110 | +# `mpl_toolkits.basemap.Basemap` returned by the `~proplot.constructor.Proj` |
| 111 | +# :ref:`constructor function <why_constructor>`. |
112 | 112 | # |
113 | 113 | # When you request a geographic projection, `~proplot.ui.subplots` returns |
114 | 114 | # a `proplot.axes.GeoAxes` instance with its own `~proplot.axes.GeoAxes.format` |
115 | | -# method. The `proplot.axes.GeoAxes.format` method allows you to |
116 | | -# :ref:`modify geographic features <ug_geoformat>` with the same syntax whether |
117 | | -# cartopy or basemap is the "backend". A few details: |
| 115 | +# method. The `proplot.axes.GeoAxes.format` method lets you |
| 116 | +# :ref:`modify geographic features <ug_geoformat>` with the same syntax for |
| 117 | +# either backend. A few details: |
118 | 118 | # |
119 | 119 | # * Cartopy is the default backend. When you request projections with cartopy as the |
120 | 120 | # backend, `~proplot.ui.subplots` returns `proplot.axes.CartopyAxes`, which is a |
121 | | -# subclass of both `cartopy.mpl.geoaxes.GeoAxes` and `proplot.axes.Axes.GeoAxes`. |
122 | | -# On `~proplot.axes.CartopyAxes`, `~proplot.axes.GeoAxes.format` changes map |
123 | | -# bounds using `~cartopy.mpl.geoaxes.GeoAxes.set_extent`, adds major and minor |
124 | | -# gridlines using `~cartopy.mpl.geoaxes.GeoAxes.gridlines`, and adds geographic |
125 | | -# features using `~cartopy.mpl.geoaxes.GeoAxes.add_feature`. |
126 | | -# |
127 | | -# * Basemap is an alternative backend. To use basemap as the backend, set the |
128 | | -# :rcraw:`basemap` setting to ``True`` or pass ``basemap=True`` to |
129 | | -# `~proplot.ui.subplots`. When you request projections with basemap as the backend, |
130 | | -# `~proplot.ui.subplots` returns `proplot.axes.BasemapAxes`, which is a subclass |
131 | | -# of `proplot.axes.GeoAxes`. `~proplot.axes.Axes.BasemapAxes` redirects the plot, |
132 | | -# scatter, contour, contourf, pcolor, pcolormesh, quiver, streamplot, and barb |
133 | | -# methods to identically named methods on the `~mpl_toolkits.basemap.Basemap` |
134 | | -# instance. This means you can work with the standard axes plotting methods rather |
135 | | -# than the basemap methods -- just like cartopy. On `~proplot.axes.BasemapAxes`, |
136 | | -# `~proplot.axes.GeoAxes.format` adds adds major and minor gridlines using |
| 121 | +# subclass of both `proplot.axes.GeoAxes` and `cartopy.mpl.geoaxes.GeoAxes`. |
| 122 | +# Under the hood, invoking `~proplot.axes.GeoAxes.format` on a |
| 123 | +# `~proplot.axes.CartopyAxes` changes map bounds using |
| 124 | +# `~cartopy.mpl.geoaxes.GeoAxes.set_extent`, adds major and minor gridlines using |
| 125 | +# `~cartopy.mpl.geoaxes.GeoAxes.gridlines`, and adds geographic features using |
| 126 | +# `~cartopy.mpl.geoaxes.GeoAxes.add_feature`. If you prefer, you can use the |
| 127 | +# standard `cartopy.mpl.geoaxes.GeoAxes` methods just like you would in cartopy. |
| 128 | +# |
| 129 | +# * Basemap is an alternative backend. To use basemap, set :rcraw:`basemap` to |
| 130 | +# ``True`` or pass ``basemap=True`` to `~proplot.ui.subplots`. When you request |
| 131 | +# projections with basemap as the backend, `~proplot.ui.subplots` returns |
| 132 | +# `proplot.axes.BasemapAxes`, which is a subclass of `proplot.axes.GeoAxes`. |
| 133 | +# `~proplot.axes.BasemapAxes` redirects the plot, scatter, contour, contourf, |
| 134 | +# pcolor, pcolormesh, quiver, streamplot, and barb methods to identically named |
| 135 | +# methods on the `~mpl_toolkits.basemap.Basemap` instance. This means you can work |
| 136 | +# with the standard axes plotting methods rather than the basemap methods -- just |
| 137 | +# like cartopy. Under the hood, invoking `~proplot.axes.GeoAxes.format` on a |
| 138 | +# `~proplot.axes.BasemapAxes` adds major and minor gridlines using |
137 | 139 | # `~mpl_toolkits.basemap.Basemap.drawmeridians` and |
138 | 140 | # `~mpl_toolkits.basemap.Basemap.drawparallels` and adds geographic features |
139 | 141 | # using methods like `~mpl_toolkits.basemap.Basemap.fillcontinents` |
140 | | -# and `~mpl_toolkits.basemap.Basemap.drawcoastlines`. In case you need to |
141 | | -# explicitly use the underlying `~mpl_toolkits.basemap.Basemap` instance, it is |
| 142 | +# and `~mpl_toolkits.basemap.Basemap.drawcoastlines`. If you need to |
| 143 | +# use the underlying `~mpl_toolkits.basemap.Basemap` instance, it is |
142 | 144 | # available via the `proplot.axes.BasemapAxes.projection` attribute. |
143 | 145 | # |
144 | 146 | # Together, these features let you work with geophysical data without invoking |
|
0 commit comments