/GracePlot.jl

Build Grace/xmgrace plots with Julia!

Primary LanguageJuliaMIT LicenseMIT

GracePlot.jl: Build Grace/xmgrace plots with Julia!

Build Status

🎨 Galleries (sample output) / 📡 CMDimCircuits.jl/SignalProcessing samples (Likely out of date.) 🎨

Description

The GracePlot.jl module is a simple control interface for Grace/xmgrace - providing more publication-quality plotting facilities to Julia.

  • GracePlot.jl is ideal for seeding a Grace session with plot data before fine-tuning the output with Grace itself.
  • Grace "templates" (.par) files can then be saved/re-loaded to maintain a uniform appearance in publication.
  • The user is encouraged to pre-process data using math facilities from Julia instead of those built-in to Grace.

Table of Contents

  1. Installation
    1. Configuration
  2. Sample Usage
  3. Interface Documentation
  4. Known Limitations

Installation

  1. Install Grace/xmgrace (details).
  2. Install Julia (download here).
  3. Install GracePlot from the Julia package prompt:
]add GracePlot
  1. Test GracePlot from the Julia prompt:
using GracePlot
include(joinpath(dirname(pathof(GracePlot)), "../sample/runsamples.jl"))

Configuration

By default, GracePlot.jl assumes Grace is accessible from the environment path as xmgrace. To specify a different command/path, simply set the GRACEPLOT_COMMAND environment variable.

The value of GRACEPLOT_COMMAND can therefore be set from ~/.julia/config/startup.jl with the following:

ENV["GRACEPLOT_COMMAND"] = "/home/laforge/bin/xmgrace2"

Sample Usage

The sample directory contains a few demonstrations on how to use GracePlot.jl.

The template directory contains a repository of sample Grace template (parameter) files.

Known Limitations

GracePlot.jl currently provides a relatively "bare-bones" interface (despite offering significant functionality).

  • Does not currently provide much in terms of input validation.
  • Does not support the entire Grace control interface.
    • In particular: GracePlot.jl does not support Grace math operations. Users are expected to leverage Julia for processing data before plotting.
  • On certain runs, Grace will complain that some commands cannot be executed... almost like commands are sent too fast for Grace, or something... Not sure what this is. Try re-running.

SVG Issues

GracePlot.jl will post-process SVG files in an attempt to support the W3C 1999 standard. The changes enable most new web browsers to display the SVG outputs. Note, however, that text will not appear correctly on these plots.

The EPS format is therefore suggested if high-quality vector plots are desired.

Crashes

The ARRANGE command appears to cause crashes/logouts on certain Linux installs with relatively high occurance.

Compatibility

Extensive compatibility testing of GracePlot.jl has not been performed. The module has been tested using the following environment(s):

  • Linux / Julia-1.1.1 / Grace-5.1.25.

Disclaimer

The GracePlot.jl API is not perfect. Backward compatibility issues are to be expected as the module matures.