(ax, title, loc, **kwargs)
| 14 | |
| 15 | |
| 16 | def add_inner_title(ax, title, loc, **kwargs): |
| 17 | from matplotlib.offsetbox import AnchoredText |
| 18 | from matplotlib.patheffects import withStroke |
| 19 | prop = dict(path_effects=[withStroke(foreground='w', linewidth=3)], |
| 20 | size=plt.rcParams['legend.fontsize']) |
| 21 | at = AnchoredText(title, loc=loc, prop=prop, |
| 22 | pad=0., borderpad=0.5, |
| 23 | frameon=False, **kwargs) |
| 24 | ax.add_artist(at) |
| 25 | return at |
| 26 | |
| 27 | |
| 28 | fig = plt.figure(figsize=(6, 6)) |
no test coverage detected
searching dependent graphs…