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.

Poka
  • 387
  • 1
  • 12
  • `%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. – ImportanceOfBeingErnest Oct 31 '17 at 13:43

1 Answers1

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.

Jonathan
  • 162
  • 1
  • 11