def setup_axes(fig, rect):
 tr = (Affine2D().scale((np.pi / 180.0), 1.0) + PolarAxes.PolarTransform())
 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()
 grid_helper = GridHelperCurveLinear(tr, extreme_finder=extreme_finder, grid_locator1=grid_locator1, grid_locator2=grid_locator2, tick_formatter1=tick_formatter1)
 ax1 = axisartist.Subplot(fig, rect, grid_helper=grid_helper)
 ax1.axis[:].set_visible(False)
 fig.add_subplot(ax1)
 ax1.set_aspect(1.0)
 ax1.set_xlim((-5), 12)
 ax1.set_ylim((-5), 10)
 return ax1

def setup_axes ( fig , rect ) : tr = ( Affine2D ( ) . scale ( ( np . pi / 180.0 ) , 1.0 ) + PolarAxes . PolarTransform ( ) ) 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 ( ) grid_helper = GridHelperCurveLinear ( tr , extreme_finder = extreme_finder , grid_locator1 = grid_locator1 , grid_locator2 = grid_locator2 , tick_formatter1 = tick_formatter1 ) ax1 = axisartist . Subplot ( fig , rect , grid_helper = grid_helper ) ax1 . axis [ : ] . set_visible ( False ) fig . add_subplot ( ax1 ) ax1 . set_aspect ( 1.0 ) ax1 . set_xlim ( ( - 5 ) , 12 ) ax1 . set_ylim ( ( - 5 ) , 10 ) return ax1
polar projection .