Create an Axes in *fig* that contains 'matplotlib' as Text.
(fig, height_px)
| 91 | |
| 92 | |
| 93 | def create_text_axes(fig, height_px): |
| 94 | """Create an Axes in *fig* that contains 'matplotlib' as Text.""" |
| 95 | ax = fig.add_axes((0, 0, 1, 1)) |
| 96 | ax.set_aspect("equal") |
| 97 | ax.set_axis_off() |
| 98 | |
| 99 | path = TextPath((0, 0), "matplotlib", size=height_px * 0.8, |
| 100 | prop=get_font_properties()) |
| 101 | |
| 102 | angle = 4.25 # degrees |
| 103 | trans = mtrans.Affine2D().skew_deg(angle, 0) |
| 104 | |
| 105 | patch = PathPatch(path, transform=trans + ax.transData, color=MPL_BLUE, |
| 106 | lw=0) |
| 107 | ax.add_patch(patch) |
| 108 | ax.autoscale() |
| 109 | |
| 110 | |
| 111 | def make_logo(height_px, lw_bars, lw_grid, lw_border, rgrid, with_text=False): |
no test coverage detected
searching dependent graphs…