November 2018
Beginner to intermediate
214 pages
5h 2m
English
We will begin by taking a look at cursor. The cursor will generate a widget that places little x axis and y axis cursors over the top of the axis. The first argument to any widget is the axis that we want to attach it to. In this case, we want to attach it to the current axis. By doing this, by default, it should look unchanged.
# Basic cursornums = np.arange(0,10,0.1)plt.plot(nums, np.sin(nums))Cursor(plt.gca())
Following is the output of the preceding code:

Read now
Unlock full access