title: In an HTML table, how to add text beside plot in jupyter notebook using python?
body: <p>Any ideas on how to create a 1 X 2 HTML table where cell {0} is a matplotlib plot and cell {1} is a text description for Python 3.X?</p>
  
  <pre><code>import matplotlib.pyplot as plt
  from io import BytesIO
  %matplotlib inline
  
  def add_split_screen(fig, text, iwidth=None):
  
      figdata = BytesIO()
      fig.savefig(figdata, format='png') 
      figdata.seek(0)
      figdata
      figdata.close()
      iwidth = ' width={0} '.format(iwidth) if iwidth is not None else ''
      datatable = '&lt;table&gt;&lt;tr&gt;&lt;td&gt;{0}&lt;/td&gt;&lt;td&gt;{1}&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;'.format(figdata, text)
      display(HTML(datatable)) 
  </code></pre>
  
  <p>Setting up a test case: </p>
  
  <pre><code>fig, ax = plt.subplots(1,1, figsize=(6,4))
  ax.plot([1,2,3])
  text = '&lt;h4&gt;Special Chart:&lt;/h4&gt;&lt;BR&gt;Description of chart will go here.'
  </code></pre>
  
  <p>Then running the function in a Jupyter notebook: </p>
  
  <pre><code>add_split_screen(fig, text, iwidth='500px')
  </code></pre>
  
  <p>My output is as follows:
  <a href="https://i.stack.imgur.com/tqZG4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tqZG4.png" alt="enter image description here"></a></p>
  
  <p>However, I am interested in actually seeing the plot inline a Jupyter notebook.</p>