Visualisation#

pysewer.plotting.plot_model_domain(modelDomain, plot_connection_graph: bool | None = None, plot_junction_graph: bool | None = None, plot_sink: bool | None = None, plot_sewer: bool | None = None, sewer_graph: Graph | None = None, info_table: dict | None = None, hs_alt=30, hs_az=0, hillshade: bool | None = None, fig_size: tuple = (20, 20))[source]#

Plots the sewer network model domain.

Parameters:
  • modelDomain (pysewer.ModelDomain) – The model domain to plot.

  • plot_connection_graph (bool, optional) – Whether to plot the connection graph, by default False.

  • plot_junction_graph (bool, optional) – Whether to plot the junction graph, by default False.

  • plot_sink (bool, optional) – Whether to plot the sink, by default True.

  • plot_sewer (bool, optional) – Whether to plot the sewer, by default False.

  • sewer_graph (networkx.Graph, optional) – The sewer graph to plot, by default None.

  • info_table (dict, optional) – The information table to plot, by default None.

  • hs_alt (int, optional) – The altitude of the hillshade, by default 30.

  • hs_az (int, optional) – The azimuth of the hillshade, by default 0.

  • hillshade (bool, optional) – Whether to plot the hillshade, by default False.

  • plot_problematic_points (bool, optional) – Whether to plot the problematic points, by default False.

Returns:

fig, ax – The figure and axes of the plot.

Return type:

matplotlib.figure.Figure, matplotlib.axes.Axes

pysewer.plotting.plot_sewer_attributes(modelDomain, sewer_graph, attribute, colormap='jet', title='Sewer Network Plot', hillshade=False, plot_sink=True, fig_size=(20, 20))[source]#

Plots the sewer network with the specified attribute.

Parameters:
  • modelDomain (object) – The model domain object.

  • sewer_graph (object) – The sewer graph object.

  • attribute (str) – The attribute to plot.

  • colormap (str, optional) – The colormap to use for the plot. Default is “jet”.

  • title (str, optional) – The title of the plot. Default is “Sewer Network Plot”.

  • hillshade (bool, optional) – Whether to include a hillshade in the plot. Default is False.

  • plot_sink (bool, optional) – Whether to plot the sinks (WWTP) in the sewer network. Default is True.

  • fig_size (tuple, optional) – The size of the figure in inches. Default is (20, 20).

Returns:

  • fig (matplotlib.figure.Figure) – The figure object.

  • ax (matplotlib.axes.Axes) – The axes object.

pysewer.plotting.plot_connection_graph(model_domain, fig_size=(10, 10))[source]#

Plots the connection graph generated by the ModelDomain.generate_connection_graph() method.

Parameters:
  • model_domain (pysewer.ModelDomain) – The model domain containing the connection graph.

  • fig_size (tuple, optional) – The size of the figure in inches. Default is (20, 20).

Returns:

  • fig (matplotlib.figure.Figure) – The figure object.

  • ax (matplotlib.axes.Axes) – The axes object.

“””