Skip to content

Commit

Permalink
Merge pull request e2nIEE#590 from FlorianShepherd/develop
Browse files Browse the repository at this point in the history
plot fix for sgen and load collection 🐑
  • Loading branch information
Florian Schaefer authored Dec 24, 2019
2 parents 288bcca + ac99a97 commit 5587aee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandapower/plotting/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ def create_load_collection(net, loads=None, size=1., infofunc=None, orientation=
if loads is None:
loads = net.load.index
infos = [infofunc(i) for i in range(len(loads))] if infofunc is not None else []
node_coords = net.bus_geodata.loc[:, ["x", "y"]].values[net.load.loc[loads, "bus"].values]
node_coords = net.bus_geodata.loc[net.load.loc[loads, "bus"].values, ["x", "y"]].values
load_pc, load_lc = _create_node_element_collection(
node_coords, load_patches, size=size, infos=infos, orientation=orientation,
picker=picker, **kwargs)
Expand Down Expand Up @@ -869,7 +869,7 @@ def create_sgen_collection(net, sgens=None, size=1., infofunc=None, orientation=
if sgens is None:
sgens = net.sgen.index
infos = [infofunc(i) for i in range(len(sgens))] if infofunc is not None else []
node_coords = net.bus_geodata.loc[:, ["x", "y"]].values[net.sgen.loc[sgens, "bus"].values]
node_coords = net.bus_geodata.loc[net.sgen.loc[sgens, "bus"].values, ["x", "y"]].values
sgen_pc, sgen_lc = _create_node_element_collection(
node_coords, sgen_patches, size=size, infos=infos, orientation=orientation,
picker=picker, **kwargs)
Expand Down

0 comments on commit 5587aee

Please sign in to comment.