title: Jupyter Notebook - Plot inside a function - Figure is not plotted
body: <p>I want to call a function from a class in which I want to plot several figures.
  There is no error thrown but I did not receive the plot but only:</p>
  
  <pre><code>#############################################
  Histograms of the continuous data:
  #############################################
  &lt;Figure size 640x480 with 1 Axes&gt;
  &lt;Figure size 640x480 with 1 Axes&gt;
  &lt;Figure size 640x480 with 1 Axes&gt;
  &lt;Figure size 640x480 with 1 Axes&gt;
  &lt;Figure size 640x480 with 1 Axes&gt;
  &lt;Figure size 640x480 with 1 Axes&gt;
  &lt;Figure size 640x480 with 1 Axes&gt;
  &lt;Figure size 640x480 with 1 Axes&gt;
  &lt;Figure size 640x480 with 1 Axes&gt;
  &lt;Figure size 640x480 with 1 Axes&gt;
  &lt;Figure size 640x480 with 1 Axes&gt;
  &lt;Figure size 640x480 with 1 Axes&gt;
  </code></pre>
  
  <p>The code I use is:</p>
  
  <pre><code>class Pipeline:
      import matplotlib.pyplot as plt
      global plt
      from matplotlib import style
      style.use('ggplot')  
  
  
      def __init__(self,goal):
          self.goal = goal
  
  
      def examine(self,dataset):
          # Check for categorical and continous data
          continuous = []
          categorical = []
          for n,i in enumerate(dataset.columns):
              if isinstance(dataset[i][1],str):
                  categorical.append(dataset.columns[n])
              else:
                  continuous.append(dataset.columns[n])
  
          continuous_data = dataset[continuous]
          categorical_data = dataset[categorical]
  
          #Plot the histograms of the continuous data
          print('#############################################')
          print('Histograms of the continuous data:')
          print('#############################################')
  
          for col in continuous_data.columns:
              fig = plt.figure()
              ax = continuous_data[col].hist()
              ax.set_title(col)
              plt.show()
  
  
  
  
  
  
  
  pipe = Pipeline('C')
  pipe.examine(data)
  </code></pre>
  
  <p>I wonder because if I run the same code a second time it plots the figures just as proposed.
  Appreciate any help!</p>