[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mac - problem with plotting
From: |
Tatsuro MATSUOKA |
Subject: |
Re: Mac - problem with plotting |
Date: |
Tue, 15 Jul 2014 18:47:48 +0900 (JST) |
> From: Andrew Gibb
> To: Ben Abbott > Cc: address@hidden
> Date: 2014/7/15, Tue 18:29
> Subject: Re: Mac - problem with plotting
>
> Ben,
>
> Thanks for your reply. To be explicit, I tried setting GNUTERM as an
> environment variable using a bash export command to each of X11, qt, or
> aqua. I then opened octave and did
>
> > x = linspace(0,5);
> > plot(x, sin(x))
>
> Each time this returned
>
> 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
>
> Then I tried opening octave from a termial with GNUTERM unset, then
> tried using the octave command "set" to set GNUTERM to each of the
> same
> three values. Each time I call set GNUTERM, octave returns
>
> error: invalid conversion from string to real N-d array
> error: set: expecting graphics handle as first argument
>
> Then doing
> > x = linspace(0,5);
> > plot(x, sin(x))
>
> returns
> 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
> irrespective of what GNUTERM is set to. I hope that's a little clearer.
>
>
> Here's the output from the commands you suggested (I installed fltk via
> homebrew and started a new terminal):
>
> octave:1> close all
> octave:2> set GNUTERM x11
> error: invalid conversion from string to real N-d array
> error: set: expecting graphics handle as first argument
> octave:2> plot (rand (3))
>
> 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
>
> octave:3>
>
>
> octave:3> close all
> octave:4> graphics_toolkit fltk
> error: graphics_toolkit: fltk toolkit is not available
> error: called from:
> error:
> /usr/local/Cellar/octave/3.8.1/share/octave/3.8.1/m/plot/util/graphics_toolkit.m
>
>
> at line 70, column 5
> octave:4> plot (rand (3))
>
> 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
>
> octave:5>
>
> Andy
>
>
> Ben Abbott wrote:
>> On Jul 8, 2014, at 12:27 PM, Andrew Gibb<address@hidden>
> wrote:
>>
>>> Hi,
>>>
>>> I can't seem to plot. I've just installed Octave using Homebrew
> on
>>> Mac OS Mavericks. If I do:
>>>
>>>> x = linspace(0,5);
>>>> plot(x, sin(x))
>>> I get
>>>
>>> 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
>>>
>>> However,
>>> octave:3> set terminal
>>> error: invalid conversion from string to real N-d array
>>> error: set: expecting graphics handle as first argument
>>>
>>> Which I guess is not what I should see.
>>>
>>> It is suspicious that the error message begins "set terminal
> aqua"
>>> irrespective of the value of GNUTERM. The result is the same for
>>> GNUTERM set to qt, aqua, or X11.
>>>
>>> The results are the same in the gui, or running Octave from a
>>> terminal prompt.
>>>
>>> I have installed aquaterm via the dmg from sourceforge, and homebrew
>>> has picked up the gnuplot dependency.
>>>
>>> Any ideas what's wrong here?
>>>
>>> Thanks
>>
>> It is likely that either your gnuplot was not compiled to plot using
>> MacOS Aqua interface, or the Aquaterm libraries are not where gnuplot
>> expects to find them. It is generally a good idea to build and install
>> Octave and all its dependencies using Hombrew (including Aquaterm, and
>> Gnuplot. However, since there is no Homebrew Aquaterm formula, you may
>> be out of luck there).
>>
>> In any event, I realize you've said that GNUTERM has no effect, but
>> you didn't say what you did.
>>
>> Please try the following commands from Octave's command line.
>>
>> close all
>> set GNUTERM x11
>> plot (rand (3))
>>
>> Also, there is good chance that the FLTK toolkit is supported. To find
>> out, run Octave via the command line (this will not work from the GUI)
>> and try ...
>>
>> close all
>> graphics_toolkit fltk
>> plot (rand (3))
>>
>> Ben
>>
>
>set GNUTERM x11
should be
setenv GNUTERM x11
BTW, run gnuplot from octave prompt
octave> system gnuplot
and in the gnuplot execute
gnuplot> set term
and see what interactive terminal is prepared for your gnuplot.
For Mac OSX, available interactive terminals are
aqua, x11, wxt, and qt.
Tatsuro