sainsc.LazyKDE.plot_celltype_map ================================ .. py:method:: sainsc.LazyKDE.plot_celltype_map(*, remove_background = True, crop = None, scalebar = True, cmap = 'hls', background = 'black', undefined = 'grey', scalebar_kwargs = SCALEBAR_PARAMS, return_img = False) Plot the cell-type annotation. :param remove_background: If `True`, all pixels for which :py:attr:`sainsc.LazyKDE.background` is `False` are set to 0. :type remove_background: bool, optional :param crop: Coordinates to crop the data defined as `((xmin, xmax), (ymin, ymax))`. :type crop: tuple[tuple[int, int], tuple[int, int]], optional :param scalebar: If `True`, add a ``matplotlib_scalebar.scalebar.ScaleBar`` to the plot. :type scalebar: bool, optional :param cmap: If it is a string it must be the name of a `cmap` that can be used in :py:func:`seaborn.color_palette`. If it is a list of colors it must have the same length as the number of celltypes. If it is a dictionary it must be a mapping from celltpye to color. Undefined celltypes are plotted according to `undefined`. Colors can either be provided as string that can be converted via :py:func:`matplotlib.colors.to_rgb` or as ``(r, g, b)``-tuple between 0-1. :type cmap: str or list or dict, optional :param background: Color for the background. :type background: str | tuple[float, float, float] :param undefined: Color used for celltypes without a defined color. :type undefined: str | tuple[float, float, float] :param scalebar_kwargs: Keyword arguments that are passed to ``matplotlib_scalebar.scalebar.ScaleBar``. :type scalebar_kwargs: dict[str, typing.Any], optional :param return_img: Return the cell-type map as 3D-array (x, y, RGB) instead of the Figure. :type return_img: bool, optional :rtype: matplotlib.figure.Figure | numpy.ndarray[numpy.ubyte] .. seealso:: :py:meth:`sainsc.LazyKDE.assign_celltype`