code: def setup_axes(fig, rect):
      """Polar projection, but in a rectangular box."""
      # see demo_curvelinear_grid.py for details
      grid_helper = GridHelperCurveLinear(
          (
              Affine2D().scale(np.pi / 180.0, 1.0)
              + PolarAxes.PolarTransform(apply_theta_transforms=False)
          ),
          extreme_finder=angle_helper.ExtremeFinderCycle(
              20,
              20,
              lon_cycle=360,
              lat_cycle=None,
              lon_minmax=None,
              lat_minmax=(0, np.inf),
          ),
          grid_locator1=angle_helper.LocatorDMS(12),
          grid_locator2=grid_finder.MaxNLocator(5),
          tick_formatter1=angle_helper.FormatterDMS(),
      )
      ax = fig.add_subplot(
          rect,
          axes_class=axisartist.Axes,
          grid_helper=grid_helper,
          aspect=1,
          xlim=(-5, 12),
          ylim=(-5, 10),
      )
      ax.axis[:].toggle(ticklabels=False)
      ax.grid(color=".9")
      return ax
  
file_path: matplotlib/galleries/examples/axisartist/demo_axis_direction.py
imports: import matplotlib.pyplot
  import numpy
  from matplotlib.projections import PolarAxes
  from matplotlib.transforms import Affine2D
  import mpl_toolkits.axisartist
  import mpl_toolkits.axisartist.angle_helper
  import mpl_toolkits.axisartist.grid_finder
  from mpl_toolkits.axisartist.grid_helper_curvelinear import GridHelperCurveLinear
label_desc: Use image node_id 1 for calling a global function with example usage: setup_axes(fig, rect) and returns: ax