Skip to content

Backport PR #12776 on branch v3.0.x (Fix typo in example (on-borad -> on-board).) #12777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions examples/images_contours_and_fields/irregulardatagrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
Comparison of a contour plot of irregularly spaced data interpolated
on a regular grid versus a tricontour plot for an unstructured triangular grid.

Since :meth:`~.axes.Axes.contour` and :meth:`~.axes.Axes.contourf` expect the
data to live on a regular grid, plotting a contour plot of irregularly spaced
data requires different methods. The two options are:
Since `~.axes.Axes.contour` and `~.axes.Axes.contourf` expect the data to live
on a regular grid, plotting a contour plot of irregularly spaced data requires
different methods. The two options are:

* Interpolate the data to a regular grid first. This can be done with on-borad
* Interpolate the data to a regular grid first. This can be done with on-board
means, e.g. via `~.tri.LinearTriInterpolator` or using external functionality
e.g. via `scipy.interpolate.griddata`. Then plot the
interpolated data with the usual :meth:`~.axes.Axes.contour`.
* Directly use :meth:`~.axes.Axes.tricontour` or
:meth:`~.axes.Axes.tricontourf` which will perform a triangulation
internally.
e.g. via `scipy.interpolate.griddata`. Then plot the interpolated data with
the usual `~.axes.Axes.contour`.
* Directly use `~.axes.Axes.tricontour` or `~.axes.Axes.tricontourf` which will
perform a triangulation internally.

This example shows both methods in action.
"""
Expand Down