def plot_1d_features(self, dimension_idx=None):
        """Creates a plot for each specified dimension of the state space and shows
        all 1-dimensional features in this dimension
        If no indices are passed, all dimensions are plotted

        dimension_idx: either a single dimension index (int) or a list of indices.
        """
        idx = dimension_idx
        if isinstance(idx, int):
            idx = [idx]
        elif idx is None:
            idx = self.domain.continuous_dims

        feat_list = range(self.features_num)
        key = lambda x: (
            len(self.features[x].base_ids),
            tuple(self.features[x].dim),
            tuple(self.features[x].center[self.features[x].dim]))
        feat_list.sort(key=key)
        last_i = -1
        for k in feat_list:
            if len(self.features[k].dim) > 1:
                break
            cur_i = self.features[k].dim[0]
            if cur_i != last_i:
                if last_i in idx:
                    plt.draw()
                if cur_i in idx:
                    xi = np.linspace(
                        self.domain.statespace_limits[
                            cur_i,
                            0],
                        self.domain.statespace_limits[
                            cur_i,
                            1],
                        200)
                    x = np.zeros((200, self.domain.statespace_limits.shape[0]))
                    x[:, cur_i] = xi
                    plt.figure("Feature Dimension {}".format(cur_i))
            if cur_i in idx:
                y = [self.features[k].output(xk) for xk in x]
                plt.plot(x, y, label="id {}".format(k))
            last_i = cur_i
        plt.draw()
dataset/ETHPy150Open rlpy/rlpy/rlpy/Representations/KernelizediFDD.py/KernelizediFDD.plot_1d_features/original