def update_plot(self, indep_var, dep_var):
        """
        Updates the plot of the proposed model.
        """
        evaluated_model = self.ig._eval_model()
        y_vals = getattr(evaluated_model, dep_var.name)
        x_vals = self.ig._x_grid[indep_var]

        x_plot_data = []
        y_plot_data = []
        y_plot_error = []
        # TODO: Numpy magic
        # We need the error interval for every plotted point, so find all
        # the points plotted at x=x_i, and do some statistics on those.
        # Since all the points are on a grid made by meshgrid, the error
        # in x will alwys be 0.
        for x_val in self.ig._x_points[indep_var]:
            # We get away with this instead of digitize because x_vals is
            # on a grid made with meshgrid
            idx_mask = x_vals == x_val
            xs = x_vals[idx_mask]
            x_plot_data.append(xs[0])
            ys = y_vals[idx_mask]
            y_plot_data.append(np.mean(ys))
            y_error = np.percentile(ys, self.ig.percentile)
            y_plot_error.append(y_error)

        x_plot_data = np.array(x_plot_data)
        y_plot_data = np.array(y_plot_data)
        y_plot_error = np.array(y_plot_error)

        xs = np.column_stack((x_plot_data, x_plot_data))
        yerr = y_plot_error + y_plot_data[:, np.newaxis]
        y_segments = np.dstack((xs, yerr))
        plot_line, caps, error_lines = self.ig._plots[(indep_var, dep_var)]
        plot_line.set_data(x_plot_data, y_plot_data)
        error_lines[1].set_segments(y_segments)
Updates the plot of the proposed model.