Here we will see the code to show a simple graph with python and matplotlib inside of jupyter.
The graph is about the growth of global population.
As I wanted to use the 3.4.3 version of python (because I have installed the matplotlib libraries for that version) I used some magic syntax for jupyter... the %%script code at the start.
%%script c:\python34_32bit\python.exe import matplotlib.pyplot as plt y = [1950,1970,1990,2010] p = [2.519, 3.692, 5.263, 6.972] plt.plot(y,p) plt.show()
at the exectution of the code (in jupyter hit ctrl + enter) we will see this:
Comments
Post a Comment