Gnuplot script disappear after creation

I have a gnuplot script. My system is ubuntu 14.04. When in the terminal I type gnuplot myPlot . The plot will disappear. It does not remain on the screen. I saw this stack in a similar question . But his system is windows. I want to know if there is a solution for this on ubuntu 14.04 32 bit

PS: when I use gnuplot> - I mean, when I do not use a script file - I see a chart, and it does not disappear.

PS2: this is my simple gnuplot script file:

 set boxwidth 0.5 set style fill solid plot "dataFile" using 1:2:xtic(2) with boxes 
+11
source share
3 answers

If you want the chart window to remain open, you must call gnuplot with the -persist flag:

 gnuplot -persist myPlot 
+14
source

If you do not want to call gnuplot with an additional argument (-perist), you can include this function in your script, for example.

 set term x11 persist 
+7
source

There are already good answers here, but the -persist flag did not work for me, and the inclusion of x11 forced GnuPlot to use crapy XQuarts to create windows instead of the beloved Qt. What worked for me was

 pause -1 

command ( from here ) at the end of the script. According to the documentation

pause -1 # Wait until the carriage returns

I hope this helps.

+6
source

Source: https://habr.com/ru/post/973011/


All Articles