We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
'plot_gens' unexpected in simple_plot()
It seems that `plot_gens` is an argument in `simple_plot()`, but is not documented. When attempting to set `plot_gens` when calling `simple_plot()`, I get the following error:

> TypeError: simple_plot() got an unexpected keyword argument 'plot_gens'

Version: 2.7.0

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pandapower/plotting/simple_plot.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 
3 # Copyright (c) 2016-2021 by University of Kassel and Fraunhofer Institute for Energy Economics
4 # and Energy System Technology (IEE), Kassel. All rights reserved.
5 
6 
7 import matplotlib.pyplot as plt
8 
9 from pandapower.plotting.plotting_toolbox import get_collection_sizes
10 from pandapower.plotting.collections import create_bus_collection, create_line_collection, \
11     create_trafo_collection, create_trafo3w_collection, \
12     create_line_switch_collection, draw_collections, create_bus_bus_switch_collection, create_sgen_collection, \
13     create_gen_collection, create_load_collection
14 from pandapower.plotting.generic_geodata import create_generic_coordinates
15 
16 try:
17     import pplog as logging
18 except ImportError:
19     import logging
20 
21 logger = logging.getLogger(__name__)
22 
23 
24 def simple_plot(net, respect_switches=False, line_width=1.0, bus_size=1.0, ext_grid_size=1.0,
25                 trafo_size=1.0, plot_loads=False, plot_gens=False, plot_sgens=False, load_size=1.0, gen_size=1.0, sgen_size=1.0,
26                 switch_size=2.0, switch_distance=1.0, plot_line_switches=False, scale_size=True,
27                 bus_color="b", line_color='grey', trafo_color='k', ext_grid_color='y',
28                 switch_color='k', library="igraph", show_plot=True, ax=None):
29     """
30         Plots a pandapower network as simple as possible. If no geodata is available, artificial
31         geodata is generated. For advanced plotting see the tutorial
32 
33         INPUT:
34             **net** - The pandapower format network.
35 
36         OPTIONAL:
37             **respect_switches** (bool, False) - Respect switches if artificial geodata is created.
38                                                 This Flag is ignored if plot_line_switches is True
39 
40             **line_width** (float, 1.0) - width of lines
41 
42             **bus_size** (float, 1.0) - Relative size of buses to plot.
43                                         The value bus_size is multiplied with mean_distance_between_buses, which equals the
44                                         distance between
45                                         the max geoocord and the min divided by 200.
46                                         mean_distance_between_buses = sum((net['bus_geodata'].max() - net['bus_geodata'].min()) / 200)
47 
48             **ext_grid_size** (float, 1.0) - Relative size of ext_grids to plot. See bus sizes for details.
49                                                 Note: ext_grids are plottet as rectangles
50 
51             **trafo_size** (float, 1.0) - Relative size of trafos to plot.
52 
53             **plot_loads** (bool, False) - Flag to decide whether load symbols should be drawn.
54 
55             **plot_sgens** (bool, False) - Flag to decide whether sgen symbols should be drawn.
56 
57             **load_size** (float, 1.0) - Relative size of loads to plot.
58 
59             **sgen_size** (float, 1.0) - Relative size of sgens to plot.
60 
61             **switch_size** (float, 2.0) - Relative size of switches to plot. See bus size for details
62 
63             **switch_distance** (float, 1.0) - Relative distance of the switch to its corresponding \
64                                                bus. See bus size for details
65 
66             **plot_line_switches** (bool, False) - Flag if line switches are plotted
67 
68             **scale_size** (bool, True) - Flag if bus_size, ext_grid_size, bus_size- and distance \
69                                           will be scaled with respect to grid mean distances
70 
71             **bus_color** (String, colors[0]) - Bus Color. Init as first value of color palette. Usually colors[0] = "b".
72 
73             **line_color** (String, 'grey') - Line Color. Init is grey
74 
75             **trafo_color** (String, 'k') - Trafo Color. Init is black
76 
77             **ext_grid_color** (String, 'y') - External Grid Color. Init is yellow
78 
79             **switch_color** (String, 'k') - Switch Color. Init is black
80 
81             **library** (String, "igraph") - library name to create generic coordinates (case of
82                                                 missing geodata). "igraph" to use igraph package or "networkx" to use networkx package.
83 
84             **show_plot** (bool, True) - Shows plot at the end of plotting
85 
86             **ax** (object, None) - matplotlib axis to plot to
87 
88         OUTPUT:
89             **ax** - axes of figure
90     """
91     # don't hide lines if switches are plotted
92     if plot_line_switches:
93         respect_switches = False
94 
95     # create geocoord if none are available
96     if len(net.line_geodata) == 0 and len(net.bus_geodata) == 0:
97         logger.warning("No or insufficient geodata available --> Creating artificial coordinates." +
98                        " This may take some time")
99         create_generic_coordinates(net, respect_switches=respect_switches, library=library)
100 
101     if scale_size:
102         # if scale_size -> calc size from distance between min and max geocoord
103         sizes = get_collection_sizes(net, bus_size, ext_grid_size, trafo_size,
104                                      load_size, sgen_size, switch_size, switch_distance)
105         bus_size = sizes["bus"]
106         ext_grid_size = sizes["ext_grid"]
107         trafo_size = sizes["trafo"]
108         sgen_size = sizes["sgen"]
109         load_size = sizes["load"]
110         switch_size = sizes["switch"]
111         switch_distance = sizes["switch_distance"]
112 
113     # create bus collections to plot
114     bc = create_bus_collection(net, net.bus.index, size=bus_size, color=bus_color, zorder=10)
115 
116     # if bus geodata is available, but no line geodata
117     use_bus_geodata = len(net.line_geodata) == 0
118     in_service_lines = net.line[net.line.in_service].index
119     nogolines = set(net.switch.element[(net.switch.et == "l") & (net.switch.closed == 0)]) \
120         if respect_switches else set()
121     plot_lines = in_service_lines.difference(nogolines)
122 
123     # create line collections
124     lc = create_line_collection(net, plot_lines, color=line_color, linewidths=line_width,
125                                 use_bus_geodata=use_bus_geodata)
126     collections = [bc, lc]
127 
128     # create ext_grid collections
129     eg_buses_with_geo_coordinates = set(net.ext_grid.bus.values) & set(net.bus_geodata.index)
130     if len(eg_buses_with_geo_coordinates) > 0:
131         sc = create_bus_collection(net, eg_buses_with_geo_coordinates, patch_type="rect",
132                                    size=ext_grid_size, color=ext_grid_color, zorder=11)
133         collections.append(sc)
134 
135     # create trafo collection if trafo is available
136     trafo_buses_with_geo_coordinates = [t for t, trafo in net.trafo.iterrows()
137                                         if trafo.hv_bus in net.bus_geodata.index and
138                                         trafo.lv_bus in net.bus_geodata.index]
139     if len(trafo_buses_with_geo_coordinates) > 0:
140         tc = create_trafo_collection(net, trafo_buses_with_geo_coordinates,
141                                      color=trafo_color, size=trafo_size)
142         collections.append(tc)
143 
144     # create trafo3w collection if trafo3w is available
145     trafo3w_buses_with_geo_coordinates = [
146         t for t, trafo3w in net.trafo3w.iterrows() if trafo3w.hv_bus in net.bus_geodata.index and
147                                                       trafo3w.mv_bus in net.bus_geodata.index and trafo3w.lv_bus in net.bus_geodata.index]
148     if len(trafo3w_buses_with_geo_coordinates) > 0:
149         tc = create_trafo3w_collection(net, trafo3w_buses_with_geo_coordinates,
150                                        color=trafo_color)
151         collections.append(tc)
152 
153     if plot_line_switches and len(net.switch):
154         sc = create_line_switch_collection(
155             net, size=switch_size, distance_to_bus=switch_distance,
156             use_line_geodata=not use_bus_geodata, zorder=12, color=switch_color)
157         collections.append(sc)
158 
159     if plot_sgens and len(net.sgen):
160         sgc = create_sgen_collection(net, size=sgen_size)
161         collections.append(sgc)
162     if plot_gens and len(net.gen):
163         gc = create_gen_collection(net, size=gen_size)
164         collections.append(gc)
165     if plot_loads and len(net.load):
166         lc = create_load_collection(net, size=load_size)
167         collections.append(lc)
168 
169     if len(net.switch):
170         bsc = create_bus_bus_switch_collection(net, size=switch_size)
171         collections.append(bsc)
172 
173     ax = draw_collections(collections, ax=ax)
174     if show_plot:
175         plt.show()
176     return ax
177 
178 
179 if __name__ == "__main__":
180     import pandapower.networks as nw
181 
182     net = nw.case145()
183     #    net = nw.create_cigre_network_mv()
184     #    net = nw.mv_oberrhein()
185     simple_plot(net, bus_size=0.4)
186
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/pandapower/plotting/simple_plot.py b/pandapower/plotting/simple_plot.py
--- a/pandapower/plotting/simple_plot.py
+++ b/pandapower/plotting/simple_plot.py
@@ -51,6 +51,8 @@
             **trafo_size** (float, 1.0) - Relative size of trafos to plot.
 
             **plot_loads** (bool, False) - Flag to decide whether load symbols should be drawn.
+            
+            **plot_gens** (bool, False) - Flag to decide whether gen symbols should be drawn.
 
             **plot_sgens** (bool, False) - Flag to decide whether sgen symbols should be drawn.

{"golden_diff": "diff --git a/pandapower/plotting/simple_plot.py b/pandapower/plotting/simple_plot.py\n--- a/pandapower/plotting/simple_plot.py\n+++ b/pandapower/plotting/simple_plot.py\n@@ -51,6 +51,8 @@\n             **trafo_size** (float, 1.0) - Relative size of trafos to plot.\n \n             **plot_loads** (bool, False) - Flag to decide whether load symbols should be drawn.\n+            \n+            **plot_gens** (bool, False) - Flag to decide whether gen symbols should be drawn.\n \n             **plot_sgens** (bool, False) - Flag to decide whether sgen symbols should be drawn.\n", "issue": "'plot_gens' unexpected in simple_plot()\nIt seems that `plot_gens` is an argument in `simple_plot()`, but is not documented. When attempting to set `plot_gens` when calling `simple_plot()`, I get the following error:\r\n\r\n> TypeError: simple_plot() got an unexpected keyword argument 'plot_gens'\r\n\r\nVersion: 2.7.0\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2021 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\n\nimport matplotlib.pyplot as plt\n\nfrom pandapower.plotting.plotting_toolbox import get_collection_sizes\nfrom pandapower.plotting.collections import create_bus_collection, create_line_collection, \\\n    create_trafo_collection, create_trafo3w_collection, \\\n    create_line_switch_collection, draw_collections, create_bus_bus_switch_collection, create_sgen_collection, \\\n    create_gen_collection, create_load_collection\nfrom pandapower.plotting.generic_geodata import create_generic_coordinates\n\ntry:\n    import pplog as logging\nexcept ImportError:\n    import logging\n\nlogger = logging.getLogger(__name__)\n\n\ndef simple_plot(net, respect_switches=False, line_width=1.0, bus_size=1.0, ext_grid_size=1.0,\n                trafo_size=1.0, plot_loads=False, plot_gens=False, plot_sgens=False, load_size=1.0, gen_size=1.0, sgen_size=1.0,\n                switch_size=2.0, switch_distance=1.0, plot_line_switches=False, scale_size=True,\n                bus_color=\"b\", line_color='grey', trafo_color='k', ext_grid_color='y',\n                switch_color='k', library=\"igraph\", show_plot=True, ax=None):\n    \"\"\"\n        Plots a pandapower network as simple as possible. If no geodata is available, artificial\n        geodata is generated. For advanced plotting see the tutorial\n\n        INPUT:\n            **net** - The pandapower format network.\n\n        OPTIONAL:\n            **respect_switches** (bool, False) - Respect switches if artificial geodata is created.\n                                                This Flag is ignored if plot_line_switches is True\n\n            **line_width** (float, 1.0) - width of lines\n\n            **bus_size** (float, 1.0) - Relative size of buses to plot.\n                                        The value bus_size is multiplied with mean_distance_between_buses, which equals the\n                                        distance between\n                                        the max geoocord and the min divided by 200.\n                                        mean_distance_between_buses = sum((net['bus_geodata'].max() - net['bus_geodata'].min()) / 200)\n\n            **ext_grid_size** (float, 1.0) - Relative size of ext_grids to plot. See bus sizes for details.\n                                                Note: ext_grids are plottet as rectangles\n\n            **trafo_size** (float, 1.0) - Relative size of trafos to plot.\n\n            **plot_loads** (bool, False) - Flag to decide whether load symbols should be drawn.\n\n            **plot_sgens** (bool, False) - Flag to decide whether sgen symbols should be drawn.\n\n            **load_size** (float, 1.0) - Relative size of loads to plot.\n\n            **sgen_size** (float, 1.0) - Relative size of sgens to plot.\n\n            **switch_size** (float, 2.0) - Relative size of switches to plot. See bus size for details\n\n            **switch_distance** (float, 1.0) - Relative distance of the switch to its corresponding \\\n                                               bus. See bus size for details\n\n            **plot_line_switches** (bool, False) - Flag if line switches are plotted\n\n            **scale_size** (bool, True) - Flag if bus_size, ext_grid_size, bus_size- and distance \\\n                                          will be scaled with respect to grid mean distances\n\n            **bus_color** (String, colors[0]) - Bus Color. Init as first value of color palette. Usually colors[0] = \"b\".\n\n            **line_color** (String, 'grey') - Line Color. Init is grey\n\n            **trafo_color** (String, 'k') - Trafo Color. Init is black\n\n            **ext_grid_color** (String, 'y') - External Grid Color. Init is yellow\n\n            **switch_color** (String, 'k') - Switch Color. Init is black\n\n            **library** (String, \"igraph\") - library name to create generic coordinates (case of\n                                                missing geodata). \"igraph\" to use igraph package or \"networkx\" to use networkx package.\n\n            **show_plot** (bool, True) - Shows plot at the end of plotting\n\n            **ax** (object, None) - matplotlib axis to plot to\n\n        OUTPUT:\n            **ax** - axes of figure\n    \"\"\"\n    # don't hide lines if switches are plotted\n    if plot_line_switches:\n        respect_switches = False\n\n    # create geocoord if none are available\n    if len(net.line_geodata) == 0 and len(net.bus_geodata) == 0:\n        logger.warning(\"No or insufficient geodata available --> Creating artificial coordinates.\" +\n                       \" This may take some time\")\n        create_generic_coordinates(net, respect_switches=respect_switches, library=library)\n\n    if scale_size:\n        # if scale_size -> calc size from distance between min and max geocoord\n        sizes = get_collection_sizes(net, bus_size, ext_grid_size, trafo_size,\n                                     load_size, sgen_size, switch_size, switch_distance)\n        bus_size = sizes[\"bus\"]\n        ext_grid_size = sizes[\"ext_grid\"]\n        trafo_size = sizes[\"trafo\"]\n        sgen_size = sizes[\"sgen\"]\n        load_size = sizes[\"load\"]\n        switch_size = sizes[\"switch\"]\n        switch_distance = sizes[\"switch_distance\"]\n\n    # create bus collections to plot\n    bc = create_bus_collection(net, net.bus.index, size=bus_size, color=bus_color, zorder=10)\n\n    # if bus geodata is available, but no line geodata\n    use_bus_geodata = len(net.line_geodata) == 0\n    in_service_lines = net.line[net.line.in_service].index\n    nogolines = set(net.switch.element[(net.switch.et == \"l\") & (net.switch.closed == 0)]) \\\n        if respect_switches else set()\n    plot_lines = in_service_lines.difference(nogolines)\n\n    # create line collections\n    lc = create_line_collection(net, plot_lines, color=line_color, linewidths=line_width,\n                                use_bus_geodata=use_bus_geodata)\n    collections = [bc, lc]\n\n    # create ext_grid collections\n    eg_buses_with_geo_coordinates = set(net.ext_grid.bus.values) & set(net.bus_geodata.index)\n    if len(eg_buses_with_geo_coordinates) > 0:\n        sc = create_bus_collection(net, eg_buses_with_geo_coordinates, patch_type=\"rect\",\n                                   size=ext_grid_size, color=ext_grid_color, zorder=11)\n        collections.append(sc)\n\n    # create trafo collection if trafo is available\n    trafo_buses_with_geo_coordinates = [t for t, trafo in net.trafo.iterrows()\n                                        if trafo.hv_bus in net.bus_geodata.index and\n                                        trafo.lv_bus in net.bus_geodata.index]\n    if len(trafo_buses_with_geo_coordinates) > 0:\n        tc = create_trafo_collection(net, trafo_buses_with_geo_coordinates,\n                                     color=trafo_color, size=trafo_size)\n        collections.append(tc)\n\n    # create trafo3w collection if trafo3w is available\n    trafo3w_buses_with_geo_coordinates = [\n        t for t, trafo3w in net.trafo3w.iterrows() if trafo3w.hv_bus in net.bus_geodata.index and\n                                                      trafo3w.mv_bus in net.bus_geodata.index and trafo3w.lv_bus in net.bus_geodata.index]\n    if len(trafo3w_buses_with_geo_coordinates) > 0:\n        tc = create_trafo3w_collection(net, trafo3w_buses_with_geo_coordinates,\n                                       color=trafo_color)\n        collections.append(tc)\n\n    if plot_line_switches and len(net.switch):\n        sc = create_line_switch_collection(\n            net, size=switch_size, distance_to_bus=switch_distance,\n            use_line_geodata=not use_bus_geodata, zorder=12, color=switch_color)\n        collections.append(sc)\n\n    if plot_sgens and len(net.sgen):\n        sgc = create_sgen_collection(net, size=sgen_size)\n        collections.append(sgc)\n    if plot_gens and len(net.gen):\n        gc = create_gen_collection(net, size=gen_size)\n        collections.append(gc)\n    if plot_loads and len(net.load):\n        lc = create_load_collection(net, size=load_size)\n        collections.append(lc)\n\n    if len(net.switch):\n        bsc = create_bus_bus_switch_collection(net, size=switch_size)\n        collections.append(bsc)\n\n    ax = draw_collections(collections, ax=ax)\n    if show_plot:\n        plt.show()\n    return ax\n\n\nif __name__ == \"__main__\":\n    import pandapower.networks as nw\n\n    net = nw.case145()\n    #    net = nw.create_cigre_network_mv()\n    #    net = nw.mv_oberrhein()\n    simple_plot(net, bus_size=0.4)\n", "path": "pandapower/plotting/simple_plot.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2021 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\n\nimport matplotlib.pyplot as plt\n\nfrom pandapower.plotting.plotting_toolbox import get_collection_sizes\nfrom pandapower.plotting.collections import create_bus_collection, create_line_collection, \\\n    create_trafo_collection, create_trafo3w_collection, \\\n    create_line_switch_collection, draw_collections, create_bus_bus_switch_collection, create_sgen_collection, \\\n    create_gen_collection, create_load_collection\nfrom pandapower.plotting.generic_geodata import create_generic_coordinates\n\ntry:\n    import pplog as logging\nexcept ImportError:\n    import logging\n\nlogger = logging.getLogger(__name__)\n\n\ndef simple_plot(net, respect_switches=False, line_width=1.0, bus_size=1.0, ext_grid_size=1.0,\n                trafo_size=1.0, plot_loads=False, plot_gens=False, plot_sgens=False, load_size=1.0, gen_size=1.0, sgen_size=1.0,\n                switch_size=2.0, switch_distance=1.0, plot_line_switches=False, scale_size=True,\n                bus_color=\"b\", line_color='grey', trafo_color='k', ext_grid_color='y',\n                switch_color='k', library=\"igraph\", show_plot=True, ax=None):\n    \"\"\"\n        Plots a pandapower network as simple as possible. If no geodata is available, artificial\n        geodata is generated. For advanced plotting see the tutorial\n\n        INPUT:\n            **net** - The pandapower format network.\n\n        OPTIONAL:\n            **respect_switches** (bool, False) - Respect switches if artificial geodata is created.\n                                                This Flag is ignored if plot_line_switches is True\n\n            **line_width** (float, 1.0) - width of lines\n\n            **bus_size** (float, 1.0) - Relative size of buses to plot.\n                                        The value bus_size is multiplied with mean_distance_between_buses, which equals the\n                                        distance between\n                                        the max geoocord and the min divided by 200.\n                                        mean_distance_between_buses = sum((net['bus_geodata'].max() - net['bus_geodata'].min()) / 200)\n\n            **ext_grid_size** (float, 1.0) - Relative size of ext_grids to plot. See bus sizes for details.\n                                                Note: ext_grids are plottet as rectangles\n\n            **trafo_size** (float, 1.0) - Relative size of trafos to plot.\n\n            **plot_loads** (bool, False) - Flag to decide whether load symbols should be drawn.\n            \n            **plot_gens** (bool, False) - Flag to decide whether gen symbols should be drawn.\n\n            **plot_sgens** (bool, False) - Flag to decide whether sgen symbols should be drawn.\n\n            **load_size** (float, 1.0) - Relative size of loads to plot.\n\n            **sgen_size** (float, 1.0) - Relative size of sgens to plot.\n\n            **switch_size** (float, 2.0) - Relative size of switches to plot. See bus size for details\n\n            **switch_distance** (float, 1.0) - Relative distance of the switch to its corresponding \\\n                                               bus. See bus size for details\n\n            **plot_line_switches** (bool, False) - Flag if line switches are plotted\n\n            **scale_size** (bool, True) - Flag if bus_size, ext_grid_size, bus_size- and distance \\\n                                          will be scaled with respect to grid mean distances\n\n            **bus_color** (String, colors[0]) - Bus Color. Init as first value of color palette. Usually colors[0] = \"b\".\n\n            **line_color** (String, 'grey') - Line Color. Init is grey\n\n            **trafo_color** (String, 'k') - Trafo Color. Init is black\n\n            **ext_grid_color** (String, 'y') - External Grid Color. Init is yellow\n\n            **switch_color** (String, 'k') - Switch Color. Init is black\n\n            **library** (String, \"igraph\") - library name to create generic coordinates (case of\n                                                missing geodata). \"igraph\" to use igraph package or \"networkx\" to use networkx package.\n\n            **show_plot** (bool, True) - Shows plot at the end of plotting\n\n            **ax** (object, None) - matplotlib axis to plot to\n\n        OUTPUT:\n            **ax** - axes of figure\n    \"\"\"\n    # don't hide lines if switches are plotted\n    if plot_line_switches:\n        respect_switches = False\n\n    # create geocoord if none are available\n    if len(net.line_geodata) == 0 and len(net.bus_geodata) == 0:\n        logger.warning(\"No or insufficient geodata available --> Creating artificial coordinates.\" +\n                       \" This may take some time\")\n        create_generic_coordinates(net, respect_switches=respect_switches, library=library)\n\n    if scale_size:\n        # if scale_size -> calc size from distance between min and max geocoord\n        sizes = get_collection_sizes(net, bus_size, ext_grid_size, trafo_size,\n                                     load_size, sgen_size, switch_size, switch_distance)\n        bus_size = sizes[\"bus\"]\n        ext_grid_size = sizes[\"ext_grid\"]\n        trafo_size = sizes[\"trafo\"]\n        sgen_size = sizes[\"sgen\"]\n        load_size = sizes[\"load\"]\n        switch_size = sizes[\"switch\"]\n        switch_distance = sizes[\"switch_distance\"]\n\n    # create bus collections to plot\n    bc = create_bus_collection(net, net.bus.index, size=bus_size, color=bus_color, zorder=10)\n\n    # if bus geodata is available, but no line geodata\n    use_bus_geodata = len(net.line_geodata) == 0\n    in_service_lines = net.line[net.line.in_service].index\n    nogolines = set(net.switch.element[(net.switch.et == \"l\") & (net.switch.closed == 0)]) \\\n        if respect_switches else set()\n    plot_lines = in_service_lines.difference(nogolines)\n\n    # create line collections\n    lc = create_line_collection(net, plot_lines, color=line_color, linewidths=line_width,\n                                use_bus_geodata=use_bus_geodata)\n    collections = [bc, lc]\n\n    # create ext_grid collections\n    eg_buses_with_geo_coordinates = set(net.ext_grid.bus.values) & set(net.bus_geodata.index)\n    if len(eg_buses_with_geo_coordinates) > 0:\n        sc = create_bus_collection(net, eg_buses_with_geo_coordinates, patch_type=\"rect\",\n                                   size=ext_grid_size, color=ext_grid_color, zorder=11)\n        collections.append(sc)\n\n    # create trafo collection if trafo is available\n    trafo_buses_with_geo_coordinates = [t for t, trafo in net.trafo.iterrows()\n                                        if trafo.hv_bus in net.bus_geodata.index and\n                                        trafo.lv_bus in net.bus_geodata.index]\n    if len(trafo_buses_with_geo_coordinates) > 0:\n        tc = create_trafo_collection(net, trafo_buses_with_geo_coordinates,\n                                     color=trafo_color, size=trafo_size)\n        collections.append(tc)\n\n    # create trafo3w collection if trafo3w is available\n    trafo3w_buses_with_geo_coordinates = [\n        t for t, trafo3w in net.trafo3w.iterrows() if trafo3w.hv_bus in net.bus_geodata.index and\n                                                      trafo3w.mv_bus in net.bus_geodata.index and trafo3w.lv_bus in net.bus_geodata.index]\n    if len(trafo3w_buses_with_geo_coordinates) > 0:\n        tc = create_trafo3w_collection(net, trafo3w_buses_with_geo_coordinates,\n                                       color=trafo_color)\n        collections.append(tc)\n\n    if plot_line_switches and len(net.switch):\n        sc = create_line_switch_collection(\n            net, size=switch_size, distance_to_bus=switch_distance,\n            use_line_geodata=not use_bus_geodata, zorder=12, color=switch_color)\n        collections.append(sc)\n\n    if plot_sgens and len(net.sgen):\n        sgc = create_sgen_collection(net, size=sgen_size)\n        collections.append(sgc)\n    if plot_gens and len(net.gen):\n        gc = create_gen_collection(net, size=gen_size)\n        collections.append(gc)\n    if plot_loads and len(net.load):\n        lc = create_load_collection(net, size=load_size)\n        collections.append(lc)\n\n    if len(net.switch):\n        bsc = create_bus_bus_switch_collection(net, size=switch_size)\n        collections.append(bsc)\n\n    ax = draw_collections(collections, ax=ax)\n    if show_plot:\n        plt.show()\n    return ax\n\n\nif __name__ == \"__main__\":\n    import pandapower.networks as nw\n\n    net = nw.case145()\n    #    net = nw.create_cigre_network_mv()\n    #    net = nw.mv_oberrhein()\n    simple_plot(net, bus_size=0.4)\n", "path": "pandapower/plotting/simple_plot.py"}]}