![]() ![]() We are also able to make use of scatter plots within classification applications. Where we make use of the legend function to nicely distinguish between the two groups. By using the following code import matplotlib.pyplot as plt x = x2 = y = y2 = plt.plot(x, y, label='Line 1') plt.plot(x2, y2, label='Line 2') plt.title("Plotting two simple lines") plt.grid(True) plt.xlabel("X-label") plt.ylabel("Y-label") plt.xlim() plt.ylim() plt.legend() plt.show() This can be achieved by using the plt.plot function. To demonstrate the usage of these functions, let us consider a simple example where we want to draw two simple lines.
1 Comment
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |