Create Collections¶
Matplotlib collections can be created from pandapower networks with the following functions:
Bus Collections¶
-
pandapower.plotting.
create_bus_collection
(net, buses=None, size=5, marker='o', patch_type='circle', colors=None, z=None, cmap=None, norm=None, infofunc=None, picker=False, bus_geodata=None, cbar_title='Bus Voltage [pu]', **kwargs)¶ Creates a matplotlib patch collection of pandapower buses.
- Input:
- net (pandapowerNet) - The pandapower network
- OPTIONAL:
buses (list, None) - The buses for which the collections are created. If None, all buses in the network are considered.
size (int, 5) - patch size
marker (str, “o”) - patch marker
patch_type (str, “circle”) - patch type, can be
- “circle” for a circle
- “rect” for a rectangle
- “poly<n>” for a polygon with n edges
infofunc (function, None) - infofunction for the patch element
colors (list, None) - list of colors for every element
cmap - colormap for the patch colors
bus_geodata (DataFrame, None) - coordinates to use for plotting If None, net[“bus_geodata”] is used
picker - picker argument passed to the patch collection
**kwargs - key word arguments are passed to the patch function
Branch Collections¶
-
pandapower.plotting.
create_line_collection
(net, lines=None, line_geodata=None, use_bus_geodata=False, infofunc=None, cmap=None, norm=None, picker=False, z=None, cbar_title='Line Loading [%]', clim=None, **kwargs)¶ Creates a matplotlib line collection of pandapower lines.
- Input:
- net (pandapowerNet) - The pandapower network
- OPTIONAL:
lines (list, None) - The lines for which the collections are created. If None, all lines in the network are considered.
line_geodata (DataFrame, None) - coordinates to use for plotting If None, net[“line_geodata”] is used
infofunc (function, None) - infofunction for the patch element**kwargs - key word arguments are passed to the patch function
-
pandapower.plotting.
create_trafo_collection
(net, trafos=None, bus_geodata=None, infofunc=None, **kwargs)¶ Creates a matplotlib line collection of pandapower transformers.
- Input:
- net (pandapowerNet) - The pandapower network
- OPTIONAL:
trafos (list, None) - The transformers for which the collections are created. If None, all transformers in the network are considered.
**kwargs - key word arguments are passed to the patch function