- Notifications
You must be signed in to change notification settings - Fork30
Description
Would it be possible to introduce the option to specify a callback function inragg that is called whenever the plot is updated?
Use case: I am the author theterminalgraphics package (https://codeberg.org/djvanderlaan/terminalgraphics). To get that working I open aagg_capture device that receives the plot commands. I add a callback to R usingaddTaskCallback. That callback checks if the device has changed (the contents of that device) and dumps a new plot into the terminal when it has. I currently have an issue when the plot is updated but the contents of the plot do not change: then no change is detected and the plot is not updated.
plot(1:10)# a lot of commands# ...plot(1:10)# nothing happens as the contents of the device did not change
I imagine this could be either through aragg::register_callback function (that probably receives the device that updated) or through an additional argument toagg_capture /agg_png etc.
If time is an issue: I would be willing to dive into the code and try to make a pull request.