0
$\begingroup$

I am trying to create a bar plot for a Pandas Series and the bar plot is not showing up in Jupyter notebook.

When I run the cell, I only get the following and I do not see the bar plot.

<matplotlib.figure.Figure at 0x7fa555abc080>

Please advise.

Attached screenshot for your reference

$\endgroup$
1
  • 2
    $\begingroup$ you likely need to add "%matplotlib inline" to your code (stick it before or after the import statements, and without speech marks). $\endgroup$
    – sk877
    Commented Jun 24, 2021 at 20:28

1 Answer 1

1
$\begingroup$

Try adding the %matplotlib magic function in your notebook, before the plot function, preferably in the beginning. This will enable the inline backend for usage with the IPython Notebook:

import pandas as pd
import matplotlib.pyplot as plt

%matplotlib inline


<your code here>
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.