class_docstr: Element is the atomic datastructure used to wrap some data with
  an associated visual representation, e.g. an element may
  represent a set of points, an image or a curve. Elements provide
  a common API for interacting with data of different types and
  define how the data map to a set of dimensions and how those
  map to the visual representation.
class_docstr_tok: ["Element","is","the","atomic","datastructure","used","to","wrap","some","data","with","an","associated","visual","representation",",","e.g",".","an","element","may","represent","a","set","of","points",",","an","image","or","a","curve",".","Elements","provide","a","common","API","for","interacting","with","data","of","different","types","and","define","how","the","data","map","to","a","set","of","dimensions","and","how","those","map","to","the","visual","representation","."]
docstr: Computes and adjoins histogram along specified dimension(s).
  
  Defaults to first value dimension if present otherwise falls
  back to first key dimension.
  
  Args:
      dimension: Dimension(s) to compute histogram on
      num_bins (int, optional): Number of bins
      bin_range (tuple optional): Lower and upper bounds of bins
      adjoin (bool, optional): Whether to adjoin histogram
  
  Returns:
      AdjointLayout of element and histogram or just the
      histogram
code: def hist(
      self,
      dimension=None,
      num_bins=20,
      bin_range=None,
      adjoin=True,
      **kwargs,
  ):
      """Computes and adjoins histogram along specified dimension(s).
  
      Defaults to first value dimension if present otherwise falls
      back to first key dimension.
  
      Args:
          dimension: Dimension(s) to compute histogram on
          num_bins (int, optional): Number of bins
          bin_range (tuple optional): Lower and upper bounds of bins
          adjoin (bool, optional): Whether to adjoin histogram
  
      Returns:
          AdjointLayout of element and histogram or just the
          histogram
      """
      from ..operation import histogram
  
      if not isinstance(dimension, list):
          dimension = [dimension]
      hists = []
      for d in dimension[::-1]:
          hist = histogram(
              self,
              num_bins=num_bins,
              bin_range=bin_range,
              dimension=d,
              **kwargs,
          )
          hists.append(hist)
      if adjoin:
          layout = self
          for didx in range(len(dimension)):
              layout = layout << hists[didx]
      elif len(dimension) > 1:
          layout = Layout(hists)
      else:
          layout = hists[0]
      return layout
  
imports: from itertools import groupby
  import numpy
  import pandas
  import param
  from .dimension import Dimensioned, ViewableElement, asdim
  from .layout import Composable, Layout, NdLayout
  from .ndmapping import NdMapping
  from .overlay import CompositeOverlay, NdOverlay, Overlayable
  from .spaces import GridSpace, HoloMap
  from .tree import AttrTree
  from .util import get_param_values
label_desc: Use image node_id 2 for calling the Element obj's underlying member method code with example usage: obj.hist(dimension, num_bins, bin_range, adjoin) and returns: layout