title: Use gnuplot command without prompt
body: <p>To use the <code>Gnuplot</code> (On linux Ubuntu 16.04) command directly by specifying arguments without using the its prompt, I enter this for example :</p>
  
  <pre><code>gnuplot -e "filename='DataFile.txt'" SettingsFile
  </code></pre>
  
  <p>Where <code>SettingsFile</code> looks like this :</p>
  
  <pre><code>plot filename with lines
  set title "Total Packets consumption"
  set xlabel "Time"
  set ylabel "Packets"
  set datafile separator ","
  pause -1
  </code></pre>
  
  <p>And the <code>DataFile.txt</code> looks like this :</p>
  
  <p>Packets, Time(in seconds) :</p>
  
  <pre><code>13392,120
  24607,240
  23867,360
  21764,480
  20727,600
  20004,720
  19719,840
  19758,960
  19728,1080
  20168,1200
  19737,1320
  19729,1440
  20135,1560
  20006,1680
  21301,1800
  19923,1920
  20002,2040
  19761,2160
  20918,2280
  22756,2400
  22820,2520
  23370,2640
  22987,2760
  22956,2880
  24427,3000
  23527,3120
  24009,3240
  23832,3360
  23464,3480
  23652,3600
  11212,3654
  </code></pre>
  
  <p><strong>First question :</strong></p>
  
  <p>Is there a way to set into that <code>SettingsFile</code> a png OutputFile ? So I can enter it as an argument to the Gnuplot command just as I did with the DataFile. (I want to use it this way, because I want to invoke it from an external code)</p>
  
  <p>I want to achieve something like this :</p>
  
  <pre><code>gnuplot -e "filename='DataFile.txt'" SettingsFile OutputFile.png 
  </code></pre>
  
  <p><strong>Second question :</strong></p>
  
  <p>The screen output that I get from Gnuplot shows the xtics differently than expected :</p>
  
  <p><a href="https://i.stack.imgur.com/E59id.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E59id.png" alt="enter image description here"></a></p>
  
  <p>Notice also that the axis titles are not shown !</p>
  
  <p>Now if I try to resize the window I get this :</p>
  
  <p><a href="https://i.stack.imgur.com/cOkTh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cOkTh.png" alt="enter image description here"></a></p>
  
  <p>The graph gets bizarrely flipped, with the titles set and the tics being updated as desired.</p>
  
  <p>How should I fix these two problems, first mentioning an output file in the SettingsFile, and second the xtics not being showed properly and third this strange behavior in the screen output ?</p>