Skip to content

Commit 9af3d8a

Browse files
philipc2rajeejaerogluorhan
authored
Support sampling face-centered data onto a GeoAxes (#1271)
* initial draft of matplotlib plotting * update functions * use updated point in polygon * docstrings, rename to imshow * expose imshow to uxarray.plot * remove changes to grid * update typing * update mpl user guide * add test * add tests * update notebook * add rasterize_to_geoaxes * update docs * add test for raster * update notebook, clean up line and poly collection * fix formatting * rename to_raster and update docs * notebook markdown updates * update to_raster docstring * update copy logic * use mpas ocean data for plotting example * clear notebook * fix bold text * fix typos in notebook * update api * add Conversion Methods API section * update test name * Update docs/api.rst Co-authored-by: Orhan Eroglu <[email protected]> * Update docs/api.rst Co-authored-by: Orhan Eroglu <[email protected]> --------- Co-authored-by: Rajeev Jain <[email protected]> Co-authored-by: Orhan Eroglu <[email protected]>
1 parent d3d4d9c commit 9af3d8a

File tree

12 files changed

+470
-501
lines changed

12 files changed

+470
-501
lines changed

docs/api.rst

Lines changed: 52 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,21 @@ Top Level Functions
2525
Grid
2626
----
2727

28-
Constructor
29-
~~~~~~~~~~~
28+
Constructors
29+
~~~~~~~~~~~~
3030

3131
.. autosummary::
3232
:toctree: generated/
3333

3434
Grid
35-
36-
I/O & Conversion
37-
~~~~~~~~~~~~~~~~
38-
39-
.. autosummary::
40-
:toctree: generated/
41-
4235
Grid.from_dataset
4336
Grid.from_file
4437
Grid.from_topology
4538
Grid.from_structured
4639
Grid.from_points
4740
Grid.from_healpix
48-
Grid.to_xarray
49-
Grid.to_geodataframe
50-
Grid.to_polycollection
51-
Grid.to_linecollection
41+
42+
5243

5344
Indexing
5445
~~~~~~~~
@@ -175,13 +166,15 @@ and functionality, please refer to Xarray's `documentation <https://docs.xarray.
175166
UxDataArray
176167
-----------
177168

178-
Constructor
179-
~~~~~~~~~~~
169+
Constructors
170+
~~~~~~~~~~~~
180171

181172
.. autosummary::
182173
:toctree: generated/
183174

184175
UxDataArray
176+
UxDataArray.from_xarray
177+
UxDataArray.from_healpix
185178

186179
Grid Accessor
187180
~~~~~~~~~~~
@@ -191,29 +184,20 @@ Grid Accessor
191184

192185
UxDataArray.uxgrid
193186

194-
I/O & Conversion
195-
~~~~~~~~~~~~~~~~
196-
197-
.. autosummary::
198-
:toctree: generated/
199-
200-
UxDataArray.to_geodataframe
201-
UxDataArray.to_polycollection
202-
UxDataArray.to_dataset
203-
UxDataArray.from_xarray
204-
UxDataArray.from_healpix
205-
206187

207188
UxDataset
208189
-----------
209190

210-
Constructor
211-
~~~~~~~~~~~
191+
Constructors
192+
~~~~~~~~~~~~
212193

213194
.. autosummary::
214195
:toctree: generated/
215196

216197
UxDataset
198+
UxDataset.from_structured
199+
UxDataset.from_xarray
200+
UxDataset.from_healpix
217201

218202
Grid Accessor
219203
~~~~~~~~~~~
@@ -223,25 +207,58 @@ Grid Accessor
223207

224208
UxDataset.uxgrid
225209

226-
I/O & Conversion
227-
~~~~~~~~~~~~~~~~
210+
211+
Conversion Methods
212+
------------------
213+
214+
UXarray provides functionality to convert its unstructured grids representation to other data structures that can be ingested by existing, widely used tools, such as Matplotlib and Cartopy. This allows users to keep using their workflows with such tools.
215+
216+
217+
218+
Grid
219+
~~~~
228220

229221
.. autosummary::
230222
:toctree: generated/
231223

232-
UxDataset.from_structured
233-
UxDataset.from_xarray
234-
UxDataset.from_healpix
224+
Grid.to_geodataframe
225+
Grid.to_polycollection
226+
Grid.to_linecollection
227+
Grid.to_xarray
228+
229+
UxDataArray
230+
~~~~~~~~~~~
231+
232+
.. autosummary::
233+
:toctree: generated/
234+
235+
UxDataArray.to_geodataframe
236+
UxDataArray.to_polycollection
237+
UxDataArray.to_raster
238+
UxDataArray.to_dataset
239+
UxDataArray.to_xarray
240+
241+
UxDataset
242+
~~~~~~~~~
243+
244+
.. autosummary::
245+
:toctree: generated/
246+
247+
UxDataset.to_xarray
248+
UxDataset.to_array
249+
235250

236251
Plotting
237252
--------
238253

239254

240-
UXarray's plotting API is written using `hvPlot <https://hvplot.holoviz.org/>`_.
255+
UXarray's plotting API is written using `hvPlot <https://hvplot.holoviz.org/>`_. We also support standalone functions
256+
for pure Matplotlib and Cartopy workflows.
241257

242258
.. seealso::
243259

244260
`Plotting User Guide Section <https://uxarray.readthedocs.io/en/latest/user-guide/plotting.html>`_
261+
`Plotting with Matplotlib User Guide Section <https://uxarray.readthedocs.io/en/latest/user-guide/mpl.html>`_
245262

246263
Grid
247264
~~~~
@@ -276,14 +293,8 @@ UxDataArray
276293
UxDataArray.plot.line
277294
UxDataArray.plot.scatter
278295

279-
UxDataset
280-
~~~~~~~~~
281296

282-
.. autosummary::
283-
:toctree: generated/
284-
:template: autosummary/accessor_method.rst
285297

286-
UxDataset.plot
287298

288299

289300

0 commit comments

Comments
 (0)