yongrenjie / penguins

A Python 3 package for analysing and plotting NMR spectra.
https://yongrenjie.github.io/penguins
MIT License
5 stars 2 forks source link

Automatically add label to axes #12

Closed yongrenjie closed 3 years ago

yongrenjie commented 4 years ago

Suggested interface - the function name can be changed

pg.add_numbering(axs, posn="upper left", type='a', start=1, fstr="({})", **kwargs)

axs - iterable of mpl.axes.Axes posn - string where the label is placed type - string from {'a', 'A', 'i', 'I', '1'} (what other options are there?) start - int to start labelling from fstr - format string, the text added is fstr.format(char) **kwargs - keyword arguments passed on to ax.text()

yongrenjie commented 3 years ago

That commit implements the label_axes() function which basically has the interface described above. It will be merged into master as part of v0.2.