Plotting Pandapower Networks using Plotly

This tutorial shows you how to make interactive plots of pandapower networks using plotly (https://plot.ly/python/). The best way to get started is to get familiar with 3 built-in plots that correspond to:

  • a simple plot of a network (respect switch statuses by default)
  • voltage-levels plot - colores and labels network according to voltage levels
  • Power Flow results - a colormap plot where buses are colored according to voltage magnitudes and branches according to line/transformer loading.

The following sample plots are with mv_oberrhein network from the pandapower.networks package:

In [1]:
from pandapower.plotting.plotly import simple_plotly
from pandapower.networks import mv_oberrhein
from pandapower import runpp
net = mv_oberrhein()
runpp(net)

Simple plotting

A simple network plot wich labels as separate trace all network buses, lines, transformers and external grid. Try some of the fancy plotly features from the upper-right corner:

  • zooming,
  • hoover tool (position cursor on the bus/line/trafo to get basic info),
  • selecting,
  • click on the legend to hide-show any of the legened elements,
In [3]:
simple_plotly(net);