class_docstr: Plot bands of model predictions as calculated from a chain.
  
  call add(y) to add predictions from each chain point
  
  Example::
  
      x = numpy.linspace(0, 1, 100)
      band = PredictionBand(x)
      for c in chain:
          band.add(c[0] * x + c[1])
      # add median line. As an option a matplotlib ax can be given.
      band.line(color='k')
      # add 1 sigma quantile
      band.shade(color='k', alpha=0.3)
      # add wider quantile
      band.shade(q=0.01, color='gray', alpha=0.1)
      plt.show()
  
  To plot onto a specific axis, use `band.line(..., ax=myaxis)`.
  
  Parameters
  ----------
  x: array
      The independent variable
class_docstr_tok: ["Plot","bands","of","model","predictions","as","calculated","from","a","chain",".","call","add","(","y",")","to","add","predictions","from","each","chain","point","Example",":",":","x","=","numpy.linspace","(","0",",","1",",","100",")","band","=","PredictionBand","(","x",")","for","c","in","chain",":","band.add","(","c","[","0","]","*","x","+","c","[","1","]",")","#","add","median","line",".","As","an","option","a","matplotlib","ax","can","be","given",".","band.line","(","color=","'","k","'",")","#","add","1","sigma","quantile","band.shade","(","color=","'","k","'",",","alpha=0.3",")","#","add","wider","quantile","band.shade","(","q=0.01",",","color='gray","'",",","alpha=0.1",")","plt.show","(",")","To","plot","onto","a","specific","axis",",","use","`","band.line","(","...",",","ax=myaxis",")","`",".","Parameters","--","--","--","--","--","x",":","array","The","independent","variable"]
docstr: Initialise with independent variable *x*.
docstr_tok: ["Initialise","with","independent","variable","*","x","*","."]
code: def __init__(self, x, shadeargs={}, lineargs={}):
      """Initialise with independent variable *x*."""
      self.x = x
      self.ys = []
      self.shadeargs = shadeargs
      self.lineargs = lineargs
  
imports: from __future__ import print_function, division
  from six.moves import range
  import logging
  import types
  import warnings
  import numpy
  import matplotlib.pyplot
  from matplotlib.ticker import MaxNLocator, NullLocator
  from matplotlib.ticker import ScalarFormatter
  import scipy.stats
  import matplotlib.pyplot
  import numpy
  from .utils import resample_equal
  from .utils import quantile
  import corner
label_desc: Use image node_id 1 to create a new PredictionBand object from inherited base classes: object with example: obj = PredictionBand(x, shadeargs, lineargs)