help-octave
[Top][All Lists]
Advanced

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

Re: cannot plot with gnuplot


From: Ben Abbott
Subject: Re: cannot plot with gnuplot
Date: Thu, 13 Oct 2011 08:01:23 -0400

On Oct 13, 2011, at 3:39 AM, ishi soichi wrote:

> Hi. I have recently installed Octave so that I can use it with Emacs.
> 
> My environment:
> MacOSX SnowLeopard
> Cocoa Emacs 23.2
> Octave 3.2.3
> gnuplot 4.5
> Maxima 5.25
> 
> I'm simply trying to plot a data set given in the form of csv.(if you need to 
> see the data set, please let me know. But it's a simple csv file that can be 
> plotted in 2d)
> But the following command gives the error.
> 
> 
> octave-3.2.3> data = csvread('ex1data1.txt');
> octave-3.2.3> x = data(:, 1); y = data(:, 2);
> octave-3.2.3> m = length(y);
> octave-3.2.3> plot(x, y, 'rx', 'MarkerSize', 10);
> 
> gnuplot> set terminal aqua enhanced title "Figure 1" size 560 420
>                       ^
>          line 0: unknown or ambiguous terminal type; type just 'set terminal' 
> for a list
> 
> 
> 
> A cause of this problem might be that I'm using Maxima as well.  And for 
> that, gnuplot is set up already.
> Both Maxima and Octave are ready to use in Emacs.  I'm guessing there is some 
> conflict between these applications.
> Or maybe not.
> 
> I have added a portion of .emacs file that sets up Maxima (with gnuplot) and 
> octave at the end of this mail.
> 
> Could anyone point out the problem causing the error above?
> 
> Thanks in advance.
> 
> soichi

The error you've encountered is from gnuplot. It appears that your gnuplot does 
not support the aqua terminal type.

You can test this idea by ...

close all
plot(1:10)
available_terminals = __gnuplot_get_var__ (get(gcf, "__plot_stream__"), 
"GPVAL_TERMINALS")

When I do this, I see ...

available_terminals = aqua canvas cgm corel dpu414 dumb dxf eepic emf emtex 
epslatex epson_180dpi epson_60dpi epson_lx800 fig gif gpic hp2623A hp2648 
hp500c hpdj hpgl hpljii hppj imagen jpeg latex mf mif mp nec_cp6 okidata pbm 
pcl5 pdf png postscript pslatex pstex pstricks qms regis starc svg tandy_60dpi 
tek40xx tek410x texdraw tgif tkcanvas tpic unknown vttek x11 xlib xterm

If "aqau" is  not listed, but "x11" is then you can enable gnuplot graphics by 
...

        setenv GNUTERM x11
        close all
        plot (1:10)

Ben




reply via email to

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