class_docstr: Base class of color palettes.
  
  Color palettes are mappings that assign integers from the range
  0..M{n-1} to colors (4-tuples). M{n} is called the size or length
  of the palette. C{igraph} comes with a number of predefined palettes,
  so this class is useful for you only if you want to define your
  own palette. This can be done by subclassing this class and implementing
  the L{Palette._get} method as necessary.
  
  Palettes can also be used as lists or dicts, for the C{__getitem__}
  method is overridden properly to call L{Palette.get}.
class_docstr_tok: ["Base","class","of","color","palettes",".","Color","palettes","are","mappings","that","assign","integers","from","the","range","0","..","M","{","n-1","}","to","colors","(","4-tuples",")",".","M","{","n","}","is","called","the","size","or","length","of","the","palette",".","C","{","igraph","}","comes","with","a","number","of","predefined","palettes",",","so","this","class","is","useful","for","you","only","if","you","want","to","define","your","own","palette",".","This","can","be","done","by","subclassing","this","class","and","implementing","the","L","{","Palette._get","}","method","as","necessary",".","Palettes","can","also","be","used","as","lists","or","dicts",",","for","the","C","{","__getitem__","}","method","is","overridden","properly","to","call","L","{","Palette.get","}","."]
docstr: Plots the colors of the palette on the given Cairo context/mpl Axes
  
  Supported keywork arguments in both Cairo and matplotlib are:
  
    - C{orientation}: the orientation of the palette. Must be one of
      the following values: C{left-right}, C{bottom-top}, C{right-left}
      or C{top-bottom}. Possible aliases: C{horizontal} = C{left-right},
      C{vertical} = C{bottom-top}, C{lr} = C{left-right},
      C{rl} = C{right-left}, C{tb} = C{top-bottom}, C{bt} = C{bottom-top}.
      The default is C{left-right}.
  
  Additional supported keyword arguments in Cairo are:
  
    - C{border_width}: line width of the border shown around the palette.
      If zero or negative, the border is turned off. Default is C{1}.
  
    - C{grid_width}: line width of the grid that separates palette cells.
      If zero or negative, the grid is turned off. The grid is also
      turned off if the size of a cell is less than three times the given
      line width. Default is C{0}.  Fractional widths are also allowed.
  
  Keyword arguments in matplotlib are passes to Axes.imshow.
docstr_tok: ["Plots","the","colors","of","the","palette","on","the","given","Cairo","context\/mpl","Axes","Supported","keywork","arguments","in","both","Cairo","and","matplotlib","are",":","-","C","{","orientation","}",":","the","orientation","of","the","palette",".","Must","be","one","of","the","following","values",":","C","{","left-right","}",",","C","{","bottom-top","}",",","C","{","right-left","}","or","C","{","top-bottom","}",".","Possible","aliases",":","C","{","horizontal","}","=","C","{","left-right","}",",","C","{","vertical","}","=","C","{","bottom-top","}",",","C","{","lr","}","=","C","{","left-right","}",",","C","{","rl","}","=","C","{","right-left","}",",","C","{","tb","}","=","C","{","top-bottom","}",",","C","{","bt","}","=","C","{","bottom-top","}",".","The","default","is","C","{","left-right","}",".","Additional","supported","keyword","arguments","in","Cairo","are",":","-","C","{","border_width","}",":","line","width","of","the","border","shown","around","the","palette",".","If","zero","or","negative",",","the","border","is","turned","off",".","Default","is","C","{","1","}",".","-","C","{","grid_width","}",":","line","width","of","the","grid","that","separates","palette","cells",".","If","zero","or","negative",",","the","grid","is","turned","off",".","The","grid","is","also","turned","off","if","the","size","of","a","cell","is","less","than","three","times","the","given","line","width",".","Default","is","C","{","0","}",".","Fractional","widths","are","also","allowed",".","Keyword","arguments","in","matplotlib","are","passes","to","Axes.imshow","."]
code: def __plot__(self, backend, context, *args, **kwds):
      """Plots the colors of the palette on the given Cairo context/mpl Axes
  
      Supported keywork arguments in both Cairo and matplotlib are:
  
        - C{orientation}: the orientation of the palette. Must be one of
          the following values: C{left-right}, C{bottom-top}, C{right-left}
          or C{top-bottom}. Possible aliases: C{horizontal} = C{left-right},
          C{vertical} = C{bottom-top}, C{lr} = C{left-right},
          C{rl} = C{right-left}, C{tb} = C{top-bottom}, C{bt} = C{bottom-top}.
          The default is C{left-right}.
  
      Additional supported keyword arguments in Cairo are:
  
        - C{border_width}: line width of the border shown around the palette.
          If zero or negative, the border is turned off. Default is C{1}.
  
        - C{grid_width}: line width of the grid that separates palette cells.
          If zero or negative, the grid is turned off. The grid is also
          turned off if the size of a cell is less than three times the given
          line width. Default is C{0}.  Fractional widths are also allowed.
  
      Keyword arguments in matplotlib are passes to Axes.imshow.
      """
      from igraph.drawing import DrawerDirectory
  
      drawer = DrawerDirectory.resolve(self, backend)(context)
      drawer.draw(self, **kwds)
  
imports: from abc import ABCMeta, abstractmethod
  from math import ceil
label_desc: Use image node_id 8 for calling the Palette obj's underlying member method code with example usage: obj.__plot__(backend, context) without return types