from matplotlib import colors, colormaps, pyplot as plt


def draw_shots(shots, ax):
    cmap = colormaps["autumn"]
    scaled_norm = colors.Normalize(vmin=0.7, vmax=1)

    for shot in shots:
        shot_color = colors.to_hex(cmap(scaled_norm(1-shot["xg"])))
        shot_to_draw = plt.Circle((shot["px"], 68-shot["py"]), 0.5, color=shot_color)
        ax.add_patch(shot_to_draw)
    return ax
