I wrote a script for automatically plot spectra data from multiple raw files into one plot. After that, I implemented a calibration function to extract specific values from the spectras and want to plot them in an extra plot window.
Executing script with "python plotfile.py":
"loop for plotting the spectras into one plot."
# Plot is appearing, can be stored, script continous after closing the window.
hold(False) # using a new window
" Calibration function"
# New plot is appearing, can be stored.
I know, that I should avoid to use show() several times, but I didn't find any other solution for it. The problem is, I would favor to use ipython running the script and then being in interactive mode to correct something interactively.
Unfortunately, using ipython results in one overall plot, appearing after the end of the whole script, containing the spectras and the calibration function.
So what I want to do is:
1) Plotting the spectras with a script
2) Interactively change them
3) Save the plots and close the GUI
4) Make the calibration with the script
5) Interactively change this plot
6) Save and exit
Is this possible within one script, or do I have to split it into several shorter ones ?