class_docstr: A base class containing for the 2D browser.
  
  This class contains all backend-independent attributes and methods.
class_docstr_tok: ["A","base","class","containing","for","the","2D","browser",".","This","class","contains","all","backend-independent","attributes","and","methods","."]
docstr: Create peak-to-peak histogram of channel amplitudes.
docstr_tok: ["Create","peak-to-peak","histogram","of","channel","amplitudes","."]
code: def _create_epoch_histogram(self):
      """Create peak-to-peak histogram of channel amplitudes."""
      epochs = self.mne.inst
      data = OrderedDict()
      ptp = np.ptp(epochs.get_data(copy=False), axis=2)
      for ch_type in ("eeg", "mag", "grad"):
          if ch_type in epochs:
              data[ch_type] = ptp.T[
                  self.mne.ch_types == ch_type
              ].ravel()
      units = _handle_default("units")
      titles = _handle_default("titles")
      colors = _handle_default("color")
      scalings = _handle_default("scalings")
      title = "Histogram of peak-to-peak amplitudes"
      figsize = (4, 1 + 1.5 * len(data))
      fig = self._new_child_figure(
          figsize=figsize, fig_name="fig_histogram", window_title=title
      )
      for ix, (_ch_type, _data) in enumerate(data.items()):
          ax = fig.add_subplot(len(data), 1, ix + 1)
          ax.set(
              title=titles[_ch_type],
              xlabel=units[_ch_type],
              ylabel="Count",
          )
          # set histogram bin range based on rejection thresholds
          reject = None
          _range = None
          if epochs.reject is not None and _ch_type in epochs.reject:
              reject = epochs.reject[_ch_type] * scalings[_ch_type]
              _range = (0.0, reject * 1.1)
          # plot it
          ax.hist(
              _data * scalings[_ch_type],
              bins=100,
              color=colors[_ch_type],
              range=_range,
          )
          if reject is not None:
              ax.plot(
                  (reject, reject), (0, ax.get_ylim()[1]), color="r"
              )
      # finalize
      fig.suptitle(title, y=0.99)
      self.mne.fig_histogram = fig
  
      return fig
  
imports: import importlib
  from abc import ABC, abstractmethod
  from collections import OrderedDict
  from contextlib import contextmanager
  from copy import deepcopy
  from itertools import cycle
  import numpy
  from .._fiff.pick import _DATA_CH_TYPES_SPLIT
  from ..defaults import _handle_default
  from ..filter import _iir_filter, _overlap_add_filter
  from ..fixes import _compare_version
  from ..utils import _check_option, _get_stim_channel, _validate_type, get_config, logger, set_config, verbose
  from .backends._utils import VALID_BROWSE_BACKENDS
  from .utils import _get_color_list, _setup_plot_projector, _show_browser
label_desc: Use image node_id 24 for calling the BrowserBase obj's underlying member method code with example usage: obj._create_epoch_histogram() and returns: fig