title: Character-mode (shell/ASCII) plots with Octave scripts
body: <p>When running Octave in an interactive shell session, I know I can display character-mode / ASCII plots, as discussed here:  <a href="https://stackoverflow.com/questions/13745987/character-mode-shell-plots-with-matlab-octave">Character-mode (shell) plots with Matlab / Octave?</a></p>
  
  <p>My problem is that I'd like to have that kind of output when my octave script is run non-interactively.  That is, I'd like to be able to run something like the following:</p>
  
  <pre><code>#!/usr/bin/octave -qf
  
  plot(sin(0:7))
  </code></pre>
  
  <p>And have output along the lines of :</p>
  
  <pre><code>    1 &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
        &gt;      +   ---+      +      +      +      +      &gt;
        &gt;      +---    |                                 &gt;
        &gt;     |         |                                &gt;
        &gt;    |           |                               &gt;
    0.5 &gt;+  |             |                             +&gt;
        &gt;   |             |                            | &gt;
        &gt;  |               |                           | &gt;
        &gt; |                 |                         |  &gt;
        &gt;|                   +                       |   &gt;
      0 &gt;+                    |                     |   +&gt;
        &gt;                      |                    |    &gt;
        &gt;                      |                   |     &gt;
        &gt;                       |                 +      &gt;
        &gt;                        |               |       &gt;
        &gt;                         |             |        &gt;
   -0.5 &gt;+                        |            |        +&gt;
        &gt;                          |           |         &gt;
        &gt;                           +---      |          &gt;
        &gt;                               --   |           &gt;
        &gt;      +      +      +      +     -+|     +      &gt;
     -1 &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
        1      2      3      4      5      6      7      8
  </code></pre>
  
  <p>I get that output if I open octave in the ssh session and then, at the octave terminal, call my script:</p>
  
  <pre><code>octave:1&gt; testplot.m
  </code></pre>
  
  <p>But what I really want to do is to call testplot.m from other bash scripts, such as:</p>
  
  <pre><code>$ ./testplot.m
  </code></pre>
  
  <p>or</p>
  
  <pre><code>$ octave testplot.m
  </code></pre>
  
  <p>Neither of which actually give any plot output.</p>
  
  <p>I have noticed that the interactive session output seems to scale automatically with the size of my terminal window, so in that sense it depends on the session.</p>
  
  <p>Thanks for any assistance!</p>
  
  <p>Clarification - I know how to create plots with figure visibility turned off, but I'm trying to avoid having to separately download plot files.</p>
  
  <p>I also discovered this thread:  <a href="https://stackoverflow.com/questions/123378/command-line-unix-ascii-based-charting-plotting-tool">Command-line Unix ASCII-based charting / plotting tool</a>, but eplot seemed to give me errors (likely user error, bad data formatting, etc, but I don't know for sure), and I'd prefer to keep things in octave - octave already does exactly what I want as long as I'm in an interactive session!</p>