code: def plot_histogram(self, freq=None, figsize=(15, 5), title=None,
                         bins=20, **kwargs):
          
          if title is None:
              title = self._get_default_plot_title(
                  self.name, freq, 'Return Histogram')
  
          ser = self._get_series(freq).to_returns().dropna()
  
          plt.figure(figsize=figsize)
          ax = ser.hist(bins=bins, figsize=figsize, normed=True, **kwargs)
          ax.set_title(title)
          plt.axvline(0, linewidth=4)
          return ser.plot(kind='kde')
docs: Plots a histogram of returns given a return frequency.
  
          Args:
              * freq (str): Data frequency used for display purposes.
                  This will dictate the type of returns
                  (daily returns, monthly, ...)
                  Refer to pandas docs for valid period strings.
              * figsize ((x,y)): figure size
              * title (str): Title if default not appropriate
              * bins (int): number of bins for the histogram
              * kwargs: passed to pandas' hist method