Hi.
In the last post...
we have seen how to make a statistic graph with matplotlib library in python (using Jupyter and a specific version of Python). Now we will use 'scatter' method to plot only the points of the data representing the year and the population of New York City. Here is the code. There are only slight chaanges... the data and the scatter function instead of the plot function
%%script c:\python34_32bit\python.exe import matplotlib.pyplot as plt y = [1900, 1910, 1920, 1930, 1940, 1950, 1960, 1970, 1980, 1990, 2000, 2010 ] p = [3437202, 4766883, 5620048, 6930446, 7454995, 7891957, 7781984, 7894862, 7071639, 7322564, 8008278, 8175133 ] plt.scatter(y,p) plt.show()
See ya
Oh, this is the result...
Comments
Post a Comment