title: trying to save the figure of stacked bar chart in canvas widget
body: <p>I grouped the data and tried for a stacked bar chart and it worked fine the figure is also plotted in the interpreter with an ipynb jupyter notebook file as show in the picture attached, but when I want to use that figure in the canvas of matplotlib.backends canvas for displaying plots figure was not plotted just empty axes,</p>
  <p>need some solution to save the subplot and utilize it for displaying in canvas</p>
  <p>can any share their knowledge with me to solve my problem</p>
  <pre><code>    dfd = df.groupby(['Region','Sub-Category']).aggregate({'Sales':sum}).unstack(-2)
      fig, ax = plt.subplots(figsize =(7, 5))
  </code></pre>
  <p><img src="https://i.stack.imgur.com/bIVB7.png" alt="1" /></p>
  <p>below is the core detailed code</p>
  <pre><code>  import pandas as pd
    import matplotlib.pyplot as plt
    df = pd.read_excel(&quot;C:/Users/OneDrive/Desktop/Excel_files/Sample - Superstore2.xlsx&quot;)
    df.groupby(['Category','Sub-Category']).aggregate({'Sales':sum}).unstack(-2).plot(kind = 'bar',stacked= True,figsize = (15,7) )
    plt.show()
  </code></pre>
  <p>this is my full code what I want is like I to want use its figure to display in the Tkinter canvas widget, as like we have option in below possible way as far as my knowledge</p>
  <pre><code>      fig, ax = plt.subplots(1, figsize=(7, 5))
  </code></pre>
  <p>by using ax we will plot graphs and those graphs will be stored in fig variable as subplots and this fig variable can be used to display the figure in canvas.</p>
  <p>type of fig varibale is -&gt;  &lt;class 'matplotlib.figure.Figure'&gt;</p>
  <p>but when i use ax for plotting the stacked bar plot its not been plotted properly</p>