https://github.com/PyPSA/PyPSA
Raw File
Tip revision: a34ea22ae840023a8260523d6757ac837ec495b2 authored by Martha Maria on 17 November 2021, 08:34:13 UTC
Merge branch 'master' into introduce_hac_clustering
Tip revision: a34ea22
plotting.rst
######################
 Plotting Networks
######################

See the module ``pypsa.plot``.

PyPSA has several functions available for plotting networks with
different colors/widths/labels on buses and branches.


Static plotting with matplotlib
===============================

Static plots of networks can be created that use the library
`matplotlib <https://matplotlib.org/>`_.  This is meant for use with
`Jupyter notebooks <https://jupyter.org/>`_, but can also be used to
generate image files.
To plot a network with matplotlib run
``network.plot()``, see :py:meth:`pypsa.Network.plot` for details.

See also the `SciGRID matplotlib example
<https://pypsa.org/examples/scigrid-lopf-then-pf.html>`_.


Interactive plotting with plotly
================================

Interactive plots of networks can be created that use the `d3js
<https://d3js.org/>`_-based library `plotly
<https://plot.ly/python/>`_ (this uses JavaScript and SVGs). This is
meant for use with `Jupyter notebooks <https://jupyter.org/>`_.
To plot a network with plotly run
``network.iplot()``, see :py:meth:`pypsa.Network.iplot` for details. 

See also the `SciGRID plotly example
<https://pypsa.org/examples/scigrid-lopf-then-pf-plotly.html>`_.

back to top