Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2521 > unrolled thread
| Started by | land_adrian@hotmail.com |
|---|---|
| First post | 2014-07-20 14:00 -0700 |
| Last post | 2014-07-21 20:08 -0700 |
| Articles | 4 — 2 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
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
| From | land_adrian@hotmail.com |
|---|---|
| Date | 2014-07-20 14:00 -0700 |
| Subject | Demo file problems: script versus command line |
| Message-ID | <f24a9a9a-f10f-49db-9cd7-3975fca4e05f@googlegroups.com> |
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? 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
[toc] | [next] | [standalone]
| From | Ethan A Merritt <EAMerritt@gmail.com> |
|---|---|
| Date | 2014-07-20 20:24 -0700 |
| Message-ID | <lqi15c$bnu$1@dont-email.me> |
| In reply to | #2521 |
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
[toc] | [prev] | [next] | [standalone]
| From | land_adrian@hotmail.com |
|---|---|
| Date | 2014-07-21 18:00 -0700 |
| Message-ID | <da68ca8f-4b73-4226-b7f1-c27972d09986@googlegroups.com> |
| In reply to | #2521 |
Dear Ethan,
Many thanks for the most helpful response. Your suggestion was 'spot on' and I now have simple.dem operating correctly. Now all I need to do is to find out what's up with airfoil.dem ("airfoil.dem", line 132: ';' expected)...
Again, thank you!
Adrian Land
_____________________
On Sunday, July 20, 2014 2:00:45 PM UTC-7, land_...@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?
>
>
>
>
>
> 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
[toc] | [prev] | [next] | [standalone]
| From | land_adrian@hotmail.com |
|---|---|
| Date | 2014-07-21 20:08 -0700 |
| Message-ID | <7032c0aa-4db0-4cd6-a5a1-07506613b05b@googlegroups.com> |
| In reply to | #2526 |
airfoil.dem problem resolved
Turns out to be have been typos in the older version of the file that I downloaded (part of the all.dem examples file downloaded from gnuplot)
# $Id: airfoil.dem,v 1.8 2003/12/16
With a bit of searching I found:
# $Id: airfoil.dem,v 1.10 2006/06/30
Which was a bit better; comparing syntax of these 2 versions let me fix things up and get the whole airfoil demo to work.
On Monday, July 21, 2014 6:00:59 PM UTC-7, land_...@hotmail.com wrote:
> Dear Ethan,
>
> Many thanks for the most helpful response. Your suggestion was 'spot on' and I now have simple.dem operating correctly. Now all I need to do is to find out what's up with airfoil.dem ("airfoil.dem", line 132: ';' expected)...
>
>
>
> Again, thank you!
>
> Adrian Land
>
> _____________________
>
>
>
> On Sunday, July 20, 2014 2:00:45 PM UTC-7, land_...@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?
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > 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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web