Plotting Graph by Keyboard Input using Python
Introduction to 2D Smooth Graph Connecting line between two points ( x 1 , y 1 ) and ( x 2 , y 2 ) is known as a graph. A non-uniform cartesian co-ordinates points will generate a rigid line, which looks ugly. In Python, a rigid graph can be regenerated into a smooth graph by interpolating more points using SciPy module. SciPy (Scientific Python library) generates more sub-points based on the input array values to form a smooth curve. In this program, I have used input() function to get n number of points ( x , y ) from the user through keyboard ( screenshot is given in the bottom ) and store it to arrays. The co-ordinates points used in the program are (1, 2), (2, 5), (3, 3), (4, 6), (5, 7), (6, 2), (7, 10), (8, 5), (9, 6), and (10, 3). Program Implementation In this tutorial, I have used Python 3.5.2 (64-bit) software, and 7 modules: MatPlotLib 2.0.2 , PyParsing 2.2.0 , Python-DateUtil 2.6.1 , PyTZ 2017.2 , SetupTools 36.2.0 , Cycler 0.10.0 , SciPy 0.19.1 , and NumPy-MKL 1.13...