Skip to main content
`Ctrl`+`K`

# `skopt.plots`.plot_histogram

skopt.plots.plot_histogram(result, dimension_identifier, bins=20, rotate_labels=0, ax=None)

  Create and return a Matplotlib figure with a histogram of the samples from the optimization results, for a given dimension of the search-space.

  Parameters:
    result `OptimizeResult`

      The optimization results e.g. from calling `gp_minimize()`.

    dimension_identifier str or int

      Name or index of a dimension in the search-space.

    bins int, bins=20

      Number of bins in the histogram.

    rotate_labels int, rotate_labels=0

      Degree to rotate category-names on the x-axis. Only used for Categorical dimensions.

  Returns:
    ax `Matplotlib.Axes`

      The Matplotlib Axes-object.