%matplotlib inline is an IPython-specific directive that causes IPython to display matplotlib graphics in a laptop cell, and not in another window.
To run the code as a script, use
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = pd.read_csv('effort.csv')
df.plot(kind='scatter', x='setting', y='effort', s=df['country']*df['change'])
plt.show()
- Use
plt.show()to display a graph. - Note that semicolons are not needed at the end of instructions.
source
share