Extract diagram data

The output file is fed to the another program such as MATLAB.