bugGNU Octave - Bugs: bug #41822, No figures obtained by the cli

 
 

bug #41822: No figures obtained by the cli

Submitted by:  bo kjellmert <kbkj>
Submitted on:  Mon 10 Mar 2014 12:21:44 PM UTC  
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  None Assigned to:  None
Originator Name:  bo kjellmert Open/Closed:  Closed
Release:  3.8.0 Operating System:  Mac OS

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 14 Mar 2014 07:36:27 AM UTC, comment #4: 

It is a packaging issue indeed. 

Pantxo Diribarne <pantxo>
Project Member
Fri 14 Mar 2014 02:13:47 AM UTC, comment #3: 

Is there an Octave bug to fix here?  Or is this a packaging issue that is outside of Octave?

Rik <rik5>
Project Administrator
Thu 13 Mar 2014 08:38:16 AM UTC, comment #2: 

Now octave’s plotting works. Here is a description of my steps to achieve this. The gnuplot binary is installed to

/usr/local/octave/3.8.0/bin

by using macports. This path is added to octave’s loadpath. The plotting now works, but the modified loadpath cannot be saved. I get the message ’invalid stream object’ from the program savepath.
In /Users/bokjellmert the path /usr/local/octave/3.8.0/bin is exported to PATH. Both before and after this export to PATH the visible components of PATH are, however, the same:

bos-iMac:~ bokjellmert$ echo $PATH
/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
bos-iMac:~ bokjellmert$

Then octave’s plotting is working satisfactorily. I thank Pantxo Diribarne and Sven Oberg for their help.

bo kjellmert <kbkj>
Mon 10 Mar 2014 12:59:49 PM UTC, comment #1: 

In order to list available terminals, you need to run 'set terminal' from  inside a gnuplot session:

pdiribarne@gamb-port-dp:~$ cd /usr/local/octave/3.8.0/bin/
pdiribarne@gamb-port-dp:bin$ ./gnuplot

        G N U P L O T
        Version 4.6 patchlevel 4    last modified 2013-10-06
        Build System: Darwin x86_64

        Copyright (C) 1986-1993, 1998, 2004, 2007-2013
        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info
        faq, bugs, etc:   type "help FAQ"
        immediate help:   type "help"  (plot window: hit 'h')

gnuplot> set terminal

Available terminal types:
       cairolatex  LaTeX picture environment using graphicx package and Cairo backend
           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
         epscairo  eps terminal based on cairo
         epslatex  LaTeX picture environment using graphicx package
              fig  FIG graphics language for XFIG graphics editor
              gif  GIF images using libgd and TrueType fonts
             gpic  GPIC -- Produce graphs in groff using the gpic preprocessor
          hp2623A  HP2623A and maybe others
           hp2648  HP2648 and HP2647
             hpgl  HP7475 and relatives [number of pens] [eject]
           imagen  Imagen laser printer
             jpeg  JPEG images using libgd and TrueType fonts
            latex  LaTeX picture environment
              lua  Lua generic terminal driver
               mf  Metafont plotting standard
              mif  Frame maker MIF 3.00 format
               mp  MetaPost plotting standard
             pcl5  HP Designjet 750C, HP Laserjet III/IV, etc. (many options)
         pdfcairo  pdf terminal based on cairo
              png  PNG images using libgd and TrueType fonts
         pngcairo  png terminal based on cairo
       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)
               qt  Qt terminal
            regis  REGIS graphics language
              svg  W3C Scalable Vector Graphics driver
          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/Tcl canvas widget [perltk] [interactive]
             tpic  TPIC -- LaTeX picture environment with tpic \specials
          unknown  Unknown terminal type - not a plotting device
            vttek  VT-like tek40xx terminal emulator
            xterm  Xterm Tektronix 4014 Mode

You can see that the only "on-screen" terminal seems to be qt (no x11, no wxt, no aqua). In octave 'setenv ("GNUTERM", "qt")' works fine for me.

In octave, "gnuplot_binary" returns "gnuplot", thus the first gnuplot binary in the path is run. I had to remove the other places where I have gnuplot installed (/sw in my case) from my PATH in order to run the expected gnuplot binary.

At least "gnuplot_binary" should point to the one shipped with the dmg installer, and GNUTERM should be set to "qt" by default as it's the only available terminal.

Pantxo Diribarne <pantxo>
Project Member
Mon 10 Mar 2014 12:21:44 PM UTC, original submission:  

Basic facts. I am new to Octave. Computer: iMac, 2.7GHz, IntelIrisPro 5200, 16GB+fusion. Operating system: OSX 10.9.2. Installations: Xcode 5.0.2, XQuartz 2.7.5, binaries for GNU Octave 3.8.0 for OSX 10.9.1 installed from Octave Forge. I cannot get figures by the cli.

octave:1> x = 0:0.1:1; y = sin(x);
octave:2> plot(x,y)

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> figure(5)

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


octave:4> available_graphics_toolkits
ans =
{
  [1,1] = gnuplot
}
octave:5> setenv("GNUTERM","X11")
octave:6> getenv("GNUTERM")
ans = X11
octave:7> getenv("X11")
ans =
octave:8> plot(x,y)

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

Only gnuplot_qt exists, and no list of available terminals is obtained

bos-iMac:~ bokjellmert$ cd /usr/local/octave/3.8.0/libexec/gnuplot/4.6
bos-iMac:4.6 bokjellmert$ find . -name gnuplot_qt -a
./gnuplot_qt
bos-iMac:4.6 bokjellmert$ find . -name gnuplot_x11 -a
bos-iMac:4.6 bokjellmert$ set terminal
bos-iMac:4.6 bokjellmert$

In bash, ’cat gnuplot_qt’ produces a large output ending with the lines

h___cxa_end_catch___cxa_rethrow___dynamic_cast___gxx_personality_v0___stack_chk_fail___stack_chk_guard___stderrp___stdoutp_exit_exp_freopen_memcpy_signal_strcmpdyld_stub_binderbos-iMac:4.6 bokjellmert$ 1;2c
-bash: 1: command not found
-bash: 2c: command not found
bos-iMac:4.6 bokjellmert$

bo kjellmert <kbkj>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by kbkj (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-03-15 rik5 Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.5