How to extract data from a graph in a PDF

A graph in a PDF is usually stored as a drawing: lines and shapes with exact positions. That means the data can be read back exactly, without guessing from pixels.

Drop in a graph or a PDF

How it works

When a PDF holds the chart as a drawing (most figures in papers do), the values are read from the drawing itself. Nothing is estimated from pixels, so a point is as precise as the file is.

The tick labels give the axis scale, the legend gives the series names, and each bar, marker and line corner gives a value. Error bars are read at both ends.

Steps

  1. Upload the PDF. There is no need to cut the figure out first.
  2. Each chart found comes back on its own tab. Pick pages if the paper is long.
  3. Download one Excel file with a sheet per chart.

When the PDF does not help

Some PDFs hold the figure as a picture (older scans, some journal archives). Then the page is read as a picture instead, and you should check the values on the chart.

Charts drawn with matplotlib, R (ggplot2 and base graphics) and gnuplot are what we test on. A chart from another program may be read in part; the result says how many shapes in the plot were not read.

Questions

Is the PDF kept?

No. It is read and then discarded.

Does reading a PDF use AI?

No. Charts drawn in a PDF are read by ordinary code on our server and never go to an AI model.

Related