def calc_tick_coords(u, f, g, dx_unit, dy_unit, distance):
    """
    helper func to calculate tick start and stop coords
    """
    x1, y1 = f(u), g(u)
    x2 = x1 + distance * dy_unit
    y2 = y1 - distance * dx_unit
    return x1, y1, x2, y2
