Loading ...
Sorry, an error occurred while loading the content.

pm3d updated to level (c)

Expand Messages
  • Petr Mikulik
    I have updated pm3d to level (c), you may get it from http://www.sci.muni.cz/~mikulik/gnuplot/ What s new: - various improvements / bug fixes - demo of
    Message 1 of 4 , May 3, 1999
    View Source
    • 0 Attachment
      I have updated pm3d to level (c), you may get it from
      http://www.sci.muni.cz/~mikulik/gnuplot/

      What's new:
      - various improvements / bug fixes
      - demo of (nearly) all pm3d features
      - pm3d accepts reversed z range (makes any sense?)
      - new: `set pm3d map` sets some options for plotting a map, i.e. this
      is equivalent to these user commands:
      set pm3d at b
      set view 180,0,1.3
      set yrange [*:*] reverse
      There are two problems caused by other parts of gnuplot:
      - y label is not rotated, see below,
      - it is difficult to avoid so many blank space (IMHO) around
      the graph area and paper sheet edges,
      that means there is need for 2D graph layout for 3D maps (see below
      too).


      --------------------------------------------------------

      Note: it would be great if `set yrange` (as well as all other command)
      would accept any order of options [`set pm3d` allows any order].
      Then `set yrange reverse` would be more convenient to write.
      This was main reason to implement `set pm3d map` which tries to
      setup all I like for maps.

      For tastes of other users, it would be great if gnuplot could load
      files from a GNUPLOT_LOAD_PATH. This would add the posibility of
      macro-like syntax `load "my_map_set.gp" or `load "my_colors.gp"`.


      --------------------------------------------------------

      gnuplot bugs/unpleasant features discovered during my work on pm3d:


      (1) the following crashes gnuplot:

      set title "THIS IS OK"
      set key below
      splot y
      pause -1
      set title "THIS WILL CRASH: Process terminated by SIGFPE"
      set nosurface
      splot y
      pause -1 # but this command is never reached

      ***

      (2) having a file `test.gp`:

      set grid
      exit
      quit
      plot x
      pause -1

      and issuing command `gnuplot test.gp`, I would expect that `plot x`
      is never reached. Why gnuplot reads the whole file and ignores exit
      (contrary to the documentation)?


      ***

      (3) `set origin` with "larger" negative values throws away the whole
      figure; try

      set view 180,0
      set origin -0.1,0
      splot x


      ***

      (4) using map, i.e.
      `set view 180,0,1.25; set yrange [*:*] reverse`
      the ylabel is not rotated (contrary to usual `plot`). How to do this?
      See also the need for "2D layout for 3D maps" in (5).

      ***

      (5) My main reason for pm3d things in gnuplot are maps
      (`set view 180,0`), to obtain identical layout produced by my pm3d
      program. Now I am very unhappy that it is impossible to define the
      plotting region as easily as in 2D plots, i.e. that `by default` the
      plot occupies nearly the whole paper sheet with x,y labels and title
      well spaced around. Thus, the main problem: how to adopt the 2D layout
      for 3D maps?

      Note: I have noticed that [xleft,xbot] [xright,ytop] are corners of 2D
      graph, while for 3d plot with `set view 180,0` this becomes the
      surrounding around everything (map, labels, tics).

      ***

      (6) There could be only single demo file if gnuplot accepts
      something like
      if (gif_demo) !run_commands_for_gif_only

      ***

      ---
      Petr Mikulik, mikulik@...



      [[[[ unsubscribe from info-gnuplot-beta via majordomo@... ]]]]
    • Alexander Mai
      ... Checked here with 3.7.0.5 under linux. Debug info is given below. (gdb) r splot-crash.gp Starting program:
      Message 2 of 4 , May 3, 1999
      View Source
      • 0 Attachment
        On Mon, May 03, 1999 at 09:44:07AM +0100, Petr Mikulik wrote:
        >
        > (1) the following crashes gnuplot:
        >
        > set title "THIS IS OK"
        > set key below
        > splot y
        > pause -1
        > set title "THIS WILL CRASH: Process terminated by SIGFPE"
        > set nosurface
        > splot y
        > pause -1 # but this command is never reached


        Checked here with 3.7.0.5 under linux.
        Debug info is given below.

        (gdb) r splot-crash.gp
        Starting program: /u/mai/compile/gnuplot/gnuplot-3.7.0.5/src/./gnuplot splot-crash.gp


        Program received signal SIGFPE, Arithmetic exception.
        0x8054a1a in boundary3d (scaling=0, plots=0x8126538, count=1) at graph3d.c:404
        404 key_cols = (int) (ptitl_cnt / key_rows) + ((ptitl_cnt % key_rows) > 0);
        (gdb) where
        #0 0x8054a1a in boundary3d (scaling=0, plots=0x8126538, count=1) at graph3d.c:404
        #1 0x805501b in do_3dplot (plots=0x8126538, pcount=1) at graph3d.c:573
        #2 0x807bf26 in eval_3dplots () at plot3d.c:1642
        #3 0x8078f1a in plot3drequest () at plot3d.c:318
        #4 0x804bff3 in command () at command.c:517
        #5 0x804b6e5 in do_line () at command.c:271
        #6 0x807304d in load_file (fp=0x8125668, name=0xbffff6b3 "splot-crash.gp", can_do_args=0)
        at misc.c:1150
        #7 0x8074c2d in main (argc=1, argv=0xbffff4f8) at plot.c:590
        (gdb) p key_rows
        $1 = 0


        > ***
        >
        > (2) having a file `test.gp`:
        >
        > set grid
        > exit
        > quit
        > plot x
        > pause -1
        >
        > and issuing command `gnuplot test.gp`, I would expect that `plot x`
        > is never reached. Why gnuplot reads the whole file and ignores exit
        > (contrary to the documentation)?

        Has been reported already, but unresolved.
        I even seem to remember that something else once didn't work
        when read from file. I/one should check the mailinglist archive ..
        Hmm, this wasn't put in by intention ? But can't really imagine
        why it should be useful this way.

        --
        Alexander Mai
        st002279@...-darmstadt.de

        [[[[ unsubscribe from info-gnuplot-beta via majordomo@... ]]]]
      • Alexander Mai
        ... Ok, I spent a few minutes on it. I would say it can t exit since it isn t implemented! In load_file() the result of do_line() isn t checked, which should
        Message 3 of 4 , May 3, 1999
        View Source
        • 0 Attachment
          On Mon, May 03, 1999 at 09:44:07AM +0100, Petr Mikulik wrote:
          >
          > (2) having a file `test.gp`:
          >
          > set grid
          > exit
          > quit
          > plot x
          > pause -1
          >
          > and issuing command `gnuplot test.gp`, I would expect that `plot x`
          > is never reached. Why gnuplot reads the whole file and ignores exit
          > (contrary to the documentation)?

          Ok, I spent a few minutes on it.
          I would say it can't exit since it isn't implemented!
          In load_file() the result of do_line() isn't checked, which
          should probably somehow indicate to quit the session.

          Implementation has to include the clean-up stuff in plot.c (around line 603)
          or call some other (??) routine which does that job.

          --
          Alexander Mai
          st002279@...-darmstadt.de

          [[[[ unsubscribe from info-gnuplot-beta via majordomo@... ]]]]
        • Lars Hecking
          ... It can be done, at the cost of obfuscating the code completely. But rewriting the parser in yacc would help a great deal ... ... I have implemented this.
          Message 4 of 4 , Jun 2, 1999
          View Source
          • 0 Attachment
            Petr Mikulik writes:
            > --------------------------------------------------------
            >
            > Note: it would be great if `set yrange` (as well as all other command)
            > would accept any order of options [`set pm3d` allows any order].
            > Then `set yrange reverse` would be more convenient to write.
            > This was main reason to implement `set pm3d map` which tries to
            > setup all I like for maps.

            It can be done, at the cost of obfuscating the code completely.
            But rewriting the parser in yacc would help a great deal ...

            > For tastes of other users, it would be great if gnuplot could load
            > files from a GNUPLOT_LOAD_PATH. This would add the posibility of
            > macro-like syntax `load "my_map_set.gp" or `load "my_colors.gp"`.

            I have implemented this.

            > gnuplot bugs/unpleasant features discovered during my work on pm3d:

            > (2) having a file `test.gp`:
            >
            > set grid
            > exit
            > quit
            > plot x
            > pause -1
            >
            > and issuing command `gnuplot test.gp`, I would expect that `plot x`
            > is never reached. Why gnuplot reads the whole file and ignores exit
            > (contrary to the documentation)?

            Fixed.

            > (6) There could be only single demo file if gnuplot accepts
            > something like
            > if (gif_demo) !run_commands_for_gif_only

            I thought the changes I made yesterday and today might enable
            this, but wrong. The expression parser, which evaluates
            (gif_demo) goes too far and swallows the '!' too, interpreting
            it as unary ! (logical negation).

            I'd rather fix the parser than introducing a new command, but
            I can't figure out how exactly the expression parser works :-/


            [[[[ unsubscribe from info-gnuplot-beta via majordomo@... ]]]]
          Your message has been successfully submitted and would be delivered to recipients shortly.