def init_scatter(fig, ax, x, y, z, color_by):
    """
    initialize scatter plot in an existing figure
    :param fig, ax: matplotlib.pyplot.subplots objects
    :param x: x values
    :param y: y values
    :param z: z values
    :param color_by: fourth variable by which color code is defined
    :return: fig object
    """
    sc = ax.scatter(x, y, z, c=color_by, cmap='viridis', edgecolors='face')
    return fig, sc