coco_pipe.viz.theme =================== .. py:module:: coco_pipe.viz.theme Attributes ---------- .. autoapisummary:: coco_pipe.viz.theme.ThemeMode coco_pipe.viz.theme.ColorKind coco_pipe.viz.theme.DIVERGING coco_pipe.viz.theme.SEQUENTIAL coco_pipe.viz.theme.QUALITATIVE coco_pipe.viz.theme.QUALITATIVE_COLORBLIND Functions --------- .. autoapisummary:: coco_pipe.viz.theme.coco_theme coco_pipe.viz.theme.set_coco_theme coco_pipe.viz.theme.figure_size coco_pipe.viz.theme.save_figure Module Contents --------------- .. py:data:: ThemeMode .. py:data:: ColorKind .. py:data:: DIVERGING :type: str :value: 'RdBu_r' .. py:data:: SEQUENTIAL :type: str :value: 'viridis' .. py:data:: QUALITATIVE :type: str :value: 'tab10' .. py:data:: QUALITATIVE_COLORBLIND :type: str :value: 'colorblind' .. py:function:: coco_theme(mode = 'paper', colorblind = False) Scope rcParams to a with-block. Safe in notebooks and tests. .. py:function:: set_coco_theme(mode = 'paper', colorblind = False) Set rcParams globally. Use coco_theme() context manager in notebooks/tests. .. py:function:: figure_size(columns = 1, aspect_ratio = 1.0, width_pt = None) Return ``(width, height)`` in inches. .. py:function:: save_figure(fig, path, *, dpi = 300, facecolor = 'white', bbox_inches = 'tight') Save a Matplotlib figure with coco_pipe defaults. :param fig: Matplotlib figure object to save. :param path: Output path accepted by ``Figure.savefig``. :param dpi: Output resolution in dots per inch. :param facecolor: Figure background color. :param bbox_inches: Bounding-box mode passed to ``Figure.savefig``.