PlotDefaults.caps2plot#

static PlotDefaults.caps2plot()[source]#

Plotting defaults for CAP.caps2plot.

Returns:

dict[str, Any] – Default parameters for heatmap and outer product plots:

  • General Figure Parameters:

    • dpiint, default=300 –

      Dots per inch for the figure.

    • figsizetuple, default=(8, 6) –

      Figure size in inches (width, height).

    • fontsizeint, default=14 –

      Font size for the title of individual plots or subplots.

    • bbox_inchesstr, default=”tight” –

      Alters size of the whitespace in the saved image.

  • Subplot Parameters (exclusive to Outer Product plots when subplots=True):

    • hspacefloat, default=0.2 –

      Height space between subplots.

    • wspacefloat, default=0.2 –

      Width space between subplots.

    • nrowint or None, default=None (max 5) –

      Number of rows for subplots.

    • ncolint or None, default=None (max 5) –

      Number of columns for subplots.

    • suptitle_fontsizefloat, default=20 –

      Font size for the main title of subplots.

    • tight_layoutbool, default=True –

      Use tight layout for subplots.

    • rectlist[float | int], default=[0, 0.03, 1, 0.95] –

      Rectangle parameter for “tight_layout” for subplots.

    • shareybool, default=True –

      Share y-axis labels for subplots.

  • Axis Parameters:

    • xticklabels_sizeint, default=8 –

      Font size for x-axis tick labels.

    • yticklabels_sizeint, default=8 –

      Font size for y-axis tick labels.

    • xlabel_rotationint, default=0 –

      Rotation angle for x-axis labels.

    • ylabel_rotationint, default=0 –

      Rotation angle for y-axis labels.

  • Cell Parameters:

    • annotbool, default=False –

      Add values to cells.

    • annot_kwsdict or None, default=None –

      Customize the annotations.

    • fmtstr, default=”.2g” –

      Format for annotated values.

    • linewidthsfloat, default=0 –

      Padding between each cell in the plot.

    • linecolorstr, default=”black” –

      Color of the line that separates each cell.

    • edgecolorsstr or None, default=None –

      Color of the edges.

    • borderwidthsfloat, default=0 –

      Width of the border around the plot.

    • alphafloat or None, default=None –

      Controls transparency (0=transparent, 1=opaque).

  • Colormap Parameters:

    • cmapstr or callable, default=”coolwarm” –

      Color map for the plot cells.

    • vminfloat or None, default=None –

      The minimum value to display in colormap.

    • vmaxfloat or None, default=None –

      The maximum value to display in colormap.

    • shrinkfloat, default=0.8 –

      Fraction by which to shrink the colorbar.

    • cbarlabels_sizeint, default=8 –

      Font size for the colorbar labels.

  • ”Custom” Parcellation Parameters:

    • add_custom_node_labelsbool, default=False –

      When visual_scope=”nodes” and using Custom parcellation, adds simplified node names to plot axes. Instead of labeling every individual node, the node list is collapsed by region. A single label is then placed at the beginning of the group of nodes corresponding to that region (e.g., “LH Visual” or “Hippocampus”), while the other nodes in that group are not explicitly labeled. This is done to minimize cluttering of the axes labels.

      Important

      This feature should be used with caution. It is recommended to leave this argument as False for the following conditions:

      1. Large Number of Nodes: Enabling labels for a parcellation with many nodes can clutter the plot axes and make them unreadable.

      2. Non-Consecutive Node Indices: The labeling logic assumes that the numerical indices for all nodes within a given region are defined as a consecutive block (e.g., "RegionA": [0, 1, 2], "RegionB": [3, 4]). If the indices are non-consecutive or interleaved (e.g., "RegionA": [0, 2], "RegionB": [1, 3]), the axis labels will be misplaced. Note that this issue only affects the visual labeling on the plot; the underlying data matrix remains correctly ordered and plotted.

Note

Color Palettes: Refer to seaborn’s Color Palettes for valid pre-made palettes.