Simple Plot

Creating a simple network plot

simple_plot(net, respect_valves=False, 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

  • 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: mean_distance_between_buses = sum((net[‘bus_geodata’].max() - net[‘bus_geodata’].min()) / 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.

  • heat_exchanger_size

  • 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.

  • 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.