简体   繁体   中英

python syntax error in matplotlib

I am using python 3.5, pycharm and getting invalid syntax at %matplotlib inline as output here is my code:

import time
import requests
import cv2
import operator
import numpy as np
# Import library to display results


import matplotlib.pyplot as plt
%matplotlib inline

I think this link may be what you are looking for: How to make IPython notebook matplotlib plot inline

Put the %matplotlib inline on the first line. This is useful in the context of using Jupyter notebooks ( http://jupyter.readthedocs.io/en/latest/ )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM