python - Making plot in ipython with matplotlib -


i've been trying make scatter plot following code

import matplotlib import matplotlib.pyplot plt fig = plt.figure() ax = fig.add_subplot(111) ax.scatter(x, y) plt.show() 

if type these commands line line ipython console, there no graph displayed after plt.show() command. however, if copy , paste whole code block console, graph displayed.

has had issue before? reason this?


Comments