質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
gnuplot

gnuplot(ニュープロット)は、2次元や3次元のグラフ作成ができるソフトウェアです。さまざまな数式やデータ集計などのグラフを描写することが可能で、特に2次元グラフを描画する機能は強力です。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Q&A

解決済

1回答

1691閲覧

octave使用中、gnuplot でグラフが表示されず困っています。

sandyur

総合スコア25

gnuplot

gnuplot(ニュープロット)は、2次元や3次元のグラフ作成ができるソフトウェアです。さまざまな数式やデータ集計などのグラフを描写することが可能で、特に2次元グラフを描画する機能は強力です。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

0グッド

0クリップ

投稿2017/10/28 01:40

編集2017/10/29 03:01

courceraの機械学習講座を受けています。
Lesson2のprogramming assignmentのLinear regression with one variableでグラフをプロットさせる際にエラーが発生しました。

octave3.8.0 gnuplot> set terminal aqua enhanced title "Figure 1" size 560 420 font "*,6" dashlength 1 ^ line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list Plotting Data ... Program paused. Press enter to continue. gnuplot> set terminal aqua enhanced title "Figure 2" size 560 420 font "*,6" dashlength 1 ^ line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list

gnuplotではグラフを出力する際に, Mac OSでは, Aquatermかx11をかませて表示するそうで、両方ともインストールして、octaveも再インストールしました。

そうしたら下記のようなエラーが出ました。

gnuplot> Terminal type set to 'unknown'

x11はインストールしてあるのでset terminalを打ち込むと、たしかに存在はしているので、選択してみます。
すると、

gnuplot> set terminal Available terminal types: canvas HTML Canvas object cgm Computer Graphics Metafile context ConTeXt with MetaFun (for PDF documents) corel EPS format for CorelDRAW dumb ascii art for anything that prints text dxf dxf-file for AutoCad (default size 120x80) eepic EEPIC -- extended LaTeX picture environment emf Enhanced Metafile format emtex LaTeX picture environment with emTeX specials epslatex LaTeX picture environment using graphicx package fig FIG graphics language for XFIG graphics editor gif GIF images using libgd and TrueType fonts hpgl HP7475 and relatives [number of pens] [eject] jpeg JPEG images using libgd and TrueType fonts latex LaTeX picture environment lua Lua generic terminal driver mf Metafont plotting standard mp MetaPost plotting standard pcl5 HP Designjet 750C, HP Laserjet III/IV, etc. (many options) pdf PDF (Portable Document File) file driver png PNG images using libgd and TrueType fonts Press return for more: postscript PostScript graphics, including EPSF embedded files (*.eps) pslatex LaTeX picture environment with PostScript \specials pstex plain TeX with PostScript \specials pstricks LaTeX picture environment with PSTricks macros qms QMS/QUIC Laser printer (also Talaris 1200 and others) svg W3C Scalable Vector Graphics tek40xx Tektronix 4010 and others; most TEK emulators tek410x Tektronix 4106, 4107, 4109 and 420X terminals texdraw LaTeX texdraw environment tgif TGIF X11 [mode] [x,y] [dashed] ["font" [fontsize]] tikz TeX TikZ graphics macros via the lua script driver tkcanvas Tk canvas widget tpic TPIC -- LaTeX picture environment with tpic \specials unknown Unknown terminal type - not a plotting device vttek VT-like tek40xx terminal emulator x11 X11 Window System xlib X11 Window System (gnulib_x11 dump) xterm Xterm Tektronix 4014 Mode gnuplot> set terminal x11 Terminal type set to 'x11' Options are ' nopersist enhanced' gnuplot> gnuplot: unable to open display '' gnuplot: X11 aborted.

x11は中断されたと書かれています。

どうすれば正常に起動するのでしょうか。
ご回答いただけるとうれしいです。

使用機種はmacOS 10.12です。

問題解決の際に主に参考にしたサイトは以下の通りです。

http://d.hatena.ne.jp/mizunototori/20130622/1398924109
http://www.ketsuago.com/entry/2016/07/27/141848
https://qiita.com/kazoo04/items/c64d9f72166855b3107e

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

自己解決しました。
こちらのページに解説がありました。

https://www.coursera.org/learn/machine-learning/resources/voVNL

投稿2017/11/02 13:41

sandyur

総合スコア25

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問