Construct and display 3D plot of canonical coordinates

def display_weyl(decomps):
    """Construct and display 3D plot of canonical coordinates"""
    tx, ty, tz = list(zip(*decomps))

    rcParams['axes.labelsize'] = 24
    rcParams['font.family'] = 'serif'
    rcParams['font.serif'] = ['Computer Modern Roman']
    rcParams['text.usetex'] = True
    fig = pyplot.figure()
    ax = Axes3D(fig)
    ax.scatter(tx, ty, tz)
    ax.plot((1,), (1,), (1,))
    ax.plot((0, 1, 1/2, 0, 1/2, 1, 1/2, 1/2),
            (0, 0, 1/2, 0, 1/2, 0, 1/2, 1/2),
            (0, 0, 0, 0, 1/2, 0, 0, 1/2))
    ax.plot((0, 1/2, 1, 1/2, 1/2),
            (0, 1/4, 0, 1/4, 1/2),
            (0, 1/4, 0, 1/4, 0))

    points = [(0, 0, 0), (1/4, 0, 0), (1/2, 0, 0), (3/4, 0, 0), (1, 0, 0),
              (1/4, 1/4, 0), (1/2, 1/4, 0), (3/4, 1/4, 0), (1/2, 1/2, 0),
              (1/4, 1/4, 1/4), (1/2, 1/4, 1/4), (3/4, 1/4, 1/4),
              (1/2, 1/2, 1/4), (1/2, 1/2, 1/2)]

    ax.scatter(*zip(*points))
    eps = 0.04
    ax.text(0, 0, 0-2*eps, 'I', ha='center')
    ax.text(1, 0, 0-2*eps, 'I', ha='center')
    ax.text(1/2, 1/2, 0-2*eps, 'iSWAP', ha='center')
    ax.text(1/2, 1/2, 1/2+eps, 'SWAP', ha='center')
    ax.text(1/2, 0, 0-2*eps, 'CNOT', ha='center')

    # More coordinate labels
    # ax.text(1/4-eps, 1/4, 1/4, '$\sqrt{SWAP}$', ha='right')
    # ax.text(3/4+eps, 1/4, 1/4, '$\sqrt{SWAP}^\dagger$', ha='left')
    # ax.text(1/4, 0, 0-2*eps, '$\sqrt{{CNOT}}$', ha='center')
    # ax.text(3/4, 0, 0-2*eps, '$\sqrt{{CNOT}}$', ha='center')
    # ax.text(1/2, 1/4, 0-2*eps, 'B', ha='center')
    # ax.text(1/2, 1/4, 1/4+eps, 'ECP', ha='center')
    # ax.text(1/4, 1/4, 0-2*eps, '$\sqrt{iSWAP}$', ha='center')
    # ax.text(3/4, 1/4, 0-2*eps, '$\sqrt{iSWAP}$', ha='center')
    # ax.text(1/2, 1/2+eps, 1/4, 'PSWAP(1/2)', ha='left')

    ax.set_xlim(0, 1)
    ax.set_ylim(-1/4, 3/4)
    ax.set_zlim(-1/4, 3/4)

    # Get rid of the panes
    ax.w_xaxis.set_pane_color((1.0, 1.0, 1.0, 0.0))
    ax.w_yaxis.set_pane_color((1.0, 1.0, 1.0, 0.0))
    ax.w_zaxis.set_pane_color((1.0, 1.0, 1.0, 0.0))

    # Get rid of the spines
    ax.w_xaxis.line.set_color((1.0, 1.0, 1.0, 0.0))
    ax.w_yaxis.line.set_color((1.0, 1.0, 1.0, 0.0))
    ax.w_zaxis.line.set_color((1.0, 1.0, 1.0, 0.0))

    # Get rid of the ticks
    ax.set_xticks([])
    ax.set_yticks([])
    ax.set_zticks([])

    pyplot.show()