@@ -251,7 +251,7 @@ def plot(
251
251
hlim : Optional [tuple [float , float ]] = None ,
252
252
vlim : Optional [tuple [float , float ]] = None ,
253
253
fill_structures : bool = True ,
254
- transpose : bool = False ,
254
+ swap_axes : bool = False ,
255
255
** patch_kwargs ,
256
256
) -> Ax :
257
257
"""Plot each of simulation's components on a plane defined by one nonzero x,y,z coordinate.
@@ -283,23 +283,23 @@ def plot(
283
283
"""
284
284
285
285
hlim , vlim = Scene ._get_plot_lims (
286
- bounds = self .simulation_bounds , x = x , y = y , z = z , hlim = hlim , vlim = vlim , transpose = transpose
286
+ bounds = self .simulation_bounds , x = x , y = y , z = z , hlim = hlim , vlim = vlim , swap_axes = swap_axes
287
287
)
288
288
289
289
ax = self .scene .plot_structures (
290
- ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , fill = fill_structures , transpose = transpose
290
+ ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , fill = fill_structures , swap_axes = swap_axes
291
291
)
292
- ax = self .plot_sources (ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , alpha = source_alpha , transpose = transpose )
293
- ax = self .plot_monitors (ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , alpha = monitor_alpha , transpose = transpose )
292
+ ax = self .plot_sources (ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , alpha = source_alpha , swap_axes = swap_axes )
293
+ ax = self .plot_monitors (ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , alpha = monitor_alpha , swap_axes = swap_axes )
294
294
ax = Scene ._set_plot_bounds (
295
- bounds = self .simulation_bounds , ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , transpose = transpose
295
+ bounds = self .simulation_bounds , ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , swap_axes = swap_axes
296
296
)
297
- ax = self .plot_boundaries (ax = ax , x = x , y = y , z = z , transpose = transpose )
298
- ax = self .plot_symmetries (ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , transpose = transpose )
297
+ ax = self .plot_boundaries (ax = ax , x = x , y = y , z = z , swap_axes = swap_axes )
298
+ ax = self .plot_symmetries (ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , swap_axes = swap_axes )
299
299
300
300
# Add the default axis labels, tick labels, and title
301
301
ax = Box .add_ax_labels_and_title (
302
- ax = ax , x = x , y = y , z = z , plot_length_units = self .plot_length_units , transpose = transpose
302
+ ax = ax , x = x , y = y , z = z , plot_length_units = self .plot_length_units , swap_axes = swap_axes
303
303
)
304
304
305
305
return ax
@@ -315,7 +315,7 @@ def plot_sources(
315
315
vlim : Optional [tuple [float , float ]] = None ,
316
316
alpha : Optional [float ] = None ,
317
317
ax : Ax = None ,
318
- transpose : bool = False ,
318
+ swap_axes : bool = False ,
319
319
) -> Ax :
320
320
"""Plot each of simulation's sources on a plane defined by one nonzero x,y,z coordinate.
321
321
@@ -343,13 +343,13 @@ def plot_sources(
343
343
"""
344
344
bounds = self .bounds
345
345
for source in self .sources :
346
- ax = source .plot (x = x , y = y , z = z , alpha = alpha , ax = ax , sim_bounds = bounds , transpose = transpose )
346
+ ax = source .plot (x = x , y = y , z = z , alpha = alpha , ax = ax , sim_bounds = bounds , swap_axes = swap_axes )
347
347
ax = Scene ._set_plot_bounds (
348
- bounds = self .simulation_bounds , ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , transpose = transpose
348
+ bounds = self .simulation_bounds , ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , swap_axes = swap_axes
349
349
)
350
350
# Add the default axis labels, tick labels, and title
351
351
ax = Box .add_ax_labels_and_title (
352
- ax = ax , x = x , y = y , z = z , plot_length_units = self .plot_length_units , transpose = transpose
352
+ ax = ax , x = x , y = y , z = z , plot_length_units = self .plot_length_units , swap_axes = swap_axes
353
353
)
354
354
return ax
355
355
@@ -364,7 +364,7 @@ def plot_monitors(
364
364
vlim : Optional [tuple [float , float ]] = None ,
365
365
alpha : Optional [float ] = None ,
366
366
ax : Ax = None ,
367
- transpose : bool = False ,
367
+ swap_axes : bool = False ,
368
368
) -> Ax :
369
369
"""Plot each of simulation's monitors on a plane defined by one nonzero x,y,z coordinate.
370
370
@@ -392,13 +392,13 @@ def plot_monitors(
392
392
"""
393
393
bounds = self .bounds
394
394
for monitor in self .monitors :
395
- ax = monitor .plot (x = x , y = y , z = z , alpha = alpha , ax = ax , sim_bounds = bounds , transpose = transpose )
395
+ ax = monitor .plot (x = x , y = y , z = z , alpha = alpha , ax = ax , sim_bounds = bounds , swap_axes = swap_axes )
396
396
ax = Scene ._set_plot_bounds (
397
- bounds = self .simulation_bounds , ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , transpose = transpose
397
+ bounds = self .simulation_bounds , ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , swap_axes = swap_axes
398
398
)
399
399
# Add the default axis labels, tick labels, and title
400
400
ax = Box .add_ax_labels_and_title (
401
- ax = ax , x = x , y = y , z = z , plot_length_units = self .plot_length_units , transpose = transpose
401
+ ax = ax , x = x , y = y , z = z , plot_length_units = self .plot_length_units , swap_axes = swap_axes
402
402
)
403
403
return ax
404
404
@@ -412,7 +412,7 @@ def plot_symmetries(
412
412
hlim : Optional [tuple [float , float ]] = None ,
413
413
vlim : Optional [tuple [float , float ]] = None ,
414
414
ax : Ax = None ,
415
- transpose : bool = False ,
415
+ swap_axes : bool = False ,
416
416
) -> Ax :
417
417
"""Plot each of simulation's symmetries on a plane defined by one nonzero x,y,z coordinate.
418
418
@@ -444,13 +444,13 @@ def plot_symmetries(
444
444
continue
445
445
sym_box = self ._make_symmetry_box (sym_axis = sym_axis )
446
446
plot_params = self ._make_symmetry_plot_params (sym_value = sym_value )
447
- ax = sym_box .plot (x = x , y = y , z = z , ax = ax , transpose = transpose , ** plot_params .to_kwargs ())
447
+ ax = sym_box .plot (x = x , y = y , z = z , ax = ax , swap_axes = swap_axes , ** plot_params .to_kwargs ())
448
448
ax = Scene ._set_plot_bounds (
449
- bounds = self .simulation_bounds , ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , transpose = transpose
449
+ bounds = self .simulation_bounds , ax = ax , x = x , y = y , z = z , hlim = hlim , vlim = vlim , swap_axes = swap_axes
450
450
)
451
451
# Add the default axis labels, tick labels, and title
452
452
ax = Box .add_ax_labels_and_title (
453
- ax = ax , x = x , y = y , z = z , plot_length_units = self .plot_length_units , transpose = transpose
453
+ ax = ax , x = x , y = y , z = z , plot_length_units = self .plot_length_units , swap_axes = swap_axes
454
454
)
455
455
return ax
456
456
@@ -486,7 +486,7 @@ def plot_boundaries(
486
486
y : Optional [float ] = None ,
487
487
z : Optional [float ] = None ,
488
488
ax : Ax = None ,
489
- transpose : bool = False ,
489
+ swap_axes : bool = False ,
490
490
** kwargs ,
491
491
) -> Ax :
492
492
"""Plot the simulation boundary conditions as lines on a plane
@@ -524,7 +524,7 @@ def plot_structures(
524
524
hlim : Optional [tuple [float , float ]] = None ,
525
525
vlim : Optional [tuple [float , float ]] = None ,
526
526
fill : bool = True ,
527
- transpose : bool = False ,
527
+ swap_axes : bool = False ,
528
528
) -> Ax :
529
529
"""Plot each of simulation's structures on a plane defined by one nonzero x,y,z coordinate.
530
530
@@ -551,11 +551,11 @@ def plot_structures(
551
551
"""
552
552
553
553
hlim_new , vlim_new = Scene ._get_plot_lims (
554
- bounds = self .simulation_bounds , x = x , y = y , z = z , hlim = hlim , vlim = vlim , transpose = transpose
554
+ bounds = self .simulation_bounds , x = x , y = y , z = z , hlim = hlim , vlim = vlim , swap_axes = swap_axes
555
555
)
556
556
557
557
return self .scene .plot_structures (
558
- x = x , y = y , z = z , ax = ax , hlim = hlim_new , vlim = vlim_new , fill = fill , transpose = transpose
558
+ x = x , y = y , z = z , ax = ax , hlim = hlim_new , vlim = vlim_new , fill = fill , swap_axes = swap_axes
559
559
)
560
560
561
561
@equal_aspect
@@ -572,7 +572,7 @@ def plot_structures_eps(
572
572
ax : Ax = None ,
573
573
hlim : Optional [tuple [float , float ]] = None ,
574
574
vlim : Optional [tuple [float , float ]] = None ,
575
- transpose : bool = False ,
575
+ swap_axes : bool = False ,
576
576
) -> Ax :
577
577
"""Plot each of simulation's structures on a plane defined by one nonzero x,y,z coordinate.
578
578
The permittivity is plotted in grayscale based on its value at the specified frequency.
@@ -610,7 +610,7 @@ def plot_structures_eps(
610
610
"""
611
611
612
612
hlim , vlim = Scene ._get_plot_lims (
613
- bounds = self .simulation_bounds , x = x , y = y , z = z , hlim = hlim , vlim = vlim , transpose = transpose
613
+ bounds = self .simulation_bounds , x = x , y = y , z = z , hlim = hlim , vlim = vlim , swap_axes = swap_axes
614
614
)
615
615
616
616
return self .scene .plot_structures_eps (
@@ -624,7 +624,7 @@ def plot_structures_eps(
624
624
hlim = hlim ,
625
625
vlim = vlim ,
626
626
reverse = reverse ,
627
- transpose = transpose ,
627
+ swap_axes = swap_axes ,
628
628
)
629
629
630
630
@equal_aspect
@@ -640,7 +640,7 @@ def plot_structures_heat_conductivity(
640
640
ax : Ax = None ,
641
641
hlim : Optional [tuple [float , float ]] = None ,
642
642
vlim : Optional [tuple [float , float ]] = None ,
643
- transpose : bool = False ,
643
+ swap_axes : bool = False ,
644
644
) -> Ax :
645
645
"""Plot each of simulation's structures on a plane defined by one nonzero x,y,z coordinate.
646
646
The permittivity is plotted in grayscale based on its value at the specified frequency.
@@ -678,7 +678,7 @@ def plot_structures_heat_conductivity(
678
678
"""
679
679
680
680
hlim , vlim = Scene ._get_plot_lims (
681
- bounds = self .simulation_bounds , x = x , y = y , z = z , hlim = hlim , vlim = vlim , transpose = transpose
681
+ bounds = self .simulation_bounds , x = x , y = y , z = z , hlim = hlim , vlim = vlim , swap_axes = swap_axes
682
682
)
683
683
684
684
return self .scene .plot_structures_heat_conductivity (
@@ -691,7 +691,7 @@ def plot_structures_heat_conductivity(
691
691
hlim = hlim ,
692
692
vlim = vlim ,
693
693
reverse = reverse ,
694
- transpose = transpose ,
694
+ swap_axes = swap_axes ,
695
695
)
696
696
697
697
@classmethod
0 commit comments