Commit 8ce9030b authored by Paul Asmuth's avatar Paul Asmuth
Browse files

update readme

parent 0c7b2171
Loading
Loading
Loading
Loading
+89 −9
Original line number Diff line number Diff line
plotfx
PlotFX
======

A command line tool for creating charts from CSV files.
[![Build Status](https://travis-ci.org/plotfx/plotfx.png?branch=master)](http://travis-ci.org/plotfx/plotfx)

**!!! WARNING !!!! -- WORK IN PROGRESS**: This is the old "FnordMetric" ChartSQL
code which had been unmaintained for some time. In hindsight, I now think that the
tight coupling of the charting code to the built-in SQL engine has somewhat limited
its usability. Rather than just letting the old code rot, I'm currently working on
removing the SQL parts and making the plotting toolkit usable with a simple
css-like interface. This might take a while.
`plotfx` is a command line tool for creating charts from CSV files. It supports a
number of different plot types and other diagrams. Each chart can be customized
using a configuration language similar to CSS.

[Examples](https://github.com/plotfx/plotfx/tree/master/examples) |
[Documentation](https://plotfx.org/)


Example
-------

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](./examples/linecharts/examples_lines_with_points.png?raw=true)

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, bejing);
      }

      # ...
    }


For more examples, please see [the examples page](https://github.com/plotfx/plotfx/tree/master/examples).


Building
--------

To build plotfx, you need an up-to-date C++ compiler, cmake and libcairo. Run:
To build PlotFX, you need an up-to-date C++ compiler, cmake, liharfbuzz, libpng
and libcairo. Run:

    $ cmake .
    $ make
@@ -26,6 +65,47 @@ To run the test suite, run `make check`:

    $ make check


More Examples
-------------

Here are some more examples of plots generated by PlotFX:

<table>
  <tr>
    <td width="50%">
      <img src="./examples/linecharts/examples_lines_with_points.png?raw=true">
    </td>
    <td width="50%">
      <img src="./examples/pointcharts/examples_pointchart_with_labels.png?raw=true">
    </td>
  </tr>
  <tr>
  </tr>
  <tr>
    <td width="50%">
      <img src="./examples/areacharts/examples_simple_area.png?raw=true">
    </td>
    <td width="50%">
      <img src="./examples/barcharts/examples_negative_values.png?raw=true">
    </td>
  </tr>
  <tr>
  </tr>
  <tr>
    <td width="50%">
      <img src="./examples/linecharts/examples_lines_with_labels.png?raw=true">
    </td>
    <td width="50%">
      <img src="./examples/areacharts/examples_area_ranges.png?raw=true">
    </td>
  </tr>
</table>


For more examples, please see [the examples page](https://github.com/plotfx/plotfx/tree/master/examples).


License
-------

+33.4 KiB
Loading image diff...
+32 KiB
Loading image diff...
+36.8 KiB
Loading image diff...
+37.7 KiB
Loading image diff...
Loading