I am creating a small application using matplotlib. Ideally, the users will only see the matplotlib UI.
I would like to allow users of the application to retrieve the data (not just a .png) using the existing save button on the matplotlib toolbar (e.g. by writing a filename with the ".csv" file extension).
Is it possible to override/extend some matplotlib function to save the plot data in a non-supported matplotlib format?
I'm interested in a solution even if I need to keep a copy of the data outside matplotlib.
I'm not interested in solutions where the data is stored in a predefined path (e.g. /tmp) or stdout.