class_docstr: A wrapper for functionality surrounding a list of colors, including a
  context manager that allows the palette to be set with a with statement.
class_docstr_tok: ["A","wrapper","for","functionality","surrounding","a","list","of","colors",",","including","a","context","manager","that","allows","the","palette","to","be","set","with","a","with","statement","."]
docstr: Plot the values in the color palette as a horizontal array.
  See Seaborn's palplot function for inspiration.
  
  Parameters
  ----------
  size : int
      scaling factor for size of the plot
docstr_tok: ["Plot","the","values","in","the","color","palette","as","a","horizontal","array",".","See","Seaborn","'s","palplot","function","for","inspiration",".","Parameters","--","--","--","--","--","size",":","int","scaling","factor","for","size","of","the","plot"]
code: def plot(self, size=1):
      """
      Plot the values in the color palette as a horizontal array.
      See Seaborn's palplot function for inspiration.
  
      Parameters
      ----------
      size : int
          scaling factor for size of the plot
  
      """
      n = len(self)
      fig, ax = plt.subplots(1, 1, figsize=(n * size, size))
      ax.imshow(
          np.arange(n).reshape(1, n),
          cmap=mpl.colors.ListedColormap(list(self)),
          interpolation="nearest",
          aspect="auto",
      )
      ax.set_xticks(np.arange(n) - 0.5)
      ax.set_yticks([-0.5, 0.5])
      ax.set_xticklabels([])
      ax.set_yticklabels([])
  
file_path: yellowbrick/yellowbrick/style/palettes.py
imports: import numpy
  import matplotlib
  import matplotlib.pyplot
  import matplotlib.colors
  from itertools import cycle
  from .colors import get_color_cycle
  from yellowbrick.exceptions import YellowbrickValueError
label_desc: Use image node_id 6 for calling the ColorPalette obj's underlying member method code with example usage: obj.plot(size) without return types