Simple Plot

Creating a Simple Network Plot

simple_plot(net, respect_valves=False, respect_in_service=True, pipe_width=2.0, junction_size=1.0, ext_grid_size=1.0, plot_sinks=False, plot_sources=False, sink_size=1.0, source_size=1.0, valve_size=1.0, pump_size=1.0, heat_exchanger_size=1.0, scale_size=True, junction_color='r', pipe_color='silver', ext_grid_color='orange', valve_color='silver', pump_color='silver', heat_exchanger_color='silver', library='igraph', show_plot=True, ax=None, **kwargs)

Plots a pandapipes network as simple as possible. If no geodata is available, artificial geodata is generated. For advanced plotting see the tutorial.

Parameters
  • net (pandapipesNet) – The pandapipes format network.

  • respect_valves (bool default False) – Respect valves if artificial geodata is created. Note: This Flag is ignored if plot_line_switches is True

  • respect_in_service (bool default True) – Respect only components which are in service.

  • pipe_width (float, default 5.0) – Width of pipes

  • junction_size (float, default 1.0) – Relative size of junctions to plot. The value junction_size is multiplied with mean_distance_between_buses, which equals the distance between the max geoocord and the min divided by 200

  • ext_grid_size (float, default 1.0) – Relative size of ext_grids to plot. See bus sizes for details. Note: ext_grids are plottet as rectangles

  • plot_sinks (bool, default False) – Flag to decide whether sink symbols should be drawn.

  • plot_sources (bool, default False) – Flag to decide whether source symbols should be drawn.

  • sink_size (float, default 1.0) – Relative size of sinks to plot.

  • source_size (float, default 1.0) – Relative size of sources to plot.

  • valve_size (float, default 1.0) – Relative size of valves to plot.

  • pump_size (float, default 1.0) – Relative size of pumps to plot.

  • heat_exchanger_size (float, default 1.0) – Relative size of heat_exchanger to plot.

  • scale_size (bool, default True) – Flag if junction_size, ext_grid_size, valve_size- and distance will be scaled with respect to grid mean distances

  • junction_color (str, tuple, default "r") – Junction Color. See also matplotlib or seaborn documentation on how to choose colors.

  • pipe_color (str, tuple, default "silver") – Pipe color

  • ext_grid_color (str, tuple, default "orange") – External grid color

  • valve_color (str, tuple, default "silver") – Valve Color.

  • pump_color (str, tuple, default "silver") – Pump Color.

  • heat_exchanger_color (str, tuple, default "silver") – Heat Exchanger Color.

  • library (str, default "igraph") – Library name to create generic coordinates (case of missing geodata). Choose “igraph” to use igraph package or “networkx” to use networkx package.

  • show_plot (bool, default True) – If True, show plot at the end of plotting

  • ax (object, default None) – matplotlib axis to plot to

Returns

ax - Axes of figure

Parameters

simple_plot

Parameter

Datatype

Value Range

Explanation

net

pandapipesNet

Network to be plotted

respect_valves

boolean

True / False

Respect valves if artificial geodata is created, note: this Flag is ignored if plot_line_switches is True

pipe_width

float

\(>\) 0

Specifies the pipe width

junction_size

float

\(>\) 0

Relative size of junctions to plot

ext_grid_size

float

\(>\) 0

Relative size of ext_grids to plot

plot_sinks

boolean

True / False

Flag to decide whether sink symbols should be drawn

plot_sources

boolean

True / False

Flag to decide whether source symbols should be drawn

sink_size

float

\(>\) 0

Relative size of sinks to plot

source_size

float

\(>\) 0

Relative size of sources to plot

valve_size

float

\(>\) 0

Relative size of valves to plot

heat_exchanger_size

float

\(>\) 0

Relative size of heat exchanger to plot

valve_distance

float

\(>\) 0

Relative distance of the valve to its corresponding junction

scale_size

boolean

True / False

Flag if junction_size, ext_grid_size, valve_size- and distance will be scaled with respect to grid mean distances

junction_color

string / tuple

Junction color

pipe_color

string / tuple

Pipe color

ext_grid_color

string / tuple

External grid color

library

string

“igraph” / “networkx”

Library name to create generic coordinates (case of missing geodata)

show_plot

boolean

True / False

If True, show plot at the end of plotting

ax

object

matplotlib axis to plot

Note

See also matplotlib or seaborn documentation on how to choose colors.