def plot_hand_3d(coords_xyz, axis, color_fixed=None, linewidth='1'):
    ' Plots a hand stick figure into a matplotlib figure. '
    colors = np.array([[0.0, 0.0, 0.5], [0.0, 0.0, 0.73172906], [0.0, 0.0, 0.96345811], [0.0, 0.12745098, 1.0], [0.0, 0.33137255, 1.0], [0.0, 0.55098039, 1.0], [0.0, 0.75490196, 1.0], [0.06008855, 0.9745098, 0.90765338], [0.22454143, 1.0, 0.74320051], [0.40164453, 1.0, 0.56609741], [0.56609741, 1.0, 0.40164453], [0.74320051, 1.0, 0.22454143], [0.90765338, 1.0, 0.06008855], [1.0, 0.82861293, 0.0], [1.0, 0.63979666, 0.0], [1.0, 0.43645606, 0.0], [1.0, 0.2476398, 0.0], [0.96345811, 0.0442992, 0.0], [0.73172906, 0.0, 0.0], [0.5, 0.0, 0.0]])
    bones = [((0, 4), colors[0, :]), ((4, 3), colors[1, :]), ((3, 2), colors[2, :]), ((2, 1), colors[3, :]), ((0, 8), colors[4, :]), ((8, 7), colors[5, :]), ((7, 6), colors[6, :]), ((6, 5), colors[7, :]), ((0, 12), colors[8, :]), ((12, 11), colors[9, :]), ((11, 10), colors[10, :]), ((10, 9), colors[11, :]), ((0, 16), colors[12, :]), ((16, 15), colors[13, :]), ((15, 14), colors[14, :]), ((14, 13), colors[15, :]), ((0, 20), colors[16, :]), ((20, 19), colors[17, :]), ((19, 18), colors[18, :]), ((18, 17), colors[19, :])]
    for (connection, color) in bones:
        coord1 = coords_xyz[connection[0], :]
        coord2 = coords_xyz[connection[1], :]
        coords = np.stack([coord1, coord2])
        if (color_fixed is None):
            axis.plot(coords[:, 0], coords[:, 1], coords[:, 2], color=color, linewidth=linewidth)
        else:
            axis.plot(coords[:, 0], coords[:, 1], coords[:, 2], color_fixed, linewidth=linewidth)
    axis.view_init(azim=(- 90.0), elev=90.0)
Plots a hand stick figure into a matplotlib figure.
def plot_hand_3d(coords_xyz, axis, color_fixed=None, linewidth='1'):
    '  '
    colors = np.array([[0.0, 0.0, 0.5], [0.0, 0.0, 0.73172906], [0.0, 0.0, 0.96345811], [0.0, 0.12745098, 1.0], [0.0, 0.33137255, 1.0], [0.0, 0.55098039, 1.0], [0.0, 0.75490196, 1.0], [0.06008855, 0.9745098, 0.90765338], [0.22454143, 1.0, 0.74320051], [0.40164453, 1.0, 0.56609741], [0.56609741, 1.0, 0.40164453], [0.74320051, 1.0, 0.22454143], [0.90765338, 1.0, 0.06008855], [1.0, 0.82861293, 0.0], [1.0, 0.63979666, 0.0], [1.0, 0.43645606, 0.0], [1.0, 0.2476398, 0.0], [0.96345811, 0.0442992, 0.0], [0.73172906, 0.0, 0.0], [0.5, 0.0, 0.0]])
    bones = [((0, 4), colors[0, :]), ((4, 3), colors[1, :]), ((3, 2), colors[2, :]), ((2, 1), colors[3, :]), ((0, 8), colors[4, :]), ((8, 7), colors[5, :]), ((7, 6), colors[6, :]), ((6, 5), colors[7, :]), ((0, 12), colors[8, :]), ((12, 11), colors[9, :]), ((11, 10), colors[10, :]), ((10, 9), colors[11, :]), ((0, 16), colors[12, :]), ((16, 15), colors[13, :]), ((15, 14), colors[14, :]), ((14, 13), colors[15, :]), ((0, 20), colors[16, :]), ((20, 19), colors[17, :]), ((19, 18), colors[18, :]), ((18, 17), colors[19, :])]
    for (connection, color) in bones:
        coord1 = coords_xyz[connection[0], :]
        coord2 = coords_xyz[connection[1], :]
        coords = np.stack([coord1, coord2])
        if (color_fixed is None):
            axis.plot(coords[:, 0], coords[:, 1], coords[:, 2], color=color, linewidth=linewidth)
        else:
            axis.plot(coords[:, 0], coords[:, 1], coords[:, 2], color_fixed, linewidth=linewidth)
    axis.view_init(azim=(- 90.0), elev=90.0)