Commit 2e9ff44a authored by Paul Asmuth's avatar Paul Asmuth
Browse files

update readme

parent 161a1e18
Loading
Loading
Loading
Loading
+26 −22
Original line number Diff line number Diff line
@@ -4,20 +4,19 @@ PlotFX
[![Build status](https://ci.appveyor.com/api/projects/status/8h07x0erafnxsumi/branch/master?svg=true)](https://ci.appveyor.com/project/plotfx/plotfx/branch/master)
![BSD-License](https://img.shields.io/badge/license-BSD-blue.svg?style=flat-square)

`plotfx` is a tool for creating data-driven graphics. The primary use case for it
is creating custom charts ("graphs"), dashboards and other highly parametric
illustrations.

Drawings are defined using a lightweight syntax that is very similar to CSS.
One of the main goals for PlotFX is that using it should be quick, simple and fun.
PlotFX is a tool for creating data-driven graphics; it allows you to create
parametric illustrations such as charts and dashboards using a lighweight
CSS-like syntax.

You can run PlotFX from the command line, where it generates SVG, PNG and PDF
output files. Additionally, you can embed it into your own application using the
C API.

**WARNING**: The master branch recently underwent a large refactoring and the
stability is currently beta/experimental. Maybe not even that. Polishing everything
up will take a few more weeks...
PlotFX is built in the hope that using it will be quick, simple and fun.

**WARNING**: The master branch recently underwent a significant refactoring and the
stability is currently beta/experimental. Maybe not even that. It will take a few
more weeks to stabilize and document everything.

[Examples](https://plotfx.org/examples) |
[Documentation](https://plotfx.org/reference)
@@ -26,31 +25,36 @@ up will take a few more weeks...
Getting Started
---------------

Here is how to draw a simple scatter plot using plotfx:
Here is how to draw a simple timeseries chart using plotfx:

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

Output File (`example_chart.svg`):

[![A simple line chart](/examples/linecharts/lines_with_points.svg)](./examples/linecharts/lines_with_points.ptx)
[![A simple line chart](/examples/linecharts/simple_timeseries.svg)](./examples/linecharts/simple_timeseries.ptx)

Input File (`example_chart.ptx`):

    data: csv('tests/testdata/city_temperatures.csv');
    x: month;
    y: temperature;
    group: city;
    width: 1200px;
    height: 280px;

    scale-y-min: -10;
    scale-y-max: 32;
    scale-y-min: 0;
    scale-y-max: 140;

    lines {
      xs: csv('measurement.csv', time);
      ys: csv('measurement.csv', value2);
      colors: #06c;
    }

    layer {
      type: lines;
      stroke: 2pt;
    axis {
      position: bottom;
      format: datetime("%H:%M:%S");
    }

    legend {
      position: top left inside;
    axis {
      position: left;
      layout: linear(20);
    }


+23 −25
Original line number Diff line number Diff line
# PlotFX v0.2.0

PlotFX is a standalone tool for creating charts and other data-driven graphics.
PlotFX is a tool for creating data-driven graphics; it allows you to create
parametric illustrations such as charts and dashboards using a lighweight
CSS-like syntax.

Charts are defined using a lightweight syntax that is very similar to CSS.
You can run PlotFX from the command line, where it generates SVG, PNG and PDF
output files. Additionally, you can embed it into your own application using the
C API.

PlotFX is partially based on ideas from the "Grammar of Graphics" [0].
One of the main goals for PlotFX is that creating charts should be quick, simple
and fun.
PlotFX is built in the hope that using it will be quick, simple and fun.

**WARNING**: The project is currently a work-in-progress. I'm currently working
on removing the old SQL chart specification language and replacing it with the
new CSS-like syntax. This might take a while...
**WARNING**: The master branch recently underwent a significant refactoring and the
stability is currently beta/experimental. Maybe not even that. It will take a few
more weeks to stabilize and document everything.

<div class="notice">
  <div style="float:right;"><a class="github-button" data-style="mega" href="https://github.com/plotfx/plotfx" data-count-href="/plotfx/plotfx/stargazers" data-count-api="/repos/plotfx/plotfx#stargazers_count" data-count-aria-label="# stargazers on GitHub" aria-label="Star plotfx/plotfx on GitHub">View on GitHub</a></div>
@@ -23,7 +22,7 @@ new CSS-like syntax. This might take a while...

## Getting Started

[![A simple line chart](./examples/linecharts/lines_with_points.svg)](./examples/linecharts/lines_with_points)
[![A simple line chart](./examples/linecharts/simple_timeseries.svg)](./examples/linecharts/simple_timeseries)

The simple line chart from above was generated with PlotFX using the following
command line:
@@ -33,23 +32,25 @@ command line:
Here is the input file from which the above plot was generated (`example_chart.ptx`):

    width: 1200px;
    height: 480px;
    height: 280px;

    data: csv('tests/testdata/city_temperatures.csv');
    x: month;
    y: temperature;
    group: city;
    scale-y-min: 0;
    scale-y-max: 140;

    scale-y-min: -10;
    scale-y-max: 32;
    lines {
      xs: csv('measurement.csv', time);
      ys: csv('measurement.csv', value2);
      colors: #06c;
    }

    layer {
      type: lines;
      stroke: 2pt;
    axis {
      position: bottom;
      format: datetime("%H:%M:%S");
    }

    legend {
      position: top left inside;
    axis {
      position: left;
      layout: linear(20);
    }


@@ -68,13 +69,10 @@ for more.
_Example: Simple timeseries chart_
<a href="/examples/linecharts/simple_timeseries"><img src="/examples/linecharts/simple_timeseries.svg" style="width: 100%;" /></a>

_Example: Chart with explicit domain and legend_
<a href="/examples/linecharts/explicit_domain"><img src="/examples/linecharts/explicit_domain.svg" style="width: 100%;" /></a>

_Example: Horizontal barchart_
<a href="/examples/barcharts/horizontal_bars"><img src="/examples/barcharts/horizontal_bars.svg" style="width: 100%;" /></a>

_Example: Scatter chart with lables_
_Example: Scatter chart with labels_
<a href="/examples/pointcharts/pointchart_with_labels"><img src="/examples/pointcharts/pointchart_with_labels.svg" style="width: 100%;" /></a>

<script async defer src="https://buttons.github.io/buttons.js"></script>