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

Function setup_axes

galleries/examples/axisartist/simple_axis_pad.py:18–36  ·  view source on GitHub ↗

Polar projection, but in a rectangular box.

(fig, rect)

Source from the content-addressed store, hash-verified

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

Callers 1

simple_axis_pad.pyFile · 0.70

Calls 5

Affine2DClass · 0.90
add_subplotMethod · 0.80
scaleMethod · 0.45
set_visibleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…