GreenBankObservatory / dysh

https://dysh.readthedocs.io
Other
9 stars 2 forks source link

annotate arbitrary matplotlib figures #281

Open teuben opened 2 months ago

teuben commented 2 months ago

Feature description Annotate a matplotlib figure

Solution Although the future plotter should also be able to do this, perhaps there is some commonality in here.

The idea is to allow the user to supply a list of strings, which are essentially mongo-like commands that can be interpreted, e.g.

annotate = ['box=10,10,30,40', 'hline=10', 'vline=0.0,1.0']

Additional context The client code will need to use the appropriate environment, e.g. should be be top level plt.* or other means. The units equally so, if relevant.

teuben commented 2 months ago

I do have a precedent, as this was implemented in NEMO's tabplot program using the layout= keyword. So here the program already had a standard plot, but the user can annotate it with some simple (in my case yapp) command strings from an ascii file.