help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: plotting functions not working


From: Ben Abbott
Subject: Re: plotting functions not working
Date: Tue, 04 Sep 2012 16:50:42 -0400

On Sep 4, 2012, at 3:46 PM, JonathanF wrote:

> I'm using trying to use Octave as part of the Coursera Machine Learning
> course.
> 
> I'm running Mac OS X 10.6.8.
> 
> I have Octave 3.4.0, Gnuplot 4.4 patchlevel 3 and Aquaterm all 
> installed, and X11 and XQuartz installed.  
> 
> When I run Gnuplot the startup script runs without any errors
> and I get the gnuplot> prompt.  When I run Octave the startup
> script runs and I get the octave prompt.  Octave seems to be 
> working but when I try to plot something like plot(1:10) nothing
> happens.  I can't figure out how to fix this connection between
> Octave and Gnuplot.  Can anyone suggest what to try?

There's no need to install both X11 *and* XQuartz.  Please verify that your x11 
and aqua are working as expected, by running gnuplot and producing some tests 
plots using X11 and AquaTerm.

$ gnuplot
gnuplot> set term x11
Terminal type set to 'x11'
Options are ' nopersist'
gnuplot> plot sin(x)
gnuplot> set term aqua
Terminal type set to 'aqua'
Options are '0 title "Figure 0" size 846,594 font "Times-Roman,14" noenhanced 
solid'
gnuplot> plot sin(x)
gnuplot> quit

Does gnplot produce the expected plot using both X11 and AquaTerm?

I assume you installed the Octave application bundle from SourceForge?  That 
bundle is problematic.  The simple solution is to install Octave using Fink, 
MacPorts, or Homebrew.

        http://wiki.octave.org/Octave_for_MacOS_X

If you really want to use the application bundle form sourceforge,  you'll need 
to be sure that your gnuplot and aquaterm are compatible, and that Octave sees 
the correct gnuplot.  

>From the Octave prompt, type ...

        system ("which gnuplot")

... and tell us what it returns.

If it finds a gnuplot, try running gnuplot from Octave.

        setenv GNUTERM aqua
        [status, output] = system ('gnuplot -e "plot sin(x)" --persist')
        status = 0
        output = 

and tell us what "status" and "output" return.

Next try x11 ...

        setenv GNUTERM x11
        [status, output] = system ('gnuplot -e "plot sin(x)" --persist')
        status = 0
        output = 

... and tell us what "status" and "output" return.

Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]