0

I got piece of code from google and trying to understand it which is helpful for me at this moment.

 %matplotlib inline from math import sin, pi import random import chart from matplotlib import rcParams rcParams.update({'font.size': 12}) 

The GPS Carrier

 f = 154 * 10.23e6 carrier = lambda x: sin(2*pi*f*x) chart.Plot('GPS L1 Carrier Wave', tend=8/f, sr=1.0e-12). signal(carrier, color=chart.blue).show() 

when I run the same code I get error showing no module named chart. Want to know what is matplotlib inline and chart function. While executing code it throws error no module named chart. Could not find even any module name chart

Thanks in advance.

1
  • %matplotlib inline is meant to be used in jupyter (notebook or console). If you are not using any of them leave it out, otherwise it will just tell jupyter to display output inline. Concerning chart you probably haven't got the package installed. Commented Oct 31, 2017 at 13:43

1 Answer 1

1

Are you using Jupyter Notebook or Jupyter QtConsole? As %matplotlib inline will only work for Jupyter Notebook and Jupyter QtConsole. You can refer to Jupyter & IPython: What does %matplotlib inline do? for more information.

Sign up to request clarification or add additional context in comments.

1 Comment

Oh I am using spyder . Python 2.7 . Can not I run it in spyder ?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.