pyorc.CrossSection.plot#

CrossSection.plot(h: ~typing.Optional[float] = None, length: float = 2.0, offset: float = 0.0, camera: bool = False, ax: ~typing.Optional[~matplotlib.axes._axes.Axes] = None, cs_kwargs: ~typing.Optional[~typing.Dict] = None, planar=True, bottom=True, wetted=True, swap_y_coords=False, planar_kwargs: ~typing.Dict = {'alpha': 0.5, 'color': 'c'}, bottom_kwargs: ~typing.Dict = {'alpha': 0.1, 'color': 'brown'}, wetted_kwargs: ~typing.Dict = {'alpha': 0.15, 'edgecolor': 'w', 'facecolor': '#385895', 'linewidth': 2.0, 'path_effects': [<matplotlib.patheffects.Stroke object>, <matplotlib.patheffects.Normal object>], 'zorder': 1}) Axes[source]#

Plot the cross-section situation.

This will create a plot of the cross section, with some up to downstream length in a 3D axes. It can be combined with a plot of the camera configuration, with cross_section.camera_config.plot(mode=”3d”).

Parameters:
  • mode (Literal["camera", "3d"]) – manner in which plotting should be done.

  • h (float, optional) – water level [m]. If not provided, the water level is taken from the camera config cross_section.camera_config.gcps[“h_ref”].

  • length (float, optional) – length of the waterline [m], by default 2.0

  • offset (float, optional) – perpendicular offset of the waterline from the cross-section [m], by default 0.0

  • camera (bool, optional) – If set, return 2D projected polygon, by default False.

  • ax (plt.axes, optional) – if not provided, axes is setup (Default: None). If provided, user must take care to provide the correct projection. If camera=False, an axes must be provided with projection=”3d”.

  • cs_kwargs (dict, optional) – keyword arguments used to make the line plot of the cross section.

  • planar (bool, optional) – whether to plot the planar, by default True.

  • bottom (bool, optional) – whether to plot the bottom surface, by default True.

  • wetted (bool, optional) – whether to plot the wetted surface, by default True.

  • swap_y_coords (bool, optional) – if set, all y-coordinates are swapped so that they fit on a flipped version of the image. This is useful in case you plot on ascending y-coordinate axis background images (default: False)

  • planar_kwargs (dict, optional) – keyword arguments used to make the polygon plot of the water plane. If not provided, a set of defaults will be used that give a natural look.

  • bottom_kwargs (dict, optional) – keyword arguments used to make the polygon plot of the bottom surface. If not provided, a set of defaults will be used that give a natural look.

  • wetted_kwargs (dict, optional) – keyword arguments used to make the polygon plot of the wetted surface. If not provided, a set of defaults will be used that give a natural look.

Returns:

The developed axes object with all data

Return type:

mpl.axes.Axes