Plotting

This submodule contains all functions for plotting Z2Pack results.

z2pack.plot.chern(surface_result, *, axis=None, settings={'color': 'r', 'marker': 'o', 'markerfacecolor': 'r'})[source]

Plots the sum of WCCs (polarization) (y-axis) against the t-points (x-axis).

Parameters
Returns

matplotlib.figure.Figure instance (only for axis=None).

z2pack.plot.wcc(surface_result, *, axis=None, wcc_settings={'edgecolors': 'k', 'facecolor': 'none', 'lw': 1.0, 's': 50.0}, gaps=True, gap_settings={'color': 'b', 'linestyle': 'none', 'marker': 'D'})[source]

Plots the WCCs and the largest gaps (y-axis) against the t-points (x-axis).

Parameters
  • surface_result (SurfaceResult or SurfaceData) – Result for which the plot is drawn.

  • axis (matplotlib.axes.Axes) – Axis where the plot is drawn

  • wcc_settings (dict) – Keyword arguments for the scatter plot of the wcc positions.

  • gaps (bool) – Controls whether the largest gaps are shown. Default: True

  • gap_settings (dict) – Keyword arguments for the plot of the gap positions.

Returns

matplotlib.figure.Figure instance (only for axis=None).

z2pack.plot.wcc_3d(volume_result, *, axis=None, settings={})[source]

Plots the WCCs (z-axis) for a volume calculation against their reciprocal space coordinates.

Parameters
  • volume_result (VolumeResult or VolumeData) – Result for which the plot is drawn.

  • axis (matplotlib.axes.Axes3DSubplot) – Axis where the plot is drawn

  • settings (dict) – Settings passed to the scatter function.

z2pack.plot.wcc_symmetry(surface_result, *, axis=None, symmetry_operator, wcc_settings={'lw': 1.0, 's': 50.0}, gaps=True, gap_settings={'color': 'b', 'linestyle': 'none', 'marker': 'D'}, color_fct=<function <lambda>>)[source]

Plots the WCCs and the largest gaps (y-axis) against the t-points (x-axis). The WCC are colored according to their symmetry expectation value for a given symmetry operator.

Note

This works only if all lines are created from eigenstates, i.e. they are EigenstateLineData instances (not WccLineData).

Parameters
  • surface_result (SurfaceResult or SurfaceData) – Result for which the plot is drawn.

  • axis (matplotlib.axes.Axes) – Axis where the plot is drawn

  • symmetry_operator (numpy.array) – Symmetry operator according to which the WCC are colored, given as a 2D array.

  • wcc_settings (dict) – Keyword arguments for the scatter plot of the wcc positions.

  • gaps (bool) – Controls whether the largest gaps are printed.

  • gap_settings (dict) – Keyword arguments for the plot of the gap positions.

  • color_fct – Function converting the symmetry operator eigenvalues to color codes.

Returns

matplotlib.figure.Figure instance (only for axis=None).