import mikeio
da = mikeio.read("../data/HD2D.dfsu")["Surface elevation"]
da.plot()
Plot a DataArray with a GeometryFM geometry.
If DataArray has multiple time steps, the first step will be plotted.
If DataArray is 3D the surface layer will be plotted.
| Name | Description |
|---|---|
| contour | Plot data as contour lines. |
| contourf | Plot data as filled contours. |
| hist | Plot DataArray as histogram (using ax.hist). |
| line | Plot data as lines (timeseries if time is present). |
| mesh | Plot mesh only. |
| outline | Plot domain outline. |
| patch | Plot data as coloured patches (deprecated, use pcolormesh). |
| pcolormesh | Plot data as coloured patches, one per element. |
Plot data as contour lines.
Plot data as filled contours.
Plot DataArray as histogram (using ax.hist).
| Name | Type | Description | Default |
|---|---|---|---|
| bins | (int or sequence or str) | If bins is an integer, it defines the number of equal-width bins in the range. If bins is a sequence, it defines the bin edges, including the left edge of the first bin and the right edge of the last bin. by default: rcParams[“hist.bins”] (default: 10) | None |
| ax | Axes | None | Adding to existing axis, instead of creating new fig | None |
| figsize | tuple[float, float] | None | specify size of figure | None |
| title | str | None | axes title | None |
| **kwargs | Any | additional arguments passed to the plotting function | {} |
matplotlib.pyplot.hist
| Name | Type | Description |
|---|---|---|
| <matplotlib.axes> |
Plot data as lines (timeseries if time is present).
Plot mesh only.
Plot domain outline.
Plot data as coloured patches (deprecated, use pcolormesh).
Plot data as coloured patches, one per element.