MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / setup_axes

Function setup_axes

galleries/examples/axisartist/demo_axis_direction.py:17–36  ·  view source on GitHub ↗

Polar projection, but in a rectangular box.

(fig, rect)

Source from the content-addressed store, hash-verified

15
16
17def 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
39def add_floating_axis1(ax):

Callers 1

Calls 6

Affine2DClass · 0.90
add_subplotMethod · 0.80
scaleMethod · 0.45
toggleMethod · 0.45
gridMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…