legume.viz.structure

legume.viz.structure(struct, Nx=100, Ny=100, Nz=50, cladding=False, cbar=True, cmap='Greys', gridspec=None, fig=None, figsize=None, xy=True, xz=False, yz=False)

Plot permittivity for all cross sections of a photonic crystal

Parameters:
  • struct (GuidedModeExp or PlaneWaveExp) –
  • Nx (int, optional) – Number of sample points to use in x-direction. Default is 100.
  • Ny (int, optional) – Number of sample points to use in y-direction. Default is 100.
  • Nz (int, optional) – Number of sample points to use in z-direction. Default is 50.
  • cladding (bool, optional) – Whether or not the cladding should be plotted. Default is False.
  • cbar (bool, optional) – Whether or not a colorbar should be added to the plot. Default is False.
  • cmap (bool, optional) – Matplotlib colormap to use for plot Default is ‘Greys’.
  • gridspec (Matplotlib gridspec object, optional) – Gridspec to use for creating the plots. Default is None.
  • fig (Matplotlib figure object, optional) – Figure to use for creating the plots. Default is None.
  • figsize (int, float or tuple, optional) – Size of Matplotlib figure to create. Default is None, which sets the width to 4in and the height depending on the aspect ratios. If int or float, it’s taken as the figure width.
  • xy (bool, optional) – Plot the xy cross-section in every layer. Default is True.
  • xz (bool, optional) – Also plot an xz cross-section. Default is False.
  • yz (bool, optional) – Also plot a yz cross-section. Default is False.