def plot_clocked_and_closed(ax, orgnodes, days=30):
    events = list(nodes_to_events(
        orgnodes,
        filters=[within_ndays_before(days)],
        eventclass=['closed', 'clock']))
    closed = numpy.array(
        [date2num(e.date.start)
         for e in events if e.eventclass == 'closed'])
    clock = numpy.array(
        [(date2num(e.date.start), date2num(e.date.end))
         for e in events if e.eventclass == 'clock'],
        dtype=[('start', float), ('end', float)])
    dh_closed = decompose_in_day_and_hour(closed)
    dh_clock_start = decompose_in_day_and_hour(clock['start'])
    dh_clock_end = decompose_in_day_and_hour(clock['end'])
    ax.plot(dh_closed['day'] + 0.5, dh_closed['hour'], 'x')
    if len(dh_clock_start) > 0:
        ax.errorbar(
            dh_clock_start['day'] + 0.5,
            2.0 / (dh_clock_start['hour'] + dh_clock_start['hour']),
            yerr=(dh_clock_end['hour'] - dh_clock_start['hour']),
            fmt=None)
    set_xaxis_format_date(ax)
    ax.set_yticks([0, 6, 12, 18, 24])
    ax.set_ylim(24.1, -0.1)
dataset/ETHPy150Open tkf/orgviz/orgviz/graphs.py/plot_clocked_and_closed/swapped operands of `/`