Polar projection, but in a rectangular box.
(fig, rect)
| 15 | |
| 16 | |
| 17 | def setup_axes(fig, rect): |
| 18 | """Polar projection, but in a rectangular box.""" |
| 19 | # see demo_curvelinear_grid.py for details |
| 20 | grid_helper = GridHelperCurveLinear( |
| 21 | Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform(), |
| 22 | extreme_finder=angle_helper.ExtremeFinderCycle( |
| 23 | 20, 20, |
| 24 | lon_cycle=360, lat_cycle=None, |
| 25 | lon_minmax=None, lat_minmax=(0, np.inf), |
| 26 | ), |
| 27 | grid_locator1=angle_helper.LocatorDMS(12), |
| 28 | grid_locator2=grid_finder.MaxNLocator(5), |
| 29 | tick_formatter1=angle_helper.FormatterDMS(), |
| 30 | ) |
| 31 | ax = fig.add_subplot( |
| 32 | rect, axes_class=axisartist.Axes, grid_helper=grid_helper, |
| 33 | aspect=1, xlim=(-5, 12), ylim=(-5, 10)) |
| 34 | ax.axis[:].toggle(ticklabels=False) |
| 35 | ax.grid(color=".9") |
| 36 | return ax |
| 37 | |
| 38 | |
| 39 | def add_floating_axis1(ax): |
no test coverage detected
searching dependent graphs…