Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/refactor_plot' into refactor_plot
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/pyedb/common/nets.py
  • Loading branch information
maxcapodi78 committed Nov 18, 2024
2 parents 3a81075 + 3f2ed4d commit 72aaa9f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/pyedb/common/nets.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def create_poly(prim, polys, lines):
continue
h1 = mirror_poly([(i, j) for i, j in zip(xvt, yvt)])
holes.append(h1)
if len(holes)>1:
if len(holes) > 1:
holes = shapely.union_all([Polygon(i) for i in holes])
if isinstance(holes, MultiPolygon):
holes = [i.boundary for i in list(holes.geoms)]
Expand Down Expand Up @@ -351,7 +351,13 @@ def create_poly(prim, polys, lines):
if polys:
ob = MultiPolygon(polys)
plot_polygon(
ob, ax=ax, color=label_colors[label], add_points=False, alpha=0.7, label=label, edgecolor="none" if not plot_edges else edge_colors[label]
ob,
ax=ax,
color=label_colors[label],
add_points=False,
alpha=0.7,
label=label,
edgecolor="none" if not plot_edges else edge_colors[label],
)
if lines:
ob = MultiLineString(p)
Expand Down Expand Up @@ -386,7 +392,7 @@ def create_poly(prim, polys, lines):
color_index = 0
label_colors[label] = c
try:
edge_colors[label] = [i*0.5 for i in c]
edge_colors[label] = [i * 0.5 for i in c]
except TypeError:
edge_colors[label] =label_colors[label]
for prim in prims:
Expand Down

0 comments on commit 72aaa9f

Please sign in to comment.