arviz-devs / arviz-plots

ArviZ modular plotting
https://arviz-plots.readthedocs.io
Apache License 2.0
2 stars 1 forks source link

`annotate` backend functions for `annotate_xy` visual element? #80

Open imperorrp opened 1 month ago

imperorrp commented 1 month ago

Recently, the new annotate_xy visual element was added in the latest commit for the essplot PR (#58) but it uses the existing text backend functions.

If we want to extend the annotations beyond just text though (like arrows pointing to the desired point from the text which would be plotted somewhere else) we could add new backend functions and call them through annotate_xy instead of text. The annotate Matplotlib function (https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.annotate.html#matplotlib.axes.Axes.annotate ) allows arrows being added and this can be done with Bokeh too (https://docs.bokeh.org/en/latest/docs/user_guide/basic/annotations.html#arrows ).

I don't think any existing plots require this right now though so this could be done later too.