To refer to a specific point on the graph, we need its co-ordinates. There are four different co-ordinate systems used by Matplotlib with reference to data, axes, figures, and display. In this recipe, we will learn how to use these co-ordinate systems and transform from one co-ordinate system to another:
- Data: The data co-ordinate system refers to input data points as co-ordinates, and these are controlled by the xlim and ylim parameters to restrict the range of data to be plotted on the graph. The method to transform from the data co-ordinate system to the display co-ordinate system is ax.transData.
- Axes: The axes co-ordinate system refers to the axes object, with (0,0) being the bottom left corner of the axes and (1, 1) being the top right corner of the axes. The co-ordinate that refers to a point in the center of the axes is (0.5, 0.5). The method that transforms...