qis.plot_histogram

qis.plot_histogram(df, pdf_type=PdfType.KDE, is_drop_na=True, title=None, colors=None, legend_stats=LegendStats.NONE, desc_table_type=DescTableType.SHORT, add_norm_std_pdf=False, add_data_std_pdf=False, bbox_to_anchor=None, legend_loc='upper left', xlabel=None, ylabel=None, xvar_format='{:.2f}', yvar_format=None, fontsize=10, linewidth=1.0, x_limits=None, y_limits=(0.0, None), x_min_max_quantiles=None, clip=None, add_last_value=False, add_bar_at_peak=False, add_total_sample_pdf=False, total_sample_name='Universe', annualize_vol=False, first_color_fixed=False, fill=False, cumulative=False, bins='auto', ax=None, **kwargs)[source]

Plot each input series as a density or histogram.

Parameters:
  • df (DataFrame | Series) – Observations, with one plotted sample per column.

  • pdf_type (PdfType) – Density or histogram representation to draw.

  • desc_table_type (DescTableType | None) – Optional descriptive table displayed as the legend. Observed infinity is rejected before drawing when this is enabled.

  • ax (Axes) – Existing axis to draw on, or None to allocate a figure.

  • is_drop_na (bool)

  • title (str)

  • colors (List[str])

  • legend_stats (LegendStats)

  • add_norm_std_pdf (bool)

  • add_data_std_pdf (bool)

  • bbox_to_anchor (Tuple[float, float] | None)

  • legend_loc (str | None)

  • xlabel (str)

  • ylabel (str)

  • xvar_format (str)

  • yvar_format (str | None)

  • fontsize (int)

  • linewidth (float)

  • x_limits (Tuple[float | None, float | None])

  • y_limits (Tuple[float | None, float | None])

  • x_min_max_quantiles (Tuple[float | None, float | None])

  • clip (Tuple[float | None, float | None])

  • add_last_value (bool)

  • add_bar_at_peak (bool)

  • add_total_sample_pdf (bool)

  • total_sample_name (str)

  • annualize_vol (bool)

  • first_color_fixed (bool)

  • fill (bool)

  • cumulative (bool)

  • bins (ndarray | str | None)

Returns:

The allocated figure, or None when ax was supplied.

Raises:

ValueError – If descriptive statistics are enabled and df contains infinity.

Return type:

Figure | None