title: How to integrate plot method into my class
body: <p>I am trying to make an class with which I can make a s the histogram of any list and the plot of the data. My calculations run fine but the plot method does not seem to work. I would really appreciate your help here :)</p>
  <pre><code>from matplotlib import pyplot as plt
  
  class BasicStatistics:
  
      def __init__(self, list):
          self.list = list
  
      def mean(self):
          return sum(self.list) / len(self.list)
  
      def median(self):
          self.list.sort()
          if len(self.list) % 2 == 1:
              return self.list[len(self.list) // 2]
          else:
              return (self.list[len(self.list) // 2 - 1] + self.list[len(self.list) // 2]) / 2
  
      def var(self):
          avg = self.mean()
          var = sum((x - avg) ** 2 for x in self.list) / len(self.list)
          return var
  
      def std_dev(self):
  
          vari = self.var()
          std_dev = (vari) ** (1 / 2)
          return std_dev
  
      def norma(self):
          return [(i-self.mean()) / self.var() for i in self.list]
  
      def plot(self):
         fig, (axs1,axs2,axs3) = plt.subplots(2)
         axs1.hist(self.list)
         axs1.axvline(self.mean, color='red')
         axs1.axvline(self.median, color='black')
         axs1.axvline(self.mean - self.std_dev(), color='green')
         axs1.axvline(self.mean + self.std_dev(), color='green')
         axs2.plot(lst)
         plt.show()
  </code></pre>