12

I am using pandas to plot a graph. The following is my function

count_subset.plot(kind='barh', stacked=True)

The response I get is

<matplotlib.axes.AxesSubplot at 0x111fc4ad0>

I can't see the graph anywhere. Am I missing some library ?

1 Answer 1

26

You have to 'show' the plot using matplotlib's show:

import matplotlib.pyplot as plt
...  #plotting code
plt.show()

Another way is, if you use IPython, to activate the matplotlib magic to have it interactively (no need to call show then):

%matplotlib
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.