Extract (approximate) data from a PostScript file containing a graph created by gnuplot

Suppose I have a PostScript file containing a graph that was generated using gnuplot. However, I do not have the source data, and I do not have the gnuplot commands that were used to generate the chart.

Do you know in any way somehow extracting data from a graphical representation (i.e. a PostScript file)? Such code would literally β€œread the graph” (in particular, I had a smoothed graph / XY graph spread) from the pixel view, and I know that the results will be approximate at best (but it would still be very very desirable).

Do you have any experience with this? Thank you for your time!

+4
source share
2 answers

PostScript is nothing more than a programming language for describing pages. A PostScript file is a text file containing a program that describes a page that is interpreted by a printer or viewer.

Thus, it is modified for programmatic manipulation, albeit at a low level.

I would approach this task as follows.

  • Learn PostScript. (The reference guide comes in handy.)
  • Examine the output from gnuplot. How does gnuplot display a graph? Is it systematic? and so on.
  • Parse and extract the necessary information.
+3
source

g3data , available here , looks like an opportunity. It runs on Linux.

0
source

All Articles