A command line tool for creating charts from CSV files.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 587b15f Dec 8, 2018

README.md

PlotFX

Build Status BSD-License

plotfx is a command line tool for creating charts from CSV files. It supports a number of different plot types and other diagrams. Charts can be customized using a configuration language similar to CSS.

Examples | Documentation

Getting Started

Here is how to generate a simple line chart using plotfx:

$ plotfx -in example_chart.plot -out example_chart.svg

Output File (example_chart.svg):

A simple line chart

Input File (example_chart.plot):

plot {
  axis-top: off;
  axis-right: off;

  ymin: -10;
  ymax: 32;

  series {
    title: "New York";
    point-size: 3.3pt;
    xs: csv(testdata/city_temperatures.csv, month);
    ys: csv(testdata/city_temperatures.csv, new_york);
  }

  series {
    title: "北京市";
    point-size: 3.3pt;
    xs: csv(testdata/city_temperatures.csv, month);
    ys: csv(testdata/city_temperatures.csv, beijing);
  }

  # ...
}

For more examples, please see the examples page.

Building

To build PlotFX, you need an up-to-date C++ compiler, cmake, libharfbuzz and libfreetype. Run:

$ cmake .
$ make

To install the plotfx binary into your system, run make install:

$ make install

To run the test suite, run make test:

$ make test

Examples

Here are some more examples of plots generated by PlotFX:

For more examples, please see the examples page.

License

The PlotFX License (https://plotfx.org)
Copyright (c) 2018, Paul Asmuth, Laura Schlimmer
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.