Skip to content

Commit

Permalink
Merge branch 'develop' into chore/python_3_8_eol
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohmeier committed Aug 27, 2024
2 parents 03a8bce + 6a012d9 commit 4cc5266
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pandapipes/plotting/plotting_toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ def get_collection_sizes(net, junction_size=1.0, ext_grid_size=1.0, sink_size=1.
:type heat_consumer_size: float, default 1.
:return: sizes (dict) - dictionary containing all scaled sizes
"""
mean_distance_between_junctions = sum((net['junction_geodata'].max() - net[
'junction_geodata'].min()).dropna() / 200)
mean_distance_between_junctions = sum(
(np.max(net['junction_geodata'].loc[:, ["x", "y"]].to_numpy(), axis=0)
- np.min(net['junction_geodata'].loc[:, ["x", "y"]].to_numpy(), axis=0))
/ 200
)

sizes = {
"junction": junction_size * mean_distance_between_junctions,
Expand Down

0 comments on commit 4cc5266

Please sign in to comment.