(self, context, bbox, palette, *args, **kwds)
return matrix.__plot__(
            context,
            bbox,
            self,
            style="palette",
            square=False,
            grid_width=grid_width,
            border_width=border_width,
        )
Plots the colors of the palette on the given Cairo context

        Supported keyword arguments 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.

          - 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}.
Plots the colors of the palette on the given Cairo context
Plots the colors of the palette on the given Cairo context
def __plot__(self, context, bbox, palette, *args, **kwds):
        """Plots the colors of the palette on the given Cairo context

        Supported keyword arguments 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.

          - 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}.
        """
        border_width = float(kwds.get("border_width", 1.0))
        grid_width = float(kwds.get("grid_width", 0.0))
        orientation = str_to_orientation(kwds.get("orientation", "lr"))

        # Construct a matrix and plot that
        indices = list(range(len(self)))
        if orientation in ("rl", "bt"):
            indices.reverse()
        if orientation in ("lr", "rl"):
            matrix = Matrix([indices])
        else:
            matrix = Matrix([[i] for i in indices])

        return matrix.__plot__(
            context,
            bbox,
            self,
            style="palette",
            square=False,
            grid_width=grid_width,
            border_width=border_width,
        )
def __plot__ ( self , context , bbox , palette , * args , * * kwds ) : border_width = float ( kwds . get ( "border_width" , 1.0 ) ) grid_width = float ( kwds . get ( "grid_width" , 0.0 ) ) orientation = str_to_orientation ( kwds . get ( "orientation" , "lr" ) ) # Construct a matrix and plot that indices = list ( range ( len ( self ) ) ) if orientation in ( "rl" , "bt" ) : indices . reverse ( ) if orientation in ( "lr" , "rl" ) : matrix = Matrix ( [ indices ] ) else : matrix = Matrix ( [ [ i ] for i in indices ] ) return matrix . __plot__ ( context , bbox , self , style = "palette" , square = False , grid_width = grid_width , border_width = border_width , )