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

Function test_axis_options

lib/matplotlib/tests/test_axes.py:8648–8662  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8646
8647@image_comparison(['axis_options.png'], remove_text=True, style='mpl20')
8648def test_axis_options():
8649 fig, axes = plt.subplots(2, 3)
8650 for i, option in enumerate(('scaled', 'tight', 'image')):
8651 # Draw a line and a circle fitting within the boundaries of the line
8652 # The circle should look like a circle for 'scaled' and 'image'
8653 # High/narrow aspect ratio
8654 axes[0, i].plot((1, 2), (1, 3.2))
8655 axes[0, i].axis(option)
8656 axes[0, i].add_artist(mpatches.Circle((1.5, 1.5), radius=0.5,
8657 facecolor='none', edgecolor='k'))
8658 # Low/wide aspect ratio
8659 axes[1, i].plot((1, 2.25), (1, 1.75))
8660 axes[1, i].axis(option)
8661 axes[1, i].add_artist(mpatches.Circle((1.5, 1.25), radius=0.25,
8662 facecolor='none', edgecolor='k'))
8663
8664
8665def color_boxes(fig, ax):

Callers

nothing calls this directly

Calls 4

subplotsMethod · 0.45
plotMethod · 0.45
axisMethod · 0.45
add_artistMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…