class_docstr: fft tools for arma processes
  
  This class contains several methods that are providing the same or similar
  returns to try out and test different implementations.
  
  Notes
  -----
  TODO:
  check whether we do not want to fix maxlags, and create new instance if
  maxlag changes. usage for different lengths of timeseries ?
  or fix frequency and length for fft
  
  check default frequencies w, terminology norw  n_or_w
  
  some ffts are currently done without padding with zeros
  
  returns for spectral density methods needs checking, is it always the power
  spectrum hw*hw.conj()
  
  normalization of the power spectrum, spectral density: not checked yet, for
  example no variance of underlying process is used
class_docstr_tok: ["fft","tools","for","arma","processes","This","class","contains","several","methods","that","are","providing","the","same","or","similar","returns","to","try","out","and","test","different","implementations",".","Notes","--","--","-","TODO",":","check","whether","we","do","not","want","to","fix","maxlags",",","and","create","new","instance","if","maxlag","changes",".","usage","for","different","lengths","of","timeseries","?","or","fix","frequency","and","length","for","fft","check","default","frequencies","w",",","terminology","norw","n_or_w","some","ffts","are","currently","done","without","padding","with","zeros","returns","for","spectral","density","methods","needs","checking",",","is","it","always","the","power","spectrum","hw","*","hw.conj","(",")","normalization","of","the","power","spectrum",",","spectral","density",":","not","checked","yet",",","for","example","no","variance","of","underlying","process","is","used"]
docstr: Plot results
docstr_tok: ["Plot","results"]
code: def plot4(self, fig=None, nobs=100, nacf=20, nfreq=100):
      """Plot results"""
      rvs = self.generate_sample(nsample=100, burnin=500)
      acf = self.acf(nacf)[:nacf]  # TODO: check return length
      pacf = self.pacf(nacf)
      w = np.linspace(0, np.pi, nfreq)
      spdr, wr = self.spdroots(w)
  
      if fig is None:
          import matplotlib.pyplot as plt
  
          fig = plt.figure()
      ax = fig.add_subplot(2, 2, 1)
      ax.plot(rvs)
      ax.set_title(
          "Random Sample \nar={}, ma={}".format(self.ar, self.ma)
      )
  
      ax = fig.add_subplot(2, 2, 2)
      ax.plot(acf)
      ax.set_title(
          "Autocorrelation \nar={}, ma={!r}s".format(self.ar, self.ma)
      )
  
      ax = fig.add_subplot(2, 2, 3)
      ax.plot(wr, spdr)
      ax.set_title(
          "Power Spectrum \nar={}, ma={}".format(self.ar, self.ma)
      )
  
      ax = fig.add_subplot(2, 2, 4)
      ax.plot(pacf)
      ax.set_title(
          "Partial Autocorrelation \nar={}, ma={}".format(
              self.ar, self.ma
          )
      )
  
      return fig
  
imports: import numpy
  import numpy.fft
  from scipy import signal
  from statsmodels.tsa.arima_process import ArmaProcess
label_desc: Use image node_id 19 for calling the ArmaFft obj's underlying member method code with example usage: obj.plot4(fig, nobs, nacf, nfreq) and returns: fig