Inkscape extension to import Grace (.agr) files via EPS (PDF)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
agr_input.inx
agr_input.py

README.md

Import Grace (.agr) files into Inkscape

Plots prepared using the Grace plotting package can be exported to EPS and imported into the Inkscape drawing package, by hand. This exension automates the process by wrapping the necessary command line tools into an Inkscape extension.

Installation

Copy the files agr_import.py and agr_import.inx into your local Inkscape extension folder (eg $HOME/.config/inkscape/extensions/ on unix, or %APPDATA%\inkscape\extensions\ on Windows).

In order to work, the following tools are required:

  • gracebat, 'headless' (batch) mode tool which usually comes with Grace ;
  • epstool, which is often packaged as a standalone tool and can be obtained here ;
  • ps2pdf, which is part of Ghostscript (if you can already import EPS then you have this).

I have noticed an occasional problem with the bounding box when importing the EPS generated by Grace directly into Inkscape. An intermediate processing step with epstool --bbox --copy seems to fix this problem, hence is included in this extension.

Usage

In Inkscape, Grace (.agr) files should now appear under File → Import, and can be selected for import. The conversion to EPS (PDF) is done automatically, and the subsequent dialogue is the standard one for importing EPS (PDF) files. The intermediate (temporary) EPS (PDF) files are discarded.

Copying

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Copyright

This program is copyright © 2015 Patrick B Warren.

The program is based on eps_input.inx, ps2pdf-ext.py (python script for running ps2pdf in Inkscape extensions) and run_command.py (module for running SVG-generating commands in Inkscape extensions) -- copyright © 2008 Stephen Silver.

Contact

Email: patrickbwarren{at}gmail{dot}com