def _prepare_data(self):
        xmin, xmax = self.limits['xmin'], self.limits['xmax']
        self.prepared_plot_series_list = []
        for series in self.plot_series_list:
            prepared_series = series.copy()
            data = prepared_series['data']
            x, _, _, _ = zip(*data)
            if sorted(x) == list(x):
                x = np.array(x)
                if xmin is not None:
                    min_idx = x.searchsorted(xmin)
                    if min_idx > 0:
                        min_idx -= 1
                else:
                    min_idx = None
                if xmax is not None:
                    max_idx = x.searchsorted(xmax) + 1
                else:
                    max_idx = None
                prepared_series['data'] = data[min_idx:max_idx]
            self.prepared_plot_series_list.append(prepared_series)
        self.prepared_shaded_regions_list = []
        for series in self.shaded_regions_list:
            prepared_series = series.copy()
            data = prepared_series['data']
            x, _, _ = zip(*data)
            if sorted(x) == list(x):
                x = np.array(x)
                if xmin is not None:
                    min_idx = x.searchsorted(xmin)
                    if min_idx > 0:
                        min_idx -= 1
                else:
                    min_idx = None
                if xmax is not None:
                    max_idx = x.searchsorted(xmax) + 1
                else:
                    max_idx = None
                prepared_series['data'] = data[min_idx:max_idx]
            self.prepared_shaded_regions_list.append(prepared_series)