shellplot.hist

shellplot.hist(x, bins=10, fig=None, **kwargs)[source]

Plot a histogram of x

Parameters
  • x (array-like) – The array of points to plot a histogram of. Should be 1d np.ndarray or pandas series.

  • bins (int, optional) – Number of bins in histogram. Default is 10 bins.

  • label (str) – The label of the plot for display in the legend

  • fig (shellplot.figure.Figure, optional, default None) – If provided, plot will be attached to figure. Otherwise, a new figure is created for the plot

  • return_type (str, optional) – If ‘str’, returns the plot as a string. Otherwise, the plot will be directly printed to stdout.

  • **kwargs – Additional parameters passed to shellplot.figure (Only used if the fig keyword is None)

Returns

See notes, dependent on return_type

Return type

result