Many times, people want to graph data from a file. There are many types of files, and many ways you may extract data from a file to graph it. Here, we'll show a couple of ways one might do this. First, we'll use the built-in csv module to load CSV files, then we'll show how to utilize NumPy, which is a third-party module, to load files.
sample code: pythonprogramming.net
Learn how to visualize data in the form of line graphs, bar charts, pie charts, 3D graphs, and more with Python 3 and Matplotlib.