das-developers / das2java

The original das2 library. Provides interactive publication-ready 2-D plotting
https://das2.org
GNU Lesser General Public License v3.0
4 stars 0 forks source link

option to draw legend using annotations #62

Open jbfaden opened 1 year ago

jbfaden commented 1 year ago

I've wanted to be able to draw legends using annotations, and I started this today thinking it would be easier to do than it is. The idea is you should be able to replace the legacy legend using an annotation with text like:

"!(painter;legend;renderer=1)<br>!(painter;legend;renderer=2)" 

The problem is connecting the legend to the renderer, and also adding a control for it to the GrannyTextEditor.

jbfaden commented 1 year ago

This item should be clickable, setting focus to the referent renderer.

jbfaden commented 1 year ago

See also https://sourceforge.net/p/autoplot/feature-requests/804/ a script which converts a Das2 legend into an annotation.