How do I omit matplotlib printed output in Python / Jupyter notebook?

Viewed 9448

When I make a simple plot inside an IPython / Jupyter notebook, there is printed output, presumably generated from matplotlib standard output. For example, if I run the simple script below, the notebook will print a line like: <matplotlib.text.Text at 0x115ae9850>.

import random
import pandas as pd
%matplotlib inline

A = [random.gauss(10, 5) for i in range(20) ]
df = pd.DataFrame( { 'A': A} ) 
axis = df.A.hist()
axis.set_title('Histogram', size=20)

As you can see in the figure below, the output appears even though I didn't print anything. How can I remove or prevent that line?

Jupyter notebook output

1 Answers
Related