#132 gnuplot

open
nobody
None
5
2013-06-10
2013-06-09
frink
No

Is there the possibility of using gnuplot for plotting commands?

Discussion

  • Hi,

    I guess the easiest way is to save the data into a binary file, and the plot it using gnuplot's binary input option, e.g.:

    $ gdl
    GDL> a = dist(10)
    GDL> openw, f, 'a.bin', /get_lun
    GDL> writeu, f, a
    GDL> close, f
    GDL> exit
    $ gnuplot
    gnuplot> splot 'a.bin' binary array=(10,10) with lines

    There is no built-in mechanism.

    HTH,
    Sylwester

     
  • frink
    frink
    2013-06-10

    Ty for the workaround. My installation doesn't provide the dist()-command (is this a special library?), but the rest is working fine.

     
  • Hi,

    dist() is part of GDL since 2005 (http://gnudatalanguage.cvs.sourceforge.net/viewvc/gnudatalanguage/gdl/src/pro/dist.pro?view=log).

    It should be installed during "make install" or shipped with a package (e.g. it is included in the Debian package: http://packages.debian.org/sid/amd64/gnudatalanguage/filelist).

    If it's not part of a package you're using, please report it to the packager.

    HTH,
    Sylwester

     
  • frink
    frink
    2013-06-10

    Hey,
    this ist strange, i'm using the gnudatalanguage package under Ubuntu 12.04 with GDL - GNU Data Language, Version 0.9.2 an i have the library

    $ file /usr/share/gnudatalanguage/lib/dist.pro
    /usr/share/gnudatalanguage/lib/dist.pro: ASCII English text
    

    and if i compile it manually

    .r /usr/share/gnudatalanguage/lib/dist.pro
    

    it works, but it doesn't find it by itself. Maybe it's a problem of !PATH?

     
  • Yes, it is a problem of !PATH.

    By default, !PATH should include the /usr/share/gnudatalanguage directory (at least it does so on Debian, and hence most likely on Ubuntu as well).

    If you set !PATH to another value, and not prefixed or suffixed it, gdl will not find it's built-in routines located in /usr/share/gnudatalanguage.

    If that's the case, try setting !PATH e.g. using:

    $ export GDL_PATH=new_path:gdl -quiet -e 'print, !PATH'

    instead of

    $ export GDL_PATH=new_path

    HTH,
    Sylwester

     
  • frink
    frink
    2013-06-10

    Hey,
    thanks a lot. Now it's working. But i had to fix it a little different way. The problem was, as you assumed, the setting of GDL_PATH in my ~.profile. I removed that, and putted

    GDL_STARTUP="$HOME/.gdl/gdl_startup"
    export GDL_STARTUP
    

    and in gdl_startup i call

    !PATH= !PATH + ":"+Expand_Path('+~/.gdl/prozeduren/')
    
     
    Last edit: frink 2013-06-10