Skip to content

labels in simple_plot #268

Answered by jkisse
ladderup asked this question in Q&A
May 26, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You can add labels, results etc. by using the collection-plotting. For example, if you want to plot the name of a junction next to it:

import numpy as np
from pandapipes.plotting import create_simple_collections, create_pipe_collection, draw_collections
import pandapower.plotting as plot
from matplotlib import pyplot as plt

def plot_with_junction_name(net, plot_junction_indices=True):
    all_coll = create_simple_collections(net, as_dict=True)
    if plot_junction_indices:
        # adapted from https://github.com/e2nIEE/pandapower/blob/develop/tutorials/plotting_basic.ipynb
        junc = net.junction.index.tolist()  # list of all junction indices
        coords = zip(net.junction_geoda…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ladderup
Comment options

Answer selected by jkisse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants