def plot(domain, solution=None, solution_exact=None, **kwargs):
    """Plots a solution (and optionally a reference solution) onto the given
    DiscreteDomain instance.
    
    **kwargs are the same as the ones in the DiscreteDomain's visualize() method.
    
    Parameters
    ----------
    domain : DiscreteDomain
        Discrete domain instance to plot the solution onto. The solution must have
        as many values as the number of vertices in the domain.
    solution : numpy.ndarray, optional
        Values to plot at each vertex of the domain. If None, then the domain
        is plot as is with the z-component of each vertex as value.
    solution_exact : numpy.ndarray, optional
        Value references to plot at each vertex of the domain. If None, only the
        graph of the computed solution is shown; else two graphs are created to
        show the computed and exact solutions side by side.
    """
    if solution is None: return domain.visualize(**kwargs)
    else: return domain.visualize(z=solution, z_ex=solution_exact, **kwargs)