rgerum / pylustrator

Visualisations of data are at the core of every publication of scientific research results. They have to be as clear as possible to facilitate the communication of research. As data can have different formats and shapes, the visualisations often have to be adapted to reflect the data as well as possible. We developed Pylustrator, an interface to directly edit python generated matplotlib graphs to finalize them for publication. Therefore, subplots can be resized and dragged around by the mouse, text and annotations can be added. The changes can be saved to the initial plot file as python code.
GNU General Public License v3.0
706 stars 38 forks source link

removal of auto save popup window #51

Closed darkcurrent closed 1 year ago

darkcurrent commented 1 year ago

Hello,

I want to add pylustrator into an application for non programmers. When pylustrator closed without saving, this popup is shown below. This is very useful for a lot of purposes but in this way the users of my application can accidently and easily update main application files which is not wanted. How can I remove this auto save popup? Thank you...

image

rgerum commented 1 year ago

hmm I could add a parameter to pylustrator.start to not ask for saving. But the user could still save the figure to the code. What is the use case? Shall the users only be able to save it to an image and not to the code? Or do you just want to get rid of the promt?

darkcurrent commented 1 year ago

Thank you for your fast answer rgerum. We will developing a software to collect data from Twitter, filter the data, auto-train and select NLP models, analyse the data and generate some report file with some graphics. This open source app will be made for completely non programmer social scientist. In the end, we want the users only can generate images and save it but the default plot parameters should be static. So the main app files can not be changed. :) Is there any way to implement this easily?

rgerum commented 1 year ago

ah ok, so you want to disable all saving to code and not just the prompt (you can also save using CTRL+S). But yes it sounds feasible to implement this as a parameter to pylustrator.start, e.g. as pylustrator.start(save_code=False).

darkcurrent commented 1 year ago

ah ok, so you want to disable all saving to code and not just the prompt (you can also save using CTRL+S). But yes it sounds feasible to implement this as a parameter to pylustrator.start, e.g. as pylustrator.start(save_code=False).

Yes exactly. pylustrator.start(save_code=False) this looks life saver :)

rgerum commented 1 year ago

it is now implemented as pylustrator.start(disable_save=True)