Producing Graphical Output (GNU Octave (version 11.1.0))

#### 1.2.6 Producing Graphical Output ¶

To display the solution of the previous example graphically, use the command

    octave:1> plot (t, x)

Octave will automatically create a separate window to display the plot.

To save a plot once it has been displayed on the screen, use the print command. For example,

    print foo.pdf

will create a file called `foo.pdf` that contains a rendering of the current plot in Portable Document Format. The command

    help print

explains more options for the `print` command and provides a list of additional output file formats.