7

I have C++ program that now generates two files:

  • data file (with columns of data)
  • gnuplot script (to set ranges and labels properly)

So, for plot I need to have two files which are related to each other.

Is there any possibility, to pack it all to one file? I mean: to put data points coordinates inside gnuplot script?

I am using gnuplot 4.4.

nhed
  • 5,774
  • 3
  • 30
  • 44
user1126423
  • 125
  • 1
  • 5

1 Answers1

17

Yes, you can put datapoints inside your gnuplot script. The simplest example would be

plot "-" with lines, "-" with lines
1 1
2 2
3 3
e
1 3
2 2
3 1
Bernhard
  • 3,619
  • 1
  • 25
  • 50
  • 2
    I would mention that for more information you can look for 'special-filenames' in the gnuplot documentation: http://gnuplot.sourceforge.net/docs_4.6/gnuplot.pdf – andyras Oct 04 '12 at 12:23