<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def plot_conf(fignum, s, datablock, pars, new):
 """ plots directions and confidence ellipses """

# make the stereonet
    if new == 1:
        plot_net(fignum)
#
#   plot the data
#
    DIblock = []
    for plotrec in datablock:
        DIblock.append((float(plotrec["dec"]), float(plotrec["inc"])))
    if len(DIblock) > 0:
        plot_di(fignum, DIblock)  # plot directed lines
#
# put on the mean direction
#
    x, y = [], []
    XY = pmag.dimap(float(pars[0]), float(pars[1]))
    x.append(XY[0])
    y.append(XY[1])
    plt.figure(num=fignum)
    if new == 1:
        plt.scatter(x, y, marker='d', s=80, c='r')
    else:
        if float(pars[1] > 0):
            plt.scatter(x, y, marker='^', s=100, c='r')
        else:
            plt.scatter(x, y, marker='^', s=100, c='y')
    plt.title(s)
#
# plot the ellipse
#
    plot_ell(fignum, pars, 'r-,', 0, 1)