How to Draw a Figure

In this lesson, we will learn how to draw a line on a canvas by using the function subplot().

Let’s draw our first figure by following a step-by-step process. This process will teach us how to draw a figure using the formal method. In this figure, we will draw two lines. Each will be generated from a defined number, obtained by using numpy.

Step 1 - Create a dataset

We will start by creating our dataset, which will consist of two lines. In this example, we will use numpy to generate a series of points on the x-axis. ...