@@ -677,11 +677,8 @@ def plot_structures(
677
677
medium_map = self .medium_map
678
678
679
679
for (medium , shape ) in medium_shapes :
680
- if medium != self .medium :
681
- mat_index = medium_map [medium ]
682
- ax = self ._plot_shape_structure (
683
- medium = medium , mat_index = mat_index , shape = shape , ax = ax
684
- )
680
+ mat_index = medium_map [medium ]
681
+ ax = self ._plot_shape_structure (medium = medium , mat_index = mat_index , shape = shape , ax = ax )
685
682
686
683
ax = self ._set_plot_bounds (ax = ax , x = x , y = y , z = z )
687
684
@@ -773,15 +770,19 @@ def plot_structures_eps( # pylint: disable=too-many-arguments,too-many-locals
773
770
The supplied or created matplotlib axes.
774
771
"""
775
772
776
- structures = [self .background_structure ] + self .structures
773
+ structures = self .structures
774
+ alpha_used = alpha is not None and 0 < alpha < 1
777
775
778
- if alpha is not None and alpha < 1 :
776
+ if alpha_used :
779
777
medium_shapes = self ._filter_structures_plane (structures = structures , x = x , y = y , z = z )
780
778
else :
779
+ structures = [self .background_structure ] + structures
781
780
medium_shapes = self ._get_structures_plane (structures = structures , x = x , y = y , z = z )
782
781
783
782
eps_min , eps_max = self .eps_bounds (freq = freq )
784
783
for (medium , shape ) in medium_shapes :
784
+ if medium == self .medium and alpha_used :
785
+ continue
785
786
ax = self ._plot_shape_structure_eps (
786
787
freq = freq ,
787
788
alpha = alpha ,
0 commit comments