In the preceding recipe, we learned to define custom transformation and used it to draw curved grid lines in curvilinear coordinates. However, they both use the Cartesian coordinate system of x, y co-ordinates. In this recipe, we will learn how to use polar coordinates (angle and radius coordinates) in a rectangular box. In this recipe, as well as in all upcoming ones, we will use pre-built transformations provided by Matplotlib.
Defining polar axes in rectangular boxes
Getting ready
You'll need to import the requisite libraries using the following commands:
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.axisartist.grid_helper_curvelinear import GridHelperCurveLinear
import mpl_toolkits.axisartist...