()
| 8646 | |
| 8647 | @image_comparison(['axis_options.png'], remove_text=True, style='mpl20') |
| 8648 | def 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 | |
| 8665 | def color_boxes(fig, ax): |
nothing calls this directly
no test coverage detected
searching dependent graphs…