- Matplotlib 3.0 Cookbook
- Srinivasa Rao Poladi
- 62字
- 2021-08-13 15:15:44
There's more...
You can add one more line graph to the same plot and go on until you complete your interactive session:
- Plot a line graph:
plt.plot([1.5, 3.0])
- Add labels and title:
plt.title("Interactive Plot")
plt.xlabel("X-axis")
plt.ylabel("Y-axis")
- Add one more line graph:
plt.plot([3.5, 2.5])
The following graph is the output obtained after executing the code:

Hence, we have now worked in interactive mode.