import mikeio
= mikeio.read("../data/HD2D.dfsu")["Surface elevation"]
da da.plot()
dataset._data_plot._DataArrayPlotterFM
self, da) dataset._data_plot._DataArrayPlotterFM(
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.
Examples
Methods
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 (using the boundary_polylines property). |
patch | Plot data as coloured patches. |
contour
=None, figsize=None, **kwargs) dataset._data_plot._DataArrayPlotterFM.contour(ax
Plot data as contour lines.
Examples
= mikeio.read("../data/HD2D.dfsu")["Surface elevation"]
da da.plot.contour()
contourf
=None, figsize=None, **kwargs) dataset._data_plot._DataArrayPlotterFM.contourf(ax
Plot data as filled contours.
Examples
= mikeio.read("../data/HD2D.dfsu")["Surface elevation"]
da da.plot.contourf()
hist
dataset._data_plot._DataArrayPlotterFM.hist(=None,
ax=None,
figsize=None,
title**kwargs,
)
Plot DataArray as histogram (using ax.hist).
Parameters
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) | required |
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 | {} |
See Also
matplotlib.pyplot.hist
Returns
Name | Type | Description |
---|---|---|
<matplotlib.axes> |
line
=None, figsize=None, **kwargs) dataset._data_plot._DataArrayPlotterFM.line(ax
Plot data as lines (timeseries if time is present).
mesh
=None, figsize=None, **kwargs) dataset._data_plot._DataArrayPlotterFM.mesh(ax
Plot mesh only.
Examples
= mikeio.read("../data/HD2D.dfsu")["Surface elevation"]
da da.plot.mesh()
outline
=None, figsize=None, **kwargs) dataset._data_plot._DataArrayPlotterFM.outline(ax
Plot domain outline (using the boundary_polylines property).
Examples
= mikeio.read("../data/HD2D.dfsu")["Surface elevation"]
da da.plot.outline()
patch
=None, figsize=None, **kwargs) dataset._data_plot._DataArrayPlotterFM.patch(ax
Plot data as coloured patches.
Examples
= mikeio.read("../data/HD2D.dfsu")["Surface elevation"]
da da.plot.patch()