Matplotlib chart does not display in PyCharm

The % notation is for magic functions. The particular magic function and argument you reference, %matplotlib inline, is meant for an IPython notebook session. You will get a syntax error using magic functions in a normal python session.

The %matplotlib magic function is meant to specify a backend for matplotlib and the argument inline will produce an error if you are not in an IPython notebook session.

To show your plot you should use plt.show for an interactive window or plt.savefig to save it to file. For example,

plt.show()

or

plt.savefig( 'myfig.png' )

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)