0

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
Giulio Caccin
  • 2,554
  • 6
  • 30
  • 47
renu
  • 1
  • 1
  • 1
  • are you using `ipython` or `jupyter notebook`? %matplotlib inline` is an ipython magic command, which won't work in other python environments – tmdavison May 11 '16 at 15:39

1 Answers1

-1

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/)

Community
  • 1
  • 1
plfrick
  • 849
  • 10
  • 11