class_docstr: An AdjointLayout provides a convenient container to lay out some
  marginal plots next to a primary plot. This is often useful to
  display the marginal distributions of a plot next to the primary
  plot. AdjointLayout accepts a list of up to three elements, which
  are laid out as follows with the names 'main', 'top' and 'right':
  
   _______________
  |     3     |   |
  |___________|___|
  |           |   |  1:  main
  |           |   |  2:  right
  |     1     | 2 |  3:  top
  |           |   |
  |___________|___|
class_docstr_tok: ["An","AdjointLayout","provides","a","convenient","container","to","lay","out","some","marginal","plots","next","to","a","primary","plot",".","This","is","often","useful","to","display","the","marginal","distributions","of","a","plot","next","to","the","primary","plot",".","AdjointLayout","accepts","a","list","of","up","to","three","elements",",","which","are","laid","out","as","follows","with","the","names","'main","'",",","'top","'","and","'right","'",":","_______________","|","3","|","|","|___________|___|","|","|","|","1",":","main","|","|","|","2",":","right","|","1","|","2","|","3",":","top","|","|","|","|___________|___|"]
code: def __init__(self, data, **params):
      self.main_layer = (
          0  # The index of the main layer if .main is an overlay
      )
      if data and len(data) > 3:
          raise Exception(
              "AdjointLayout accepts no more than three elements."
          )
  
      if data is not None and all(isinstance(v, tuple) for v in data):
          data = dict(data)
      if isinstance(data, dict):
          wrong_pos = [k for k in data if k not in self.layout_order]
          if wrong_pos:
              raise Exception("Wrong AdjointLayout positions provided.")
      elif isinstance(data, list):
          data = dict(zip(self.layout_order, data))
      else:
          data = {}
  
      super().__init__(data, **params)
  
imports: import numpy
  import param
  from .None import traversal
  from .dimension import Dimension, Dimensioned, ViewableElement, ViewableTree
  from .ndmapping import NdMapping, UniformNdMapping
label_desc: Use image node_id 1 to create a new AdjointLayout object from inherited base classes: Layoutable, Dimensioned with example: obj = AdjointLayout(data)