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


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

how to reference same data set in script twice?

Newsgroups comp.graphics.apps.gnuplot
Date 2015-07-03 23:13 -0700
Message-ID <f2050fa4-92ed-46cb-8b25-9f3e50b39be8@googlegroups.com> (permalink)
Subject how to reference same data set in script twice?
From thomas.lehmann.private@googlemail.com

Show all headers | View raw


Hi,

what I'm looking for is an elegant way to reference same
data twice (no file). I have a Python wrapper for plots and
the final script which result looks like (see bottom) ...

In this case we have two data sets. But how to do it when
I would like reference same data set twice without duplicating
the data set? (example: using for fit or displaying same data
with bars instead of lines - multiplot -  or displaying modified
by a function ... there are plenty of variants)

One great solution would be if I could give a
data set a name. Possible? (again: no file wanted)

[code]
cat example.gp
#!/usr/bin/gnuplot
set terminal gif size 640, 480
set output "/tmp/example.gp.gif"
# displaying a plot title
set title "simple example"
# enables displaying a grid
set grid
# plotting values
plot\
    "-" with lines ls 1 title "first curve",\
    "-" with lines ls 2 title "second curve"
1 0
2 1
3 0
4 2
EOF
1 3
2 0
3 2
4 1
EOF
[/code]

Back to comp.graphics.apps.gnuplot | Previous | NextNext in thread | Find similar


Thread

how to reference same data set in script twice? thomas.lehmann.private@googlemail.com - 2015-07-03 23:13 -0700
  Re: how to reference same data set in script twice? Karl-Friedrich Ratzsch <mail.kfr@gmx.net> - 2015-07-05 02:23 +0200
    Re: how to reference same data set in script twice? Ethan A Merritt <EAMerritt@gmail.com> - 2015-07-07 07:43 -0700
      Re: how to reference same data set in script twice? Karl Ratzsch <mail.kfr@gmx.net> - 2015-07-07 18:24 +0200

csiph-web