Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2522

Re: Demo file problems: script versus command line

From Ethan A Merritt <EAMerritt@gmail.com>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Demo file problems: script versus command line
Date 2014-07-20 20:24 -0700
Organization made entirely of Lego
Message-ID <lqi15c$bnu$1@dont-email.me> (permalink)
References <f24a9a9a-f10f-49db-9cd7-3975fca4e05f@googlegroups.com>

Show all headers | View raw


land_adrian@hotmail.com wrote:

> I have just installed gnuplot on my Mac OSX machine (details below)
> and started exploring the demo files. Some demo scripts work as
> expected, but I'm seeing errors in a few cases I should appreciate any
> guidance with the following:
> 
> First problem: simple.dem
> Running script:
> gnuplot> load "simple.dem"
> Gives error message: "simple.dem", line 11: undefined variable: x
> 
> Copying line 11 from the script (using BBedit), and launching from
> command line: gnuplot> plot [-10:10] sin(x),atan(x),cos(atan(x))
> plots just fine.
> 
> So, what do I need to change to make he script work?

The only thing that occurs to me is that the demos reset the program
state at the end, not at the start, of the demo.  So if you have
previously executed commands that leave the program in an unexpected
state, the demo may fail when loaded.

For example, this will fail with the error message you show:

  set dummy a,b
  plot (x)

So will this:

  set dummy a,b
  load 'simple.dem'

But this should work:

  set dummy a,b
  reset
  load 'simple.dem'



> 
> 
> Second problem: airfoil.dem
> Running script:
> gnuplot> load "airfoil.dem"
> "airfoil.dem", line 132: ';' expected
> Gives only partial output.
> 
> This is what code looks like in BBedit
> 130  plot airfoil_x(t), airfoil_y(t) title "mean line" w l 2, \
> 131  airfoil_x(t), airfoil_y1(t, thick) title "upper surface" w l 1, \
> 132  airfoil_x(t), airfoil_y2(t, thick) title "lower surface" w l 1
> 133  pause -1 "Press Return"
> 
> 
> Any help much appreciated!
> Adrian Land
> San Carlos CA
> 
> 
> iMac  OSX  10.6.8  Snow Leopard
> 
> Xcode 3.2 from Snow Leopard DVD
> 
> AquaTerm 1.1.1
> 
> Macports 2.3.1 from web
> sudo port install gnuplot
> 
> Gnuplot
> Version 4.6 patchlevel 5    last modified February 2014
> Build System: Darwin i386

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Demo file problems: script versus command line land_adrian@hotmail.com - 2014-07-20 14:00 -0700
  Re: Demo file problems: script versus command line Ethan A Merritt <EAMerritt@gmail.com> - 2014-07-20 20:24 -0700
  Re: Demo file problems: script versus command line land_adrian@hotmail.com - 2014-07-21 18:00 -0700
    Re: Demo file problems: script versus command line land_adrian@hotmail.com - 2014-07-21 20:08 -0700

csiph-web