Thank you all! @Pap @vmagnin @msz59 @KjellJorner
I really appreciate you suggestions.
After some checking, yes pause and reread did the trick!
After installing Gnuplot (I am on windows 10 for this test), in the second line of my code as below,
I added command,
call execute_command_line ('wgnuplot -persist ' // 'ogpf_temp_script.gp' , wait = .false.)
where ‘ogpf_temp_script.gp’ is my Gnuplot scipt, which I just use the one generated by ogpf library, but I added
pause 1
reread
at the end, it read the data from my output file which is called LL_iter.txt, it monitors the Log likelihood (LL) .vs. iteration,
Its content is
# ogpf libray
# Rev. 0.22 of March 9th, 2018
# Licence: MIT
# gnuplot global setting
set term wxt size 1024,768 enhanced font "verdana,10" title "ogpf libray: Rev. 0.22 of March 9th, 2018"
# ogpf extra configuration
# -------------------------------------------
# color definitions
set style line 1 lc rgb "#800000" lt 1 lw 2
set style line 2 lc rgb "#ff0000" lt 1 lw 2
set style line 3 lc rgb "#ff4500" lt 1 lw 2
set style line 4 lc rgb "#ffa500" lt 1 lw 2
set style line 5 lc rgb "#006400" lt 1 lw 2
set style line 6 lc rgb "#0000ff" lt 1 lw 2
set style line 7 lc rgb "#9400d3" lt 1 lw 2
# Axes
set border linewidth 1.15
set tics nomirror
# grid
# Add light grid to plot
set style line 102 lc rgb "#d6d7d9" lt 0 lw 1
set grid back ls 102
# plot style
set style data linespoints
# -------------------------------------------
# plot scale
# Annotation: title and labels
# axes setting
plot "LL_iter.txt" notitle
pause 1
reread
Here is an example of my code running while display the LL vs iteration in real time,
(179) RPEM + Gnuplot display LL in real time - YouTube
