2D Data Plotting
B. J. Korites · Apress eBooks · 2018
In this chapter, you will look at styles and techniques for plotting two-dimensional data. You will start with some simple plots and then progress to those that include multiple sets of data on the same plot. While Python contains specialized built-in functions that can be quite efficient at this, usually requiring only a few lines of code, you will find that you can embellish your plots by taking a more hands-on approach and being creative by supplementing the specialized Python functions with simple Python commands. For example, the plot in Figure 8-1 requires only three lines of specialized code after the setup and data has been entered. Figure 8-5, on the other hand, can be a challenge to create using just specialized Python commands. The use of simple commands, plus a little creativity, can make the job much easier. Following simple data plots, you will move on to linear regression where you fit a straight line to a data set. You will then see how to fit non-linear mathematical functions to the data. You conclude with splines. A spline is a smooth curve that passes through each data point. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.