macrosynergy.visuals.table#

view_table(df, title=None, title_fontsize=16, figsize=(14, 4), min_color=-1, max_color=1, xlabel=None, ylabel=None, xticklabels=None, yticklabels=None, annot=True, fmt='.2f', return_fig=False)[source]#

Displays a DataFrame representing a table as a heatmap.

Parameters:
  • df (DataFrame) – table to be displayed.

  • title (str, optional) – string of chart title; defaults depend on type of range plot.

  • title_fontsize (int, optional) – font size of chart header. Default is 16.

  • figsize (Tuple[float, float], optional) – Tuple (w, h) of width and height of plot.

  • min_color (float) – minimum value of colorbar. Default is -1.

  • max_color (float) – maximum value of colorbar. Default is 1.

  • xlabel (str, optional) – string of x-axis label. Default is None.

  • ylabel (str, optional) – string of y-axis label. Default is None.

  • xticklabels (List[str], optional) – list of strings to label x-axis ticks. Default is None.

  • yticklabels (List[str], optional) – list of strings to label y-axis ticks. Default is None.

  • annot (bool) – whether to annotate heatmap with values.

  • fmt (str) – string format for annotations. Default is ‘.2f’.

  • return_fig (bool) – If True, return the Matplotlib figure object instead of displaying.