Plotting#

diatomic.plotting.colorline(ax, x, y, colors, linewidth=3)#

Adds a line with colour (and therefore transparency) varying per (x,y) point to ax.

diatomic.plotting.plot_polarization_ellipse(omega, gamma, delta, n_points=400, num_arrows=6)#

Plot the 3D polarization ellipse for:

epsilon = (cos(omega) cos(gamma),
           exp(i delta) sin(gamma),
           -sin(omega) cos(gamma))

The plot includes the k vector, minimalist coordinate axes, the xy plane, the polarization plane, and arrows showing the direction of increasing time.

Angles in radians.

diatomic.plotting.plot_rotational_2d(ax, mol, eigenvector, plot_res=200, format_axes=True)#

Plots eigenvectors rotational distribution in 2d at phi=0, ax’s projection type must be ‘polar’

diatomic.plotting.plot_rotational_3d(ax, mol, eigenvector, plot_res=50)#

Plots eigenvectors rotational distribution in 3D, ax’s projection type must be ‘3d’