Skip to content

Commit

Permalink
plot ext grid as a symbol instead of a patch
Browse files Browse the repository at this point in the history
  • Loading branch information
rbolgaryn committed Oct 18, 2021
1 parent 0a7b232 commit 8716627
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pandapower/plotting/simple_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pandapower.plotting.plotting_toolbox import get_collection_sizes
from pandapower.plotting.collections import create_bus_collection, create_line_collection, \
create_trafo_collection, create_trafo3w_collection, \
create_line_switch_collection, draw_collections, create_bus_bus_switch_collection, create_sgen_collection, \
create_line_switch_collection, draw_collections, create_bus_bus_switch_collection, create_ext_grid_collection, create_sgen_collection, \
create_gen_collection, create_load_collection
from pandapower.plotting.generic_geodata import create_generic_coordinates

Expand Down Expand Up @@ -130,8 +130,9 @@ def simple_plot(net, respect_switches=False, line_width=1.0, bus_size=1.0, ext_g
# create ext_grid collections
eg_buses_with_geo_coordinates = set(net.ext_grid.bus.values) & set(net.bus_geodata.index)
if len(eg_buses_with_geo_coordinates) > 0:
sc = create_bus_collection(net, eg_buses_with_geo_coordinates, patch_type="rect",
size=ext_grid_size, color=ext_grid_color, zorder=11)
sc = create_ext_grid_collection(net, size=ext_grid_size, orientation=0, ext_grids=eg_buses_with_geo_coordinates)
# sc = create_bus_collection(net, eg_buses_with_geo_coordinates, patch_type="rect",
# size=ext_grid_size, color=ext_grid_color, zorder=11)
collections.append(sc)

# create trafo collection if trafo is available
Expand Down Expand Up @@ -159,7 +160,7 @@ def simple_plot(net, respect_switches=False, line_width=1.0, bus_size=1.0, ext_g
collections.append(sc)

if plot_sgens and len(net.sgen):
sgc = create_sgen_collection(net, size=sgen_size)
sgc = create_sgen_collection(net, size=sgen_size, orientation=0)
collections.append(sgc)
if plot_gens and len(net.gen):
gc = create_gen_collection(net, size=gen_size)
Expand Down

0 comments on commit 8716627

Please sign in to comment.