title: Octave, how to save a plot graph?
body: <p>I need to save a plot. This is my code that I don't know why it does not work.</p>
  
  <pre><code>hold on;
  plot(x1, y2)
  plot(x1, y2)
  print -djpg image.jpg
  </code></pre>
  
  <p>The plot in output on screen is correct, but the output in the file is different: it saves only an empty plot image without my points.</p>
  
  <p>This is my output in the file:
  <img src="https://i.stack.imgur.com/zfloB.jpg" alt="enter image description here"></p>