Skip to content

Commit

Permalink
Decrease bursts transparency in plot_scenes()
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyPechnikov committed Aug 3, 2024
1 parent 4fd7be0 commit 468c0b0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pygmtsar/pygmtsar/Stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,8 @@ def plot_scenes(self, dem='auto', image=None, alpha=None, caption='Estimated Sce

# Calculate overlaps including self-overlap
overlap_count = [sum(1 for geom2 in gdf.geometry if geom1.intersects(geom2)) for geom1 in gdf.geometry]
# define transparency for the calculated overlaps
gdf_alpha = 1/max(overlap_count)
# apply minimum transparency threshold
gdf.reset_index().plot(color=[colors[k] for k in gdf.index], alpha=max(gdf_alpha, 0.002), edgecolor='black', ax=plt.gca())
# define transparency for the calculated overlaps and apply minimum transparency threshold
gdf.reset_index().plot(color=[colors[k] for k in gdf.index], alpha=max(2/max(overlap_count), 0.002), edgecolor='black', ax=plt.gca())
self.plot_AOI(**kwargs)
self.plot_POI(**kwargs)
if aspect is not None:
Expand Down

0 comments on commit 468c0b0

Please sign in to comment.