Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
590 views
in Technique[技术] by (71.8m points)

gnuplot - Octave plotting error

I am new to octave, I just tried my first plotting with Octave 3.4.0 when I get the following error. Any help will be much appreciated. The gnuplot version is 4.6

     octave-3.4.0:3> x=1:1:20;
     octave-3.4.0:4> y=sin(x);
     octave-3.4.0:5> plot(x,y)

     gnuplot> set terminal aqua enhanced title "Figure 1" size 560 420  font "*,6"
                  ^
     line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list

The terminal window I am using for octave is the mac X-terminal.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Ok, I found the solution to this problem. Just run:

setenv("GNUTERM","X11")

Before you plot anything, e.g.,

plot(x,y)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...